/* ============================================================
     CIMMICH product site
     Brand   : astronaut badge, four arcs reading as photographic
               corners completing a frame (brand-v2)
     Palette : photo-chrome neutrals + the four brand arc colours
     Type    : system serif display / grotesque body / mono metadata
     Motif   : the brand's four corners, used as the capture frame
     ============================================================ */

  :root {
    /* light: the complete palette lives here */
    --ground:      #F1F3F6;
    --surface:     #FFFFFF;
    --surface-2:   #E7EAEF;
    --ink:         #14171C;
    --ink-2:       #3D4552;
    --muted:       #626B79;
    --line:        #D7DCE4;
    --line-strong: #B9C1CD;

    /* accent derives from the brand amber arc */
    --accent:      #C98A00;
    --accent-ink:  #8A5A00;
    --accent-wash: rgba(201, 138, 0, 0.10);
    --on-accent:   #141000;

    /* the four brand arcs, clockwise from upper-left */
    --arc-blue:  #1E83F7;
    --arc-green: #18C249;
    --arc-amber: #FFB400;
    --arc-pink:  #ED79B5;

    /* light-theme variants that hold their own on a white ground */
    --ev-face:     #1268CC;
    --ev-head:     #12913A;
    --ev-body:     #B57E00;
    --ev-presence: #C0559A;

    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

    --measure: 62ch;
    --shell: 1120px;
    --wide: 1320px;

    --s-1: 0.5rem;
    --s-2: 0.875rem;
    --s-3: 1.5rem;
    --s-4: 2.5rem;
    --s-5: 4rem;
    --s-6: 6.5rem;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --ground:      #0B0C0F;
      --surface:     #15181D;
      --surface-2:   #1D2128;
      --ink:         #E9EBEF;
      --ink-2:       #B9C0CC;
      --muted:       #868F9F;
      --line:        #252A32;
      --line-strong: #39404B;

      --accent:      #FFB400;
      --accent-ink:  #FFC53D;
      --accent-wash: rgba(255, 180, 0, 0.12);
      --on-accent:   #140F00;

      --ev-face:     #4B9BFF;
      --ev-head:     #2FD463;
      --ev-body:     #FFB400;
      --ev-presence: #F58FC2;
    }
  }

  :root[data-theme="dark"] {
    --ground:      #0B0C0F;
    --surface:     #15181D;
    --surface-2:   #1D2128;
    --ink:         #E9EBEF;
    --ink-2:       #B9C0CC;
    --muted:       #868F9F;
    --line:        #252A32;
    --line-strong: #39404B;

    --accent:      #FFB400;
    --accent-ink:  #FFC53D;
    --accent-wash: rgba(255, 180, 0, 0.12);
    --on-accent:   #140F00;

    --ev-face:     #4B9BFF;
    --ev-head:     #2FD463;
    --ev-body:     #FFB400;
    --ev-presence: #F58FC2;
  }

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

  html { scroll-behavior: smooth; }

  body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  a { color: inherit; }

  .skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    transform: translateY(-180%);
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.7rem 1rem;
    text-decoration: none;
  }

  .skip-link:focus { transform: translateY(0); }

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

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

  .eyebrow {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0;
  }

  .lede {
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    line-height: 1.55;
    color: var(--ink-2);
    max-width: var(--measure);
    margin: 0;
  }

  .shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 5vw, 2.5rem);
  }

  .shell--wide { max-width: var(--wide); }

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

  .masthead {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: var(--ground);
  }

  .masthead__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    padding-block: var(--s-2);
  }

  .wordmark {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--mono);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    font-weight: 600;
    text-decoration: none;
  }

  .wordmark img {
    width: 30px;
    height: 30px;
    display: block;
    border-radius: 7px;
    flex: none;
  }

  .navlinks {
    display: flex;
    gap: var(--s-3);
    font-family: var(--mono);
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .navlinks a {
    color: var(--muted);
    text-decoration: none;
    padding-block: 0.2rem;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
  }

  .navlinks a:hover {
    color: var(--ink);
    border-bottom-color: var(--accent);
  }

  .navlinks a[aria-current="page"] {
    color: var(--ink);
    border-bottom-color: var(--accent);
  }

  .masthead__mobile { display: none; }

  @media (max-width: 700px) {
    .masthead__row {
      align-items: flex-start;
      flex-wrap: wrap;
      gap: 0.55rem;
      padding-block: 0.65rem 0.45rem;
    }

    .navlinks {
      display: flex;
      width: 100%;
      gap: 1.1rem;
      overflow-x: auto;
      overscroll-behavior-inline: contain;
      scrollbar-width: none;
      white-space: nowrap;
      padding-block: 0.15rem 0.35rem;
    }

    .navlinks::-webkit-scrollbar { display: none; }
    .navlinks a { flex: none; padding-block: 0.35rem; }

    .masthead--responsive .masthead__row {
      align-items: center;
      flex-wrap: nowrap;
      gap: 0.75rem;
      padding-block: 0.55rem;
    }

    .masthead--responsive .navlinks { display: none; }

    .masthead__mobile {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-left: auto;
      font-family: var(--mono);
      font-size: 0.7rem;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .masthead__install,
    .navmenu summary {
      min-height: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.55rem 0.8rem;
      border: 1px solid var(--line-strong);
      color: var(--ink);
      background: var(--ground);
      text-decoration: none;
      cursor: pointer;
    }

    .masthead__install {
      color: #17120a;
      border-color: var(--accent);
      background: var(--accent);
    }

    .navmenu { position: relative; }
    .navmenu summary { list-style: none; }
    .navmenu summary::-webkit-details-marker { display: none; }
    .navmenu[open] summary { border-color: var(--accent); }

    .navmenu__panel {
      position: absolute;
      top: calc(100% + 0.55rem);
      right: 0;
      width: min(18rem, calc(100vw - 2.5rem));
      display: grid;
      padding: 0.55rem;
      border: 1px solid var(--line-strong);
      background: var(--ground);
      box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
      max-height: calc(100vh - 6rem);
      overflow-y: auto;
    }

    .navmenu__panel a {
      min-height: 44px;
      display: flex;
      align-items: center;
      padding: 0.65rem 0.75rem;
      color: var(--ink-2);
      text-decoration: none;
      border-bottom: 1px solid var(--line);
    }

    .navmenu__panel a:last-child { border-bottom: 0; }
  }

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

  .band {
    padding-block: var(--s-6);
    border-bottom: 1px solid var(--line);
  }

  section[id] { scroll-margin-top: 7rem; }

  .band--tight { padding-block: var(--s-5); }
  .band--hero { padding-block: var(--s-5) var(--s-6); }

  .band__head {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    margin-bottom: var(--s-4);
  }

  /* Heads that carry a lede run two columns so the measure stays
     readable without leaving half the row empty. */
  .band__head--split {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: var(--s-5);
    row-gap: var(--s-2);
    align-items: end;
  }

  .band__head--split .eyebrow { grid-column: 1; }
  .band__head--split .h2 { grid-column: 1; }
  .band__head--split .lede { grid-column: 2; grid-row: 1 / span 2; max-width: 46ch; }

  @media (max-width: 900px) {
    .band__head--split {
      display: flex;
      flex-direction: column;
    }
    .band__head--split .lede { max-width: var(--measure); }
  }

  h1, h2, h3 {
    margin: 0;
    text-wrap: balance;
    font-weight: 500;
  }

  .display {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: -0.015em;
    line-height: 1.02;
    font-size: clamp(3.1rem, 9.5vw, 6.4rem);
  }

  .display em {
    font-style: italic;
    color: var(--accent-ink);
  }

  .h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(1.9rem, 3.6vw, 2.75rem);
    line-height: 1.12;
    letter-spacing: -0.01em;
  }

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

  .hero__top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.6rem 0.75rem;
    margin-bottom: var(--s-3);
  }

  .chip {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.62rem;
    border: 1px solid var(--line-strong);
    color: var(--muted);
    white-space: nowrap;
  }

  .chip--live {
    border-color: var(--accent);
    color: var(--accent-ink);
    background: var(--accent-wash);
  }

  .chip--req {
    border-color: var(--line-strong);
    color: var(--ink-2);
    font-weight: 600;
  }

  .hero__copy {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: var(--s-5);
    align-items: end;
    margin-block: var(--s-3) var(--s-4);
  }

  .hero__side {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    padding-bottom: 0.4rem;
  }

  @media (max-width: 900px) {
    .hero__copy {
      display: flex;
      flex-direction: column;
      gap: var(--s-3);
    }
  }

  .actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    align-items: center;
  }

  .btn {
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.8rem 1.4rem;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--on-accent);
    transition: transform 0.12s ease, opacity 0.15s ease;
  }

  .btn:hover { opacity: 0.88; }
  .btn:active { transform: translateY(1px); }

  .btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-strong);
  }

  .btn--ghost:hover { border-color: var(--ink); opacity: 1; }

  /* ---------- the capture frame ----------
     Corner marks take the four brand arc colours, clockwise from
     upper-left, so every frame reads as the mark. */

  .plate {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
  }

  .frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background:
      linear-gradient(var(--line) 1px, transparent 1px) 0 33.33% / 100% 33.34%,
      linear-gradient(90deg, var(--line) 1px, transparent 1px) 33.33% 0 / 33.34% 100%,
      var(--surface);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    padding: var(--s-4);
    overflow: hidden;
  }

  .frame--tall { aspect-ratio: 4 / 3; }

  .frame__corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid currentColor;
  }

  .frame__corner--tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; color: var(--arc-blue); }
  .frame__corner--tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; color: var(--arc-green); }
  .frame__corner--br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; color: var(--arc-amber); }
  .frame__corner--bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; color: var(--arc-pink); }

  .frame__slug {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-width: 42ch;
  }

  .frame__id {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-ink);
  }

  .frame__what {
    font-size: 1rem;
    line-height: 1.45;
    color: var(--ink-2);
  }

  .frame__spec {
    font-family: var(--mono);
    font-size: 0.7rem;
    line-height: 1.7;
    color: var(--muted);
  }

  .plate figcaption {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--ink-2);
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
  }

  .plate figcaption::before {
    content: "";
    flex: none;
    width: 18px;
    height: 1px;
    background: var(--accent);
    transform: translateY(-0.35em);
  }

  .plates { display: grid; gap: var(--s-5); }

  .plates--pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-4);
  }

  @media (max-width: 700px) {
    .plates--pair { grid-template-columns: 1fr; }
  }

  /* ---------- evidence family ---------- */

  .evidence {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: var(--s-2);
    margin-top: var(--s-3);
  }

  .ev {
    border: 1px solid var(--line);
    background: var(--surface);
    padding: var(--s-3);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .ev__bar { height: 3px; width: 100%; background: currentColor; }
  .ev--face     { color: var(--ev-face); }
  .ev--head     { color: var(--ev-head); }
  .ev--body     { color: var(--ev-body); }
  .ev--presence { color: var(--ev-presence); }

  .ev__name {
    font-family: var(--mono);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
  }

  .ev__note {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.45;
  }

  /* ---------- beside immich ---------- */

  .beside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--s-5);
    align-items: center;
  }

  @media (max-width: 780px) {
    .beside { grid-template-columns: 1fr; gap: var(--s-4); }
  }

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

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

  .d-box   { fill: none; stroke: var(--line-strong); stroke-width: 1; }
  .d-label { fill: var(--muted); }
  .d-name  { fill: var(--ink); font-size: 15px; text-transform: none; letter-spacing: 0; }
  .d-flow  { stroke: var(--accent); stroke-width: 1.5; fill: none; }
  .d-arrow { fill: var(--accent); }
  .d-accent{ fill: var(--accent-ink); }

  /* ---------- privacy facts ---------- */

  .facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
  }

  .fact {
    background: var(--ground);
    padding: var(--s-3);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }

  .fact__n {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    color: var(--accent-ink);
  }

  .fact__t { font-size: 1.02rem; font-weight: 500; line-height: 1.3; }

  /* ---------- install ---------- */

  .close {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-3);
  }

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

  .codeline {
    font-family: var(--mono);
    font-size: 0.82rem;
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 0.9rem 1.2rem;
    color: var(--ink-2);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
    text-align: left;
  }

  .proof {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.4rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-top: var(--s-1);
  }

  .proof span { white-space: nowrap; }
  .proof b { color: var(--ink-2); font-weight: 500; }

  .install-preflight { width: 100%; border: 1px solid var(--line); background: var(--surface); text-align: left; }
  .install-preflight summary { padding: 0.9rem 1.2rem; color: var(--ink-2); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
  .install-preflight .codeline { border: 0; border-top: 1px solid var(--line); }

  /* ---------- product-house bridge ---------- */

  .house-bridge {
    border-block: 1px solid var(--line);
    background:
      linear-gradient(135deg, var(--accent-wash), transparent 45%),
      var(--surface);
  }

  .house-bridge__inner {
    padding-block: clamp(3.25rem, 7vw, 5.5rem);
  }

  .house-bridge__content {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
    gap: clamp(2rem, 7vw, 6rem);
    align-items: end;
    margin-top: var(--s-2);
  }

  .house-bridge h2 {
    max-width: 15ch;
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(2.15rem, 5vw, 4.5rem);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.035em;
  }

  .house-bridge__copy {
    max-width: 34rem;
    color: var(--ink-2);
  }

  .house-bridge__copy p { margin: 0 0 var(--s-3); }

  .house-bridge__link {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    border-bottom: 1px solid var(--accent);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.15s ease, gap 0.15s ease;
  }

  .house-bridge__link:hover {
    gap: 0.95rem;
    color: var(--accent-ink);
  }

  @media (max-width: 700px) {
    .house-bridge__content {
      grid-template-columns: 1fr;
      gap: var(--s-3);
    }

    .house-bridge h2 { max-width: 12ch; }
  }

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

  .foot {
    padding-block: var(--s-4) var(--s-5);
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--muted);
  }

  .foot__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    justify-content: space-between;
    align-items: baseline;
  }

  .foot a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
  .foot a:hover { color: var(--accent-ink); border-bottom-color: var(--accent); }

  .foot__house { white-space: nowrap; }

  .foot__note { margin-top: var(--s-3); max-width: none; line-height: 1.7; }

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

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

  .rise { opacity: 1; transform: none; }

  .js-anim .rise {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
  }

  .js-anim .rise.is-in { opacity: 1; transform: none; }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js-anim .rise { opacity: 1; transform: none; transition: none; }
    .btn, .navlinks a { transition: none; }
  }

  @media (max-width: 620px) {
    :root {
      --s-5: 3rem;
      --s-6: 4.5rem;
    }

    body { font-size: 16px; }
    .display { font-size: clamp(3rem, 18vw, 4.7rem); }
    .hero__top { gap: 0.45rem; }
    .chip { white-space: normal; }
    .actions { width: 100%; }
    .actions .btn { flex: 1 1 12rem; text-align: center; }
  }

