/*
 * bisa.dev — the app's own Glass, on a web page (website/README.md).
 *
 * The tokens are the desktop's (desktop/src/theme/themes/glass.css), light
 * and dark following the system as the app does; the brand's cyan and blues
 * are the logo's. Every colour is oklch(), and a test holds each to the
 * platform's hues — blues and cyans between 180 and 262, and the three
 * status hues — so no purple can enter. The accent means *your attention*,
 * as in the app: it is spent on Download and on the last step, the gate.
 * Motion is short and flat, and reduced motion shows every final state.
 */

:root {
  color-scheme: light dark;
  --page: oklch(0.962 0.01 245);
  --color-bg: oklch(0.965 0.006 235 / 0.86);
  --color-surface: oklch(0.995 0.003 235 / 0.72);
  --color-surface-solid: oklch(0.99 0.004 235);
  --color-surface-2: oklch(0.865 0.012 235 / 0.92);
  --color-border: oklch(0.55 0.02 235 / 0.28);
  --color-text: oklch(0.22 0.015 235);
  --color-text-dim: oklch(0.42 0.02 235);
  --color-accent: oklch(0.52 0.17 240);
  --color-accent-ink: oklch(0.46 0.16 240);
  --color-accent-soft: oklch(0.94 0.035 240);
  --color-accent-contrast: oklch(1 0 0);
  --color-warn: oklch(0.56 0.13 90);
  --color-warn-soft: oklch(0.95 0.045 90);
  --color-danger: oklch(0.49 0.2 22);
  --color-ok: oklch(0.53 0.13 155);
  --color-ok-soft: oklch(0.95 0.04 155);
  --brand-cyan: oklch(0.81 0.117 208);
  --brand-cyan-ink: oklch(0.5 0.1 212);
  --brand-blue: oklch(0.6 0.143 255);
  --brand-deep: oklch(0.46 0.145 258);
  --brand-navy: oklch(0.256 0.082 260);
  --fam-event: oklch(0.62 0.11 208);
  --fam-gateway: oklch(0.55 0.15 245);
  --fam-loop: oklch(0.58 0.09 188);
  --fam-task: oklch(0.46 0.145 258);
  --glow-a: oklch(0.81 0.117 208 / 0.3);
  --glow-b: oklch(0.6 0.143 255 / 0.22);
  --glow-c: oklch(0.86 0.05 251 / 0.5);
  --radius-control: 12px;
  --radius-card: 16px;
  --shadow-raised: inset 0 1px 0 0 oklch(1 0 0 / 0.55), 0 1px 2px 0 oklch(0.2 0.02 235 / 0.06);
  --shadow-floating: inset 0 1px 0 0 oklch(1 0 0 / 0.6), 0 12px 32px -8px oklch(0.2 0.02 235 / 0.28), 0 2px 6px -2px oklch(0.2 0.02 235 / 0.1);
  --material-blur: 18px;
  --material-saturate: 1.35;
  --motion-fast: 120ms;
  --motion-base: 160ms;
  --motion-slow: 240ms;
  --motion-ease: cubic-bezier(0.2, 0, 0, 1);
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1200px;
  --gutter: 24px;
  --header: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: oklch(0.185 0.016 245);
    --color-bg: oklch(0.2 0.012 235 / 0.97);
    --color-surface: oklch(0.25 0.014 235 / 0.7);
    --color-surface-solid: oklch(0.235 0.014 235);
    --color-surface-2: oklch(0.29 0.016 235 / 0.8);
    --color-border: oklch(0.9 0.01 235 / 0.12);
    --color-text: oklch(0.93 0.008 235);
    --color-text-dim: oklch(0.75 0.014 235);
    --color-accent: oklch(0.75 0.13 240);
    --color-accent-ink: oklch(0.8 0.11 240);
    --color-accent-soft: oklch(0.33 0.07 240);
    --color-accent-contrast: oklch(0.2 0.012 235);
    --color-warn: oklch(0.8 0.12 90);
    --color-warn-soft: oklch(0.32 0.05 90);
    --color-danger: oklch(0.7 0.17 22);
    --color-ok: oklch(0.74 0.13 155);
    --color-ok-soft: oklch(0.3 0.05 155);
    --brand-cyan-ink: oklch(0.83 0.1 208);
    --fam-event: oklch(0.78 0.11 208);
    --fam-gateway: oklch(0.72 0.12 245);
    --fam-loop: oklch(0.76 0.09 188);
    --fam-task: oklch(0.7 0.11 255);
    --glow-a: oklch(0.6 0.117 208 / 0.22);
    --glow-b: oklch(0.5 0.143 255 / 0.28);
    --glow-c: oklch(0.3 0.08 255 / 0.5);
    --shadow-raised: inset 0 1px 0 0 oklch(1 0 0 / 0.08), 0 1px 2px 0 oklch(0 0 0 / 0.25);
    --shadow-floating: inset 0 1px 0 0 oklch(1 0 0 / 0.1), 0 12px 32px -8px oklch(0 0 0 / 0.6), 0 2px 6px -2px oklch(0 0 0 / 0.3);
    --material-saturate: 1.2;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-fast: 1ms;
    --motion-base: 1ms;
    --motion-slow: 1ms;
  }
}

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

