/* Hydrobase landing page (mock-up). Self-contained so it can move to its own
   host: the app's field-guide tokens are copied here, not imported.
   Editorial book spreads: photographs anchor each section (toned, matted,
   with a grain overlay), text swings between very large serif lines and
   small mono labels, and a contact-sheet index tracks the reader. Motion is
   switched off for prefers-reduced-motion. */

:root {
  --canvas: #f4f1e9;
  --raised: #fffefa;
  --subtle: #ecede5;
  --selected: #e5ebdc;
  --text: #252b26;
  --text-secondary: #60675e;
  --text-inverse: #fffefa;
  --action: #425c46;
  --action-hover: #304633;
  --focus: #286aa6;
  --separator: #d3d6ca;
  --boundary: #899080;
  --ochre: #c27c1a;
  --deep: #161b17;

  --font-sans:
    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif:
    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:
    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --page: 1320px;
  --gutter: 48px;
  --rail: 0px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

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

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.mono {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.serif {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}

/* The second voice: the same face, light. No italics, no second font. */
.serif .line.light span,
.serif em {
  font-weight: 300;
  font-style: normal;
}

.giant {
  font-size: clamp(56px, 8.6vw, 150px);
}

.big {
  font-size: clamp(40px, 5.2vw, 84px);
}

.mid {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.05;
}

.small {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 30em;
}

/* ------------------------------------------------------------ photos */

/* Every photograph: toned in the file, grain laid over here (a 256 px tile,
   neutral grey under an overlay blend). */
.photo {
  position: relative;
  overflow: hidden;
  background: var(--subtle);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('photos/grain.png');
  mix-blend-mode: overlay;
  opacity: 0.3;
  pointer-events: none;
}

/* Full-bleed photographs carry text: a shade where it sits. */
.anywhere > .photo::before,
.pilot > .photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.anywhere > .photo::before {
  background: linear-gradient(180deg, #161b1700 35%, #161b1799 100%);
}

.pilot > .photo::before {
  background: linear-gradient(
    90deg,
    #161b17b3 0%,
    #161b1766 50%,
    #161b17cc 100%
  );
}

.mat {
  background: var(--raised);
  padding: 14px;
  box-shadow:
    0 1px 0 #252b260f,
    0 18px 40px #252b261a;
}

.mat .photo {
  height: 100%;
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--raised);
  color: var(--text);
  padding: 3px 7px;
}

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

.masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--gutter);
  pointer-events: none;
  color: var(--text);
  transition:
    background 0.3s,
    box-shadow 0.3s;
}

.masthead.scrolled {
  background: #f4f1e9e8;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--separator);
  pointer-events: auto;
}

.masthead a {
  pointer-events: auto;
  text-decoration: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 26px;
  line-height: 1;
  text-decoration: none;
}

.brand svg {
  width: 24px;
  height: 24px;
}

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav a {
  transition: opacity 0.2s;
}

.nav a:hover {
  opacity: 0.65;
}

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

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: var(--text-inverse);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 14px 24px;
  border-radius: 999px;
  transition:
    background 0.2s,
    transform 0.3s var(--ease);
}

.button:hover {
  background: var(--action);
  transform: translateY(-2px);
}

.button svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--ease);
}

.button:hover svg {
  transform: translateX(4px);
}

.link {
  font-size: 15px;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

/* ------------------------------------------------------------ hero spread */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  overflow: hidden;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 112px var(--gutter) 48px;
  gap: 48px;
}

.hero-left .top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.hero h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.hero h1 .line span {
  display: block;
}

.hero-foot {
  display: grid;
  gap: 24px;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
}

.hero-right {
  position: relative;
  min-height: 100%;
}

.hero-right .photo {
  position: absolute;
  /* One pixel past the right edge: on widths where the photo starts at a
     half pixel its edge would otherwise round short of the window. */
  inset: 0 -1px 0 0;
}

.hero-right .blur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1.6s var(--ease);
}

.hero.ready .hero-right .blur {
  opacity: 0;
}

.hero-right .labels {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  z-index: 2;
}

.floating {
  position: absolute;
  left: 50%;
  top: 46%;
  width: clamp(160px, 19vw, 300px);
  transform: translate(-50%, calc(-50% + var(--lift, 0px)));
  z-index: 5;
  pointer-events: none;
}

.floating img {
  filter: drop-shadow(0 30px 30px #161b1740);
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-14px) rotate(-1deg);
  }
}

/* ------------------------------------------------------------ statement */

.statement {
  padding: 22vh 0;
  text-align: center;
}

.statement .serif {
  max-width: 15em;
  margin: 0 auto;
}

.statement .mono {
  display: block;
  margin-bottom: 36px;
}

.count {
  font-variant-numeric: tabular-nums;
}

.figures-row {
  display: flex;
  justify-content: center;
  gap: clamp(32px, 7vw, 120px);
  margin-top: 72px;
  flex-wrap: wrap;
}

.figures-row div {
  display: grid;
  gap: 8px;
}

.figures-row .serif {
  font-size: clamp(44px, 5vw, 76px);
}

/* ------------------------------------------------------------ the flow */

.flow {
  position: relative;
  padding-bottom: 8vh;
}

.flow-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  padding-bottom: 6vh;
}

.flow-body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 64px;
}

/* The river spine: a torn strip of the hero's river, sticky, panning as the
   reader moves through the steps; the marker shows the current step. */
.spine {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  padding: 88px 0 32px;
}

.spine-strip {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.spine-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% var(--pan, 0%);
}

.spine-steps {
  position: absolute;
  top: 88px;
  bottom: 32px;
  left: 0;
  right: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.spine-steps a {
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-66px);
  text-decoration: none;
}

.spine-steps span {
  width: 54px;
  text-align: right;
  transition: color 0.3s;
}

.spine-steps i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--text);
  background: var(--canvas);
  transition:
    background 0.3s,
    transform 0.3s var(--ease);
}

.spine-steps .on span {
  color: var(--text);
}

.spine-steps .on i {
  background: var(--text);
  transform: scale(1.4);
}

.step {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 28px;
  min-height: 100vh;
  align-content: center;
  padding: 10vh 0;
  position: relative;
}

.step-num {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--text);
  padding-top: 12px;
  margin-bottom: 28px;
}

.step-copy {
  grid-column: 1 / span 4;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-self: start;
}

.step-art {
  grid-column: 5 / span 8;
  position: relative;
}

