:root{color-scheme:light dark;--ink:#1b1c1e;--muted:#6b7280;--line:#e5e7eb;--bg:#fbfbfa;--card:#fff;--accent:#0b5f4b;--surface:#fff;--surface-muted:#f1f1ef;--readonly-bg:#f6f6f5;--on-accent:#fff;--danger:#b42318;--danger-bg:#fdecea;--danger-line:#f3b4ad;--wait-bg:#fdf3e3;--wait-ink:#8a5a00;--ok-bg:#e7f2ef;--copyrow-line:#c7ccd1;--disabled-bg:#ececeb;--disabled-line:#e0e0de;--disabled-ink:#9aa0a6}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;font:16px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg)}
header.site{padding:1.25rem 1.5rem;border-bottom:1px solid var(--line)}
header.site a{font-weight:650;color:var(--ink);text-decoration:none}
main{flex:1;width:100%;max-width:34rem;margin:0 auto;padding:2rem 1.5rem 3rem}
/* A page whose data does not fit the reading measure gets the wider column
   (#584 U3: /purge/approve's passkey card carries a credential id and a 64-hex
   spki-sha256 per row). Its prose keeps the measure through .purge-page's own
   rule below, so the wider column is only ever used by values that need it. */
main.wide{max-width:56rem}
h1{font-size:1.6rem;margin:0 0 .75rem}
p{margin:.6rem 0}
.muted{color:var(--muted);font-size:.92rem}
.error{background:var(--danger-bg);border:1px solid var(--danger-line);border-radius:.5rem;padding:.6rem .8rem}
.card{background:var(--card);border:1px solid var(--line);border-radius:.75rem;padding:1rem;margin:1rem 0;display:grid;gap:.8rem}
label{font-weight:560;font-size:.95rem}
input,textarea,select{width:100%;padding:.6rem .7rem;border:1px solid var(--line);border-radius:.5rem;font:inherit;background:var(--surface)}
input[readonly]{background:var(--readonly-bg)}
.check{display:flex;gap:.5rem;align-items:center;font-weight:450}
.check input{width:auto}
.check.muted{font-weight:400;font-size:.8rem}
.ok{color:var(--accent)}
.bad{color:var(--danger)}
.push-island h2{font-size:1rem;margin:0}
/* The hidden attribute is the page's own gate: every step an island has not
   reached is authored `hidden` and revealed by script. The UA rule for it is
   an author-level loss to any rule that sets display, and this sheet sets
   display on the two element shapes the gates sit on — .card{display:grid}
   and a.button{display:inline-block} — so a hidden card or a hidden button
   rendered anyway (#596 U2: the owner's iPhone showed the Ed25519 refusal
   twice and a bare "Open your home" under a card with no status). One rule,
   not one per component: it sits after .card in this sheet, so source order
   already beats the card shape; a.button is the declaration an unmarked
   rule would lose to, and !important is what beats it. The rule can only
   ever hide an element the page itself marked hidden. */
[hidden]{display:none!important}
#push-state{margin:0}
#push-note{margin:0}
.push-actions{display:grid}
.push-actions button{grid-area:1/1}
button:disabled{background:var(--disabled-bg);border-color:var(--disabled-line);color:var(--disabled-ink);cursor:not-allowed}
.signout{margin:1.25rem 0 0}
#alias-status{min-height:1.5em}
#passkey-hint{margin:0}
#passkey-status{margin:0}
#codes-copy-status{margin:0}
#alias-preview code{overflow-wrap:anywhere}
#alias-status,#alias-preview{margin:0}
.fields{display:grid;gap:.8rem}
.name-row{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}
.fields input[readonly]{background:var(--readonly-bg);color:var(--muted)}
button{font:inherit;font-weight:600;padding:.65rem 1.1rem;border-radius:.5rem;border:1px solid var(--accent);background:var(--accent);color:var(--on-accent);cursor:pointer;justify-self:start}
button.link{border:0;background:none;color:var(--accent);padding:0;text-decoration:underline}
button.secondary{background:var(--surface);color:var(--accent)}
.row{display:flex;gap:.6rem}
.row button{background:var(--surface);color:var(--accent)}
/* The primary button (#589 Q4). The accent background is already the base
   button rule's; the white the owner saw was a button inside .row, which paints
   the surface. A primary button keeps the accent in both shapes, light and dark,
   so #2 and #5 read green wherever they are placed. */
button.primary,.row button.primary{background:var(--accent);color:var(--on-accent)}
.actions{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem;margin:1rem 0}
.copychip{display:inline-flex;align-items:center;gap:.3rem;background:none;border:0;border-bottom:1px dashed currentColor;border-radius:0;padding:0;color:var(--accent);font:inherit;font-weight:560;cursor:pointer}
.copychip .icon{width:.95em;height:.95em;flex:none}
.copyrow{display:flex;align-items:center;gap:.6rem;width:100%;min-width:0;max-width:100%;background:var(--surface);border:1px dashed var(--copyrow-line);border-radius:.5rem;padding:.55rem .7rem;font:inherit;text-align:left;cursor:pointer;color:var(--ink)}
.copyrow:hover,.copyrow:focus-visible{border-color:var(--accent)}
.copyrow-url{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.82rem;color:var(--muted)}
.copyrow .icon{flex:none;width:1rem;height:1rem;color:var(--accent)}
#link-copy-status:empty{display:none}
.codes ol{list-style:none;padding:0;margin:0;display:grid;gap:.35rem}
.codes li{text-align:center}
.codes code{display:inline-block;font-size:.95rem;letter-spacing:.03em}
footer{width:100%;max-width:34rem;margin:0 auto;padding:0 1.5rem 3rem;color:var(--muted);font-size:.85rem}
footer .credit{text-align:right}
footer .heart{width:1.15em;height:1.15em;vertical-align:-.2em}
footer a{color:inherit}
h2{font-size:1rem;margin:1.5rem 0 .35rem}
table{border-collapse:collapse;width:100%}
th{text-align:left;font-weight:600;font-size:.82rem;color:var(--muted);padding:.35rem .75rem .35rem 0;vertical-align:top;white-space:nowrap}
td{padding:.35rem 0;vertical-align:top;overflow-wrap:anywhere}
header.site{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:.35rem 1rem}
header.site nav{display:flex;align-items:baseline;flex-wrap:wrap;gap:.35rem .9rem;font-size:.92rem}
header.site nav a{font-weight:500;color:var(--muted)}
header.site nav a:hover{color:var(--ink)}
header.site nav button.link{font-weight:500;color:var(--muted);font-size:.92rem}
.req-head,.tenant-head{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:.35rem .6rem}
.req-email,.tenant-alias{font-weight:600;min-width:0;overflow-wrap:anywhere}
/* The revealed address is the row's STORED bytes and the find box matches them
   exactly, so the rendered node must not fold them: a pre-ed8434e row can carry
   folding whitespace (an interior TAB), and with the default white-space the
   browser collapsed it to a space, so a copy of what the page showed hashed to
   a different row and the operator's paste missed (#698 TM-698-1).
   pre-wrap keeps every byte and still wraps long addresses. tenant-alias stays
   out of this rule: an alias is [a-z0-9]{3,15} by grammar, and the alias card
   keeps the stylesheet's normal wrapping. */
.req-email{white-space:pre-wrap}
.req .meta,.req .req-note,.tenant .meta,.decided-row .meta{display:block;margin:0;color:var(--muted);font-size:.85rem}
.req .req-note{color:var(--ink);font-size:.95rem}
.chip{flex:none;border-radius:999px;padding:.1rem .55rem;font-size:.78rem;background:var(--surface-muted);color:var(--muted)}
.chip.wait{background:var(--wait-bg);color:var(--wait-ink)}
.chip.ok{background:var(--ok-bg);color:var(--accent)}
.chip.no{background:var(--danger-bg);color:var(--danger)}
.approve{display:grid;gap:.6rem}
.req-actions{display:flex;align-items:center;gap:.6rem}
.decided{display:grid;gap:.3rem}
.decided-row{display:flex;align-items:baseline;flex-wrap:wrap;gap:.35rem .5rem;margin:0}
.decided-row .meta{margin-left:auto}
/* The queue search (#472): one line above the list it filters — the global
   input rule is width:100%, so the input takes the free space and the button
   and Clear sit beside it instead of stacking under it. */
.queue-search{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}
.queue-search input{flex:1 1 14rem;width:auto}
.queue-search button{width:auto}
.tenant{color:inherit;text-decoration:none}
.tenant:hover{border-color:var(--accent)}
a{color:var(--accent)}
.landing .links{margin-top:1.25rem}
code{background:var(--surface-muted);padding:.1rem .35rem;border-radius:.3rem}
.usage-scroll{overflow-x:auto;margin:.6rem 0 0}
.usage{width:auto}
.usage th,.usage td{white-space:nowrap;font-variant-numeric:tabular-nums}
.usage th,.usage td{padding:.3rem .55rem .3rem 0;text-align:right}
.usage th:first-child,.usage td:first-child{text-align:left}

/* Dark mode follows the system preference (pcad.it parity, same palette as
   www.piercloud.net PR #8): no toggle, every light token unchanged above. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --card: #1c1f24;
    --ink: #f3f4f6;
    --muted: #a1a8b3;
    --line: #2c3038;
    --accent: #3dba9a;
    --surface: #1c1f24;
    --surface-muted: #252a31;
    --readonly-bg: #20242a;
    --on-accent: #0b1a14;
    --danger: #f0a8a0;
    --danger-bg: #3a1d1a;
    --danger-line: #6b3330;
    --wait-bg: #3a2f14;
    --wait-ink: #e8c07a;
    --ok-bg: #14332b;
    --copyrow-line: #8b9299;
    --disabled-bg: #2a2f36;
    --disabled-line: #3a4149;
    --disabled-ink: #6b7280;
  }

  /* Control boundaries need >=3:1 on the dark card (WCAG 1.4.11): #8b9299 is
     the pc-website #8 `--line-strong` role value, and it also lifts the
     clickable .copyrow boundary above 3:1. The decorative --line stays
     subtle by design. `color` is pinned because a browser that supports
     prefers-color-scheme but not `color-scheme` would otherwise keep UA
     black text on the dark surface. Light mode is untouched. */
  input,
  textarea,
  select {
    border-color: #8b9299;
    color: var(--ink);
  }
}