/* --- ground ------------------------------------------------------------------ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 16px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--color-text);
  font: 400 1rem/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* A web page has no wallpaper to frost, so the site paints its own light behind the glass. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 12% 0%, var(--glow-a), transparent 70%),
    radial-gradient(50% 40% at 92% 8%, var(--glow-b), transparent 70%),
    radial-gradient(70% 60% at 50% 110%, var(--glow-c), transparent 70%),
    var(--page);
}

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

a {
  color: var(--brand-cyan-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

code {
  padding: 0.08em 0.36em;
  border-radius: 6px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
}

kbd {
  padding: 0.05em 0.4em;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  border-bottom-width: 2px;
  background: var(--color-surface-solid);
}

pre {
  position: relative;
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border-radius: var(--radius-control);
  background: var(--brand-navy);
  color: oklch(0.94 0.02 235);
  border: 1px solid var(--color-border);
  line-height: 1.55;
}

pre code {
  padding: 0;
  background: none;
  border: 0;
  font-size: 0.86rem;
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 1.4rem + 4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 750;
}

h2 {
  font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.6rem);
  letter-spacing: -0.025em;
  font-weight: 700;
}

h3 {
  font-size: 1.15rem;
  font-weight: 650;
}

h4 {
  font-size: 1rem;
}

p {
  margin: 0 0 1rem;
}

.lede {
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
  color: var(--color-text-dim);
  max-width: 64ch;
  text-wrap: pretty;
}

.fine {
  font-size: 0.86rem;
  color: var(--color-text-dim);
}

.center {
  text-align: center;
  margin-inline: auto;
}

.mono {
  font-family: var(--font-mono);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  background: var(--color-surface-solid);
  color: var(--color-text);
  box-shadow: var(--shadow-floating);
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.wrap.narrow {
  --wrap: 820px;
}

/* --- header ---------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklch, var(--page) 78%, transparent);
  border-bottom: 1px solid var(--color-border);
  -webkit-backdrop-filter: blur(var(--material-blur)) saturate(var(--material-saturate));
  backdrop-filter: blur(var(--material-blur)) saturate(var(--material-saturate));
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: var(--page);
  }
}

.bar {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--color-text-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--color-text);
  background: var(--color-surface-2);
}

.menu {
  display: none;
  position: relative;
}

.menu summary {
  list-style: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  cursor: pointer;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu summary span,
.menu summary span::before,
.menu summary span::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
  content: "";
}

.menu summary span {
  position: relative;
}

.menu summary span::before {
  position: absolute;
  top: -5px;
}

.menu summary span::after {
  position: absolute;
  top: 5px;
}

.menu nav {
  position: absolute;
  right: 0;
  top: 48px;
  min-width: 220px;
  display: grid;
  padding: 8px;
  border-radius: var(--radius-card);
  background: var(--color-surface-solid);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-floating);
}

.menu nav a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--color-text);
  text-decoration: none;
}

.menu nav a:hover {
  background: var(--color-surface-2);
}

@media (max-width: 820px) {
  .nav {
    display: none;
  }

  .bar > .button {
    margin-left: auto;
  }

  .menu {
    display: block;
  }
}

/* The reading line: how far through the page — the run strip, on a narrow screen. */
.reading {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
}

.reading span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-blue));
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  font: 600 1rem/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}

.button:active {
  transform: translateY(1px);
}

.button.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.95rem;
}

.button.primary {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  box-shadow: var(--shadow-raised), 0 6px 18px -6px oklch(0.52 0.17 240 / 0.6);
}

.button.primary:hover {
  background: var(--color-accent-ink);
  color: var(--color-accent-contrast);
}

.button.secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
  box-shadow: var(--shadow-raised);
}

.button.secondary:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}

.button.ghost {
  background: transparent;
  color: var(--color-text);
}

.button.ghost:hover {
  background: var(--color-surface-2);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 1.6rem 0 1rem;
}

.actions.center {
  justify-content: center;
}

/* --- shared pieces ------------------------------------------------------------------- */

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.4rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-dim);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.card {
  padding: 22px;
  border-radius: var(--radius-card);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-raised);
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 20px;
}

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

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

@media (max-width: 900px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.pair {
  margin: 2rem 0;
  align-items: start;
}

.stack {
  display: grid;
  gap: 20px;
  align-content: start;
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  display: grid;
  gap: 0.55rem;
}

.ticks li {
  position: relative;
  padding-left: 26px;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--brand-cyan-ink);
  border-bottom: 2px solid var(--brand-cyan-ink);
  transform: rotate(-45deg);
}