.step.flip .step-copy {
  grid-column: 9 / span 4;
  order: 2;
}

.step.flip .step-art {
  grid-column: 1 / span 8;
  order: 1;
}

.points {
  list-style: none;
  border-top: 1px solid var(--separator);
}

.points li {
  font-size: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--separator);
  display: grid;
  grid-template-columns: 26px 1fr;
}

.points li::before {
  content: '—';
  color: var(--boundary);
}

.soon {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ochre);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 1px 6px;
  margin-left: 6px;
  white-space: nowrap;
}

/* Step art: one anchor photograph with product pieces laid over it,
   offset like a collage. */
.collage {
  position: relative;
  min-height: 600px;
}

.collage > * {
  position: absolute;
}

.mock {
  background: var(--raised);
  border: 1px solid var(--separator);
  border-radius: 6px;
  box-shadow: 0 24px 60px #252b2626;
  font-size: 13px;
}

.mock-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--separator);
}

.mock-body {
  padding: 14px;
}

/* 01 Bring everything */
.c-bring .strata {
  left: 0;
  top: 0;
  width: 40%;
}

.c-bring .strata img {
  filter: drop-shadow(0 20px 26px #252b2630);
}

.c-bring .files {
  right: 0;
  top: 6%;
  width: 62%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.file {
  background: var(--raised);
  border: 1px solid var(--separator);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  box-shadow: 0 10px 24px #252b2614;
  font-size: 12px;
  color: var(--text-secondary);
}

.file b {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.file .ext {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  height: 42px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 5px;
  color: var(--text-inverse);
  border-radius: 2px 9px 2px 2px;
}

.c-bring .ingest {
  right: 4%;
  bottom: 2%;
  width: 50%;
}

.bar {
  height: 4px;
  background: var(--subtle);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}

.bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--action);
  transform-origin: left;
}

.ingest-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--separator);
  font-size: 12.5px;
}

.ingest-row .bar {
  grid-column: 1 / -1;
}

/* 02 Ask */
.c-ask .well {
  left: 0;
  top: 0;
  width: 60%;
  aspect-ratio: 1.42;
}

.c-ask .chat {
  right: 0;
  top: 24%;
  width: 56%;
}

.typed {
  display: block;
  background: var(--text);
  color: var(--text-inverse);
  border-radius: 14px 14px 3px 14px;
  padding: 9px 12px;
  margin-left: auto;
  width: fit-content;
  max-width: 92%;
  min-height: 2.4em;
}

.typed::after {
  content: '▍';
  opacity: 0.6;
  animation: caret 1s steps(1) infinite;
}

.typed.done::after {
  display: none;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.reply {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.cite {
  background: var(--selected);
  border-bottom: 1.5px solid var(--action);
  padding: 0 3px;
  border-radius: 2px;
  font-weight: 600;
}

/* 04: the number in the report still shows where it came from, the same
   row as step 02's answer. */
.src-tag {
  justify-self: start;
  margin-top: -4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.03em;
  color: var(--focus);
  border-left: 1.5px solid var(--focus);
  padding: 1px 0 1px 8px;
}

.sources {
  border: 1px solid var(--separator);
  border-radius: 4px;
  overflow: hidden;
}

.sources table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.sources th,
.sources td {
  text-align: left;
  padding: 5px 8px;
  border-bottom: 1px solid var(--separator);
  white-space: nowrap;
}

.sources th {
  background: var(--subtle);
  font-weight: 500;
  color: var(--text-secondary);
}

.sources tr.hit td {
  background: var(--selected);
}

/* The row the answer's number came from, outlined inside the table. */
.sources tr.hit {
  outline: 1.5px solid var(--focus);
  outline-offset: -1.5px;
}

.table-scroll {
  overflow-x: auto;
}

.note-title {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.1;
}

.comment {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  padding: 9px 0 0;
  margin-top: 9px;
  border-top: 1px solid var(--separator);
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9.5px;
  background: var(--subtle);
  border: 1px solid var(--separator);
}

.avatar.green {
  background: var(--selected);
}

/* 05 Deliver */
.c-deliver .versions-card {
  left: 6%;
  bottom: 0;
  width: 40%;
}

.c-deliver .cover {
  right: 0;
  top: 0;
  width: 46%;
}

.versions {
  list-style: none;
}

.versions li {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 8px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid var(--separator);
  font-size: 12.5px;
}

.versions li.current {
  font-weight: 600;
}

.badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--subtle);
  color: var(--text-secondary);
}

.badge.ai {
  background: #f4e9ce;
  color: #805b18;
}

.cover {
  aspect-ratio: 8.5 / 11;
  background: var(--raised);
  border: 1px solid var(--separator);
  box-shadow: 0 24px 60px #252b2626;
  padding: 9% 9% 7%;
  display: flex;
  flex-direction: column;
  gap: 7%;
}

.cover .rule {
  height: 3px;
  background: var(--action);
  width: 40%;
}

.cover h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(18px, 1.9vw, 26px);
  line-height: 1.05;
}

.cover img {
  margin-top: auto;
  border: 1px solid var(--separator);
  cursor: zoom-in;
}

/* ------------------------------------------------------------ anywhere */

.anywhere {
  position: relative;
  min-height: 110vh;
  display: grid;
  align-items: end;
  color: var(--text-inverse);
  overflow: hidden;
}

.anywhere > .photo {
  position: absolute;
  inset: 0;
}

.anywhere > .photo img {
  transform: scale(var(--zoom, 1.12));
}

.anywhere-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 28px;
  align-items: end;
  padding-top: 20vh;
  padding-bottom: 12vh;
}

.anywhere-copy {
  grid-column: 1 / span 6;
  display: grid;
  gap: 22px;
  text-shadow: 0 2px 30px #161b1799;
}

.anywhere-copy .mono,
.anywhere-copy .small {
  color: #f4f1e9;
}

.phone {
  grid-column: 9 / span 4;
  justify-self: end;
  width: 270px;
  border: 9px solid var(--deep);
  border-radius: 38px;
  background: var(--canvas);
  color: var(--text);
  overflow: hidden;
  box-shadow: 0 40px 80px #161b1766;
}

.phone .bar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--separator);
  background: var(--raised);
}

.phone .bar-top b {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 20px;
}

.phone .screen {
  padding: 12px;
  display: grid;
  gap: 10px;
  font-size: 12px;
}

