/* ==========================================================================
   AlphaSync — design tokens and base components
   --------------------------------------------------------------------------
   Hand-authored. No build step, no framework, no network assets.
   Brand is strictly monochrome: no accent hue anywhere in the system.
   Emphasis comes from contrast, weight and space — never from colour.
   Default theme is the LIGHT inversion of the dark brand palette.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light;

  /* Brand palette (the sanctioned five) ------------------------------------ */
  --void: #000000;
  --carbon: #0c0e12;
  --steel: #2d3035;
  --white: #ffffff;
  --silver: #a9aaab; /* decoration/rules only — NEVER text on white (2.33:1) */

  /* Semantic surface + text tokens ---------------------------------------- */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f2f3;
  --line: rgba(12, 14, 18, 0.12);
  --line-2: rgba(12, 14, 18, 0.24);
  --text: #0c0e12;
  --muted: #565554; /* 7.44:1 on white — the safe secondary text colour */
  --dim: #696766; /* tertiary text, still AA on white and on --surface-2 */
  --accent: #0c0e12;
  --accent-ink: #ffffff;
  --grad: linear-gradient(135deg, #2d3035 0%, #0c0e12 100%);

  /* Inverse surface, for the occasional carbon band ------------------------ */
  --invert-bg: #0c0e12;
  --invert-text: #ffffff;
  --invert-muted: #a9aaab; /* silver IS legible on carbon (9.4:1) */

  /* Status (text-only, inline messages — no colour decoration) ------------- */
  --ok-text: #1d4d2b;
  --ok-bg: #f2f6f3;
  --warn-text: #6b2b16;
  --warn-bg: #f8f4f2;

  /* Type ------------------------------------------------------------------- */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --fs-xs: 0.8125rem; /* 13px */
  --fs-sm: 0.9375rem; /* 15px */
  --fs-base: 1.0625rem; /* 17px — comfortable reading size */
  --fs-md: 1.1875rem; /* 19px */
  --fs-lg: clamp(1.375rem, 1.15rem + 1.1vw, 1.75rem);
  --fs-xl: clamp(1.75rem, 1.35rem + 1.9vw, 2.5rem);
  --fs-2xl: clamp(2.125rem, 1.5rem + 3vw, 3.25rem);
  --fs-3xl: clamp(2.5rem, 1.6rem + 4.4vw, 4.25rem);

  --lh-tight: 1.08;
  --lh-snug: 1.25;
  --lh-normal: 1.5;
  --lh-relaxed: 1.65;

  --ls-tight: -0.022em;
  --ls-snug: -0.012em;
  --ls-wide: 0.08em;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Space (4px base) ------------------------------------------------------- */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 2.5rem;
  --s-8: 3rem;
  --s-9: 4rem;
  --s-10: 5rem;
  --s-11: 6.5rem;
  --s-12: 8rem;

  --section-y: clamp(3.5rem, 2.25rem + 5.5vw, 7rem);
  --section-y-tight: clamp(2.5rem, 1.75rem + 3vw, 4.5rem);

  /* Layout ----------------------------------------------------------------- */
  --container: 68rem; /* 1088px */
  --container-narrow: 46rem; /* 736px — long-form measure */
  --container-wide: 80rem;
  --gutter: clamp(1.25rem, 0.6rem + 2.6vw, 2.5rem);
  --header-h: 4.25rem;

  /* Radius, rules, elevation ----------------------------------------------- */
  --radius-sm: 2px;
  --radius: 4px;
  --radius-lg: 8px;
  --rule: 1px solid var(--line);
  --rule-strong: 1px solid var(--line-2);
  --shadow-sm: 0 1px 2px rgba(12, 14, 18, 0.06);
  --shadow: 0 1px 3px rgba(12, 14, 18, 0.07), 0 8px 24px rgba(12, 14, 18, 0.05);

  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--carbon);

  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --dur: 160ms;
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--s-4);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-2xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

