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

:root {
  --navy-950: #001742;
  --navy-900: #121b36;
  --navy-800: #1b3057;
  --navy-700: #374a6c;
  --navy-500: #6e7d96;
  --navy-300: #a5b0c0;
  --navy-200: #c0c9d5;
  --navy-100: #dce3ea;
  --bg: #f0f3f3;
  --bg-soft: #f7fcff;
  --bg-panel: #fbfcfe;
  --gold: #ad8e65;
  --gold-soft: #e2c79c;
  --white: #ffffff;
  --max: 1120px;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --serif: "Spectral", Georgia, serif;
  --sans: "DM Sans", "Helvetica Neue", sans-serif;
  --hebrew: "Frank Ruhl Libre", "Spectral", Georgia, serif;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  /* Keeps the sticky topbar and header from covering whatever a nav link
     jumps to. */
  scroll-padding-top: calc(2.65rem + 4.1rem + 1.25rem);
}
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--navy-900);
  line-height: 1.65;
}
::selection { background: var(--navy-800); color: var(--bg-soft); }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.wrap { width: min(100%, var(--max)); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

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

.sticky-chrome { position: sticky; top: 0; z-index: 50; }

.topbar { background: var(--navy-950); color: var(--bg-soft); font-size: 0.9rem; }
.topbar .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 0.55rem 1.5rem; min-height: 2.65rem;
  padding-top: 0.5rem; padding-bottom: 0.5rem;
}
.topbar a { color: var(--bg-soft); font-weight: 500; transition: color 0.2s; }
.topbar a:hover { color: var(--gold); }
.topbar .loc { color: var(--navy-200); }

.site-header {
  background: rgba(240, 243, 243, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}
.site-header.scrolled { border-color: var(--navy-100); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.1rem; }
.brand {
  font-family: var(--serif);
  font-size: 1.15rem; font-weight: 500;
  color: var(--navy-950); white-space: nowrap;
  letter-spacing: 0.01em;
}
.brand .dot { color: var(--gold); margin: 0 0.35rem; }
.brand-tag { color: var(--navy-700); }
.cta-short { display: none; }
.nav-links { display: flex; align-items: center; gap: 1.35rem; list-style: none; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--navy-700); transition: color 0.2s; }
.nav-links a:hover { color: var(--navy-950); }
.nav-cta {
  display: inline-flex; align-items: center;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--navy-200); border-radius: 999px;
  background: var(--white); color: var(--navy-950) !important;
}
.nav-cta:hover { border-color: var(--gold); }

@media (max-width: 700px) {
  .topbar .loc { display: none; }
  .nav { min-height: 3.4rem; gap: 0.75rem; }
  .nav-links { gap: 0.8rem; }
  .nav-text { display: none; }
  .brand-tag { display: none; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
}

/* hero */
.hero {
  padding: clamp(2.25rem, 5vw, 3.5rem) 0 clamp(2rem, 4vw, 3rem);
  background:
    radial-gradient(1200px 500px at 85% 0%, rgba(173, 142, 101, 0.14), transparent 55%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}
.hero-kicker {
  font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.8rem;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  font-weight: 500; line-height: 1.14; letter-spacing: -0.02em;
  color: var(--navy-950); margin-bottom: 1.1rem;
}
.hero-lede { font-size: 1.08rem; color: var(--navy-700); max-width: 58ch; }

/* sections */
section { padding: clamp(2.5rem, 5.5vw, 4rem) 0; }
.sec-label {
  display: inline-block;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.75rem;
}
.sec-title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 500; line-height: 1.15; letter-spacing: -0.02em;
  color: var(--navy-950); margin-bottom: 0.85rem;
}
.sec-intro { font-size: 1.02rem; color: var(--navy-700); max-width: 56ch; margin-bottom: 2rem; }

#composer { background: var(--bg-panel); border-top: 1px solid var(--navy-100); }

/* composer */
.composer {
  background: var(--white);
  border: 1px solid var(--navy-100);
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
}
.field-label {
  display: block;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--navy-500); margin-bottom: 0.6rem;
}
.field {
  width: 100%;
  font-family: var(--hebrew);
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  line-height: 1.5;
  color: var(--navy-950);
  background: var(--bg-soft);
  border: 1px solid var(--navy-100);
  padding: 0.7rem 0.9rem;
  resize: vertical;
}
.field:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.field::placeholder { color: var(--navy-300); }
.field-hint { font-size: 0.88rem; color: var(--navy-500); margin-top: 0.6rem; }
.field-warn { font-size: 0.88rem; color: #8a5a2b; margin-top: 0.4rem; }
.field-warn b { font-family: var(--hebrew); font-weight: 500; }

.samples { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.samples-label {
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--navy-500); margin-right: 0.15rem;
}
.chip {
  font-family: var(--hebrew);
  font-size: 1rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--navy-200); border-radius: 999px;
  background: var(--white); color: var(--navy-800);
  cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--gold); color: var(--navy-950); }

