/* site-v5 · the four landing pages (/agent-approvals, /agent-spend-limits, /mcp-security, /verifiable-audit-log).
   Built from site-v3's own parts: site.css (the inner-page hero, chapters, tables, code, links), and the page
   compositions in architecture.css (the tool-call path), security.css (decisions, end-matter rows, the halves
   columns) and quickstart.css (the stepped rail). The rules below are the home's cap ledger and hash chain
   (home.css), copied as they are so the home stylesheet isn't loaded here, plus the text-only hero. */

/* the hero: the copy only, no plate (each page's plate sits in the chapter it illustrates) */
.phero.lp-hero { display: block; min-height: 0; padding-bottom: 14vh; }
.lp-hero .phero__text { max-width: 760px; }
.lp-hero .h1p { max-width: 12em; }
.lp-hero .lede { max-width: 560px; }
.lp-hero .lede + .lede { margin-top: var(--s3); }
.lp-hero .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-top: var(--s6); }   /* home.css .cta */

/* chapters: the body column carries paragraphs and links */
.lp .chap__body > .body:first-child { margin-top: 0; }
.lp .chap__body .body { max-width: 560px; }
.lp-h3 { margin-top: var(--s6); }
.lp-h3 + .body { margin-top: var(--s3); }
.plate--ink .lp-h3 { color: var(--paper); }
/* /mcp-security: the Agentfile excerpt above the sticky path */
.tc__plate .lp-code { margin: 0 0 var(--s5); }
@media (max-width: 759px) { .tc__plate { display: block !important; } .tc__plate .path { display: none; } }

/* a stepped rail with no sticky drawing beside it: every step is in force (architecture.css's phone rule) */
.tc--plain li { padding-bottom: var(--s5); opacity: 1; }

/* the FAQ: security.css's end-matter rows, the question on the left */
.lp-faq .endm__row .h3 { max-width: 14em; }
.lp-faq .endm__row .body:first-child { margin-top: 0; }

/* the halves: text on paper, the plate on ink (security.css .tm__cols) */
.lp-halves .tm__col--edge { display: flex; flex-direction: column; justify-content: center; }
.lp-halves .code { margin-top: var(--s5); }

/* the cap ledger (home.css §04), in a column instead of past the scene's line */
.lp-cap.cap__panel { position: relative; left: auto; right: auto; top: auto; bottom: auto; height: 600px; }
.cap__meter, .cap__svg { position: absolute; left: 0; top: 0; }
.cap__svg { overflow: visible; }
.cap__cap { stroke: var(--paper); stroke-width: 1; shape-rendering: crispEdges; }
.cap__axis, .cap__tick, .cap__base { stroke: rgba(236, 232, 224, .5); stroke-width: 1; shape-rendering: crispEdges; }
.cap__lead { stroke: rgba(236, 232, 224, .7); stroke-width: 1; shape-rendering: crispEdges; opacity: 0; transition: opacity .3s; }
.cap__l { position: absolute; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; line-height: 14px; color: rgba(236, 232, 224, .62); white-space: nowrap; }
.cap__l--cap { color: var(--paper); }
.cap__l--ax { transform: translateX(-100%); letter-spacing: .04em; }
.cap__l--axcap { color: var(--paper); }
.cap__l--last, .cap__l--ref { opacity: 0; transition: opacity .3s; }
.cap__l--ref { color: var(--sig-night); }
.cap__panel.is-last .cap__l--last, .cap__panel.is-last .cap__lead--last { opacity: 1; }
.cap__panel.is-ref .cap__l--ref, .cap__panel.is-ref .cap__lead--ref { opacity: 1; }

/* the hash chain (home.css §05), on an ink chapter */
.chain { position: relative; }
.chain__cap { display: flex; flex-wrap: wrap; gap: 4px 0; margin-bottom: var(--s5); font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(236, 232, 224, .62); }
.chain__cap span + span::before { content: '·'; margin: 0 12px; color: rgba(236, 232, 224, .62); }
.chain__rows { display: grid; gap: 22px; }
.chain__row { position: relative; display: grid; grid-template-columns: 30px 70px minmax(0, 150px) minmax(0, 1fr) auto auto; column-gap: 14px; align-items: center; font-family: var(--mono); font-size: 12.5px; line-height: 18px; color: rgba(236, 232, 224, .78); }
.chain__n { font-family: var(--pixel); font-weight: 800; font-size: 13px; color: rgba(236, 232, 224, .62); padding: 0 3px; justify-self: start; }
.chain__ts { color: rgba(236, 232, 224, .62); }
.chain__ev { color: var(--paper); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chain__det input { width: 100%; height: 28px; padding: 0; border: 0; border-bottom: 1px solid rgba(236, 232, 224, .16); border-radius: 0; background: transparent; font-family: var(--mono); font-size: 12.5px; color: rgba(236, 232, 224, .78); outline: none; transition: border-color .2s; }
.chain__det input:hover { border-bottom-color: rgba(236, 232, 224, .62); }
.chain__det input:focus-visible, .chain__det input:focus { border-bottom-color: var(--paper); color: var(--paper); }
.chain__a { margin-left: 6px; }
.chain__b { margin-left: 18px; }
.chain__row.is-changed .chain__n { background: var(--paper); color: var(--ink); }
.chain__svg { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.chain__link { stroke: rgba(236, 232, 224, .55); stroke-width: 1; }
.chain__node { fill: rgba(236, 232, 224, .8); }
.chain__node.is-broken { fill: var(--ink); stroke: var(--paper); stroke-width: 1; }
.chain__link.is-broken { stroke: var(--paper); }
.chain__x { fill: none; stroke: var(--paper); stroke-width: 1; }
.chain__state { min-height: 18px; margin-top: var(--s4); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--paper); }
.chain__restore { margin-top: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--paper); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(236, 232, 224, .62); }
.chain__restore:hover { text-decoration-color: var(--paper); }
.chain__restore[hidden] { display: none; }

