/* Flownet app styles.
   One system with the landing page and /demo/: a river of liquid light runs under every page, the
   header sits straight on the river, and the content reads as a pane of paper. The interface stays
   black and white; amber is the only accent. Boxes are square, controls are pills.

   The Content-Security-Policy allows no inline styles, so everything visual lives in this file. */

@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/fonts/manrope.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/fonts/newsreader.woff2") format("woff2"); }

:root {
  --ink: #0b0b0a;
  --paper: #ffffff;
  --sheet: #faf9f6;
  --text: #111111;
  --soft: #5b5954;
  --faint: #73716b;
  --rule: rgba(17, 17, 17, 0.12);
  --edge: rgba(17, 17, 17, 0.48);
  --strong: rgba(17, 17, 17, 0.86);
  --sage: #ecd7aa;
  --amber: #c8913f;
  --amber-ink: #80570f;
  --olive: #56622c;
  --peach: #fbf3e4;
  --red: #9c3218;
  --red-wash: #fbefea;
  --on-river: rgba(255, 255, 255, 0.78);
  --line-river: rgba(255, 255, 255, 0.2);
  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --max: 1160px;
  --pill: 75px;
  --glide: cubic-bezier(0.19, 1, 0.22, 1);
  --ring: 0 0 0 3px rgba(200, 145, 63, 0.42);
  --lift: 0 1px 2px rgba(17, 17, 17, 0.05), 0 12px 32px -12px rgba(17, 17, 17, 0.22);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Room for the sticky top bar above, and the sticky action bar below, when the browser scrolls to a field or an anchor. */
html { -webkit-text-size-adjust: 100%; scroll-padding: 24px 0 104px; }
@media (min-width: 921px) { html { scroll-padding-top: 96px; } }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: underline; text-decoration-color: rgba(17, 17, 17, 0.35); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 0.2s ease, text-decoration-color 0.2s ease; }
a:hover { color: var(--amber-ink); text-decoration-color: currentColor; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
h1, h2 { font-weight: 300; letter-spacing: -0.012em; text-wrap: balance; }
h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; }
h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.2; text-wrap: balance; }
p { text-wrap: pretty; }
em { font-family: var(--serif); font-style: normal; letter-spacing: -0.01em; }
strong { font-weight: 600; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
::selection { background: var(--sage); color: var(--text); }
q { quotes: "“" "”"; }

.skip { position: absolute; left: 16px; top: -64px; z-index: 60; padding: 10px 18px; border-radius: var(--pill); background: var(--paper); color: var(--text); font-size: 14px; text-decoration: none; transition: top 0.2s ease; }
.skip:focus { top: 12px; }

/* The river: one fixed layer under the whole page. It only moves by transform, so it costs no repaint. */
.river { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: #1d1a13; }
.river::before {
  content: ""; position: absolute; inset: -22%;
  background:
    radial-gradient(40% 50% at 22% 28%, rgba(214, 152, 66, 0.72), transparent 62%),
    radial-gradient(46% 56% at 76% 34%, rgba(98, 118, 52, 0.85), transparent 64%),
    radial-gradient(54% 62% at 52% 96%, rgba(126, 42, 26, 0.78), transparent 66%);
}
@media (prefers-reduced-motion: no-preference) { .river::before { animation: drift 40s ease-in-out infinite alternate; } }
@keyframes drift { to { transform: translate3d(5%, -4%, 0) rotate(5deg) scale(1.08); } }

.shell { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: calc(var(--max) + 48px); margin-inline: auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.wrap.narrow { max-width: calc(720px + 48px); }
@media (max-width: 600px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}

/* Top bar */
.top { position: relative; z-index: 30; color: #fff; background: rgba(16, 14, 10, 0.92); border-bottom: 1px solid rgba(255, 255, 255, 0.1); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.top a, .top button { color: inherit; text-decoration: none; }
.top :focus-visible, .vhero :focus-visible, .foot :focus-visible { outline-color: var(--sage); }
.mark { flex: none; font-family: var(--serif); font-size: 24px; letter-spacing: -0.01em; line-height: 1; padding-block: 10px; }
.mark:hover { color: var(--sage); }
.tabs { display: flex; gap: 2px; padding: 4px; margin-inline: auto; border: 1px solid var(--line-river); border-radius: var(--pill); background: rgba(10, 10, 9, 0.45); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 8px 18px; border-radius: var(--pill); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; color: rgba(255, 255, 255, 0.82); transition: background-color 0.6s var(--glide), color 0.3s ease; }
.tabs a:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.tabs a[aria-current="page"] { background: #fff; color: var(--text); }
.acts { display: flex; align-items: center; gap: 8px 18px; flex: none; margin-left: auto; }
.tabs + .acts { margin-left: 0; }
.acts form { margin: 0; display: flex; }
.menu-link { font: inherit; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; background: none; border: 0; padding: 12px 2px; opacity: 0.85; transition: opacity 0.3s ease; }
.menu-link:hover { opacity: 1; color: #fff; }
.me { display: inline-flex; align-items: center; gap: 8px; max-width: 220px; font-size: 13px; padding: 4px 14px 4px 4px; border: 1px solid var(--line-river); border-radius: var(--pill); transition: border-color 0.3s ease, background-color 0.3s ease; }
.me:hover { color: #fff; border-color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.08); }
.me[aria-current="page"] { border-color: #fff; }
.me span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Pinned only where it is a single row; on small screens the space is worth more than the bar. */
@media (min-width: 921px) { .top { position: sticky; top: 0; } }
@media (max-width: 920px) {
  .top .wrap { flex-wrap: wrap; row-gap: 0; padding-block: 8px 10px; }
  .tabs { order: 3; width: 100%; margin: 6px 0 0; }
  .tabs + .acts { margin-left: auto; }
  .tabs a { padding-inline: 14px; letter-spacing: 0.08em; }
}
@media (max-width: 420px) { .me span:last-child { display: none; } .me { padding: 4px; } .tabs a { flex: 1 0 auto; text-align: center; padding-inline: 11px; letter-spacing: 0.05em; } }
@media (pointer: coarse) { .tabs a { padding-block: 13px; } .menu-link { padding-block: 15px; } }

/* Avatar: the creator's initial */
.av { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: #2b2a27; color: #fff; font-family: var(--serif); font-size: 14px; line-height: 1; text-transform: uppercase; }
.top .av { background: var(--sage); color: var(--text); }
.av.lg { width: 64px; height: 64px; font-size: 30px; background: var(--sage); color: var(--text); }

/* Page header: text straight on the river */
.vhero { color: #fff; padding-block: 56px 64px; background: linear-gradient(90deg, rgba(10, 8, 5, 0.5), rgba(10, 8, 5, 0.2) 60%, rgba(10, 8, 5, 0.04)); }
.vhero.compact { padding-block: 40px 46px; }
.vhero a { text-decoration-color: rgba(255, 255, 255, 0.45); }
.vhero a:hover { color: var(--sage); }
.vhero .label { color: rgba(255, 255, 255, 0.84); }
.vhero .label a { text-decoration: none; }
.vhero h1 { font-size: clamp(36px, 5.2vw, 68px); line-height: 1.04; margin-top: 16px; max-width: 15em; overflow-wrap: break-word; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25); }
.vhero.compact h1 { font-size: clamp(30px, 3.8vw, 48px); line-height: 1.1; max-width: 20em; }
.vhero h1 em { color: #e6bd75; background: linear-gradient(100deg, #f6e2b8, #e0a94f 30%, #fff1d2 55%, #d39a46 78%, #f6e2b8); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
@media (prefers-reduced-motion: no-preference) { .vhero h1 em { animation: pour 14s linear infinite; } }
@keyframes pour { to { background-position: 300% 0; } }
.vhero .sub { font-family: var(--serif); font-size: clamp(18px, 1.8vw, 22px); line-height: 1.4; max-width: 34em; margin-top: 18px; color: rgba(255, 255, 255, 0.9); }
.vhero .hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; }
.vhero .hero-row > :first-child { min-width: 0; flex: 1 1 420px; }
.vhero .hero-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.vhero .hero-extra { margin-top: 30px; }
.vhero .chips { margin-top: 22px; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; margin-bottom: 18px; font-size: 13px; color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.back::before { content: "←"; transition: transform 0.4s var(--glide); }
.back:hover { color: #fff; }
.back:hover::before { transform: translateX(-3px); }
@media (max-width: 700px) {
  .vhero { padding-block: 40px 46px; background: linear-gradient(180deg, rgba(8, 8, 8, 0.5), rgba(8, 8, 8, 0.36) 60%, rgba(8, 8, 8, 0.24)); }
  .vhero.compact { padding-block: 30px 36px; }
}

/* The page body: a pane of paper over the river */
main { flex: 1; display: flex; flex-direction: column; }
.paper { flex: 1; background: var(--sheet); padding-block: 48px 96px; }
@media (max-width: 700px) { .paper { padding-block: 32px 72px; } }
.foot { color: var(--on-river); font-size: 13px; background: rgba(8, 8, 8, 0.5); border-top: 1px solid rgba(255, 255, 255, 0.1); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px; padding-block: 26px; padding-bottom: max(26px, env(safe-area-inset-bottom, 0px)); }
.foot a { text-decoration: none; padding-block: 6px; }
.foot a:hover { color: #fff; }
.foot-links { display: flex; gap: 22px; white-space: nowrap; }

/* Text pieces */
.label { display: block; font-size: 11px; line-height: 1.4; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); }
.lede { font-size: 18px; line-height: 1.5; color: var(--soft); max-width: 40em; }
.soft { color: var(--soft); }
.fine { font-size: 13px; line-height: 1.55; color: var(--soft); }
.num { font-variant-numeric: tabular-nums; }
/* :not(:first-child) rather than "* + *", so that a list or box that resets its own margins still keeps the rhythm. */
.stack > :not(:first-child) { margin-top: 20px; }
.stack-lg > :not(:first-child) { margin-top: 56px; }
.row { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.mt { margin-top: 16px; }
.measure { max-width: 680px; }

/* A ruled section: a strong line, a heading, then the content */
.sec { border-top: 1px solid var(--strong); padding-top: 22px; }
.sec > .sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.sec > .sec-head p { font-size: 14px; color: var(--soft); max-width: 34em; }
.sec > .sec-head + .sec-note { margin-top: -12px; margin-bottom: 24px; }
.sec-note { font-size: 15px; color: var(--soft); max-width: 40em; }

/* Two columns: the work on the left, a sticky aside on the right. One column on small screens, aside first. */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
@media (min-width: 1000px) {
  .split { grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; }
  .split > .side { grid-column: 2; grid-row: 1; position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(17, 17, 17, 0.22) transparent; }
  .split > .main { grid-column: 1; grid-row: 1; }
  .split.nav-left { grid-template-columns: 200px minmax(0, 680px); }
  .split.nav-left > .side { grid-column: 1; }
  .split.nav-left > .main { grid-column: 2; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 26px; border: 1px solid var(--strong); border-radius: var(--pill); background: transparent; color: var(--text); font-size: 15px; font-weight: 500; line-height: 1.2; text-decoration: none; white-space: nowrap; touch-action: manipulation; transition: background-color 0.5s var(--glide), color 0.25s ease, border-color 0.25s ease, transform 0.15s ease; }
.btn:hover { background: var(--text); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.solid { background: var(--text); color: #fff; border-color: var(--text); }
.btn.solid:hover { background: #3a3833; border-color: #3a3833; }
.btn.small { min-height: 34px; padding: 6px 16px; font-size: 13px; }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn.danger:hover { background: var(--red); color: #fff; }
.btn.wide { width: 100%; }
.top .btn, .vhero .btn { color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.top .btn:hover, .vhero .btn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.top .btn.solid, .vhero .btn.solid { background: #fff; color: var(--text); border-color: #fff; }
.top .btn.solid:hover, .vhero .btn.solid:hover { background: var(--sage); border-color: var(--sage); color: var(--text); }
.btn[aria-disabled="true"] { opacity: 0.6; cursor: progress; pointer-events: none; }
.btn.is-busy::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-busy::before { animation-duration: 2.4s; } }
@media (pointer: coarse) { .btn.small { min-height: 44px; padding-inline: 20px; } }
.linkbtn { font-size: 14px; background: none; border: 0; padding: 10px 0; color: inherit; text-decoration: underline; text-decoration-color: rgba(17, 17, 17, 0.35); text-underline-offset: 3px; }
.linkbtn:hover { color: var(--amber-ink); }

/* Forms */
form { margin: 0; }
.field { display: block; }
.field > span:first-child, .field-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field > span:first-child i, .field-label i { font-style: normal; font-weight: 400; font-size: 12px; color: var(--soft); }
.field small, .help { display: block; font-size: 13px; line-height: 1.5; color: var(--soft); margin-top: 8px; font-weight: 400; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="date"], input[type="search"], select, textarea {
  display: block; width: 100%; min-height: 46px; padding: 11px 14px; font-size: 16px; line-height: 1.4; color: var(--text);
  background-color: rgba(255, 255, 255, 0.72); border: 1px solid var(--edge); border-radius: 0; -webkit-appearance: none; appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
input:hover, select:hover, textarea:hover { border-color: var(--strong); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--text); background-color: var(--paper); box-shadow: var(--ring); }
::placeholder { color: var(--faint); opacity: 1; }
select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23111' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px; }
textarea { min-height: 104px; resize: vertical; line-height: 1.5; }
textarea.tall { min-height: 300px; font-family: var(--serif); font-size: 18px; padding: 16px; }
.affix { position: relative; display: block; }
.affix::before { content: attr(data-prefix); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--soft); pointer-events: none; }
.affix input { padding-left: 32px; }
.pw { position: relative; display: block; }
.pw input { padding-right: 76px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 38px; padding: 0 12px; border: 0; background: none; font-size: 13px; color: var(--soft); text-decoration: underline; text-underline-offset: 3px; }
.pw-toggle:hover { color: var(--text); }
/* The script adds a character count under these boxes; the margin holds its place until then, so nothing jumps. */
textarea[data-count]:not(.counted) { margin-bottom: 24px; }
.count { display: block; height: 18px; margin-top: 6px; text-align: right; font-size: 12px; line-height: 18px; color: var(--soft); font-variant-numeric: tabular-nums; }
.count.near { color: var(--red); font-weight: 600; }
.form-sm { max-width: 440px; }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; padding-block: 6px; cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--ink); cursor: pointer; }
.check .help { margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 20px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }

/* One option per box, for choices that deserve a sentence each */
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .choices { grid-template-columns: minmax(0, 1fr); } }
.choice { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border: 1px solid var(--rule); background: rgba(255, 255, 255, 0.5); cursor: pointer; transition: border-color 0.2s ease, background-color 0.2s ease; }
.choice:hover { border-color: var(--edge); }
.choice input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); }
.choice strong { display: block; }
.choice span span { display: block; font-size: 13px; line-height: 1.5; color: var(--soft); margin-top: 2px; }
.choice:has(input:checked) { border-color: var(--strong); background: var(--paper); }
.choice:has(input:focus-visible) { box-shadow: var(--ring); }

/* Notices */
.notice { position: relative; border: 1px solid var(--rule); border-left: 2px solid var(--amber); background: rgba(255, 255, 255, 0.7); padding: 14px 18px 14px 48px; font-size: 15px; }
.notice::before { content: "i"; position: absolute; left: 16px; top: 15px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 13px; line-height: 1; color: var(--amber-ink); border: 1px solid currentColor; }
.notice.ok { border-left-color: var(--olive); }
.notice.ok::before { content: "✓"; font-family: var(--sans); font-size: 11px; color: var(--olive); }
.notice.err { border-left-color: var(--red); background: var(--red-wash); }
.notice.err::before { content: "!"; font-family: var(--sans); font-weight: 700; font-size: 12px; color: var(--red); }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.notice li + li { margin-top: 2px; }
.notices > * + * { margin-top: 12px; }
.notices { margin-bottom: 36px; }
.notices:empty { display: none; }

/* Panels, chips, tags */
.panel { background: rgba(255, 255, 255, 0.6); border: 1px solid var(--rule); padding: 24px; }
.panel.quiet { background: none; }
.panel h3 + p, .panel .label + h3 { margin-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1.4; border: 1px solid var(--rule); border-radius: var(--pill); padding: 5px 14px; background: rgba(255, 255, 255, 0.55); color: var(--text); }
.vhero .chip { border-color: rgba(255, 255, 255, 0.3); background: rgba(0, 0, 0, 0.18); color: rgba(255, 255, 255, 0.92); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; line-height: 1.5; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid currentColor; border-radius: var(--pill); padding: 2px 10px; white-space: nowrap; color: var(--soft); }
.tag.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.live, .tag.status-cited, .tag.first-hand { color: var(--olive); }
.tag.warm, .tag.sponsored, .tag.gifted, .tag.affiliate, .tag.status-mentioned { color: var(--amber-ink); background: var(--peach); border-color: var(--amber); }
.tag.bad, .tag.status-error { color: var(--red); }
.vhero .tag { color: rgba(255, 255, 255, 0.86); }
.vhero .tag.live { color: #cfdc9c; }
.vhero .tag.warm, .vhero .tag.sponsored, .vhero .tag.gifted, .vhero .tag.affiliate { color: var(--text); background: var(--sage); border-color: var(--sage); }

/* Record cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 22px; background: rgba(255, 255, 255, 0.6); border: 1px solid var(--rule); text-decoration: none; transition: border-color 0.3s ease, box-shadow 0.5s var(--glide), transform 0.5s var(--glide), background-color 0.3s ease; }
a.card:hover { color: inherit; border-color: var(--strong); background: var(--paper); box-shadow: var(--lift); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { a.card:hover { transform: none; } }
.card .by { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; color: var(--soft); }
.card .by span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card h3 { font-size: 24px; line-height: 1.15; overflow-wrap: break-word; }
.card .verdict-line { font-size: 15px; line-height: 1.5; color: var(--soft); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.card .chips { margin-top: auto; padding-top: 4px; }

/* Empty states: what this place is for, and the one thing to do next */
.empty { border: 1px solid var(--rule); padding: 36px 32px; background: rgba(255, 255, 255, 0.45); }
.empty h2, .empty h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.2; letter-spacing: 0; }
.empty p { color: var(--soft); max-width: 38em; margin-top: 10px; }
.empty ul { margin: 12px 0 0; padding-left: 20px; color: var(--soft); }
.empty li + li { margin-top: 4px; }
.empty .row { margin-top: 22px; }
@media (max-width: 600px) { .empty { padding: 26px 20px; } }

/* Steps: a real sequence, so it gets numbers */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 14px; align-content: start; padding-block: 16px; border-top: 1px solid var(--rule); }
.steps li:first-child { border-top: 0; padding-top: 4px; }
.steps li::before { content: counter(step, decimal-leading-zero); grid-row: 1 / span 2; font-family: var(--serif); font-size: 18px; line-height: 1.35; color: var(--amber-ink); font-variant-numeric: tabular-nums; }
.steps strong { font-weight: 600; }
.steps span { grid-column: 2; font-size: 14px; line-height: 1.5; color: var(--soft); }
.steps.across { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; border-top: 1px solid var(--rule); margin-top: 26px; }
.steps.across li, .steps.across li:first-child { border-top: 0; padding-block: 20px 0; }
@media (max-width: 760px) { .steps.across { grid-template-columns: minmax(0, 1fr); } .steps.across li + li { border-top: 1px solid var(--rule); margin-top: 16px; } }

/* Dashboard: the list of records */
.recs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--strong); }
.rec { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px 28px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.rec:hover .rec-title { color: var(--amber-ink); }
.rec-title { font-family: var(--serif); font-size: 22px; line-height: 1.2; text-decoration: none; overflow-wrap: break-word; }
/* The whole row opens the record; the buttons sit above that. */
.rec-title::after { content: ""; position: absolute; inset: 0; }
.rec-state { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rec-acts { position: relative; z-index: 1; display: flex; gap: 8px; }
.ready { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
progress { -webkit-appearance: none; appearance: none; display: block; width: 72px; height: 4px; border: 0; border-radius: 2px; overflow: hidden; background: rgba(17, 17, 17, 0.12); color: var(--text); }
progress::-webkit-progress-bar { background: rgba(17, 17, 17, 0.12); }
progress::-webkit-progress-value { background: var(--text); }
progress::-moz-progress-bar { background: var(--text); }
progress.done { color: var(--olive); }
progress.done::-webkit-progress-value { background: var(--olive); }
progress.done::-moz-progress-bar { background: var(--olive); }
.ready:has(progress.wide) { display: flex; }
progress.wide { flex: 1; width: auto; min-width: 0; }
@media (max-width: 760px) {
  .rec { grid-template-columns: minmax(0, 1fr) auto; }
  .rec > :first-child { grid-column: 1 / -1; }
}

/* Readiness checks */
.checks { list-style: none; margin: 16px 0 0; padding: 0; font-size: 14px; }
.checks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; padding-block: 9px; border-top: 1px solid var(--rule); }
.checks i { display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; font-style: normal; font-size: 11px; line-height: 1; }
.checks .mark-ok { background: var(--olive); color: #fff; }
.checks .mark-no { border: 1.5px solid var(--red); color: var(--red); font-weight: 700; }
.checks .mark-opt { border: 1.5px dashed var(--faint); }
.checks .why { display: block; font-size: 13px; color: var(--soft); }
.checks .todo { font-weight: 600; }
.checks a { text-decoration: none; }
.checks a:hover { text-decoration: underline; }

/* Review form */
.claim { background: rgba(255, 255, 255, 0.6); border: 1px solid var(--rule); padding: 20px; }
.claim.inferred { border-color: var(--amber); background: var(--peach); }
.claim.new { border-style: dashed; background: none; }
.claim + .claim { margin-top: 14px; }
.claim-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.claim-head .label { color: var(--text); font-weight: 600; }
.claim > .grid2, .claim > .claim-foot { margin-top: 14px; }
.claim .quote { font-size: 14px; line-height: 1.5; color: var(--soft); border-left: 2px solid var(--rule); padding-left: 12px; margin-top: 12px; }
.claim.inferred .quote { border-left-color: var(--amber); }
.claim-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px 20px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--rule); }
.claim-foot .check { font-weight: 600; }
.claim-foot .remove { font-weight: 400; font-size: 14px; color: var(--soft); }
.claim-foot .remove input { accent-color: var(--red); }
.actions { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; margin-top: 40px; padding: 14px 0; padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)); background: var(--sheet); border-top: 1px solid var(--strong); box-shadow: 0 -18px 24px -18px rgba(17, 17, 17, 0.16); }
.actions .fine { flex: 1 1 200px; }
.stack-lg > .actions { margin-top: 40px; }
.stack-lg > .after-actions { margin-top: 8px; }
/* On a phone the checklist above already says what is missing; the bar keeps to its two buttons. */
@media (max-width: 600px) { .actions .fine { display: none; } .actions .row { width: 100%; } .actions .row .btn { flex: 1; padding-inline: 16px; } }
details.source { margin-top: 20px; font-size: 14px; }
details.source summary { cursor: pointer; padding-block: 8px; color: var(--soft); width: fit-content; }
details.source summary:hover { color: var(--text); }
details.source pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.55 var(--sans); color: var(--soft); background: rgba(255, 255, 255, 0.6); border: 1px solid var(--rule); padding: 16px; margin: 8px 0 0; max-height: 320px; overflow: auto; }
details.source > .row { margin-top: 10px; }

/* A place for actions that cannot be undone */
.danger-zone { border: 1px solid rgba(156, 50, 24, 0.4); background: var(--red-wash); padding: 24px; }
.danger-zone h2, .danger-zone h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; letter-spacing: 0; color: var(--red); }

/* Section links beside a long page */
.secnav { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.secnav a { padding: 9px 14px; border-left: 1px solid var(--rule); text-decoration: none; color: var(--soft); }
.secnav a:hover { color: var(--text); border-left-color: var(--strong); }
@media (max-width: 999px) {
  .secnav { flex-direction: row; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .secnav::-webkit-scrollbar { display: none; }
  .secnav a { border: 1px solid var(--rule); border-radius: var(--pill); padding: 8px 16px; white-space: nowrap; background: rgba(255, 255, 255, 0.55); }
}

/* Settings: one row per permission */
.perms { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.perms > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; align-items: start; padding-block: 18px; border-bottom: 1px solid var(--rule); }
.perms p { grid-column: 1; font-size: 13px; line-height: 1.55; color: var(--soft); }
.perms .tag, .perms .toggle { grid-column: 2; grid-row: 1; justify-self: end; }
.perms .toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 30px; }
.perms .toggle input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); cursor: pointer; }

/* Public record page */
.verdict { position: relative; font-family: var(--serif); font-size: clamp(24px, 3.2vw, 34px); line-height: 1.28; letter-spacing: -0.005em; padding-left: 22px; border-left: 2px solid var(--amber); text-wrap: pretty; }
.verdict-by { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-left: 24px; font-size: 14px; color: var(--soft); }
.claims { list-style: none; margin: 0; padding: 0; counter-reset: claim; }
.claims > li { counter-increment: claim; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 12px; padding-block: 20px; border-bottom: 1px solid var(--rule); }
.claims > li::before { content: counter(claim, decimal-leading-zero); font-family: var(--serif); font-size: 18px; line-height: 1.5; color: var(--amber-ink); font-variant-numeric: tabular-nums; }
.claims .text { font-size: 18px; line-height: 1.5; }
.claims .ev { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-top: 10px; font-size: 14px; color: var(--soft); }
.claims .ev, .claims .text { grid-column: 2; }
.prov { display: grid; gap: 10px; padding: 22px 24px; border: 1px solid var(--rule); background: rgba(255, 255, 255, 0.5); font-size: 14px; color: var(--soft); overflow-wrap: anywhere; }
.prov strong { color: var(--text); }

/* Discover */
.searchbar { display: flex; gap: 10px; max-width: 760px; }
.searchbar input { flex: 1; min-width: 0; min-height: 52px; border-radius: var(--pill); padding: 12px 24px; }
.searchbar .btn { min-height: 52px; }
.vhero .searchbar input { color: #fff; background-color: rgba(10, 10, 9, 0.4); border-color: rgba(255, 255, 255, 0.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.vhero .searchbar input[type="search"] { padding-left: 52px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='8.5' cy='8.5' r='5.75' fill='none' stroke='%23fff' stroke-width='1.5'/%3E%3Cpath d='m13 13 4.5 4.5' stroke='%23fff' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 22px center; background-size: 18px 18px; }
.vhero .searchbar input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.vhero .searchbar input::placeholder { color: rgba(255, 255, 255, 0.62); }
.vhero .searchbar input:hover { border-color: rgba(255, 255, 255, 0.8); }
.vhero .searchbar input:focus-visible { border-color: #fff; background-color: rgba(10, 10, 9, 0.6); box-shadow: 0 0 0 3px rgba(236, 215, 170, 0.45); }
.vhero .hint { margin-top: 14px; font-size: 13px; color: rgba(255, 255, 255, 0.84); }
@media (max-width: 520px) { .searchbar { flex-direction: column; } }
.answer ol { list-style: none; margin: 14px 0 0; padding: 0; }
.answer li { padding-block: 16px; border-top: 1px solid var(--rule); }
.answer q { display: block; font-family: var(--serif); font-size: 20px; line-height: 1.35; }
.answer li a { display: inline-block; margin-top: 6px; font-size: 14px; color: var(--soft); }
.answer .fine { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--rule); }
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.results-head p { font-size: 13px; color: var(--soft); max-width: 44em; }

/* AI visibility */
.tracked { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--strong); }
.tracked > li { padding-block: 24px; border-bottom: 1px solid var(--rule); }
.tracked > li > * + * { margin-top: 10px; }
.tracked .q { font-family: var(--serif); font-size: 22px; line-height: 1.25; min-width: 0; flex: 1 1 320px; overflow-wrap: break-word; }
.sources { margin: 10px 0 0; padding-left: 20px; font-size: 14px; }

/* Terms and Privacy */
.legal { font-size: 16px; line-height: 1.65; }
.legal h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; letter-spacing: 0; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--rule); }
.legal h3 { font-family: var(--sans); font-size: 15px; font-weight: 600; margin-top: 24px; }
.legal p, .legal ul { margin-top: 12px; }
.legal ul { padding-left: 22px; }
.legal li + li { margin-top: 8px; }
.legal .lede { margin-top: 0; color: var(--text); }

/* Admin */
a.chip { text-decoration: none; transition: border-color 0.2s ease, background-color 0.2s ease; }
a.chip:hover { color: inherit; border-color: var(--edge); }
.chip.on { background: var(--text); color: #fff; border-color: var(--text); }
.vhero a.chip { padding: 8px 18px; }
.vhero a.chip:hover { color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.vhero .chip.on, .vhero a.chip.on:hover { background: #fff; color: var(--text); border-color: #fff; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 32px; border-top: 1px solid var(--strong); }
.stat { display: flex; flex-direction: column; padding: 20px 0 22px; border-bottom: 1px solid var(--rule); }
.stat strong { font-family: var(--serif); font-size: 44px; font-weight: 400; line-height: 1; margin-block: 10px 8px; font-variant-numeric: tabular-nums; }
.stack > .log-sec { margin-top: 48px; }
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 24px; flex-wrap: wrap; padding-block: 14px; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.tracked .title { font-family: var(--serif); font-size: 21px; line-height: 1.25; text-decoration: none; overflow-wrap: anywhere; }
.tracked a.title:hover { text-decoration: underline; }
.tracked details .row { margin-top: 12px; }
.tracked .row input[type="text"] { flex: 1; min-width: 220px; }
pre.copy { white-space: pre-wrap; word-break: break-all; font: 13px/1.5 var(--mono); background: var(--paper); border: 1px solid var(--rule); padding: 12px 14px; margin: 10px 0 0; -webkit-user-select: all; user-select: all; }
/* A command stays in one piece: it moves to its own line before it breaks. */
.notice code { display: inline-block; max-width: 100%; font: 13px/1.4 var(--mono); background: rgba(17, 17, 17, 0.05); border: 1px solid var(--rule); padding: 1px 6px; overflow-wrap: anywhere; vertical-align: baseline; }

/* An AI model's answer, rendered from Markdown (src/views/markdown.tsx). */
.md { font: 14px/1.6 var(--sans); color: var(--text); background: rgba(255, 255, 255, 0.6); border: 1px solid var(--rule); padding: 16px 18px; margin: 8px 0 0; max-height: 440px; overflow: auto; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md pre, .md .md-table { margin: 10px 0 0; }
.md h4, .md h5 { font-family: var(--sans); font-weight: 700; line-height: 1.3; margin: 20px 0 0; }
.md h4 { font-size: 16px; }
.md h5 { font-size: 14px; }
.md ul, .md ol { padding-left: 22px; }
.md li + li, .md li > ul, .md li > ol { margin-top: 4px; }
.md hr { border: 0; border-top: 1px solid var(--rule); margin: 18px 0 0; }
.md code { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(17, 17, 17, 0.06); padding: 1px 5px; }
.md pre { white-space: pre-wrap; background: rgba(17, 17, 17, 0.04); padding: 12px; }
.md pre code { background: none; padding: 0; }
.md-table { overflow-x: auto; }
.md table { border-collapse: collapse; font-size: 13px; }
.md th, .md td { border: 1px solid var(--rule); padding: 6px 10px; text-align: left; vertical-align: top; }
.md th { font-weight: 700; }