h2 {
  font-size: var(--fs-xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

h3 {
  font-size: var(--fs-lg);
}

h4 {
  font-size: var(--fs-md);
}

p {
  margin: 0 0 var(--s-4);
  text-wrap: pretty;
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--line-2);
  transition: text-decoration-color var(--dur) var(--ease);
}

a:hover {
  text-decoration-color: var(--text);
}

strong,
b {
  font-weight: var(--fw-semibold);
}

small {
  font-size: var(--fs-sm);
}

hr {
  height: 1px;
  margin: var(--s-7) 0;
  border: 0;
  background: var(--line);
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

ul,
ol {
  margin: 0 0 var(--s-4);
  padding-left: 1.35em;
}

li {
  margin-bottom: var(--s-2);
}

li:last-child {
  margin-bottom: 0;
}

dl {
  margin: 0 0 var(--s-4);
}

dt {
  font-weight: var(--fw-semibold);
  margin-top: var(--s-4);
}

dd {
  margin: var(--s-1) 0 0;
  color: var(--muted);
}

blockquote {
  margin: var(--s-6) 0;
  padding: var(--s-2) 0 var(--s-2) var(--s-5);
  border-left: 2px solid var(--carbon);
  font-size: var(--fs-md);
  color: var(--text);
}

figure {
  margin: var(--s-6) 0;
}

figcaption {
  margin-top: var(--s-3);
  font-size: var(--fs-sm);
  color: var(--muted);
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
  vertical-align: top;
}

/* --------------------------------------------------------------------------
   3. Focus — AA-visible on both light and carbon surfaces
   -------------------------------------------------------------------------- */

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--carbon);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.is-invert :focus-visible,
.site-footer :focus-visible,
.on-dark :focus-visible {
  outline-color: var(--white);
}

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100%;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--carbon);
  color: var(--white);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: var(--s-3);
  outline-color: var(--white);
}

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  max-width: var(--container-narrow);
}

.wrap--wide {
  max-width: var(--container-wide);
}

.section {
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: var(--section-y-tight);
}

.section--surface {
  background: var(--surface-2);
}

.section--invert {
  background: var(--invert-bg);
  color: var(--invert-text);
}

.section--invert h1,
.section--invert h2,
.section--invert h3 {
  color: var(--invert-text);
}

.section--invert p,
.section--invert li {
  color: #e6e6e7;
}

.section--invert a {
  color: var(--invert-text);
  text-decoration-color: rgba(255, 255, 255, 0.42);
}

.section--invert a:hover {
  text-decoration-color: var(--white);
}

.section--invert .muted,
.section--invert .lede {
  color: var(--invert-muted);
}

.section--hairline {
  border-top: var(--rule);
}

.grid {
  display: grid;
  gap: var(--s-6);
}

.grid--2,
.grid--3,
.grid--4 {
  grid-template-columns: 1fr;
}

.stack > * + * {
  margin-top: var(--s-4);
}

.stack--loose > * + * {
  margin-top: var(--s-6);
}

.split {
  display: grid;
  gap: var(--s-7);
  grid-template-columns: 1fr;
}

/* --------------------------------------------------------------------------
   5. Type helpers
   -------------------------------------------------------------------------- */

.eyebrow {
  display: block;
  margin: 0 0 var(--s-4);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--muted);
}

.lede {
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--muted);
  max-width: 42ch;
}

.lede--wide {
  max-width: 62ch;
}

.muted {
  color: var(--muted);
}

.dim {
  color: var(--dim);
}

.small {
  font-size: var(--fs-sm);
}

.measure {
  max-width: 68ch;
}

.prose > * + * {
  margin-top: var(--s-4);
}

.prose h2 {
  margin-top: var(--s-8);
}

.prose h3 {
  margin-top: var(--s-6);
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
}

.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: var(--fw-regular);
  letter-spacing: 0;
}

.section--invert .serif {
  color: var(--white);
}

.rule {
  border: 0;
  border-top: var(--rule);
  margin: 0;
}

.rule--space {
  margin-block: var(--s-7);
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 0.8rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

/* Primary: carbon fill, white ink */
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--steel);
  border-color: var(--steel);
}

