/* =========================================================================
   Astrosia Labs
   Palette: the v3 UI Kit Forge tokens — ink navy, signal teal, ember, mist —
   expressed as role tokens so light and dark are one system.
   Type: Inter (display + body) · JetBrains Mono (data, labels, specs)
   ========================================================================= */

:root {
  /* Forge constants (docs/DESIGN_SYSTEM.md in the UI Kit) */
  --forge-primary:   #1a2f45;
  --forge-secondary: #0e9f90;
  --forge-accent:    #e4572e;
  --forge-mist:      #e8eef1;
  --forge-highlight: #b08d3a;

  /* ---- light roles ---- */
  --canvas:        #fbfcfd;
  --surface-1:     #ffffff;
  --surface-2:     #e8eef1;
  --surface-band:  #f7fafb;

  --fg:            #1a2f45;
  --text:          #2b3a4a;
  --text-muted:    #5d6f7c;

  --border:        #c9d4db;
  --hair:          rgba(26, 47, 69, 0.10);
  --hair-soft:     rgba(26, 47, 69, 0.055);

  --teal:          #0e9f90;
  --link:          #0b7d72;
  --link-hover:    #0e9f90;
  --gold:          #b08d3a;
  --gold-text:     #8a6d24;
  --gold-fill:     rgba(176, 141, 58, 0.14);
  --ember-text:    #b8431f;
  --ember-fill:    rgba(228, 87, 46, 0.11);
  --teal-fill:     rgba(14, 159, 144, 0.10);
  --neutral-fill:  rgba(26, 47, 69, 0.06);

  --btn-bg:        #1a2f45;
  --btn-bg-hover:  #12212f;
  --btn-fg:        #ffffff;

  --band-dark-bg:    #1a2f45;
  --band-dark-panel: #21384f;
  --band-dark-hover: #26405a;
  --band-dark-fg:    #ffffff;
  --band-dark-text:  rgba(255, 255, 255, 0.66);
  --band-dark-muted: rgba(255, 255, 255, 0.5);
  --band-dark-hair:  rgba(255, 255, 255, 0.12);
  --band-dark-link:  #4fd8c7;

  --code-bg:  #1a2f45;
  --code-fg:  rgba(255, 255, 255, 0.88);

  --shadow-sm: 0 1px 2px rgba(26, 47, 69, 0.04), 0 4px 12px -6px rgba(26, 47, 69, 0.08);
  --shadow-md: 0 2px 4px rgba(26, 47, 69, 0.04), 0 18px 40px -22px rgba(26, 47, 69, 0.22);
  --shadow-lg: 0 4px 8px rgba(26, 47, 69, 0.04), 0 40px 80px -40px rgba(26, 47, 69, 0.3);

  --masthead-bg:       rgba(251, 252, 253, 0.72);
  --masthead-bg-stuck: rgba(251, 252, 253, 0.88);

  --ui:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --shell: 1180px;
  --gut: clamp(20px, 4vw, 48px);
  --r-sm: 12px;
  --r: 20px;
  --r-lg: 28px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

/* ---- dark roles: system preference, unless the reader chose light ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --canvas:        #0c161f;
    --surface-1:     #13202c;
    --surface-2:     #1b2937;
    --surface-band:  #101b25;

    --fg:            #eef4f8;
    --text:          #c7d6e0;
    --text-muted:    #90a5b3;

    --border:        #2c4053;
    --hair:          rgba(190, 214, 228, 0.13);
    --hair-soft:     rgba(190, 214, 228, 0.07);

    --teal:          #2ed3be;
    --link:          #3ed3c0;
    --link-hover:    #71e6d6;
    --gold:          #cba44f;
    --gold-text:     #d7b972;
    --gold-fill:     rgba(203, 164, 79, 0.16);
    --ember-text:    #ff9d7d;
    --ember-fill:    rgba(228, 87, 46, 0.18);
    --teal-fill:     rgba(46, 211, 190, 0.14);
    --neutral-fill:  rgba(190, 214, 228, 0.09);

    --btn-bg:        #eef4f8;
    --btn-bg-hover:  #ffffff;
    --btn-fg:        #0c161f;

    --band-dark-bg:    #16242f;
    --band-dark-panel: #1c2e3c;
    --band-dark-hover: #223648;
    --band-dark-fg:    #ffffff;
    --band-dark-text:  rgba(255, 255, 255, 0.68);
    --band-dark-muted: rgba(255, 255, 255, 0.52);
    --band-dark-hair:  rgba(255, 255, 255, 0.1);
    --band-dark-link:  #4fd8c7;

    --code-bg:  #08121a;
    --code-fg:  rgba(255, 255, 255, 0.86);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px -6px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 40px -22px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.35), 0 40px 80px -40px rgba(0, 0, 0, 0.85);

    --masthead-bg:       rgba(12, 22, 31, 0.72);
    --masthead-bg-stuck: rgba(12, 22, 31, 0.9);

    color-scheme: dark;
  }
}

/* ---- dark roles: explicit choice ---- */
:root[data-theme='dark'] {
  --canvas:        #0c161f;
  --surface-1:     #13202c;
  --surface-2:     #1b2937;
  --surface-band:  #101b25;

  --fg:            #eef4f8;
  --text:          #c7d6e0;
  --text-muted:    #90a5b3;

  --border:        #2c4053;
  --hair:          rgba(190, 214, 228, 0.13);
  --hair-soft:     rgba(190, 214, 228, 0.07);

  --teal:          #2ed3be;
  --link:          #3ed3c0;
  --link-hover:    #71e6d6;
  --gold:          #cba44f;
  --gold-text:     #d7b972;
  --gold-fill:     rgba(203, 164, 79, 0.16);
  --ember-text:    #ff9d7d;
  --ember-fill:    rgba(228, 87, 46, 0.18);
  --teal-fill:     rgba(46, 211, 190, 0.14);
  --neutral-fill:  rgba(190, 214, 228, 0.09);

  --btn-bg:        #eef4f8;
  --btn-bg-hover:  #ffffff;
  --btn-fg:        #0c161f;

  --band-dark-bg:    #16242f;
  --band-dark-panel: #1c2e3c;
  --band-dark-hover: #223648;
  --band-dark-fg:    #ffffff;
  --band-dark-text:  rgba(255, 255, 255, 0.68);
  --band-dark-muted: rgba(255, 255, 255, 0.52);
  --band-dark-hair:  rgba(255, 255, 255, 0.1);
  --band-dark-link:  #4fd8c7;

  --code-bg:  #08121a;
  --code-fg:  rgba(255, 255, 255, 0.86);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px -6px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 40px -22px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.35), 0 40px 80px -40px rgba(0, 0, 0, 0.85);

  --masthead-bg:       rgba(12, 22, 31, 0.72);
  --masthead-bg-stuck: rgba(12, 22, 31, 0.9);

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
  background: var(--canvas);
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--ui);
  font-size: 1.075rem;
  line-height: 1.62;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--ui);
  color: var(--fg);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.032em;
}
p { margin: 0 0 1.1em; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: var(--link); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--link-hover); }