.composer-tools {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: 1.35rem;
  border-top: 1px solid var(--navy-100); padding-top: 1.1rem;
}
.script-toggle {
  display: flex; border: 1px solid var(--navy-200); border-radius: 999px; overflow: hidden;
}
.script-toggle button {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  padding: 0.35rem 0.85rem;
  border: 0; background: var(--white); color: var(--navy-500);
  cursor: pointer; transition: background 0.2s, color 0.2s;
}
.script-toggle button:first-child { font-family: var(--hebrew); font-size: 0.9rem; }
.script-toggle button[aria-pressed="true"] { background: var(--navy-950); color: var(--bg-soft); }

.speed { display: flex; align-items: center; gap: 0.7rem; flex: 1 1 260px; }
.speed label {
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--navy-500); white-space: nowrap;
}
.speed input[type="range"] {
  flex: 1 1 auto; min-width: 120px;
  accent-color: var(--navy-950);
}
.speed output {
  font-size: 0.9rem; font-weight: 600; color: var(--navy-800);
  min-width: 5.5rem; text-align: right;
}

/* keyboard */
.keyboard { margin-top: 1.1rem; display: grid; gap: 0.35rem; }
.keyboard[data-script="hebrew"] { direction: rtl; }
.kb-row { display: flex; gap: 0.35rem; justify-content: center; }
.kb-key {
  flex: 1 1 0; min-width: 0;
  aspect-ratio: 1 / 1; max-height: 3rem;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--hebrew); font-size: 1.15rem;
  color: var(--navy-950);
  background: var(--bg-soft);
  border: 1px solid var(--navy-100); border-radius: 8px;
  cursor: pointer; user-select: none;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
}
.keyboard[data-script="latin"] .kb-key { font-family: var(--sans); font-weight: 600; }
.kb-key:hover { border-color: var(--gold); }
.kb-key:active { background: var(--navy-950); color: var(--bg-soft); transform: translateY(1px); }
.kb-key-util {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.04em; color: var(--navy-500);
  aspect-ratio: auto; height: 2.6rem; flex: 0 0 5.5rem;
}
.kb-key-wide { flex: 1 1 auto; aspect-ratio: auto; height: 2.6rem; }

/* stage */
#stage-section { background: var(--bg-panel); border-top: 1px solid var(--navy-100); border-bottom: 1px solid var(--navy-100); padding-top: 0; }
.stage {
  position: relative; overflow: hidden;
  background: var(--navy-950);
  color: var(--bg-soft);
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
}
.stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 100% 0%, rgba(173, 142, 101, 0.22), transparent 45%);
}
.stage > * { position: relative; }
.stage-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem;
}
.stage-label {
  display: block;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold);
}
.stage-note { font-size: 0.88rem; color: var(--navy-300); max-width: 44ch; margin-top: 0.2rem; }
.now { display: flex; align-items: center; gap: 0.7rem; flex: 0 0 auto; }
.now-glyph {
  display: flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 4.6rem;
  background: #000; border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(165, 176, 192, 0.2);
}
.now-glyph .glyph { width: auto; height: 88%; }
.now-text { text-align: left; }
.now-char {
  display: block; font-family: var(--hebrew);
  font-size: 1.6rem; line-height: 1.1; color: var(--bg-soft);
}
.now-name {
  display: block; font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--navy-300); margin-top: 0.25rem;
}