.btn--primary:active {
  background: var(--void);
  border-color: var(--void);
}

/* Secondary: outline */
.btn--secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line-2);
}

.btn--secondary:hover {
  border-color: var(--carbon);
  background: var(--surface-2);
}

.btn--ghost {
  padding-inline: var(--s-3);
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
}

.btn--ghost:hover {
  text-decoration-color: var(--text);
}

.btn--block {
  width: 100%;
}

.btn--lg {
  padding: 1rem 1.75rem;
  font-size: var(--fs-base);
}

.btn--sm {
  padding: 0.55rem 0.9rem;
  font-size: var(--fs-xs);
}

.section--invert .btn--primary {
  background: var(--white);
  color: var(--carbon);
  border-color: var(--white);
}

.section--invert .btn--primary:hover {
  background: #e6e6e7;
  border-color: #e6e6e7;
}

.section--invert .btn--secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.36);
}

.section--invert .btn--secondary:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.btn[aria-disabled="true"],
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
}

/* Inline text link with an arrow */
.link-arrow {
  font-weight: var(--fw-semibold);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 1px;
}

.link-arrow:hover {
  border-bottom-color: var(--text);
}

.link-arrow::after {
  content: "\2192";
  display: inline-block;
  margin-left: 0.4em;
  transition: transform var(--dur) var(--ease);
}

.link-arrow:hover::after {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   7. Header / nav
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 0.9375rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.wordmark__mark {
  display: block;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--grad);
  border-radius: 1px;
  flex: none;
}

.nav {
  display: none;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__list li {
  margin: 0;
}

.nav__link {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--muted);
  text-decoration: none;
}

.nav__link:hover,
.nav__link[aria-current="page"] {
  color: var(--text);
}

.nav__link[aria-current="page"] {
  font-weight: var(--fw-semibold);
}

.header-cta {
  display: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.5rem 0.75rem;
  margin-right: -0.75rem;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  cursor: pointer;
}

.nav-toggle__bars {
  display: block;
  width: 1rem;
  height: 2px;
  background: var(--carbon);
  box-shadow: 0 -5px 0 var(--carbon), 0 5px 0 var(--carbon);
}

.mobile-nav {
  display: none;
  border-top: var(--rule);
  background: var(--bg);
  padding-block: var(--s-4) var(--s-6);
}

.mobile-nav[data-open="true"] {
  display: block;
}

.mobile-nav__list {
  list-style: none;
  margin: 0 0 var(--s-5);
  padding: 0;
}

.mobile-nav__list li {
  margin: 0;
  border-bottom: var(--rule);
}

.mobile-nav__link {
  display: block;
  padding: var(--s-4) 0;
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  text-decoration: none;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--invert-bg);
  color: var(--invert-text);
  padding-block: var(--s-9) var(--s-7);
  font-size: var(--fs-sm);
}

.site-footer a {
  color: var(--invert-muted);
  text-decoration-color: rgba(255, 255, 255, 0.3);
}

.site-footer a:hover {
  color: var(--white);
  text-decoration-color: var(--white);
}

.site-footer__grid {
  display: grid;
  gap: var(--s-7);
  grid-template-columns: 1fr;
}

.site-footer__heading {
  margin: 0 0 var(--s-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--silver);
}

.site-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__list li {
  margin-bottom: var(--s-2);
}

.site-footer__brand p {
  color: var(--invert-muted);
  max-width: 34ch;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  justify-content: space-between;
  align-items: baseline;
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--silver);
}

.site-footer__bottom p {
  margin: 0;
}

.site-footer .wordmark {
  color: var(--white);
}

/* --------------------------------------------------------------------------
   9. Cards, panels, callouts
   -------------------------------------------------------------------------- */

.card {
  padding: var(--s-6);
  background: var(--surface);
  border: var(--rule);
  border-radius: var(--radius);
}

.card--raised {
  box-shadow: var(--shadow-sm);
}

.card--flat {
  background: transparent;
}

.card--invert {
  background: var(--invert-bg);
  color: var(--white);
  border-color: transparent;
}