::selection { background: var(--teal-fill); color: var(--fg); }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--btn-bg); color: var(--btn-fg); padding: 12px 20px;
  font-size: 0.85rem; font-weight: 600; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; top: 0; }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding-inline: var(--gut); }

/* ---------- shared type ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1.15rem;
}
.eyebrow.is-teal { color: var(--link); }
.eyebrow.is-gold { color: var(--gold-text); }

.lede {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.55;
  letter-spacing: -0.016em;
  color: var(--text-muted);
  max-width: 60ch;
}

.meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* the turn-budget motif, reused as a divider */
.seg-rule { display: flex; gap: 3px; margin: 0; }
.seg-rule i { height: 3px; border-radius: 3px; background: var(--border); }
.seg-rule i:nth-child(1) { flex: 12; background: var(--teal); }
.seg-rule i:nth-child(2) { flex: 14; }
.seg-rule i:nth-child(3) { flex: 13; }
.seg-rule i:nth-child(4) { flex: 25; background: var(--gold); opacity: 0.6; }
.seg-rule i:nth-child(5) { flex: 16; }

/* ---------- masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--masthead-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.masthead.is-stuck { border-bottom-color: var(--hair); background: var(--masthead-bg-stuck); }
.masthead-inner { display: flex; align-items: center; gap: 1.25rem; height: 68px; }

.wordmark { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--fg); }
.wordmark:hover { color: var(--fg); }
.wordmark-glyph {
  width: 30px; height: 18px; flex: none;
  fill: none; stroke: var(--teal); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.wordmark-text { font-size: 1rem; font-weight: 600; letter-spacing: -0.026em; }
.wordmark-text span { color: var(--text-muted); font-weight: 400; }
.wordmark-text span::before { content: ' '; }

.masthead-nav { display: flex; gap: 1.75rem; margin-left: auto; }
.masthead-nav a {
  font-size: 0.9rem;
  font-weight: 450;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color 0.2s var(--ease);
}
.masthead-nav a:hover { color: var(--fg); }
.masthead-nav a[aria-current='page'] { color: var(--link); font-weight: 500; }

.masthead-cta {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border-radius: 980px;
  padding: 9px 17px;
  white-space: nowrap;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.masthead-cta:hover { background: var(--btn-bg-hover); color: var(--btn-fg); transform: scale(1.02); }

/* theme toggle */
.theme-toggle {
  width: 36px; height: 36px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
}
.theme-toggle:hover { border-color: var(--fg); color: var(--fg); background: var(--neutral-fill); }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme='dark'] .theme-toggle .icon-moon { display: block; }
:root[data-theme='dark'] .theme-toggle .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .icon-moon { display: block; }
  :root:not([data-theme='light']) .theme-toggle .icon-sun { display: none; }
}