/* ============================================================
   Documentation pages (install, docs)
   ============================================================ */

.doc { max-width: 74ch; min-width: 0; }

.doc h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  line-height: 1.2;
  margin-top: var(--s-5);
}

.doc h4 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  margin-top: var(--s-4);
}

.doc p, .doc li { color: var(--ink-2); }
.doc p { margin: var(--s-2) 0; }
.doc ul, .doc ol { padding-left: 1.2rem; margin: var(--s-2) 0; }
.doc li { margin-block: 0.3rem; }
.doc li::marker { color: var(--muted); }

.doc a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }

.code {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.7;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  padding: 0.9rem 1.1rem;
  margin: var(--s-2) 0;
  color: var(--ink);
  overflow-x: auto;
  white-space: pre;
}

.code--out { border-left-color: var(--line-strong); color: var(--ink-2); }

/* numbered steps: the order is the install sequence, so it carries meaning */
.steps { display: flex; flex-direction: column; gap: var(--s-5); counter-reset: step; }

.step { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); column-gap: var(--s-3); }
.step__body { min-width: 0; }

.step__n {
  counter-increment: step;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--accent-ink);
  padding-top: 0.55rem;
}

.step__n::before { content: counter(step, decimal-leading-zero); }

.step__body > :first-child { margin-top: 0; }