.ticks.muted li::before {
  width: 10px;
  height: 2px;
  border: 0;
  top: 0.72em;
  background: var(--color-text-dim);
  transform: none;
}

.arrow {
  font-weight: 600;
  text-decoration: none;
}

.arrow::after {
  content: " →";
}

.arrow:hover {
  text-decoration: underline;
}

.step-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}

/* --- sections ---------------------------------------------------------------------------- */

.tour,
.section {
  padding: clamp(64px, 9vw, 120px) 0;
  position: relative;
}

.tour + .tour,
.section + .tour,
.tour + .section,
.section + .section {
  border-top: 1px solid var(--color-border);
}

.tour-head {
  margin-bottom: 2.4rem;
  max-width: 860px;
}

/* The screen's place in the app's sidebar, as the tour reads it. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 0.9rem;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}

.eyebrow .num {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 24px;
  padding: 0 6px;
  border-radius: 7px;
  font: 700 0.75rem/1 var(--font-mono);
  letter-spacing: 0;
  color: var(--brand-cyan-ink);
  background: color-mix(in oklch, var(--brand-cyan) 16%, transparent);
  border: 1px solid color-mix(in oklch, var(--brand-cyan) 34%, transparent);
}

.center-eyebrow {
  display: flex;
  justify-content: center;
}

.step-head {
  margin-bottom: 2.4rem;
  max-width: 860px;
}

.sub {
  margin-top: 3.2rem;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

/* --- the hero ------------------------------------------------------------------------------ */

.hero {
  padding-top: clamp(40px, 7vw, 96px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  column-gap: clamp(32px, 5vw, 72px);
  row-gap: 8px;
  align-items: center;
}

.hero-title {
  grid-column: 1 / -1;
}

.hero-title h1 {
  max-width: 15ch;
}

@media (min-width: 1240px) {
  .hero-title h1 {
    max-width: none;
  }
}

@media (max-width: 1000px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hero h1 {
  margin-bottom: 0.6rem;
}

.hero-copy .lede {
  margin-bottom: 0;
}

.hero-copy .lede + .lede {
  margin-top: 0.9rem;
}

.glow {
  background: linear-gradient(100deg, var(--brand-cyan-ink) 0%, var(--brand-blue) 55%, var(--brand-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (forced-colors: active) {
  .glow {
    color: CanvasText;
    background: none;
  }
}

.hero-visual {
  position: relative;
}

/* The opening's slideshow: a strip of the app's screens that snaps to each, moving on by itself. */
.slides {
  position: relative;
}

.slides-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-radius: var(--radius-card);
}

.slides-track::-webkit-scrollbar {
  display: none;
}

.slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: start;
}

.slide img {
  display: block;
  width: 100%;
  height: auto;
}

/* Back and on: two arrows over the screen, shown while the pointer is on the slideshow — always where none can hover. */
.slides-arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-top: -24px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: color-mix(in oklch, var(--color-surface-solid) 90%, transparent);
  color: var(--color-text);
  box-shadow: var(--shadow-raised);
  font: 600 1.15rem/1 var(--font-sans);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--motion-fast) ease;
}

.slides-arrow.prev {
  left: calc(3% + 10px);
}

.slides-arrow.next {
  right: calc(3% + 10px);
}

.slides:hover .slides-arrow,
.slides-arrow:focus-visible {
  opacity: 1;
}

.slides-arrow:hover {
  background: var(--color-surface-solid);
}

@media (hover: none) {
  .slides-arrow {
    opacity: 1;
  }
}

/* A screen still to come stands where a capture's window would — inside its shadow's margin. */
.slide.is-missing {
  padding: 3% 3% 6%;
}

/* --- screenshots in the app's window ------------------------------------------------------ */

.shot {
  margin: 0;
}

.window {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-surface-solid);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-floating);
}

.window-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-2);
}

.window-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: oklch(0.68 0.17 25);
}

.window-bar span:nth-child(2) {
  background: oklch(0.8 0.14 88);
}

.window-bar span:nth-child(3) {
  background: oklch(0.72 0.16 150);
}

.window-bar b {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-dim);
  white-space: nowrap;
}

/* A screenshot is the app's window as macOS caught it — its own title bar, corners and shadow — so it
   stands bare: no second frame around it. */
.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot-open {
  display: block;
  cursor: zoom-in;
  border-radius: var(--radius-card);
}

/* A screenshot read left to right: its numbered parts under it, in the order they stand. */
.screen-parts {
  list-style: none;
  margin: 1.4rem 0 1.2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  counter-reset: part;
}

.screen-parts li {
  counter-increment: part;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.screen-parts h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 1rem;
}