.masthead-toggle {
  display: none;
  width: 40px; height: 40px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--fg);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.masthead-toggle .bars, .masthead-toggle .bars::before, .masthead-toggle .bars::after {
  display: block; width: 15px; height: 1.5px; background: currentColor; border-radius: 2px;
  transition: transform 0.25s var(--ease), background 0.2s var(--ease);
}
.masthead-toggle .bars { position: relative; }
.masthead-toggle .bars::before, .masthead-toggle .bars::after { content: ''; position: absolute; left: 0; }
.masthead-toggle .bars::before { top: -5px; }
.masthead-toggle .bars::after  { top: 5px; }
.masthead-toggle[aria-expanded='true'] .bars { background: transparent; }
.masthead-toggle[aria-expanded='true'] .bars::before { transform: translateY(5px) rotate(45deg); }
.masthead-toggle[aria-expanded='true'] .bars::after  { transform: translateY(-5px) rotate(-45deg); }

.mobile-nav[hidden] { display: none; }
@media (min-width: 901px) { .mobile-nav { display: none !important; } }
.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 0.25rem var(--gut) 1.5rem;
  background: var(--masthead-bg-stuck);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hair);
}
.mobile-nav a {
  font-size: 1rem;
  font-weight: 450;
  color: var(--text);
  padding: 15px 0;
  border-bottom: 1px solid var(--hair-soft);
}
.mobile-nav .mobile-cta { color: var(--link); font-weight: 550; border-bottom: 0; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.012em;
  padding: 13px 26px;
  border-radius: 980px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease),
              color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--btn-bg); color: var(--btn-fg); box-shadow: var(--shadow-sm); }
.btn-solid:hover { background: var(--btn-bg-hover); color: var(--btn-fg); box-shadow: var(--shadow-md); }
.btn-ghost { border-color: var(--border); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--fg); color: var(--fg); background: var(--neutral-fill); }

.arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow, .link-more:hover .arrow { transform: translateX(3px); }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.925rem;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--link);
}

/* ---------- section rhythm ---------- */

.band { padding-block: clamp(72px, 8.5vw, 128px); }
.band-tight { padding-block: clamp(48px, 5vw, 72px); }

