/* The public site: the landing page and the docs. Built on the shared
   tokens (ui/tokens.css), so it is the same product as the hub: Public Sans
   and IBM Plex Mono, the spruce accent, the mist neutrals, light and dark
   (design/brand.md). No inline styles anywhere (the CSP forbids them). */

:root {
  --page: #ffffff;
  --stage: #f3f6f5;
  --frame-shadow: 0 1px 2px rgb(12 42 38 / 0.06), 0 20px 50px -30px rgb(12 42 38 / 0.32);
  --card-shadow: 0 18px 40px -26px rgb(12 42 38 / 0.32);
  --w: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --bar-h: 60px;
}
:root[data-theme="dark"], .where {
  --page: #08110f;
  --stage: #0b1513;
  --frame-shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 28px 70px -34px rgb(0 0 0 / 0.9), inset 0 1px 0 rgb(255 255 255 / 0.05);
  --card-shadow: 0 18px 40px -24px rgb(0 0 0 / 0.7);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #08110f;
    --stage: #0b1513;
    --frame-shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 28px 70px -34px rgb(0 0 0 / 0.9), inset 0 1px 0 rgb(255 255 255 / 0.05);
    --card-shadow: 0 18px 40px -24px rgb(0 0 0 / 0.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 16px); scrollbar-color: var(--border-strong) transparent; }
body.site {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 16.5px/1.65 var(--font);
  font-feature-settings: var(--font-features);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--accent);
}
::selection { background: var(--accent-bg); color: var(--text); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
code, kbd, pre { font-family: var(--mono); font-feature-settings: normal; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--text-3); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 20; background: var(--text); color: var(--page); padding: 8px 12px; border-radius: 6px; text-decoration: none; }
.skip:focus { top: 12px; }
.i { flex: none; }

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

/* ---- Buttons and links ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 600 14px/1 var(--font); text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }
.btn .gh { width: 16px; height: 16px; flex: none; }
.link { color: var(--accent-text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-text) 35%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-color: currentColor; }
.link .i { display: inline-block; vertical-align: -3px; margin-left: 2px; transition: transform var(--dur) var(--ease-out); }
.link:hover .i { transform: translateX(3px); }
.fine { font-size: 13px; line-height: 1.55; color: var(--text-3); }
.fine code, .sec-lede code, .step-text code, .agents code, .gate-text code, .close code, .ticks code { font-size: 0.86em; padding: 1px 5px; border-radius: 4px; background: var(--surface-2); color: var(--text); }

/* ---- Top bar ---- */
.bar { position: sticky; top: 0; z-index: 10; background: var(--page); border-bottom: 1px solid var(--border); }
.bar-in { max-width: var(--w); margin: 0 auto; padding: 0 var(--gutter); height: var(--bar-h); display: flex; align-items: center; gap: 24px; }
.docs .bar-in { max-width: 1440px; }
.bar-brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; font-size: 16px; letter-spacing: -0.005em; color: var(--text); }
.bar-brand .logo { width: 20px; height: 20px; }
.bar-nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.bar-anchors { display: contents; }
.bar-link { padding: 6px 10px; border-radius: 6px; font-size: 14px; color: var(--text-2); text-decoration: none; }
.bar-link:hover, .bar-link[aria-current="page"] { color: var(--text); background: var(--surface-2); }
@media (max-width: 760px) {
  .bar-anchors { display: none; }
  .bar-in { gap: 12px; }
}

/* ---- Hero ---- */
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(56px, 8vw, 96px); border-bottom: 1px solid var(--border); }
.hero-text { max-width: var(--w); margin: 0 auto; padding: 0 var(--gutter); }
.hero h1 {
  margin: 0; max-width: 22ch; text-wrap: balance;
  font-size: clamp(2.4rem, 1.3rem + 4vw, 4.4rem); line-height: 1.04; font-weight: 640; letter-spacing: -0.032em;
}
.hero-sub { margin: 24px 0 0; max-width: 62ch; font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem); line-height: 1.55; color: var(--text-2); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---- Section rhythm ---- */
section { scroll-margin-top: var(--bar-h); }
.sec-title { margin: 0; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.6rem); line-height: 1.1; font-weight: 640; letter-spacing: -0.026em; max-width: 24ch; }
.sec-lede { margin: 16px 0 0; max-width: 62ch; font-size: 17px; color: var(--text-2); }

