/* ============================================================
   psychedelics + neuroplasticity, final project
   design tokens locked from design-preview-v1
   black-and-white + single cyan accent, modern sans, bento + modal
   ============================================================ */

:root {
  /* color, locked B+W + single cyan accent */
  --bg:               #000000;
  --bg-tile-dk:       #0A0A0A;
  --bg-tile-dk-hover: #141414;
  --bg-tile-dk-elev:  #161616;
  --border-dk:        #1F1F1F;
  --border-dk-hi:     #2A2A2A;

  --bg-tile-lt:        #FAFAFA;
  --bg-tile-lt-hover:  #F0F0F0;

  --ink-on-dk:        #FAFAFA;
  --ink-on-dk-sec:    #A1A1AA;
  --ink-on-dk-faint:  #52525B;
  --ink-on-dk-mute:   #3F3F46;
  --ink-on-lt:        #0A0A0A;
  --ink-on-lt-sec:    #52525B;
  --ink-on-lt-faint:  #71717A;

  --accent:        #22D3EE;
  --accent-dim:    #06B6D4;
  --accent-deep:   #0891B2;
  --accent-glow:   rgba(34, 211, 238, 0.18);
  --accent-glow-2: rgba(34, 211, 238, 0.32);

  /* type */
  --f-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* spacing */
  --s-0:  2px;
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;
  --s-9:  96px;
  --s-10: 128px;

  /* radius */
  --r-tile: 14px;
  --r-pill: 999px;
  --r-card: 10px;

  /* motion */
  --ease-out:    cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-back:   cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease-soft:   cubic-bezier(0.4, 0.0, 0.2, 1);
  --d-fast:  160ms;
  --d-med:   280ms;
  --d-modal: 420ms;
  --d-slow:  600ms;

  /* z layers */
  --z-grid:    1;
  --z-fade:    50;
  --z-modal:   100;
  --z-toast:   200;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink-on-dk);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01' on, 'cv01' on;
  min-height: 100vh;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }

::selection { background: var(--accent); color: var(--ink-on-lt); }

a { color: inherit; text-decoration: none; }

/* ============== LAYOUT ============== */
main {
  max-width: 1320px;
  margin: 0 auto;
  padding: var(--s-7) var(--s-5) var(--s-9);
  position: relative;
  z-index: var(--z-grid);
}

/* ============== TOP STRIP ============== */
.topstrip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s-8);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--border-dk);
  gap: var(--s-4);
  flex-wrap: wrap;
}
.topstrip .label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-on-dk-faint);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.topstrip .label .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  display: inline-block;
}
.topstrip .label .accent { color: var(--accent); }
.topstrip .meta {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-on-dk-faint);
  text-transform: uppercase;
}
.topstrip .meta .accent { color: var(--accent); }

/* ============== HERO ============== */
.hero {
  margin-bottom: var(--s-8);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--s-7);
  align-items: end;
}
.hero .lhs .eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-on-dk-sec);
  margin-bottom: var(--s-5);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.hero .lhs .eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  box-shadow: 0 0 12px var(--accent-glow);
}
.hero h1 {
  font-family: var(--f-sans);
  font-weight: 800;
  font-size: clamp(56px, 9.4vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: var(--ink-on-dk);
  margin-bottom: var(--s-5);
}
.hero h1 .accent {
  color: var(--accent);
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.02em;
}
.hero .deck {
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: clamp(17px, 1.55vw, 21px);
  line-height: 1.5;
  color: var(--ink-on-dk-sec);
  max-width: 580px;
}
.hero .deck strong { color: var(--ink-on-dk); font-weight: 600; }
.hero .deck em {
  color: var(--accent);
  font-style: normal;
  font-weight: 500;
}

.hero .rhs {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.hero .rhs .stat {
  border: 1px solid var(--border-dk);
  border-radius: var(--r-tile);
  padding: var(--s-4) var(--s-5);
  background: var(--bg-tile-dk);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.hero .rhs .stat .v {
  font-family: var(--f-sans);
  font-weight: 800;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink-on-dk);
}
.hero .rhs .stat .v .pct { color: var(--accent); }
.hero .rhs .stat .l {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-on-dk-faint);
}

/* ============== READ-THIS STRIP ============== */
.readthis {
  margin-bottom: var(--s-7);
  border: 1px solid var(--border-dk);
  border-radius: var(--r-tile);
  padding: var(--s-4) var(--s-5);
  display: flex;
  align-items: center;
  gap: var(--s-4);
  background: linear-gradient(180deg, var(--bg-tile-dk), #060606);
}
.readthis .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent);
}
.readthis .text {
  font-family: var(--f-sans);
  font-size: 14px;
  color: var(--ink-on-dk-sec);
  line-height: 1.5;
}
.readthis .text strong { color: var(--ink-on-dk); font-weight: 600; }
.readthis .text em { color: var(--accent); font-style: normal; font-weight: 500; }