.band-surface { background: var(--surface-band); border-block: 1px solid var(--hair-soft); }
.band-mist { background: var(--surface-2); }
.band-dark { background: var(--band-dark-bg); color: var(--band-dark-text); }
.band-dark h2, .band-dark h3 { color: var(--band-dark-fg); }
.band-dark .lede { color: var(--band-dark-text); }
.band-dark .eyebrow { color: var(--band-dark-muted); }
.band-dark .eyebrow.is-teal { color: var(--band-dark-link); }

.band-head { max-width: 62ch; margin-bottom: clamp(40px, 4.5vw, 64px); }
.band-head h2 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 1.05rem; }
.band-head .lede { margin-bottom: 0; }

.band-split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(36px, 4vw, 56px);
}
.band-split h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
.band-split .lede { margin-top: 0.9rem; margin-bottom: 0; }

/* =========================================================================
   Hero
   ========================================================================= */

.hero { padding-block: clamp(56px, 8vw, 104px) clamp(44px, 5vw, 72px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 4.8vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}
.hero h1 em { font-style: normal; color: var(--link); }
.hero .lede { font-size: clamp(1.14rem, 1.6vw, 1.35rem); margin-bottom: 2.2rem; }
.hero-ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* The signature: a real turn budget, drawn to scale, as an instrument panel. */
.budget {
  background: var(--surface-1);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  padding: clamp(24px, 2.6vw, 34px);
  box-shadow: var(--shadow-lg);
}
.budget-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.05rem;
  border-bottom: 1px solid var(--hair-soft);
}
.budget-head h2 {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.budget-total {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.budget-bar { display: flex; gap: 3px; margin: 1.5rem 0 1.55rem; height: 30px; }
.budget-bar span {
  display: block;
  border-radius: 4px;
  background: var(--teal);
  transform-origin: left center;
  transform: scaleX(0);
  animation: budget-fill 0.8s var(--ease-out) forwards;
}
.budget-bar span:nth-child(1) { animation-delay: 0.12s; opacity: 0.95; }
.budget-bar span:nth-child(2) { animation-delay: 0.24s; opacity: 0.8; }
.budget-bar span:nth-child(3) { animation-delay: 0.36s; opacity: 0.66; }
.budget-bar span:nth-child(4) { animation-delay: 0.48s; background: var(--gold); opacity: 0.9; }
.budget-bar span:nth-child(5) { animation-delay: 0.6s;  opacity: 0.52; }

@keyframes budget-fill { to { transform: scaleX(1); } }

.budget-rows { border-top: 1px solid var(--hair-soft); }
.budget-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 0.85rem;
  padding: 0.68rem 0;
  border-bottom: 1px solid var(--hair-soft);
}
.budget-row:last-child { border-bottom: 0; }
.budget-key { font-size: 0.9rem; font-weight: 550; color: var(--fg); }
.budget-note { font-size: 0.85rem; color: var(--text-muted); line-height: 1.42; }
.budget-ms {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--link);
  font-variant-numeric: tabular-nums;
}
.budget-foot { margin: 1.25rem 0 0; font-size: 0.84rem; line-height: 1.5; color: var(--text-muted); }

/* =========================================================================
   Practice — what the lab takes on
   ========================================================================= */

.practice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(28px, 4vw, 56px);
  row-gap: clamp(32px, 3.5vw, 48px);
  border-top: 1px solid var(--hair);
  padding-top: clamp(32px, 3.5vw, 48px);
}
.practice-item h3 {
  font-size: 1.16rem;
  letter-spacing: -0.026em;
  margin-bottom: 0.65rem;
  padding-top: 0.9rem;
  border-top: 2px solid var(--teal);
  display: inline-block;
}
.practice-item p { font-size: 0.97rem; line-height: 1.6; color: var(--text-muted); margin-bottom: 0; }

/* =========================================================================
   Systems
   ========================================================================= */

.systems { display: grid; gap: 18px; grid-template-columns: repeat(6, 1fr); }
.sys { grid-column: span 2; }
.sys.is-feature { grid-column: span 3; }