.phone .bubble {
  justify-self: end;
  background: var(--text);
  color: var(--text-inverse);
  border-radius: 12px 12px 2px 12px;
  padding: 7px 10px;
  max-width: 85%;
}

.phone .answer {
  background: var(--raised);
  border: 1px solid var(--separator);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  gap: 8px;
}

/* ------------------------------------------------------------ outputs */

/* The contact sheet: frames on a dark strip; the chosen one is ringed as
   with a grease pencil and opens large below. */
.sheet {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  background: var(--deep);
  padding: 16px 16px 12px;
  margin-bottom: 28px;
}

.sheet button {
  position: relative;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: #b9bfb3;
  font: inherit;
}

.sheet img {
  aspect-ratio: 1.6;
  object-fit: cover;
  width: 100%;
  filter: grayscale(0.45) brightness(0.85);
  transition: filter 0.4s;
}

.sheet button:hover img,
.sheet button[aria-selected='true'] img {
  filter: none;
}

.sheet .frame {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 7px;
}

.sheet .ring {
  position: absolute;
  left: -7px;
  right: -7px;
  top: -8px;
  height: calc(100% - 6px);
  pointer-events: none;
  opacity: 0;
  overflow: visible;
}

.sheet button[aria-selected='true'] .ring {
  opacity: 1;
}

.sheet .ring path {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
}

.sheet button[aria-selected='true'] .ring path {
  animation: draw 0.9s var(--ease) forwards;
}

.sheet .progress {
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: #f2d9a0;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.viewer img {
  width: 100%;
  cursor: zoom-in;
  transition:
    opacity 0.45s,
    filter 0.45s;
}

.viewer img.out {
  opacity: 0;
  filter: blur(8px);
}

.viewer-note {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ------------------------------------------------------------ checked */

.checked {
  padding: 12vh 0 10vh;
  border-top: 1px solid var(--text);
}

.checked-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: min(16vh, 140px);
}

.checked-head > div {
  grid-column: 1 / span 8;
  display: grid;
  gap: 22px;
}

.checked-head .small {
  grid-column: 9 / span 4;
  align-self: end;
}

.notes {
  list-style: none;
  counter-reset: note;
}

.notes li {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 28px;
  padding: 14px 0;
  border-top: 1px solid var(--separator);
  align-items: baseline;
}

.notes li::before {
  counter-increment: note;
  content: '0' counter(note);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.notes h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.05;
}

.notes p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ------------------------------------------------------------ who */

.who {
  padding: 14vh 0 0;
  border-top: 1px solid var(--text);
}

.who-head {
  display: grid;
  gap: 22px;
  margin-bottom: 64px;
}

.roles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--text);
}

.roles div {
  padding: 18px 18px 30px 0;
  border-bottom: 1px solid var(--separator);
  display: grid;
  gap: 6px;
  align-content: start;
}

.roles dt {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.05;
}

.roles dd {
  font-size: 13.5px;
  color: var(--text-secondary);
}

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--text);
  margin-top: 72px;
  padding: 18px 0;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  gap: 48px;
  padding-left: 48px;
  animation: slide 46s linear infinite;
}

.marquee span {
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.4vw, 52px);
  line-height: 1.1;
}

.marquee span:nth-child(even) {
  color: var(--text-secondary);
}

@keyframes slide {
  to {
    transform: translateX(-50%);
  }
}

/* Teams: the sentence at a mid display size beside its paragraph, both
   from the same top line, so they read as one statement. */
.firm {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 28px;
  padding: 88px 0 14vh;
  align-items: start;
}

.firm .serif {
  grid-column: 1 / span 7;
  font-size: clamp(30px, 3.4vw, 52px);
  line-height: 1.08;
  max-width: 18ch;
  text-wrap: balance;
}

.firm .small {
  grid-column: 8 / span 5;
  padding-top: 0.5em;
  font-size: 16px;
  line-height: 1.6;
  max-width: 44ch;
}

/* ------------------------------------------------------------ pilot */

.pilot {
  position: relative;
  min-height: 100vh;
  color: var(--text-inverse);
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--deep);
}

.pilot > .photo {
  position: absolute;
  inset: 0;
  background: var(--deep);
}

.pilot-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 28px;
  padding: 16vh var(--gutter);
  max-width: var(--page);
  margin: 0 auto;
  width: 100%;
}

.pilot .mono {
  color: #c9cfc2;
}

.pilot-title {
  grid-column: 1 / span 7;
  display: grid;
  gap: 28px;
  align-content: start;
}

.pilot-side {
  grid-column: 9 / span 4;
  display: grid;
  gap: 26px;
  align-content: end;
}

.steps {
  list-style: none;
  border-top: 1px solid #fffefa40;
}

.steps li {
  display: grid;
  grid-template-columns: 40px 1fr;
  padding: 13px 0;
  border-bottom: 1px solid #fffefa40;
  font-size: 15px;
}

.steps li span:first-child {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #c9cfc2;
  padding-top: 3px;
}

.pilot .button {
  background: var(--canvas);
  color: var(--text);
  justify-self: start;
}

.pilot .button:hover {
  background: var(--selected);
}

.pilot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* The second choice: outlined on the dark photo, the pilot stays first. */
.pilot .button.ghost {
  background: transparent;
  color: #fffefa;
  box-shadow: inset 0 0 0 1px #fffefa99;
}

.pilot .button.ghost:hover {
  background: #fffefa1a;
}

.pilot .fine {
  font-size: 13px;
  color: #c9cfc2;
}

/* ------------------------------------------------------------ index rail */

/* The contact-sheet index: one frame per section, fixed at the right edge
   on wide screens; the current section's frame is lit and outlined. */
.rail {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  padding: 6px;
  background: #fffefae6;
  border: 1px solid var(--separator);
  backdrop-filter: blur(6px);
}

.rail a {
  position: relative;
  display: block;
  width: 44px;
  height: 32px;
  opacity: 0.45;
  filter: grayscale(1);
  transition:
    opacity 0.3s,
    filter 0.3s,
    width 0.4s var(--ease);
}