/* ============== BENTO GRID ============== */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(160px, auto);
  gap: var(--s-3);
  margin-bottom: var(--s-9);
}

.tile {
  border-radius: var(--r-tile);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform var(--d-med) var(--ease-out),
              border-color var(--d-fast) var(--ease-out),
              background var(--d-fast) var(--ease-out),
              box-shadow var(--d-med) var(--ease-out);
  cursor: pointer;
  user-select: none;
  /* button reset for tile-as-button */
  text-align: left;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
}
.tile, .tile * { text-align: left; }
.tile:hover { transform: translateY(-3px); }
.tile:active { transform: translateY(-1px); }
.tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* dark tile, default */
.tile.dk {
  background: var(--bg-tile-dk);
  border: 1px solid var(--border-dk);
  color: var(--ink-on-dk);
}
.tile.dk:hover {
  background: var(--bg-tile-dk-hover);
  border-color: var(--border-dk-hi);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* inverted light tile */
.tile.lt {
  background: var(--bg-tile-lt);
  border: 1px solid var(--bg-tile-lt);
  color: var(--ink-on-lt);
}
.tile.lt:hover {
  background: var(--bg-tile-lt-hover);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.08);
}

/* solid accent tile, the punch */
.tile.ac {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--ink-on-lt);
}
.tile.ac:hover {
  box-shadow: 0 8px 40px var(--accent-glow-2);
  background: #2BDDF5;
}

/* outlined accent, the wait-what tile */
.tile.dk.ac-border {
  border-color: var(--accent-dim);
}
.tile.dk.ac-border:hover {
  border-color: var(--accent);
  box-shadow: 0 0 32px var(--accent-glow);
}

/* tile sizing */
.span-3  { grid-column: span 3; }
.span-4  { grid-column: span 4; }
.span-5  { grid-column: span 5; }
.span-6  { grid-column: span 6; }
.span-7  { grid-column: span 7; }
.span-8  { grid-column: span 8; }
.span-9  { grid-column: span 9; }
.span-12 { grid-column: span 12; }
.row-2   { grid-row: span 2; }

/* tile inner */
.tile .num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-on-dk-faint);
  text-transform: uppercase;
}
.tile.lt .num { color: var(--ink-on-lt-sec); }
.tile.ac .num { color: rgba(10, 10, 10, 0.65); }

.tile .title {
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: clamp(20px, 2.25vw, 30px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-top: var(--s-4);
}
.tile.huge .title {
  font-size: clamp(36px, 4.4vw, 64px);
  font-weight: 700;
  line-height: 1.0;
}
.tile .title em {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
}
.tile.lt .title em,
.tile.ac .title em { color: inherit; font-weight: 500; }

.tile .sub {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-on-dk-sec);
  margin-top: var(--s-4);
}
.tile.lt .sub { color: var(--ink-on-lt-sec); }
.tile.ac .sub { color: rgba(10, 10, 10, 0.7); }