.screen-parts h4::before {
  content: counter(part);
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font: 700 0.78rem/1 var(--font-mono);
  color: var(--brand-cyan-ink);
  background: color-mix(in oklch, var(--brand-cyan) 16%, transparent);
}

.screen-parts p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--color-text-dim);
}

@media (max-width: 1000px) {
  .screen-parts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .screen-parts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A screenshot still to come: the app's window drawn as a skeleton, labelled with the file to add. */
.skeleton {
  position: relative;
  display: grid;
  grid-template-columns: 22% 1fr;
  gap: 14px;
  aspect-ratio: 16 / 10;
  padding: 16px;
  background:
    linear-gradient(135deg, color-mix(in oklch, var(--brand-cyan) 10%, transparent), color-mix(in oklch, var(--brand-blue) 12%, transparent)),
    var(--color-surface-solid);
}

.sk-side {
  border-radius: 12px;
  background: repeating-linear-gradient(180deg, color-mix(in oklch, var(--brand-deep) 14%, transparent) 0 10px, transparent 10px 30px) 14px 20px / calc(100% - 28px) 100% no-repeat,
    color-mix(in oklch, var(--color-surface-2) 70%, transparent);
}

.sk-main {
  display: grid;
  grid-template-rows: 26px 6px repeat(3, 1fr);
  gap: 12px;
}

.sk-main::before,
.sk-main::after {
  content: "";
  border-radius: 8px;
}

.sk-main::before {
  order: -2;
  width: 45%;
  background: color-mix(in oklch, var(--brand-navy) 18%, transparent);
}

.sk-main::after {
  order: -1;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-blue));
  opacity: 0.45;
}

.sk-main i {
  display: block;
  border-radius: 12px;
  background: color-mix(in oklch, var(--brand-blue) 10%, transparent);
  border: 1px solid color-mix(in oklch, var(--brand-blue) 14%, transparent);
}

.sk-main i:nth-of-type(4) {
  display: none;
}

.sk-note {
  position: absolute;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 4px;
  max-width: calc(100% - 32px);
  padding: 14px 20px;
  border-radius: 14px;
  background: color-mix(in oklch, var(--color-surface-solid) 88%, transparent);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-raised);
  text-align: center;
}

.hero-shot .sk-note {
  top: 36%;
}

.sk-note strong {
  font-size: 1.05rem;
}

.sk-note span {
  font-size: 0.85rem;
  color: var(--color-text-dim);
}

.sk-note code {
  font-size: 0.78rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- the run rail --------------------------------------------------------------------------- */

.rail {
  display: none;
}

/* The rail comes in with the tour, once the opening has scrolled away (site.js); without a script it stays out. */
@media (min-width: 1240px) {
  .rail {
    display: block;
    visibility: hidden;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity var(--motion-slow) var(--motion-ease), transform var(--motion-slow) var(--motion-ease), visibility 0s linear var(--motion-slow);
    position: fixed;
    left: 20px;
    top: calc(var(--header) + 40px);
    z-index: 30;
    width: 150px;
    font-size: 0.85rem;
  }

  .rail.is-shown {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity var(--motion-slow) var(--motion-ease), transform var(--motion-slow) var(--motion-ease);
  }

  body:has(.rail) .wrap {
    width: min(var(--wrap), 100% - 2 * 190px);
  }

  body:has(.rail) .ide-track {
    padding-inline: max(190px, (100% - var(--wrap)) / 2);
    scroll-padding-inline: max(190px, (100% - var(--wrap)) / 2);
  }
}

.rail-title {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}

.rail ol {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

/* The logo's cyan rail, the run's spine. */
.rail ol::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand-cyan), var(--brand-blue));
  opacity: 0.35;
}

.rail a {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr;
  column-gap: 10px;
  padding: 6px 8px 6px 0;
  border-radius: 10px;
  color: var(--color-text-dim);
  text-decoration: none;
  line-height: 1.25;
  transition: color var(--motion-fast) var(--motion-ease);
}

.rail a:hover {
  color: var(--color-text);
}

.rail .dot {
  align-self: center;
  justify-self: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--page);
  transition: background-color var(--motion-base) var(--motion-ease), border-color var(--motion-base) var(--motion-ease);
}


.rail a[data-state="done"] .dot {
  background: var(--brand-cyan);
  border-color: var(--brand-cyan);
}

.rail a[data-state="running"] {
  color: var(--color-text);
  font-weight: 650;
}

.rail a[data-state="running"] .dot {
  border-color: var(--brand-cyan);
  background: var(--page);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--brand-cyan) 25%, transparent);
  animation: breathe 1.8s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    box-shadow: 0 0 0 7px color-mix(in oklch, var(--brand-cyan) 8%, transparent);
  }
}