.rail a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rail a span {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: var(--text);
  color: var(--text-inverse);
  padding: 3px 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.rail a:hover span,
.rail a:focus-visible span {
  opacity: 1;
}

.rail a.on {
  opacity: 1;
  filter: none;
  width: 58px;
  outline: 1.5px solid var(--text);
  outline-offset: 1px;
}

@media (min-width: 1180px) {
  .rail {
    display: flex;
  }

  :root {
    --rail: 80px;
  }

  /* The rail's room comes out of the content, never the full-bleed photos. */
  .wrap,
  .pilot-inner {
    padding-right: calc(var(--gutter) + var(--rail));
  }

  .masthead {
    padding-right: calc(var(--gutter) + var(--rail));
  }
}

/* ------------------------------------------------------------ zoom */

dialog.zoom {
  border: 0;
  padding: 0;
  max-width: min(1300px, 95vw);
  max-height: 94vh;
  margin: auto;
  background: var(--raised);
  box-shadow: 0 20px 60px #0006;
}

dialog.zoom::backdrop {
  background: #161b17e6;
}

dialog.zoom img {
  max-height: 90vh;
  width: auto;
  margin: 0 auto;
}

dialog.zoom button {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid var(--separator);
  background: var(--raised);
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* ------------------------------------------------------------ motion */

/* Elements arrive with a short motion blur: offset, blurred and faded,
   settling as they enter the viewport. Only with JS (the class on <html>),
   so nothing is hidden without it. */
.js .in-view {
  opacity: 0;
  transform: translate3d(0, 36px, 0);
  filter: blur(10px);
  transition:
    opacity 0.9s var(--ease),
    transform 1.1s var(--ease),
    filter 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}

.js .in-view.seen {
  opacity: 1;
  transform: none;
  filter: none;
}

.js .hero h1 .line span {
  transform: translateY(110%);
  transition: transform 1.2s var(--ease);
  transition-delay: var(--d, 0s);
}

.js .hero.ready h1 .line span {
  transform: none;
}

.js .settle {
  opacity: 0;
  transform: translateY(-40px) rotate(var(--r, -8deg));
  transition:
    opacity 0.6s var(--ease),
    transform 0.9s cubic-bezier(0.3, 1.4, 0.4, 1);
  transition-delay: var(--d, 0s);
}

.js .seen .settle {
  opacity: 1;
  transform: none;
}

.js .bar i {
  transform: scaleX(0);
  transition: transform 1.6s var(--ease);
  transition-delay: var(--d, 0.4s);
}

.js .seen .bar i {
  transform: scaleX(var(--w, 1));
}

.js .reply {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.6s,
    transform 0.6s var(--ease);
}

.js .reply.show {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .in-view,
  .js .settle,
  .js .reply,
  .js .hero h1 .line span {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .js .bar i {
    transform: scaleX(var(--w, 1));
  }

  .hero-right .blur {
    display: none;
  }
}

/* ------------------------------------------------------------ narrow */

@media (max-width: 1020px) {
  :root {
    --gutter: 28px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-right {
    height: 72vh;
    order: -1;
  }

  .hero-left {
    padding-top: 40px;
  }

  .floating {
    top: 72vh;
    left: 74%;
  }

  .flow-body {
    grid-template-columns: 1fr;
  }

  .spine {
    display: none;
  }

  .step-copy,
  .step-art,
  .step.flip .step-copy,
  .step.flip .step-art {
    grid-column: 1 / -1;
    order: 0;
  }

  .step {
    min-height: 0;
  }

  .roles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .anywhere-copy,
  .phone,
  .pilot-title,
  .pilot-side,
  .checked-head > div,
  .checked-head .small,
  .firm .serif,
  .firm .small {
    grid-column: 1 / -1;
  }

  .phone {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 16px;
  }

  .nav a:not(.signin) {
    display: none;
  }

  .hero-left .top span:last-child {
    display: none;
  }

  .hero-right {
    height: 56vh;
  }

  .floating {
    top: 56vh;
    width: 150px;
  }

  .hero-right .labels span:last-child {
    display: none;
  }

  .flow-head {
    grid-template-columns: 1fr;
  }

  .statement {
    padding: 14vh 0;
  }

  /* Collages stack: each piece in the flow, overlapping a little. */
  .collage {
    min-height: 0;
    display: grid;
  }

  .collage > * {
    position: relative;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: 100% !important;
  }

  .collage > * + * {
    margin-top: -28px;
    margin-left: 18px;
    width: calc(100% - 18px) !important;
  }

  .c-bring .strata {
    width: 70% !important;
  }

  .c-bring .files {
    grid-template-columns: 1fr;
  }

  .c-deliver .stone {
    width: 60% !important;
  }

  .c-deliver .cover {
    width: 80% !important;
  }

  .sheet {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notes li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .roles {
    grid-template-columns: 1fr;
  }

  .anywhere {
    min-height: 0;
  }

  .anywhere-inner {
    padding-top: 30vh;
  }

  .phone {
    width: 100%;
    max-width: 290px;
  }

  .viewer-note {
    flex-direction: column;
    gap: 4px;
  }
}

/* ============================================================ v2 additions */

/* Cover: the stone as an annotated specimen. Leader lines draw out to the
   sample, its result and its source row once the cover has loaded. */
.specimen {
  position: relative;
  animation: bob 7s ease-in-out infinite;
}

.leaders {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.leaders path {
  fill: none;
  stroke: var(--raised);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.9s var(--ease) var(--d, 0s);
}

.hero.ready .leaders path {
  stroke-dashoffset: 0;
}

.specimen .note {
  position: absolute;
  left: 106%;
  transform: translateY(-50%);
  display: grid;
  gap: 1px;
  white-space: nowrap;
  background: var(--raised);
  padding: 5px 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0;
  transition:
    opacity 0.6s var(--ease) var(--d, 0s),
    transform 0.6s var(--ease) var(--d, 0s);
}

.specimen .note b {
  color: var(--text);
  font-weight: 500;
}

.hero.ready .specimen .note {
  opacity: 1;
}

/* The river spine as drone footage: the full aerial photograph, flown
   down as you scroll (pan, slow push in, gentle banking on the bends),
   with a small flight read-out. */
.spine-strip.photo img {
  position: absolute;
  left: 50%;
  top: 0;
  width: auto;
  height: 170%;
  max-width: none;
  object-fit: fill;
  transform: translate3d(-50%, var(--ty, 0%), 0) scale(var(--fly, 1.08))
    rotate(var(--bank, 0deg));
  transform-origin: 50% 30%;
  will-change: transform;
}

.spine-strip {
  animation: hover-drift 9s ease-in-out infinite;
}

@keyframes hover-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -4px, 0);
  }
}

.hud {
  position: absolute;
  left: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fffefa;
  text-shadow: 0 1px 4px #161b1799;
}

.hud.top {
  top: 8px;
}

.hud.bottom {
  bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.hud i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e0533f;
  animation: caret 1.6s steps(1) infinite;
}

/* 01 Bring everything: every format, and the workspace it lands in. */
.c-bring {
  min-height: 680px;
}

.formats {
  grid-column: 1 / -1;
  margin-top: 4px;
  line-height: 1.7;
}

.c-bring .ingest {
  right: 0;
  bottom: 0;
  width: 46%;
}

.c-bring .team {
  left: 4%;
  bottom: 2%;
  width: 44%;
  z-index: 2;
}

.team-title {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.1;
  margin-bottom: 8px;
}

.people {
  list-style: none;
}

.people li {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--separator);
  font-size: 12.5px;
}

.people i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.team-note {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--action);
  font-weight: 500;
}

/* 02 Ask, in the app's own chat colors: a sage question, a white answer
   card with a hairline border, 10 px corners (frontend/style.css). */
.app-chat {
  background: var(--canvas);
  border: 1px solid var(--separator);
  border-radius: 10px;
  box-shadow: 0 24px 60px #252b2626;
  font-size: 13px;
  overflow: hidden;
}

.app-chat-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--separator);
  background: var(--raised);
}