/* Anchor cards (issue #90): the same card on /anchors, in push text and in
   the run summary. Colors ride the shared tokens so dark mode holds. */
.runcard .runhead{display:flex;align-items:center;justify-content:space-between;gap:.6rem}
.runcard .runhead .meta{color:var(--muted);font-size:.85rem}
.runcard h2{font-size:1.05rem;margin:0}
.runcard .runmeta{margin:0;color:var(--muted);font-size:.9rem}
.runcard .changed{color:var(--wait-ink)}
.leadblock{display:grid;gap:.8rem}
.leadblock p{margin:0}
.runcard .devicecode{margin:0;font-weight:700;font-size:1.3rem;letter-spacing:.08em}
a.button{display:inline-block;font-weight:600;padding:.65rem 1.1rem;border-radius:.5rem;border:1px solid var(--accent);background:var(--accent);color:var(--on-accent);text-decoration:none}
a.button.secondary{background:var(--surface);color:var(--accent)}
.small{font-size:.85rem}

/* The purge approval page's passkey card (#584 U3). Two defects are fixed
   here and both are measured by TestWebAuthnE2EPurgeCardRendersHexUnwrapped:
   the values are monospace and grouped into eight-character blocks that wrap
   BETWEEN blocks and never inside one (the global td rule's
   overflow-wrap:anywhere is what broke them mid-token), and the five-column
   table becomes a stacked block per passkey, because no phone can hold five
   columns and the desktop column is a reading measure, not a data width. */