/* The gate, ahead: marked as waiting on you, never as the place you are. */
.rail a[data-state="waiting"] .dot {
  border-color: var(--color-accent);
  border-style: dashed;
}

.rail li:last-child a[data-state="running"] {
  color: var(--color-accent-ink);
}

.rail li:last-child a[data-state="running"] .dot {
  border-color: var(--color-accent);
  background: var(--color-accent);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--color-accent) 20%, transparent);
  animation: none;
}

.rail-counter {
  margin: 12px 0 0;
  font: 500 0.75rem/1 var(--font-mono);
  color: var(--color-text-dim);
}

/* --- agents ------------------------------------------------------------------------------------ */

.tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 2.4rem;
}

@media (max-width: 900px) {
  .tiers {
    grid-template-columns: minmax(0, 1fr);
  }
}

.tier {
  padding: 20px;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.tier h3 {
  font-size: 0.95rem;
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.names {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.names span {
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--color-surface-solid);
  border: 1px solid var(--color-border);
  font-weight: 600;
  font-size: 0.92rem;
}

.counts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 2.4rem 0 0.8rem;
}

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

.counts div {
  padding: 18px 16px;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  text-align: center;
}

.counts dt {
  font-size: 2.2rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--brand-deep);
}

@media (prefers-color-scheme: dark) {
  .counts dt {
    color: var(--brand-cyan);
  }
}

.counts dd {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--color-text-dim);
}

.core {
  margin-top: 1rem;
}

/* --- the IDE's panels ------------------------------------------------------------------------------ */

.ide-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.6rem;
}

.ide-index a {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.88rem;
  font-weight: 550;
  text-decoration: none;
}

.ide-index a:hover {
  background: var(--color-surface-2);
}

.ide-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(86vw, 600px);
  gap: 20px;
  overflow-x: auto;
  padding: 4px max(var(--gutter), (100% - var(--wrap)) / 2) 24px;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), (100% - var(--wrap)) / 2);
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.track-arrows {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: -8px;
}

.track-arrows button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-solid);
  color: var(--color-text);
  font: 600 1.1rem/1 var(--font-sans);
  cursor: pointer;
  box-shadow: var(--shadow-raised);
}

.track-arrows button:hover {
  background: var(--color-surface-2);
}

.ide-card {
  scroll-snap-align: start;
  padding: 16px;
  border-radius: calc(var(--radius-card) + 4px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-raised);
}

.ide-card h3 {
  margin: 18px 4px 10px;
  font-size: 1.25rem;
}

.ide-card .ticks {
  margin: 0 4px 4px;
  font-size: 0.95rem;
}

/* --- workflows ---------------------------------------------------------------------------------- */

.starts {
  margin: 0 0 2.4rem;
}

