:root {
  --bg: #080c0f;
  --surface: #0f1217;
  --surface-2: #161b22;
  --line: rgba(141, 153, 166, 0.2);
  --line-strong: rgba(69, 205, 174, 0.42);
  --text: #eef2f4;
  --text-soft: #d7dddf;
  --muted: #9aa7b1;
  --muted-2: #6f7a83;
  --teal: #45cdae;
  --teal-soft: #b6f3e1;
  --amber: #c79435;
  --amber-soft: #f2d491;
  --danger: #d55b4f;
  --maya: #f4c46a;
  --jonas: #b9a6ff;
  --priya: #7fc8ff;
  --sam: #ff9e7d;
  --conf-high: #22c55e;
  --conf-low: #45d0ae;
  --display: Inter, ui-sans-serif, system-ui, sans-serif;
  --body: Inter, ui-sans-serif, system-ui, sans-serif;
  --shell: 1200px;
  --gutter: 28px;
  --header: 70px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header); }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px, 44px 44px, auto;
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

img, video { display: block; max-width: 100%; }

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

button, input { font: inherit; }

button { color: inherit; }

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.shell {
  width: min(100%, var(--shell));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button:focus-visible,
.text-link:focus-visible,
.main-nav a:focus-visible,
.brand:focus-visible,
.tour-tab:focus-visible,
.menu-button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--teal-soft);
  outline-offset: 3px;
}

.button-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #04100c;
}

.button-primary:hover { background: var(--teal-soft); border-color: var(--teal-soft); }

.button-secondary {
  background: rgba(8, 12, 15, 0.76);
  border-color: rgba(238, 242, 241, 0.28);
  color: var(--text);
}

.button-secondary:hover { border-color: var(--text-soft); }

.button-small { min-height: 40px; padding: 9px 14px; font-size: 13px; }

.icon { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.button-small .icon { width: 14px; height: 14px; }

.text-link { font-size: 13px; font-weight: 600; color: var(--text-soft); }

.text-link:hover { color: var(--teal-soft); }

/* Header */
.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: var(--header);
  border-bottom: 1px solid transparent;
  transition: background 180ms ease, border-color 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(8, 12, 15, 0.96);
  border-color: var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

/* The wordmark is drawn as paths, so the logo needs no font. */
.brand img { width: 148px; height: auto; }

.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.main-nav a {
  position: relative;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 1px;
  background: var(--teal);
  transition: right 160ms ease;
}

.main-nav a:hover::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.menu-button {
  display: none;
  width: 42px;
  height: 40px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(8, 12, 15, 0.8);
  cursor: pointer;
}

.menu-button span { display: block; height: 1px; background: var(--text); margin: 5px 0; }

/* Hero */
.hero {
  position: relative;
  min-height: 660px;
  height: calc(100svh - 54px);
  max-height: 900px;
  overflow: hidden;
  isolation: isolate;
}

/*
  The hero scene is sized like object-fit: cover, but as a real box, so the people
  and evidence drawn over it stay pinned to the imagery (2766 x 1203 px).
  --ax: where the discoloured-water area (65.62% across the image) sits in the frame.
  --ay: which image height fraction sits at the vertical centre.
  The clamps keep the image covering the frame whatever the anchor asks for.
*/
.hero-media {
  --ax: 65cqw;
  --ay: 0.5;
  --sw: max(105cqw, 100cqh * 2.2993);
  --sh: calc(var(--sw) / 2.2993);
  --sl: clamp(100cqw - var(--sw), var(--ax) - 0.6562 * var(--sw), 0px);
  --st: clamp(100cqh - var(--sh), 50cqh - var(--ay) * var(--sh), 0px);
  position: absolute;
  inset: 0;
  overflow: hidden;
  container-type: size;
}

.hero-scene {
  position: absolute;
  top: var(--st);
  left: var(--sl);
  display: block;
  width: var(--sw);
  height: var(--sh);
}

.hero-scene img { width: 100%; height: 100%; filter: saturate(0.94) contrast(1.05); }

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8,12,15,0.97) 0%, rgba(8,12,15,0.9) 30%, rgba(8,12,15,0.6) 44%, rgba(8,12,15,0.14) 57%, rgba(8,12,15,0.04) 100%),
    linear-gradient(180deg, rgba(8,12,15,0.72) 0%, transparent 24%, transparent 76%, rgba(8,12,15,0.8) 100%);
}

.hero-live { pointer-events: none; }

/*
  People click the scene to try it, so a click lands as the visitor's own marker, pinned to the
  imagery like the team's, with a way on to a real map. The copy's wrapper lets clicks through.
*/
.hero-media { cursor: crosshair; }
.hero-content { pointer-events: none; }
.hero-copy { pointer-events: auto; }