.card--invert p,
.card--invert li {
  color: #e6e6e7;
}

.card__title {
  margin-bottom: var(--s-2);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
}

.card__meta {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.card__num {
  display: block;
  margin-bottom: var(--s-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  color: var(--muted);
}

.card--price {
  border-color: var(--line-2);
}

.card--featured {
  border: 2px solid var(--carbon);
}

.callout {
  padding: var(--s-5) var(--s-6);
  background: var(--surface-2);
  border-left: 2px solid var(--carbon);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.callout--invert {
  background: var(--invert-bg);
  border-left-color: var(--white);
  color: var(--white);
}

.callout--invert p {
  color: #e6e6e7;
}

.callout__title {
  margin-bottom: var(--s-2);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
}

.callout--pending {
  background: var(--surface-2);
  border-left-color: var(--steel);
}

/* Statistic block — always paired with a source line */
.stat {
  padding-top: var(--s-4);
  border-top: 2px solid var(--carbon);
}

.stat__value {
  display: block;
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-tight);
  line-height: 1.1;
}

.stat__label {
  display: block;
  margin-top: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--muted);
}

.source {
  display: block;
  margin-top: var(--s-3);
  font-size: var(--fs-xs);
  color: var(--dim);
  line-height: 1.45;
}

.source a {
  color: var(--dim);
}

/* --------------------------------------------------------------------------
   10. Tables
   -------------------------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  border: var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}

.table {
  min-width: 34rem;
  font-size: var(--fs-sm);
}

.table caption {
  padding: var(--s-4) var(--s-5);
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: var(--rule);
}

.table th,
.table td {
  padding: var(--s-4) var(--s-5);
  border-bottom: var(--rule);
  line-height: var(--lh-normal);
}

.table thead th {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.table tbody th {
  font-weight: var(--fw-semibold);
  width: 28%;
}

.table tbody tr:last-child th,
.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: var(--surface-2);
}

/* --------------------------------------------------------------------------
   11. FAQ
   -------------------------------------------------------------------------- */

.faq {
  border-top: var(--rule);
}

.faq__item {
  border-bottom: var(--rule);
}

.faq__q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5) 0;
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  cursor: pointer;
  list-style: none;
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q::after {
  content: "+";
  flex: none;
  font-size: 1.25rem;
  font-weight: var(--fw-regular);
  line-height: 1;
  color: var(--muted);
}

.faq__item[open] .faq__q::after {
  content: "\2212";
}

.faq__q:hover {
  color: var(--text);
}

.faq__a {
  padding-bottom: var(--s-5);
  max-width: 68ch;
  color: var(--muted);
}

.faq__a > * + * {
  margin-top: var(--s-4);
}

/* --------------------------------------------------------------------------
   12. Lists
   -------------------------------------------------------------------------- */

.list-check,
.list-x,
.list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-check li,
.list-x li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: var(--s-3);
}

.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.6rem;
  height: 0.32rem;
  border-left: 2px solid var(--carbon);
  border-bottom: 2px solid var(--carbon);
  transform: rotate(-45deg);
}

.list-x li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.72em;
  width: 0.55rem;
  height: 2px;
  background: var(--dim);
}

.list-plain li {
  padding-bottom: var(--s-3);
  border-bottom: var(--rule);
  margin-bottom: var(--s-3);
}

.list-plain li:last-child {
  border-bottom: 0;
}

.list-defs {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* --------------------------------------------------------------------------
   13. Forms
   -------------------------------------------------------------------------- */

.form {
  display: grid;
  gap: var(--s-5);
}

.field {
  display: grid;
  gap: var(--s-2);
}

.field__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

.field__hint {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.field__req {
  color: var(--muted);
  font-weight: var(--fw-regular);
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  transition: border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--steel);
}

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  outline: 2px solid var(--carbon);
  outline-offset: 1px;
  border-color: var(--carbon);
}

.textarea {
  min-height: 8rem;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--dim);
}

.field--error .input,
.field--error .select,
.field--error .textarea {
  border-color: var(--carbon);
  border-width: 2px;
}

