/*
 * 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.15);
  --glow-b: oklch(0.6 0.143 255 / 0.11);
  --glow-c: oklch(0.86 0.05 251 / 0.25);
  --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;
  --hairline: color-mix(in oklch, var(--color-border) 65%, transparent);
  --measure: 65ch;
}

@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.11);
    --glow-b: oklch(0.5 0.143 255 / 0.14);
    --glow-c: oklch(0.3 0.08 255 / 0.25);
    --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(--color-accent-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;
}

::selection {
  background: color-mix(in oklch, var(--color-accent) 26%, transparent);
}

html {
  scrollbar-color: color-mix(in oklch, var(--color-text-dim) 40%, transparent) transparent;
}

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

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

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

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);
}

.hero-lede {
  color: var(--color-text);
}

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

.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: var(--radius-control);
  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: var(--radius-control);
  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: var(--radius-control);
  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: var(--color-text-dim);
  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);
}

.button:active {
  filter: brightness(0.9);
}

.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);
}

.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 ------------------------------------------------------------------- */

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

.ticks li {
  position: relative;
  padding-left: 1.2em;
}

/* A plain bullet in the secondary ink: a point to read, never a mark of something done. */
.ticks li::before {
  content: "";
  position: absolute;
  left: 0.2em;
  top: 0.66em;
  width: 0.36em;
  height: 0.36em;
  border-radius: 50%;
  background: var(--color-text-dim);
}

.ticks.muted li::before {
  top: 0.72em;
  width: 0.55em;
  height: 2px;
  border-radius: 0;
}

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

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

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

/* --- 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;
}

/* A stop with one large screenshot: the claim beside its points, the screen under both. */
.tour-head.split {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: end;
}

.tour-head.split .lede,
.tour-head.split .ticks {
  margin-bottom: 0;
}

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

.more-link {
  margin: 1.2rem 0 0;
}

/* --- 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: start;
}

/* The column the download tiles measure (`.platforms`): beside the slideshow it is narrower than the viewport says. */
.hero-copy {
  padding-top: 8px;
  container-type: inline-size;
}

.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;
}

/* The three systems as three tiles of one shape, read like a store badge: a glyph, a small line saying
   what is on offer, the system's name. macOS is the download, on the accent; Linux and Windows hold
   their place, dashed and quiet, a badge where the offer would be. */
.platforms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 34rem;
  margin: 1.6rem 0 1rem;
}

/* Too narrow for three: the download takes the row, the two on their way share the next; then one column. */
@container (max-width: 479px) {
  .platforms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platforms > :first-child {
    grid-column: 1 / -1;
  }
}

@container (max-width: 299px) {
  .platforms {
    grid-template-columns: minmax(0, 1fr);
  }
}

.button.platform {
  justify-content: flex-start;
  gap: 10px;
  min-height: 58px;
  padding: 8px 14px;
  text-align: left;
}

.platform-glyph {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.platform-words {
  display: grid;
  justify-items: start;
  gap: 3px;
  min-width: 0;
}

/* The small line and the badge take the same height, so the three names sit on one line. */
.platform-note,
.platform-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
}

.platform-name {
  font-size: 1.06rem;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* The download lifts off the page, and its arrow drops toward the tray under the pointer. */
.button.primary.platform {
  box-shadow: var(--shadow-raised), 0 6px 16px -8px color-mix(in oklch, var(--color-accent) 70%, transparent);
}

.platform-arrow {
  transition: transform var(--motion-base) var(--motion-ease);
}

.button.primary.platform:hover .platform-arrow {
  transform: translateY(1.5px);
}

/* A system on its way: disabled, dashed, the dim ink — a place held, never a broken link. */
.button.platform.soon {
  background: color-mix(in oklch, var(--color-surface) 50%, transparent);
  color: var(--color-text-dim);
  border: 1px dashed color-mix(in oklch, var(--color-text-dim) 40%, transparent);
  box-shadow: none;
  cursor: default;
}

.button.platform.soon:active {
  filter: none;
}

.platform-badge {
  padding: 0 7px;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent-ink);
  font-weight: 600;
}

.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;
}

.slide figcaption {
  margin-top: -3%;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--color-text-dim);
}

/* 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 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: var(--color-surface-solid);
}

.sk-side {
  border-radius: var(--radius-control);
  background: repeating-linear-gradient(180deg, color-mix(in oklch, var(--color-text) 10%, 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: calc(var(--radius-control) / 2);
}

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

.sk-main::after {
  order: -1;
  background: color-mix(in oklch, var(--color-text-dim) 30%, transparent);
}

.sk-main i {
  display: block;
  border-radius: var(--radius-control);
  background: color-mix(in oklch, var(--color-surface-2) 45%, transparent);
  border: 1px solid var(--hairline);
}

.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: var(--radius-control);
  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. It stands only where the window has room for it beside the column, so it never narrows the page. */
@media (min-width: 1600px) {
  .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);
  }
}

.rail-title {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-dim);
}

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

/* The run's spine. */
.rail ol::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--color-border);
}

.rail a {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr;
  column-gap: 10px;
  padding: 6px 8px 6px 0;
  border-radius: var(--radius-control);
  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-text-dim);
  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(--color-text-dim);
}

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