.start-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.start-list li {
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.start-list code {
  margin-right: 6px;
}

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0 2rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

caption {
  text-align: left;
  padding: 14px 18px 0;
  font-weight: 650;
  color: var(--color-text-dim);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

th,
td {
  padding: 12px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

thead th {
  font-size: 0.82rem;
  color: var(--color-text-dim);
  font-weight: 650;
}

tbody th {
  font-weight: 650;
}

td code,
th code {
  white-space: nowrap;
}

.designer-points {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
  margin: 1.6rem 0 2.4rem;
}

@media (max-width: 900px) {
  .designer-points {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --- you ---------------------------------------------------------------------------------------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  margin-block: 0 3.6rem;
}

/* A section that is one feature: its own wrap keeps it centred, with no space below. */
.wrap.feature {
  margin-bottom: 0;
}

.feature.reverse {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.feature.reverse > :first-child {
  order: 2;
}

@media (max-width: 1000px) {
  .feature,
  .feature.reverse {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature.reverse > :first-child {
    order: 0;
  }
}

.wrapping {
  margin: 2.4rem 0 0;
  padding: 24px;
  border-radius: calc(var(--radius-card) + 4px);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.wrap-diagram {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 1rem;
}

@media (max-width: 860px) {
  .wrap-diagram {
    grid-template-columns: minmax(0, 1fr);
  }
}

.layers,
.layers ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.layer {
  display: grid;
  gap: 2px;
  padding: 14px 16px 16px;
  border-radius: 14px;
  border: 1.5px solid color-mix(in oklch, var(--fam-gateway) 60%, transparent);
  background: color-mix(in oklch, var(--fam-gateway) 6%, transparent);
  font-size: 0.86rem;
  color: var(--color-text-dim);
}

.layer ol {
  margin-top: 10px;
}

.layer.outer {
  border-style: dashed;
  border-color: var(--brand-cyan);
  background: color-mix(in oklch, var(--brand-cyan) 6%, transparent);
}

.layer.inner {
  border: 1px solid var(--color-border);
  background: var(--color-surface-solid);
}

.layer-name {
  font-weight: 700;
  color: var(--color-text);
  font-size: 0.92rem;
}

.relay-sees {
  padding: 18px;
  border-radius: 14px;
  background: var(--brand-navy);
  color: oklch(0.94 0.02 235);
}

.relay-sees p {
  margin: 0 0 10px;
  font-size: 0.92rem;
}

.relay-sees p:last-child {
  margin: 0;
}

.relay-sees code {
  background: oklch(1 0 0 / 0.1);
  border-color: oklch(1 0 0 / 0.16);
  color: inherit;
}

.relay-label {
  font-size: 0.72rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-cyan);
}

/* --- guarded ------------------------------------------------------------------------------------- */

.funnel {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  counter-reset: stage;
}

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

@media (max-width: 640px) {
  .funnel {
    grid-template-columns: minmax(0, 1fr);
  }
}

.stage {
  position: relative;
  padding: 20px;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  counter-increment: stage;
}

.stage::before {
  content: counter(stage);
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-bottom: 10px;
  border-radius: 8px;
  font: 700 0.8rem/1 var(--font-mono);
  color: var(--brand-cyan-ink);
  background: color-mix(in oklch, var(--brand-cyan) 16%, transparent);
}

.stage h3 {
  font-size: 1.05rem;
}

.stage p {
  font-size: 0.93rem;
}

.mono-line {
  display: grid;
  gap: 6px;
  font-size: 0.85rem !important;
}

.mono-line code {
  justify-self: start;
  word-break: break-all;
}

.honest {
  border-left: 3px solid var(--color-warn);
}

/* --- judged --------------------------------------------------------------------------------------- */

/* --- also, asks, questions ---------------------------------------------------------------------------- */

.also {
  margin: 1.6rem 0 2rem;
}

.asks .tally {
  width: 100%;
  height: 12px;
  margin: 1.4rem 0 0.8rem;
  border-radius: 999px;
  overflow: hidden;
}

.t-runs {
  fill: var(--color-ok);
  --today: var(--color-ok);
}

.t-with-you {
  fill: var(--brand-blue);
  --today: var(--brand-blue);
}

.t-custom {
  fill: var(--color-warn);
  --today: var(--color-warn);
}

.tally-legend {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.92rem;
  color: var(--color-text-dim);
}

.tally-legend .swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 3px;
  background: var(--today);
}

.tally-legend strong {
  color: var(--color-text);
}

.asks-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.4rem;
}

.asks-filter button {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-dim);
  font: 600 0.88rem/1 var(--font-sans);
  cursor: pointer;
}

.asks-filter button[aria-pressed="true"] {
  background: var(--color-text);
  border-color: var(--color-text);
  color: var(--page);
}

.ask-groups {
  columns: 3 300px;
  column-gap: 20px;
}

.ask-group {
  break-inside: avoid;
  margin: 0 0 20px;
  padding: 16px 18px;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.ask-group h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-dim);
}

.ask-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ask {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  font-size: 0.92rem;
  line-height: 1.4;
}

.today {
  justify-self: end;
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: 6px;
  font: 600 0.7rem/1.5 var(--font-mono);
  color: var(--today);
  background: color-mix(in oklch, var(--today) 13%, transparent);
}

.asks[data-filter="runs"] .ask:not(.t-runs),
.asks[data-filter="with-you"] .ask:not(.t-with-you),
.asks[data-filter="custom"] .ask:not(.t-custom) {
  display: none;
}

.faq {
  display: grid;
  gap: 10px;
}

.faq details {
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.faq summary {
  padding: 16px 20px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font: 500 1.2rem/1 var(--font-mono);
  color: var(--color-text-dim);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--color-text-dim);
}

/* --- the gate: the last step waits on you ---------------------------------------------------------- */

.gate-step {
  text-align: center;
}

.gate {
  position: relative;
  margin-top: 6px;
  padding: clamp(28px, 5vw, 48px);
  border-radius: calc(var(--radius-card) + 8px);
  border: 1.5px solid var(--color-accent);
  background: var(--color-surface-solid);
  box-shadow: var(--shadow-floating), 0 0 0 6px color-mix(in oklch, var(--color-accent) 10%, transparent);
  text-align: center;
}

.gate-head {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-ink);
}

.waiting-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: breathe-accent 1.8s ease-in-out infinite;
}

@keyframes breathe-accent {
  50% {
    box-shadow: 0 0 0 6px color-mix(in oklch, var(--color-accent) 18%, transparent);
  }
}

.gate p {
  max-width: 56ch;
  margin-inline: auto;
  color: var(--color-text-dim);
}

.gate .actions {
  justify-content: center;
}

/* Moonrice, the platform's own pet: drawn only once its step is near (site.js), still under reduced motion. */
.pet {
  position: absolute;
  right: 20px;
  top: -86px;
  width: 96px;
  height: 104px;
  background-repeat: no-repeat;
  background-size: 768px 936px;
}