.field__error {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--warn-text);
}

.form__message {
  display: none;
  padding: var(--s-4) var(--s-5);
  border-radius: var(--radius);
  border-left: 2px solid var(--carbon);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}

.form__message[data-state="success"] {
  display: block;
  background: var(--ok-bg);
  color: var(--ok-text);
  border-left-color: var(--ok-text);
}

.form__message[data-state="error"] {
  display: block;
  background: var(--warn-bg);
  color: var(--warn-text);
  border-left-color: var(--warn-text);
}

.form__message[data-state="pending"] {
  display: block;
  background: var(--surface-2);
  color: var(--muted);
}

.checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-3);
  align-items: start;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.checkbox input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0.28rem 0 0;
  accent-color: var(--carbon);
}

/* --------------------------------------------------------------------------
   14. Calculator
   -------------------------------------------------------------------------- */

.calc {
  display: grid;
  gap: var(--s-7);
  grid-template-columns: 1fr;
}

.calc__panel {
  padding: var(--s-6);
  background: var(--surface-2);
  border-radius: var(--radius);
}

.calc__out {
  padding: var(--s-6);
  border: 2px solid var(--carbon);
  border-radius: var(--radius);
  background: var(--surface);
}

.calc__row {
  display: grid;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
}

.calc__row:last-child {
  margin-bottom: 0;
}

.calc__row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
}

.calc__row-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

.calc__row-value {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
}

.calc__result {
  display: block;
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-tight);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.calc__legend {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-5);
  padding-top: var(--s-5);
  border-top: var(--rule);
  list-style: none;
}

.calc__legend li {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.calc__legend b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 100%;
  height: 1.5rem;
  margin: 0;
  background: transparent;
  accent-color: var(--carbon);
}

/* --------------------------------------------------------------------------
   15. Misc blocks
   -------------------------------------------------------------------------- */

.pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border: var(--rule-strong);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.03em;
  color: var(--muted);
  text-transform: uppercase;
}

.crumbs {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-bottom: var(--s-5);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.crumbs li {
  margin: 0;
}

.crumbs li + li::before {
  content: "/";
  margin-right: var(--s-2);
  color: var(--dim);
}

.cta-band {
  background: var(--grad);
  color: var(--white);
  padding-block: var(--section-y);
}

.cta-band h2 {
  color: var(--white);
}

.cta-band p {
  color: #e6e6e7;
  max-width: 52ch;
}

.cta-band .btn--primary {
  background: var(--white);
  color: var(--carbon);
  border-color: var(--white);
}

.cta-band .btn--primary:hover {
  background: #e6e6e7;
  border-color: #e6e6e7;
}

.cta-band .btn--secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.cta-band .btn--secondary:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.pending {
  padding: var(--s-6);
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
}

.pending__title {
  margin: 0 0 var(--s-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--muted);
}

.pending ul {
  margin: 0;
  padding-left: 1.25em;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.embed {
  border: var(--rule);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
}

.embed__frame {
  display: block;
  width: 100%;
  min-height: 44rem;
  border: 0;
  background: var(--surface);
}

@media (min-width: 56em) {
  .embed__frame {
    min-height: 52rem;
  }
}

/* Spacing utilities — a deliberately short list */
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }
.mt-8 { margin-top: var(--s-8); }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.center-x { margin-inline: auto; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   16. Responsive
   -------------------------------------------------------------------------- */

@media (min-width: 40em) {
  .grid--2,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 56em) {
  .nav {
    display: block;
  }

  .header-cta {
    display: inline-flex;
  }

  .nav-toggle,
  .mobile-nav {
    display: none !important;
  }

  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--s-9);
    align-items: start;
  }

  .split--aside {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  }

  .calc {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .site-footer__grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
  }
}

@media (min-width: 72em) {
  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   17. Motion guard
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .link-arrow:hover::after {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   18. Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header,
  .mobile-nav,
  .cta-band,
  .nav-toggle {
    display: none !important;
  }

  body {
    font-size: 11pt;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555;
  }
}