.sys {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-1);
  border: 1px solid var(--hair);
  border-radius: var(--r);
  padding: clamp(24px, 2.4vw, 34px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.3s var(--ease);
}
.sys:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border); }

.sys-kicker {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.3rem;
}
.sys h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); margin-bottom: 0.8rem; letter-spacing: -0.03em; }
.sys.is-feature h3 { font-size: clamp(1.55rem, 2.4vw, 2.05rem); }
.sys-lede { color: var(--text); margin-bottom: 0.85rem; font-size: 1rem; line-height: 1.55; }
.sys-body { font-size: 0.93rem; color: var(--text-muted); margin-bottom: 1.4rem; line-height: 1.55; }

.pill {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 980px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pill-production, .pill-live { color: var(--link); background: var(--teal-fill); }
.pill-testing   { color: var(--gold-text); background: var(--gold-fill); }
.pill-active    { color: var(--ember-text); background: var(--ember-fill); }
.pill-exploring { color: var(--text-muted); background: var(--neutral-fill); }

.sys-specs { margin: auto 0 1.4rem; border-top: 1px solid var(--hair-soft); padding-top: 1rem; }
.sys-specs > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.38rem 0;
  font-family: var(--mono);
  font-size: 0.7rem;
}
.sys-specs dt { color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.sys-specs dd { margin: 0; color: var(--text); text-align: right; }

/* =========================================================================
   Entries (research + papers)
   ========================================================================= */

.feature-entry {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding: clamp(28px, 3.2vw, 44px);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  box-shadow: var(--shadow-md);
  margin-bottom: clamp(32px, 3.5vw, 48px);
}
.feature-entry h3 { font-size: clamp(1.55rem, 2.8vw, 2.3rem); margin: 0.9rem 0 1rem; }
.feature-entry h3 a { color: var(--fg); }
.feature-entry h3 a:hover { color: var(--link); }
.feature-entry .lede { margin-bottom: 1.6rem; }

.entry-tape {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0;
}
.entry-tape .track { color: var(--link); font-weight: 500; }
.entry-tape .sep { opacity: 0.45; }

.abstract-card {
  border-radius: var(--r);
  background: var(--surface-2);
  padding: clamp(22px, 2.4vw, 30px);
}
.abstract-card h4 {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 0.9rem;
}
.abstract-card p { font-size: 1rem; line-height: 1.55; color: var(--text); margin-bottom: 0; }

.entry-list { border-top: 1px solid var(--hair); }
.entry-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: clamp(16px, 3vw, 36px);
  align-items: start;
  padding: clamp(22px, 2.4vw, 30px) clamp(12px, 1.4vw, 18px);
  margin-inline: clamp(-18px, -1.4vw, -12px);
  border-bottom: 1px solid var(--hair);
  border-radius: var(--r-sm);
  transition: background 0.25s var(--ease);
}
.entry-row:hover { background: var(--surface-2); }
.entry-row .when { font-family: var(--mono); font-size: 0.7rem; color: var(--text-muted); padding-top: 0.3rem; margin: 0; }
.entry-row h3 { font-size: clamp(1.12rem, 1.7vw, 1.4rem); margin: 0.55rem 0 0.5rem; }
.entry-row h3 a { color: var(--fg); }
.entry-row h3 a:hover { color: var(--link); }
.entry-row .summary { color: var(--text-muted); font-size: 0.97rem; line-height: 1.55; margin-bottom: 0; max-width: 66ch; }
.entry-row .go {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 0.3rem;
  margin: 0;
  transition: color 0.25s var(--ease);
}
.entry-row:hover .go { color: var(--link); }

.paper-row { grid-template-columns: 118px minmax(0, 1fr) auto; }
.paper-row .series {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--gold-text);
  padding-top: 0.28rem;
  margin: 0;
}