@media (max-width: 1180px) and (min-width: 760px) {
  .lp-halves .tm__cols { grid-template-columns: minmax(0, 1fr); }
  .lp-halves .tm__col--stop { padding: 0 0 var(--s6); }
  .lp-halves .tm__col--edge { padding: 0; }
  .lp-halves.plate--halves { background: var(--paper); }
  .lp-cap.cap__panel { background: var(--ink); }
}
@media (max-width: 759px) {
  .phero.lp-hero { padding-bottom: 10vh; }
  .lp-hero .cta { margin-top: var(--s5); }
  .lp-cap.cap__panel { height: max(520px, calc(var(--vh) * 0.7)); background: var(--ink); }   /* home.css, phones */
  .chain { margin-top: var(--s6); }
  .chain__cap { display: grid; gap: 2px; font-size: 9.5px; letter-spacing: .12em; }
  .chain__cap span + span::before { content: none; }
  .chain__rows { gap: 16px; }
  .chain__row { grid-template-columns: 24px minmax(0, 1fr) auto auto; grid-template-rows: auto auto; column-gap: 10px; font-size: 11.5px; line-height: 16px; }
  .chain__n { grid-row: 1 / span 2; align-self: start; font-size: 12px; }
  .chain__ts { display: none; }
  .chain__ev { grid-column: 2; grid-row: 1; }
  .chain__det { grid-column: 2; grid-row: 2; }
  .chain__det input { height: 24px; font-size: 11.5px; }
  .chain__a { grid-column: 3; grid-row: 1 / span 2; margin-left: 0; }
  .chain__b { grid-column: 4; grid-row: 1 / span 2; margin-left: 10px; }
}

/* phones (site-v5-live): the four landing pages. The hero's call to action full width like the forms' buttons;
   the plates at a fixed size, labels at 11px, 44px targets. */
@media (max-width: 759px) {
  .phero.lp-hero { padding-bottom: 56px; }
  .lp-hero .cta { flex-direction: column; align-items: stretch; gap: 18px; }
  .lp-hero .cta .btn { height: 48px; font-size: 15px; }
  .lp-hero .cta .link { align-self: flex-start; }
  .lp-cap.cap__panel { height: 540px; }
  .cap__l { font-size: 11px; }
  .chain__cap { font-size: 11px; }
  .chain__det input { height: 44px; font-size: 12px; }
}

/* ==========================================================================
   phone-design, Round 2: the four landing pages on a phone (≤ 759px). Every rule is inside the phone query, except
   the first line, which keeps the hero's still off the desktop (its images are lazy, so a desktop never loads them).
   ========================================================================== */
.lp-globe { display: none; }
@media (max-width: 759px) {
  /* the hero: a still of the globe, rendered from the home's real scene at build time (_tools/render-stills.mjs), with
     the page's own control lit on the line: the gate, the approval, the cap, the signature */
  .phero.lp-hero { padding-bottom: 32px; }
  .lp-globe { display: block; margin: 36px -20px 0; }
  .lp-globe img { display: block; width: 100%; height: auto; }
  .lp-globe .lp-globe__d { display: none; }
  :root[data-theme="dark"] .lp-globe .lp-globe__l { display: none; }
  :root[data-theme="dark"] .lp-globe .lp-globe__d { display: block; }

  /* where it stops: ink, as on the home, between the paper chapters around it */
  .lp #edges { background: var(--ink); color: var(--paper); }
  .lp #edges .h2 { color: var(--paper); }
  .lp #edges .body { color: rgba(236, 232, 224, .74); }
  .lp #edges code { color: var(--paper); }
  .lp #edges .link { color: var(--paper); text-decoration-color: rgba(236, 232, 224, .62); }
  .lp #edges :focus-visible { outline-color: var(--paper); }
  :root[data-theme="dark"] .lp #edges { --paper: #F3F0E8; --ink: #1B1A18; --ink-rgb: 27 26 24; --ink-2: #3A3631; --node: #F6F4EE; }

  /* /mcp-security: the excerpt, the tool call drawn (the point's station lit), then the six points, one to a screen */
  .lp #gate { display: flex; flex-direction: column; }
  .lp #gate .tc__steps { display: contents; }
  .lp #gate .h2 { order: 1; }
  .lp #gate .tc__plate { order: 2; margin-top: var(--s5); }
  .lp #gate .tc { order: 3; margin-top: var(--s4); }
  .lp #gate [data-pager="tc"] { order: 4; }
  .lp .tc__plate .path { display: block; }
}