.tile .body {
  font-family: var(--f-sans);
  font-size: 13.5px;
  color: var(--ink-on-dk-sec);
  margin-top: var(--s-3);
  line-height: 1.5;
}
.tile.lt .body { color: var(--ink-on-lt-sec); }
.tile.ac .body { color: rgba(10, 10, 10, 0.8); }

/* readout (big number in a tile) */
.tile .readout {
  font-family: var(--f-sans);
  font-weight: 800;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  margin-top: var(--s-5);
  color: var(--ink-on-dk);
}
.tile.huge .readout {
  font-size: clamp(80px, 11vw, 160px);
  letter-spacing: -0.05em;
}
.tile.lt .readout { color: var(--ink-on-lt); }
.tile.ac .readout { color: var(--ink-on-lt); }

/* tiny svg inside tile (preview glyph) */
.tile .glyph {
  position: absolute;
  bottom: var(--s-5);
  right: var(--s-5);
  width: 56px;
  height: 56px;
  color: var(--ink-on-dk-faint);
  opacity: 0.6;
  transition: opacity var(--d-med) var(--ease-out);
}
.tile:hover .glyph { opacity: 1; }
.tile.lt .glyph { color: var(--ink-on-lt-sec); opacity: 0.5; }
.tile.ac .glyph { color: var(--ink-on-lt); opacity: 0.85; }
.tile.dk.ac-border .glyph { color: var(--accent); opacity: 1; }

/* tile chip row (chemical, citation, etc.) */
.tile .chiprow {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-3);
}
.tile .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-dk-hi);
  color: var(--ink-on-dk-sec);
  background: rgba(255, 255, 255, 0.025);
}
.tile.lt .chip { border-color: #DADADA; color: var(--ink-on-lt-sec); background: rgba(0, 0, 0, 0.03); }
.tile.ac .chip { border-color: rgba(10, 10, 10, 0.2); color: rgba(10, 10, 10, 0.85); background: rgba(255, 255, 255, 0.15); }
.tile .chip.k { color: var(--accent); border-color: var(--accent-dim); }
.tile.lt .chip.k { color: var(--accent-deep); border-color: var(--accent-deep); background: rgba(8, 145, 178, 0.06); }

/* expand hint */
.tile .expand-hint {
  position: absolute;
  top: var(--s-5);
  right: var(--s-5);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-dk-hi);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-on-dk-faint);
  opacity: 0;
  transition: opacity var(--d-fast) var(--ease-out),
              transform var(--d-med) var(--ease-out),
              border-color var(--d-fast) var(--ease-out);
  pointer-events: none;
}
.tile:hover .expand-hint {
  opacity: 1;
  transform: scale(1.1);
  border-color: var(--accent);
  color: var(--accent);
}
.tile.lt .expand-hint { border-color: #D0D0D0; color: var(--ink-on-lt-sec); }
.tile.lt:hover .expand-hint { border-color: var(--accent-deep); color: var(--accent-deep); }
.tile.ac .expand-hint { border-color: rgba(10, 10, 10, 0.35); color: rgba(10, 10, 10, 0.7); }
.tile.ac:hover .expand-hint { border-color: var(--ink-on-lt); color: var(--ink-on-lt); }

/* ============== MODAL ============== */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: var(--z-fade);
  pointer-events: none;
  transition: background var(--d-modal) var(--ease-soft);
}
.backdrop.show {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
  pointer-events: none;
  opacity: 0;
}
.modal.show {
  pointer-events: auto;
  opacity: 1;
}
.modal-shell {
  width: min(1100px, calc(100vw - 32px));
  margin: 24px;
  border-radius: var(--r-tile);
  background: var(--bg-tile-dk);
  border: 1px solid var(--border-dk-hi);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7),
              0 0 0 1px var(--border-dk);
  transform-origin: center top;
  position: relative;
}