.purge-page p,.purge-page h1,.purge-page h2{max-width:34rem}
.purge-credential-id,.purge-spki-sha256{display:flex;flex-wrap:wrap;gap:.45em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.85rem;overflow-wrap:normal;word-break:normal;min-width:0}
.purge-credential-id .hex-group,.purge-spki-sha256 .hex-group{white-space:nowrap}
.purge-copy-hex{font-size:.78rem;padding:.2rem .6rem;margin-top:.35rem;background:var(--surface);color:var(--accent)}
#purge-copy-hex-status{margin:0}
/* Stacked at every width, not only on a phone: the five columns need about
   1300 px for their values to stay whole, and the widest column this page gets
   is 848 px. A stacked row gives each value its own full-width line, which is
   the only layout in which the fingerprint is one line at 1280 px. */
#purge-passkey-table,#purge-passkey-table tbody,#purge-passkey-table tr,#purge-passkey-table td{display:block;width:auto}
#purge-passkey-table tr{border-top:1px solid var(--line);padding:.6rem 0}
#purge-passkey-table tr:first-child{border-top:0}
#purge-passkey-table td{padding:.15rem 0}
#purge-passkey-table td[data-label]::before{content:attr(data-label) ": ";color:var(--muted);font-size:.82rem}

/* Phones: the queue head and the decided row stack so a long address, the
   reveal control and a long note each get the full width instead of wrapping
   mid-word in a squeezed flex row (live-found 2026-10-12). Deliberately the
   LAST block in the sheet: the cascade must not re-neutralize these rules,
   and TestQueueMobileStackRules fails if a later rule re-declares them. */
@media (max-width:480px){
  .req-head .req-email{flex:1 1 100%}
  .decided-row .meta{margin-left:0;flex:1 1 100%}
}