.app-chat-body {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.user-msg {
  display: flex;
  justify-content: flex-end;
}

.typed {
  background: var(--selected);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  max-width: 85%;
  min-height: 2.6em;
  margin: 0;
}

.answer-card {
  margin-top: 0;
  background: var(--raised);
  border: 1px solid var(--separator);
  border-radius: 10px;
  padding: 14px;
}

/* 03 Chart once: the builder dialog, as in the app, and what it produces. */
/* Step 03 runs full width: the copy across the top, the builder below it
   at a size where its preview reads. */
.step.wide .step-copy {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  column-gap: 56px;
  row-gap: 18px;
  margin-bottom: 20px;
}

.step.wide .step-copy h3 {
  grid-row: span 2;
}

.step.wide .step-art {
  grid-column: 1 / -1;
}

.methods {
  list-style: none;
  display: grid;
  gap: 4px;
}

.methods li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid var(--separator);
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.3s,
    border-color 0.3s;
}

.methods li i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--boundary);
  flex: none;
  transition: border 0.3s;
}

.methods li.on {
  background: var(--selected);
  border-color: var(--action);
}

.methods li.on i {
  border: 3.5px solid var(--action);
}

.check {
  display: flex;
  align-items: center;
  gap: 7px;
}

.check i {
  font-style: normal;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--action);
  color: var(--text-inverse);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-frame {
  border: 1px solid var(--separator);
  overflow: hidden;
}

.preview-frame img {
  width: 100%;
  cursor: zoom-in;
  transition:
    opacity 0.3s,
    filter 0.3s;
}

.preview-frame img.out {
  opacity: 0.15;
  filter: blur(6px);
}

.outputs {
  grid-column: 1 / -1;
  margin-top: 56px;
}

.outputs-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--text);
  padding-top: 12px;
  margin-bottom: 16px;
}

.plate {
  background: var(--raised);
  padding: 16px;
  box-shadow: 0 24px 60px #252b2620;
}

/* 04 Write and review: the built-in editor, people on the page, notes in
   the margin. */
.c-write {
  min-height: 640px;
}

.c-write .review {
  left: 0;
  top: 0;
  width: 34%;
  aspect-ratio: 0.8;
}

.present {
  display: flex;
}

.present .avatar {
  margin-left: -6px;
  border: 2px solid var(--canvas);
  width: 26px;
  height: 26px;
}

.doc mark {
  background: #f4e9ce;
  color: inherit;
  padding: 0 2px;
}

/* A collaborator's cursor, with their initials. */
.caret {
  position: relative;
  display: inline-block;
  width: 2px;
  height: 1.15em;
  vertical-align: text-bottom;
  margin: 0 1px;
  animation: caret 1.2s steps(1) infinite;
}

.caret b {
  position: absolute;
  bottom: 100%;
  left: 0;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  color: #fff;
  padding: 0 3px;
  border-radius: 2px 2px 2px 0;
  line-height: 1.4;
}

.caret.hg,
.caret.hg b {
  background: var(--action);
}

.caret.pm,
.caret.pm b {
  background: #7b5bc0;
}

.margin {
  display: grid;
  gap: 8px;
  align-content: start;
}

.margin-note {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 8px;
  background: var(--canvas);
  border: 1px solid var(--separator);
  border-radius: 8px;
  padding: 8px;
  font-size: 11.5px;
  line-height: 1.4;
}

.margin-note.ai {
  background: #fbf4e2;
  border-color: #ecd9a8;
}

.margin-note .badge {
  align-self: start;
  justify-self: center;
}

.mini-actions {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

.mini-actions b {
  color: var(--action);
  margin-right: 8px;
}

/* 05 Deliver: the AI suggestion beside the versions and the cover. */
.c-deliver .ai-card {
  left: 0;
  top: 2%;
  width: 40%;
}

.ai-card p {
  margin-bottom: 8px;
}

.ai-card img {
  border: 1px solid var(--separator);
}

.choices {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
}

.choices span {
  border: 1px solid var(--boundary);
  border-radius: 6px;
  padding: 3px 10px;
}

.choices .accept {
  background: var(--action);
  border-color: var(--action);
  color: var(--text-inverse);
}

/* Anywhere: a tablet with the report, the phone with a quick answer. */
.anywhere > .photo::after {
  opacity: 0.16;
}

.devices {
  grid-column: 7 / span 6;
  position: relative;
  min-height: 480px;
}

.tablet {
  position: absolute;
  right: 120px;
  top: 0;
  width: min(100%, 540px);
  aspect-ratio: 4 / 3;
  border: 12px solid var(--deep);
  border-radius: 26px;
  background: var(--canvas);
  color: var(--text);
  overflow: hidden;
  box-shadow: 0 40px 80px #161b1766;
}

.tablet-screen {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  font-size: 12px;
}

.tablet-doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
  padding: 14px;
  background: var(--raised);
  line-height: 1.5;
}

.tablet-doc h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 20px;
  margin-bottom: 4px;
}

.tablet-doc img {
  margin-top: 8px;
  border: 1px solid var(--separator);
}

.devices .phone {
  position: absolute;
  right: 0;
  bottom: -40px;
  width: 230px;
}