.step h3 { margin-top: 0; }

@media (max-width: 620px) {
  .step { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-1); }
  .step__n { padding-top: 0; }
}

/* callouts */
.note {
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  background: var(--surface);
  padding: var(--s-3);
  margin: var(--s-3) 0;
}

.note--warn { border-left-color: var(--ev-presence); }

.note__t {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 0.4rem;
}

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

/* what it touches */
.touch {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: var(--s-3) 0;
}

.touch__col { background: var(--ground); padding: var(--s-3); }

.touch__t {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--s-2);
  display: block;
}

.touch__col--yes .touch__t { color: var(--ev-body); }
.touch__col--no .touch__t { color: var(--ev-head); }

.touch ul { margin: 0; padding-left: 1.1rem; }

/* spec table */
.spec { width: 100%; border-collapse: collapse; margin: var(--s-3) 0; font-size: 0.95rem; }
.spec th, .spec td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.spec td { color: var(--ink-2); }
.spec td:first-child { color: var(--ink); white-space: nowrap; }
.table-wrap { overflow-x: auto; }

/* page intro */
.pagehead { display: flex; flex-direction: column; gap: var(--s-2); }
.crumb { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.crumb a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.crumb a:hover { color: var(--ink); }

/* documentation layout: reading column plus a sticky contents rail */
.docwrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  column-gap: var(--s-6);
  align-items: start;
}

.toc {
  position: sticky;
  top: var(--s-3);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  border-left: 1px solid var(--line);
  padding-left: var(--s-3);
}

.toc__t {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 0.2rem;
}

.toc a { color: var(--muted); text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--accent-ink); }

.doc section { scroll-margin-top: var(--s-3); min-width: 0; }
.doc > section + section { margin-top: var(--s-6); }
.doc > section > h2:first-child { margin-bottom: var(--s-2); }

@media (max-width: 980px) {
  .docwrap { grid-template-columns: minmax(0, 1fr); }
  .toc {
    position: static;
    order: -1;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 var(--s-3);
    white-space: nowrap;
  }
  .toc a { flex: none; }
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

.code code { background: none; padding: 0; font-size: inherit; }

/* ---------- real product captures ----------
   Screenshots ship light-theme only, so they sit on their own plate
   rather than pretending to follow the page theme. */

.shot { margin: 0; display: flex; flex-direction: column; gap: var(--s-2); }

.shot__frame {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 10px;
  overflow: hidden;
}

.shot__frame img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
}

.shot .frame__corner { z-index: 1; }

.shot figcaption {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-2);
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}

.shot figcaption::before {
  content: "";
  flex: none;
  width: 18px;
  height: 1px;
  background: var(--accent);
  transform: translateY(-0.35em);
}

.shots-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
}

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

.doc .shot { margin: var(--s-3) 0 var(--s-4); }

/* ============================================================
   Documentation section: persistent sidebar
   ============================================================ */

.docshell {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  column-gap: var(--s-6);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: var(--s-3);
  max-height: calc(100vh - var(--s-4));
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 0.74rem;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding-right: var(--s-2);
  border-right: 1px solid var(--line);
}

.sidebar__summary { display: none; }
.sidebar:not([open]) > .sidebar__group { display: flex; }

.sidebar__group { display: flex; flex-direction: column; gap: 0.4rem; }

.sidebar__t {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.66rem;
}

.sidebar a {
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.35;
  padding-left: 0.6rem;
  border-left: 1px solid transparent;
}

.sidebar a:hover { color: var(--accent-ink); border-left-color: var(--line-strong); }
.sidebar a[aria-current="page"] { color: var(--accent-ink); border-left-color: var(--accent); }

@media (max-width: 940px) {
  .docshell { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-4); }
  .sidebar {
    position: static;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 var(--s-3);
    display: block;
  }
  .sidebar__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-2);
    padding-block: var(--s-2);
    list-style: none;
  }
  .sidebar__summary::-webkit-details-marker { display: none; }
  .sidebar__summary::after { content: "+"; color: var(--accent-ink); font-size: 1rem; }
  .sidebar[open] .sidebar__summary::after { content: "−"; }
  .sidebar:not([open]) > .sidebar__group { display: none; }
  .sidebar[open] > .sidebar__group { display: flex; margin-top: var(--s-3); }
}