.pet.is-awake {
  background-image: url("moonrice.webp");
  background-position: 0 -624px;
  animation: pet-wait 3.5s steps(6) infinite;
}

@keyframes pet-wait {
  from {
    background-position: 0 -624px;
  }
  to {
    background-position: -576px -624px;
  }
}

.pet-lost {
  position: relative;
  right: auto;
  top: auto;
  margin: 0 auto 1rem;
}

.pet-lost.is-awake {
  background-position: 0 -520px;
  animation: pet-lost 2.6s steps(8) infinite;
}

@keyframes pet-lost {
  from {
    background-position: 0 -520px;
  }
  to {
    background-position: -768px -520px;
  }
}

@media (max-width: 640px) {
  .pet {
    top: -74px;
    right: 8px;
    transform: scale(0.85);
  }
}

/* --- sub-pages ------------------------------------------------------------------------------------------ */

.page-head {
  padding: clamp(48px, 7vw, 96px) 0 clamp(32px, 4vw, 56px);
}

.page-head h1 {
  font-size: clamp(2.4rem, 1.5rem + 3vw, 3.8rem);
}

.page-head.lost {
  min-height: 60vh;
  display: grid;
  align-items: center;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.6rem;
}

.toc a {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.86rem;
  font-weight: 550;
  text-decoration: none;
}

.toc a:hover {
  background: var(--color-surface-2);
}

.prose {
  padding-bottom: clamp(64px, 8vw, 112px);
}

.prose > section {
  padding: 2.4rem 0;
  border-top: 1px solid var(--color-border);
  max-width: 900px;
}

.prose > section > p,
.prose > section > ul {
  max-width: 74ch;
}

.prose h2 {
  font-size: clamp(1.5rem, 1.15rem + 1.1vw, 2.05rem);
}

.prose h3 {
  margin-top: 1.6rem;
}

.prose .names {
  margin-bottom: 1rem;
}

.numbered {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
  display: grid;
  gap: 0.4rem;
}

.reach th:first-child,
.reach tbody th {
  min-width: 170px;
}

/* --- footer ---------------------------------------------------------------------------------------------- */

.site-footer {
  padding: 56px 0 32px;
  border-top: 1px solid var(--color-border);
  background: color-mix(in oklch, var(--page) 70%, transparent);
}

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

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

.footer-brand p {
  margin: 12px 0 0;
  color: var(--color-text-dim);
}

.site-footer nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.site-footer h2 {
  margin: 0 0 4px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-dim);
}

.site-footer nav a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.94rem;
}

.site-footer nav a:hover {
  text-decoration: underline;
}

.footer-fine {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  font-size: 0.84rem;
  color: var(--color-text-dim);
}

.footer-fine p {
  margin: 0 0 6px;
}

/* --- the hero's harness band ------------------------------------------------------------------ */

.harness-band {
  margin-top: 2.4rem;
  padding: 22px;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  text-align: center;
}

.harness-band > p:first-child {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}

.harness-band .names {
  justify-content: center;
}

.harness-band .fine {
  margin: 0;
}

/* --- agents and teams ---------------------------------------------------------------------- */

.core-agent {
  position: relative;
}

.core-tag {
  display: inline-block;
  margin: 0 0 10px;
  padding: 2px 8px;
  border-radius: 6px;
  font: 700 0.7rem/1.5 var(--font-mono);
  color: var(--brand-cyan-ink);
  background: color-mix(in oklch, var(--brand-cyan) 16%, transparent);
}

.feature.tight {
  margin-block: 3rem 1.6rem;
}

.more-list {
  margin: 1.6rem 0 0;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.more-list > summary {
  padding: 16px 20px;
  font-weight: 650;
  cursor: pointer;
}

.more-list[open] > summary {
  border-bottom: 1px solid var(--color-border);
}

.more-list > :not(summary) {
  margin: 16px;
}

.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.gallery li {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-solid);
}

.gallery span {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--color-text-dim);
}

.teams {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 2.4rem;
}

.team p:not(.names) {
  color: var(--color-text-dim);
  font-size: 0.95rem;
}

.team .names span {
  font-size: 0.82rem;
  padding: 4px 10px;
}

/* --- workflows: the three ideas ------------------------------------------------------------------- */

.explain {
  list-style: none;
  margin: 0 0 3rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  counter-reset: idea;
}

.explain li {
  counter-increment: idea;
}

.explain h3::before {
  content: counter(idea);
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: 10px;
  border-radius: 8px;
  font: 700 0.8rem/1 var(--font-mono);
  color: var(--brand-cyan-ink);
  background: color-mix(in oklch, var(--brand-cyan) 16%, transparent);
  vertical-align: 0.1em;
}