.phone .bubble {
  background: var(--selected);
  color: var(--text);
  border-radius: 10px;
}

.phone .answer {
  border-radius: 10px;
}

@media (max-width: 1020px) {
  .step.wide .step-copy {
    grid-template-columns: 1fr;
  }

  .step.wide .step-copy h3 {
    grid-row: auto;
  }

  .devices {
    grid-column: 1 / -1;
    min-height: 460px;
    margin-top: 32px;
  }

  .floating {
    top: 40vh;
    left: 22%;
    width: 170px;
  }
}

@media (max-width: 720px) {
  .tablet-doc {
    grid-template-columns: 1fr;
  }

  .floating {
    top: 22vh;
    left: 6%;
    width: 120px;
  }

  .specimen .note {
    white-space: normal;
    width: 170px;
    font-size: 9px;
  }

  .devices {
    min-height: 420px;
  }

  .tablet {
    right: 60px;
    width: 300px;
    border-width: 8px;
  }

  .tablet-doc .margin-note {
    display: none;
  }

  .devices .phone {
    width: 170px;
    bottom: -20px;
  }

  .phone .answer img {
    display: none;
  }

  .outputs-head {
    flex-direction: column;
    gap: 4px;
  }
}

/* The tablet's toolbar (Anywhere). */
.editor-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--separator);
  background: var(--canvas);
  font-size: 12.5px;
}

.doc-name {
  margin-right: auto;
  font-weight: 600;
}

.doc-name i {
  font-style: normal;
  font-weight: 400;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ochre);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 1px 6px;
  margin-left: 6px;
}

/* 03 Chart once: the builder dialog, as in the app. */
.builder {
  background: var(--raised);
  border: 1px solid var(--separator);
  border-radius: 10px;
  box-shadow: 0 28px 70px #252b262b;
  overflow: hidden;
  font-size: 12.5px;
}

.builder-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--separator);
}

.builder-head b {
  font-size: 14px;
  font-weight: 600;
}

