/* qubichelm marketing site.
   The page is a water column: each section is a depth band, lighter at the surface and
   darker toward the floor. Colours come from nautical-chart depth tints; brass is for
   instruments and links; port red / starboard green appear only where they mean stop /
   go (the approval gate). */

:root {
  --shallows: #dceff0;
  --shoal: #b9dde3;
  --shelf: #2e6f8c;
  --deep: #123a5a;
  --abyss: #071b2e;
  --brass: #c99a3e;
  --brass-light: #e4c27a;
  --port: #d04848;
  --starboard: #2f9e6b;

  --ink: #0d2a40;
  --ink-muted: #3f5f73;
  --foam: #eef8f8;
  --mist: #a7c8d3;

  --display: 'Archivo', system-ui, sans-serif;
  --body: 'Archivo', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

  --measure: 66ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --rail: 5.5rem; /* room for the sounding gauge on wide screens */

  /* Shadows are tinted with the water, never grey. */
  --lift-1: 0 1px 2px rgb(7 27 46 / 0.18), 0 4px 10px rgb(7 27 46 / 0.12);
  --lift-2: 0 2px 4px rgb(7 27 46 / 0.2), 0 12px 28px rgb(7 27 46 / 0.22), 0 30px 60px -20px rgb(7 27 46 / 0.35);
  --lift-3: 0 2px 6px rgb(3 14 26 / 0.35), 0 24px 48px rgb(3 14 26 / 0.45), 0 60px 100px -30px rgb(3 14 26 / 0.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variation-settings: 'wdth' 100;
  color: var(--ink);
  background: var(--abyss); /* overscroll at the bottom shows the floor */
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--brass); color: var(--abyss); padding: .6rem 1rem; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 1rem; }

/* ── Type ──────────────────────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.05;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.5rem, 4.9vw, 4.4rem); font-variation-settings: 'wdth' 116; font-weight: 750; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.9rem, 3.8vw, 3.1rem); font-variation-settings: 'wdth' 118; font-weight: 700; }
h3 { font-size: 1.3rem; font-variation-settings: 'wdth' 108; font-weight: 650; line-height: 1.2; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.5; max-width: 52ch; }
.mono { font-family: var(--mono); font-size: .92em; }
.marker { font-family: var(--mono); font-size: .85rem; letter-spacing: 0; margin: 0 0 .9rem; opacity: .8; }
.muted { color: var(--ink-muted); }
.dark .muted, .z-shelf .muted, .z-deep .muted, .z-abyss .muted { color: var(--mist); }

/* ── Layout ────────────────────────────────────────────────────────────── */
.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
@media (min-width: 1100px) { .wrap { width: min(1180px, 100% - 2 * var(--gutter) - var(--rail)); margin-left: max(var(--rail) + var(--gutter), (100% - 1180px) / 2); } }

.band { position: relative; padding-block: clamp(4.5rem, 9vw, 8rem); }
.band > .wrap { position: relative; z-index: 1; }