@media (max-width: 900px) {
  .explain {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --- goals: the example, as a story with who holds it at each turn ------------------------------- */

.goal-example {
  margin: 2.4rem 0;
}

.goal-example-head {
  margin: 0 0 1.6rem;
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-raised);
}

.goal-example-head .eyebrow {
  margin-bottom: 0.6rem;
}

.goal-example-head .goal-quote {
  margin: 0;
}

.goal-example-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

@media (max-width: 1000px) {
  .goal-example-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The proposed workflow: each step by name and who holds it, numbered down a line. */
.goal-plan {
  position: sticky;
  top: 96px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

@media (max-width: 1000px) {
  .goal-plan {
    position: static;
  }
}

.goal-plan h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.goal-plan > p {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--color-text-dim);
}

.plan {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  counter-reset: plan;
}

.plan li {
  counter-increment: plan;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--color-surface-solid);
  border: 1px solid var(--color-border);
  font-size: 0.92rem;
}

.plan li::before {
  content: counter(plan);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font: 700 0.75rem/1 var(--font-mono);
  color: var(--brand-cyan-ink);
  background: color-mix(in oklch, var(--brand-cyan) 16%, transparent);
}

.plan .plan-name {
  font-weight: 600;
}

.plan .plan-who {
  grid-column: 3;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  color: var(--brand-cyan-ink);
  border: 1px solid color-mix(in oklch, var(--brand-cyan) 45%, transparent);
}

.plan .plan-you .plan-who {
  color: var(--color-accent-ink);
  border-color: color-mix(in oklch, var(--color-accent) 40%, transparent);
}

.goal-quote {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 1rem + 0.9vw, 1.6rem);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.story {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.story::before {
  content: "";
  position: absolute;
  left: 39px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--brand-cyan), var(--brand-blue));
  opacity: 0.35;
}

.story li {
  position: relative;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  column-gap: 16px;
}

.story h3,
.story p {
  grid-column: 2;
}

.story h3 {
  margin: 2px 0 4px;
  font-size: 1.05rem;
}

.story p {
  margin: 0;
  color: var(--color-text-dim);
}

.holder {
  grid-row: span 2;
  position: relative;
  z-index: 1;
  align-self: start;
  justify-self: center;
  padding: 3px 8px;
  border-radius: 999px;
  font: 700 0.7rem/1.4 var(--font-mono);
  background: var(--color-surface-solid);
  border: 1px solid var(--color-border);
  white-space: nowrap;
}

.holder.you,
.holder.with {
  color: var(--color-accent-ink);
  border-color: color-mix(in oklch, var(--color-accent) 40%, transparent);
}

.holder.design,
.holder.agents {
  color: var(--brand-cyan-ink);
  border-color: color-mix(in oklch, var(--brand-cyan) 45%, transparent);
}

.holder.done {
  color: var(--color-ok);
  border-color: color-mix(in oklch, var(--color-ok) 40%, transparent);
}

/* --- more in the box: a bento --------------------------------------------------------------------- */

.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: 18px;
}

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

@media (max-width: 700px) {
  .bento {
    grid-template-columns: minmax(0, 1fr);
  }
}

.tile {
  position: relative;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 22px;
  border-radius: calc(var(--radius-card) + 4px);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-raised);
}

.tile > p,
.tile li {
  font-size: 0.95rem;
}

.tile .shot {
  margin-top: 12px;
}

.tile.wide {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.tile.wide .shot {
  margin-top: 0;
}

@media (max-width: 1000px) {
  .tile.wide {
    grid-template-columns: minmax(0, 1fr);
  }
}

.tile .wrap-diagram {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 12px 0;
}

.funnel.compact {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 10px 0 14px;
}

.funnel.compact .stage {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 10px;
}

.funnel.compact .stage::before {
  grid-row: span 2;
  margin: 0;
}

.funnel.compact h4 {
  margin: 2px 0 2px;
  font-size: 0.98rem;
}

.funnel.compact p {
  margin: 0;
  font-size: 0.9rem;
}

.pets-tile {
  padding-top: 112px;
  overflow: hidden;
}

.pets-tile .pet {
  top: 10px;
  left: 18px;
  right: auto;
}

.pet.pet-wave.is-awake {
  background-position: 0 -312px;
  animation: pet-wave 1.1s steps(4) infinite;
}

@keyframes pet-wave {
  from {
    background-position: 0 -312px;
  }
  to {
    background-position: -384px -312px;
  }
}

/* --- motion off, colours forced ---------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .caret,
  .rail a[data-state="running"] .dot,
  .waiting-dot,
  .pet.is-awake,
  .pet-lost.is-awake,
  .pet.pet-wave.is-awake {
    animation: none;
  }
}

@media (forced-colors: active) {
  .card,
  .tier,
  .family,
  .stage,
  .window,
  .gate,
  .ask-group,
  .tile {
    border: 1px solid CanvasText;
  }
}