.close,
.btn {
  border: 1px solid var(--boundary);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.btn.primary {
  background: var(--action);
  border-color: var(--action);
  color: var(--text-inverse);
}

.builder-body {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
}

.builder-options {
  background: var(--canvas);
  border-right: 1px solid var(--separator);
  padding: 14px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.field-label {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.select {
  border: 1px solid var(--separator);
  background: var(--raised);
  border-radius: 6px;
  padding: 5px 8px;
}

.types {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.types span {
  border: 1px solid var(--separator);
  background: var(--raised);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11.5px;
}

.types .on {
  background: var(--selected);
  border-color: var(--action);
}

.section {
  background: var(--raised);
  border: 1px solid var(--separator);
  border-radius: 8px;
  padding: 8px 10px;
  display: grid;
  gap: 7px;
}

.section-head {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.section-head b {
  color: var(--text);
  font-weight: 600;
  margin-right: 4px;
}

.builder-preview {
  padding: 14px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.preview-title {
  font-weight: 600;
  font-size: 13px;
}

.preview-cv b {
  color: var(--text);
  font-weight: 500;
}

.builder-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--separator);
}

.link-like {
  margin-right: auto;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 04 Write and review: the built-in editor, people on the page, notes in
   the margin. */
.c-write .editor {
  right: 0;
  top: 7%;
  width: 86%;
}

.editor {
  background: var(--raised);
  border: 1px solid var(--separator);
  border-radius: 10px;
  box-shadow: 0 28px 70px #252b262e;
  overflow: hidden;
}

.editor-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 16px;
  padding: 18px 18px 20px 26px;
  font-size: 12.5px;
  line-height: 1.6;
}

.doc {
  display: grid;
  gap: 10px;
  align-content: start;
}

.doc h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.1;
}

.doc h5 {
  font-size: 13px;
  font-weight: 600;
}

.doc-figure {
  border: 1px solid var(--separator);
  padding: 6px;
  max-width: 78%;
}

.doc-figure figcaption {
  font-size: 10.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.doc-table {
  border-collapse: collapse;
  font-size: 11.5px;
  max-width: 78%;
}

.doc-table th,
.doc-table td {
  border-bottom: 1px solid var(--separator);
  padding: 3px 10px 3px 0;
  text-align: left;
}

.doc-table th {
  color: var(--text-secondary);
  font-weight: 500;
}

.doc-table tr.flag td {
  background: #f4e9ce80;
}

@media (max-width: 720px) {
  .builder-body,
  .editor-page {
    grid-template-columns: 1fr;
  }

  .builder-options {
    border-right: 0;
    border-bottom: 1px solid var(--separator);
  }

  .margin {
    grid-template-columns: 1fr;
  }
}

/* ============================================================ round 3 */

/* Step headings: the sans is wider than the old serif, so a touch smaller
   keeps long words like "everything." whole. */
.step-copy h3.big {
  font-size: clamp(36px, 4.2vw, 66px);
}

/* 02: the chat now holds two exchanges; give the collage the room. */
.c-ask {
  min-height: 900px;
}

.c-ask .chat {
  top: 16%;
}

/* Hero: four lines of headline, a touch smaller than the old three. */
.hero h1 {
  font-size: clamp(40px, 4.6vw, 80px);
  line-height: 1.04;
}

/* Cover: a core slice, its horizons tied to the data by leader lines. */
.floating:has(.core-slice) {
  width: clamp(96px, 8.4vw, 140px);
}

@media (min-width: 1021px) {
  .floating:has(.core-slice) {
    top: 50%;
  }
}

/* Narrow: the core stands inside the photo, clear of the text below. */
@media (max-width: 1020px) {
  .floating:has(.core-slice) {
    top: 30vh;
    left: 12%;
    width: 110px;
  }
}

@media (max-width: 720px) {
  .floating:has(.core-slice) {
    top: 24vh;
    left: 14%;
    width: 84px;
  }
}

.core {
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 26px 28px #161b1752);
}

.core-slice .note {
  left: 128%;
}

/* The spine (4): motion is texture enough, so no grain over it. */
.spine-strip.photo::after {
  display: none;
}

/* 01: tiles stay on one line so the cards below never meet them. */
/* Titles stay on one line; the detail line may wrap inside the tile. */
.file > span {
  min-width: 0;
}

.file b {
  white-space: nowrap;
}

.c-bring {
  min-height: 760px;
}

/* 02: the model picker, the second exchange and its small multiples. */
.model {
  font-size: 11.5px;
  border: 1px solid var(--separator);
  border-radius: 6px;
  padding: 2px 8px;
  background: var(--canvas);
}

.model i {
  font-style: normal;
  color: var(--text-secondary);
  margin-left: 2px;
}

.reply {
  display: grid;
  gap: 12px;
}

.js .reply > * {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.6s,
    transform 0.6s var(--ease);
}

.js .reply.show > * {
  opacity: 1;
  transform: none;
}

.js .reply.show > :nth-child(2) {
  transition-delay: 1.1s;
}

.js .reply.show > :nth-child(3) {
  transition-delay: 1.9s;
}

.bubble2 {
  background: var(--selected);
  border-radius: 10px;
  padding: 10px 14px;
  max-width: 85%;
}

.multiples {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0 8px;
}

.multiples figure {
  border: 1px solid var(--separator);
  border-radius: 4px;
  padding: 4px 4px 2px;
  background: var(--canvas);
}

.multiples svg {
  width: 100%;
  height: 26px;
  display: block;
}

.multiples polyline {
  fill: none;
  stroke: #2f7d45;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.multiples figcaption {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-secondary);
}

/* 03 (6): the method highlight switches at once, never two at a time. */
.methods li,
.methods li i {
  transition: none;
}

/* 04 (8): only the person typing blinks. */
.caret.pm {
  animation: none;
}

/* Who: the workflows, under the heading. */
.who-lead {
  max-width: 46em;
}

/* Footer (13). */
footer {
  border-top: 1px solid var(--text);
  padding: 40px 0 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 48px;
  padding-bottom: 40px;
}

.footer-brand {
  display: grid;
  gap: 10px;
  align-content: start;
  font-size: 13px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.footer-cols div {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer-cols .mono {
  margin-bottom: 4px;
}

.footer-cols a {
  font-size: 14px;
  text-decoration: none;
  color: var(--text);
}

.footer-cols a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* The base row keeps the footer's columns: copyright under the brand,
   the notes under the links, the rule as wide as the content. */
.footer-base {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 48px;
  border-top: 1px solid var(--separator);
  padding-top: 16px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.footer-notes {
  display: grid;
  gap: 6px;
}

.credits {
  font-size: 11px;
  color: var(--boundary);
}

@media (max-width: 1020px) {
  .footer-top,
  .footer-base {
    grid-template-columns: 1fr;
  }

  .footer-base {
    gap: 8px;
  }
}

@media (max-width: 720px) {
  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .core-slice .note {
    left: 118%;
    width: 150px;
  }
}

/* Cover: a site plan drawn on the photographed ground (made by
   scripts/make_landing_hero.py): water-table contours draining to the river,
   the plume's contours, wells and their results, a cross-section line, north
   and scale. Lines draw in once the cover loads. */
.overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.overlay .c {
  fill: none;
  stroke: #fffefa;
  stroke-width: 0.22;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 2.4s var(--ease);
}

/* 5 µg/L, the screening level. */
.overlay .c1 {
  stroke-width: 0.4;
}

.overlay .c0 {
  stroke-dasharray: 1.2 0.8;
  stroke-dashoffset: 0;
  opacity: 0;
  transition: opacity 1.2s 1.6s;
}

.hero.ready .overlay .c {
  stroke-dashoffset: 0;
}

.hero.ready .overlay .c0 {
  opacity: 0.8;
}

.overlay .h {
  fill: none;
  stroke: #fffefa;
  stroke-width: 0.14;
  opacity: 0.55;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 3.2s var(--ease) 0.2s;
}

.hero.ready .overlay .h {
  stroke-dashoffset: 0;
}

.overlay .hl {
  font-size: 1.3px;
  fill: #fffefab3;
}

.overlay .xs {
  fill: none;
  stroke: #fffefa;
  stroke-width: 0.18;
  stroke-dasharray: 2 0.7 0.4 0.7;
}

.overlay .src {
  fill: #fffefa22;
  stroke: #fffefa;
  stroke-width: 0.25;
  stroke-dasharray: 0.8 0.6;
}

.overlay text {
  font-family: var(--font-mono);
  font-size: 1.6px;
  letter-spacing: 0.06em;
  fill: #fffefa;
  fill-opacity: 0.8;
}

/* Leader from a well to its label when the label sits away from it. */
.overlay .ld {
  fill: none;
  stroke: #fffefa;
  stroke-width: 0.12;
  opacity: 0.85;
}

.overlay .v {
  fill-opacity: 0.65;
}

.overlay .well circle.det {
  fill: #fffefa;
}

.overlay .well circle.nd {
  fill: none;
  stroke: #fffefa;
  stroke-width: 0.3;
}

.overlay .well,
.overlay .src,
.overlay .src-l,
.overlay .hl,
.overlay .xs,
.overlay .xs-l,
.overlay .north,
.overlay .scale {
  opacity: 0;
  transition: opacity 0.8s var(--d, 1.2s);
}

.hero.ready .overlay .well,
.hero.ready .overlay .src,
.hero.ready .overlay .src-l,
.hero.ready .overlay .hl,
.hero.ready .overlay .xs,
.hero.ready .overlay .xs-l,
.hero.ready .overlay .north,
.hero.ready .overlay .scale {
  opacity: 1;
}

.overlay .north path {
  fill: #fffefa;
}

.overlay .north text {
  text-anchor: middle;
}

.overlay .scale path {
  stroke: #fffefa;
  stroke-width: 0.25;
  fill: none;
}

@media (prefers-reduced-motion: reduce) {
  .overlay .c,
  .overlay .h,
  .overlay .hl,
  .overlay .xs,
  .overlay .xs-l,
  .overlay .well,
  .overlay .src,
  .overlay .src-l,
  .overlay .north,
  .overlay .scale {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

/* Header over the cover photo: light text, no container. Over the plain
   canvas (the cover's left page on wide screens) the logo stays dark. */
.masthead:not(.scrolled) .nav,
.masthead:not(.scrolled) .brand {
  color: #fffefa;
  text-shadow: 0 1px 12px #161b1799;
}

/* Over the photo the menu needs more weight to read. */
.masthead:not(.scrolled) .nav {
  font-weight: 600;
  text-shadow:
    0 0 2px #161b1766,
    0 1px 12px #161b17aa;
}

@media (min-width: 1021px) {
  .masthead:not(.scrolled) .brand {
    color: var(--text);
    text-shadow: none;
  }
}

/* Units keep their case in uppercase labels: µg/L must never read MG/L. */
.unit {
  text-transform: none;
}

/* The work today: two lines, each a sentence group, sized to fit. */
.statement .statement-lines {
  max-width: none;
  font-size: clamp(26px, 3.5vw, 58px);
  line-height: 1.12;
}

.statement-lines span {
  display: block;
}

@media (min-width: 900px) {
  .statement-lines span {
    white-space: nowrap;
  }
}

/* Anywhere and Pilot headlines at the cover's size: never wider than their
   column ("anywhere" ran under the tablet). */
.anywhere h2.giant,
.pilot h2.giant {
  font-size: clamp(40px, 4.6vw, 80px);
  line-height: 1.04;
}

/* Anywhere: the tablet stays inside its column, clear of the headline. */
.tablet {
  right: 90px;
  width: min(calc(100% - 90px), 520px);
}

/* 02 Ask: two cards, the sourced answer top-right and the scaled chart
   bottom-left under the photo; one screen tall. Text column a little wider
   so the headline sits on two lines like the other steps. */
@media (min-width: 1021px) {
  .step.flip#step-2 .step-copy {
    grid-column: 8 / span 5;
  }

  .step.flip#step-2 .step-art {
    grid-column: 1 / span 7;
  }
}

.c-ask {
  min-height: 920px;
}

.c-ask .well {
  width: 56%;
}

.c-ask .chat {
  top: 8%;
  right: 0;
  width: 64%;
}

.c-ask .scale-card {
  left: 0;
  bottom: 0;
  width: 52%;
  z-index: 2;
}

.scale-card .app-chat-body {
  gap: 10px;
}

@media (max-width: 1020px) {
  .c-ask {
    min-height: 940px;
  }

  .c-ask .chat {
    width: 60%;
  }

  .c-ask .scale-card {
    width: 50%;
  }
}

@media (max-width: 720px) {
  /* Stacked collages: one column no wider than the page, whatever a table
     inside would like. */
  .collage {
    grid-template-columns: minmax(0, 1fr);
  }

  .c-ask {
    min-height: 0;
  }

  .c-ask .scale-card {
    margin-top: 16px !important;
  }
}

/* Outputs: the contact sheet and the enlarged frame are one lightbox, the
   dark strip running on as a frame around the figure. */
.outputs .sheet {
  margin-bottom: 0;
}

.outputs .viewer .plate {
  box-shadow: 0 24px 60px #252b2620;
}

/* 03: Edit chart. The builder's preview becomes the figure editor: the
   options column gives way to the selected part's panel, as in the app. */
.crumb {
  margin-right: auto;
  margin-left: 6px;
  color: var(--text-secondary);
  font-size: 14px;
}

.builder button {
  font: inherit;
  color: inherit;
  background: none;
  cursor: pointer;
}

.preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 26px;
}

.builder .edit-chart {
  background: var(--raised);
  border-color: var(--action);
  color: var(--action);
  font-weight: 600;
}

.builder .edit-chart:hover {
  background: var(--selected);
}

/* The one-time nudge: a line from the "Click any part of a figure" point
   out past the dialog's corner to Edit chart (drawn by the page script). */
/* The point the line starts from hugs its words, not the list's width. */
.try-from {
  justify-self: start;
}

.try-it {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  color: var(--action);
  opacity: 0;
  transition: opacity 0.3s;
}

.try-it path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.try-it .try-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.1s var(--ease);
}

.try-it .try-head {
  opacity: 0;
  transition: opacity 0.3s 1s;
}

.try-it.on {
  opacity: 1;
}

.try-it.on .try-line {
  stroke-dashoffset: 0;
}

.try-it.on .try-head {
  opacity: 1;
}

@media (max-width: 720px) {
  .try-it {
    display: none;
  }
}

.edit-tools {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.preview-frame {
  position: relative;
}

.preview-frame .edit-hit {
  position: absolute;
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
  pointer-events: none;
}

.preview-frame .edit-hit b {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--focus);
  color: var(--text-inverse);
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.edit-panel {
  background: var(--canvas);
  border-right: 1px solid var(--separator);
  padding: 14px;
  display: grid;
  gap: 11px;
  align-content: start;
}

.edit-panel-head {
  display: grid;
  gap: 2px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--separator);
}

.edit-panel-head b {
  font-size: 13px;
  font-weight: 600;
}

.edit-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 4px 8px;
}

.range-hint {
  grid-column: 2;
  text-transform: none; /* µg/L, not MG/L */
  letter-spacing: 0.02em;
  font-size: 10.5px;
  color: var(--text-secondary);
}

.seg {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--separator);
  border-radius: 6px;
  background: var(--raised);
  overflow: hidden;
  justify-self: start;
}

.seg > * {
  padding: 4px 9px;
  font-size: 11.5px;
  border: 0;
  border-right: 1px solid var(--separator);
}

.seg > *:last-child {
  border-right: 0;
}

.seg .on,
.seg [aria-pressed='true'] {
  background: var(--selected);
  color: var(--action);
  font-weight: 600;
}

.ramps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.ramps button {
  display: grid;
  gap: 3px;
  padding: 5px 6px;
  border: 1px solid var(--separator);
  border-radius: 6px;
  background: var(--raised);
  font-size: 11px;
  text-align: left;
}

.ramps button i {
  height: 9px;
  border-radius: 2px;
}

.ramps button[aria-pressed='true'] {
  border-color: var(--action);
  box-shadow: 0 0 0 1px var(--action);
}

.edit-note {
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.builder-foot button.link-like {
  border: 0;
  padding: 0;
}

.builder [hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .edit-panel {
    border-right: 0;
    border-bottom: 1px solid var(--separator);
  }
}

/* 02: the second card follows the first by a set gap, however tall the
   cards are at this width (a fixed collage height left a wide gap on wide
   screens and none on narrow ones). The photo stays behind, top left. */
@media (min-width: 721px) {
  .c-ask {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .c-ask .chat {
    position: relative;
    grid-row: 1;
    justify-self: end;
    top: auto;
    margin-top: clamp(96px, 9vw, 140px);
  }

  .c-ask .scale-card {
    position: relative;
    grid-row: 2;
    justify-self: start;
    bottom: auto;
    margin-top: -28px; /* overlaps the first card a little, clear of its source row */
  }
}