/* strip */
.strip-viewport {
  position: relative;
  overflow-x: auto; overflow-y: hidden;
  background: rgba(0, 8, 24, 0.55);
  border: 1px solid rgba(165, 176, 192, 0.18);
  border-radius: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--navy-700) transparent;
}
.strip-viewport::-webkit-scrollbar { height: 8px; }
.strip-viewport::-webkit-scrollbar-thumb { background: var(--navy-700); border-radius: 999px; }
.strip-track {
  position: relative;
  height: clamp(160px, 27vw, 210px);
  min-width: 100%;
  /* Room so the playhead grip stays fully grabbable at either end. Tiles and
     the playhead are offset by the same amount in script. */
  padding: 0 18px;
}
.strip-empty {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-500); font-size: 0.95rem;
}

.tile {
  position: absolute; top: 0; bottom: 0;
  display: flex; flex-direction: column;
  background: none; border: 0;
  /* Keeps the drag handle in its own band above the glyphs. */
  padding: 20px 0 0;
  cursor: pointer;
}
/* The character is drawn on its own black field, as the alphabet is printed. */
.tile-sheet {
  position: relative; display: block; width: 100%;
  border-radius: 5px; overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(165, 176, 192, 0.16);
  transition: box-shadow 0.2s;
}
.tile:hover .tile-sheet { box-shadow: inset 0 0 0 1px rgba(165, 176, 192, 0.4); }
.tile.is-active .tile-sheet { box-shadow: inset 0 0 0 1.5px var(--gold); }
.glyph { display: block; width: 100%; height: 100%; }
.glyph-col { opacity: 0.72; transition: opacity 0.12s; }
.tile.is-active .glyph-col, .tile:hover .glyph-col { opacity: 0.9; }
/* The mark the sweep line is crossing. */
.glyph-col.is-lit { opacity: 1; filter: drop-shadow(0 0 5px currentColor) brightness(1.25); }

.tile-cap {
  display: flex; align-items: center; justify-content: center; gap: 0.3em;
  overflow: hidden; white-space: nowrap;
  color: var(--navy-300);
  transition: color 0.2s;
}
.tile-cap b { font-family: var(--hebrew); font-size: 1rem; font-weight: 400; }
.tile-cap i { font-style: normal; font-size: 0.75rem; letter-spacing: 0.06em; opacity: 0.8; }
.tile:hover .tile-cap, .tile.is-done .tile-cap { color: var(--bg-soft); }
.tile.is-active .tile-cap { color: var(--gold-soft); }
.tile-cap-pause {
  font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.tile-silence .tile-sheet {
  background: repeating-linear-gradient(135deg, rgba(110, 125, 150, 0.16) 0 6px, transparent 6px 12px);
  box-shadow: inset 0 0 0 1px rgba(110, 125, 150, 0.2);
}
.tile-silence.is-active .tile-sheet { box-shadow: inset 0 0 0 1.5px var(--gold); }

.playhead {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: var(--gold-soft);
  box-shadow: 0 0 12px rgba(226, 199, 156, 0.7);
  z-index: 3; pointer-events: none;
}
.playhead-grip {
  position: absolute; top: -1px; left: 50%;
  width: 24px; height: 24px; margin-left: -12px;
  border-radius: 50%; border: 2px solid var(--navy-950);
  background: var(--gold-soft);
  cursor: grab; pointer-events: auto; touch-action: none;
  padding: 0;
}
.playhead-grip::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
}
.playhead-grip:active { cursor: grabbing; }
.playhead.is-dragging { background: var(--white); }

/* transport */
.stage-status { font-size: 0.85rem; color: var(--navy-300); margin-top: 0.6rem; min-height: 1.4em; }
.transport {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0.75rem 1rem; margin-top: 0.7rem;
}
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.2rem;
  border: 0; border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.9rem; }