.rail a[data-state="running"] .dot {
  border: 3px solid var(--color-text);
}

/* 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: 2px solid var(--color-accent);
  background: var(--color-accent);
}

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

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

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

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

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

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

.start-list li {
  padding: 6px 12px;
  border-radius: var(--radius-control);
  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.875rem;
}

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;
}

/* --- 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;
  }
}

.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: var(--radius-control);
  border: 1px solid var(--color-border);
  background: color-mix(in oklch, var(--color-surface-2) 40%, transparent);
  font-size: 0.86rem;
  color: var(--color-text-dim);
}

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

.layer.outer {
  border-style: dashed;
  border-color: var(--color-text-dim);
  background: 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: var(--radius-control);
  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-sees .relay-label {
  margin-bottom: 2px;
  font-size: 0.8rem;
  font-weight: 650;
  color: oklch(0.8 0.03 235);
}

/* --- guarded: the three guards, as rows ------------------------------------------------------------------ */

.guards {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  max-width: var(--measure);
  border-bottom: 1px solid var(--hairline);
}

.guards li {
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
}

.prose .guards h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

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

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

.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: calc(var(--radius-control) / 4);
  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.875rem;
  font-weight: 650;
  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;
}

/* What an ask needs, in the secondary ink beside a small swatch of its colour. */
.today {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-dim);
}

.today::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--today);
}

.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;
  border-top: 1px solid var(--color-border);
}

.faq details {
  border-bottom: 1px solid var(--color-border);
}

.faq summary {
  padding: 18px 0;
  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-sans);
  color: var(--color-text-dim);
}

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

.faq details p {
  max-width: var(--measure);
  margin: 0;
  padding: 0 0 20px;
  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: var(--radius-card);
  border: 1.5px solid var(--color-accent);
  background: var(--color-surface-solid);
  box-shadow: var(--shadow-raised);
  text-align: center;
}

/* The gate's state, as the app's gate wears it: under what it asks, beside the doors that answer it —
   never a label over the heading. */
.gate-head {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-weight: 650;
  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 {
  columns: 13rem 3;
  column-gap: 32px;
  max-width: 760px;
  margin-top: 1.6rem;
  font-size: 0.95rem;
}

.toc a {
  display: block;
  padding: 3px 0;
  break-inside: avoid;
  color: var(--color-text);
  text-decoration-color: color-mix(in oklch, var(--color-text) 28%, transparent);
}

.toc a:hover {
  text-decoration-color: currentColor;
}

.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: var(--measure);
}

.prose .shot {
  margin: 1.6rem 0 2rem;
}

.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;
}

.end-cta {
  padding: clamp(56px, 7vw, 96px) 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

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

.end-cta p {
  margin-bottom: 1.4rem;
  color: var(--color-text-dim);
}

/* --- 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.875rem;
  font-weight: 650;
  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: clamp(40px, 6vw, 72px);
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.harness-band > p:first-child {
  margin: 0 0 14px;
  color: var(--color-text-dim);
}

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

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

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

.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 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

/* The fold's own chevron in the page's ink, turning as it opens — never the browser's triangle. */
.more-list > summary::-webkit-details-marker {
  display: none;
}

.more-list > summary::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--motion-fast, 120ms) ease;
}

.more-list[open] > summary::before {
  transform: rotate(45deg);
}

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

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

.feature + .more-list {
  margin-top: 0;
}

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

.gallery li {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
}

.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));
  column-gap: 28px;
}

.team {
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
}

.team h3 {
  margin-bottom: 4px;
  font-size: 1.05rem;
}

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

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

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

.goal-example-body {
  margin: 1.6rem 0 2rem;
  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 h4 {
  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;
  counter-reset: plan;
}

/* Numbered, because the order is the plan's. */
.plan li {
  counter-increment: plan;
  display: grid;
  grid-template-columns: 1.6em minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--hairline);
  font-size: 0.92rem;
}

.plan li::before {
  content: counter(plan);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-dim);
}

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

.plan .plan-who {
  grid-column: 3;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--color-text-dim);
}

.plan .plan-you .plan-who {
  color: var(--color-accent-ink);
}

.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: var(--color-border);
}

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

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

.story h4 {
  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: 650 0.75rem/1.4 var(--font-sans);
  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(--color-text);
}

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

/* --- more in the box: one sentence each, three to a row ------------------------------------------------ */

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

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

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

.tile {
  position: relative;
  padding: 22px;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.tile h3 {
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.tile p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-dim);
}

.tile-link {
  background: transparent;
}

.pets-tile {
  padding-right: 112px;
  min-height: 136px;
  overflow: hidden;
}

.pets-tile .pet {
  top: auto;
  right: 8px;
  bottom: 8px;
}

.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) {
  .waiting-dot,
  .pet.is-awake,
  .pet-lost.is-awake,
  .pet.pet-wave.is-awake {
    animation: none;
  }
}

@media (forced-colors: active) {
  .window,
  .gate,
  .ask-group,
  .goal-plan,
  .more-list,
  .tile {
    border: 1px solid CanvasText;
  }
}