/* Depth bands. Light bands carry ink text; dark bands carry foam text. */
.z-surface { background: linear-gradient(180deg, #e9f6f5 0%, var(--shallows) 55%, var(--shoal) 100%); }
.z-shoal { background: linear-gradient(180deg, var(--shoal) 0%, #94c7d2 100%); }
.z-shelf { background: linear-gradient(180deg, #94c7d2 0, #3d7f99 3.5rem, var(--shelf) 100%); color: var(--foam); }
.z-deep { background: linear-gradient(180deg, #1a4a6b 0%, var(--deep) 100%); color: var(--foam); }
.z-abyss { background: linear-gradient(180deg, #0c2740 0%, var(--abyss) 100%); color: var(--foam); }
.z-abyss + .z-abyss { background: var(--abyss); }
.dark { color: var(--foam); }

/* Contour lines: faint bathymetry behind every band. */
.band::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0; background: url('../img/contours-ink.svg') center / 140% 100% no-repeat; }
.z-shelf::after, .z-deep::after, .z-abyss::after { background-image: url('../img/contours-foam.svg'); }
.band:nth-of-type(even)::after { transform: scaleX(-1); }

/* Marine snow in the abyss: the one ambient texture, static. */
.z-abyss::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgb(238 248 248 / .35), transparent),
    radial-gradient(1px 1px at 68% 42%, rgb(238 248 248 / .25), transparent),
    radial-gradient(1.5px 1.5px at 34% 76%, rgb(238 248 248 / .2), transparent),
    radial-gradient(1px 1px at 88% 12%, rgb(238 248 248 / .3), transparent),
    radial-gradient(1px 1px at 52% 92%, rgb(238 248 248 / .2), transparent);
  background-size: 420px 380px;
}

/* ── Header ────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  background: rgb(233 246 245 / 0.72);
  border-bottom: 1px solid rgb(13 42 64 / 0.08);
  transition: background .3s, color .3s, border-color .3s;
}
body.is-deep .site-header { background: rgb(7 27 46 / 0.78); color: var(--foam); border-bottom-color: rgb(238 248 248 / 0.08); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--mono); font-weight: 500; font-size: 1.02rem; }
.brand svg { width: 26px; height: 26px; }
.brand .chev { color: var(--brass); }
.nav { display: flex; gap: 1.4rem; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; font-size: .98rem; font-variation-settings: 'wdth' 106; }
.nav a:hover, .nav a[aria-current='page'] { text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: .35em; text-decoration-thickness: 2px; }
.nav .btn { padding: .45rem .95rem; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid currentColor; border-radius: 6px; padding: .35rem .6rem; font: inherit; color: inherit; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; padding: 1rem var(--gutter) 1.5rem; background: inherit; backdrop-filter: inherit; border-bottom: inherit; gap: .9rem; }
  .nav.open { display: flex; }
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: inherit; font-weight: 600; font-variation-settings: 'wdth' 108;
  padding: .8rem 1.35rem; border-radius: 8px; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-brass { background: var(--brass); color: var(--abyss); box-shadow: 0 1px 0 rgb(255 255 255 / .35) inset, var(--lift-1); }
.btn-brass:hover { background: var(--brass-light); transform: translateY(-1px); }
.btn-line { border-color: currentColor; background: transparent; }
.btn-line:hover { background: rgb(13 42 64 / .06); }
.dark .btn-line:hover, body.is-deep .site-header .btn-line:hover { background: rgb(238 248 248 / .08); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* ── Hero: the chart table ─────────────────────────────────────────────── */
.hero { padding-top: clamp(3rem, 7vw, 6rem); padding-bottom: clamp(5rem, 10vw, 9rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero h1 { max-width: 15ch; text-wrap: balance; }
.hero .sub { margin-top: 1.4rem; }

.chart { perspective: 1600px; min-height: 33rem; position: relative; }
.stack { position: relative; transform-style: preserve-3d; transform: rotateX(20deg) rotateZ(-7deg); height: 33rem; }
.sheet {
  position: absolute; width: min(100%, 30rem); border-radius: 10px;
  background: #fbfdfd; color: var(--ink);
  border: 1px solid rgb(13 42 64 / .08);
  box-shadow: var(--lift-2);
  overflow: hidden;
  animation: settle .9s cubic-bezier(.2, .8, .2, 1) both;
}
.sheet header { display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; border-bottom: 1px solid rgb(13 42 64 / .08); font-family: var(--mono); font-size: .76rem; color: var(--ink-muted); }
.sheet header .dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--brass); }
.sheet-log { top: 0; left: 0; transform: translateZ(0); animation-delay: .05s; }
.sheet-diff { top: 11rem; left: 9%; transform: translateZ(40px); animation-delay: .25s; }
.sheet-gate { top: 20.5rem; left: 18%; transform: translateZ(80px); animation-delay: .45s; background: var(--abyss); color: var(--foam); border-color: rgb(238 248 248 / .1); box-shadow: var(--lift-3); }
.sheet-gate header { color: var(--mist); border-bottom-color: rgb(238 248 248 / .1); }
@keyframes settle { from { opacity: 0; translate: 0 -60px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
@media (max-width: 960px) {
  .chart { min-height: 0; perspective: none; }
  .stack { transform: none; height: auto; display: grid; gap: 1rem; }
  .sheet { position: relative; inset: auto; width: 100%; transform: none; }
}

.log { margin: 0; padding: .8rem .9rem; font-family: var(--mono); font-size: .76rem; line-height: 1.75; white-space: pre; overflow-x: auto; }
.log .t { color: #7c97a8; }
.log .k { color: var(--shelf); }
.log .wait { color: #a87420; }
.diff { margin: 0; padding: .55rem 0; font-family: var(--mono); font-size: .76rem; line-height: 1.7; }
.diff span { display: block; padding: 0 .9rem; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.diff .del { background: rgb(208 72 72 / .1); color: #8f2a2a; }
.diff .add { background: rgb(47 158 107 / .12); color: #1d6a47; }
.diff .ctx { color: var(--ink-muted); }
.gate-body { padding: 1rem .95rem 1.1rem; }
.gate-body p { margin: 0 0 .9rem; font-size: .93rem; }
.gate-actions { display: flex; gap: .55rem; flex-wrap: wrap; }
.pill { font-size: .82rem; font-weight: 600; padding: .4rem .75rem; border-radius: 6px; border: 1.5px solid; }
.pill-go { background: var(--starboard); border-color: var(--starboard); color: #fff; }
.pill-stop { border-color: var(--port); color: #ff9a9a; }

/* ── Sounding gauge (fixed left rail) ──────────────────────────────────── */
.sounding { display: none; }
@media (min-width: 1100px) {
  .sounding {
    display: block; position: fixed; left: 1.6rem; top: 6.5rem; bottom: 2.5rem; width: 3.4rem; z-index: 40;
    pointer-events: none; font-family: var(--mono); font-size: .68rem; color: var(--ink-muted);
  }
  body.is-deep .sounding { color: var(--mist); }
  .sounding .line { position: absolute; left: .9rem; top: 0; bottom: 0; width: 1px; background: currentColor; opacity: .35; }
  .sounding .tick { position: absolute; left: .55rem; display: flex; align-items: center; gap: .35rem; transform: translateY(-50%); }
  .sounding .tick::before { content: ''; width: .7rem; height: 1px; background: currentColor; opacity: .55; }
  .sounding .lead {
    position: absolute; left: .55rem; top: calc(var(--depth, 0) * 100%); transform: translateY(-50%);
    display: flex; align-items: center; gap: .45rem; color: var(--brass); transition: top .12s linear;
  }
  .sounding .lead::before { content: ''; width: .75rem; height: .75rem; border-radius: 2px 2px 50% 50%; background: var(--brass); box-shadow: 0 0 0 3px rgb(201 154 62 / .2); }
  .sounding .lead span { white-space: nowrap; font-weight: 500; margin-left: 1.5rem; padding: .1rem .35rem; border-radius: 3px; background: rgb(233 246 245 / .85); }
  body.is-deep .sounding .lead span { background: rgb(7 27 46 / .85); }
}

/* ── Sections ──────────────────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* The run: a real sequence, so it gets numbers. */
.run-steps { list-style: none; margin: 2.5rem 0 0; padding: 0; counter-reset: step; display: grid; gap: 0; border-left: 2px solid rgb(13 42 64 / .2); }
.run-steps li { counter-increment: step; position: relative; padding: 0 0 2rem 2.2rem; }
.run-steps li:last-child { padding-bottom: 0; }
.run-steps li::before {
  content: counter(step); position: absolute; left: -1rem; top: -.15rem; width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--mono); font-size: .85rem; font-weight: 500;
  background: var(--shallows); border: 2px solid var(--ink); color: var(--ink);
}
.run-steps li.gate::before { background: var(--port); border-color: var(--port); color: #fff; }
.run-steps h3 { margin-bottom: .3rem; }
.run-steps p { margin: 0; }

/* Modes: strata, each one deeper than the last. Not a card grid. */
.strata { margin-top: 2.8rem; display: grid; gap: 0; border-radius: 14px; overflow: hidden; box-shadow: var(--lift-3); }
.stratum { display: grid; grid-template-columns: 11rem minmax(0, 1fr) minmax(0, 15rem); gap: 1.5rem; padding: 1.8rem 2rem; align-items: start; }
.stratum:nth-child(1) { background: rgb(238 248 248 / .12); }
.stratum:nth-child(2) { background: rgb(7 27 46 / .25); }
.stratum:nth-child(3) { background: rgb(7 27 46 / .5); }
.stratum .mode { font-family: var(--mono); font-size: .95rem; color: var(--brass-light); }
.stratum .mode small { display: block; color: var(--mist); font-size: .78rem; margin-top: .2rem; }
.stratum h3 { margin-bottom: .35rem; }
.stratum p { margin: 0; }
.stratum .reach { font-size: .9rem; color: var(--mist); border-left: 1px solid rgb(238 248 248 / .2); padding-left: 1rem; }
@media (max-width: 800px) { .stratum { grid-template-columns: minmax(0, 1fr); gap: .6rem; } .stratum .reach { border-left: 0; padding-left: 0; } }

/* The deep: the isolation diagram. */
.descent { margin-top: 3rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; }
.descent .node { position: relative; padding: 1.4rem 1.2rem; border: 1px solid rgb(238 248 248 / .14); background: rgb(238 248 248 / .04); }
.descent .node + .node { border-left: 0; }
.descent .node:nth-child(2) { transform: translateY(1.5rem); background: rgb(238 248 248 / .06); }
.descent .node:nth-child(3) { transform: translateY(3rem); background: rgb(238 248 248 / .08); }
.descent .node:nth-child(4) { transform: translateY(4.5rem); background: rgb(201 154 62 / .1); border-color: rgb(201 154 62 / .45); }
.descent .where { font-family: var(--mono); font-size: .78rem; color: var(--brass-light); margin-bottom: .5rem; }
.descent h3 { font-size: 1.1rem; }
.descent p { font-size: .93rem; margin: 0; color: var(--mist); }
@media (max-width: 900px) { .descent { grid-template-columns: minmax(0, 1fr); } .descent .node, .descent .node + .node { transform: none; border-left: 1px solid rgb(238 248 248 / .14); border-top: 0; } .descent .node:first-child { border-top: 1px solid rgb(238 248 248 / .14); } }
.descent-notes { margin: 6.5rem 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.descent-notes li { border-top: 2px solid var(--brass); padding-top: 1rem; }
.descent-notes strong { display: block; font-family: var(--display); font-variation-settings: 'wdth' 110; font-size: 1.1rem; margin-bottom: .3rem; }
@media (max-width: 900px) { .descent-notes { grid-template-columns: minmax(0, 1fr); margin-top: 2.5rem; } }

/* Ledger: cost, budget, log. */
.ledger { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; margin-top: 2.5rem; align-items: start; }
@media (max-width: 900px) { .ledger { grid-template-columns: minmax(0, 1fr); } }
.budget { background: rgb(7 27 46 / .35); border: 1px solid rgb(238 248 248 / .12); border-radius: 12px; padding: 1.5rem; box-shadow: var(--lift-2); }
.budget .bar { height: .7rem; border-radius: 99px; background: rgb(238 248 248 / .1); overflow: hidden; margin: .8rem 0 .5rem; }
.budget .bar span { display: block; height: 100%; width: 82%; background: linear-gradient(90deg, var(--brass), #e0a447); }
.budget .row { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .8rem; color: var(--mist); }
.ledger-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.3rem; }
.ledger-list h3 { margin-bottom: .2rem; font-size: 1.1rem; }
.ledger-list p { margin: 0; color: var(--mist); }

/* Code panels (MCP etc.) */
.panel { background: #051526; color: #cfe3ea; border-radius: 12px; border: 1px solid rgb(238 248 248 / .1); box-shadow: var(--lift-3); overflow: hidden; }
.panel header { padding: .6rem 1rem; font-family: var(--mono); font-size: .76rem; color: var(--mist); border-bottom: 1px solid rgb(238 248 248 / .08); }
.panel pre { margin: 0; padding: 1rem 1.1rem; font-family: var(--mono); font-size: .8rem; line-height: 1.75; overflow-x: auto; }
.panel .c { color: #6f8fa0; }
.panel .s { color: var(--brass-light); }

/* Feature rows on inner pages: text + evidence side by side, alternating. */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-block: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid rgb(13 42 64 / .12); }
.dark .feature, .z-shelf .feature, .z-deep .feature, .z-abyss .feature { border-top-color: rgb(238 248 248 / .1); }
.feature:first-of-type { border-top: 0; }
.feature.flip > :first-child { order: 2; }
@media (max-width: 900px) { .feature { grid-template-columns: minmax(0, 1fr); } .feature.flip > :first-child { order: 0; } }
.feature ul { padding-left: 1.1rem; margin: 0; }
.feature li { margin-bottom: .45rem; max-width: 60ch; }
.sheet-static { position: relative; width: 100%; animation: none; transform: none; }
.tilt { transform: perspective(1200px) rotateY(-8deg) rotateX(4deg); }
.flip .tilt { transform: perspective(1200px) rotateY(8deg) rotateX(4deg); }
@media (max-width: 900px) { .tilt, .flip .tilt { transform: none; } }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .5rem 1.2rem; margin: 0; padding: 1rem 1.1rem; font-size: .88rem; }
.kv dt { font-family: var(--mono); font-size: .78rem; color: var(--ink-muted); padding-top: .15rem; }
.kv dd { margin: 0; }

/* Pricing */
.plans { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 0; margin-top: 2.5rem; border-radius: 16px; overflow: hidden; box-shadow: var(--lift-3); }
@media (max-width: 860px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan { padding: 2.2rem; }
.plan-free { background: var(--shallows); color: var(--ink); }
.plan-full { background: var(--deep); color: var(--foam); }
.plan .price { font-family: var(--display); font-variation-settings: 'wdth' 120; font-weight: 750; font-size: 3rem; line-height: 1; margin: .4rem 0 .2rem; }
.plan .price small { font-size: 1rem; font-weight: 500; font-variation-settings: 'wdth' 100; }
.plan ul { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .55rem; }
.plan li { padding-left: 1.4rem; position: relative; }
.plan li::before { content: ''; position: absolute; left: 0; top: .62em; width: .6rem; height: 2px; background: var(--brass); }
.faq { margin-top: 3rem; display: grid; gap: 1.6rem; max-width: 72ch; }
.faq h3 { font-size: 1.12rem; margin-bottom: .3rem; }
.faq p { margin: 0; }

/* Company */
.leader { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; margin-top: 2.5rem; }
@media (max-width: 760px) { .leader { grid-template-columns: minmax(0, 1fr); } }
.portrait { border-radius: 12px; overflow: hidden; box-shadow: var(--lift-3); background: var(--deep); aspect-ratio: 3 / 4; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.leader .role { font-family: var(--mono); font-size: .88rem; color: var(--brass-light); margin: -.2rem 0 1rem; }
.facts { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 2rem; font-size: .93rem; color: var(--mist); }
@media (max-width: 560px) { .facts { grid-template-columns: minmax(0, 1fr); } }

/* Family tree: qubicfold at the root, the products branching off it. */
.tree { margin-top: 2.6rem; position: relative; padding-left: 1.6rem; }
.tree::before { content: ''; position: absolute; left: .45rem; top: 2.2rem; bottom: 1.4rem; width: 2px; background: rgb(238 248 248 / .2); }
.tree .root { display: inline-flex; align-items: baseline; gap: .6rem; margin-left: -1.6rem; padding: .7rem 1rem; border: 1px solid rgb(201 154 62 / .5); border-radius: 10px; background: rgb(201 154 62 / .08); text-decoration: none; }
.tree .root .mono { color: var(--brass-light); }
.tree ul { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .25rem; }
.tree li { position: relative; padding: .55rem 0 .55rem 1rem; display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; align-items: baseline; }
.tree li::before { content: ''; position: absolute; left: -1.15rem; top: 1.25rem; width: 1.6rem; height: 2px; background: rgb(238 248 248 / .2); }
.tree li.here::before { background: var(--brass); }
.tree li a { font-family: var(--mono); font-size: .95rem; text-decoration: none; }
.tree li a:hover { text-decoration: underline; text-decoration-color: var(--brass); }
.tree li.here a { color: var(--brass-light); }
.tree li span { color: var(--mist); font-size: .93rem; }
@media (max-width: 640px) { .tree li { grid-template-columns: minmax(0, 1fr); gap: .1rem; } }

/* Closing call to action on the floor */
.closing { text-align: left; }
.closing h2 { max-width: 18ch; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer { background: #041222; color: var(--mist); padding: 3.5rem 0 2.5rem; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.site-footer h2 { font-size: .95rem; font-variation-settings: 'wdth' 106; color: var(--foam); margin-bottom: .8rem; font-weight: 600; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--foam); text-decoration: underline; text-decoration-color: var(--brass); }
.site-footer .brand { color: var(--foam); margin-bottom: .8rem; }
.fineprint { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid rgb(238 248 248 / .08); display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; font-size: .84rem; }

/* Inner-page heads */
.page-head { padding-top: clamp(3.5rem, 7vw, 6rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 4.2rem); max-width: 16ch; }

.not-found { min-height: 70vh; display: grid; align-content: center; }

/* ── Illustrations (Nano Banana, art/source) ───────────────────────────── */
.head-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 900px) { .head-split { grid-template-columns: minmax(0, 1fr); } }
.art { margin: 0; position: relative; z-index: 2; border-radius: 14px; overflow: hidden; box-shadow: var(--lift-3); outline: 1px solid rgb(201 154 62 / .35); outline-offset: -1px; }
.art img { width: 100%; height: auto; }
/* Hangs down past its band into the next one: the layers overlap, so the page has depth. */
.art-drop { margin-bottom: -9rem; }
@media (max-width: 900px) { .art-drop { margin-bottom: 0; max-width: 22rem; } }
.page-head .art-drop { margin-bottom: -12rem; }
.art-bell { max-width: 19rem; justify-self: end; }
@media (max-width: 900px) { .art-bell { justify-self: start; } }

/* The hero sits in the shallows: the generated light-through-water, faded under the chart table. */
.hero.z-surface {
  background:
    linear-gradient(180deg, rgb(233 246 245 / .72) 0%, rgb(220 239 240 / .55) 45%, rgb(185 221 227 / .92) 88%, var(--shoal) 100%),
    image-set(url('../img/hero-shallows-1600.webp') 1x) center 35% / cover no-repeat,
    var(--shallows);
}
@media (max-width: 960px) { .hero.z-surface { background: linear-gradient(180deg, rgb(233 246 245 / .78), rgb(185 221 227 / .92)), url('../img/hero-shallows-960.webp') center / cover no-repeat, var(--shallows); } }
.tree + p { margin-top: 2.2rem; }
html, body { overflow-x: clip; }
.wrap > *, .feature > *, .split > *, .hero-grid > * { min-width: 0; }