/* modal entry animation, JS toggles .anim class for the FLIP */
.modal-shell.anim-in {
  animation: shell-in var(--d-modal) var(--ease-out) forwards;
}
.modal-shell.anim-out {
  animation: shell-out var(--d-modal) var(--ease-soft) forwards;
}

@keyframes shell-in {
  0%   { transform: translateY(40px) scale(0.96); opacity: 0; }
  60%  { opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes shell-out {
  0%   { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(24px) scale(0.97); opacity: 0; }
}

/* body content fade-in on each section change */
.section {
  animation: section-fade 440ms var(--ease-out) backwards;
}
@keyframes section-fade {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* modal header */
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--border-dk);
  background: var(--bg-tile-dk);
  position: sticky;
  top: 0;
  z-index: 2;
  gap: var(--s-4);
}
.modal-head .left {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-width: 0;
}
.modal-head .num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--accent-dim);
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.modal-head .title {
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: -0.015em;
  color: var(--ink-on-dk);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.modal-head .right {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border-dk-hi);
  color: var(--ink-on-dk-sec);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--d-fast) var(--ease-out);
  font-family: var(--f-mono);
}
.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.icon-btn svg { width: 14px; height: 14px; }

/* modal body */
.modal-body {
  padding: var(--s-7) var(--s-7) var(--s-6);
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--border-dk-hi) transparent;
}
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border-dk-hi); border-radius: 4px; }
.modal-body::-webkit-scrollbar-thumb:hover { background: var(--ink-on-dk-mute); }

/* modal footer */
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) var(--s-6);
  border-top: 1px solid var(--border-dk);
  background: var(--bg-tile-dk);
  gap: var(--s-3);
}
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-dk-hi);
  color: var(--ink-on-dk-sec);
  background: transparent;
  cursor: pointer;
  transition: all var(--d-fast) var(--ease-out);
}
.nav-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.nav-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.nav-btn svg { width: 12px; height: 12px; }
.nav-btn .label-detail {
  color: var(--ink-on-dk-faint);
  margin-left: 6px;
}
.modal-foot .indicator {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-on-dk-faint);
  text-transform: uppercase;
}
.modal-foot .indicator .accent { color: var(--accent); }

/* ============== EXPANDED SECTION CONTENT ============== */
.section {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}
.section .eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-3);
}
.section h2 {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink-on-dk);
  margin-bottom: var(--s-3);
}
.section h2 em {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
}
.section h3 {
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink-on-dk);
  margin-bottom: var(--s-3);
}
.section .lede {
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--ink-on-dk-sec);
  max-width: 780px;
}
.section .lede strong { color: var(--ink-on-dk); font-weight: 600; }
.section .lede em { color: var(--accent); font-style: normal; font-weight: 500; }

.section p {
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-on-dk-sec);
  max-width: 720px;
}
.section p strong { color: var(--ink-on-dk); font-weight: 600; }
.section p em { color: var(--accent); font-style: normal; font-weight: 500; }
.section p + p { margin-top: var(--s-3); }

/* citation marks */
.cite {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-on-dk-faint);
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-dk);
  margin-left: 4px;
  vertical-align: baseline;
  display: inline-block;
  font-style: normal;
  font-weight: 500;
}
.cite.k {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-glow);
}

/* big pull quote */
.pull {
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink-on-dk);
  border-left: 2px solid var(--accent);
  padding: var(--s-4) 0 var(--s-4) var(--s-5);
  max-width: 820px;
}
.pull .att {
  display: block;
  margin-top: var(--s-3);
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-on-dk-faint);
}
.pull .att .accent { color: var(--accent); }