/* guide chapters */
.chapter + .chapter { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.chapter { scroll-margin-top: var(--s-3); min-width: 0; }
.chapter > h2 { margin-bottom: var(--s-2); }

/* question and answer */
.qa { border-top: 1px solid var(--line); padding-top: var(--s-3); margin-top: var(--s-3); }
.qa:first-of-type { border-top: 0; }
.qa h3 { margin-top: 0; font-family: var(--sans); font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.qa p { margin-top: 0.4rem; }

/* ---------- the why page: one quiet column ---------- */

.essay {
  max-width: 34rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.essay p {
  font-size: clamp(1.1rem, 1.7vw, 1.28rem);
  line-height: 1.62;
  color: var(--ink);
  margin: 0;
}

.essay h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 var(--s-2);
}

.essay p + p { margin-top: 0.2rem; }

.essay__sig {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
}

.essay__mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: block;
  margin-bottom: var(--s-3);
}

.ownership-proof { margin-top: var(--s-3); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.ownership-proof .eyebrow { font-size: 0.68rem; line-height: 1.4; }
.ownership-proof__grid { display: grid; gap: 1px; margin-top: var(--s-2); border: 1px solid var(--line); background: var(--line); }
.ownership-proof__grid a { display: grid; gap: 0.55rem; padding: var(--s-3); background: var(--surface); color: var(--ink); text-decoration: none; }
.ownership-proof__grid a:hover { background: var(--surface-2); }
.ownership-proof__grid strong { font-family: var(--serif); font-size: 1.4rem; font-weight: 400; }
.ownership-proof__grid span { color: var(--muted); font-size: 0.92rem; line-height: 1.5; }

.band--next { padding-block: var(--s-5); background: var(--surface-2); }
.next-step { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-5); align-items: center; }
.next-step .h2 { max-width: 19ch; font-size: clamp(2rem, 4vw, 3.5rem); }
.next-step p:not(.eyebrow) { max-width: 52ch; color: var(--muted); line-height: 1.6; }
.next-step .actions { max-width: 25rem; justify-content: flex-end; }

@media (max-width: 900px) {
  .next-step { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .next-step .actions { max-width: none; justify-content: flex-start; }
}

/* ============================================================
   Homepage redesign: the memory graph is the product category.
   Existing documentation components remain shared below it.
   ============================================================ */

.hero-redesign {
  --hero-ink: #f3f4f6;
  --hero-muted: #a8b0bd;
  --hero-line: rgba(255, 255, 255, 0.14);
  position: relative;
  overflow: hidden;
  min-height: min(860px, calc(100svh - 64px));
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 78% 18%, rgba(30, 131, 247, 0.16), transparent 29rem),
    radial-gradient(circle at 88% 82%, rgba(237, 121, 181, 0.12), transparent 25rem),
    #0a0c10;
  color: var(--hero-ink);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.hero-redesign::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, transparent, #000 45%, #000);
}

.hero-redesign .shell { position: relative; z-index: 1; }

.hero-release-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0;
  margin: 0 0 clamp(1.5rem, 2.5vw, 2.25rem);
  color: var(--hero-muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero-release-line strong { color: #ffca4a; font-weight: 500; }
.hero-release-line span,
.hero-release-line strong { padding-inline: 0.75rem; border-left: 1px solid var(--hero-line); }
.hero-release-line strong { padding-left: 0; border-left: 0; }

.hero-release-line span:last-child {
  color: #c7cdd6;
}

.hero-release-line a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-release-line a:hover { color: var(--hero-ink); }

.memory-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 1fr);
  grid-template-rows: auto auto;
  gap: clamp(3rem, 5vw, 5.5rem);
  row-gap: 0;
  align-items: center;
}

.memory-hero__copy { min-width: 0; grid-column: 1; grid-row: 1; }
.memory-hero__copy .eyebrow { color: #ffca4a; margin-bottom: 0.9rem; }

.display--memory {
  max-width: 14.2ch;
  font-size: clamp(3.25rem, 4.2vw, 4.7rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.display--memory em {
  display: block;
  margin-top: 0.1em;
  color: var(--hero-ink);
  font-style: normal;
}

.display--memory em span {
  background: linear-gradient(95deg, #7bb7ff 0%, #68df8d 35%, #ffd46c 68%, #f4a2ce 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.memory-hero__copy .lede {
  color: #c7cdd6;
  max-width: 54ch;
  margin-top: 1.25rem;
}

.memory-hero__copy .actions { margin-top: 1.25rem; }
.hero-redesign .btn--ghost { color: var(--hero-ink); border-color: var(--hero-line); }
.hero-redesign .btn--ghost:hover { border-color: rgba(255, 255, 255, 0.55); }

.text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--hero-muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-underline-offset: 4px;
}
.text-link:hover { color: var(--hero-ink); }

.memory-promises {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-column: 1;
  grid-row: 2;
  margin: 1.6rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hero-line);
}

.memory-promises div { padding-right: 1rem; }
.memory-promises div + div { padding-left: 1rem; border-left: 1px solid var(--hero-line); }
.memory-promises dt {
  color: var(--hero-ink);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.memory-promises dd { margin: 0.3rem 0 0; color: var(--hero-muted); font-size: 0.82rem; line-height: 1.35; }

.memory-hero__visual {
  position: relative;
  min-width: 0;
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 3.5rem 1rem;
}

.hero-product {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  transform: perspective(1000px) rotateY(-5deg) rotateX(0.35deg) scale(0.985);
  transform-origin: left center;
}

.hero-product img {
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(1.2) contrast(1.02) saturate(1.04);
}

.memory-orbit { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; z-index: 3; }
.memory-node {
  position: absolute;
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: rgba(10, 12, 16, 0.9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.memory-node--people { top: 0.75rem; left: 12%; color: #7bb7ff; }
.memory-node--pets { top: 2.1rem; right: 8%; color: #68df8d; }
.memory-node--places { top: 45%; right: -1.5rem; color: #ffd46c; }
.memory-node--things { bottom: 1.8rem; right: 13%; color: #f4a2ce; }
.memory-node--events { bottom: 0.65rem; left: 16%; color: #7bb7ff; }
.memory-node--documents { top: 45%; left: -2.25rem; color: #f4a2ce; }

@media (max-width: 1080px) {
  .memory-hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; }
  .memory-hero__copy { max-width: 820px; grid-column: 1; grid-row: 1; }
  .display--memory { max-width: 13ch; }
  .memory-hero__visual { max-width: 820px; width: 100%; margin-inline: auto; grid-column: 1; grid-row: 2; }
  .memory-promises { grid-column: 1; grid-row: 3; }
}

@media (max-width: 620px) {
  .hero-redesign { min-height: 0; padding-block: 2.25rem 3.5rem; }
  .hero-redesign::before { background-size: 48px 48px; }
  .hero-release-line { flex-wrap: nowrap; gap: 0; margin-bottom: 1.15rem; font-size: 0.59rem; letter-spacing: 0.045em; }
  .hero-release-line span,
  .hero-release-line strong { padding-inline: 0.55rem; }
  .hero-release-line strong { padding-left: 0; }
  .hero-release-line__compat { display: none; }
  .display--memory { max-width: none; font-size: clamp(2.55rem, 10.8vw, 3.1rem); }
  .memory-hero__copy .lede { font-size: 1rem; line-height: 1.5; }
  .memory-hero__copy .actions .btn--ghost { display: none; }
  .memory-promises { grid-template-columns: 1fr; gap: 0.9rem; }
  .memory-promises div { padding: 0; }
  .memory-promises div + div { padding: 0.9rem 0 0; border-left: 0; border-top: 1px solid var(--hero-line); }
  .memory-hero__visual { padding: 0.75rem 0 3rem; }
  .hero-product {
    border-radius: 10px;
    transform: perspective(800px) rotateY(-3.5deg) rotateX(0.25deg) scale(0.985);
  }
  .memory-node { font-size: 0.61rem; padding: 0.45rem 0.62rem; min-height: 36px; }
  .memory-node--people { left: 1%; }
  .memory-node--pets { right: 1%; }
  .memory-node--places { right: -0.5rem; top: auto; bottom: 0.5rem; }
  .memory-node--things { display: none; }
  .memory-node--events { left: 1%; bottom: 0.1rem; }
  .memory-node--documents { left: -0.5rem; top: 46%; }
}

@media (min-width: 1081px) and (max-height: 800px) {
  .hero-redesign { min-height: 0; padding-block: 2.25rem 2.75rem; }
  .hero-release-line { margin-bottom: 1.35rem; }
  .display--memory { font-size: clamp(3.25rem, 4.15vw, 4.65rem); }
  .memory-hero__copy .lede { margin-top: 1rem; font-size: 1rem; line-height: 1.45; }
  .memory-hero__copy .actions { margin-top: 1rem; }
  .memory-promises { margin-top: 1.25rem; padding-top: 1rem; }
  .memory-hero__visual { padding-block: 2.75rem; }
}

.proof-intro { max-width: 900px; margin-bottom: 0; }
.proof-intro + .proof-chain { margin-top: var(--s-4); }

.proof-chain {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-5) var(--s-4);
}

.proof-step { min-width: 0; border-top: 1px solid var(--line-strong); padding-top: var(--s-3); }
.proof-step--lead {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: var(--s-4);
  align-items: start;
}
.proof-step__copy { margin-bottom: var(--s-3); }
.proof-step--lead .proof-step__copy { margin-bottom: 0; }
.proof-step__copy span,
.proof-mechanisms span {
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.proof-step__copy h3 { max-width: 20ch; margin-top: 1.25rem; font-family: var(--serif); font-size: 1.7rem; line-height: 1.12; }
.proof-step__copy p { max-width: 42ch; margin: 1rem 0 0; color: var(--muted); font-size: 0.94rem; line-height: 1.55; }

.proof-mechanisms {
  margin-top: var(--s-5);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}
.proof-mechanisms article { min-height: 138px; padding: var(--s-3); background: var(--surface); }
.proof-mechanisms p { margin: 1.35rem 0 0; color: var(--ink-2); font-size: 0.96rem; line-height: 1.45; }

.band--dark {
  --ink: #f3f4f6;
  --ink-2: #c7cdd6;
  --muted: #98a1ae;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  --surface: #15181e;
  --surface-2: #20242c;
  --accent-ink: #ffca4a;
  background: #101217;
  color: var(--ink);
}
.band--dark .eyebrow { color: #ffca4a; }

.decision-loop {
  list-style: none;
  margin: var(--s-5) 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  counter-reset: decision;
}
.decision-loop--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.decision-loop li {
  counter-increment: decision;
  position: relative;
  min-height: 150px;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}
.decision-loop li + li { border-left: 0; }
.decision-loop li:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -0.75rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #ffb400;
  color: #171100;
  font-size: 0.8rem;
}
.decision-loop b { display: block; font-family: var(--serif); font-size: 1.45rem; font-weight: 400; }
.decision-loop b::before {
  content: "0" counter(decision) " / ";
  color: #ffca4a;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}
.decision-loop span { display: block; margin-top: 1rem; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }

.authority-proof {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.authority-proof .evidence { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.evidence--compact .ev { min-height: 128px; }

.authority-guards {
  margin: var(--s-4) 0 0;
  border-top: 1px solid var(--line-strong);
}
.authority-guards div { display: grid; grid-template-columns: minmax(110px, 0.42fr) minmax(0, 1fr); gap: var(--s-2); padding: 1rem 0; border-bottom: 1px solid var(--line); }
.authority-guards dt { color: var(--accent-ink); font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.09em; text-transform: uppercase; }
.authority-guards dd { margin: 0; color: var(--ink-2); font-size: 0.9rem; line-height: 1.45; }

.band--matching { border-top: 1px solid var(--line); }
.matching-proof { margin-top: var(--s-4); }
.matching-visuals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-3);
  align-items: start;
}
.matching-stage { min-width: 0; }
.matching-stage figcaption {
  display: block;
  min-height: 92px;
  margin: 0;
  padding: 1rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}
.matching-stage figcaption::before {
  display: inline-block;
  margin-right: 0.6rem;
  vertical-align: middle;
  transform: none;
}
.matching-stage figcaption b {
  display: inline;
  margin-right: 0.55rem;
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.matching-rule {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(420px, 1.22fr);
  gap: var(--s-4);
  align-items: start;
  margin-top: var(--s-5);
  padding-block: var(--s-4);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}
.matching-rule__copy { min-width: 0; }
.matching-rule .eyebrow { margin-top: 0.35rem; }
.matching-rule .h2 { max-width: 24ch; font-size: clamp(1.8rem, 3.4vw, 3.1rem); }
.matching-rule .lede { max-width: 62ch; margin-top: 1.25rem; }
.matching-rule__visual { min-width: 0; }
.matching-rule__visual figcaption {
  margin: 0;
  padding-top: 0.9rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}
.matching-loop { margin-top: var(--s-5); }
.matching-loop + .actions { margin-top: var(--s-4); }
.matching-rule + .actions { margin-top: var(--s-4); }
.stack-diagram {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: var(--s-3);
  align-items: stretch;
  margin-block: var(--s-5);
}
.stack-card { position: relative; min-height: 220px; padding: var(--s-4); border: 1px solid var(--line-strong); background: var(--surface); }
.stack-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--arc-blue); }
.stack-card--memory::before { background: linear-gradient(var(--arc-blue), var(--arc-green), var(--arc-amber), var(--arc-pink)); }
.stack-card__k { display: block; color: var(--muted); font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; }
.stack-card strong { display: block; margin-top: 2rem; font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 400; line-height: 1; }
.stack-card p { max-width: 38ch; color: var(--ink-2); margin: 1rem 0 0; }
.stack-link { min-width: 160px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 0.75rem; color: var(--muted); font-family: var(--mono); font-size: 0.68rem; text-align: center; text-transform: uppercase; letter-spacing: 0.06em; }
.stack-link b { color: var(--accent-ink); font-size: 1.5rem; font-weight: 400; }
.stack-exception { margin: calc(-1 * var(--s-3)) 0 var(--s-4); padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.stack-exception strong { color: var(--ink); }

.trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--line); gap: 1px; }
.trust-grid article { background: var(--ground); padding: var(--s-3); }
.trust-grid span { color: var(--accent-ink); font-family: var(--mono); font-size: 0.68rem; }
.trust-grid h3 { margin-top: 1.6rem; font-family: var(--serif); font-size: 1.35rem; line-height: 1.15; }
.trust-grid p { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.actions--center { justify-content: center; margin-top: var(--s-4); }

.band--soft { background: var(--surface-2); }
.steward-rule { margin: 0 0 var(--s-4); padding: 1rem 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.steward-rule strong { color: var(--ink); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.steward-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.steward-grid a {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  padding: var(--s-4);
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.steward-grid a:hover { border-color: var(--accent); transform: translateY(-2px); }
.steward-grid span { color: var(--accent-ink); font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; }
.steward-grid strong { max-width: 22ch; margin-top: auto; padding-top: 2rem; font-family: var(--serif); font-size: 1.65rem; font-weight: 400; line-height: 1.15; }
.steward-grid p { color: var(--muted); margin-bottom: 0; }

.band--continuity { padding-block: var(--s-4); }
.project-continuity { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s-5); align-items: start; }
.project-continuity .actions { margin-top: var(--s-3); }
.continuity-owner { margin: 1rem 0 0; color: var(--muted); font-family: var(--mono); font-size: 0.72rem; line-height: 1.5; }
.continuity-owner a { color: var(--ink-2); }

@media (max-width: 900px) {
  .authority-proof, .project-continuity { grid-template-columns: minmax(0, 1fr); }
  .matching-visuals, .matching-rule { grid-template-columns: minmax(0, 1fr); }
  .matching-visuals { gap: var(--s-4); }
  .matching-stage figcaption { min-height: 0; }
  .matching-rule { gap: var(--s-2); }
  .project-continuity { gap: var(--s-3); }
  .proof-step--lead { grid-template-columns: minmax(0, 1fr); }
  .proof-step--lead .proof-step__copy { margin-bottom: var(--s-3); }
  .decision-loop { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); }
  .decision-loop--three { grid-template-columns: minmax(0, 1fr); }
  .decision-loop li { border: 0; }
  .decision-loop li:not(:last-child)::after { display: none; }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .proof-chain, .proof-mechanisms, .steward-grid, .trust-grid { grid-template-columns: minmax(0, 1fr); }
  .proof-step--lead { grid-column: auto; }
  .proof-mechanisms article { min-height: 0; }
  .stack-diagram { grid-template-columns: minmax(0, 1fr); }
  .stack-link { min-height: 90px; }
  .stack-link b { transform: rotate(90deg); }
  .stack-card { min-height: 190px; }
  .authority-proof .evidence { grid-template-columns: minmax(0, 1fr); }
  .authority-guards div { grid-template-columns: minmax(0, 1fr); gap: 0.55rem; }
  .steward-grid a { min-height: 190px; }
  .project-continuity .actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
  .project-continuity .btn { min-width: 0; padding: 0.7rem 0.35rem; justify-content: center; font-size: 0.62rem; line-height: 1.3; text-align: center; }
}

/* ============================================================
   Product Tour: show the experience before the implementation.
   ============================================================ */

.tour-hero {
  padding-block: clamp(3.5rem, 7vw, 7rem) 2rem;
  overflow: hidden;
  color: #f3f4f6;
  background:
    radial-gradient(circle at 82% 18%, rgba(30, 131, 247, 0.17), transparent 29rem),
    radial-gradient(circle at 91% 82%, rgba(237, 121, 181, 0.1), transparent 25rem),
    #0a0c10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tour-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(520px, 1.14fr);
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

.tour-hero__copy .eyebrow { color: #ffca4a; }
.tour-hero__copy h1 {
  max-width: 10.5ch;
  margin: 1rem 0 0;
  font-family: var(--serif);
  font-size: clamp(3.35rem, 5.5vw, 5.9rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.96;
}
.tour-hero__copy .lede { max-width: 52ch; margin-top: 1.4rem; color: #c7cdd6; }
.tour-hero__copy .actions { margin-top: 1.5rem; }
.tour-hero .btn--ghost { color: #f3f4f6; border-color: rgba(255, 255, 255, 0.18); }
.tour-hero .btn--ghost:hover { border-color: rgba(255, 255, 255, 0.55); }

.tour-hero__visual {
  min-width: 0;
  margin: 0;
  transform: perspective(1100px) rotateY(-3.5deg) rotateX(0.25deg);
  transform-origin: left center;
}
.tour-hero__visual .shot__frame { background: #08090c; }
.tour-hero__visual img { display: block; width: 100%; height: auto; filter: brightness(1.12) contrast(1.02); }
.tour-hero__visual figcaption { margin-top: 0.85rem; color: #9da6b4; font-size: 0.78rem; line-height: 1.45; }

.tour-chapters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.tour-chapters a {
  min-width: 0;
  display: grid;
  gap: 0.5rem;
  padding: 1.1rem 0.85rem;
  color: #a8b0bd;
  text-decoration: none;
}
.tour-chapters a + a { border-left: 1px solid rgba(255, 255, 255, 0.14); }
.tour-chapters a:hover { color: #f3f4f6; background: rgba(255, 255, 255, 0.04); }
.tour-chapters b { color: #ffca4a; font-family: var(--mono); font-size: 0.64rem; font-weight: 500; }
.tour-chapters span { overflow-wrap: anywhere; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.045em; text-transform: uppercase; }

.tour-section { scroll-margin-top: 64px; }
.tour-anchor { display: block; scroll-margin-top: 160px; }
.tour-section--matching { padding-block: var(--s-5); }
.tour-section--matching .tour-section__head { max-width: 1120px; margin-bottom: var(--s-4); }
.tour-section--matching .tour-section__head .h2 { max-width: 28ch; font-size: clamp(2.8rem, 4.7vw, 4.5rem); }
.tour-section__head { max-width: 960px; margin-bottom: var(--s-5); }
.tour-section__head .h2 { max-width: 18ch; margin-top: 1rem; font-size: clamp(2.8rem, 5.4vw, 5rem); }
.tour-section__head .lede { max-width: 60ch; margin-top: 1.3rem; }
.tour-section__head--split {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.68fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: end;
}
.tour-section__head--split .lede { margin: 0; }

.tour-loop {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 var(--s-5);
  padding: 1px;
  background: var(--line-strong);
}
.tour-loop li {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.85rem;
  align-items: center;
  min-height: 108px;
  padding: 1.25rem;
  background: var(--ground);
}
.tour-loop li:not(:last-child)::after {
  content: "→";
  position: absolute;
  z-index: 2;
  right: -0.85rem;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  color: var(--accent-ink);
  background: var(--ground);
}
.tour-loop span { grid-row: 1 / span 2; color: var(--accent-ink); font-family: var(--mono); font-size: 0.68rem; }
.tour-loop b { font-family: var(--serif); font-size: 1.45rem; font-weight: 400; }
.tour-loop small { color: var(--muted); font-size: 0.82rem; }

.tour-shot-grid { display: grid; gap: var(--s-4); }
.tour-shot-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tour-shot-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.tour-shot-grid .shot { min-width: 0; }
.tour-shot-grid figcaption b,
.tour-evidence-grid figcaption b,
.tour-story-grid figcaption b { color: var(--ink); }

.tour-evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: var(--s-4);
  align-items: stretch;
}
.tour-evidence-grid__lead { min-width: 0; }
.tour-evidence-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; padding: 1px; background: var(--line); }
.tour-evidence-types article { min-height: 150px; padding: 1.25rem; background: var(--surface); }
.tour-evidence-types span { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.tour-evidence-types .ev--face { color: var(--arc-blue); }
.tour-evidence-types .ev--head { color: var(--arc-green); }
.tour-evidence-types .ev--body { color: var(--arc-amber); }
.tour-evidence-types .ev--presence { color: var(--arc-pink); }
.tour-evidence-types p { margin: 1.2rem 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.tour-wide-proof { max-width: 920px; margin: var(--s-5) auto 0; }

.tour-story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.tour-story-grid__lead { grid-column: 1 / -1; }
.tour-story-grid .shot { min-width: 0; }

.tour-search-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
}
.tour-search-grid__copy .h2 { max-width: 12ch; margin-top: 1rem; font-size: clamp(2.8rem, 5vw, 4.7rem); }
.tour-search-grid__copy .lede { margin-top: 1.25rem; }
.tour-benefits { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.tour-benefits li { display: grid; gap: 0.4rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.tour-benefits b { color: var(--ink); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
.tour-benefits span { color: var(--muted); font-size: 0.9rem; line-height: 1.45; }

.tour-value-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; padding: 1px; background: var(--line-strong); }
.tour-value-grid article { min-height: 360px; display: flex; flex-direction: column; padding: clamp(2rem, 4vw, 4rem); background: var(--ground); }
.tour-value-grid .h2 { max-width: 15ch; margin-top: 1rem; font-size: clamp(2.25rem, 4vw, 3.7rem); }
.tour-value-grid p:not(.eyebrow) { max-width: 48ch; color: var(--muted); }
.tour-value-grid .text-link { margin-top: auto; padding-top: 2rem; color: var(--accent-ink); }
.tour-value-grid .text-link:hover { color: var(--ink); }

.tour-trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; padding: 1px; background: var(--line); }
.tour-trust-grid article { min-height: 190px; padding: var(--s-3); background: var(--surface); }
.tour-trust-grid b { font-family: var(--serif); font-size: 1.45rem; font-weight: 400; }
.tour-trust-grid p { margin: 1rem 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.tour-trust .actions { margin-top: var(--s-4); }

@media (max-width: 1000px) {
  .tour-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .tour-hero__copy { max-width: 760px; }
  .tour-hero__copy h1 { max-width: 11ch; }
  .tour-hero__visual { max-width: 840px; }
  .tour-chapters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tour-chapters a:nth-child(4) { border-left: 0; }
  .tour-chapters a:nth-child(n + 4) { border-top: 1px solid rgba(255, 255, 255, 0.14); }
  .tour-section__head--split,
  .tour-evidence-grid,
  .tour-search-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
  .tour-section__head--split .lede { margin-top: 1rem; }
  .tour-story-grid { grid-template-columns: minmax(0, 1fr); }
  .tour-story-grid__lead { grid-column: auto; }
  .tour-shot-grid--three { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .tour-hero { padding-block: 2.4rem 1.25rem; }
  .tour-hero__grid { gap: 2rem; }
  .tour-hero__copy h1 { max-width: none; font-size: clamp(2.7rem, 12.5vw, 3.5rem); }
  .tour-hero__copy .lede { margin-top: 1rem; font-size: 1rem; line-height: 1.5; }
  .tour-hero__copy .actions { margin-top: 1.1rem; }
  .tour-hero__copy .btn--ghost { display: none; }
  .tour-hero__visual { transform: perspective(800px) rotateY(-2deg) rotateX(0.2deg); }
  .tour-hero__visual figcaption { font-size: 0.72rem; }
  .tour-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 2rem; }
  .tour-chapters a { padding: 0.85rem 0.65rem; }
  .tour-chapters a:nth-child(odd) { border-left: 0; }
  .tour-chapters a:nth-child(even) { border-left: 1px solid rgba(255, 255, 255, 0.14); }
  .tour-chapters a:nth-child(n + 3) { border-top: 1px solid rgba(255, 255, 255, 0.14); }
  .tour-section__head { margin-bottom: var(--s-4); }
  .tour-section__head .h2 { font-size: clamp(2.45rem, 11vw, 3.4rem); }
  .tour-loop { grid-template-columns: minmax(0, 1fr); }
  .tour-loop li { min-height: 88px; }
  .tour-loop li:not(:last-child)::after { content: "↓"; right: auto; bottom: -0.85rem; left: 1.35rem; }
  .tour-shot-grid--two,
  .tour-evidence-types,
  .tour-value-grid,
  .tour-trust-grid { grid-template-columns: minmax(0, 1fr); }
  .tour-evidence-types article { min-height: 120px; }
  .tour-value-grid article { min-height: 300px; }
  .tour-search-grid__copy .h2 { font-size: clamp(2.45rem, 11vw, 3.4rem); }
}

/* ============================================================
   Task-led user guide
   ============================================================ */

.guide-overview {
  padding: var(--s-5) 0 var(--s-6);
  color: #f4f6f8;
  background:
    radial-gradient(circle at 88% 8%, rgba(30, 131, 247, 0.18), transparent 30rem),
    linear-gradient(145deg, #101318 0%, #171c24 100%);
  border-bottom: 1px solid var(--line);
}
.guide-overview [id] { scroll-margin-top: 5.25rem; }
.guide-overview .crumb,
.guide-overview .crumb a { color: #9da7b6; }
.guide-overview .eyebrow { color: #ffca4a; }
.guide-overview__hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(28rem, 1.1fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
  padding-bottom: var(--s-5);
}
.guide-overview__hero h1 {
  max-width: 12ch;
  margin: 1rem 0 0;
  font-family: var(--serif);
  font-size: clamp(3.2rem, 6vw, 5.8rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.guide-overview__hero .lede { max-width: 58ch; margin-top: 1.4rem; color: #c8ced8; }
.guide-overview__hero .actions { margin-top: 1.5rem; }
.guide-overview .btn--ghost { color: #eef1f5; border-color: #596473; }
.guide-overview__visual { margin: 0; }
.guide-overview__visual figcaption { color: #9da7b6; }

.guide-story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: rgba(255, 255, 255, 0.14);
}
.guide-story { min-width: 0; background: #151a21; }
.guide-story .shot { margin: 0; }
.guide-story .shot__frame { border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.guide-story .shot__frame img { aspect-ratio: 16 / 9; object-fit: cover; }
.guide-story__copy { padding: clamp(1.35rem, 3vw, 2.3rem); }
.guide-story__copy h2 {
  max-width: 17ch;
  margin: 0.7rem 0 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.3vw, 3rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.guide-story__copy > p:not(.eyebrow) { max-width: 56ch; margin: 1rem 0 0; color: #b8c0ca; line-height: 1.65; }
.guide-story__detail { margin-top: 1.35rem; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.guide-story__detail summary,
.guide-detail summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.guide-story__detail summary { padding: 1rem 0; color: #eef1f5; }
.guide-story__detail summary::-webkit-details-marker,
.guide-detail summary::-webkit-details-marker { display: none; }
.guide-story__detail summary::after,
.guide-detail summary::after { content: "+"; color: var(--accent-ink); font-size: 1rem; }
.guide-story__detail[open] summary::after,
.guide-detail[open] summary::after { content: "−"; }
.guide-story__detail > div { padding: 0.2rem 0 0.3rem; color: #b8c0ca; }
.guide-story__detail p { line-height: 1.6; }
.guide-story__detail a { display: inline-block; margin-top: 0.6rem; color: #ffca4a; text-underline-offset: 3px; }
.guide-evidence-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; }
.guide-evidence-list p { display: grid; gap: 0.3rem; margin: 0; padding: 0.8rem; background: rgba(255, 255, 255, 0.04); }
.guide-evidence-list b { color: #eef1f5; }
.guide-evidence-list span { font-size: 0.85rem; }
.guide-evidence-list a { grid-column: 1 / -1; }

.guide-hero { margin-bottom: var(--s-4); }
.guide-hero .h2 { max-width: 13ch; font-size: clamp(2.8rem, 5vw, 4.6rem); }
.guide-hero .lede { max-width: 62ch; }

.guide-jump {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 var(--s-5);
  padding: 1px;
  background: var(--line);
}
.guide-jump a {
  display: grid;
  gap: 0.45rem;
  min-height: 112px;
  padding: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
}
.guide-jump a:hover { background: var(--ground); }
.guide-jump b { font-family: var(--serif); font-size: 1.28rem; font-weight: 400; }
.guide-jump span { color: var(--muted); font-size: 0.84rem; line-height: 1.45; }

.guide-chapter-intro { max-width: 66ch; color: var(--muted); font-size: 1.08rem; line-height: 1.65; }
.guide-steps { list-style: none; display: grid; gap: 1px; margin: var(--s-4) 0; padding: 1px; counter-reset: guide-step; background: var(--line); }
.guide-steps li {
  counter-increment: guide-step;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.25rem 1rem;
  padding: 1.15rem;
  background: var(--surface);
}
.guide-steps li::before {
  content: counter(guide-step, decimal-leading-zero);
  grid-row: 1 / span 2;
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 0.68rem;
  padding-top: 0.2rem;
}
.guide-steps b { color: var(--ink); font-size: 0.98rem; }
.guide-steps span { color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.guide-result { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; margin: var(--s-3) 0; padding: 1rem 1.15rem; border-left: 3px solid var(--arc-green); background: var(--surface); }
.guide-result b { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.05em; text-transform: uppercase; }
.guide-result span { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

@media (max-width: 680px) {
  .tour-section { scroll-margin-top: 0; }
  .tour-anchor { scroll-margin-top: 260px; }
  .guide-jump { grid-template-columns: minmax(0, 1fr); }
  .guide-jump a { min-height: 94px; }
  .guide-result { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
}

/* ============================================================
   Complete task guide
   ============================================================ */

.guide-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.guide-rail {
  position: sticky;
  top: 5rem;
  display: grid;
  gap: 0.35rem;
  max-height: calc(100vh - 6.5rem);
  overflow-y: auto;
  padding: 0 1.2rem 1rem 0;
  border-right: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.69rem;
  line-height: 1.35;
}
.guide-rail__title {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.guide-rail a {
  padding: 0.42rem 0 0.42rem 0.65rem;
  color: var(--ink-2);
  text-decoration: none;
  border-left: 1px solid transparent;
}
.guide-rail a:hover { color: var(--accent-ink); border-left-color: var(--accent); }
.guide-mobile-nav { display: none; }

.guide-doc { min-width: 0; }
.guide-doc [id] { scroll-margin-top: 5.25rem; }
.guide-version {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.55rem 0.75rem;
  color: var(--muted);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.4;
}
.guide-jump--tasks { margin-top: var(--s-4); }

.task-section {
  min-width: 0;
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  scroll-margin-top: 5.25rem;
}
.task-section > .h2 { max-width: 20ch; margin-top: 0.8rem; font-size: clamp(2.35rem, 4.5vw, 4rem); }
.guide-detail { margin-top: var(--s-3); border: 1px solid var(--line); background: var(--ground); }
.guide-detail summary { padding: 1rem 1.15rem; color: var(--ink); }
.guide-detail__body { padding: 0 1.15rem 1.15rem; border-top: 1px solid var(--line); }
.guide-detail .code { white-space: pre-wrap; overflow-wrap: anywhere; }
.guide-detail__body > :first-child { margin-top: 1.15rem; }
.guide-detail__body > :last-child { margin-bottom: 0; }
.task-before,
.task-help {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem;
  margin: var(--s-3) 0;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border-left: 3px solid var(--arc-blue);
}
.task-help { border-left-color: var(--arc-amber); }
.task-before b,
.task-help b {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.task-before span,
.task-help span { color: var(--muted); font-size: 0.9rem; line-height: 1.55; }

.task-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: var(--s-4) 0;
  padding: 1px;
  background: var(--line);
}
.task-split article { min-width: 0; padding: clamp(1.25rem, 3vw, 2rem); background: var(--surface); }
.task-split h3 { margin: 0 0 1rem; font-family: var(--serif); font-size: 1.55rem; font-weight: 400; }
.task-split ol { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.task-split li { margin-top: 0.75rem; padding-left: 0.25rem; line-height: 1.55; }
.task-split li:first-child { margin-top: 0; }
.task-split p { color: var(--muted); }

.guide-trouble-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: var(--s-3) 0;
  padding: 1px;
  background: var(--line);
}
.guide-trouble-list article { min-width: 0; padding: 1rem 1.15rem; background: var(--surface); }
.guide-trouble-list h3 { margin: 0; color: var(--ink); font-size: 0.95rem; }
.guide-trouble-list p { margin: 0.45rem 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }

.guide-end {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
}
.guide-end a {
  padding: 0.7rem 0.9rem;
  color: var(--ink-2);
  text-decoration: none;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.69rem;
  text-transform: uppercase;
}
.guide-end a:hover { color: var(--accent-ink); border-color: var(--line-strong); }

@media (max-width: 940px) {
  .guide-overview__hero { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
  .guide-overview__hero h1 { max-width: 13ch; }
  .guide-shell { grid-template-columns: minmax(0, 1fr); }
  .guide-rail { display: none; }
  .guide-mobile-nav {
    position: sticky;
    z-index: 12;
    top: 3.75rem;
    display: block;
    margin: -1rem 0 var(--s-4);
    background: var(--ground);
    border-bottom: 1px solid var(--line);
  }
  .guide-mobile-nav summary {
    display: flex;
    justify-content: space-between;
    padding: 0.9rem 0;
    cursor: pointer;
    list-style: none;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .guide-mobile-nav summary::-webkit-details-marker { display: none; }
  .guide-mobile-nav summary::after { content: "+"; color: var(--accent-ink); }
  .guide-mobile-nav[open] summary::after { content: "−"; }
  .guide-mobile-nav nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    padding-bottom: 1rem;
  }
  .guide-mobile-nav a { padding: 0.7rem; color: var(--ink-2); background: var(--surface); text-decoration: none; font-size: 0.76rem; }
}

@media (max-width: 680px) {
  .guide-overview { padding-top: var(--s-4); }
  .guide-overview__hero h1 { font-size: clamp(2.8rem, 13vw, 3.8rem); }
  .guide-overview__hero .lede { font-size: 1rem; line-height: 1.55; }
  .guide-overview__hero .actions { width: 100%; }
  .guide-overview__hero .btn { width: 100%; text-align: center; }
  .guide-story-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-story--matching .shot__frame { aspect-ratio: 1 / 1; overflow: hidden; }
  .guide-story--matching .shot__frame img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: center; }
  .guide-story__copy h2 { font-size: clamp(2rem, 10vw, 2.8rem); }
  .guide-evidence-list { grid-template-columns: minmax(0, 1fr); }
  .guide-evidence-list a { grid-column: auto; }
  .guide-version { display: block; }
  .task-before,
  .task-help { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
  .task-split { grid-template-columns: minmax(0, 1fr); }
  .guide-trouble-list { grid-template-columns: minmax(0, 1fr); }
  .guide-mobile-nav nav { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- install page: five-step Preview path ---------- */
.install-hero {
  overflow: hidden;
  color: #f4f6f8;
  background:
    radial-gradient(circle at 85% 15%, rgba(30, 131, 247, 0.18), transparent 28rem),
    linear-gradient(145deg, #101318 0%, #171c24 100%);
}

.install-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: end;
}

.install-hero .crumb,
.install-hero .crumb a { color: #9da7b6; }
.install-hero .eyebrow { color: #ffca4a; }
.install-hero h1 {
  max-width: 14ch;
  margin: 1rem 0 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 6.4vw, 6rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.install-hero .lede {
  max-width: 60ch;
  margin: 1.6rem 0 0;
  color: #c8ced8;
  font-size: 1.08rem;
  line-height: 1.65;
}
.install-hero__reassurance { margin: 0.9rem 0 0; color: #eef1f5; }
.install-hero .actions { margin-top: 1.6rem; }
.install-hero .btn--ghost { color: #eef1f5; border-color: #596473; }

.install-hero__facts {
  display: grid;
  gap: 1px;
  padding: 1px;
  background: rgba(255, 255, 255, 0.16);
}
.install-hero__facts div { display: grid; gap: 0.45rem; padding: 1.15rem 1.25rem; background: rgba(15, 18, 23, 0.92); }
.install-hero__facts span { color: #9da7b6; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; }
.install-hero__facts strong { font-size: 0.96rem; font-weight: 600; }

.install-route { border-bottom: 1px solid var(--line); }
.install-route__steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; margin-top: var(--s-2); background: var(--line); border: 1px solid var(--line); }
.install-route__steps a { display: grid; gap: 0.6rem; min-width: 0; padding: 1rem; color: var(--ink); background: var(--surface); text-decoration: none; font-size: 0.86rem; line-height: 1.35; }
.install-route__steps a:hover { color: var(--accent-ink); background: var(--accent-wash); }
.install-route__steps span { color: var(--accent-ink); font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; }

.install-before { display: grid; grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.9fr); gap: clamp(3rem, 8vw, 8rem); align-items: center; }
.install-before .h2 { max-width: 14ch; }
.install-checklist { display: grid; gap: 0.75rem; margin: var(--s-3) 0; padding: 0; list-style: none; }
.install-checklist li { position: relative; padding-left: 1.6rem; color: var(--ink-2); line-height: 1.55; }
.install-checklist li::before { position: absolute; left: 0; content: "✓"; color: var(--ev-head); font-weight: 700; }

.install-shape { display: grid; gap: 1px; padding: 1px; background: var(--line); border: 1px solid var(--line); }
.install-shape__node { display: grid; gap: 0.45rem; padding: 1.4rem; background: var(--surface); }
.install-shape__node span,
.install-shape__link span { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.11em; text-transform: uppercase; color: var(--muted); }
.install-shape__node strong { font-family: var(--serif); font-size: 1.8rem; font-weight: 500; }
.install-shape__node small { color: var(--muted); font-size: 0.86rem; }
.install-shape__node--accent { background: var(--accent-wash); }
.install-shape__link { position: relative; padding: 0.85rem 1.4rem; background: var(--ground); }
.install-shape__link::after { float: right; content: "↓"; color: var(--accent-ink); }

.install-core { max-width: 920px; }
#steps { padding-top: var(--s-5); }
.install-core__head { margin-bottom: var(--s-5); }
.install-core__head .h2 { max-width: 14ch; }
.install-steps { gap: 1px; padding: 1px; background: var(--line); border: 1px solid var(--line); }
.install-steps .step { scroll-margin-top: 1.5rem; padding: clamp(1.4rem, 4vw, 2.8rem); background: var(--surface); }
.install-steps .step__n { font-size: 0.78rem; }
.install-steps .step h3 { font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.45rem); font-weight: 500; letter-spacing: -0.025em; }
.install-steps p,
.install-steps li { color: var(--ink-2); line-height: 1.65; }
.install-steps a { color: var(--accent-ink); }

.install-downloads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: var(--s-3) 0; padding: 1px; background: var(--line); }
.install-downloads a { padding: 0.9rem 1rem; color: var(--ink); background: var(--ground); font-size: 0.82rem; text-align: center; text-decoration: none; }
.install-downloads a:hover { color: var(--accent-ink); background: var(--accent-wash); }

.install-command-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
.install-command-pair > div > span { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.code[data-copy] { position: relative; padding-right: 5.2rem; }
.code-copy { position: absolute; top: 0.65rem; right: 0.65rem; z-index: 1; padding: 0.35rem 0.55rem; border: 1px solid var(--line-strong); border-radius: 3px; color: var(--muted); background: var(--surface); font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.code-copy:hover { color: var(--accent-ink); border-color: var(--accent); }

.install-permissions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: var(--s-3) 0; padding: 1px; background: var(--line); list-style: none; }
.install-permissions li { padding: 0.9rem 1rem; background: var(--ground); }

.install-done { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 15rem); gap: var(--s-4); align-items: center; margin-top: var(--s-5); padding: clamp(1.5rem, 4vw, 2.8rem); color: #f4f6f8; background: #151a21; }
.install-done__copy { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.install-done__mark { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border: 1px solid #4fbd72; border-radius: 50%; color: #7add95; font-size: 1.05rem; }
.install-done .eyebrow { color: #ffca4a; }
.install-done h2 { margin: 0.55rem 0 0; font-family: var(--serif); font-size: clamp(2rem, 3.5vw, 2.8rem); font-weight: 500; line-height: 1.05; letter-spacing: -0.025em; }
.install-done__text { max-width: 50ch; margin: 0.9rem 0 0; color: #b8c0ca; line-height: 1.6; }
.install-done .actions { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
.install-done .btn { width: 100%; text-align: center; }
.install-done .btn--ghost { color: #eef1f5; border-color: #596473; }

@media (max-width: 980px) {
  .install-hero__grid,
  .install-before { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
  .install-hero__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .install-route__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .install-done { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .install-done .actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .install-hero { padding-top: var(--s-4); }
  .install-hero h1 { max-width: none; font-size: clamp(2.75rem, 13vw, 3.6rem); }
  .install-hero .lede { margin-top: 1.1rem; font-size: 1rem; line-height: 1.5; }
  .install-hero .actions { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .install-hero .actions .btn { width: 100%; }
  .install-hero .actions .btn--ghost { display: inline-block; width: auto; padding: 0.35rem 0; border: 0; border-bottom: 1px solid #596473; }
  .install-hero__facts { grid-template-columns: minmax(0, 1fr); }
  .install-route__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .install-route__steps a:last-child { grid-column: 1 / -1; }
  .install-shape__node { padding: 1.1rem; }
  .install-core__head { margin-bottom: var(--s-4); }
  .install-steps .step { grid-template-columns: minmax(0, 1fr); padding: 1.2rem; }
  .install-downloads,
  .install-command-pair,
  .install-permissions { grid-template-columns: minmax(0, 1fr); }
  .code { max-width: 100%; font-size: 0.72rem; white-space: pre-wrap; overflow-wrap: anywhere; }
  .code[data-copy] { padding-right: 1rem; }
  .code-copy { position: static; display: block; width: max-content; margin: 0.75rem 0 0 auto; }
  .install-done { margin-top: var(--s-4); padding: 1.3rem; }
  .install-done__copy { grid-template-columns: minmax(0, 1fr); }
  .install-done .actions { grid-template-columns: minmax(0, 1fr); }
}