.btn-primary { background: var(--gold); color: var(--navy-950); }
.btn-primary:hover { background: var(--gold-soft); }
.btn-play { min-width: 7.2rem; justify-content: center; }
.btn-ghost { background: transparent; border: 1px solid var(--navy-200); color: var(--navy-950); }
.btn-ghost:hover { border-color: var(--gold); }
.stage .btn-ghost { color: var(--bg-soft); border-color: rgba(192, 201, 213, 0.4); }
.stage .btn-ghost:hover { border-color: var(--gold); }
.icon-play {
  width: 0; height: 0;
  border-left: 9px solid currentColor;
  border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
.is-playing .icon-play {
  width: 10px; height: 12px; border: 0;
  background: linear-gradient(to right, currentColor 0 3px, transparent 3px 7px, currentColor 7px 10px);
}

.scrub {
  flex: 1 1 240px; min-width: 180px;
  padding: 0.9rem 0; cursor: pointer; touch-action: none;
}
.scrub:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.scrub-track {
  position: relative; height: 6px; border-radius: 999px;
  background: rgba(165, 176, 192, 0.28);
}
.scrub-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  border-radius: 999px; background: var(--gold);
}
.scrub-ticks { position: absolute; inset: 0; }
.scrub-tick {
  position: absolute; top: -3px; width: 1px; height: 12px;
  background: rgba(240, 243, 243, 0.4);
}
.scrub-thumb {
  position: absolute; top: 50%; left: 0;
  width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border-radius: 50%; background: var(--bg-soft);
  border: 2px solid var(--gold);
  box-shadow: 0 2px 8px rgba(0, 12, 34, 0.5);
}
.time { font-size: 0.9rem; color: var(--navy-300); font-variant-numeric: tabular-nums; white-space: nowrap; }

.shortcuts { font-size: 0.85rem; color: var(--navy-500); margin-top: 1rem; }
.shortcuts strong { color: var(--navy-800); font-weight: 600; }

@media (max-width: 620px) {
  .speed { flex-wrap: wrap; }
  .speed label { flex: 1 1 100%; }
  .speed input[type="range"] { flex: 1 1 auto; }
  .speed output { min-width: 4.5rem; }
  .stage-head { flex-direction: row; align-items: center; }
  .stage-note { display: none; }
  .now-glyph { width: 2.1rem; height: 3.6rem; }
  .now-char { font-size: 1.3rem; }
  .scrub { flex-basis: 100%; order: -1; padding-top: 0.4rem; }
  .btn-play { flex: 1 1 auto; }

  /* Ten keys to a row leaves them 26px square here, too small for a thumb.
     Reclaim the card's padding and make them taller than wide, as phone
     keyboards are. */
  .keyboard {
    margin-left: calc(0.5rem - clamp(1.1rem, 2.5vw, 1.75rem));
    margin-right: calc(0.5rem - clamp(1.1rem, 2.5vw, 1.75rem));
    gap: 0.25rem;
  }
  .kb-row { gap: 0.2rem; }
  .kb-key {
    aspect-ratio: auto;
    height: 2.9rem; max-height: none;
    font-size: 1.05rem; border-radius: 6px;
  }
  /* The space key carries both classes, and it should stay the flexible one. */
  .kb-key-util:not(.kb-key-wide) { flex: 0 0 4.5rem; height: 2.9rem; }
  .kb-key-wide { height: 2.9rem; }

  .now-name { font-size: 0.75rem; }
  .tile-cap-pause { font-size: 0.72rem; }
}

/* alphabet chart */
#alphabet-section { background: var(--bg-soft); border-bottom: 1px solid var(--navy-100); }
.alphabet {
  display: grid; grid-template-columns: repeat(11, 1fr); gap: 0.5rem;
}
.letter {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  padding: 0.7rem 0.35rem 0.6rem;
  background: var(--navy-950); border: 0; border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.letter:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 12, 34, 0.25); }
.letter:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.letter-pill {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 5.6rem;
  background: #000; border-radius: 999px;
}
.letter-pill .glyph { width: auto; height: 86%; }
.letter-name {
  font-size: 0.66rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--navy-300);
}
.letter.is-trained .letter-name {
  color: var(--gold-soft);
  padding: 0.05rem 0.4rem; border: 1px solid rgba(226, 199, 156, 0.5); border-radius: 999px;
}
.letter-chars { display: flex; align-items: baseline; gap: 0.3rem; color: var(--bg-soft); }
.letter-chars b { font-family: var(--hebrew); font-size: 1.05rem; font-weight: 400; }
.letter-chars i { font-style: normal; font-size: 0.8rem; font-weight: 600; color: var(--navy-200); }

