/* The client portal (portal.codewrights.io). Built from the accepted
   prototype, design/prototypes/portal/index.html.

   Tokens are copied from app/assets/stylesheets/site.css. The portal adds no
   new colors: it gives the existing ones a turn to mean.
   amber  = needs you        (--neon-amber, the site's "outside services" warm)
   cyan   = with us, working (--neon-cyan, the site's signal)
   coral  = shipped          (the site's "business outcomes")
   violet = findings         (the site's "app capabilities") */
:root {
  color-scheme: dark;
  --bg: #0d0d12;
  --panel: #16161d;
  --panel2: #1d1c26;
  --ink: #f1eee8;
  --muted: #aba8b1;
  --soft: #bcbcbd;
  --line: #2d2b38;
  --neon-cyan: #4df3ff;
  --neon-violet: #c084fc;
  --neon-amber: #ffb86b;
  --neon-coral: #ff9478;
  --accent: #ecd8bf;
  --service: #dfbd83;
  --core: #bda4ec;
  --surface: #88c8d7;
  --outcome: #e4a593;

  --you: var(--neon-amber);
  --us: var(--neon-cyan);
  --done: var(--neon-coral);
  --finding: var(--neon-violet);

  --radius-panel: 14px;
  --radius-control: 6px;
  --rail: 256px;
  font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
em { font-style: italic; font-weight: 300; color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.icon { width: 18px; height: 18px; stroke-width: 1.6; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hue scoping, the site's own pattern: anything inside [data-hue] glows in it. */
[data-hue="you"] { --neon: var(--you); }
[data-hue="us"] { --neon: var(--us); }
[data-hue="done"] { --neon: var(--done); }
[data-hue="finding"] { --neon: var(--finding); }

/* ---------- Logo (from shared/_logo) ---------- */
.wordmark { display: flex; align-items: center; font-size: 22px; line-height: 1; }
.logo { display: block; flex: none; width: calc(var(--w) * 1em); height: calc(var(--h) * 1em); overflow: visible; }
.logo-word { fill: var(--ink); }
.logo-guides { stroke: #e0a86a; stroke-width: 26; stroke-opacity: .62; }
.logo-node[data-ink="c"] { fill: var(--neon-cyan); }
.logo-node[data-ink="m"] { fill: #ff4fd8; }
.logo-node[data-ink="y"] { fill: var(--neon-amber); }
.logo-glow { opacity: .85; }

/* ---------- Pages ----------
   Each page is one .screen; portal.js marks it .is-active on load, which
   starts its entrance motion, and .is-settled once the motion is done. */
.screen { display: block; }
.screen.is-active { animation: enter .38s cubic-bezier(.2,.8,.2,1); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }

/* ---------- Rail ---------- */
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 32px; padding: 28px 24px; border-right: 1px solid var(--line); background: #0d0d12cc; backdrop-filter: blur(10px); }
.client { display: grid; gap: 4px; padding-top: 24px; border-top: 1px solid var(--line); }
.client-name { font-size: 16px; font-weight: 550; letter-spacing: -.01em; }
.client-site { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.client-site:hover { color: var(--accent); }
.client-site .icon { width: 13px; height: 13px; }
.nav { display: grid; gap: 2px; }
.nav-label { font-size: 10px; letter-spacing: .13em; color: var(--muted); margin: 0 0 8px 12px; }
.nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--radius-control); color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--ink); background: var(--panel); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--panel2); box-shadow: inset 2px 0 0 var(--neon, var(--accent)); }
.nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: #1a130a; background: var(--you); box-shadow: 0 0 14px #ffb86b55; }
.nav .quiet-count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rail-foot { margin-top: auto; display: grid; gap: 12px; font-size: 12px; color: var(--muted); }
.who { display: flex; align-items: center; gap: 10px; }
.mono { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; letter-spacing: .02em; background: var(--panel2); border: 1px solid var(--line); color: var(--accent); flex: none; }
.rail-foot a:hover { color: var(--accent); }

.topbar { display: none; }

/* ---------- Main ---------- */
.main { padding: 48px clamp(20px, 5vw, 72px) 96px; max-width: 1180px; width: 100%; }

/* The signature: every page leads with one oversized figure and a plain
   sentence about it. The figure is always a count or a score the client can
   act on, never decoration. */
.ledger-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 12px 32px; padding-bottom: 32px; margin-bottom: 40px; position: relative; }
.ledger-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, var(--neon), transparent 72%); box-shadow: 0 0 16px var(--neon); opacity: .8; }
.figure { font-size: clamp(112px, 15vw, 196px); font-weight: 300; letter-spacing: -.075em; line-height: .76; margin-left: -.06em; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--neon) 40%, var(--ink)); text-shadow: 0 0 56px color-mix(in srgb, var(--neon) 42%, transparent); }
.figure small { font-size: .26em; letter-spacing: -.02em; color: var(--muted); text-shadow: none; margin-left: .22em; }
.ledger-copy { padding-bottom: 6px; }
.eyebrow { font-size: 10px; letter-spacing: .13em; font-weight: 500; margin: 0 0 12px; color: var(--neon, var(--accent)); display: flex; align-items: center; gap: 8px; }
.signal { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 12px var(--neon); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .4; } }
h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 450; line-height: 1.06; letter-spacing: -.04em; margin: 0; }
h2 { font-size: 20px; font-weight: 500; letter-spacing: -.02em; margin: 0; }
h3 { font-size: 15px; font-weight: 550; letter-spacing: -.01em; margin: 0; }
.lede { color: var(--soft); font-size: 15px; margin: 12px 0 0; max-width: 560px; }
.ledger-actions { padding-bottom: 6px; }