/* big numerical readout inside a section */
.bignum {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
  margin: var(--s-3) 0;
  flex-wrap: wrap;
}
.bignum .v {
  font-family: var(--f-sans);
  font-weight: 800;
  font-size: clamp(56px, 7vw, 96px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: var(--accent);
}
.bignum .l {
  font-family: var(--f-sans);
  font-size: 15px;
  color: var(--ink-on-dk-sec);
  max-width: 360px;
  line-height: 1.45;
}
.bignum .l strong { color: var(--ink-on-dk); font-weight: 600; }

/* fact strip (multi-readout row) */
.factstrip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-3);
  margin: var(--s-4) 0 var(--s-2);
}
.factstrip .f {
  border: 1px solid var(--border-dk);
  border-radius: var(--r-card);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  background: rgba(255, 255, 255, 0.012);
}
.factstrip .f .v {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink-on-dk);
}
.factstrip .f .v .accent { color: var(--accent); }
.factstrip .f .l {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-on-dk-faint);
}

/* figure block (svg + caption) */
figure {
  margin: var(--s-4) 0 var(--s-3);
  padding: var(--s-5);
  border: 1px solid var(--border-dk);
  border-radius: var(--r-tile);
  background: linear-gradient(180deg, #050505, var(--bg-tile-dk));
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
figure svg {
  width: 100%;
  height: auto;
  max-height: 480px;
  display: block;
}
figcaption {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-on-dk-faint);
  line-height: 1.5;
}
figcaption .accent { color: var(--accent); }
figcaption strong { color: var(--ink-on-dk-sec); font-weight: 500; }

/* compact two-column blocks */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
  margin-top: var(--s-3);
}
.two-col .col {
  border: 1px solid var(--border-dk);
  border-radius: var(--r-card);
  padding: var(--s-5);
  background: rgba(255, 255, 255, 0.012);
}
.two-col .col h4 {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-3);
}
.two-col .col p {
  font-size: 14.5px;
  line-height: 1.55;
  max-width: none;
}

/* fact list */
.factlist {
  list-style: none;
  padding: 0;
  margin: var(--s-3) 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  max-width: 760px;
}
.factlist li {
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-on-dk-sec);
  padding-left: var(--s-5);
  position: relative;
}
.factlist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 8px;
  height: 1px;
  background: var(--accent);
}
.factlist li strong { color: var(--ink-on-dk); font-weight: 600; }
.factlist li em { color: var(--accent); font-style: normal; font-weight: 500; }

/* divider mono line */
.divider {
  margin: var(--s-5) 0;
  padding-top: var(--s-4);
  border-top: 1px solid var(--border-dk);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-on-dk-faint);
}
.divider .accent { color: var(--accent); }

/* trial / works-cited block */
.refs {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.refs .ref {
  border: 1px solid var(--border-dk);
  border-radius: var(--r-card);
  padding: var(--s-4) var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  background: rgba(255, 255, 255, 0.014);
}
.refs .ref .tag {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.refs .ref .who {
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-on-dk);
  line-height: 1.4;
}
.refs .ref .what {
  font-family: var(--f-sans);
  font-size: 14px;
  color: var(--ink-on-dk-sec);
  line-height: 1.55;
}
.refs .ref .doi {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-on-dk-faint);
  word-break: break-all;
}
.refs .ref .doi a { color: inherit; }
.refs .ref .doi a:hover { color: var(--accent); }

/* trial card */
.trials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-3);
  margin: var(--s-4) 0;
}
.trial {
  border: 1px solid var(--border-dk);
  border-radius: var(--r-card);
  padding: var(--s-5);
  background: rgba(255, 255, 255, 0.012);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.trial .tag {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.trial .who {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  color: var(--ink-on-dk);
  letter-spacing: -0.015em;
}
.trial .who small {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--ink-on-dk-faint);
  font-family: var(--f-mono);
  letter-spacing: 0.06em;
  margin-top: 4px;
}
.trial .v {
  font-family: var(--f-sans);
  font-weight: 800;
  font-size: 36px;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.trial .desc {
  font-family: var(--f-sans);
  font-size: 13.5px;
  color: var(--ink-on-dk-sec);
  line-height: 1.5;
}

/* contrast pair (substance overview rows) */
.pair {
  display: grid;
  grid-template-columns: minmax(0, 320px) 1fr;
  gap: var(--s-6);
  margin: var(--s-4) 0;
  align-items: start;
}
.pair .left {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.pair .left h4 {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-on-dk-faint);
}
.pair figure { margin: 0; }

/* misc */
.kbd {
  font-family: var(--f-mono);
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--border-dk-hi);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--ink-on-dk-sec);
  background: var(--bg-tile-dk-elev);
  display: inline-block;
  line-height: 1;
}