.visitor-mark { position: absolute; }
.visitor-mark > i { position: absolute; border-radius: 50%; }
.visitor-dot { width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid #fff; background: var(--conf-low); box-shadow: 0 1px 5px rgba(0,0,0,0.55); animation: visitor-drop 420ms cubic-bezier(.3,1.5,.5,1) both; }
.visitor-ring { width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 2px solid #fff; animation: visitor-ring 520ms ease-out both; }
@keyframes visitor-drop { from { opacity: 0; transform: translateY(-12px) scale(0.6); } }
@keyframes visitor-ring { from { opacity: 1; transform: scale(0.35); } to { opacity: 0; transform: scale(1.45); } }

.visitor-note {
  position: absolute;
  top: 0;
  left: 18px;
  display: none;
  gap: 1px;
  padding: 8px 13px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(8,12,15,0.94);
  box-shadow: 0 14px 34px rgba(0,0,0,0.45);
  color: var(--teal-soft);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  transform: translateY(-50%);
  animation: fade-in 300ms ease 250ms both;
}

.visitor-mark.is-latest .visitor-note { display: grid; }
.visitor-mark.is-flipped .visitor-note { right: 18px; left: auto; }
.visitor-note b { color: var(--text); font-weight: 600; }
.visitor-note span { display: inline-flex; align-items: center; gap: 5px; }
.visitor-note .icon { width: 13px; height: 13px; }
.visitor-note:hover span { color: var(--text); }
.person-you { --c: #eef2f4; font-size: 8.5px; }

.person-maya { --c: var(--maya); }
.person-jonas { --c: var(--jonas); }
.person-priya { --c: var(--priya); }

/* Map drawing. Colours follow the app: evidence is coloured by confidence. */
.scene-draw { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.scene-draw polygon,
.scene-draw polyline,
.scene-draw line,
.scene-draw circle { vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }

.area-plume {
  fill: rgba(69,205,174,0.12);
  stroke: var(--conf-low);
  stroke-width: 2;
  transition: fill 600ms ease, stroke 600ms ease;
  animation: fade-in 700ms ease 300ms both;
}

.area-plume.is-high { fill: rgba(34,197,94,0.13); stroke: var(--conf-high); }

.area-new { fill: rgba(69,205,174,0.12); stroke: var(--conf-low); stroke-width: 2; opacity: 0; transition: fill 250ms ease, stroke-width 250ms ease; }
/* Selected, as when Priya's measurement snaps to it. */
.area-new.is-selected { fill: rgba(69,205,174,0.22); stroke-width: 3.2; }
.area-sketch { fill: none; stroke: var(--c); stroke-width: 2; stroke-dasharray: 7 5; opacity: 0; }
.area-vertices circle { fill: #0b0e12; stroke: var(--c); stroke-width: 2; opacity: 0; }
.measure-line { stroke: #f8fafc; stroke-width: 2; stroke-dasharray: 6 5; opacity: 0; }

.map-marker,
.map-label,
.measure-point,
.measure-label,
.click-ring { position: absolute; opacity: 0; }

.map-marker {
  left: 62.835%;
  top: 48.213%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--conf-low);
  box-shadow: 0 1px 5px rgba(0,0,0,0.55);
  transition: box-shadow 250ms ease;
}

.map-marker.is-selected { box-shadow: 0 0 0 5px rgba(69,205,174,0.35), 0 1px 5px rgba(0,0,0,0.55); }

.map-label {
  color: #e5e7eb;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-shadow: 0 0 2px #020617, 0 0 4px #020617, 0 1px 3px #020617;
}

.marker-label { left: 62.835%; top: 48.213%; transform: translate(calc(-100% - 14px), -50%); }
.area-label { left: 76.645%; top: 77.307%; transform: translate(-50%, -50%); }

.measure-point {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 0 0 2px rgba(2,6,23,0.7);
}

/* From the tank farm's edge to the dredger marker. */
.measure-start { left: 65.51%; top: 63.259%; }
.measure-end { left: 62.835%; top: 48.213%; }

.measure-label {
  left: 64.172%;
  top: 55.736%;
  padding: 2px 7px;
  border: 1px solid rgba(248,250,252,0.35);
  border-radius: 4px;
  background: rgba(2,6,23,0.85);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transform: translate(-50%, 10px);
}

.click-ring { width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 2px solid var(--c); border-radius: 50%; }

/* The tip of the arrow sits exactly on the cursor's position. */
.scene-cursor {
  position: absolute;
  display: flex;
  align-items: flex-start;
  margin: -2px 0 0 -2px;
  animation: fade-in 500ms ease 400ms both;
}

/* Starting spots, matching START in main.js. */
.scene-cursor.person-maya { left: 68.87%; top: 75.23%; }
.scene-cursor.person-jonas { left: 59.65%; top: 37.57%; }
.scene-cursor.person-priya { left: 72.67%; top: 53.2%; }

.scene-cursor svg {
  width: 17px;
  height: 21px;
  flex: none;
  overflow: visible;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.55));
  transform-origin: 2px 2px;
  transition: transform 90ms ease;
}

.scene-cursor.is-pressed svg { transform: scale(0.84); }
.scene-cursor.is-flipped b { right: calc(100% - 3px); left: auto; }
.scene-cursor path { fill: var(--c); stroke: #0b0e12; stroke-width: 1.3; stroke-linejoin: round; }

/* Name tags hang below-right of the arrow, and flip left near the frame's right edge. */
.scene-cursor b {
  position: absolute;
  top: 15px;
  left: 14px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--c);
  color: #0b0e12;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/*
  Sits just right of the discoloured-water area (its right edge is 70.93% across) and,
  at full height, ends just above the tank farm's top edge (about 64.34% down).
*/
.hero-card {
  position: absolute;
  z-index: 1;
  left: calc(var(--sl) + 0.7093 * var(--sw) + 18px);
  top: calc(var(--st) + 0.6434 * var(--sh) - 294px);
  width: clamp(250px, 22vw, 300px);
  border: 1px solid rgba(141,153,166,0.3);
  border-radius: 10px;
  background: rgba(10,13,17,0.9);
  box-shadow: 0 18px 48px rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  animation: rise-in 600ms ease 700ms both;
}

/* With the script running, the card and the water outline appear when Priya creates them. */
.hero.is-scripted .hero-card,
.hero.is-scripted .area-plume { animation: none; }

.hero-card-head { padding: 12px 14px 11px; border-bottom: 1px solid var(--line); }

.hero-card-kicker {
  display: block;
  color: var(--teal-soft);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-card-head strong { display: block; margin: 3px 0 7px; color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.3; }

.hero-card-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; line-height: 1.3; }

/* New evidence starts at Low, as in the app. */
.confidence {
  padding: 2px 7px;
  border: 1px solid rgba(69,205,174,0.34);
  border-radius: 999px;
  background: rgba(69,205,174,0.1);
  color: var(--teal-soft);
  font-style: normal;
  transition: background 400ms ease, border-color 400ms ease, color 400ms ease;
}

.confidence.is-high {
  border-color: rgba(74,222,128,0.42);
  background: rgba(34,197,94,0.12);
  color: #9be7b1;
  animation: confidence-up 700ms ease;
}

.hero-thread { display: grid; gap: 11px; margin: 0; padding: 12px 14px 14px; list-style: none; }

.hero-thread li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 9px;
  align-items: start;
  animation: rise-in 400ms ease both;
}

.hero-thread li[data-state="hidden"] { display: none; }
.hero-thread li[data-state="typing"] .msg-text,
.hero-thread li:not([data-state="typing"]) .typing-dots { display: none; }

.hero-thread p { margin: 0; color: var(--text-soft); font-size: 12.5px; line-height: 1.42; }
.hero-thread b { display: block; color: var(--text); font-size: 11.5px; font-weight: 600; }

.avatar {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--c);
  color: #0b0e12;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.typing-dots { display: inline-flex; gap: 3px; padding-top: 5px; }
.typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: typing 1.3s ease-in-out infinite; }
.typing-dots i:nth-child(2) { animation-delay: 0.16s; }
.typing-dots i:nth-child(3) { animation-delay: 0.32s; }

.hero-presence {
  position: absolute;
  z-index: 1;
  top: calc(var(--header) + 18px);
  right: max(var(--gutter), calc((100% - var(--shell)) / 2 + var(--gutter)));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 13px 5px 5px;
  border: 1px solid rgba(141,153,166,0.28);
  border-radius: 999px;
  background: rgba(8,12,15,0.84);
  backdrop-filter: blur(8px);
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  animation: fade-in 500ms ease 200ms both;
}

.avatar-stack { display: flex; gap: 3px; }

.presence-count { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.presence-count::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.presence-project { padding-left: 10px; border-left: 1px solid var(--line); color: var(--muted); }

.hero-credit {
  position: absolute;
  right: max(var(--gutter), calc((100% - var(--shell)) / 2 + var(--gutter)));
  bottom: 18px;
  margin: 0;
  color: rgba(215,221,223,0.6);
  font-size: 11px;
  line-height: 1.4;
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  padding-top: var(--header);
  padding-bottom: 42px;
}

.hero-copy { width: min(560px, 52%); }

.hero h1 { margin-bottom: 22px; font-size: 80px; line-height: 1.02; letter-spacing: -0.035em; max-width: 12ch; }
.hero h1 em { color: var(--teal); font-style: normal; }
/* "For analysts." … "For you.": each word drops in from above and the last one stays (main.js).
   Without the script, or with reduced motion, only "you." shows. */
.hero-for { margin-bottom: 34px; color: var(--muted); font-size: 34px; font-weight: 600; line-height: 1.25; letter-spacing: -0.025em; }
.hero-for-words { display: inline-grid; overflow: hidden; vertical-align: top; color: var(--text); }
.hero-for-words > span { grid-area: 1 / 1; }
.hero-for-words > .is-you { color: var(--teal); }
.hero-for-words:not(.is-playing) > span:not(.is-you) { visibility: hidden; }
.hero-for-words.is-playing > span { opacity: 0; transform: translateY(-100%); transition: transform 560ms cubic-bezier(.25,1.3,.5,1), opacity 260ms ease; }
.hero-for-words.is-playing > .is-in { opacity: 1; transform: none; transition-delay: 140ms; }
.hero-for-words.is-playing > .is-out { opacity: 0; transform: translateY(90%); transition-timing-function: cubic-bezier(.5,0,.75,0), ease; }


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

.testing-note { margin: 18px 0 0; color: var(--muted); font-size: 14px; }

.hero-scroll {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transform: translateX(-50%);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-scroll span { width: 28px; height: 1px; background: var(--teal); }

@keyframes fade-in { from { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes typing { 0%, 60%, 100% { opacity: 0.35; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
@keyframes confidence-up { 0% { transform: scale(1); } 35% { transform: scale(1.08); box-shadow: 0 0 0 4px rgba(34,197,94,0.18); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

/* Shared sections */
.section { position: relative; padding: 88px 0; }
.section + .section { border-top: 1px solid var(--line); }

.section-heading { max-width: 780px; margin-bottom: 48px; }
.section-heading.compact { max-width: 850px; }

.section-heading h2,
.final-cta h2 {
  margin-bottom: 20px;
  font-size: 44px;
}

.section-heading > p:last-child,
.final-inner > p {
  color: var(--text-soft);
  font-size: 18px;
}

.feature-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid rgba(69,205,174,0.4);
  border-radius: 50%;
  background: rgba(69,205,174,0.14);
  color: var(--teal-soft);
}

.feature-icon .icon { width: 17px; height: 17px; }

/* Workflow: one investigation in steps. Every step title stays visible, and the stage keeps one size. */
.product { background: var(--bg); }

/* Steps sit on one thin rail above the stage, like a timeline: no boxes. The active step fills its
   stretch of the rail as it plays and shows its line of text; the others show only their titles. */
.tour-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 22px; margin-bottom: 28px; }

.tour-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 24px 0 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: inset 0 1px 0 var(--line-strong);
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: color 200ms ease;
}

.step-label { color: var(--muted-2); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.tour-tab.is-active .step-label { color: var(--teal-soft); }
.step-title { color: var(--muted); font-size: 18px; font-weight: 600; line-height: 1.3; transition: color 200ms ease; }
.tour-tab:hover .step-title { color: var(--text-soft); }
.tour-tab.is-active .step-title { color: var(--text); }
.step-text { opacity: 0; transition: opacity 250ms ease; }
.tour-tab.is-active .step-text { opacity: 1; color: var(--text-soft); }

.tour-tab .tab-progress { position: absolute; top: -0.5px; right: 0; left: 0; height: 2px; background: var(--teal); transform: scaleX(0); transform-origin: left; }
.tour-tab.is-active .tab-progress { animation: tab-progress var(--tab-duration, 7000ms) linear forwards; }
.product-tour.is-static .tour-tab.is-active .tab-progress { animation: none; transform: none; }

/* While paused (steps hovered, keyboard focus, off screen), the scene holds with the progress bar. */
/* Important, so a scene's own animation rules cannot restart a piece while the rest is held. */
.product-tour.is-paused .tab-progress,
.product-tour.is-paused .tour-panel.is-active,
.product-tour.is-paused .tour-panel.is-active *,
.product-tour.is-paused .tour-panel.is-active *::after { animation-play-state: paused !important; }

@keyframes tab-progress { to { transform: scaleX(1); } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes disappear { to { opacity: 0; } }
@keyframes appear-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Capped so the step cards and the whole picture fit on a laptop screen together. */
.tour-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: max(380px, calc(100vh - 280px));
  max-height: max(380px, calc(100svh - 280px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #05070a;
  container-type: size;
  isolation: isolate;
}

/* A click on the picture moves the story on to the next step. */
.tour-stage { cursor: pointer; }

.tour-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/*
  Scenes cross-fade in place. A scene frame covers the stage like object-fit: cover, but as a
  real box, so marks drawn on the imagery stay put: --ar is the image's aspect ratio, and
  --fx/--fy is the image point kept nearest the centre. Positions inside a frame are image fractions.
*/
.tour-panel {
  --ar: 1.5588;
  --fx: 0.45;
  --fy: 0.44;
  --fw: max(100cqw, 100cqh * var(--ar));
  --fh: calc(var(--fw) / var(--ar));
  --fl: clamp(100cqw - var(--fw), 50cqw - var(--fx) * var(--fw), 0px);
  --ft: clamp(100cqh - var(--fh), 50cqh - var(--fy) * var(--fh), 0px);
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 500ms ease, visibility 0s linear 500ms;
}

.tour-panel.is-active { z-index: 1; opacity: 1; visibility: visible; transition: opacity 500ms ease; }

.scene-frame { position: absolute; top: var(--ft); left: var(--fl); width: var(--fw); height: var(--fh); }
.scene-frame picture,
.scene-frame img { display: block; width: 100%; height: 100%; }
.scene-frame > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* Coordinate search: the characters are typed one by one, then Go is pressed. */
.find-search {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(430px, calc(100% - 48px));
  padding: 8px 8px 8px 16px;
  border: 1px solid rgba(141,153,166,0.35);
  border-radius: 14px;
  background: rgba(8,12,15,0.9);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 19px;
  font-weight: 500;
}

.find-search > .icon { width: 19px; height: 19px; color: var(--muted); }
.find-query { white-space: pre; font-variant-numeric: tabular-nums; }
/* Characters take no space until typed, so the caret follows the text. */
.find-query span { font-size: 0; }
.tour-panel.is-active .find-query span { animation: type-char 1ms linear calc(500ms + var(--i) * 85ms) both; }
@keyframes type-char { from { font-size: 0; } to { font-size: 1em; } }
.find-caret { flex: none; width: 2px; height: 22px; margin-left: -10px; background: var(--teal); animation: caret-blink 1s steps(1) infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }
.find-go { margin-left: auto; padding: 9px 18px; border-radius: 9px; background: var(--teal); color: #04100c; font-size: 15px; font-weight: 600; }
.tour-panel.is-active .find-go { animation: go-press 360ms ease 1750ms; }
@keyframes go-press { 50% { transform: scale(0.9); background: var(--teal-soft); } }

@keyframes mark-draw { to { stroke-dashoffset: 0; } }
.mark-card {
  position: absolute;
  top: 7%;
  right: 3.5%;
  width: min(350px, 36%);
  padding: 18px 20px 16px;
  border: 1px solid rgba(141,153,166,0.3);
  border-radius: 14px;
  background: rgba(10,13,17,0.92);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  opacity: 0;
}

.tour-panel.is-active .mark-card { animation: slide-in 500ms cubic-bezier(.2,.8,.2,1) 3500ms both; }
@keyframes slide-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.card-kicker { margin: 0; color: var(--teal-soft); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.card-title { margin: 4px 0 10px; color: var(--text); font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.card-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 12.5px; }
.card-author { display: inline-flex; align-items: center; gap: 7px; color: var(--text-soft); font-weight: 500; }
.card-author .avatar { width: 22px; height: 22px; font-size: 9px; }
.card-fields { display: grid; gap: 9px; margin: 0; padding-top: 13px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.4; }
.card-fields div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; }
.card-fields dt { color: var(--muted); }
.card-fields dd { margin: 0; color: var(--text); }

/* Compare: the earlier date shows left of the divider. Dragging takes over from the sweep. */
@property --d { syntax: "<percentage>"; inherits: true; initial-value: 42%; }
.scene-compare { --d: 42%; cursor: ew-resize; touch-action: pan-y; user-select: none; }
/* The scene takes the pointer itself; images would otherwise start a native drag. */
.scene-compare * { pointer-events: none; }
.tour-panel.scene-compare.is-active:not(.is-manual) { animation: compare-sweep 6400ms cubic-bezier(.45,0,.25,1) 400ms both; }
@keyframes compare-sweep { 0%, 12% { --d: 97%; } 55%, 66% { --d: 5%; } 100% { --d: 42%; } }
.compare-layer { position: absolute; inset: 0; }
.compare-before { clip-path: inset(0 calc(100% - var(--d)) 0 0); }
.compare-divider { position: absolute; top: 0; bottom: 0; left: var(--d); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 14px rgba(0,0,0,0.55); }
.compare-divider span { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #0b0e12; box-shadow: 0 6px 18px rgba(0,0,0,0.45); transform: translate(-50%, -50%); }
.compare-divider .icon { width: 18px; height: 18px; stroke-width: 2; }

.compare-date {
  position: absolute;
  top: 20px;
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgba(141,153,166,0.3);
  border-radius: 12px;
  background: rgba(8,12,15,0.88);
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.compare-date span { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.compare-date-before { left: 20px; }
.compare-date-after { right: 20px; text-align: right; }

/* Brief: the finished finding on paper, over the dimmed basin. */
.brief-backdrop img { filter: brightness(0.32) saturate(0.7) blur(3px); transform: scale(1.04); }

.brief-paper {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(580px, 76%);
  padding: 24px 28px 22px;
  border-radius: 14px;
  background: #f4f6f5;
  color: #0b0e12;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  transform: translate(-50%, -50%);
}

.tour-panel.is-active .brief-paper { animation: paper-in 700ms cubic-bezier(.2,.8,.2,1) 300ms both; }
@keyframes paper-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 28px)); } to { opacity: 1; transform: translate(-50%, -50%); } }

.brief-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #5b6670; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.brief-brand { display: inline-flex; align-items: center; gap: 8px; color: #0b0e12; }
.brief-brand img { width: 24px; height: 24px; }
.brief-title { margin: 12px 0 14px; color: #0b0e12; font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.brief-finding { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; padding: 14px 0; border-top: 1px solid #dfe4e2; border-bottom: 1px solid #dfe4e2; }

/* The thumbnail zooms the same image 3x onto the berth (0.49, 0.597). */
.brief-thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: #1a2026; }
.brief-thumb-map { position: absolute; top: -109.2%; left: -97%; width: 300%; aspect-ratio: 1200 / 800; }
.brief-thumb-map picture,
.brief-thumb-map img { display: block; width: 100%; height: 100%; max-width: none; }
.brief-thumb-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.brief-thumb polygon { fill: rgba(34,197,94,0.18); stroke: var(--conf-high); stroke-width: 9; stroke-linejoin: round; }

.brief-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #d9f5e3; color: #0f7a3a; font-size: 12px; font-weight: 700; }
.tour-panel.is-active .brief-chip { animation: chip-pop 500ms cubic-bezier(.3,1.6,.5,1) 1300ms both; }
@keyframes chip-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
.brief-summary p { margin: 8px 0 0; color: #37414a; font-size: 14px; line-height: 1.45; }

.brief-meta { display: grid; gap: 10px; margin: 14px 0 0; font-size: 13px; }
.brief-meta div { display: grid; grid-template-columns: 104px 1fr; gap: 12px; align-items: baseline; }
.brief-meta dt { color: #5b6670; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.brief-meta dd { margin: 0; color: #0b0e12; line-height: 1.5; }
.brief-people { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.brief-people > span { display: inline-flex; align-items: center; gap: 6px; }
.brief-people b { font-weight: 600; }
.brief-people .avatar { width: 22px; height: 22px; font-size: 9px; }

.brief-print { position: absolute; top: 20px; right: 20px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid rgba(255,255,255,0.22); border-radius: 999px; background: rgba(8,12,15,0.88); color: var(--text); font-size: 14px; font-weight: 600; opacity: 0; }
.tour-panel.is-active .brief-print { animation: appear 400ms ease 900ms both; }

/* Smaller stages: scale the scenes down and drop secondary detail. */
@container (max-width: 820px) {
  .find-search { font-size: 17px; }
  .mark-card { width: min(310px, 42%); padding: 14px 16px; }
  .card-title { font-size: 17px; }
  .card-fields { font-size: 13px; }
  .card-fields div { grid-template-columns: 82px 1fr; }

  .compare-date { font-size: 17px; }
  .brief-paper { width: min(540px, 86%); padding: 20px 22px 18px; }
  .brief-title { font-size: 20px; }
  .brief-finding { grid-template-columns: 124px 1fr; }
}

@container (max-width: 560px) {
  .find-search { top: 12px; left: 12px; gap: 8px; width: calc(100% - 24px); padding: 6px 6px 6px 12px; font-size: 15px; }
  .find-search > .icon { width: 16px; height: 16px; }
  .find-caret { height: 18px; margin-left: -6px; }
  .find-go { padding: 7px 12px; font-size: 13px; }

  .mark-card { top: auto; right: 12px; bottom: 12px; left: 12px; width: auto; padding: 12px 14px; }
  .card-title { margin-bottom: 8px; font-size: 16px; }
  .card-chips { margin: 0; }
  .card-fields { display: none; }

  .compare-date { top: 10px; padding: 6px 10px; font-size: 14px; }
  .compare-date span { font-size: 9px; }
  .compare-date-before { left: 10px; }
  .compare-date-after { right: 10px; }
  .compare-divider span { width: 36px; height: 36px; }
  .brief-paper { width: calc(100% - 24px); padding: 14px 16px; }
  .brief-head { font-size: 10px; }
  .brief-title { margin: 8px 0 10px; font-size: 17px; }
  .brief-finding { grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; }
  .brief-summary p { font-size: 12.5px; }
  .brief-meta .brief-sources,
  .brief-people b { display: none; }
  .brief-meta { margin-top: 10px; }
  .brief-meta div { grid-template-columns: 96px 1fr; }
  .brief-print { top: 10px; right: 10px; padding: 6px 10px; font-size: 12px; }
}

/* The Sentinel-2 scenes are 3:2. Timed pieces fade in at --on; the ones that give way carry --off. */
.scene-assistant,
.scene-traffic { --ar: 1.5; --fx: 0.5; --fy: 0.5; }

.view-layer,
.change-legend,
.change-tag,
.assistant-added { opacity: 0; }

.tour-panel.is-active .view-layer { animation: appear 700ms ease var(--on) both; }

.change-legend {
  position: absolute;
  left: 20px;
  margin: 0;
  border: 1px solid rgba(141,153,166,0.3);
  border-radius: 14px;
  background: rgba(8,12,15,0.9);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
}

/* The change layer's legend. */
.change-legend { bottom: 20px; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 14px; list-style: none; color: var(--text); font-size: 13.5px; font-weight: 500; line-height: 1.4; }
.change-legend i { display: inline-block; width: 12px; height: 12px; margin-right: 7px; border-radius: 3px; vertical-align: -1px; }

/* Tags sit above what they name; the tanker's hangs below, clear of the ships that left. */
.change-tag {
  position: absolute;
  padding: 3px 10px;
  border: 1.5px solid var(--tag);
  border-radius: 999px;
  background: rgba(8,12,15,0.9);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 16px));
}

.change-tag::after { content: ""; position: absolute; top: 100%; left: 50%; width: 1.5px; height: 11px; margin-left: -0.75px; background: var(--tag); }
.change-tag.is-gone { --tag: #e0483e; }
.change-tag.is-new { --tag: #3ecfd6; transform: translate(-50%, 16px); }
.change-tag.is-new::after { top: auto; bottom: 100%; }

/* Assistant: the question, the suggestion, and a card the member runs. The map shifts left of the panel. */
.scene-assistant .scene-frame { transform: translateX(-15%); }

.assistant-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: 43%;
  border-left: 1px solid rgba(141,153,166,0.3);
  background: rgba(10,14,18,0.97);
}

.assistant-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.3; }
.assistant-place { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 7px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--teal-soft); font-size: 12px; }
.assistant-place .icon { width: 13px; height: 13px; }

.assistant-thread { flex: 1; display: flex; flex-direction: column; gap: 12px; min-height: 0; padding: 16px; }
.assistant-thread > * { opacity: 0; }
.tour-panel.is-active .assistant-thread > * { animation: appear-up 450ms ease var(--on) both; }

.assistant-ask { display: flex; align-items: flex-start; gap: 9px; align-self: flex-end; max-width: 94%; margin: 0; padding: 9px 12px; border-radius: 12px 12px 3px 12px; background: rgba(141,153,166,0.16); color: var(--text); font-size: 14.5px; line-height: 1.4; }
.assistant-ask .avatar { width: 22px; height: 22px; font-size: 9px; }
.assistant-answer { margin: 0; color: var(--text-soft); font-size: 14.5px; line-height: 1.5; }
.assistant-cite { display: inline-block; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: rgba(69,205,174,0.1); color: var(--teal-soft); font-size: 12.5px; font-weight: 600; white-space: nowrap; }

.assistant-card { position: relative; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(69,205,174,0.07); }
.assistant-card-title { margin: 3px 0 2px; color: var(--text); font-size: 16px; font-weight: 600; line-height: 1.3; }
.assistant-card-meta { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.assistant-run { display: inline-grid; padding: 8px 18px; border-radius: 8px; background: var(--teal); color: #04100c; font-size: 14px; line-height: 1; }
.assistant-run b { grid-area: 1 / 1; font-weight: 600; text-align: center; }
.assistant-run b:last-child { opacity: 0; }
.tour-panel.is-active .assistant-run { animation: go-press 360ms ease 7500ms; }
.tour-panel.is-active .assistant-run b:first-child { animation: disappear 200ms ease 7800ms forwards; }
.tour-panel.is-active .assistant-run b:last-child { animation: appear 200ms ease 7800ms both; }

/* Maya's cursor comes in to press Run; its tip rests on the button. */
.scene-assistant .assistant-cursor { top: calc(100% - 27px); left: 42px; opacity: 0; animation: none; }
.tour-panel.is-active .assistant-cursor { animation: appear 250ms ease 6300ms both, cursor-to-run 1000ms cubic-bezier(.4,0,.2,1) 6400ms both, disappear 300ms ease 8700ms forwards; }
@keyframes cursor-to-run { from { transform: translate(120px, -64px); } to { transform: none; } }

.assistant-input { margin: 0 16px 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted-2); font-size: 14px; line-height: 1.3; }

.assistant-added { position: absolute; top: 20px; left: 20px; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 9px 15px 9px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(8,12,15,0.9); color: var(--teal-soft); font-size: 14px; font-weight: 600; line-height: 1.3; }
.tour-panel.is-active .assistant-added { animation: appear 400ms ease var(--on) both; }

/* Live traffic in the app's colours: orange hulls along their course and a cyan aircraft. */
.vessel,
.aircraft { position: absolute; opacity: 0; rotate: var(--course); filter: drop-shadow(0 0 3px rgba(16,35,44,0.95)); }
.vessel { width: 14px; height: 24px; margin: -12px 0 0 -7px; }
.aircraft { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
.vessel svg,
.aircraft svg,
.traffic-card-icon svg { display: block; width: 100%; height: 100%; }
.vessel path,
.traffic-card-icon path { fill: #ffb37a; stroke: #10232c; stroke-width: 1.4; stroke-linejoin: round; }
.vessel.is-moored path { fill-opacity: 0.62; }
.aircraft path { fill: #69dbe9; stroke: #10232c; stroke-width: 1; stroke-linejoin: round; }

.tour-panel.is-active .vessel { animation: appear 400ms ease calc(500ms + var(--i) * 130ms) both; }
.tour-panel.is-active .vessel:not(.is-moored) { animation: appear 400ms ease 500ms both, drift 9000ms linear 500ms both; }
.tour-panel.is-active .aircraft { animation: appear 400ms ease 700ms both, fly 9000ms linear 700ms both; }
@keyframes drift { to { translate: 44px 11px; } }
@keyframes fly { to { translate: -170px 106px; } }

.vessel.is-picked::after { content: ""; position: absolute; inset: -7px -12px; border: 2px solid #ffb37a; border-radius: 50%; opacity: 0; }
.tour-panel.is-active .vessel.is-picked::after { animation: appear 300ms ease 2600ms both; }
.tour-panel.is-active .vessel.is-picked path { animation: pick 1ms linear 2600ms forwards; }
@keyframes pick { to { fill-opacity: 1; } }

.traffic-toggles {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(141,153,166,0.3);
  border-radius: 12px;
  background: rgba(8,12,15,0.9);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.traffic-toggles span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; }
.traffic-toggles .is-on { border-color: var(--line-strong); background: rgba(69,205,174,0.14); color: var(--text); }
.traffic-toggles em { padding: 0 8px 0 6px; color: var(--teal-soft); font-size: 12.5px; font-style: normal; white-space: nowrap; }
.traffic-toggles em::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--teal); vertical-align: 1px; }

/* Beside the picked vessel (48.3%, 60.4% of the basin), as in the app: 26 px right of it and 36 px above. */
.traffic-card {
  position: absolute;
  top: calc(var(--ft) + 0.604 * var(--fh) - 36px);
  left: calc(var(--fl) + 0.483 * var(--fw) + 26px);
  width: 262px;
  padding: 12px 14px 14px;
  border: 1px solid rgba(255,179,122,0.45);
  border-radius: 12px;
  background: rgba(10,14,18,0.95);
  box-shadow: 0 18px 48px rgba(0,0,0,0.5);
  opacity: 0;
}

.tour-panel.is-active .traffic-card { animation: slide-in 450ms cubic-bezier(.2,.8,.2,1) 3000ms both; }
.traffic-card-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.traffic-card-head b { display: block; color: var(--text); font-size: 16px; font-weight: 600; }
.traffic-card-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 8px; background: rgba(255,179,122,0.16); }
.traffic-card-icon svg { width: 11px; height: 19px; rotate: 76deg; }
.traffic-card-status { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.3; }
.traffic-card-status span { padding: 2px 8px; border: 1px solid rgba(242,212,145,0.45); border-radius: 999px; background: rgba(199,148,53,0.14); color: var(--amber-soft); font-weight: 600; }
.traffic-card dl { display: grid; gap: 6px; margin: 0 0 12px; font-size: 13px; line-height: 1.4; }
.traffic-card dl div { display: grid; grid-template-columns: 74px 1fr; gap: 8px; }
.traffic-card dt { color: var(--muted); }
.traffic-card dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; }
.traffic-card u { color: var(--teal-soft); text-decoration-color: rgba(69,205,174,0.5); text-underline-offset: 3px; }

.traffic-save { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 8px; background: var(--teal); color: #04100c; font-size: 13.5px; font-weight: 600; line-height: 1; }
.traffic-save .icon { width: 13px; height: 13px; }
.tour-panel.is-active .traffic-save { animation: go-press 360ms ease 5200ms; }

/*
  Trend: is the arrival normal for the berth? The Area over the same 27 May image, then its monthly
  radar return against the 2024-25 range. Example values. Colours follow the app's Trends panel.
*/
.scene-normal { --ar: 1.5; --fx: 0.5; --fy: 0.5; }
.scene-normal .scene-frame { transform: translateX(-20%); }
.berth-area { fill: rgba(69,205,174,0.14); stroke: var(--conf-low); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.normal-marks .map-label { top: 56%; left: 49%; opacity: 1; transform: translate(-50%, -100%); font-size: 13px; }
.normal-ask { position: absolute; top: 20px; left: 20px; display: flex; align-items: center; gap: 9px; max-width: 40%; margin: 0; padding: 9px 13px 9px 10px; border-radius: 12px 12px 12px 3px; background: rgba(8,12,15,0.9); color: var(--text); font-size: 14.5px; line-height: 1.35; box-shadow: 0 12px 30px rgba(0,0,0,0.4); opacity: 0; }
.normal-ask .avatar { width: 22px; height: 22px; font-size: 9px; }
.tour-panel.is-active .normal-ask { animation: appear-up 450ms ease 400ms both; }

.trend-panel { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: 54%; padding: 0 16px 16px; border-left: 1px solid rgba(141,153,166,0.3); background: rgba(10,14,18,0.97); opacity: 0; }
.tour-panel.is-active .trend-panel { animation: slide-in 450ms cubic-bezier(.2,.8,.2,1) 1400ms both; }
.trend-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 -16px 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.3; }
.trend-chips { display: flex; gap: 6px; }
.trend-chips span { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-soft); font-size: 12px; font-weight: 500; }

/* On short stages the chart gives up height first, so the reading and the Assistant stay whole. */
.trend-chart { display: block; flex: 0 1 auto; width: 100%; height: auto; min-height: 0; overflow: visible; }
.trend-panel > :not(.trend-chart) { flex: none; }
.trend-grid line { stroke: rgba(141,153,166,0.18); stroke-width: 1; }
.trend-grid text,
.trend-years text { fill: var(--muted); font-size: 15px; font-family: var(--body); }
.trend-grid text { text-anchor: end; }
.trend-period { fill: rgba(69,205,174,0.1); }
.trend-band { fill: rgba(154,167,177,0.22); }
.trend-centre { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.trend-line { fill: none; stroke: var(--text-soft); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.tour-panel.is-active .trend-line { animation: draw-line 3000ms linear 2000ms forwards; }
.product-tour.is-static .trend-line { stroke-dashoffset: 0; }
@keyframes draw-line { to { stroke-dashoffset: 0; } }
.trend-pick { stroke: rgba(238,242,244,0.45); stroke-width: 1; }
.trend-marker { fill: #11161c; stroke: var(--text); stroke-width: 2.5; }
.trend-pick,
.trend-marker,
.trend-reading > *,
.trend-assistant { opacity: 0; }
.tour-panel.is-active :is(.trend-pick, .trend-marker) { animation: appear 300ms ease 5100ms both; }

.trend-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.trend-legend span { display: inline-flex; align-items: center; gap: 6px; }
.trend-legend i { display: inline-block; width: 14px; border-radius: 3px; }
.swatch-line { height: 2px; background: var(--text-soft); }
.swatch-band { height: 10px; background: rgba(154,167,177,0.36); }
.swatch-period { height: 10px; background: rgba(69,205,174,0.26); }

.trend-reading { margin-top: 14px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,0.025); }
.trend-reading p { margin: 0; color: var(--text-soft); font-size: 13.5px; line-height: 1.45; }
.trend-reading b { color: var(--text); font-size: 17px; font-weight: 600; }
.trend-reading .trend-above { color: var(--teal-soft); font-weight: 600; }
.tour-panel.is-active .trend-reading > * { animation: appear-up 400ms ease 5400ms both; }

/* The Assistant reads the chart back in plain words. */
.trend-assistant { margin: 12px 0 0; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(69,205,174,0.07); color: var(--text-soft); font-size: 14px; line-height: 1.45; }
.trend-assistant span { display: block; margin-bottom: 3px; color: var(--teal-soft); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.tour-panel.is-active .trend-assistant { animation: appear-up 450ms ease 6600ms both; }

@container (max-width: 820px) {
  .trend-panel { width: 58%; padding: 0 12px 12px; }
  .trend-head { margin: 0 -12px 8px; padding: 10px 12px; }
  .trend-legend { font-size: 11.5px; }
  .trend-reading { margin-top: 10px; padding: 8px 11px; }
  .trend-reading b { font-size: 15px; }
  .trend-reading p,
  .trend-assistant { font-size: 12.5px; }
  .trend-assistant { margin-top: 8px; padding: 8px 11px; }
  .normal-ask { font-size: 13px; }
}

/* Phones: the question over the berth, then the panel takes the stage, as the Assistant does in step 01. */
@container (max-width: 560px) {
  .scene-normal .scene-frame { transform: none; }
  .normal-ask { top: 10px; left: 10px; max-width: calc(100% - 20px); }
  .trend-panel { width: 100%; padding: 0 12px 10px; border-left: 0; }
  .trend-head { margin-bottom: 4px; padding: 8px 12px; font-size: 13.5px; }
  .trend-legend,
  .trend-chips span:first-child { display: none; }
}

/*
  Sources: a small ARTEM you can use. A browser strip whose other tabs close as their sources are
  connected, the harbour map, and a Sources panel with Imagery and Tracking. main.js keeps the state.
*/
.sources-heading h2 { font-size: 60px; }

.src-demo { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #05070a; }

.src-browser { display: flex; align-items: flex-end; gap: 4px; height: 46px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); background: #0c1015; }
.src-tab { display: inline-flex; flex: none; align-items: center; gap: 8px; max-width: 230px; height: 37px; padding: 0 10px 0 12px; overflow: hidden; border-radius: 10px 10px 0 0; background: rgba(255,255,255,0.035); color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; transition: max-width 500ms cubic-bezier(.4,0,.2,1), padding 500ms cubic-bezier(.4,0,.2,1), opacity 300ms ease, margin 500ms ease; }
.src-tab.is-artem { position: relative; top: 1px; height: 38px; background: #05070a; color: var(--text); box-shadow: inset 0 1px 0 var(--line), inset 1px 0 0 var(--line), inset -1px 0 0 var(--line); }
.src-tab img { width: 18px; height: auto; }
.src-favicon { display: grid; width: 16px; height: 16px; flex: none; place-items: center; border-radius: 4px; background: var(--f); color: #fff; font-size: 10px; font-style: normal; font-weight: 700; }
.src-tab b { display: grid; width: 18px; height: 18px; place-items: center; margin-left: 4px; border-radius: 5px; }
.src-tab b svg { width: 10px; height: 10px; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; }
.src-tab.is-closed { max-width: 0; margin: 0 -4px 0 0; padding: 0; opacity: 0; }
.src-tab.is-closing b { background: rgba(255,255,255,0.12); }
.src-one-tab { display: inline-flex; align-items: center; gap: 7px; align-self: center; margin-left: auto; color: var(--teal-soft); font-size: 13px; font-weight: 600; white-space: nowrap; opacity: 0; transform: translateX(8px); transition: opacity 400ms ease 300ms, transform 400ms ease 300ms; }
.src-one-tab .icon { color: var(--teal); stroke-width: 2.2; }
.src-demo.is-one-tab .src-one-tab { opacity: 1; transform: none; }
.src-short { display: none; }

.src-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; height: 640px; }

/* The map: four real layers of the same box over Le Havre, 2000 x 1250. Marks are fractions of it. */
.src-map { position: relative; overflow: hidden; container-type: size; }
.src-frame {
  --ar: 1.6;
  --fx: 0.45;
  --fy: 0.42;
  --fw: max(100cqw, 100cqh * var(--ar));
  --fh: calc(var(--fw) / var(--ar));
  --fl: clamp(100cqw - var(--fw), 50cqw - var(--fx) * var(--fw), 0px);
  --ft: clamp(100cqh - var(--fh), 50cqh - var(--fy) * var(--fh), 0px);
}
.src-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 700ms ease, filter 500ms ease; }
.src-layer.is-active { opacity: 1; }
.src-layer picture,
.src-layer img { display: block; width: 100%; height: 100%; }
.src-map.is-tracking .src-layer { filter: brightness(0.62) saturate(0.8); }
.src-marks { position: absolute; inset: 0; }

.src-ship,
.src-plane { position: absolute; top: var(--y0); left: var(--x0); opacity: 0; pointer-events: none; transition: opacity 400ms ease; }
.src-ship { width: 12px; height: 20px; margin: -10px 0 0 -6px; }
.src-plane { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
.src-ship svg,
.src-plane svg { display: block; width: 100%; height: 100%; overflow: visible; rotate: var(--course); filter: drop-shadow(0 0 3px rgba(16,35,44,0.95)); }
.src-ship path { fill: #ffb37a; fill-opacity: 0.66; stroke: #10232c; stroke-width: 1.4; stroke-linejoin: round; }
.src-ship.is-underway path { fill-opacity: 1; }
.src-plane path { fill: #69dbe9; stroke: #10232c; stroke-width: 1; stroke-linejoin: round; }
.src-ship.is-on,
.src-plane.is-on { opacity: 1; pointer-events: auto; transition-delay: calc(var(--i) * 45ms); }
.src-plane.is-on { animation: src-move var(--dur) linear var(--delay) infinite; }
.src-ship.is-underway.is-on { animation: src-move 70s ease-in-out calc(var(--i) * -9s) infinite alternate; }
@keyframes src-move { from { top: var(--y0); left: var(--x0); } to { top: var(--y1); left: var(--x1); } }
/* New arrivals ping once, so it is clear which marks a source brought. */
.src-ship.is-new::before,
.src-plane.is-new::before { content: ""; position: absolute; inset: -9px; border: 2px solid currentColor; border-radius: 50%; animation: src-ping 900ms ease-out calc(var(--i) * 45ms) both; }
.src-ship { color: #ffb37a; }
.src-plane { color: #69dbe9; }
@keyframes src-ping { from { opacity: 0.9; transform: scale(0.4); } to { opacity: 0; transform: scale(1.5); } }

/* Hovering a mark says what it is and where it came from. */
.src-ship::after,
.src-plane::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; padding: 4px 9px; border: 1px solid rgba(141,153,166,0.35); border-radius: 8px; background: rgba(8,12,15,0.95); color: var(--text); font-size: 12px; font-weight: 500; line-height: 1.35; white-space: nowrap; opacity: 0; pointer-events: none; transform: translateX(-50%); transition: opacity 150ms ease; }
.src-ship:hover::after,
.src-plane:hover::after { opacity: 1; }
.src-ship:hover,
.src-plane:hover { z-index: 2; }

.src-chip { position: absolute; top: 16px; left: 16px; display: grid; gap: 1px; margin: 0; padding: 9px 13px 10px; border: 1px solid rgba(141,153,166,0.3); border-radius: 12px; background: rgba(8,12,15,0.88); color: var(--muted); font-size: 12.5px; line-height: 1.35; backdrop-filter: blur(8px); }
.src-chip span:first-child { color: var(--teal-soft); font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.src-chip b { color: var(--text); font-size: 16px; font-weight: 600; }
.src-live { position: absolute; top: 16px; right: 16px; display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 7px 12px; border: 1px solid rgba(141,153,166,0.3); border-radius: 999px; background: rgba(8,12,15,0.88); color: var(--text); font-size: 13px; font-weight: 600; opacity: 0; transition: opacity 300ms ease; }
.src-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(69,205,174,0.2); }
.src-map.has-traffic .src-live { opacity: 1; }
.src-credit { position: absolute; right: 10px; bottom: 8px; margin: 0; color: rgba(238,242,244,0.72); font-size: 11px; text-shadow: 0 1px 3px #000; }

/* The panel. */
.src-panel { display: flex; flex-direction: column; min-height: 0; padding: 16px 16px 12px; overflow: auto; border-left: 1px solid var(--line); background: #0b0f13; }
.src-title { margin: 0 0 12px; color: var(--text); font-size: 17px; font-weight: 600; line-height: 1.3; }
.src-tabs { display: flex; gap: 4px; margin-bottom: 6px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; }
.src-tabs button { flex: 1; padding: 7px 0; border: 0; border-radius: 7px; background: none; color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.3; cursor: pointer; transition: background 200ms ease, color 200ms ease; }
.src-tabs button:hover { color: var(--text); }
.src-tabs button[aria-selected="true"] { background: rgba(69,205,174,0.15); color: var(--text); }
.src-list[hidden] { display: none; }
.src-list ul { margin: 0; padding: 0; list-style: none; }
.src-group { margin: 12px 4px 2px; color: var(--muted-2); font-size: 10.5px; font-weight: 600; line-height: 1.4; letter-spacing: 0.12em; text-transform: uppercase; }
.src-list li { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px; border-top: 1px solid var(--line); }
.src-list li:first-child { border-top: 0; }
/* One line per source: the name, then what it is, cut short if it must be. */
.src-name { display: flex; flex: 1; align-items: baseline; gap: 8px; min-width: 0; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.src-name b { flex: none; color: var(--text); font-size: 14.5px; font-weight: 600; }
.src-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-info .src-name { padding-left: 28px; }
.src-off b { color: var(--text-soft); }
.src-access { color: var(--muted-2); font-size: 12px; white-space: nowrap; }

.src-option { display: flex; flex: 1; align-items: center; gap: 12px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.src-option:hover b { color: var(--teal-soft); }
.src-radio { width: 16px; height: 16px; flex: none; border: 2px solid rgba(238,242,244,0.32); border-radius: 50%; transition: border-color 200ms ease, box-shadow 200ms ease; }
.src-option[aria-pressed="true"] .src-radio { border-color: var(--teal); box-shadow: inset 0 0 0 3px #0b0f13, inset 0 0 0 8px var(--teal); }
.src-sub { display: none !important; }
.src-sub .src-option { padding-left: 16px; }
.src-demo.has-copernicus .src-sub { display: flex !important; animation: appear-up 350ms ease both; }

.src-connect { display: inline-grid; flex: none; padding: 5px 12px; border: 1px solid rgba(238,242,244,0.26); border-radius: 8px; background: none; color: var(--text); font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: border-color 200ms ease, background 200ms ease; }
.src-connect:hover { border-color: var(--teal); background: rgba(69,205,174,0.1); }
.src-connect span { grid-area: 1 / 1; text-align: center; }
.src-connect span:last-child { opacity: 0; }
.src-connect.is-checking span:first-child { opacity: 0; }
.src-connect.is-checking span:last-child { opacity: 1; animation: src-checking 800ms ease-in-out infinite alternate; }
@keyframes src-checking { from { opacity: 0.45; } }
.src-connected { display: none; align-items: center; gap: 7px; color: var(--text-soft); font-size: 13px; font-weight: 500; white-space: nowrap; }
.src-connected i { width: 7px; height: 7px; border-radius: 50%; background: var(--conf-high); }
.src-account.is-connected :is(.src-connect, .src-access) { display: none; }
.src-account.is-connected .src-connected { display: inline-flex; }

.src-switch { position: relative; width: 36px; height: 21px; flex: none; padding: 0; border: 0; border-radius: 999px; background: rgba(238,242,244,0.16); cursor: pointer; transition: background 200ms ease; }
.src-switch i { position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #e6ecee; transition: transform 200ms ease; }
.src-switch[aria-checked="true"] { background: var(--teal); }
.src-switch[aria-checked="true"] i { transform: translateX(15px); background: #04100c; }
.src-feed:not(.is-built-in):not(.is-connected) .src-switch,
.src-feed.is-connected .src-connect { display: none; }

.src-more { margin: 8px 4px 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.src-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: auto 0 0; padding: 12px 4px 0; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 12px; line-height: 1.4; }
.src-reset { padding: 0; border: 0; background: none; color: var(--teal-soft); font-size: 12px; font-weight: 600; cursor: pointer; }
.src-reset:hover { color: var(--text); }
:is(.src-option, .src-connect, .src-switch, .src-tabs button, .src-reset):focus-visible { outline: 2px solid var(--teal-soft); outline-offset: 2px; }

/* While it plays on its own, the control about to be used lights up first. */
.is-about-to { box-shadow: 0 0 0 3px rgba(69,205,174,0.5); }
.src-option.is-about-to { box-shadow: none; }
.src-option.is-about-to .src-radio { box-shadow: 0 0 0 4px rgba(69,205,174,0.35); }

.src-keys { display: inline-flex; align-items: center; gap: 6px; color: var(--teal-soft); font-weight: 600; }
.src-keys .icon { width: 13px; height: 13px; }

@media (max-width: 1000px) {
  .src-body { grid-template-columns: 1fr; height: auto; }
  .src-map { aspect-ratio: 16 / 10; }
  .src-panel { border-top: 1px solid var(--line); border-left: 0; overflow: visible; }
  .sources-heading h2 { font-size: 48px; }
}

@media (max-width: 620px) {
  .sources-heading h2 { font-size: 36px; }
  .src-map { aspect-ratio: 1 / 1; }
  .src-browser { padding: 8px 8px 0; }
  .src-tab { max-width: 46px; padding: 0 9px; gap: 0; font-size: 0; }
  .src-tab.is-artem { max-width: none; padding: 0 12px; gap: 7px; font-size: 13px; }
  .src-tab b { display: none; }
  .src-long { display: none; }
  .src-short { display: inline; }
  .src-tab.is-closed { max-width: 0; padding: 0; }
  .src-chip { top: 10px; left: 10px; padding: 7px 10px 8px; }
  .src-chip b { font-size: 14px; }
  .src-live { top: auto; right: 10px; bottom: 26px; }
  .src-ship::after,
  .src-plane::after { display: none; }
}

/*
  Workflow: one investigation in six steps, all on the same harbour on 22 and 27 May 2026. Each
  step plays on its own and has one thing to try; trying it holds the tour (main.js). State the
  visitor sets is shown without animations, so it stays visible while the tour is held.
*/
.tour-six .tour-tabs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tour-six .tour-tab { padding-right: 20px; font-size: 13.5px; }
.tour-six .step-title { font-size: 16px; }
.tour-six .tour-stage { max-height: max(380px, calc(100vh - 320px)); max-height: max(380px, calc(100svh - 320px)); }
.tour-six .tour-panel { --ar: 1.5; --fx: 0.5; --fy: 0.5; }
@media (max-width: 1100px) {
  .tour-six .tour-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .tour-six .tour-tabs { grid-template-columns: 1fr; row-gap: 0; }
}

[data-interactive] button { font: inherit; cursor: pointer; }

.try-hint { position: absolute; right: 0; bottom: 20px; left: 0; z-index: 3; width: max-content; margin: 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 10px; border: 1px solid rgba(238,242,244,0.22); border-radius: 10px; background: rgba(8,12,15,0.88); color: var(--text-soft); font-size: 13px; font-weight: 500; line-height: 1.3; white-space: nowrap; opacity: 0; pointer-events: none; }
.try-hint .icon { width: 14px; height: 14px; color: var(--teal); }
.tour-panel.is-active .try-hint { animation: appear-up 400ms ease var(--on) both; }
.tour-panel.is-active .try-hint[style*="--off"] { animation: appear-up 400ms ease var(--on) both, disappear 300ms ease var(--off) forwards; }
.assistant-thread .try-hint,
.trend-panel .try-hint { position: static; align-self: flex-start; margin: 0; }
.trend-panel .try-hint { margin-top: 10px; }

/* 01 Place: type the coordinates, fly in, then Maya outlines the berth (49%, 59.7% of the image). */
.scene-place { --fx: 0.49; --fy: 0.597; }
.place-frame { transform-origin: 49% 59.7%; }
.tour-panel.is-active .place-frame { animation: place-zoom 1700ms cubic-bezier(.5,0,.2,1) 2100ms both; }
@keyframes place-zoom { from { transform: scale(1); } to { transform: scale(1.5); } }
.place-area { fill: transparent; stroke: var(--level, var(--conf-low)); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke 300ms ease, fill 300ms ease; }
.tour-panel.is-active .place-area { animation: mark-draw 2200ms linear 4300ms forwards, place-fill 400ms ease 6500ms forwards; }
@keyframes place-fill { to { fill: var(--level-fill, rgba(69,205,174,0.14)); } }
.scene-place[data-level] .place-area { animation: none; stroke-dashoffset: 0; fill: var(--level-fill); }
.scene-place[data-level="medium"] { --level: var(--amber); --level-fill: rgba(199,148,53,0.18); }
.scene-place[data-level="high"] { --level: var(--conf-high); --level-fill: rgba(34,197,94,0.16); }
.scene-place[data-level="low"] { --level: var(--conf-low); --level-fill: rgba(69,205,174,0.14); }

/* The cursor sits in the zoomed frame, so it is drawn at 1 / 1.5 to keep its size. */
.scene-place .place-cursor { top: 57.75%; left: 39%; scale: 0.667; transform-origin: 0 0; opacity: 0; animation: none; }
.tour-panel.is-active .place-cursor { animation: appear 250ms ease 3900ms both, place-trace 2200ms linear 4300ms both, disappear 300ms ease 7000ms forwards; }
@keyframes place-trace {
  0% { top: 57.75%; left: 39%; }
  38% { top: 55.9%; left: 58.5%; }
  48% { top: 61.75%; left: 59%; }
  88% { top: 63.4%; left: 39.5%; }
  100% { top: 57.75%; left: 39%; }
}

.tour-panel.is-active .place-card { animation-delay: 6500ms; }
.confidence-pick { display: inline-flex; gap: 3px; margin: 0 0 12px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; }
.confidence-pick button { padding: 4px 11px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.3; transition: background 200ms ease, color 200ms ease; }
.confidence-pick button:hover { color: var(--text); }
.confidence-pick .is-on[data-confidence="low"] { background: rgba(69,205,174,0.16); color: var(--teal-soft); }
.confidence-pick .is-on[data-confidence="medium"] { background: rgba(199,148,53,0.2); color: var(--amber-soft); }
.confidence-pick .is-on[data-confidence="high"] { background: rgba(34,197,94,0.18); color: #9be7b1; }
.place-card .card-chips { margin: 12px 0 0; }

/* 02 Ask: Run is a real button. Pressing it shows the layer at once. */
button.assistant-run { border: 0; }
button.assistant-run:hover { background: var(--teal-soft); }
.scene-assistant.is-run :is(.run-layer, .assistant-added) { animation: none !important; opacity: 1; transition: opacity 500ms ease; }
.scene-assistant.is-run .assistant-run b:first-child { animation: none !important; opacity: 0; }
.scene-assistant.is-run .assistant-run b:last-child { animation: none !important; opacity: 1; }
.scene-assistant.is-run .assistant-cursor { animation: none !important; opacity: 0; }

/* 03 Detect: the sweep between dates hands over to the change layer; dragging keeps the two dates. */
.tour-panel.scene-detect.is-active:not(.is-manual) :is(.compare-divider, .compare-date) { animation: disappear 300ms ease 6600ms forwards; }
.scene-detect.is-manual :is(.detect-change, .change-legend, .change-tag) { animation: none !important; opacity: 0; }
.scene-detect .change-legend { left: 20px; }

/* 04 Trend: pointing at the chart reads that month. */
.trend-chart[data-interactive] { cursor: crosshair; touch-action: pan-y; }
.trend-panel.is-reading :is(.trend-pick, .trend-marker, .trend-reading > *) { animation: none !important; opacity: 1; }
.trend-panel.is-reading .trend-line { animation: none !important; stroke-dashoffset: 0; }
.trend-reading .trend-within { color: var(--muted); font-weight: 600; }
.trend-reading .trend-below { color: #f2b8a9; font-weight: 600; }

/* 05 Team: Jonas picks the tanker, adds its record, and the thread raises the confidence. */
.team-ships { z-index: 1; pointer-events: none; }
.team-ships .vessel { pointer-events: auto; }
.scene-team :is(.traffic-card, .team-thread, .team-presence, .traffic-toggles) { z-index: 2; }
.team-ships .vessel { padding: 0; border: 0; background: none; cursor: pointer; }
.team-ships .vessel::before { content: ""; position: absolute; inset: -10px -12px; }
.team-ships .vessel:hover path { fill-opacity: 1; }
.team-ships .vessel.is-chosen::after { opacity: 1 !important; animation: none !important; }
.scene-team.is-open .vessel.is-picked:not(.is-chosen)::after { animation: none !important; opacity: 0; }
.scene-team .team-cursor { top: 30%; left: 80%; opacity: 0; animation: none; }
.tour-panel.is-active .team-cursor { animation: appear 250ms ease 600ms both, team-pick 1400ms cubic-bezier(.4,0,.2,1) 800ms both, disappear 300ms ease 5000ms forwards; }
@keyframes team-pick { to { top: 60.4%; left: 48.3%; } }
.scene-team .traffic-card { top: var(--card-top, calc(var(--ft) + 0.604 * var(--fh) - 36px)); left: var(--card-left, calc(var(--fl) + 0.483 * var(--fw) + 26px)); }
.scene-team.is-active .traffic-card { animation: slide-in 450ms cubic-bezier(.2,.8,.2,1) 2600ms both, disappear 300ms ease 5200ms forwards; }
.scene-team.is-active .traffic-save { animation: go-press 360ms ease 4300ms; }
.scene-team.is-open .traffic-card { animation: none !important; opacity: 1; }
.scene-team.is-open .team-cursor { animation: none !important; opacity: 0; }

.team-presence { position: absolute; top: 20px; right: 20px; display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 6px 12px 6px 6px; border: 1px solid rgba(141,153,166,0.3); border-radius: 999px; background: rgba(8,12,15,0.9); color: var(--text); font-size: 13px; font-weight: 600; }
.team-presence .avatar { width: 24px; height: 24px; font-size: 9px; }

.team-thread { position: absolute; right: 20px; bottom: 20px; width: min(340px, 40%); padding: 14px 16px; border: 1px solid rgba(141,153,166,0.3); border-radius: 14px; background: rgba(10,13,17,0.95); box-shadow: 0 20px 50px rgba(0,0,0,0.5); opacity: 0; }
.tour-panel.is-active .team-thread { animation: slide-in 450ms cubic-bezier(.2,.8,.2,1) 5300ms both; }
.team-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 10px; color: var(--text); font-size: 15.5px; font-weight: 600; line-height: 1.3; }
.team-confidence { display: inline-grid; flex: none; font-size: 12px; font-weight: 600; }
.team-confidence b { grid-area: 1 / 1; font-weight: 600; }
.team-confidence b:last-child { opacity: 0; }
.tour-panel.is-active .team-confidence { animation: confidence-to-high 1ms linear 8700ms forwards; }
.tour-panel.is-active .team-confidence b:first-child { animation: disappear 200ms ease 8700ms forwards; }
.tour-panel.is-active .team-confidence b:last-child { animation: appear 200ms ease 8700ms both; }
@keyframes confidence-to-high { to { border-color: rgba(74,222,128,0.42); background: rgba(34,197,94,0.12); color: #9be7b1; } }
.team-thread ol { display: grid; gap: 10px; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--line); list-style: none; }
.team-thread li { display: flex; gap: 9px; opacity: 0; }
.tour-panel.is-active .team-thread li { animation: appear-up 400ms ease var(--on) both; }
.team-thread .avatar { width: 24px; height: 24px; flex: none; font-size: 9px; }
.team-thread li p { margin: 0; color: var(--text-soft); font-size: 13.5px; line-height: 1.45; }
.team-thread li b { display: block; color: var(--text); font-size: 12.5px; font-weight: 600; }
.scene-team .try-hint { right: auto; left: 20px; margin: 0; }

/* 06 Brief: four sources, so a size smaller. */
.scene-brief .brief-sources dd { font-size: 12.5px; }

@container (max-width: 820px) {
  .team-thread { width: min(300px, 46%); padding: 12px 14px; }
  .team-thread li p { font-size: 12.5px; }
}

@container (max-width: 560px) {
  .tour-panel .try-hint:not(.assistant-thread .try-hint) { display: none; }
  .team-presence { display: none; }
  /* The card sits under the search, and the zoom keeps the berth below it. */
  .place-frame { transform-origin: 49% 30%; }
  .place-card { top: 64px; bottom: auto; }
  .place-card .card-chips { display: none; }
  .confidence-pick { margin-bottom: 0; }
  .scene-team .traffic-card { top: auto; left: 10px; }
  .team-thread { right: 10px; bottom: 10px; left: 10px; width: auto; padding: 10px 12px; }
  .team-thread li:first-child { display: none; }
  .scene-detect .change-legend { left: 10px; }
}

/* Under the story: every change method over its own colour scale (lib/imagery/change-detection.ts). */
.method-strip { margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--line); }
.method-strip p { margin: 0 0 16px; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.4; letter-spacing: 0.12em; text-transform: uppercase; }
.method-strip ul { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.method-strip li { display: grid; gap: 10px; color: var(--text); font-size: 16px; font-weight: 600; line-height: 1.3; }
.method-strip i { display: block; height: 6px; border-radius: 999px; }

/* Narrower: one method per row, every scale the same length. */
@media (max-width: 1000px) {
  .method-strip ul { grid-template-columns: 1fr; gap: 12px; }
  .method-strip li { grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
}

/* The whole workspace at a glance: six short lists. */
.features .section-heading { margin-bottom: 40px; }
.features .section-heading h2 { margin-bottom: 0; }
.feature-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.feature-index > li { padding: 30px 28px 32px 0; border-bottom: 1px solid var(--line); }
.feature-index > li:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.feature-index h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: 20px; }
.feature-index ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.feature-index ul li { position: relative; padding-left: 18px; color: var(--text-soft); font-size: 15.5px; line-height: 1.45; }
.feature-index ul li::before { content: "\2013"; position: absolute; top: 0; left: 0; color: var(--teal); }

@media (max-width: 1000px) {
  .feature-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-index > li:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .feature-index > li:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line); }
}

@media (max-width: 620px) {
  .feature-index { grid-template-columns: 1fr; }
  .feature-index > li,
  .feature-index > li:nth-child(even) { padding: 24px 0 26px; border-left: 0; }
}

/* Phone-sized stages: tuck everything to the edges, and let the Assistant fill the stage until Run. */
@container (max-width: 560px) {
    .change-legend { left: 10px; border-radius: 12px; }

  .change-legend { right: 10px; bottom: 10px; gap: 4px 12px; padding: 8px 10px; font-size: 11.5px; }
  .change-legend i { width: 10px; height: 10px; margin-right: 5px; }
  .change-tag { padding: 2px 8px; font-size: 12px; }

  .scene-assistant .scene-frame { transform: none; }
  .assistant-panel { width: 100%; border-left: 0; }
  .tour-panel.is-active .assistant-panel { animation: disappear 500ms ease 8000ms forwards; }
  .assistant-head { padding: 10px 14px; }
  .assistant-thread { gap: 10px; padding: 12px 14px; }
  .assistant-ask,
  .assistant-answer { font-size: 13.5px; }
  .assistant-input { display: none; }
  .assistant-added { top: 10px; left: 10px; font-size: 13px; }

  .traffic-toggles { top: 10px; left: 10px; font-size: 12.5px; }
  .traffic-toggles span { padding: 5px 9px; }
  .traffic-toggles span:not(.is-on) { display: none; }
  .traffic-card { top: auto; right: 10px; bottom: 10px; left: 10px; width: auto; padding: 10px 12px 12px; }
  .traffic-card-status { position: absolute; top: 14px; right: 12px; margin: 0; }
  .traffic-card dl { margin-bottom: 10px; }
  .traffic-card dl div:not(:last-child) { display: none; }

}

/* Compartments: three big switches over one map; locks mark what each team cannot see. */
.teamwork { border-top: 1px solid var(--line); }
.section-code { margin-bottom: 18px; color: var(--teal-soft); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.teamwork-copy { max-width: 780px; margin-bottom: 40px; }
.teamwork-copy h2 { margin-bottom: 20px; font-size: 44px; }
.teamwork-intro > p { margin-bottom: 12px; color: var(--text-soft); font-size: 18px; }

.compartment-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }

.compartment-switch button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 14px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15,18,23,0.72);
  color: var(--muted);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease;
}

.compartment-switch button:hover { border-color: rgba(141,153,166,0.45); }
.compartment-switch button[aria-selected="true"] { border-color: var(--line-strong); background: rgba(69,205,174,0.08); color: var(--text-soft); }
.compartment-switch button:focus-visible { outline: 2px solid var(--teal-soft); outline-offset: 3px; }

.switch-avatars { display: flex; gap: 3px; }
.switch-avatars .avatar { width: 30px; height: 30px; font-size: 11px; }
.person-sam { --c: var(--sam); }
.avatar-eye { --c: #d7dddf; }
.avatar-eye .icon { width: 17px; height: 17px; color: #0b0e12; }
.switch-text { display: grid; gap: 2px; line-height: 1.35; }
.switch-text b { color: var(--text); font-size: 17px; font-weight: 600; }

.compartment-switch .tab-progress { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: var(--teal); transform: scaleX(0); transform-origin: left; }
.compartment-switch button[aria-selected="true"] .tab-progress { animation: tab-progress var(--tab-duration, 5000ms) linear forwards; }
.compartment-example.is-paused .compartment-switch button .tab-progress { animation-play-state: paused; }
.compartment-example.is-static .tab-progress { display: none; }

.compartment-stage { display: grid; }
.compartment-panel { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 450ms ease, visibility 0s linear 450ms; }
.compartment-panel.is-active { opacity: 1; visibility: visible; transition: opacity 450ms ease; }

.compartment-map { position: relative; overflow: hidden; aspect-ratio: 2766 / 1346; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.compartment-map picture { display: block; }
.compartment-map img { display: block; width: 100%; height: auto; }
/* The combined capture is shifted 26 source pixels vertically. Keep files unchanged. */
.compartment-map .compartment-image-all { transform: translateY(-1.895044%); }

/* Positions are fractions of the full capture (2766 x 1446 before it was resized). */
.compartment-overlay { position: absolute; top: 0; right: 0; left: 0; aspect-ratio: 2766 / 1446; }

.compartment-lock {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 9px;
  border: 1px dashed rgba(242,212,145,0.6);
  border-radius: 999px;
  background: rgba(8,12,15,0.88);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  transform: translate(-50%, -50%);
}

.compartment-lock .icon,
.compartment-status .icon { width: 15px; height: 15px; }
.compartment-lock .icon { color: var(--amber-soft); }

.compartment-status {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 15px;
  border: 1px solid rgba(242,212,145,0.45);
  border-radius: 999px;
  background: rgba(8,12,15,0.9);
  color: var(--amber-soft);
  font-size: 15px;
  font-weight: 600;
}

.compartment-status.is-open { border-color: var(--line-strong); color: var(--teal-soft); }
.compartment-example-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; }

/* Inline links */
.inline-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--teal-soft); font-size: 13px; font-weight: 600; }

/* Trust and use cases */
.trust { background: var(--bg); }
.trust-list { border-top: 1px solid var(--line); }
.trust-list article {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: baseline;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.trust-list h3 { margin: 0; font-size: 18px; }
.trust-list p { margin: 0; color: var(--text-soft); font-size: 15px; }
.beta-caveat { margin: 16px 0 0; color: var(--amber-soft); font-size: 14px; }

/* Mission */
.mission { border-top: 1px solid var(--line); }
.mission .section-code { margin-bottom: 22px; }
/* The deck's tangle of apps beside the statement. Without script (or with reduced motion) the stage
   shows its last frame: the ARTEM mark on its own. */
.mission-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 64px; align-items: center; margin-bottom: 80px; }
/* No box: the tiles, arrows and glow sit straight on the page. Arrows are kept inside the frame. */
.mission-stage { position: relative; container-type: inline-size; aspect-ratio: 727 / 406; }
.mission-stage::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 46%, rgba(69,205,174,0.16), transparent 42%); opacity: 1; transition: opacity 900ms ease; pointer-events: none; }
.mission-apps { position: absolute; inset: 0; }
.mission-app {
  --mx: 0px;
  --my: 0px;
  --s: 1;
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: 8.8cqw;
  aspect-ratio: 1;
  opacity: 1;
  transform: translate(-50%, -50%) translate(var(--mx), var(--my)) rotate(var(--r)) scale(var(--s));
  transition: transform 700ms cubic-bezier(.55,0,.75,.2), opacity 450ms ease, filter 700ms ease;
}
.mission-app > span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 22%; background: var(--bg); color: var(--ink, #fff); font-size: var(--fs, 3.6cqw); font-weight: 800; line-height: 1; letter-spacing: -0.02em; box-shadow: 0 0.6cqw 1.6cqw rgba(0,0,0,0.45); }
.mission-app img { width: 56%; height: auto; }
.mission-glyph { width: 54%; height: auto; fill: none; stroke: #fff; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.mission-arrows { position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: 50% 50%; transition: transform 700ms cubic-bezier(.55,0,.75,.2), opacity 600ms ease; }
.mission-arrows g path { fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; transition: stroke-dashoffset 520ms ease-out; }
.mission-arrows marker path { fill: var(--teal); }
.mission-mark { position: absolute; left: 50%; top: 44%; width: 21%; height: auto; transform: translate(-50%, -50%); transition: opacity 500ms ease, transform 800ms cubic-bezier(.25,1.45,.5,1); }
.mission-caption { position: absolute; left: 50%; top: 74%; margin: 0; color: var(--text); font-size: max(15px, 2.9cqw); font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; transform: translateX(-50%); transition: opacity 600ms ease 350ms, transform 600ms ease 350ms; }
.mission-caption span { color: var(--teal); }
.mission-replay { position: absolute; left: 50%; top: 86%; transform: translateX(-50%); padding: 6px 10px; border: 0; background: none; color: var(--muted); font: 600 12px/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.mission-replay:hover,
.mission-replay:focus-visible { color: var(--teal-soft); }

.mission-stage:not([data-phase]) .mission-app,
.mission-stage[data-phase="idle"] .mission-app { --s: 0.6; opacity: 0; }
.mission-stage[data-phase="idle"] .mission-mark,
.mission-stage[data-phase="tangle"] .mission-mark,
.mission-stage[data-phase="collapse"] .mission-mark { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
.mission-stage[data-phase="idle"] .mission-caption,
.mission-stage[data-phase="tangle"] .mission-caption,
.mission-stage[data-phase="collapse"] .mission-caption { opacity: 0; transform: translate(-50%, 8px); transition-delay: 0ms; }
.mission-stage[data-phase="idle"]::after,
.mission-stage[data-phase="tangle"]::after,
.mission-stage[data-phase="collapse"]::after { opacity: 0; }
/* The arrows strangle the apps: they shake harder and lose their colour. */
.mission-stage[data-strain] .mission-app > span { animation: mission-strain 420ms ease-in-out infinite; }
.mission-stage[data-strain="1"] .mission-app { --a: 0.15cqw; }
.mission-stage[data-strain="2"] .mission-app { --a: 0.3cqw; filter: saturate(0.6) brightness(0.85); }
.mission-stage[data-strain="3"] .mission-app { --a: 0.5cqw; filter: saturate(0.25) brightness(0.65); }
.mission-stage[data-strain] .mission-app:nth-child(odd) > span { animation-duration: 360ms; animation-direction: reverse; }
@keyframes mission-strain {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(var(--a), calc(var(--a) * -0.6)) rotate(1.5deg); }
  75% { transform: translate(calc(var(--a) * -0.8), calc(var(--a) * 0.5)) rotate(-1.5deg); }
}
/* Everything is pulled into the middle, where the mark appears. */
.mission-stage[data-phase="collapse"] .mission-app,
.mission-stage[data-phase="done"] .mission-app { --mx: calc((50 - var(--x)) * 1cqw); --my: calc((50 - var(--y)) * 0.5585cqw); --s: 0.2; opacity: 0; }
.mission-stage[data-phase="collapse"] .mission-arrows,
.mission-stage[data-phase="done"] .mission-arrows { opacity: 0; transform: scale(0.05); }
/* Visible while they fly in, then gone as the mark lands. */
.mission-stage[data-phase="collapse"] .mission-app { transition: transform 650ms cubic-bezier(.7,0,.3,1), opacity 250ms ease 420ms, filter 300ms ease; }
.mission-stage[data-phase="collapse"] .mission-arrows { transition: transform 650ms cubic-bezier(.7,0,.3,1), opacity 250ms ease 400ms; }

.mission-statement { margin: 0; font-size: 30px; font-weight: 600; line-height: 1.28; letter-spacing: -0.02em; }
.mission-was { color: var(--muted); }
.mission-now { color: var(--text); }
.mission-statement.is-scripted .word { opacity: 0.18; transition: opacity 300ms ease; }
.mission-statement.is-scripted .word.is-lit { opacity: 1; }
/* Who it's for, in the seed deck's card format: a picture, the role, the question they bring. */
.audience-title { margin: 0 0 24px; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.audience-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.audience-cards li { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.audience-image { display: block; aspect-ratio: 265 / 123; overflow: hidden; border-bottom: 1px solid var(--line); background: #11181d; }
.audience-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.audience-role { margin: 18px 18px 8px; color: var(--teal-soft); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.audience-cards h4 { margin: 0 18px 18px; font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.audience-who { margin: auto 18px 18px; color: var(--muted); font-size: 13px; }
.audience-note { margin: 12px 0 0; color: var(--muted-2); font-size: 12px; }

/* FAQ */
.faq-layout { display: grid; grid-template-columns: .78fr 1.22fr; gap: 80px; }
/* The heading stays beside the questions while they scroll past. */
.faq-layout > .section-heading { position: sticky; top: calc(var(--header) + 40px); align-self: start; }
.faq .section-code,
.trust .section-code { margin-bottom: 18px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; padding: 23px 42px 23px 0; cursor: pointer; color: var(--text); font-family: var(--display); font-size: 16px; font-weight: 500; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 8px; color: var(--teal); font-size: 20px; line-height: 1; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: -4px 42px 24px 0; color: var(--text-soft); font-size: 15px; }
.faq-list details p a { color: var(--teal-soft); text-decoration: underline; text-decoration-color: rgba(89, 209, 191, 0.45); text-underline-offset: 3px; }

/* Final CTA */
.final-cta { position: relative; min-height: 650px; display: flex; align-items: center; overflow: hidden; isolation: isolate; border-top: 1px solid var(--line); }
.final-bg,
.final-bg::after,
.final-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.final-bg img { object-fit: cover; object-position: 72% center; filter: saturate(.82); }
.final-bg::after { content: ""; background: linear-gradient(90deg, rgba(8,12,15,0.97), rgba(8,12,15,0.68) 52%, rgba(8,12,15,0.2)); }
.final-inner { position: relative; z-index: 2; }
.final-mark { width: 76px; height: auto; margin-bottom: 26px; }
.final-inner h2 { max-width: 11ch; }
.final-inner > p { max-width: 500px; }
.final-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.final-inner small { display: block; margin-top: 17px; color: var(--muted); font-size: 13px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 58px 0 24px; background: #06080a; }
.footer-grid { display: grid; grid-template-columns: 1.7fr .65fr .65fr; gap: 70px; }
.footer-brand img { width: min(320px, 100%); height: auto; margin-bottom: 18px; }
.footer-brand p { max-width: 380px; color: var(--muted); }
.footer-grid > div:not(.footer-brand) { display: flex; flex-direction: column; gap: 9px; }
.footer-grid strong { margin-bottom: 8px; font-family: var(--display); font-size: 13px; }
.footer-grid a { color: var(--muted); font-size: 13px; }
.footer-grid a:hover { color: var(--teal-soft); }
.footer-bottom { margin-top: 46px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; color: var(--muted-2); font-size: 11px; }

@media (max-width: 1180px) {
  .hero h1 { font-size: 62px; }
  .hero-copy { width: min(500px, 48%); }
  .hero-for { font-size: 30px; }
}

@media (min-width: 1101px) and (max-height: 760px) {
  .hero h1 { font-size: 58px; margin-bottom: 18px; }
  .hero-for { margin-bottom: 26px; }
}

/* Below this width the scene moves above the copy so people and evidence stay readable. */
@media (max-width: 1100px) {
  .hero { height: auto; min-height: 0; max-height: none; display: flex; flex-direction: column; padding-top: var(--header); }
  .hero-media { --ax: 64cqw; --ay: 0.63; --sw: max(100cqh * 2.2993, 140cqw); position: relative; inset: auto; flex: none; height: clamp(340px, min(54vw, 50svh), 500px); }
  .hero-shade { background: linear-gradient(180deg, rgba(8,12,15,.5) 0%, transparent 22%, transparent 72%, var(--bg) 100%); }
  .marker-label { transform: translate(-50%, calc(-100% - 12px)); }
  .label-more { display: none; }
  /* Left of the action: the tank farm's west end is 47.58% across the image. */
  .hero-card { top: auto; bottom: 16px; left: var(--gutter); width: min(300px, var(--sl) + 0.4758 * var(--sw) - var(--gutter) - 16px); }
  .hero-presence { top: 14px; right: auto; left: var(--gutter); }
  .hero-credit { bottom: 12px; max-width: 40%; text-align: right; }
  .hero-content { height: auto; padding-top: 10px; padding-bottom: 64px; }
  .hero-copy { width: 100%; max-width: 640px; }
  .hero h1 { font-size: 56px; }
  .hero-scroll { display: none; }
  .mission-layout { grid-template-columns: 1fr; gap: 32px; margin-bottom: 56px; }
  .mission-stage { max-width: 760px; }
  .mission-statement { max-width: 760px; font-size: 28px; }
  .audience-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phones: zoom in on the work and show the thread as a one-line strip. */
@media (max-width: 760px) {
  .hero-media { --ax: 24cqw; --ay: 0.635; --sw: clamp(100cqh * 2.2993, 312cqw, 383cqh); height: clamp(360px, 46svh, 420px); }
  .hero-card { right: var(--gutter); bottom: 12px; left: var(--gutter); width: auto; border-radius: 999px; }
  .hero-card-head,
  .hero-thread b,
  .hero-thread li:not(.is-latest) { display: none; }
  .hero-thread { padding: 5px 14px 5px 5px; }
  .hero-thread li { align-items: center; }
  .hero-thread p { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .typing-dots { padding-top: 0; }
  .hero-credit { top: 58px; bottom: auto; max-width: none; font-size: 9px; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
  .hero-credit-scene { display: none; }
}

@media (max-width: 1080px) {
  :root { --gutter: 22px; }
  .main-nav { gap: 16px; }
  .main-nav a { font-size: 12px; }
  .sign-in { display: none; }
}

@media (max-width: 860px) {
  :root { --header: 64px; }
  .site-header { height: var(--header); background: rgba(8,12,15,.96); border-color: var(--line); }
  .menu-button { display: block; }
  .header-actions { margin-left: auto; }
  .header-actions .button { display: none; }
  .main-nav {
    position: fixed;
    z-index: 101;
    inset: var(--header) 0 auto;
    display: none;
    margin: 0;
    padding: 18px var(--gutter) 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(8,12,15,.98);
    border-bottom: 1px solid var(--line);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .hero h1 { font-size: 50px; }
  .hero-for { font-size: 28px; }
  .section { padding: 64px 0; }
  .section-heading h2, .final-cta h2, .teamwork-copy h2 { font-size: 36px; }
  .trust-list article { grid-template-columns: 200px 1fr; gap: 24px; }
  /* The map becomes a band above the copy, like the hero. */

  

  

  

  .tour-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tour-stage { aspect-ratio: 4 / 3; }
  .faq-layout { grid-template-columns: 1fr; gap: 10px; }
  .faq-layout > .section-heading { position: static; }
  .footer-grid { grid-template-columns: 1.4fr .7fr .7fr; gap: 36px; }
}

/* Phones and small tablets: stack the rebuilt sections. */
@media (max-width: 760px) {
  .compartment-switch { grid-template-columns: 1fr; gap: 8px; }
  .compartment-switch button { min-height: 62px; padding: 10px 14px; }
  .compartment-lock { padding: 5px; border-radius: 50%; }
  .compartment-lock span { display: none; }
  /* Top right is the one corner no hidden item sits under at this size. */
  .compartment-status { top: 10px; right: 10px; bottom: auto; left: auto; padding: 6px 11px; font-size: 13px; }
}

@media (max-width: 620px) {
  :root { --gutter: 18px; }
  .brand img { width: 128px; }
  .hero h1 { font-size: 42px; max-width: 10ch; }
  .hero-for { font-size: 25px; }
  .hero-actions { width: 100%; }
  .hero-actions .button { flex: 1 1 100%; }
  .mission-layout { gap: 24px; margin-bottom: 44px; }
  .mission-stage { border-radius: 12px; }
  .mission-statement { font-size: 22px; }
  /* Phones: the cards scroll sideways instead of stacking four tall cards. */
  .audience-title { font-size: 21px; }
  .audience-cards { display: flex; gap: 12px; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
  .audience-cards::-webkit-scrollbar { display: none; }
  .audience-cards li { flex: 0 0 78%; scroll-snap-align: start; }
  .section-heading h2, .final-cta h2, .teamwork-copy h2 { font-size: 30px; }
  .section-heading > p:last-child, .final-inner > p { font-size: 16px; }
  .trust-list article { grid-template-columns: 1fr; gap: 10px; }
  .final-cta { min-height: 630px; }
  .final-bg::after { background: rgba(8,12,15,.78); }
  .final-actions .button { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}

/* Phones: picture first, with every step's text visible below it. */
@media (max-width: 560px) {
  .product-tour { display: flex; flex-direction: column; }
  .tour-stage { order: -1; aspect-ratio: 1 / 1; margin-bottom: 14px; }
  .tour-tabs { grid-template-columns: 1fr; row-gap: 0; margin-bottom: 0; }
  .tour-tab { gap: 4px; padding: 14px 0 16px; font-size: 14px; }
  .step-text { opacity: 1; }
  .step-title { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .hero *, .hero *::before, .hero *::after,
  .product-tour *, .product-tour *::before, .product-tour *::after { animation-delay: 0s !important; }
}

/* Legal pages (terms.html, privacy.html) */
.footer-bottom a { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(154, 167, 177, 0.4); text-underline-offset: 3px; }
.footer-bottom a:hover { color: var(--teal-soft); }
.legal-footer { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-header-actions { margin-left: auto; gap: 20px; }
.legal { padding: calc(var(--header) + 68px) 0 104px; background: var(--bg); }
.legal-inner { width: min(100%, 760px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.legal h1 { margin-bottom: 14px; font-size: 46px; }
.legal .legal-meta { margin-bottom: 30px; color: var(--muted); font-size: 13px; }
.legal .legal-summary { margin-bottom: 30px; padding: 16px 20px; border-left: 2px solid var(--teal); background: var(--surface); color: var(--text); font-size: 17px; line-height: 1.55; }
.legal h2 { margin: 52px 0 16px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 22px; line-height: 1.25; }
.legal h3 { margin: 30px 0 10px; font-size: 16px; line-height: 1.3; letter-spacing: -0.01em; }
.legal p, .legal li { color: var(--text-soft); font-size: 16px; }
.legal p { margin-bottom: 16px; }
.legal ul, .legal ol { margin: 0 0 16px; padding-left: 22px; }
.legal li { margin-bottom: 9px; padding-left: 4px; }
.legal li > ul { margin-top: 9px; }
.legal li::marker { color: var(--muted-2); }
.legal strong { color: var(--text); font-weight: 600; }
.legal-inner a { color: var(--teal-soft); text-decoration: underline; text-decoration-color: rgba(69, 205, 174, 0.45); text-underline-offset: 3px; }
.legal-inner a:hover { text-decoration-color: var(--teal-soft); }
.legal .legal-caps, .legal .legal-caps li { font-size: 14px; line-height: 1.6; letter-spacing: 0.01em; }
.legal-table-wrap { margin: 0 0 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.legal table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.legal th, .legal td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--text-soft); }
.legal th { background: var(--surface); color: var(--text); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.legal tr:last-child td { border-bottom: 0; }
.legal td:first-child { color: var(--text); font-weight: 500; }

@media (max-width: 860px) {
  .legal { padding: calc(var(--header) + 40px) 0 72px; }
  .legal h1 { font-size: 34px; }
  .legal h2 { margin-top: 40px; font-size: 20px; }
  .legal-header-actions { gap: 16px; }
}