/* Pricing. */
.pricing { padding: clamp(72px, 10vw, 120px) 0; background: var(--stage); border-top: 1px solid var(--border); }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.plan { background: var(--page); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.plan-mark { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.plan h3, .plan h2 { margin: 0; font-size: 16px; font-weight: 620; letter-spacing: 0; }
.plan { display: flex; flex-direction: column; }
.plan-cta { margin-top: 18px; justify-content: center; }
.plan-price { margin: 14px 0 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plan-price .num { font-size: 32px; line-height: 1; font-weight: 650; letter-spacing: -0.025em; }
.plan-per { font-size: 13px; color: var(--text-3); }
.plan-lede { margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-2); min-height: 3em; }
.plan ul { list-style: none; margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--border); display: grid; gap: 9px; font-size: 14px; }
.plan li { display: flex; gap: 8px; }
.plan li .i { margin-top: 3px; color: var(--accent-text); }
.pricing .fine { margin-top: 20px; }
.pricing-page { border-top: 0; padding-top: clamp(56px, 8vw, 96px); }
.pricing-page .sec-title { font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.6rem); }
.faq { padding: clamp(64px, 9vw, 112px) 0; }
.faq-in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 5vw, 72px); }
.faq-list { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 32px 20px 0; font-weight: 560; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; color: var(--text-3); font-weight: 400; font-size: 20px; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 20px; color: var(--text-2); max-width: 64ch; }
.how { border-top: 0; }

/* Closing. */
.close { padding: clamp(80px, 11vw, 140px) 0; }
.close h2 { margin: 0; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); line-height: 1.05; font-weight: 640; letter-spacing: -0.026em; max-width: 18ch; }
.close p { margin: 18px 0 0; color: var(--text-2); font-size: 17px; max-width: 56ch; }

/* ---- Footer ---- */
.foot { border-top: 1px solid var(--border); background: var(--page); }
.foot-in { max-width: var(--w); margin: 0 auto; padding: 48px var(--gutter) 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; }
.docs .foot-in { max-width: 1440px; }
.foot-brand p { margin: 10px 0 16px; color: var(--text-3); font-size: 14px; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.foot-cols h2 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--text); }
.foot-cols a { display: block; padding: 4px 0; font-size: 14px; color: var(--text-2); text-decoration: none; }
.foot-cols a:hover { color: var(--text); }
.theme-seg { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; }
.theme-seg button { display: inline-grid; place-items: center; width: 30px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--text-3); cursor: pointer; }
.theme-seg button:hover { color: var(--text); }
.theme-seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }

/* ================= Docs ================= */
.docs-layout { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 264px minmax(0, 1fr) 224px; gap: 0 48px; padding: 0 var(--gutter); }
.docs-side { position: sticky; top: var(--bar-h); align-self: start; max-height: calc(100vh - var(--bar-h)); overflow-y: auto; padding: 28px 8px 40px 0; scrollbar-width: thin; }
.docs-menu { display: none; }
.docs-filter input {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--surface); color: var(--text); font: 14px var(--font);
}
.docs-filter input::placeholder { color: var(--text-3); }
.docs-filter { margin-bottom: 20px; }
.docs-group + .docs-group { margin-top: 22px; }
.docs-group h2 { margin: 0 0 6px; padding: 0 10px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.docs-group ul { list-style: none; margin: 0; padding: 0; }
.docs-group a { display: block; padding: 5px 10px; border-radius: 6px; font-size: 14px; color: var(--text-2); text-decoration: none; }
.docs-group a:hover { color: var(--text); background: var(--surface-2); }
.docs-group a[aria-current="page"] { color: var(--accent-text); background: var(--accent-bg); font-weight: 550; }
.docs-none { padding: 0 10px; font-size: 14px; color: var(--text-3); }
[hidden] { display: none !important; }

.docs-main { min-width: 0; padding: 40px 0 80px; }
.prose { max-width: 72ch; font-size: 16px; line-height: 1.7; }
.docs-crumb { margin: 0 0 12px; display: flex; gap: 8px; font-size: 13px; color: var(--text-3); }
.docs-crumb a { color: var(--text-3); text-decoration: none; }
.docs-crumb a:hover { color: var(--text); }
.prose h1 { margin: 0; font-size: clamp(1.9rem, 1.5rem + 1.3vw, 2.5rem); line-height: 1.12; font-weight: 650; letter-spacing: -0.028em; }
.docs-lede { margin: 12px 0 0; font-size: 18px; line-height: 1.55; color: var(--text-2); }
.prose h2 { position: relative; margin: 48px 0 0; font-size: 22px; line-height: 1.3; font-weight: 640; letter-spacing: -0.018em; }
.prose h3 { position: relative; margin: 32px 0 0; font-size: 17px; font-weight: 620; }
.prose .anchor { position: absolute; left: -1.1em; width: 1em; color: var(--text-3); text-decoration: none; opacity: 0; transition: opacity var(--dur-fast); }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose p { margin: 14px 0 0; }
.prose ul, .prose ol { margin: 14px 0 0; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--text-3); }
.prose strong { font-weight: 620; }
.prose :not(pre) > code { font-size: 0.86em; padding: 2px 5px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); overflow-wrap: anywhere; }
.prose hr { margin: 40px 0; border: 0; border-top: 1px solid var(--border); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
.prose .table-scroll { margin-top: 18px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--border); }
.prose th { font-size: 13px; font-weight: 600; color: var(--text-3); }
.prose td:first-child { white-space: nowrap; }
.callout { margin: 20px 0 0; padding: 14px 18px; border-radius: 10px; background: var(--accent-bg); color: var(--text); }
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }

.code { margin: 18px 0 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 38px; padding: 0 8px 0 14px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-3); }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.65; }
.code .c { color: var(--code-com); }
.code-out pre { color: var(--text-2); }
.copy { height: 26px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text-2); font: 500 12px var(--font); cursor: pointer; }
.copy:hover { color: var(--text); }
.copy[data-done] { color: var(--ok-text); border-color: var(--ok-text); }

.cli { margin: 16px 0 0; }
.cli-row { padding: 14px 0; border-bottom: 1px solid var(--border); }
.cli-row dt code { font-size: 13.5px; font-weight: 550; white-space: pre-wrap; overflow-wrap: anywhere; }
.cli-row dd { margin: 4px 0 0; color: var(--text-2); font-size: 15px; }
.cli-note dd { margin: 0; font-size: 14px; color: var(--text-3); }

.help-cta { margin: 24px 0 8px; padding: 20px; border-radius: 12px; background: var(--stage); border: 1px solid var(--border); }
.help-cta .fine { margin: 10px 0 0; }

.pager { max-width: 72ch; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; }
.pager a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; transition: border-color var(--dur-fast) var(--ease-out); }
.pager a:hover { border-color: var(--accent); }
.pager span { font-size: 12px; color: var(--text-3); }
.pager b { font-weight: 600; color: var(--text); }
.pager-next { text-align: right; grid-column: 2; }

.docs-toc { position: sticky; top: var(--bar-h); align-self: start; padding: 44px 0 40px; }
.docs-toc h2 { margin: 0 0 10px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.docs-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.docs-toc a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 1px solid transparent; font-size: 13px; color: var(--text-2); text-decoration: none; }
.docs-toc a:hover { color: var(--text); }
.docs-toc a[aria-current="true"] { color: var(--accent-text); border-left-color: var(--accent); }

@media (max-width: 1180px) {
  .docs-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 820px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); }
  .docs-side { position: sticky; top: var(--bar-h); z-index: 5; max-height: none; overflow: visible; padding: 0; margin: 0 calc(-1 * var(--gutter)); background: var(--page); border-bottom: 1px solid var(--border); }
  .docs-side-wide { display: none; }
  .docs-menu { display: block; }
  .docs-menu summary { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 var(--gutter); list-style: none; cursor: pointer; font-size: 14px; color: var(--text-3); }
  .docs-menu summary::-webkit-details-marker { display: none; }
  .docs-menu-cur { color: var(--text); font-weight: 550; }
  .docs-menu-cur::before { content: "/"; margin-right: 8px; color: var(--text-3); font-weight: 400; }
  .docs-menu[open] .docs-nav { max-height: calc(100vh - var(--bar-h) - 48px); overflow-y: auto; padding: 8px var(--gutter) 20px; border-top: 1px solid var(--border); }
  .docs-main { padding-top: 28px; }
  .prose .anchor { display: none; }
}
@media (max-width: 520px) {
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager-next { grid-column: 1; }
  .prose td:first-child { white-space: normal; }
}

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