.legend {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem;
  list-style: none; margin-top: 1.2rem;
  font-size: 0.85rem; color: var(--navy-600);
}
.legend li { display: flex; align-items: center; gap: 0.45rem; }
.swatch {
  width: 0.7rem; height: 0.7rem; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(20, 34, 61, 0.2);
}
.swatch-white { background: #fff; }
.swatch-blue { background: #4664ff; }
.swatch-red { background: #ff3b30; }

@media (max-width: 900px) {
  .alphabet { grid-template-columns: repeat(6, 1fr); }
  .letter-pill { height: 4.6rem; }
}
@media (max-width: 560px) {
  .alphabet { grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
  .letter-pill { height: 4rem; }
  /* 0.66rem is under 11px on a phone. */
  .letter-name { font-size: 0.72rem; }
}

/* how it works */
.focus-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.85rem; }
.focus {
  min-height: 140px; padding: 1.25rem 1.2rem;
  background: var(--navy-950); color: var(--bg-soft);
  position: relative; overflow: hidden;
  transition: transform 0.3s ease;
}
.focus:nth-child(2) { background: var(--navy-800); }
.focus:nth-child(3) { background: #243a63; }
.focus::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 100% 0%, rgba(173, 142, 101, 0.2), transparent 45%);
}
.focus:hover { transform: translateY(-2px); }
.focus h3 {
  position: relative; font-family: var(--serif);
  font-size: 1.2rem; font-weight: 500; margin-bottom: 0.45rem; line-height: 1.25;
}
.focus p { position: relative; font-size: 0.9rem; color: var(--navy-200); max-width: 28ch; }
@media (max-width: 800px) { .focus-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .focus-grid { grid-template-columns: 1fr; } }

/* independent research */
#study { background: var(--bg-soft); border-top: 1px solid var(--navy-100); }
.study {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(1.4rem, 3vw, 2.6rem);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: var(--white);
  border: 1px solid var(--navy-100);
  border-radius: 14px;
}
.study h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem); line-height: 1.3;
  margin-bottom: 0.7rem;
}
.study-meta {
  font-size: 0.85rem; color: var(--navy-500);
  padding-bottom: 0.9rem; margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--navy-100);
}
.study-body p { font-size: 0.95rem; color: var(--navy-700); }
.study-body p + p { margin-top: 0.7rem; }
.study-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 1.1rem; padding-bottom: 2px;
  font-size: 0.9rem; font-weight: 600; color: var(--navy-950);
  border-bottom: 1px solid var(--gold);
  transition: color 0.2s;
}
.study-link::after { content: "\2197"; color: var(--gold); }
.study-link:hover { color: var(--gold); }
.study-stats { list-style: none; display: grid; gap: 0.7rem; align-content: center; }
.study-stats li {
  position: relative; overflow: hidden;
  padding: 1rem 1.1rem;
  background: var(--navy-950); color: var(--bg-soft);
  border-radius: 10px;
}
.study-stats li::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 100% 0%, rgba(173, 142, 101, 0.22), transparent 50%);
}
.study-stats b {
  position: relative; display: block;
  font-family: var(--serif); font-weight: 500;
  font-size: 1.7rem; line-height: 1.1;
  color: var(--gold-soft); font-variant-numeric: tabular-nums;
}
.study-stats span {
  position: relative; display: block;
  font-size: 0.82rem; color: var(--navy-200); margin-top: 0.3rem;
}
@media (max-width: 820px) { .study { grid-template-columns: 1fr; } }

footer {
  border-top: 1px solid var(--navy-100);
  padding: 1.6rem var(--pad);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
footer span { font-size: 0.85rem; color: var(--navy-500); }

.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.75s cubic-bezier(.2,.7,.2,1), transform 0.75s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .focus:hover { transform: none; }
}
