/* microbialite.org
   A story told in layers. Each era of the story has its own world colour; the rest of the site
   lives in deep water. Archivo for display, Alegreya for reading. */

@font-face { font-family: "Archivo"; src: url("../fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("../fonts/alegreya.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("../fonts/alegreya-italic.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }

:root {
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --serif: "Alegreya", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --night: #050a0f;
  --bg: #0a1016;
  --bg-2: #0e1720;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.08);
  --ink: #eef3f1;
  --ink-2: #c4cfcb;
  --muted: #98a7a4;
  --line: rgba(238, 243, 241, 0.15);
  --line-soft: rgba(238, 243, 241, 0.08);
  --green: #74d68f;
  --purple: #e48ad0;
  --brine: #6fd3e8;
  --ochre: #f0b464;
  --accent: #6fe0c8;
  --link: #8fe9db;
  --link-hover: #ffb0c8;
  --focus: #ffd27a;
  --map-dot: rgba(150, 196, 190, 0.3);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-h: 4rem;
  --measure: 64ch;
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 8'%3E%3Cpath d='M0 4Q12 0 24 4T48 4T72 4T96 4' fill='none' stroke='%23000' stroke-width='1.3'/%3E%3C/svg%3E");
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
[data-layer="green"] { --accent: var(--green); }
[data-layer="purple"] { --accent: var(--purple); }
[data-layer="brine"] { --accent: var(--brine); }
[data-layer="ochre"] { --accent: var(--ochre); }
[data-layer="ink"] { --accent: var(--ink); }

/* -------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: inherit; }
html { background: var(--night); scroll-padding-top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--serif); font-size: clamp(1.08rem, 1rem + 0.3vw, 1.22rem); line-height: 1.6;
  font-kerning: normal; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); margin: 0; font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }
h2 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.8rem); line-height: 1.04; }
h3 { font-size: clamp(1.1rem, 1.02rem + 0.3vw, 1.28rem); line-height: 1.2; font-weight: 650; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); text-decoration-style: wavy; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(111, 224, 200, 0.35); color: #fff; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
main:focus { outline: none; }

/* ------------------------------------------------------------------ layout */
.wrap { width: 100%; max-width: 78rem; margin-inline: auto; padding-inline: var(--gutter); }
.band { padding-block: clamp(3.5rem, 2.25rem + 5vw, 7rem); background: var(--bg); }
.band--tint { background: var(--bg-2); }
.band--next { padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem); border-top: 1px solid var(--line-soft); }
.section-head { max-width: 48rem; margin-bottom: clamp(1.75rem, 1rem + 2vw, 3rem); }
.section-head h2 { margin-bottom: 0.6em; }
.section-head p { color: var(--ink-2); font-size: 1.06em; margin-bottom: 0; }
.prose { max-width: var(--measure); }
.prose h2 { margin-bottom: 0.6em; }
.prose h3 { margin: 1.6em 0 0.55em; }
.prose p { color: var(--ink-2); }
.prose--wide { max-width: 72ch; margin-top: clamp(2rem, 1rem + 2vw, 3rem); }
.split { display: grid; gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: start; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
  .split--even { grid-template-columns: 1fr 1fr; }
}
.small-print { font-size: 0.93em; color: var(--muted); margin-top: 2rem; max-width: 52rem; }

/* ---------------------------------------------------------------- header */
.skip-link { position: absolute; left: 0.75rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--night); padding: 0.6rem 1rem; border-radius: 8px; font-family: var(--display); font-weight: 650; text-decoration: none; }
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + 0.75rem); color: var(--night); }
.preview-bar { background: #02060a; color: var(--muted); font-family: var(--display); font-size: 0.82rem; text-align: center; padding: 0.5rem var(--gutter); border-bottom: 1px solid var(--line-soft); }
.preview-bar p { margin: 0; }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 60; background: rgba(5, 10, 15, 0.72); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line-soft); }
.site-header__inner { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1.25rem; min-height: var(--header-h); position: relative; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; margin-right: auto; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 750; font-size: 1.08rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand__mark { width: 30px; height: 30px; flex: none; display: block; }
.brand__mark .m1 { stroke: #74d68f; }
.brand__mark .m2 { stroke: #e48ad0; }
.brand__mark .m3 { stroke: #f0b464; }
.brand__tld { color: var(--muted); font-weight: 500; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.15rem; }
.site-nav li { margin: 0; }
.site-nav a { display: block; padding: 0.45rem 0.6rem; border-radius: 8px; font-family: var(--display); font-size: 0.92rem; font-weight: 550; color: var(--ink-2); text-decoration: none; }
.site-nav a:hover { color: #fff; background: var(--panel); }
.site-nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 #ff7aa2; border-radius: 8px 8px 0 0; }
.nav-toggle { display: none; }
@media (max-width: 899px) {
  .site-nav { order: 5; flex-basis: 100%; }
  .js .site-nav { position: absolute; left: calc(var(--gutter) * -1); right: calc(var(--gutter) * -1); top: 100%; background: rgba(5, 10, 15, 0.97); border-bottom: 1px solid var(--line); display: none; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .js .site-header[data-open] .site-nav { display: block; }
  .js .site-nav ul { flex-direction: column; flex-wrap: nowrap; padding: 0.25rem var(--gutter) 1.25rem; gap: 0; }
  .js .site-nav a { padding: 0.85rem 0; font-size: 1.1rem; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .js .site-nav a[aria-current="page"] { box-shadow: none; color: #ff9cbc; }
  .js .nav-toggle { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.95rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 0.95rem; cursor: pointer; }
  .nav-toggle__bars { width: 16px; height: 10px; position: relative; display: inline-block; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
  .site-header[data-open] .nav-toggle__bars { border-color: transparent; }
  .site-header[data-open] .nav-toggle__bars::before, .site-header[data-open] .nav-toggle__bars::after { content: ""; position: absolute; left: 0; right: 0; top: 2px; border-top: 2px solid currentColor; }
  .site-header[data-open] .nav-toggle__bars::before { transform: rotate(45deg); }
  .site-header[data-open] .nav-toggle__bars::after { transform: rotate(-45deg); }
}

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.82rem 1.35rem; line-height: 1.2;
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  background: linear-gradient(135deg, #c8fff1 0%, #8fdcff 100%); color: #04131b;
  font-family: var(--display); font-weight: 700; font-size: 0.98rem;
}
.btn:hover { color: #04131b; text-decoration: none; filter: brightness(1.08); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { color: #fff; background: var(--panel); filter: none; }
.btn--small { padding: 0.6rem 1.05rem; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.4; cursor: default; }

/* -------------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden; display: flex; align-items: center; isolation: isolate;
  min-height: min(calc(100svh - var(--header-h)), 58rem);
  background: radial-gradient(120% 90% at 72% -10%, #17616a 0%, #0c3540 34%, #081a22 64%, #071018 100%);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; cursor: crosshair; }
.hero-land { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(8rem, 20vw, 15rem); z-index: 1; pointer-events: none; display: block; }
.hero__inner { position: relative; z-index: 2; padding-block: clamp(4rem, 3rem + 6vw, 8rem) clamp(9rem, 7rem + 10vw, 15rem); pointer-events: none; }
.hero__inner a, .hero__inner button { pointer-events: auto; }
.hero__title {
  font-size: clamp(2.6rem, 0.6rem + 9vw, 8.6rem); line-height: 0.86; font-weight: 800; letter-spacing: -0.05em;
  background: linear-gradient(180deg, #ffffff 25%, #a9f3e4 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; padding-bottom: 0.08em;
}
.hero__lede { margin: 1.5rem 0 0; max-width: 36rem; font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.45rem); line-height: 1.5; color: #d6e6e2; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-hint { position: absolute; right: var(--gutter); bottom: 1rem; z-index: 3; margin: 0; font-family: var(--display); font-size: 0.8rem; color: rgba(214, 240, 234, 0.75); pointer-events: none; }
html:not(.js) .hero-hint { display: none; }

/* --------------------------------------------- stratigraphic column (nav) */
.strat { display: none; }
@media (min-width: 1240px) {
  .js .strat { display: block; position: fixed; left: 1rem; top: 50%; transform: translateY(-50%); z-index: 40; transition: opacity 0.4s ease; }
  .js .strat.is-away { opacity: 0; pointer-events: none; }
}
.strat__title { margin: 0 0 0.5rem; font-family: var(--display); font-size: 0.7rem; font-weight: 600; color: var(--muted); text-align: center; }
.strat ol { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column-reverse; gap: 3px; background: rgba(5, 10, 15, 0.6); border: 1px solid var(--line); border-radius: 12px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.strat a { position: relative; display: block; width: 18px; height: 24px; border-radius: 5px 5px 3px 3px; background: rgba(255, 255, 255, 0.07); transition: background-color 0.5s ease, box-shadow 0.3s ease; }
.strat li.is-passed a { background: var(--c); }
.strat li.is-current a { box-shadow: 0 0 0 2px #fff, 0 0 18px var(--c); }
.strat a span { position: absolute; left: 30px; top: 50%; transform: translateY(-50%); white-space: nowrap; padding: 0.3rem 0.6rem; border-radius: 6px; background: #0d1820; color: var(--ink); border: 1px solid var(--line); font-family: var(--display); font-size: 0.8rem; opacity: 0; pointer-events: none; transition: opacity 0.15s ease; }
.strat a:hover span, .strat a:focus-visible span { opacity: 1; }

/* ------------------------------------------------------------------- scenes */
.scene {
  --from: var(--bg); --num-a: #fff; --num-b: #9ff0e0; --accent: #6fe0c8;
  position: relative; color: var(--ink);
  padding-block: clamp(5rem, 3.5rem + 6vw, 9.5rem) clamp(4.5rem, 3rem + 5vw, 8rem);
  background: linear-gradient(180deg, var(--from) 0, var(--scene-bg) 26rem, var(--scene-bg) 100%);
}
.era-archean { --from: #071018; --scene-bg: #150b1f; --num-a: #ffd7a8; --num-b: #ff6f61; --accent: #ffa46b; }
.era-oxygen { --from: #150b1f; --scene-bg: #220d0b; --num-a: #ffc09a; --num-b: #ff4e3a; --accent: #ff8a66; }
.era-heyday { --from: #220d0b; --scene-bg: #052421; --num-a: #c4fff0; --num-b: #2fd3b0; --accent: #5ee8c6; }
.era-animals { --from: #052421; --scene-bg: #0b1c12; --num-a: #ecffb0; --num-b: #6fcf7f; --accent: #b4e98a; }
.era-discovery {
  --from: #0b1c12; --scene-bg: #efe6d3; --num-a: #a9622b; --num-b: #3b2412; --accent: #8a4b1c;
  --ink: #2a2118; --ink-2: #4b4034; --muted: #6e6150; --line: rgba(42, 33, 24, 0.2); --line-soft: rgba(42, 33, 24, 0.1);
  --panel: rgba(255, 252, 244, 0.7); --link: #7a3e14; --link-hover: #b0541a; color-scheme: light;
}
.era-discovery .btn--ghost { color: var(--ink); }
.era-growth { --from: #efe6d3; --scene-bg: #032836; --num-a: #c6fbff; --num-b: #33c7d9; --accent: #69e6f2; }
.era-genomes { --from: #032836; --scene-bg: #0a0d1c; --num-a: #ffc6d8; --num-b: #8fa8ff; --accent: #ff86ab; }
.era-now { --from: #0a0d1c; --scene-bg: #1a0f1c; --num-a: #ffe3a6; --num-b: #ff7d7d; --accent: #ffb27a; }
.scene a:not(.btn) { color: var(--link); }
.scene a:not(.btn):hover { color: var(--link-hover); }

.scene__head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.2rem 1rem; margin-bottom: clamp(1.75rem, 1rem + 2vw, 3rem); }
.era-num {
  margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -0.055em; line-height: 0.8;
  font-size: clamp(5rem, 2.5rem + 11vw, 12.5rem); font-variant-numeric: lining-nums;
  background: linear-gradient(180deg, var(--num-a) 10%, var(--num-b) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.06em;
}
.era-unit { margin: 0 0 0.7rem; font-family: var(--display); font-weight: 650; font-size: clamp(1rem, 0.9rem + 0.5vw, 1.35rem); color: var(--ink-2); }
.scene__title { flex-basis: 100%; margin-top: 0.6rem; font-size: clamp(2.3rem, 1.4rem + 3.8vw, 4.8rem); line-height: 0.98; font-weight: 780; letter-spacing: -0.03em; }
.scene__grid { display: grid; gap: clamp(2.25rem, 1rem + 3vw, 4.5rem); align-items: start; }
@media (min-width: 980px) {
  .scene__grid { grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); }
  .scene--flip .scene__art { order: -1; }
  .scene__art { position: sticky; top: calc(var(--header-h) + 2rem); }
}
.scene__lede { font-family: var(--serif); font-weight: 600; font-size: clamp(1.32rem, 1.12rem + 0.75vw, 1.78rem); line-height: 1.38; color: var(--ink); margin-bottom: 1.2rem; }
.scene__lede--wide { max-width: 50rem; }
.scene__body p { color: var(--ink-2); }
.scene__art { margin: 0; }
.art-frame { position: relative; overflow: hidden; border-radius: 22px; background: rgba(0, 0, 0, 0.25); box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.art-svg { display: block; width: 100%; height: auto; }
.art-svg .lbl { font-family: var(--display); font-size: 13px; font-weight: 650; fill: #fff; paint-order: stroke; stroke: rgba(0, 0, 0, 0.45); stroke-width: 3px; stroke-linejoin: round; }
.art-svg .lbl--small { font-size: 11px; font-weight: 550; }
.art-svg .ldr { fill: none; stroke: rgba(255, 255, 255, 0.65); stroke-width: 1; }
.art-svg .ldr-dot { fill: #fff; }
.art-svg .ink-cap { font-family: var(--serif); font-style: italic; font-size: 14px; fill: #3b2a1a; }
.scene__art--paper .art-svg { filter: drop-shadow(0 22px 30px rgba(59, 42, 26, 0.25)); max-width: 26rem; margin-inline: auto; }
.art-cap { margin-top: 0.75rem; font-family: var(--display); font-size: 0.82rem; line-height: 1.45; color: var(--muted); }

.cards { display: grid; gap: 0.9rem; margin-top: 1.75rem; }
@media (min-width: 620px) { .cards { grid-template-columns: 1fr 1fr; } .cards--three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 14px; padding: 1.05rem 1.15rem 1.1rem; }
.card h3 { font-size: 1.02rem; color: var(--accent); margin-bottom: 0.4rem; }
.card p { margin: 0; font-size: 0.97rem; line-height: 1.5; color: var(--ink-2); }

.dated { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.65rem; }
.dated li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: 1rem; align-items: baseline; background: var(--panel); border: 1px solid var(--line-soft); border-left: 4px solid var(--accent); border-radius: 4px 12px 12px 4px; padding: 0.85rem 1rem; }
.dated li p { margin: 0; font-size: 0.98rem; line-height: 1.5; color: var(--ink-2); }
.dated__when { font-family: var(--display); font-weight: 800; font-size: 1.05rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.photo-wide { margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.photo-wide .photo__frame { aspect-ratio: 21 / 9; }

.stepper { display: grid; gap: clamp(1.5rem, 1rem + 2vw, 3rem); align-items: center; margin-top: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
@media (min-width: 980px) { .stepper { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.stepper .st { opacity: 0; transition: opacity 0.45s ease; }
.stepper[data-step="1"] .st-1, .stepper[data-step="2"] .st-2, .stepper[data-step="3"] .st-3, .stepper:not([data-step]) .st-3 { opacity: 1; }
.lam-extra { opacity: 0; transition: opacity 0.5s ease; }
.lam-extra.on { opacity: 1; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.steps h3 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 2rem); color: var(--accent); margin-bottom: 0.5rem; }
.steps p { color: var(--ink-2); }
.js .steps li:not(.is-current) { display: none; }
.stepper__controls { display: none; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.js .stepper__controls { display: flex; }
.stepper__status { margin: 0; display: grid; gap: 0.15rem; text-align: center; font-family: var(--display); font-size: 0.85rem; color: var(--muted); }
.stepper__status b { color: var(--accent); font-size: 1.05rem; }
.scene__refs { margin: 1.1rem 0 0; font-family: var(--display); font-size: 0.82rem; color: var(--muted); }

.finds { display: grid; gap: 1.4rem; }
.find { padding-left: 1.1rem; border-left: 3px solid var(--accent); }
.find h3 { margin-bottom: 0.4rem; }
.find p { margin: 0; color: var(--ink-2); }
.big-stat { display: grid; gap: 0.5rem 2rem; align-items: center; margin: clamp(3rem, 2rem + 3vw, 5rem) 0 0; padding-top: clamp(2rem, 1.5rem + 2vw, 3rem); border-top: 1px solid var(--line); }
@media (min-width: 760px) { .big-stat { grid-template-columns: auto minmax(0, 1fr); } }
.big-stat__num { font-family: var(--display); font-weight: 800; letter-spacing: -0.05em; line-height: 0.82; font-size: clamp(6rem, 3rem + 12vw, 13rem); background: linear-gradient(180deg, var(--num-a), var(--num-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.big-stat__text { font-family: var(--serif); font-weight: 600; font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.85rem); line-height: 1.35; max-width: 34rem; }
.scene__more { margin: 2rem 0 0; }

.threats { display: grid; gap: clamp(1.5rem, 1rem + 2vw, 2.5rem); margin-top: 1rem; }
@media (min-width: 900px) { .threats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.threat .photo { margin-bottom: 1.1rem; }
.threat .photo__frame { aspect-ratio: 4 / 3; }
.threat h3 { margin-bottom: 0.5rem; color: var(--accent); }
.threat p { color: var(--ink-2); font-size: 0.98rem; }
.now-grid { display: grid; gap: clamp(2rem, 1rem + 3vw, 4rem); margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem); padding-top: clamp(2rem, 1.5rem + 2vw, 3rem); border-top: 1px solid var(--line); align-items: start; }
@media (min-width: 900px) { .now-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
.now-grid__title { font-size: 1.5rem; margin-bottom: 0.4rem; }

/* -------------------------------------------------------------------- zones */
.zone { padding-block: clamp(4rem, 3rem + 5vw, 7.5rem); background: var(--bg); border-top: 1px solid var(--line-soft); }
.zone__title { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.8rem); letter-spacing: -0.03em; margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.tiles { display: grid; gap: 1rem; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(5, 1fr); } }
.tile { position: relative; display: flex; flex-direction: column; gap: 0.5rem; min-height: 11rem; padding: 1.25rem 1.2rem; border-radius: 16px; text-decoration: none; color: var(--ink); background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, transparent), rgba(255, 255, 255, 0.02) 70%); border: 1px solid var(--line-soft); overflow: hidden; }
.tile::before { content: ""; position: absolute; left: 1.2rem; right: 1.2rem; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--c); }
.tile:hover { color: var(--ink); text-decoration: none; border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.tile__title { font-family: var(--display); font-weight: 700; font-size: 1.15rem; line-height: 1.2; margin-top: 0.4rem; }
.tile__text { font-size: 0.95rem; line-height: 1.45; color: var(--ink-2); }
.labs { display: grid; gap: 1.25rem; }
@media (min-width: 820px) { .labs { grid-template-columns: repeat(3, 1fr); } }
.lab { padding: 1.4rem 1.4rem 1.2rem; border-radius: 16px; background: var(--panel); border: 1px solid var(--line-soft); border-top: 3px solid var(--c); }
.lab h3 { font-size: 1.4rem; }
.lab__who { margin: 0.3rem 0 0.8rem; font-family: var(--display); font-size: 0.9rem; color: var(--muted); }
.lab p:not([class]) { color: var(--ink-2); }
.lab p:last-child { margin-bottom: 0; font-family: var(--display); font-weight: 600; }
.sources { margin: 0; padding-left: 1.4rem; display: grid; gap: 0.55rem; max-width: 62rem; font-size: 0.95rem; line-height: 1.5; color: var(--ink-2); }
.sources b { color: var(--ink); font-weight: 650; }
.sources a { font-family: var(--display); font-size: 0.85rem; }

/* ----------------------------------------------------------- inner page heads */
.page-head { position: relative; padding-top: clamp(3.5rem, 2.5rem + 5vw, 7rem); padding-bottom: clamp(1rem, 0.5rem + 1vw, 2rem); background: radial-gradient(80% 120% at 85% -20%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%), var(--bg); overflow: hidden; }
.page-head .wrap::before { content: ""; display: block; width: 3.25rem; height: 6px; border-radius: 3px; background: var(--accent); margin-bottom: 1.4rem; box-shadow: 0 0 18px var(--accent); }
.page-title { font-size: clamp(2.6rem, 1.4rem + 5vw, 5.6rem); line-height: 0.95; font-weight: 800; letter-spacing: -0.04em; max-width: 16ch; }
.lede { font-size: clamp(1.18rem, 1.06rem + 0.5vw, 1.45rem); line-height: 1.5; color: var(--ink-2); }
.page-head .lede { margin: 1.4rem 0 0; max-width: 44rem; }
.strata-strip { height: 36px; margin-top: clamp(2rem, 1.5rem + 2vw, 3.25rem); background: url("../img/strata.svg") left center / 640px 36px repeat-x; opacity: 0.6; }

/* ------------------------------------------------------------ content parts */
.note { background: var(--panel); border: 1px solid var(--line-soft); border-left: 4px solid var(--accent, var(--ink)); border-radius: 4px 14px 14px 4px; padding: 1.4rem 1.5rem 1.25rem; }
.note__title { font-size: 1.1rem; margin-bottom: 0.7rem; color: var(--accent); }
.note p { font-size: 0.97em; color: var(--ink-2); }
.note > :last-child { margin-bottom: 0; }
.terms { margin: 0; }
.terms dt { font-family: var(--display); font-weight: 650; margin-top: 0.9rem; }
.terms dd { margin: 0.15rem 0 0; color: var(--ink-2); }
.citation-box { font-family: var(--display); font-size: 0.95rem; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; overflow-wrap: anywhere; }
.cite { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; margin: 0.4rem 0 0; font-family: var(--display); font-size: 0.84rem; line-height: 1.45; color: var(--muted); }
.cite a { color: var(--ink-2); text-decoration-color: var(--line); }
.cite a:hover { color: var(--link-hover); }
.cite--block { margin-top: 1.75rem; }
.more { margin: clamp(1.75rem, 1rem + 1.5vw, 2.5rem) 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; font-family: var(--display); font-weight: 620; }

.strata { list-style: none; margin: 0; padding: 0; }
.stratum { position: relative; display: grid; gap: 0.5rem 2.5rem; padding: 1.7rem 0 1.5rem 1.5rem; }
.stratum::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--line); -webkit-mask: var(--wave) left center / 96px 8px repeat-x; mask: var(--wave) left center / 96px 8px repeat-x; }
.stratum::after { content: ""; position: absolute; left: 0; top: 1.95rem; width: 0.4rem; height: 2.3rem; border-radius: 3px; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.stratum__title { font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.45rem); }
.stratum__body { color: var(--ink-2); }
.stratum__body > :last-child { margin-bottom: 0; }
@media (min-width: 760px) { .stratum { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr); } }

.findings, .two-ways, .bios { display: grid; gap: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
@media (min-width: 820px) { .findings, .bios { grid-template-columns: repeat(3, minmax(0, 1fr)); } .two-ways { grid-template-columns: 1fr 1fr; } }
.finding, .way, .bio { background: var(--panel); border: 1px solid var(--line-soft); border-top: 3px solid var(--accent, var(--ink)); border-radius: 4px 4px 14px 14px; padding: 1.3rem 1.3rem 1.15rem; }
.finding h3, .way h3 { margin-bottom: 0.6rem; }
.finding p, .way p, .bio p { color: var(--ink-2); font-size: 0.98em; }
.bio h3 { font-size: 1.3rem; }
.bio__role { font-family: var(--display); font-size: 0.9rem; line-height: 1.4; color: var(--muted) !important; margin: 0.35rem 0 0.9rem; }
.bio__links { font-family: var(--display); font-weight: 620; font-size: 0.95rem !important; margin-bottom: 0; }

.checklist { list-style: none; margin: 1rem 0 0; padding: 0; }
.checklist li { position: relative; padding-left: 1.9rem; margin-bottom: 0.9rem; color: var(--ink-2); }
.checklist li::before { content: ""; position: absolute; left: 0.1rem; top: 0.45em; width: 0.95rem; height: 0.5rem; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }
.checklist strong { font-family: var(--display); font-weight: 650; color: var(--ink); }
.questions { list-style: none; margin: 0; padding: 0; }
.questions li { padding: 0.85rem 0; border-top: 1px solid var(--line-soft); color: var(--ink-2); }

.next-links { display: grid; gap: 0 2.5rem; }
@media (min-width: 700px) { .next-links { grid-template-columns: 1fr 1fr; } }
.next-link { display: block; padding: 1.1rem 0 0.4rem; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); }
.next-link:hover { color: #fff; text-decoration: none; }
.next-link__label { display: block; font-family: var(--display); font-size: 0.85rem; color: var(--muted); }
.next-link__title { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(1.25rem, 1rem + 0.9vw, 1.7rem); line-height: 1.2; }
.next-link:hover .next-link__title { text-decoration: underline wavy #ff7aa2; text-decoration-thickness: 1.5px; text-underline-offset: 0.25em; }

/* ---------------------------------------------------------------- fabrics */
.fabrics { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem 1.25rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fabrics--compact { margin-top: 1.5rem; }
@media (min-width: 1100px) { .fabrics--compact { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fabric { display: block; width: 100%; height: auto; margin-bottom: 0.65rem; }
.fab-bg { fill: rgba(255, 255, 255, 0.05); }
.fab-frame { fill: none; stroke: var(--line); stroke-width: 1.5; }
.fab-line { fill: none; stroke: var(--accent); stroke-linecap: round; }
.fab-fill { fill: var(--accent); fill-opacity: 0.6; }
.fab-mass { fill: var(--accent); fill-opacity: 0.16; }
.fab-dot { fill: var(--accent); fill-opacity: 0.55; }
.fabric-item h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.fabric-item p { font-size: 0.9rem; line-height: 1.4; color: var(--ink-2); margin: 0; }

/* ------------------------------------------------------------ mat explorer */
.mat-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-bottom: 1.5rem; }
.seg { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.seg__btn { appearance: none; border: 0; background: transparent; cursor: pointer; padding: 0.5rem 1.15rem; border-radius: 999px; font-family: var(--display); font-weight: 650; font-size: 0.95rem; color: var(--ink-2); }
.seg__btn[aria-pressed="true"] { background: linear-gradient(135deg, #c8fff1, #8fdcff); color: #04131b; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.45rem; border: 1px solid var(--line); background: transparent; color: var(--ink-2); padding: 0.42rem 0.85rem; border-radius: 999px; font-family: var(--display); font-size: 0.88rem; font-weight: 560; line-height: 1.2; }
.chip:hover { border-color: rgba(238, 243, 241, 0.4); color: #fff; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--night); }
.mat-stage { display: grid; gap: 1.5rem 1.25rem; align-items: start; grid-template-columns: minmax(0, 250fr) minmax(0, 204fr); }
@media (min-width: 980px) { .mat-stage { grid-template-columns: minmax(0, 250fr) minmax(0, 204fr) minmax(0, 560fr); gap: 1.5rem 2rem; } }
@media (max-width: 979px) { .mat-panel { grid-column: 1 / -1; } }
.mat-figure, .mat-profile { margin: 0; }
.mat-figure figcaption, .mat-profile figcaption { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin-top: 0.6rem; font-family: var(--display); font-size: 0.82rem; color: var(--muted); }
.mat-svg, .profile-svg { display: block; width: 100%; height: auto; }
.mat-svg { border-radius: 14px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); }
.profile-svg { overflow: visible; }
.mat-layer { cursor: pointer; outline: none; transition: opacity 0.25s ease; }
.mat-explorer[data-selected] .mat-layer { opacity: 0.5; }
.mat-explorer[data-selected] .mat-layer.is-selected { opacity: 1; }
.mat-layer.is-selected .mat-layer__shape, .mat-layer:focus-visible .mat-layer__shape { stroke: #fff; stroke-width: 2.5; }
.mat-night { opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
.mat-explorer[data-mode="night"] .mat-night { opacity: 0.4; }
.pf-grid { stroke: var(--line-soft); stroke-width: 0.8; }
.pf-axis { stroke: var(--muted); stroke-width: 1.2; }
.pf-surface { stroke: var(--brine); stroke-width: 1; stroke-dasharray: 3 3; }
.pf-tick { font-family: var(--display); font-size: 10px; fill: var(--muted); }
.pf-o2, .pf-h2s { fill: none; stroke-width: 2.6; stroke-linecap: round; }
.pf-o2 { stroke: var(--brine); filter: drop-shadow(0 0 4px rgba(111, 211, 232, 0.6)); }
.pf-h2s { stroke: var(--ochre); stroke-dasharray: 7 4; }
.pf-day, .pf-night { transition: opacity 0.35s ease; }
.pf-night { opacity: 0; }
.mat-explorer[data-mode="night"] .pf-day { opacity: 0; }
.mat-explorer[data-mode="night"] .pf-night { opacity: 1; }
.key { display: inline-flex; align-items: center; gap: 0.45rem; }
.key::before { content: ""; width: 1.3rem; height: 0; border-top: 2.6px solid; flex: none; }
.key--o2::before { border-color: var(--brine); }
.key--h2s::before { border-color: var(--ochre); border-top-style: dashed; }
.mat-panel { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 16px; padding: 1.4rem 1.5rem 1.2rem; }
.mat-mode { border-bottom: 1px solid var(--line); padding-bottom: 0.9rem; margin-bottom: 1.1rem; }
.mat-mode__label { font-family: var(--display); font-weight: 750; font-size: 0.95rem; margin-bottom: 0.35rem; color: var(--ochre); }
.mat-explorer[data-mode="night"] .mat-mode__label { color: #a9b8ff; }
.mat-mode p, .mat-info p { font-size: 0.96em; color: var(--ink-2); }
.mat-info h3 { font-size: 1.3rem; margin-bottom: 0.55rem; }
.mat-info > :last-child, .mat-mode > :last-child { margin-bottom: 0; }
.mat-note { margin: 1.25rem 0 0; max-width: 60rem; font-family: var(--display); font-size: 0.82rem; color: var(--muted); }

/* ---------------------------------------------------------------- research */
.research { display: grid; gap: 2.5rem; }
@media (min-width: 1000px) {
  .research { grid-template-columns: 14rem minmax(0, 1fr); gap: 4rem; }
  .research__nav { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 1.5rem); align-self: start; }
}
.research__nav-title { font-family: var(--display); font-weight: 700; font-size: 0.9rem; margin-bottom: 0.5rem; }
.research__nav ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.research__nav a { display: block; margin-left: -1px; padding: 0.32rem 0 0.32rem 0.9rem; border-left: 2px solid transparent; font-family: var(--display); font-size: 0.92rem; color: var(--ink-2); text-decoration: none; }
.research__nav a:hover { color: #fff; border-left-color: #ff7aa2; }
.system { padding-bottom: 2.5rem; scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.system + .system { padding-top: 2.5rem; border-top: 1px solid var(--line); }
.system::after { content: ""; display: block; clear: both; }
.system h2 { margin-bottom: 0.6rem; }
.system__intro { color: var(--ink-2); max-width: 46rem; margin-bottom: 1.75rem; }
.result { max-width: 47rem; padding-left: 1.25rem; border-left: 3px solid var(--accent, var(--ink)); margin-bottom: 2.1rem; }
.result h3 { margin-bottom: 0.5rem; }
.result p { color: var(--ink-2); }
.ref { font-family: var(--display); font-size: 0.84rem; line-height: 1.5; color: var(--muted) !important; margin-bottom: 0; }
.glossary { margin: 0; max-width: 48rem; display: grid; }
@media (min-width: 700px) { .glossary { grid-template-columns: 15rem minmax(0, 1fr); gap: 0 2rem; } .glossary dt { border-bottom: 1px solid var(--line-soft); padding-bottom: 0.9rem; } }
.glossary dt { font-family: var(--display); font-weight: 650; padding-top: 0.9rem; }
.glossary dd { margin: 0; padding: 0.9rem 0; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); }

/* -------------------------------------------------------------------- flow */
.flow { display: grid; gap: 0.75rem; }
@media (min-width: 960px) { .flow { grid-template-columns: minmax(0, 1fr) 2.5rem minmax(0, 1fr) 2.5rem minmax(0, 1fr); gap: 0; align-items: stretch; } }
.flow__col { display: grid; gap: 0.75rem; align-content: start; }
.flow__col--outcome { align-content: center; }
.flow__head { margin: 0 0 0.25rem; font-family: var(--display); font-weight: 700; font-size: 0.95rem; color: var(--muted); }
.flow__node { background: var(--panel); border: 1px solid var(--line-soft); border-left: 4px solid var(--accent); border-radius: 4px 12px 12px 4px; padding: 0.9rem 1rem; }
.flow__node h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.flow__node p { margin: 0; font-size: 0.93em; color: var(--ink-2); }
.flow__arrow { display: grid; place-items: center; min-height: 2.25rem; color: var(--muted); }
.flow__arrow::before { content: ""; width: 12px; height: 12px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
@media (min-width: 960px) { .flow__arrow::before { transform: rotate(-45deg); } }
.flow__note { margin: 1rem 0 0; font-family: var(--display); font-size: 0.85rem; color: var(--muted); }

/* -------------------------------------------------------------------- atlas */
.atlas__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; margin-bottom: 1.25rem; }
.atlas__count { margin: 0; font-family: var(--display); font-size: 0.9rem; color: var(--muted); }
.atlas-map, .atlas-mini { position: relative; display: block; aspect-ratio: 1000 / 455.61; }
.atlas-map { margin-bottom: 2.25rem; }
.atlas-dots { position: absolute; inset: 0; background: var(--map-dot); -webkit-mask: url("../img/world-dots.svg") center / 100% 100% no-repeat; mask: url("../img/world-dots.svg") center / 100% 100% no-repeat; }
[data-env="marine"] { --pin: #6fd3e8; }
[data-env="hypersaline"] { --pin: #ff86c0; }
[data-env="alkaline"] { --pin: #b9a2ff; }
[data-env="freshwater"] { --pin: #74d68f; }
[data-env="extreme"] { --pin: #ffc46b; }
[data-env="fossil"] { --pin: #eef3f1; }
.pin { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); z-index: 1; width: 1rem; height: 1rem; margin: -0.5rem 0 0 -0.5rem; padding: 0; border-radius: 50%; border: 2px solid var(--night); background: var(--pin, #fff); cursor: pointer; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 14px var(--pin); }
.pin[data-env="fossil"] { background: var(--night); border: 3px solid var(--pin); }
.pin:hover, .pin.is-hot, .pin[aria-current="true"] { z-index: 3; box-shadow: 0 0 0 4px var(--night), 0 0 0 6px var(--pin), 0 0 22px var(--pin); }
.pin__label { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); white-space: nowrap; background: var(--ink); color: var(--night); padding: 0.3rem 0.55rem; border-radius: 6px; pointer-events: none; font-family: var(--display); font-size: 0.78rem; font-weight: 650; line-height: 1.2; opacity: 0; transition: opacity 0.15s ease; }
.pin:hover .pin__label, .pin:focus-visible .pin__label, .pin.is-hot .pin__label, .pin[aria-current="true"] .pin__label { opacity: 1; }
.atlas-mini .pin { width: 0.75rem; height: 0.75rem; margin: -0.375rem 0 0 -0.375rem; cursor: inherit; }
.atlas-mini:hover .atlas-dots { background: rgba(150, 196, 190, 0.5); }
.chip--env::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--pin); flex: none; box-shadow: 0 0 8px var(--pin); }
.chip--env[data-env="fossil"]::before { background: transparent; border: 2px solid currentColor; box-shadow: none; }
.site-list { display: grid; gap: 0 3rem; }
@media (min-width: 900px) { .site-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.site { position: relative; padding: 1.25rem 1rem 1.3rem 1.6rem; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 2rem); border-radius: 0 0 12px 12px; transition: background-color 0.3s ease; }
.site::before { content: ""; position: absolute; left: 0.2rem; top: 1.62rem; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--pin); box-shadow: 0 0 10px var(--pin); }
.site[data-env="fossil"]::before { background: transparent; border: 2px solid var(--pin); box-shadow: none; }
.site.is-active, .site.is-hot { background: var(--panel); }
.site h3 { font-size: 1.15rem; }
.site__meta { margin: 0.2rem 0 0.6rem; font-family: var(--display); font-size: 0.86rem; color: var(--muted); }
.site p:not([class]) { font-size: 0.97em; color: var(--ink-2); }
.site__papers { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; margin: 0; font-family: var(--display); font-size: 0.84rem; }
.site__papers a { color: var(--ink-2); text-decoration-color: var(--line); }
.site__thumb { float: right; width: 6.25rem; aspect-ratio: 1; margin: 0.2rem 0 0.75rem 1rem; border-radius: 10px; overflow: hidden; background: var(--panel); }
.site__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; color: transparent; }
.site__credit { clear: both; margin: 0.6rem 0 0; font-family: var(--display); font-size: 0.78rem; color: var(--muted); }
.site__credit a { color: inherit; text-decoration-color: var(--line); }

.pin[data-raw="true"]::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1.5px dashed #ffffff; opacity: 0.85; pointer-events: none; }
.site__badge { display: inline-block; margin: 0 0 0.45rem; padding: 0.15rem 0.6rem; border-radius: 999px; font-family: var(--display); font-size: 0.74rem; font-weight: 700; color: #ffd0de; background: rgba(255, 122, 162, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 122, 162, 0.45); }
.chip--raw::before { content: ""; width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 1.5px dashed currentColor; flex: none; }
.lab__sites { font-size: 0.92rem !important; color: var(--muted) !important; }

.atlas__filters { display: grid; gap: 0.6rem; margin-bottom: 0.9rem; }
.atlas__count { margin: 0 0 1.1rem; }
.pin--small { width: 0.72rem; height: 0.72rem; margin: -0.36rem 0 0 -0.36rem; border-width: 1.5px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 0 9px var(--pin); }
.atlas__h { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); margin: clamp(1.5rem, 1rem + 2vw, 2.5rem) 0 0.4rem; }
.atlas__sub { margin: 0 0 1.25rem; color: var(--muted); font-size: 0.98rem; max-width: 52rem; }
.cat-groups { display: grid; gap: 2rem; }
.cat-group__title { font-size: 1.15rem; color: var(--ink-2); margin-bottom: 0.4rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); }
.cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 2.5rem; }
@media (min-width: 900px) { .cat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.site--cat { padding: 0.95rem 0.8rem 1rem 1.5rem; border-top: 1px solid var(--line-soft); }
.site--cat::before { top: 1.3rem; width: 0.6rem; height: 0.6rem; }
.cat__name { font-size: 1.02rem; margin: 0; }
.site--cat .site__meta { margin: 0.15rem 0 0.4rem; font-size: 0.82rem; }
.cat__note { margin: 0 0 0.35rem; font-size: 0.93rem; line-height: 1.5; color: var(--ink-2); }
.site--cat .site__papers { font-size: 0.8rem; }

/* ------------------------------------------------------------- publications */
.pub-tools { display: grid; gap: 0.9rem; margin-bottom: 1.5rem; }
.pub-tools__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; }
.pub-tools__label { min-width: 4.5rem; font-family: var(--display); font-size: 0.88rem; font-weight: 650; color: var(--muted); }
.pub-search { flex: 1 1 16rem; max-width: 28rem; padding: 0.65rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-family: var(--display); font-size: 0.95rem; }
.pub-search::placeholder { color: var(--muted); }
.pub-count { margin: 0 0 0.75rem; font-family: var(--display); font-size: 0.9rem; color: var(--muted); }
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: 0 1.25rem; padding: 1.15rem 0; border-top: 1px solid var(--line-soft); }
.pub__year { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.5; background: linear-gradient(180deg, #ffc6d8, #8fa8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pub__title { margin: 0 0 0.25rem; font-family: var(--serif); font-weight: 600; font-size: 1.06em; line-height: 1.4; color: var(--ink); }
.pub__authors { margin: 0 0 0.15rem; font-size: 0.94em; color: var(--ink-2); }
.pub__authors b { color: #fff; font-weight: 700; }
.pub__venue { margin: 0; font-size: 0.93em; color: var(--muted); }
.pub__links { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0.4rem 0 0; font-family: var(--display); font-size: 0.85rem; }
.pub-empty { padding: 1.5rem 0; font-family: var(--display); }
.pub-empty button { margin-left: 0.5rem; }
.link-btn { appearance: none; border: 0; background: none; padding: 0; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; }

/* ------------------------------------------------------------------ photos */
.photo { margin: 0; }
.photo__frame { position: relative; overflow: hidden; border-radius: 16px; aspect-ratio: var(--ratio, 3 / 2); max-height: 34rem; background-color: rgba(255, 255, 255, 0.04); background-image: repeating-linear-gradient(172deg, transparent 0 15px, rgba(255, 255, 255, 0.035) 15px 17px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.photo__frame img { display: block; width: 100%; height: 100%; object-fit: cover; color: transparent; }
.photo.is-missing img, .site__thumb.is-missing img { display: none; }
.photo.is-missing .photo__frame::after { content: attr(data-missing); position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem 1.5rem; text-align: center; font-family: var(--display); font-size: 0.85rem; line-height: 1.45; color: var(--muted); }
.photo__caption { margin-top: 0.6rem; font-family: var(--display); font-size: 0.8rem; line-height: 1.45; color: var(--muted); }
.photo__desc { color: var(--ink-2); }
.photo__credit a { color: inherit; text-decoration-color: var(--line); }
.photo__credit a:hover { color: var(--link-hover); }
.photo-pair { display: grid; gap: 1.5rem; margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
@media (min-width: 760px) { .photo-pair { grid-template-columns: 1fr 1fr; gap: 1.75rem; } .photo-pair .photo__frame { aspect-ratio: 4 / 3; } }
.stack { display: grid; gap: 1.5rem; align-content: start; }
.photo--float { margin: 0 0 2rem; }
.photo--float .photo__frame { max-height: 26rem; }
@media (min-width: 1000px) { .photo--float { float: right; width: 15rem; margin: 0.35rem 0 1.5rem 2rem; } }
.mosaic { display: grid; gap: 1.5rem 1.25rem; }
@media (min-width: 900px) { .mosaic { grid-template-columns: minmax(0, 1.75fr) minmax(0, 0.72fr) minmax(0, 1fr); align-items: start; } .mosaic .photo__frame { aspect-ratio: auto; height: clamp(16rem, 25vw, 23rem); } }
.credits { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 2.5rem; }
@media (min-width: 900px) { .credits { grid-template-columns: 1fr 1fr; } }
.credits li { padding: 0.85rem 0; border-top: 1px solid var(--line-soft); font-family: var(--display); font-size: 0.86rem; line-height: 1.45; color: var(--muted); }
.credit__what { display: block; margin-bottom: 0.15rem; color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--night); color: var(--ink-2); padding-block: clamp(3rem, 2rem + 3vw, 4.5rem) 2.25rem; border-top: 1px solid var(--line-soft); }
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 2.25rem; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; } }
.footer-brand { margin: 0 0 0.6rem; font-family: var(--display); font-weight: 800; font-size: 1.35rem; color: var(--ink); letter-spacing: -0.02em; }
.footer-text { margin: 0 0 0.8rem; max-width: 30rem; font-size: 0.95rem; color: var(--muted); }
.footer-title { margin: 0 0 0.75rem; font-family: var(--display); font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.footer-links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1.5rem; font-family: var(--display); font-size: 0.93rem; }
.footer-links--single { columns: 1; }
.footer-links li { margin-bottom: 0.45rem; break-inside: avoid; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline wavy; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line-soft); font-family: var(--display); font-size: 0.82rem; color: var(--muted); }
.footer-base p { margin: 0; }

/* ------------------------------------------------- WordPress generic pages */
.generic { padding-block: clamp(3.5rem, 2.25rem + 5vw, 7rem); }
.generic-title { font-size: clamp(2rem, 1.4rem + 2.5vw, 3.2rem); margin-bottom: 1.5rem; }
.generic .prose > * { max-width: var(--measure); }
.post-summary { padding: 1.5rem 0; border-top: 1px solid var(--line); max-width: var(--measure); }
.post-summary h2 { font-size: 1.5rem; margin-bottom: 0.3rem; }
.post-summary h2 a { color: var(--ink); text-decoration: none; }
.post-meta { font-family: var(--display); font-size: 0.85rem; color: var(--muted); }
.not-found { min-height: 55vh; padding-block: clamp(4rem, 3rem + 5vw, 8rem); background: radial-gradient(80% 120% at 80% 0%, rgba(111, 224, 200, 0.18), transparent 60%), var(--bg); }

/* --------------------------------------------- preview: works with or without JS */
html.js [data-route] { display: none; }
html.js [data-route].is-active { display: block; }
.route-tag { margin: 0; padding: 0.75rem var(--gutter); background: #02060a; color: var(--ink); font-family: var(--display); font-weight: 650; font-size: 0.95rem; text-align: center; border-block: 1px solid var(--line); }
html.js .route-tag { display: none; }

/* ------------------------------------------------------------------ motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .preview-bar, .mat-controls, .pub-tools, .atlas__bar, .strata-strip, .strat, .hero-canvas { display: none !important; }
  body, .scene, .zone, .band { background: #fff !important; color: #000 !important; }
}