/* Works with: the agents Grapim records, as plain names */
.works { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: 28px 0 0; font-size: 14px; font-weight: 560; color: var(--text-2); letter-spacing: -0.005em; }
.works .works-label { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---- Motion: the hero rises in once and performs one review; the
   summary's last line is marked once; the three points rise in. Only on
   screen, only without reduced motion, and only once site.js has set
   html.motion (and .armed on the hero), so no-JS, print and reduced motion
   all get the finished page. ---- */
@media (prefers-reduced-motion: no-preference) {
  .hero-text > * { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-text > :nth-child(2) { animation-delay: 0.08s; }
  .hero-text > :nth-child(3) { animation-delay: 0.16s; }
  .hero-text > :nth-child(4) { animation-delay: 0.24s; }
  .hero-vis { animation: rise 0.9s 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media screen and (prefers-reduced-motion: no-preference) {
  /* The hero performs one review, about 5.5 s:
     0.8-1.6 s  the three diff lines appear in order
     1.5 s      the check row: "In progress", spinning
     4.0 s      the comment opens under line 2, the check turns to failing
     4.1-5.4 s  author, Blocker title, body, then "Written by Claude Code run" */
  .hero-vis.armed:not(.in) :is(.gh-row, .gh-t, .ck-x, .ck-fail, .ck-text > b) { opacity: 0; }
  .hero-vis.armed:not(.in) .gh-reveal { grid-template-rows: 0fr; }
  .hero-vis.in .gh-row { animation: fade 0.45s var(--ease-out) both; }
  .hero-vis.in .r1 { animation-delay: 0.8s; }
  .hero-vis.in .r2 { animation-delay: 1.05s; }
  .hero-vis.in .r3 { animation-delay: 1.3s; }
  .hero-vis.in .ck-text > b { animation: fade 0.35s 1.5s ease both; }
  .hero-vis.in :is(.ck-spin, .ck-run) { animation: hold 2.6s 1.5s linear both; }
  .hero-vis.in .ck-spin::before { animation: spin 0.8s 1.5s linear 4; }
  .hero-vis.in .gh-reveal { animation: open 0.5s 4s var(--ease-out) both; }
  .hero-vis.in .ck-x { animation: land 0.4s 4s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
  .hero-vis.in .ck-fail { animation: fade 0.3s 4.05s ease both; }
  .hero-vis.in .gh-t { animation: lift 0.45s var(--ease-out) both; }
  .hero-vis.in .t1 { animation-delay: 4.1s; }
  .hero-vis.in .t2 { animation-delay: 4.3s; }
  .hero-vis.in .t3 { animation-delay: 4.6s; }
  .hero-vis.in .t4 { animation-delay: 4.95s; }

  /* #where: one sweep of the mark across "Grapim received nothing." */
  .motion .where-fig:not(.in) .gh-last { background-size: 0% 100%; }
  .motion .where-fig.in .gh-last { animation: sweep 1.1s 0.4s var(--ease-out) both; }

  /* The three points rise in, a step apart. */
  .motion .points > [data-play]:not(.in) { opacity: 0; }
  .motion .points > .in { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .motion .points > .in:nth-child(2) { animation-delay: 0.1s; }
  .motion .points > .in:nth-child(3) { animation-delay: 0.2s; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lift { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes hold { 0% { opacity: 0; } 8%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes open { from { grid-template-rows: 0fr; } to { grid-template-rows: 1fr; } }
@keyframes land { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: none; } }
@keyframes sweep { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }

/* ---- The one-minute film ---- */
.film { padding: clamp(56px, 8vw, 96px) 0 0; background: var(--stage); }
.film-in { max-width: 1040px; }
.film-title { margin: 0 0 20px; font-size: 15px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
.film-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 14px; background: var(--band); border: 1px solid var(--border); box-shadow: var(--frame-shadow); }
.film .vis-note { margin-top: 12px; color: var(--text-3); font-size: 13px; }

/* ---- Changelog ---- */
.log { padding: clamp(56px, 8vw, 96px) 0 clamp(72px, 10vw, 120px); }
.log .sec-title { font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.6rem); }
.log-day { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; margin-top: clamp(48px, 7vw, 80px); padding-top: 32px; border-top: 1px solid var(--border); }
.log-date { margin: 0; font-size: 14px; font-weight: 500; color: var(--text-3); position: sticky; top: calc(var(--bar-h, 60px) + 24px); align-self: start; letter-spacing: 0; }
.log-items { display: grid; gap: 36px; max-width: 680px; }
.log-item h3 { margin: 0; font-size: 21px; font-weight: 640; letter-spacing: -0.015em; }
.log-item p { margin: 10px 0 0; color: var(--text-2); }
.log-more h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.log-more ul { margin: 12px 0 0; padding-left: 18px; color: var(--text-2); display: grid; gap: 6px; }
@media (max-width: 760px) { .log-day { grid-template-columns: minmax(0, 1fr); gap: 16px; } .log-date { position: static; } }

/* Phone menu: the links fold into a menu under 760px. */
.bar-menu { display: none; position: relative; margin-left: auto; }
.bar-menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; color: var(--text); }
.bar-menu summary::-webkit-details-marker { display: none; }
.bar-menu summary:hover { background: var(--surface-2); }
.bar-menu-list { position: absolute; right: 0; top: 46px; z-index: 20; min-width: 200px; display: grid; padding: 6px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow-pop); }
.bar-menu-list .bar-link { padding: 10px 12px; font-size: 15px; }
@media (max-width: 760px) { .bar-nav { display: none; } .bar-menu { display: block; } }
.foot-legal { margin: 10px 0 0; font-size: 13px; color: var(--text-3); }

/* ---- Product fragments (design/illustration.md, B) ---- */
.frag { margin: 0 0 22px; }
.frag-stage { background: var(--stage); border: 1px solid transparent; border-radius: 18px; padding: 22px; display: grid; place-items: center; min-height: 208px; }
.frag-card { width: 100%; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; padding: 14px 16px; box-shadow: var(--card-shadow); font: 400 13px/1.5 var(--font); color: var(--text); }
.frag-cap { margin-top: 10px; font-size: 14px; color: var(--text-3); }
.foot-social { margin: 10px 0 0; display: flex; gap: 14px; font-size: 14px; }
.foot-social a { color: var(--text-2); text-decoration: none; }
.foot-social a:hover { color: var(--text); text-decoration: underline; }

/* Brand marks (Simple Icons, CC0): one colour, the text's own, so the row stays calm. */
.brand-mark { width: 18px; height: 18px; flex: none; }
.works > span:not(.works-label) { display: inline-flex; align-items: center; gap: 7px; }
.works .brand-mark { color: var(--text-2); }

/* OpenAI's blossom: its own file's clear space (so a larger box), black on light,
   white on dark, never another colour (OpenAI Logo Usage Terms). */
.brand-mark.brand-openai { width: 30px; height: 30px; margin: -6px -5px; color: #000; fill: #000; }
:root[data-theme="dark"] .brand-mark.brand-openai { fill: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-mark.brand-openai { fill: #fff; } }
.works { gap: 8px 16px; }
.works .brand-mark.brand-openai { margin: -6px -6px -6px -7px; }

/* ================= Landing: Grapim Review =================
   Every picture is the product (design/illustration.md, B): GitHub's own
   surfaces with the Action's own words, rebuilt in HTML. */
/* Hero: the inline review comment on its stage. */
.hero-vis { margin: clamp(48px, 7vw, 72px) 0 0; }
.hero-stage { background: var(--stage); border-radius: 24px; padding: clamp(14px, 4vw, 48px); margin: 0 calc(-1 * clamp(0px, 2vw, 24px)); }
.hero-vis figcaption { margin-top: 12px; font-size: 14px; color: var(--text-3); }
.gh-card { max-width: 860px; margin: 0 auto; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: 14px; font: 400 14px/1.55 var(--font); box-shadow: var(--frame-shadow); }
.gh-pr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.gh-pr b { font-size: 15px; font-weight: 600; }
.gh-pr .muted { font-size: 13px; }
.gh-open { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; background: var(--accent-bg); color: var(--accent-text); font-size: 12px; font-weight: 600; }
.gh-file { margin: 16px 18px 18px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.gh-file-head { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.gh-file-head .mono { min-width: 0; overflow-wrap: anywhere; }
.gh-add { font: 600 12px/1.6 var(--mono); color: var(--ok-text); }
.gh-diff { width: 100%; border-collapse: collapse; font: 12.5px/1.75 var(--mono); }
.gh-diff td { padding: 0; vertical-align: top; background: var(--add-bg); }
/* The flagged line: the one place coral appears, because it is the Blocker. */
.gh-on td { background: color-mix(in srgb, var(--coral) 8%, var(--surface)); }
.gh-on .gh-ln { background: color-mix(in srgb, var(--coral) 12%, var(--surface)); color: var(--danger); }
.gh-diff .gh-ln { width: 1%; min-width: 40px; padding: 0 10px; text-align: right; color: var(--text-2); background: color-mix(in srgb, var(--add-strong) 60%, var(--surface)); }
.gh-diff .gh-code { padding-right: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.gh-sign { display: inline-block; width: 22px; text-align: center; color: var(--ok-text); user-select: none; }
.gh-on td { font-weight: 600; }
.gh-thread { padding: 14px 16px 16px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.gh-who { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.gh-who b { font-weight: 600; }
.gh-av { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.gh-av .brand-mark { width: 13px; height: 13px; }
.gh-bot { padding: 0 6px; border: 1px solid var(--border-strong); border-radius: 10px; font-size: 11px; line-height: 16px; color: var(--text-3); }
.gh-body { margin-top: 8px; padding-left: 30px; }
.gh-body p { margin: 0 0 8px; }
.gh-body > :last-child { margin-bottom: 0; }
.gh-body b { font-weight: 600; }
.gh-t.t2 b { color: var(--danger); }
.gh-body i { color: var(--text-2); }
.gh-body ul { margin: 0 0 8px; padding-left: 18px; }
.gh-body code { font-size: 0.88em; padding: 1px 5px; border-radius: 4px; background: var(--surface-2); }

/* Where your code goes: the workflow file beside the summary's last lines. */
.where { padding: clamp(72px, 10vw, 120px) 0; background: var(--stage); border-bottom: 1px solid var(--border); }
.where-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 32px); margin-top: clamp(36px, 5vw, 56px); align-items: center; }
.where-fig { margin: 0; min-width: 0; }
.where-fig figcaption { margin-top: 12px; font-size: 14px; color: var(--text-3); }
.where-links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 32px 0 0; }
.cpanel { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; box-shadow: var(--card-shadow); }
.cpanel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding: 9px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); font-size: 12.5px; color: var(--text-2); }
.cpanel-head .link { font-size: 13px; white-space: nowrap; }
.cpanel pre { margin: 0; padding: 12px 0; overflow-x: auto; font-size: 12.5px; line-height: 1.7; }
.cl { display: block; min-height: 1.7em; padding: 0 16px; white-space: pre; }
.cl-on { background: var(--accent-bg); box-shadow: inset 2px 0 0 var(--accent); }
.cl-gap { color: var(--text-3); }
.ck { color: var(--code-fn); }
.gh-crop { padding: 20px 22px; -webkit-mask-image: linear-gradient(to bottom, transparent 4px, #000 34px); mask-image: linear-gradient(to bottom, transparent 4px, #000 34px); }
.gh-crop .gh-body { margin: 0; padding: 0; }
.gh-crop .gh-body p, .gh-crop .gh-body ul { margin-bottom: 12px; }
/* The signature: the clearance line. The summary's last line ("Grapim
   received nothing.") set as a spruce seal, with a check drawn in CSS (the
   CSP allows no data: images): a disc, and an L turned 45 degrees. The
   sweep animation grows the spruce fill from the left. */
.gh-crop .gh-body .gh-last {
  position: relative; margin: 0 -12px; padding: 12px 14px 12px 42px; border-radius: 10px; font-weight: 550;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 0 / 100% 100%; background-color: var(--accent-bg); color: var(--on-accent);
}
.gh-crop .gh-body .gh-last::before { content: ""; position: absolute; left: 14px; top: 13px; width: 18px; height: 18px; border-radius: 50%; background: var(--on-accent); }
.gh-crop .gh-body .gh-last::after { content: ""; position: absolute; left: 20px; top: 16px; width: 5px; height: 9px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* The hero's comment opens inside the card (grid rows 0fr to 1fr). */
.gh-reveal { display: grid; grid-template-rows: 1fr; }
.gh-reveal > .gh-thread { min-height: 0; overflow: hidden; }
/* The PR's check row, as GitHub lists it under the conversation. */
.gh-checks { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 13px; }
.ck-ico { display: grid; flex: none; width: 20px; height: 20px; }
.ck-ico > * { grid-area: 1 / 1; }
.ck-x { display: grid; place-items: center; border-radius: 50%; background: var(--coral); color: #fff; }
.ck-x .i { width: 13px; height: 13px; }
.ck-spin { opacity: 0; display: grid; place-items: center; }
.ck-spin::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--warn-text) 28%, transparent); border-top-color: var(--warn-text); }
.ck-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; min-width: 0; }
.ck-text b { font-weight: 600; overflow-wrap: anywhere; }
.ck-state { display: inline-grid; color: var(--text-3); font-size: 12.5px; }
.ck-state > * { grid-area: 1 / 1; }
.ck-run { opacity: 0; }
.hero-vis figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.replay { height: 28px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text-2); font: 500 13px var(--font); cursor: pointer; transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.replay:hover { color: var(--text); border-color: var(--text-3); }

/* Three points, each with a small fragment. */
.how { padding: clamp(72px, 10vw, 120px) 0 clamp(56px, 8vw, 96px); }
.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.points h3 { margin: 0; font-size: 21px; line-height: 1.25; font-weight: 640; letter-spacing: -0.012em; }
.points p { margin: 10px 0 0; color: var(--text-2); max-width: 52ch; }
.frag-stage { min-height: 256px; display: flex; align-items: center; }
.frag-card { min-width: 0; overflow: hidden; }
.frag-card .gh-body { margin: 0; padding: 0; font-size: 13px; }
/* The depth fragment: the default sensitive paths and what each line gets. */
.fc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fd-paths { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.fd-paths code { font: 12px/1.6 var(--mono); padding: 1px 7px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); }
.fd-depth { margin: 12px 0 0; padding-top: 4px; border-top: 1px solid var(--border); }
.fd-depth > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0 0; }
.fd-depth dt { color: var(--text-2); }
.fd-depth dd { margin: 0; flex: none; color: var(--text-3); }
.fd-depth .fd-hi { color: var(--accent-text); font-weight: 600; }
.fc-head b { font-weight: 600; font-size: 14px; }
.fc-muted { display: block; margin: 2px 0 0; color: var(--text-3); font-size: 12px; }
.fc-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.fc-check b { display: block; font-weight: 600; font-size: 13px; overflow-wrap: anywhere; }
.fc-x { display: grid; place-items: center; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: var(--coral); color: #fff; }
.fc-x .i { width: 13px; height: 13px; }
.also-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: clamp(56px, 7vw, 80px) 0 0; padding-top: 24px; border-top: 1px solid var(--border); font-size: 15px; color: var(--text-2); }
.also-label { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.also-line a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.also-line a:hover { text-decoration-color: currentColor; }

/* ---- Responsive (landing and pricing) ---- */
@media (max-width: 960px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .where-grid { grid-template-columns: minmax(0, 1fr); }
  .points { grid-template-columns: minmax(0, 1fr); max-width: 600px; }
}
@media (max-width: 640px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
  .faq-in { grid-template-columns: minmax(0, 1fr); }
  .plan-lede { min-height: 0; }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
  .cta .btn { flex: 1 1 auto; }
  .gh-pr { padding: 12px 14px; }
  .gh-file { margin: 12px; }
  .gh-thread { padding: 12px; }
  .gh-body { padding-left: 0; }
  .gh-diff .gh-ln { min-width: 0; padding: 0 6px; }
  .gh-sign { width: 16px; }
  .frag-stage { min-height: 0; padding: 16px; }
}

/* ===== Grounds =====
   The page is white (near-black in dark). The hero PR sits on a soft mist
   stage. #where is the one deep spruce band, in both themes: tokens.css
   scopes the dark palette to .where, so everything inside reads as dark. */
.hero { border-bottom: 0; overflow-x: clip; }
.where { background: var(--band); color: var(--text); border: 0; }
.where :is(.gh-card, .cpanel) { background: var(--band-raise); border-color: var(--border-strong); }
.where :is(.gh-file-head, .cpanel-head) { background: var(--band-head); }

/* Plex Mono is wide: the file name keeps to one line on a phone. */
@media (max-width: 640px) { .gh-file-head .mono { font-size: 11px; letter-spacing: -0.02em; } }