.filters { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: clamp(24px, 3vw, 36px); }
.filters a {
  font-size: 0.875rem;
  font-weight: 450;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 980px;
  padding: 7px 16px;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
}
.filters a:hover { border-color: var(--fg); color: var(--fg); }
.filters a[aria-current='true'] { color: var(--btn-fg); border-color: var(--btn-bg); background: var(--btn-bg); }

/* =========================================================================
   Open problems — the contrast band
   ========================================================================= */

.problems {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--band-dark-hair);
  border: 1px solid var(--band-dark-hair);
  border-radius: var(--r);
  overflow: hidden;
}
.problem { background: var(--band-dark-bg); padding: clamp(24px, 2.4vw, 32px); transition: background 0.3s var(--ease); }
.problem:hover { background: var(--band-dark-panel); }
.problem-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.problem-top .meta { color: var(--band-dark-muted); }
.problem h3 { font-size: 1.12rem; margin-bottom: 0.6rem; letter-spacing: -0.026em; }
.problem p { font-size: 0.93rem; line-height: 1.55; color: var(--band-dark-text); margin-bottom: 0; }

.band-dark .pill-active    { color: #ffb59c; background: rgba(228, 87, 46, 0.2); }
.band-dark .pill-exploring { color: #e2d3ad; background: rgba(176, 141, 58, 0.24); }

.problem-cta { display: flex; flex-direction: column; justify-content: center; background: var(--band-dark-panel); }
.problem-cta:hover { background: var(--band-dark-hover); }
.problem-cta p { color: var(--band-dark-text); margin-bottom: 1.2rem; }
.problem-cta .link-more { color: var(--band-dark-link); }
.problem-cta .link-more:hover { color: #8ff0e2; }

/* =========================================================================
   Contact + address
   ========================================================================= */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.addr { font-style: normal; }
.addr-name { font-weight: 600; letter-spacing: -0.024em; color: var(--fg); margin-bottom: 0.45rem; }
.addr-lines { color: var(--text-muted); margin-bottom: 0; line-height: 1.7; }

.addr-card {
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  padding: clamp(26px, 3vw, 38px);
  box-shadow: var(--shadow-md);
}
.addr-card .addr-name { font-size: 1.2rem; }
.addr-card .addr-lines { color: var(--text); font-size: 1.02rem; }

.office-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 1.3rem;
}
.office-tag::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-fill);
}

.channels { margin-top: 1.7rem; border-top: 1px solid var(--hair-soft); }
.channels div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.8rem 0; border-bottom: 1px solid var(--hair-soft);
}
.channels div:last-child { border-bottom: 0; }
.channels dt { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.channels dd { margin: 0; font-size: 0.95rem; font-weight: 450; }
.channels dd a { color: var(--fg); }
.channels dd a:hover { color: var(--link); }

/* =========================================================================
   Reading view
   ========================================================================= */

.read-head { padding-block: clamp(48px, 6vw, 84px) clamp(24px, 3vw, 36px); }
.read-wrap { max-width: 720px; margin: 0 auto; }
.read-head h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.038em;
  margin: 1rem 0 1.4rem;
}
.read-head .lede { margin-bottom: 1.9rem; }
.read-byline {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
  padding-top: 1.3rem; border-top: 1px solid var(--hair);
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
}
.read-byline .track { color: var(--link); font-weight: 500; }