/* Buttons: one height scale (40 / 48), one primary per section. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: var(--radius-control); border: 1px solid var(--line); background: var(--panel); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: border-color .2s, background .2s, transform .12s; }
.btn:hover { border-color: #4a4758; background: var(--panel2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #1a1714; border-color: var(--accent); }
.btn-primary:hover { background: #f6e6d2; border-color: #f6e6d2; }
.btn-you { background: var(--you); color: #1a130a; border-color: var(--you); box-shadow: 0 0 24px #ffb86b33; }
.btn-you:hover { background: #ffc98c; border-color: #ffc98c; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); padding: 0 10px; }
.btn-ghost:hover { background: var(--panel); color: var(--ink); border-color: transparent; }
.btn .icon { width: 16px; height: 16px; }

/* ---------- Turn sections (home) ---------- */
.turn { margin-bottom: 56px; }
.turn-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.turn-head h2 { display: flex; align-items: center; gap: 10px; }
.turn-head h2::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 12px var(--neon); }
.turn-head .hint { color: var(--muted); font-size: 13px; }
.turn-head .more { margin-left: auto; font-size: 13px; color: var(--muted); border-bottom: 1px solid #55525f; padding-bottom: 1px; }
.turn-head .more:hover { color: var(--ink); }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 18px 12px; border-bottom: 1px solid var(--line); position: relative; transition: background .2s; }
a.row:hover, .row.is-link:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--neon) 7%, transparent), transparent 70%); }
.row-title { font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.row-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.row-sub .ask { color: color-mix(in srgb, var(--neon) 60%, #fff); display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.row-sub .ask .icon { width: 15px; height: 15px; }
.row-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.row-meta .icon { width: 16px; height: 16px; opacity: .6; transition: transform .2s, opacity .2s; }
a.row:hover .row-meta .icon { transform: translateX(3px); opacity: 1; }

.needs .row { padding-left: 20px; }
.needs .row::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 2px; border-radius: 2px; background: var(--you); box-shadow: 0 0 12px var(--you); }

/* The queue: position numbers are the client's priority, and they own it. */
.queue .row { grid-template-columns: 28px 36px minmax(0, 1fr) auto; }
.grip { display: grid; place-items: center; width: 28px; height: 40px; color: #6d6a78; cursor: grab; border: 0; background: none; padding: 0; border-radius: var(--radius-control); }
.grip:hover { color: var(--ink); background: var(--panel); }
.pos { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.row.is-working .pos { color: var(--us); }
.working-tag { display: inline-flex; align-items: center; gap: 8px; color: color-mix(in srgb, var(--us) 70%, #fff); font-weight: 500; }
.sortable-ghost { opacity: .35; }
.sortable-chosen { background: var(--panel2); }
.queue-note { font-size: 12px; color: var(--muted); margin: 12px 0 0 12px; display: flex; gap: 8px; align-items: center; }
.queue-note .icon { width: 14px; height: 14px; }

.shipped .row-title { color: var(--soft); }
.shipped .check { color: var(--done); }

/* ---------- Request detail ---------- */
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 28px; }
.crumb:hover { color: var(--ink); }
.crumb .icon { width: 16px; height: 16px; }
.req-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; align-items: start; }
.req-title { font-size: clamp(28px, 3vw, 38px); font-weight: 450; letter-spacing: -.035em; line-height: 1.1; margin: 0 0 16px; }
.state-chip { transition: color .5s, border-color .5s, background-color .5s; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid color-mix(in srgb, var(--neon) 45%, transparent); color: color-mix(in srgb, var(--neon) 70%, #fff); background: color-mix(in srgb, var(--neon) 8%, transparent); }
.state-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 10px var(--neon); }

.thread { list-style: none; margin: 40px 0 0; padding: 0; position: relative; }
/* The thread hangs off one construction line, like the guides behind the logo. */
.thread::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(#e0a86a55, #e0a86a22); }
.entry { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 16px; padding-bottom: 32px; position: relative; }
.entry-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.entry-who { font-weight: 550; font-size: 14px; }
.entry-when { color: var(--muted); font-size: 12px; }
.entry-body { color: #dcd8d2; font-size: 15px; line-height: 1.6; max-width: 620px; }
.entry-body p { margin: 0 0 10px; }
.mono.us { background: #0d0d12; border-color: #e0a86a66; }
.mono.us i { width: 7px; height: 7px; border-radius: 50%; display: block; }
.mono.us span { display: flex; gap: 2px; }
.event { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 16px; padding-bottom: 28px; align-items: center; font-size: 13px; color: var(--muted); }
.event .node { width: 9px; height: 9px; border-radius: 50%; margin-left: 11.5px; background: var(--neon); box-shadow: 0 0 10px var(--neon); }
.event b { font-weight: 500; color: var(--soft); }

.attachments { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
/* Stand-ins for the client's photos: art-directed from the photo itself
   (a phone shot of a flyer, a screenshot), not gray boxes. */
.thumb { width: 148px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); font-size: 11px; color: var(--muted); }
.thumb-img { height: 96px; display: grid; place-items: center; position: relative; overflow: hidden; }
.thumb-img.flyer { background: linear-gradient(160deg, #e9e2d3, #cfc5b1); }
.thumb-img.flyer .paper { width: 64px; height: 78px; background: #f7f2e8; box-shadow: 0 6px 14px #0004; transform: rotate(-4deg); padding: 8px 7px; display: grid; gap: 4px; align-content: start; }
.thumb-img.flyer .paper b { display: block; height: 7px; background: #b3462f; border-radius: 1px; width: 80%; }
.thumb-img.flyer .paper i { display: block; height: 3px; background: #8d857a; border-radius: 1px; }
.thumb-img.shot { background: #101218; }
.thumb-img.shot .bar { position: absolute; top: 0; left: 0; right: 0; height: 22px; background: #1d4f7a; }
.thumb-img.shot .bar::after { content: ""; position: absolute; left: 8px; top: 8px; width: 40px; height: 6px; background: #fff9; border-radius: 1px; }
.thumb-img.shot .hl { position: absolute; left: 14px; right: 30px; top: 40px; height: 16px; border: 2px solid #ff5a5a; border-radius: 4px; }
.thumb-img.shot .ln { position: absolute; left: 18px; right: 40px; top: 46px; height: 4px; background: #fff6; }
.thumb-img.shot .ln2 { position: absolute; left: 18px; right: 60px; top: 70px; height: 4px; background: #fff3; }
.thumb-meta { padding: 8px 10px; display: flex; justify-content: space-between; gap: 6px; }
.thumb-meta span:first-child { color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The preview: the moment the client decides. */
.preview { position: relative; margin-top: 8px; border: 1px solid #ffb86b55; border-radius: var(--radius-panel); background: linear-gradient(180deg, #ffb86b0d, transparent 40%), var(--panel); box-shadow: 0 0 0 1px #ffb86b14, 0 24px 60px -30px #ffb86b40; max-width: 640px; }
.preview-top { border-radius: var(--radius-panel) var(--radius-panel) 0 0; }
.preview-top { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.preview-top .icon { color: var(--you); }
.preview-url { margin-left: auto; font-size: 12px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.preview-url:hover { color: var(--accent); }
.preview-url .icon { width: 14px; height: 14px; color: inherit; }
.browser { margin: 20px; border-radius: 10px; overflow: hidden; border: 1px solid #ffffff14; background: #fbfaf7; color: #1b2430; }
.browser-bar { height: 26px; background: #e8e5de; display: flex; align-items: center; gap: 5px; padding: 0 10px; }
.browser-bar i { width: 7px; height: 7px; border-radius: 50%; background: #c9c4ba; }
.browser-bar span { margin-left: 10px; height: 14px; flex: 1; max-width: 220px; background: #fbfaf7; border-radius: 4px; font-size: 9px; line-height: 14px; padding: 0 8px; color: #7b776f; font-family: ui-monospace, monospace; }
.site-banner { background: #1d4f7a; color: #fff; padding: 12px 16px; font-size: 13px; display: flex; align-items: center; gap: 10px; }
.site-banner strong { font-weight: 650; }
.site-banner .changed { margin-left: auto; font-size: 9px; letter-spacing: .12em; background: #ffb86b; color: #1a130a; padding: 3px 7px; border-radius: 3px; font-weight: 700; }
.site-body { padding: 16px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; align-items: center; }
.site-body .h { font-size: 17px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; color: #13314d; }
.site-body .p { height: 5px; background: #d9d5cc; border-radius: 2px; margin-top: 7px; }
.site-body .p.s { width: 70%; }
.site-body .img { height: 70px; border-radius: 6px; background: linear-gradient(135deg, #cfe0ea, #9fbfd3); }
.preview-body { padding: 0 20px 20px; }
.preview-body p { margin: 0 0 16px; color: var(--soft); }
.decide { display: flex; gap: 12px; flex-wrap: wrap; }
.decided { display: none; align-items: center; gap: 10px; color: color-mix(in srgb, var(--done) 70%, #fff); font-weight: 500; }
.preview.is-approved .decide { display: none; }
.preview.is-approved .decided { display: flex; }
.preview.is-approved { border-color: #ff947855; box-shadow: 0 0 0 1px #ff947814, 0 24px 60px -30px #ff947840; }

.reply { margin-top: 8px; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 16px; }
.composer { border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--panel); transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: #5b5868; box-shadow: 0 0 0 4px #ecd8bf0f; }
.composer textarea { display: block; width: 100%; min-height: 96px; resize: vertical; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; padding: 16px; outline: none; }
.composer textarea::placeholder { color: #7f7c88; }
.composer-bar { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-top: 1px solid var(--line); }
.composer-bar .spacer { flex: 1; }
.composer-bar .tip { font-size: 12px; color: var(--muted); }

.req-grid > aside { position: sticky; top: 32px; }
.facts { display: grid; gap: 0; border-top: 1px solid var(--line); font-size: 13px; }
.fact { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.fact dt { font-size: 10px; letter-spacing: .13em; color: var(--muted); }
.fact dd { margin: 0; color: var(--soft); }
.fact dd a { border-bottom: 1px solid #55525f; }
.fact dd a:hover { color: var(--accent); }
.facts .btn { margin-top: 20px; justify-self: start; }
.whose { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 8px; }
.whose span { height: 4px; border-radius: 2px; background: var(--line); }
.whose span.on { background: var(--neon); box-shadow: 0 0 10px var(--neon); }
.whose-labels { display: grid; grid-template-columns: repeat(3, 1fr); font-size: 11px; color: var(--muted); margin-top: 6px; }
.whose-labels b { font-weight: 500; color: color-mix(in srgb, var(--neon) 70%, #fff); }

/* ---------- New request ---------- */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.field { display: grid; gap: 6px; margin-bottom: 24px; }
.field label, .field .label { font-size: 13px; font-weight: 500; color: var(--soft); }
.field .help { font-size: 12px; color: var(--muted); }
.input, select.input { height: 48px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--panel); color: var(--ink); font: inherit; font-size: 15px; padding: 0 14px; outline: none; box-shadow: inset 0 1px 2px #0005; }
.input:focus { border-color: #5b5868; box-shadow: 0 0 0 4px #ecd8bf0f; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
textarea.input { height: auto; min-height: 168px; padding: 14px; line-height: 1.6; resize: vertical; }
.drop { border: 1px dashed #4a4758; border-radius: var(--radius-panel); padding: 28px 20px; display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--muted); font-size: 13px; background: repeating-linear-gradient(-45deg, transparent 0 12px, #ffffff04 12px 13px); cursor: pointer; transition: border-color .2s, background-color .2s; }
.drop:hover, .drop.is-over { border-color: var(--accent); color: var(--soft); background-color: #ecd8bf08; }
.drop strong { color: var(--ink); font-weight: 500; }
.drop .icon { width: 22px; height: 22px; color: var(--accent); }
.files { display: grid; gap: 8px; margin-top: 12px; }
.file { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-control); font-size: 13px; background: var(--panel); }
.file .icon { width: 16px; height: 16px; color: var(--muted); }
.file .size { margin-left: auto; color: var(--muted); font-size: 12px; }
.aside-note { border-top: 1px solid var(--line); padding-top: 20px; font-size: 13px; color: var(--muted); display: grid; gap: 20px; }
.aside-note h3 { color: var(--soft); margin-bottom: 4px; }
.aside-note p { margin: 0; }
.aside-note code { font-family: ui-monospace, monospace; font-size: 12px; color: var(--accent); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; counter-increment: s; }
.steps li::before { content: counter(s, decimal-leading-zero); font-variant-numeric: tabular-nums; color: var(--accent); font-size: 12px; padding-top: 1px; }

/* ---------- Traffic ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.stat { padding: 20px 20px 20px 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat dt { font-size: 10px; letter-spacing: .13em; color: var(--muted); }
.stat dd { margin: 6px 0 0; font-size: 28px; font-weight: 400; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat dd small { font-size: 13px; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.up { color: color-mix(in srgb, var(--done) 70%, #fff) !important; }
.chart { margin-bottom: 48px; }
.chart svg { display: block; width: 100%; height: 180px; overflow: visible; }
.chart-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 10px; letter-spacing: .13em; font-weight: 500; color: var(--muted); padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.table th.num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--soft); }
.table td:first-child { color: var(--ink); }
.table td .path { display: block; font-size: 12px; color: var(--muted); }
.bar-cell { position: relative; }
.bar-cell i { position: absolute; left: 0; bottom: -1px; height: 1px; background: var(--us); box-shadow: 0 0 8px var(--us); }
.source-note { font-size: 12px; color: var(--muted); margin-top: 32px; display: flex; align-items: center; gap: 8px; }
.source-note .icon { width: 14px; height: 14px; }

/* ---------- Search health ---------- */
.meter { display: grid; grid-template-columns: repeat(25, 1fr); gap: 3px; margin-top: 16px; max-width: 420px; }
.meter i { height: 10px; border-radius: 2px; background: var(--finding); opacity: .85; box-shadow: 0 0 8px #c084fc55; }
.meter i.miss { background: transparent; border: 1px solid var(--you); box-shadow: none; opacity: 1; }
.meter-label { font-size: 12px; color: var(--muted); margin-top: 8px; }
.trend { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.trend svg { width: 120px; height: 36px; overflow: visible; }
.finding { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 16px; padding: 24px 12px; border-bottom: 1px solid var(--line); align-items: start; }
.finding .sev { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--neon) 50%, transparent); color: color-mix(in srgb, var(--neon) 80%, #fff); background: color-mix(in srgb, var(--neon) 8%, transparent); }
.finding .sev .icon { width: 16px; height: 16px; }
.finding p { margin: 6px 0 0; color: var(--soft); max-width: 600px; }
.finding .where { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 4px; font-size: 12px; color: var(--muted); background: var(--panel2); border: 1px solid var(--line); font-family: ui-monospace, monospace; }
.finding .asked { display: none; align-items: center; gap: 8px; font-size: 13px; color: color-mix(in srgb, var(--us) 70%, #fff); height: 40px; }
.finding.is-asked .asked { display: inline-flex; }
.finding.is-asked .ask-btn { display: none; }
details.passing { margin-top: 32px; border-top: 1px solid var(--line); }
details.passing summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 18px 12px; color: var(--soft); }
details.passing summary::-webkit-details-marker { display: none; }
details.passing summary .icon { transition: transform .2s; color: var(--muted); }
details.passing[open] summary .icon { transform: rotate(90deg); }
.pass-list { columns: 2; column-gap: 40px; list-style: none; margin: 0; padding: 0 12px 12px; font-size: 13px; color: var(--muted); }
.pass-list li { break-inside: avoid; display: flex; gap: 8px; align-items: center; padding: 6px 0; }
.pass-list .icon { width: 14px; height: 14px; color: var(--finding); }

/* ---------- Channels ---------- */
.group-label { font-size: 10px; letter-spacing: .13em; color: var(--muted); margin: 40px 0 8px; }
.group-label:first-of-type { margin-top: 0; }
.channel { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 12px; border-bottom: 1px solid var(--line); }
.channel .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--panel2); border: 1px solid var(--line); color: var(--soft); }
.channel.is-on .icon { color: var(--ink); border-color: #e0a86a55; }
.channel .state { font-size: 13px; color: var(--muted); margin-top: 2px; }
.channel.is-on .state { color: var(--soft); }
.channel .state .warn { color: color-mix(in srgb, var(--you) 75%, #fff); }
.channel .state .warn a { border-bottom: 1px solid currentColor; }
.channel.is-unused { opacity: .55; }
.channel-actions { display: flex; gap: 8px; align-items: center; }
.connected { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); }
.connected::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--done); box-shadow: 0 0 10px var(--done); }
.promise { margin-top: 40px; display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-panel); color: var(--soft); font-size: 13px; background: var(--panel); max-width: 680px; }
.promise .icon { color: var(--accent); }

/* ---------- Sign in ---------- */
.signin { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: auto 1fr; }
/* The drawing's own band, full width. The wordmark runs edge to edge inside
   it and nothing is ever set on top of it. */
.signin-band { grid-column: 1 / -1; position: relative; overflow: hidden; height: clamp(320px, 46vh, 480px); border-bottom: 1px solid var(--line);
  background: radial-gradient(90% 120% at 30% 40%, #15142a 0%, transparent 70%); }
.signin-band .wordmark { position: absolute; top: 32px; left: clamp(24px, 5vw, 72px); font-size: 26px; z-index: 1; }
.signin-hero { padding: 48px clamp(24px, 5vw, 72px) 56px; border-right: 1px solid var(--line); align-self: stretch; }
/* The logo's own construction, drawn at the scale of the room: the ghost of
   the wordmark, the guides measured from its "d", and the three registration
   dots. On arrival the guides draw themselves slowly and the dots drift in
   from misregistration until they line up, the way a printer brings plates
   into register. Then the dots wander their own guides at random (see
   wander() in the script), and the drawing leans toward the pointer. */
.construct { position: absolute; left: -2%; top: 50%; width: 104%; height: auto; transform: translateY(-54%); overflow: visible; pointer-events: none; }
.construct-drift, .gems { transform: translate3d(calc(var(--px, 0) * 10px), calc(var(--py, 0) * 8px), 0); transition: transform 1.4s cubic-bezier(.2,.8,.2,1); }
.gems { transform: translate3d(calc(var(--px, 0) * 26px), calc(var(--py, 0) * 20px), 0); }
/* The wordmark in the logo's own light ink, solid, with a soft shadow that
   lifts it off the ground. The registration dots' colour falls on the
   letters wherever they travel. */
.word { animation: fade-in 1.6s ease-out .1s both; }
.word-shadow { fill: #05040a; opacity: .75; }
.word-body { fill: var(--ink); }
.refl { opacity: 0; animation: fade-in-full 1.4s ease-out 3s forwards; }
@keyframes fade-in-full { to { opacity: 1; } }
.construct-guides .guide > * { transition: stroke-opacity .9s ease; stroke: #e0a86a; stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; stroke-opacity: .55; stroke-dasharray: 1; animation: dash 1.8s cubic-bezier(.45,.05,.2,1) both; animation-delay: calc(.2s + var(--g) * .22s); }
/* A brighter pass runs along each guide now and then: it draws from one end
   and erases from the same end, like a pen tracing the construction again.
   Each guide keeps its own period, so the passes rarely coincide. */
.construct-trace .guide > * { fill: none; stroke: #ffd6a3; stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-opacity: .9; stroke-dasharray: 0 1; filter: drop-shadow(0 0 4px #e0a86a); animation: trace var(--dur) linear var(--delay) infinite; }
@keyframes trace {
  0% { stroke-dasharray: 0 1; stroke-dashoffset: 0; animation-timing-function: cubic-bezier(.45, .05, .25, 1); }
  14% { stroke-dasharray: 1 1; stroke-dashoffset: 0; animation-timing-function: cubic-bezier(.45, .05, .25, 1); }
  28%, 100% { stroke-dasharray: 1 1; stroke-dashoffset: -1; }
}
.gem { transform-box: view-box; animation: register 3.4s cubic-bezier(.16,1,.3,1) .4s both; }
.gem-glow { transform-box: fill-box; transform-origin: center; animation: glow-flash 1.8s ease-out 2.7s both, gem-breathe 7s ease-in-out 4.5s infinite; }
.gem[data-ink="m"] .gem-glow { animation-delay: 2.85s, 5.7s; }
.gem[data-ink="y"] .gem-glow { animation-delay: 3s, 6.9s; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes register { from { transform: translate(var(--fx), var(--fy)); opacity: 0; } 30% { opacity: .55; } }
@keyframes glow-flash { 40% { transform: scale(1.45); opacity: 1; } }
@keyframes gem-breathe { 50% { transform: scale(.82); opacity: .7; } }
.signin-hero h1 { font-size: clamp(34px, 4.2vw, 60px); letter-spacing: -.05em; line-height: 1.02; max-width: 620px; position: relative; }
.signin-hero .turns { display: flex; gap: 20px; margin-top: 28px; font-size: 13px; color: var(--muted); position: relative; flex-wrap: wrap; }
.signin-hero .turns span { display: inline-flex; align-items: center; gap: 8px; }
.signin-hero .turns span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 10px var(--neon); }
.signin-form { display: grid; align-content: start; padding: 48px clamp(24px, 6vw, 88px) 56px; max-width: 520px; width: 100%; }
.signin-form h2 { font-size: 26px; letter-spacing: -.03em; font-weight: 450; }
.signin-form .lede { margin: 8px 0 32px; font-size: 14px; }
.btn-google { width: 100%; height: 48px; background: var(--ink); color: #1a1714; border-color: var(--ink); font-size: 15px; }
.btn-google:hover { background: #fff8ee; border-color: #fff8ee; }
.g-mark { width: 18px; height: 18px; stroke: none; }
.or { display: flex; align-items: center; gap: 12px; margin: 24px 0; font-size: 12px; color: var(--muted); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.signin-form .btn-primary { width: 100%; }
.signin-fine { font-size: 12px; color: var(--muted); margin-top: 24px; }
.code { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 8px 0 24px; }
.code input { height: 56px; text-align: center; font-size: 22px; font-variant-numeric: tabular-nums; padding: 0; }
.step-code { display: none; }
.signin-form.is-sent .step-email { display: none; }
.signin-form.is-sent .step-code { display: block; }
.sent-to { color: var(--ink); font-weight: 500; }

.screen.is-active .signin-hero .eyebrow, .screen.is-active .signin-hero h1, .screen.is-active .signin-hero .turns { animation: rise 1.4s cubic-bezier(.2,.8,.2,1) both; }
.screen.is-active .signin-hero .eyebrow { animation-delay: .35s; }
.screen.is-active .signin-hero h1 { animation-delay: .5s; }
.screen.is-active .signin-hero .turns { animation-delay: 1s; }
.screen.is-active .signin-form > div { animation: rise .6s cubic-bezier(.2,.8,.2,1) .1s both; }

/* ---------- Overview ---------- */
.overview-head { grid-template-columns: minmax(0, 1fr); }
.sentence { font-size: clamp(30px, 3.3vw, 46px); font-weight: 400; line-height: 1.38; letter-spacing: -.035em; max-width: 1000px; }
.sentence .num { position: relative; display: inline-block; font-size: 2.05em; line-height: .72; font-weight: 300; letter-spacing: -.07em; vertical-align: -.08em; padding: 0 .05em 0 0; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--neon) 45%, var(--ink)); text-shadow: 0 0 44px color-mix(in srgb, var(--neon) 45%, transparent); }
.sentence .num::after { content: ""; position: absolute; left: .04em; right: .1em; bottom: -.08em; height: 2px; border-radius: 2px; background: var(--neon); box-shadow: 0 0 12px var(--neon); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.sentence .num:hover::after, .sentence .num:focus-visible::after { transform: scaleX(1); }
.overview { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 64px; align-items: start; }
.module { margin-bottom: 48px; }
.ov-side .module { margin: 0; padding: 24px 0 28px; border-top: 1px solid var(--line); }
.ov-side .module:first-child { border-top: 0; padding-top: 0; }
.mini-figure { font-size: 56px; font-weight: 300; letter-spacing: -.06em; line-height: 1; margin: 12px 0 16px; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--neon) 40%, var(--ink)); text-shadow: 0 0 36px color-mix(in srgb, var(--neon) 38%, transparent); }
.mini-figure small { font-size: 13px; letter-spacing: 0; margin-left: 10px; color: var(--muted); text-shadow: none; }
.mini-chart { display: block; width: 100%; height: 72px; overflow: visible; }
.module-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.meter.mini { max-width: none; margin: 0 0 16px; }
.meter.mini i { height: 8px; }
.module-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: var(--radius-control); font-size: 13px; color: color-mix(in srgb, var(--neon) 72%, #fff); background: color-mix(in srgb, var(--neon) 7%, transparent); border: 1px solid color-mix(in srgb, var(--neon) 28%, transparent); transition: background-color .2s; }
.module-link:hover { background: color-mix(in srgb, var(--neon) 13%, transparent); }
.module-link .icon { width: 16px; height: 16px; }
.now { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.now-spinner { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--us); border: 1px solid #4df3ff40; background: #4df3ff0d; }
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; padding: 16px 12px; border-bottom: 1px solid var(--line); }
.timeline time { display: flex; align-items: center; gap: 10px; height: 22px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline time::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--done); box-shadow: 0 0 10px var(--done); }
.timeline .row-title { color: var(--soft); }
.stars { display: flex; gap: 3px; color: var(--done); margin: -4px 0 16px; }
.stars svg { width: 16px; height: 16px; fill: currentColor; }
.stars svg:last-child { opacity: .4; }
.review { margin: 0; padding-left: 14px; border-left: 2px solid #ff947855; font-size: 14px; line-height: 1.6; color: var(--soft); }
.review cite { display: block; margin-top: 8px; font-size: 12px; font-style: normal; color: var(--muted); }

/* ---------- Drafted figures ----------
   Each oversized figure carries the logo's construction, measured from the
   figure itself the way render_logo.py measures the wordmark: a cap line and
   a baseline that run past it, a stem line at its left edge, a square and
   circle on its first glyph, and one registration dot in the page's colour.
   Faint enough to read as texture; it brightens when the pointer is near. */
.figure, .sentence .num { position: relative; isolation: isolate; }
.draft { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; z-index: -1; }
.draft .g { fill: none; stroke: #e0a86a; stroke-width: 1; stroke-opacity: .2; stroke-dasharray: 1; transition: stroke-opacity .5s; }
.ledger-head:hover .draft .g { stroke-opacity: .42; }
.draft .reg { fill: var(--neon); filter: drop-shadow(0 0 6px var(--neon)); transform-box: fill-box; transform-origin: center; }
.screen.is-active .draft .g { animation: dash 1.5s cubic-bezier(.45,.05,.2,1) both; animation-delay: calc(.35s + var(--g) * .14s); }
.screen.is-active .draft .reg { animation: fade-in .6s ease-out 1.3s both, breathe 6s ease-in-out 2s infinite; }
.bl { display: inline-block; width: 0; height: 0; vertical-align: baseline; }

/* ---------- Motion ----------
   Present, rarely noticed. Things arrive rather than appear, lines draw
   themselves once, and anything alive (a working request, the latest day of
   traffic, a preview waiting on the client) breathes slowly. Transform and
   opacity only; prefers-reduced-motion switches all of it off. */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes focus-in { from { opacity: 0; transform: translateY(6px) scale(.985); filter: blur(10px); } }
@keyframes draw-x { from { transform: scaleX(0); } }
@keyframes draw-y { from { transform: scaleY(0); } }
@keyframes breathe { 50% { opacity: .4; } }
@keyframes glow-in { 50% { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { 50% { transform: translate3d(-4%, 3%, 0) scale(1.08); } }
@keyframes dash { from { stroke-dashoffset: 1; } }

body::before { content: ""; position: fixed; inset: -12%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 82% 0%, #c084fc1c, transparent 36%), radial-gradient(ellipse at 10% 10%, #4df3ff12, transparent 32%), radial-gradient(ellipse at 60% 110%, #ffb86b0a, transparent 40%);
  animation: drift 48s ease-in-out infinite; }

.screen.is-active .figure,
.screen.is-active .sentence { animation: focus-in 1s cubic-bezier(.2,.8,.2,1) both; }
.screen.is-active .ledger-head::after { transform-origin: left; animation: draw-x 1.3s cubic-bezier(.2,.8,.2,1) .2s both, breathe 7s ease-in-out 1.6s infinite; }
.screen.is-active .ledger-copy > *,
.screen.is-active .ledger-actions { animation: rise .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.12s + var(--i, 0) * 70ms); }
.screen.is-active [data-stagger] > * { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.28s + var(--i, 0) * 50ms); }
.screen.is-settled [data-stagger] > * { animation: none; }
.screen.is-active .thread::before { transform-origin: top; animation: draw-y 1.6s cubic-bezier(.2,.8,.2,1) .2s both; }
.screen.is-active .bar-cell i { transform-origin: left; animation: draw-x 1s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.4s + var(--i, 0) * 60ms); }
.screen.is-active .meter i { animation: rise .4s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.35s + var(--i, 0) * 22ms); }
.screen.is-active .trend polyline { stroke-dasharray: 1; animation: dash 1.6s cubic-bezier(.2,.8,.2,1) .5s both; }
.screen.is-active .bars rect { transform-box: fill-box; transform-origin: bottom; animation: draw-y .9s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.25s + var(--i, 0) * 16ms); }
.bars rect.today { animation: draw-y .9s cubic-bezier(.2,.8,.2,1) both, breathe 4s ease-in-out 1.4s infinite !important; animation-delay: calc(.25s + var(--i, 0) * 16ms), 1.4s !important; }
.is-working .grip svg, .now-spinner svg { animation: spin 7s linear infinite; }
.logo-node .logo-glow { animation: breathe 6s ease-in-out infinite; }
.logo-node[data-ink="m"] .logo-glow { animation-delay: -2s; }
.logo-node[data-ink="y"] .logo-glow { animation-delay: -4s; }
/* A preview waiting on the client glows a little, then a little less. */
.preview::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 1px #ffb86b66, 0 0 48px -8px #ffb86b66; opacity: .25; animation: glow-in 5s ease-in-out infinite; }
.preview.is-approved::before { animation: none; opacity: 0; }
.needs .row::before { animation: breathe 5s ease-in-out infinite; }
.needs li:nth-child(2) .row::before { animation-delay: -2.5s; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; transition: opacity .25s, transform .25s; background: var(--panel2); border: 1px solid #3a3746; padding: 12px 18px; border-radius: 999px; font-size: 13px; z-index: 60; display: flex; align-items: center; gap: 10px; box-shadow: 0 16px 40px #000a; pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--done); box-shadow: 0 0 10px var(--done); }

/* ---------- Phone ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 20; height: 60px; padding: 0 16px; border-bottom: 1px solid var(--line); background: #0d0d12e6; backdrop-filter: blur(10px); }
  .topbar .wordmark { font-size: 17px; }
  .topbar > details { position: relative; }
  .topbar > details > summary { list-style: none; cursor: pointer; height: 40px; padding: 0 12px; border-radius: var(--radius-control); border: 1px solid var(--line); display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); }
  .topbar > details > summary::-webkit-details-marker { display: none; }
  .topbar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--you); box-shadow: 0 0 10px var(--you); }
  .topbar .menu { position: absolute; right: 0; top: 48px; width: min(300px, calc(100vw - 32px)); background: var(--panel); border: 1px solid #3a3746; border-radius: var(--radius-panel); padding: 12px; box-shadow: 0 20px 50px #000a; display: grid; gap: 12px; }
  .main { padding: 28px 16px 96px; }
  .ledger-head { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-bottom: 24px; margin-bottom: 28px; }
  .ledger-actions { padding: 4px 0 0; }
  .ledger-actions .btn { width: 100%; }
  .figure { font-size: 120px; }
  h1 { font-size: 26px; }
  .lede { font-size: 14px; }
  .overview { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ov-side .module:first-child { border-top: 1px solid var(--line); padding-top: 24px; }
  .sentence { font-size: 26px; line-height: 1.45; }
  .timeline li { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .turn-head { flex-wrap: wrap; row-gap: 2px; }
  .turn-head .hint { flex-basis: 100%; order: 3; }
  .row { padding: 16px 8px; }
  .needs .row { padding-left: 16px; }
  .row-meta .when { display: none; }
  .queue .row { grid-template-columns: 24px 28px minmax(0, 1fr); }
  .queue .row .row-meta { display: none; }
  .req-grid, .form-grid, .two-col { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .req-grid > aside { position: static; }
  .stat { padding: 16px 12px 16px 0; }
  .stat + .stat { padding-left: 12px; }
  .stat dd { font-size: 22px; }
  .stat dd small { display: block; margin: 0; font-size: 12px; }
  .finding { grid-template-columns: 32px minmax(0, 1fr); }
  .finding > :last-child { grid-column: 2; }
  .pass-list { columns: 1; }
  .channel { grid-template-columns: 40px minmax(0, 1fr); }
  .channel-actions { grid-column: 2; }
  .signin { grid-template-columns: 1fr; }
  .signin-band { height: 240px; }
  .signin-band .wordmark { top: 20px; left: 16px; font-size: 20px; }
  .construct { left: -20%; width: 260%; transform: translateY(-40%); }
  .signin-hero { padding: 28px 16px 8px; border-right: 0; }
  .signin-form { padding: 32px 16px 64px; }
  .email-pair { grid-template-columns: 1fr; }
  .site-body { grid-template-columns: 1fr; }
  .site-body .img { display: none; }
  .browser { margin: 16px; }
  .preview-top { padding: 14px 16px; flex-wrap: wrap; }
  .preview-url { margin-left: 0; width: 100%; }
  .preview-body { padding: 0 16px 16px; }
  .decide .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Flash and errors ---------- */
.flash { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; padding: 12px 16px; border-radius: var(--radius-control); border: 1px solid var(--line); background: var(--panel); font-size: 13px; color: var(--soft); }
.flash::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--done); box-shadow: 0 0 10px var(--done); flex: none; }
.flash.alert::before { background: var(--you); box-shadow: 0 0 10px var(--you); }
.field-error { font-size: 12px; color: color-mix(in srgb, var(--you) 75%, #fff); }
.empty { padding: 24px 12px; color: var(--muted); font-size: 14px; border-bottom: 1px solid var(--line); }
.button_to { display: inline; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.link-button:hover { color: var(--accent); }
.code-input { font-size: 26px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; height: 56px; }
.text-link { border-bottom: 1px solid #55525f; }
.text-link:hover { color: var(--accent); }
.thumb-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-img .icon { width: 28px; height: 28px; color: var(--muted); }
.decide form { display: contents; }
.composer .files .file { margin-top: 8px; }
.now { color: inherit; }
.now:hover .row-title { color: var(--accent); }

/* ---------- Admin ---------- */
.actions { position: sticky; top: 32px; display: grid; gap: 12px; align-content: start; }
.action { border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--panel); }
.action summary { list-style: none; cursor: pointer; padding: 14px 16px; font-size: 14px; font-weight: 500; color: var(--soft); }
.action summary::-webkit-details-marker { display: none; }
.action[open] summary { color: var(--ink); border-bottom: 1px solid var(--line); }
.action form { display: grid; gap: 10px; padding: 14px 16px 16px; }
.action .input { height: 40px; font-size: 14px; }
.action textarea.input { min-height: 0; height: auto; }
.action-note { margin: 0; font-size: 12px; color: var(--muted); }
.action-start button { width: 100%; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
@media (max-width: 900px) { .actions { position: static; } .admin-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.narrow-form { max-width: 520px; }

/* ---------- Project switcher ---------- */
.switcher summary { list-style: none; cursor: pointer; display: grid; gap: 2px; margin: -8px -10px; padding: 8px 10px; border-radius: var(--radius-control); transition: background .2s; }
.switcher summary::-webkit-details-marker { display: none; }
.switcher summary:hover { background: var(--panel); }
.switcher-current { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--soft); }
.switcher-current .icon { width: 14px; height: 14px; color: var(--muted); transition: transform .2s; }
.switcher[open] .switcher-current .icon { transform: rotate(180deg); }
.switcher-menu { display: grid; gap: 2px; margin: 12px -10px 8px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--panel); }
.switcher-menu .nav-label { margin: 8px 0 4px 8px; }
.switcher-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 6px 10px; border-radius: var(--radius-control); color: var(--soft); }
.switcher-item:hover { background: var(--panel2); color: var(--ink); }
.switcher-item[aria-current="page"] { background: var(--panel2); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); }
.switcher-item > span:first-child { display: grid; gap: 1px; }
.switcher-name { font-size: 14px; }
.switcher-host { font-size: 11px; color: var(--muted); }
.switcher-item .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: #1a130a; background: var(--you); box-shadow: 0 0 12px #ffb86b55; }
.topbar .menu .client { padding: 0 0 12px; border-top: 0; border-bottom: 1px solid var(--line); }

/* ---------- The sky (portal/sky.js) ----------
   Traffic as a night sky, after Burrow's map aesthetic: dark and quiet, one
   bright thing at a time; machine text in mono, people text in the sans;
   motion that is either ambient or earned. The hub is the logo's own
   construction. */
.machine, .sky-sub, .sky-domain, .tui { font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace; }
.sky-frame { position: relative; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 32px;
  background: #0b0b11; box-shadow: 0 32px 90px -42px #000; }
.sky { display: block; width: 100%; height: auto; }
.sky text { paint-order: stroke; stroke: #0a0a10; stroke-width: 5px; stroke-linejoin: round; }
.sky-title { font: 600 21px 'DM Sans', sans-serif; fill: var(--soft); transition: fill .3s, opacity .3s; }
.sky-hub-title { font-size: 24px; fill: var(--ink); }
.sky-sub { font-size: 16px; fill: #8d8a94; letter-spacing: .04em; transition: opacity .3s; }
.sky-hub-sub { font-size: 16px; fill: color-mix(in srgb, var(--us) 70%, #fff); }
.sky-domain { font-size: 14px; letter-spacing: .28em; text-transform: uppercase; fill: #aba8b1; opacity: .75; }
.sky-wire { fill: none; stroke-width: 1.5; stroke-opacity: .34; transition: stroke-opacity .3s, stroke-width .3s; }
.sky-star .ring { stroke-opacity: .5; transition: stroke-opacity .3s; }
.sky-star .hit { cursor: pointer; }
.sky-star:focus-visible { outline: none; }
.sky-star:focus-visible .core, .sky-star.selected .core { stroke: #fff; stroke-width: 2.2; }
.sky.is-lit .sky-star:not(.lit):not(.selected) { opacity: .5; }
.sky.is-lit .sky-wire:not(.lit):not(.picked) { stroke-opacity: .2; }
.sky-star.selected .ring { stroke-opacity: 1; }
.sky-star.selected .sky-title { fill: var(--ink); }
.sky-wire.picked { stroke-opacity: .75; stroke-width: 2; }
.sky.is-lit .sky-star.lit .ring { stroke-opacity: 1; }
.sky.is-lit .sky-star.lit .sky-title { fill: var(--ink); }
.sky.is-lit .sky-wire.lit { stroke-opacity: .85; stroke-width: 2.2; }
.sky-construction .g { fill: none; stroke: #e0a86a; stroke-width: 1.2; stroke-opacity: .42; vector-effect: non-scaling-stroke; }
.sky-construction .reg { filter: none; }
.sky-icon .disc { fill: var(--panel); stroke: #e0a86a; stroke-opacity: .42; stroke-width: 1.2; }
.orbit { fill: none; transform-box: fill-box; transform-origin: center; vector-effect: non-scaling-stroke; }
.orbit-1 { stroke: #c084fc; stroke-opacity: .2; stroke-dasharray: 3 9; animation: orbit 40s linear infinite; }
.orbit-2 { stroke: #4df3ff; stroke-opacity: .12; stroke-dasharray: 3 9; animation: orbit 64s linear infinite reverse; }
.orbit-3 { stroke: #e0a86a; stroke-opacity: .09; stroke-dasharray: 1 7; animation: orbit 140s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }

/* The TUI status panel: a bordered box with its title notched into the top
   border, rows of KEY value pairs, and a block sparkline. */
.tui { position: relative; border: 1px solid #3a3746; border-radius: 12px; padding: 22px 20px 16px; margin: 0 0 40px;
  background: linear-gradient(180deg, #14131cd9, #0d0d12d9); font-size: 12px; color: var(--muted); }
.tui-title { position: absolute; top: -8px; left: 16px; padding: 0 8px; background: var(--bg); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tui-title b { color: var(--us); font-weight: 500; }
.tui-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 6px 0; }
.tui-row + .tui-row { border-top: 1px dashed #2d2b38; }
.tui-key { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: #6f6c78; }
.tui-value { color: var(--ink); font-size: 13px; }
.tui-value.up { color: color-mix(in srgb, var(--done) 75%, #fff) !important; }
.tui-value.down { color: color-mix(in srgb, var(--you) 75%, #fff); }
.tui-note { color: #6f6c78; }
.tui-sep { color: #3a3746; }
.spark { font-size: 19px; letter-spacing: 2px; line-height: 1; background: linear-gradient(90deg, #c084fc, #4df3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.spark i { font-style: normal; }
.spark { max-width: 100%; overflow: hidden; white-space: nowrap; }
@media (max-width: 900px) { .spark { font-size: 13px; letter-spacing: 1px; } }
.spark .z { color: #3a3746; -webkit-text-fill-color: #3a3746; }

/* Range tabs */
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: #0d0d12; }
.segmented a { font: 500 11px/1 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 9px 12px; border-radius: 7px; }
.segmented a:hover { color: var(--ink); }
.segmented a[aria-current="page"] { color: var(--us); background: #4df3ff14; box-shadow: inset 0 0 0 1px #4df3ff44; }

/* Replay and inspector (admin constellation) */
.replay { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #0d0d12cc; }
.replay .btn { height: 32px; padding: 0 12px; font-size: 12px; }
.replay input[type=range] { flex: 1; accent-color: #4df3ff; }
.replay-readout { font-size: 11px; letter-spacing: .08em; color: var(--muted); min-width: 220px; text-align: right; }
/* The constellation and its inspector side by side, never on top of each other. */
.sky-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.sky-stage { position: relative; min-width: 0; }
.sky-legend { list-style: none; margin: 0; padding: 12px 20px 16px; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.sky-legend li { display: inline-flex; align-items: center; }
.sky-legend .count { color: var(--ink); margin-left: 6px; }
.sky-inspector { padding: 20px; border-left: 1px solid var(--line); background: #0d0d12b3; max-height: 760px; overflow: auto; }
@media (max-width: 1180px) { .sky-split { grid-template-columns: minmax(0, 1fr); } .sky-inspector { border-left: 0; border-top: 1px solid var(--line); max-height: none; } }
.sky-inspector h3 { font-size: 20px; letter-spacing: -.02em; margin: 6px 0 12px; }
.sky-inspector .tui-key { display: block; margin: 14px 0 6px; }
.mini-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.mini-rank li { display: flex; justify-content: space-between; gap: 10px; color: var(--soft); }
.mini-rank li span:last-child { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--muted); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; box-shadow: 0 0 8px currentColor; background: currentColor; }
@media (max-width: 900px) {
  .sky-frame { margin-left: -16px; margin-right: -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .replay-readout { display: none; }
}
@media (prefers-reduced-motion: reduce) { .orbit { animation: none !important; } }
/* The admin map: bigger type in its tighter canvas; a site's views read
   under its name. */
.sky.radial:not(.portrait) .sky-title { font-size: 25px; }
.sky.radial:not(.portrait) .sky-hub-title { font-size: 30px; }
.sky.radial:not(.portrait) .sky-sub { font-size: 20px; fill: #b3b0bb; }
.sky.radial:not(.portrait) .sky-hub-sub { font-size: 22px; }
/* A site with no views in the window: grey, hollow, dashed. */
.sky-star.cold .core { fill: none; stroke-dasharray: 3 3; }
.sky-star.cold .ring { stroke-opacity: .2; }
/* The selected site pings, and its name and spoke come forward; the rest
   stay as they are. */
.sky-star .ping { opacity: 0; transform-box: fill-box; transform-origin: center; }
.sky-star.selected .ping { animation: ping 1.9s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.7); opacity: 0; } }
.sky-star.selected .sky-title { font-weight: 700; }
.sky-star.selected .sky-sub { fill: var(--ink); }
.panel-head { border-left: 2px solid var(--neon, var(--us)); padding-left: 12px; margin-bottom: 14px; }
.panel-head .eyebrow { color: var(--neon); margin-bottom: 6px; }
.panel-head .eyebrow .signal { background: var(--neon); box-shadow: 0 0 10px var(--neon); }
.panel-head h3 { margin: 0; }
@media (prefers-reduced-motion: reduce) { .sky-star.selected .ping { animation: none; opacity: .5; } }

/* Portrait canvas (phones): the same sky drawn tall, with type sized to be
   read at phone width. */
.sky.portrait .sky-title { font-size: 30px; }
.sky.portrait .sky-hub-title { font-size: 36px; }
.sky.portrait .sky-sub { font-size: 22px; }
.sky.portrait .sky-hub-sub { font-size: 24px; }
.sky.portrait .sky-domain { font-size: 20px; }

/* Day navigation for one-day traffic views */
.day-nav { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; }
.day-step { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; color: var(--soft); font-size: 18px; line-height: 1; }
a.day-step:hover { color: var(--ink); border-color: #4a4758; background: var(--panel); }
.day-step[aria-disabled] { opacity: .3; }
.day-label { min-width: 104px; text-align: center; font-size: 11px; letter-spacing: .14em; color: var(--us); }
.day-today { margin-left: 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid #55525f; }
.day-today:hover { color: var(--ink); }
.ledger-actions { display: grid; justify-items: end; }
.limited-note { font-size: 12px; color: var(--muted); margin: -16px 0 32px; display: flex; gap: 8px; align-items: center; }
.limited-note .icon { width: 14px; height: 14px; }
@media (max-width: 900px) { .ledger-actions { justify-items: start; } }

/* ---------- Search health: AI answers and the admin table ---------- */
.ai-answers { margin-top: 48px; }
.ai-question { padding: 24px 12px 8px; border-top: 1px solid var(--line); }
.ai-question h3 { font-size: 16px; font-weight: 500; color: var(--ink); margin: 0 0 12px; }
.ai-list { list-style: none; margin: 0; padding: 0; }
.ai-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px dashed #2d2b3880; }
.ai-row:first-child { border-top: 0; }
.ai-who { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--soft); }
.ai-who .signal { --neon: #6f6c78; margin-top: 7px; flex: none; }
.ai-who small { display: block; margin-top: 2px; }
.ai-row.named .ai-who .signal { --neon: var(--us); }
.ai-who .machine { font-size: 11px; color: var(--muted); }
.ai-body { display: grid; gap: 6px; font-size: 14px; }
.ai-body strong { font-weight: 500; color: color-mix(in srgb, var(--us) 70%, #fff); }
.ai-body q { color: var(--soft); quotes: "\201C" "\201D"; max-width: 640px; }
.ai-miss { color: var(--muted); }
.ai-conflict { display: flex; gap: 8px; align-items: flex-start; margin: 2px 0 0; color: color-mix(in srgb, var(--you) 75%, #fff); font-size: 13px; }
.ai-conflict .icon { width: 14px; height: 14px; flex: none; margin-top: 3px; }
.ai-sources { font-size: 11px; color: var(--muted); }
@media (max-width: 900px) { .ai-row { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.search-table td { vertical-align: middle; }
.search-table .path { display: block; }
.search-table .delta { margin-left: 6px; font-size: 11px; color: var(--you); }
.search-table .delta.up { color: var(--us); }
.search-table .row-actions { text-align: right; }
.search-table .sub-row td { padding: 0 0 12px; font-size: 13px; }
.search-table .sub-row summary { cursor: pointer; color: var(--muted); list-style: none; }
.search-table .sub-row summary::-webkit-details-marker { display: none; }
.questions-form { display: grid; gap: 8px; justify-items: start; margin-top: 10px; max-width: 640px; }
.questions-form textarea { width: 100%; min-height: 80px; }
.inline-toggle { margin: 0; }
.switch { position: relative; width: 36px; height: 20px; padding: 0; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; transition: background .2s, border-color .2s; }
.switch span { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch[aria-checked="true"] { background: color-mix(in srgb, var(--finding) 25%, transparent); border-color: color-mix(in srgb, var(--finding) 60%, transparent); }
.switch[aria-checked="true"] span { transform: translateX(16px); background: var(--finding); box-shadow: 0 0 8px var(--finding); }
@media (max-width: 900px) {
  .search-table thead { display: none; }
  .search-table tr:not(.sub-row) { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 0; }
  .search-table tr:not(.sub-row) td { border: 0; padding: 0; text-align: left; }
}
.search-table th + th, .search-table td + td { padding-left: 20px; }
.m-only { display: none; }
@media (max-width: 1180px) { .digest-table .m-only { display: inline; } }
@media (max-width: 900px) { .m-only { display: inline; } .search-table th + th, .search-table td + td { padding-left: 0; } }

/* ---------- Search health: Google Search Console ---------- */
.google { margin-top: 48px; }
.gsc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; padding: 24px 12px; border-top: 1px solid var(--line); }
.gsc-stats div { display: grid; gap: 4px; align-content: start; }
.gsc-stats strong { font-size: 32px; font-weight: 400; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.gsc-stats span { font-size: 13px; color: var(--soft); }
.gsc-stats small { font-size: 12px; color: color-mix(in srgb, var(--us) 70%, #fff); }
.gsc-sub { font-size: 14px; font-weight: 500; color: var(--soft); margin: 8px 12px 10px; }
.gsc-missing { list-style: none; margin: 0 0 16px; padding: 0 12px; display: grid; gap: 10px; }
.gsc-missing li { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 12px; align-items: baseline; font-size: 14px; color: var(--soft); }
.gsc-missing small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.gsc-queries { margin: 0 12px 8px; max-width: 640px; }
.staff-note { color: var(--soft); }
.agentic .gsc-stats strong small { font-size: 14px; color: var(--muted); }
.agentic-issues li { grid-template-columns: 170px minmax(0, 1fr); }
.agentic-issues .tag { justify-self: start; }
@media (max-width: 600px) { .agentic-issues li { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.agentic-issues strong { font-weight: 500; color: var(--ink); }
.agentic-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.agentic-fix { margin-top: 6px; font-size: 13px; }
.agentic-fix summary { cursor: pointer; color: var(--muted); }
.agentic-fix p { margin: 6px 0 0; color: var(--soft); line-height: 1.5; }
.gsc-connect-body { padding: 20px 12px 0; border-top: 1px solid var(--line); display: grid; gap: 16px; max-width: 680px; }
.gsc-connect-body .lede { margin: 0; }
.copy-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--panel); }
.copy-field code { font-size: 13px; color: var(--ink); overflow-wrap: anywhere; flex: 1 1 260px; user-select: all; }

/* ---------- Traffic: detail ---------- */
.table caption.table-note { caption-side: bottom; text-align: left; font-size: 12px; color: var(--muted); padding-top: 10px; }
.speed { margin: 40px 0 8px; }
.speed-body { display: grid; gap: 12px; padding: 20px 12px 8px; border-top: 1px solid var(--line); max-width: 760px; }
.speed-body p { margin: 0; color: var(--soft); max-width: 560px; }
.speed-bar { display: flex; height: 12px; border-radius: 3px; overflow: hidden; gap: 2px; }
.speed-bar i { min-width: 2px; }
.speed .b0, .speed .b1 { background: var(--us); }
.speed .b1 { opacity: .6; }
.speed .b2 { background: var(--you); }
.speed .b3 { background: var(--done); opacity: .8; }
.speed .b4 { background: var(--done); }
.speed-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--muted); }
.speed-legend li { display: inline-flex; align-items: center; gap: 6px; }
.speed-legend b { color: var(--ink); font-weight: 500; }
.speed-legend .swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.table .down { color: color-mix(in srgb, var(--you) 75%, #fff); }

/* ---------- Tracked links ---------- */
.links-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; align-items: start; }
.link-form { display: grid; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--panel); position: sticky; top: 24px; }
.link-form h2 { font-size: 16px; margin: 0; }
.link-form .btn { justify-self: start; }
.link-form .field, .link-form .input { min-width: 0; width: 100%; box-sizing: border-box; }
.link-list { display: grid; gap: 12px; }
.link-card { display: grid; grid-template-columns: 112px minmax(0, 1fr) 96px; gap: 20px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--panel); align-items: start; }
.link-card:target { border-color: var(--us); box-shadow: 0 0 0 1px var(--us); }
.link-qr { width: 112px; height: 112px; border-radius: 6px; background: #fff; }
.link-main { display: grid; gap: 10px; min-width: 0; }
.link-main h3 { margin: 0; font-size: 16px; }
.link-meta { margin: 0; font-size: 12px; color: var(--muted); }
.link-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.link-actions form { margin: 0; }
.link-visits { display: grid; justify-items: end; text-align: right; }
.link-visits strong { font-size: 28px; font-weight: 400; font-variant-numeric: tabular-nums; }
.link-visits span { font-size: 12px; color: var(--muted); }
@media (max-width: 900px) {
  .links-layout { grid-template-columns: minmax(0, 1fr); }
  .link-form { position: static; }
  .link-card { grid-template-columns: 88px minmax(0, 1fr); }
  .link-qr { width: 88px; height: 88px; }
  .link-visits { grid-column: 1 / -1; justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; gap: 6px; align-items: baseline; }
}
.btn-quiet { background: transparent; color: var(--muted); }
.input-sm { height: 32px; padding: 0 10px; font-size: 13px; width: auto; }
.digest-table td { vertical-align: middle; }
.digest-table .path { display: block; }
.digest-table .row-actions { text-align: right; white-space: nowrap; }
.digest-table .row-actions > * { display: inline-flex; vertical-align: middle; }
.digest-table .row-actions > * + * { margin-left: 8px; }
.digest-table .row-actions form { margin: 0; }
.digest-table th + th, .digest-table td + td { padding-left: 20px; }
.digest-table .nowrap, .digest-table th { white-space: nowrap; }
/* Room for "Monthly" and the arrow. */
.digest-table select { min-width: 128px; padding-right: 34px; }
/* Stacks sooner than other tables: the actions alone are about 340px wide. */
@media (max-width: 1180px) {
  .digest-table thead { display: none; }
  .digest-table tr { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .digest-table td { border: 0; padding: 0 !important; }
  .digest-table td:first-child, .digest-table .row-actions { grid-column: 1 / -1; }
  .digest-table .row-actions { text-align: left; }
}

/* ---------- Paperwork ---------- */
.paper-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-bottom: 32px; }
.paper-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--panel); }
.paper-card:target { border-color: var(--us); }
.paper-card h2 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; color: var(--muted); margin: 0 0 12px; }
.paper-card dl { margin: 0; display: grid; gap: 0; }
.paper-card dl > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.paper-card dl > div:first-child { border-top: 0; }
.paper-card dt { color: var(--muted); }
.paper-card dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.paper-card dd small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.paper-card form.inline { display: inline; margin: 0; }
.link-button { background: none; border: 0; padding: 0; margin-top: 4px; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; text-decoration: underline; }
.paper-form { padding: 20px; border: 1px dashed var(--line); border-radius: var(--radius-panel); display: grid; gap: 12px; }
.paper-form h2 { font-size: 16px; margin: 0; }
.paper-form .hint { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.paper-form-row { display: grid; grid-template-columns: 150px 1fr 1.6fr 1fr auto; gap: 12px; align-items: end; }
.paper-form-row .field { min-width: 0; }
.paper-form-row .input { width: 100%; box-sizing: border-box; }
.paper-table .path { display: block; }
.paper-table td { vertical-align: middle; }
@media (max-width: 900px) { .paper-form-row { grid-template-columns: 1fr; } .paper-card dl > div { grid-template-columns: 110px minmax(0, 1fr); } }

/* ---------- Google Business Profile ---------- */
.gbp { margin-top: 32px; }
.gbp .gsc-sub { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.gbp .gsc-sub .icon { width: 16px; height: 16px; color: var(--muted); }
.gbp-contact { margin: 0; display: grid; }
.gbp-contact > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.gbp-contact dt { color: var(--muted); }
.gbp-contact dd { margin: 0; }
.reviews { display: grid; gap: 0; border-top: 1px solid var(--line); }
.review { padding: 18px 12px; border-bottom: 1px solid var(--line); }
.review p { margin: 0; color: var(--soft); max-width: 680px; }
.review .review-head { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.stars { color: var(--you); letter-spacing: 1px; }
.stars .off { color: var(--line); }
.gbp-find { margin-top: 32px; }
.gbp-find-row { grid-template-columns: 1fr auto !important; }
.gbp-candidate { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.gbp-candidate form { margin: 0; }

/* Suggestions: the monthly playbook and each site's weekly review (admin),
   and the approved ones on a client's overview. */
.review .turn-head, .playbook .turn-head { flex-wrap: wrap; }
.review .more-btn { margin-left: auto; }
.review .more-btn form, .review form.button_to { margin: 0 0 0 auto; }
.playbook details, .review details.dropped { border-top: 1px solid var(--line); }
.playbook summary, .review details.dropped summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 0; color: var(--soft); font-size: 14px; }
.playbook summary::-webkit-details-marker, .review details.dropped summary::-webkit-details-marker { display: none; }
.playbook summary .icon, .review details.dropped summary .icon { width: 14px; height: 14px; color: var(--muted); transition: transform .2s; }
.playbook details[open] > summary .icon, .review details.dropped[open] > summary .icon { transform: rotate(90deg); }
.playbook-body { max-width: 72ch; color: var(--soft); font-size: 14px; line-height: 1.65; padding-bottom: 16px; }
.playbook-body h3 { font-size: 15px; color: var(--ink); margin: 20px 0 8px; }
.playbook-body ul { padding-left: 20px; margin: 0 0 12px; }
.playbook-body li { margin-bottom: 6px; }
.playbook-body p { margin: 0 0 12px; }
.playbook-sources { font-size: 12px; color: var(--muted); padding-left: 24px; margin: 0 0 16px; columns: 2 280px; }
.playbook-sources a { color: var(--muted); border-bottom: 1px solid var(--line); }
.playbook-edit textarea, .review-form textarea { width: 100%; height: auto; padding: 12px 14px; line-height: 1.5; }
.review-form textarea { min-height: 0; }
.playbook-edit form { display: grid; gap: 12px; padding-bottom: 16px; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.review-form { display: grid; gap: 16px; }
.suggestion { display: grid; gap: 8px; border: 0; border-top: 1px solid var(--line); padding: 16px 0 0; margin: 0; }
.suggestion .input { width: 100%; }
.suggestion .evidence { font-size: 13px; color: var(--muted); height: 40px; }
.suggestion .who { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--soft); }
.suggestion .who label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.filed { list-style: none; margin: 0 0 8px; padding: 0; }
.filed li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.review details.dropped ul { margin: 0 0 16px; padding-left: 20px; font-size: 13px; color: var(--soft); line-height: 1.6; }
.review .facts { font-size: 11px; line-height: 1.5; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-control); padding: 12px; overflow-x: auto; max-height: 420px; margin: 0 0 16px; }
.index-now { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 12px; } .index-now .icon { width: 12px; height: 12px; }
/* Preview as one control: a label, then Weekly and Monthly, sized like .btn-sm. */
.preview-pair { display: inline-flex; align-items: stretch; height: 32px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--panel); overflow: hidden; font-size: 13px; }
.preview-pair > * { display: inline-flex; align-items: center; padding: 0 12px; }
.preview-pair .preview-label { color: var(--muted); padding-right: 8px; }
.preview-pair a { border-left: 1px solid var(--line); color: var(--soft); transition: background .2s, color .2s; }
.preview-pair a:hover { background: var(--panel2); color: var(--ink); }
.preview-pair a.current { color: var(--ink); }