/* warning + caveat callouts */
.callout {
  border: 1px solid var(--border-dk-hi);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-card);
  padding: var(--s-4) var(--s-5);
  background: rgba(34, 211, 238, 0.04);
  font-family: var(--f-sans);
  font-size: 14.5px;
  color: var(--ink-on-dk-sec);
  line-height: 1.55;
  max-width: 760px;
}
.callout strong { color: var(--ink-on-dk); font-weight: 600; }
.callout .tag {
  display: block;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-2);
}

/* ============== FOOTER ============== */
.sitefoot {
  margin-top: var(--s-9);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border-dk);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-on-dk-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-3);
}
.sitefoot .accent { color: var(--accent); }

/* ============== KEYBOARD-HINT BAR ============== */
.kbar {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid var(--border-dk-hi);
  border-radius: var(--r-pill);
  padding: 8px 14px;
  display: flex;
  gap: var(--s-3);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-on-dk-faint);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--d-med) var(--ease-out);
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.kbar.show { opacity: 0.85; }
.kbar .kbd {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-dk-hi);
  color: var(--ink-on-dk-sec);
  margin-right: 4px;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--s-5);
    align-items: stretch;
  }
  .hero .rhs {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .hero .rhs .stat {
    flex: 1 1 calc(50% - var(--s-3));
    min-width: 180px;
  }
}
@media (max-width: 900px) {
  main { padding: var(--s-5) var(--s-4) var(--s-7); }
  .topstrip { margin-bottom: var(--s-6); }
  .hero { margin-bottom: var(--s-6); }
  .readthis { padding: var(--s-3) var(--s-4); }
  .bento {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(140px, auto);
  }
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9 { grid-column: span 6; }
  .row-2 { grid-row: span 1; }
  .modal-shell { margin: 8px; width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .modal-body { padding: var(--s-4) var(--s-4); }
  .modal-head { padding: var(--s-3) var(--s-3); gap: var(--s-2); }
  .modal-head .num { font-size: 10px; padding: 4px 8px; letter-spacing: 0.14em; }
  .modal-head .title { font-size: 14px; }
  .modal-foot { padding: var(--s-3) var(--s-4); }
  .nav-btn { padding: 8px 10px; font-size: 9.5px; letter-spacing: 0.12em; }
  .nav-btn .label-detail { display: none; }
  .icon-btn { width: 32px; height: 32px; }
  .two-col { grid-template-columns: 1fr; }
  .pair { grid-template-columns: 1fr; }
  figure { padding: var(--s-3); }
  figure svg { max-height: 320px; }
  .section h2 { font-size: 32px; }
  .factstrip { grid-template-columns: repeat(2, 1fr); }
  .kbar { display: none; }
}
@media (max-width: 480px) {
  .bento {
    grid-template-columns: 1fr;
  }
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9 { grid-column: span 1; }
  .tile.huge .title { font-size: 32px; }
  .tile .readout { font-size: 56px; }
  .factstrip { grid-template-columns: 1fr; }
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .tile:hover { transform: none; }
}

/* small content tweaks for inverted-light tile */
.tile.lt .title { color: var(--ink-on-lt); }
.tile.lt .body { color: var(--ink-on-lt-sec); }
.tile.lt .readout { color: var(--ink-on-lt); }
.tile.lt .num { color: var(--ink-on-lt-sec); }
.tile.lt .sub { color: var(--ink-on-lt-sec); }
.tile.ac .title { color: var(--ink-on-lt); }