.prose { padding-bottom: clamp(56px, 6vw, 88px); font-size: 1.13rem; line-height: 1.74; color: var(--text); letter-spacing: -0.012em; }
.prose > .lede { font-size: 1.26rem; max-width: none; margin-bottom: 1.8em; }
.prose h2 { font-size: clamp(1.4rem, 2.2vw, 1.78rem); margin: 2.7rem 0 1rem; }
.prose h3 { font-size: 1.18rem; margin: 1.9rem 0 0.7rem; letter-spacing: -0.026em; }
.prose p { margin-bottom: 1.3em; }
.prose strong { color: var(--fg); font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 1.5em; padding-left: 1.25em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul li { position: relative; padding-left: 1.5em; margin-bottom: 0.6em; }
.prose ul li::before {
  content: '';
  position: absolute; left: 0.1em; top: 0.74em;
  width: 7px; height: 2px; border-radius: 2px; background: var(--teal);
}
.prose ol { list-style: decimal; }
.prose ol li { margin-bottom: 0.6em; padding-left: 0.3em; }
.prose ol li::marker { font-family: var(--mono); font-size: 0.82em; color: var(--gold-text); }

.prose blockquote {
  margin: 1.9rem 0;
  padding: 0.1rem 0 0.1rem 1.5rem;
  border-left: 3px solid var(--teal);
  color: var(--fg);
  font-size: 1.18rem;
  line-height: 1.55;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--surface-2);
  border-radius: 5px;
  padding: 0.12em 0.4em;
  color: var(--fg);
}
.prose pre {
  font-family: var(--mono);
  background: var(--code-bg);
  border-radius: var(--r-sm);
  padding: 1.15rem 1.3rem;
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.65;
  margin: 0 0 1.6em;
  color: var(--code-fg);
}
.prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.8em; font-size: 0.96rem; }
.prose th, .prose td { text-align: left; padding: 0.72rem 1rem 0.72rem 0; border-bottom: 1px solid var(--hair-soft); vertical-align: top; }
.prose thead th { border-bottom-color: var(--border); }
.prose th {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted); font-weight: 500;
}
.table-scroll { overflow-x: auto; margin-bottom: 1.8em; }
.table-scroll table { margin-bottom: 0; }

.note {
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border-left: 3px solid var(--gold);
  padding: 1.15rem 1.35rem;
  margin: 0 0 1.8em;
  font-size: 1.01rem;
  line-height: 1.6;
}
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--gold-text); }

.read-foot { border-top: 1px solid var(--hair); padding-block: clamp(36px, 4vw, 56px); background: var(--surface-band); }
.read-foot .lede { margin-bottom: 1.5rem; }

/* =========================================================================
   Footer
   ========================================================================= */

.footer { background: var(--surface-band); border-top: 1px solid var(--hair); padding-block: clamp(40px, 4vw, 56px) clamp(28px, 3vw, 40px); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 0.8fr)) minmax(0, 1.2fr);
  gap: clamp(28px, 4vw, 52px);
  padding-block: clamp(36px, 4vw, 52px);
}
.footer-note { margin-top: 1rem; font-size: 0.93rem; line-height: 1.6; color: var(--text-muted); max-width: 38ch; }
.footer-col h2 {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.05rem;
}
.footer-col li { margin-bottom: 0.55rem; }
.footer-col a { font-size: 0.93rem; color: var(--text); }
.footer-col a:hover { color: var(--link); }
.footer-contact .addr { margin-bottom: 1.1rem; }
.footer-contact .addr-name { font-size: 0.95rem; }
.footer-contact .addr-lines { font-size: 0.885rem; line-height: 1.6; }
.footer-contact ul a { font-size: 0.885rem; }
.footer-legal {
  border-top: 1px solid var(--hair-soft);
  padding-top: 1.5rem;
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  max-width: 74ch;
}

/* =========================================================================
   Reveal on scroll
   ========================================================================= */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 1080px) {
  .systems { grid-template-columns: repeat(4, 1fr); }
  .practice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sys, .sys.is-feature { grid-column: span 2; }
  .problems { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .masthead-nav, .masthead-cta { display: none; }
  .masthead-toggle { display: inline-flex; }
  .theme-toggle { margin-left: auto; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .feature-entry { grid-template-columns: minmax(0, 1fr); }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .entry-row { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
  .entry-row .when, .paper-row .series { padding-top: 0; }
  .entry-row .go { display: none; }
}

@media (max-width: 620px) {
  .systems { grid-template-columns: minmax(0, 1fr); }
  .practice { grid-template-columns: minmax(0, 1fr); }
  .sys, .sys.is-feature { grid-column: span 1; }
  .problems { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .budget-row { grid-template-columns: 1fr auto; }
  .budget-note { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .budget-bar span { transform: scaleX(1); }
  [data-reveal] { opacity: 1; transform: none; }
}
