/* canyoufindme.ai: design system
   Dark only: a deep teal-black base ("Lagoon") with a teal glow in one corner
   and a blue one in the other; solid cards with big radii on top of it; teal
   as the single accent. Glass (backdrop blur) is kept for the chrome: top
   bar, menus, dialogs. Outfit throughout. No build step, no framework.

   Colour is read from the tokens below, never written as a literal in a
   component: --surface for card surfaces, rgb(var(--wash) / a) for surface
   washes, rgb(var(--ink-rgb) / a) for light tints, --primary/--on-primary for
   the main action, --solid/--on-solid for the few inverted surfaces,
   --on-accent for text on the accent, and --ink-coral/--ink-mint/
   --ink-tangerine/--ink-blue for coloured text. */

:root {
  color-scheme: dark;
  --lavender: #0d3538;
  --peach: #1a2a22;
  --pink: #10223a;
  --cream: #0b1316;
  --accent: #35c3c7;
  --accent-ink: #79dcdf;
  --accent-soft: #122f33;
  --accent-soft-2: #183b3f;
  --accent-line: #2b5a5e;
  --ink: #eef5f7;
  --ink-rgb: 238 245 247;
  --text: #c2cfd3;
  --muted: #8d9fa5;
  --placeholder: #86989e;
  --bg: #0b1316;
  --card: #141e22;
  --surface: #141e22;
  --wash: 23 34 39;
  --solid: #eef5f7;
  --solid-hover: #d5e3e7;
  --on-solid: #0b1316;
  --on-accent: #062123;
  --primary: #0c7f83;
  --primary-hover: #0f9095;
  --on-primary: #ffffff;
  --primary-shadow: 0 8px 22px -10px rgba(12,127,131,.7);
  --tile: #17232a;
  --stage: #1a2930;
  --line: #25343a;
  --line-soft: #1c282d;
  --line-strong: #36484f;
  --coral: #ef6b6e;
  --coral-soft: #3b2129;
  --ink-coral: #ff9294;
  --tangerine: #f0894a;
  --tangerine-soft: #3b2a1f;
  --ink-tangerine: #f7a676;
  --mint: #35b38c;
  --mint-soft: #16322a;
  --ink-mint: #62d6b0;
  --rose: var(--coral);
  --rose-soft: var(--coral-soft);
  --amber: var(--tangerine);
  --amber-soft: var(--tangerine-soft);
  --green: var(--mint);
  --green-soft: var(--mint-soft);
  --radius: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 40px -18px rgba(0, 0, 0, 0.6);
  --shadow-tile: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 2px 8px -2px rgba(0, 0, 0, 0.5);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.3), 0 22px 48px -20px rgba(0, 0, 0, 0.7);
  --glow: 0 0 0 1px rgba(53,195,199,.15),0 10px 24px -8px rgba(53,195,199,.4);
  --ring: 0 0 0 4px var(--accent-soft);
  --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
  --glass: rgba(20,30,34,.72);
  --glass-strong: rgba(20,30,34,.85);
  --glass-opaque: rgba(20,30,34,.96);
  --glass-border: rgba(255, 255, 255, 0.07);
  --blur: blur(22px) saturate(1.5);
  --gradient: linear-gradient(135deg, var(--lavender) 0%, var(--cream) 45%, var(--peach) 72%, var(--pink) 100%);
  --gradient-soft: linear-gradient(135deg, rgba(13, 53, 56, 0.7) 0%, rgba(20, 30, 34, 0.7) 50%, rgba(16, 34, 58, 0.7) 100%);
  --font: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --blue: #5b8def;
  --blue-soft: #16253f;
  --ink-blue: #8fb2f7;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh;
  background: var(--cream);
  color: var(--text);
  font: 400 15.5px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 600; letter-spacing: -0.025em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2rem, 3.6vw, 2.8rem); letter-spacing: -0.03em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; letter-spacing: -0.015em; }
p { margin: 0; }
strong { font-weight: 600; color: var(--ink); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.85em; }
.small { font-size: 0.85rem; }
button[disabled] { opacity: 0.55; cursor: default; }
[hidden] { display: none !important; }

/* ---------- foundations: focus, press, wrapping, numbers ---------- */
/* One visible focus ring for everything a keyboard can reach. */
:where(a, button, summary, select, textarea, input, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:where(input[type=text], input[type=email], input[type=password], input[type=search], textarea, select):focus-visible { outline: none; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px;
  background: var(--solid); color: var(--on-solid); text-decoration: none; font-weight: 500; }
.skip-link:focus { top: 12px; }
/* A pressed state on everything clickable, not only buttons. */
.pill:active, .icon-btn:active, .menu a:active, a.list-row:active, a.card:active, .option:active, .af-choice:active { transform: translateY(1px); }
/* Headings break evenly; paragraphs avoid a lone last word. */
h1, h2, h3 { text-wrap: balance; }
p, li, blockquote { text-wrap: pretty; }
/* Numbers that change or get compared line up. */
.num, .score-sm, .ring .num, .tile-value, .delta, .tile-counts, .score-chip, .tier-price, .price, .run-timer, .run-pct span,
.run-step-of, .run-facts strong, .account-run, .stranger-group, .xmap-meta, .xrow-side .prob, .tl-side em, .tl-side time,
.ip-count span, .ip-title .hint, .menu-run-text small, .meta, .tl-kv strong { font-variant-numeric: tabular-nums; }

/* ---------- backdrop ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; background: var(--gradient); overflow: hidden; }
.backdrop i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.75; }
.backdrop i:nth-child(1) { width: 52vw; height: 52vw; left: -14vw; top: -18vw; background: var(--lavender); }
.backdrop i:nth-child(2) { width: 44vw; height: 44vw; right: -10vw; top: 10vh; background: var(--pink); }
.backdrop i:nth-child(3) { width: 48vw; height: 48vw; left: 22vw; bottom: -26vw; background: var(--peach); }

/* content sits on solid surfaces; only the chrome (things that float over
   content: bars, menus, dialogs) is frosted glass */
.card, .list-row, .post, .option, .claim, .finding, .lead, .tile, .bubble, .empty, .notice, .flashes li,
.af-clues li, .af-choice, .dbg-turns li {
  background: var(--surface); border: 1px solid rgb(var(--ink-rgb) / 0.05);
}
.glass, .menu, .lightbox, .sticky-bar .inner, .run-timer, .xmap-tools, .switcher {
  background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
}

.app { max-width: 1240px; margin: 0 auto; padding: 14px 24px 0; min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 12px; z-index: 30; display: flex; align-items: center; gap: 4px; padding: 7px 7px 7px 14px;
  border-radius: 999px; background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow-card); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; letter-spacing: -0.02em; flex: none; margin-right: 14px; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #ffffff; flex: none; }
.brand-name { font-size: 1.06rem; letter-spacing: -0.03em; }
.brand-name em { font-style: normal; color: var(--accent); }
.nav { display: flex; gap: 2px; }
.nav a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; text-decoration: none;
  color: var(--text); font-weight: 500; font-size: 0.94rem; transition: background 0.15s, color 0.15s; }
.nav a:hover { background: rgb(var(--wash) / 0.7); color: var(--ink); }
.nav a.active { background: var(--primary); color: var(--on-primary); }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.btn .label { color: inherit; font: inherit; }
.account { position: relative; }
.account > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; height: 40px;
  background: rgb(var(--wash) / 0.55); border: 1px solid var(--glass-border); border-radius: 999px; padding: 0 12px 0 1px; }
.account > summary::-webkit-details-marker { display: none; }
.account > summary:hover { background: rgb(var(--wash) / 0.85); }
/* the ring around the avatar: spins while an audit runs, turns mint when its report is ready */
.avatar-ring { position: relative; width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; }
.avatar-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: 0; transition: opacity 0.3s;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px)); }
.account.is-busy .avatar-ring::before { opacity: 1; background: conic-gradient(from 0deg, rgba(53, 195, 199, 0) 0 20%, var(--accent) 100%);
  animation: spin 1.1s linear infinite; }
.account.is-ready .avatar-ring::before { opacity: 1; background: var(--mint); }
.account.is-failed .avatar-ring::before { opacity: 1; background: var(--coral); }
.account.is-ready .avatar-ring::after, .account.is-failed .avatar-ring::after { content: ""; position: absolute; right: -1px; top: -1px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 2px var(--surface); }
.account.is-failed .avatar-ring::after { background: var(--coral); }
.account-run { color: var(--accent-ink); font-weight: 500; }
.account.is-ready .account-run { color: var(--ink-mint); }
.account.is-failed .account-run { color: var(--ink-coral); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--gradient); color: var(--ink); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.account-text { display: grid; line-height: 1.2; min-width: 0; }
.account-text strong { font-size: 0.84rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.account-text small { font-size: 0.7rem; color: var(--muted); }
.account .chev { color: var(--muted); transition: transform 0.15s; }
.account[open] .chev { transform: rotate(180deg); }
/* menus open inside an already-frosted bar, where a nested blur can't reach the page, so they are near opaque */
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 210px; background: var(--glass-opaque);
  border-radius: 18px; box-shadow: var(--shadow-lift); padding: 6px; display: grid; }
.menu-head { padding: 8px 12px 10px; font-size: 0.8rem; color: var(--muted); border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.menu-head strong { display: block; font-size: 0.86rem; }
.menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); font-size: 0.9rem; }
.menu a:hover { background: var(--accent-soft); color: var(--accent-ink); }
.menu a.is-current { background: rgb(var(--ink-rgb) / 0.06); }
.menu a svg { color: var(--muted); flex: none; }
.menu a:hover svg { color: inherit; }
.menu a .badge { margin-left: auto; }
.account .menu { min-width: 290px; }
.menu-form { margin: 0 0 4px; }
.menu-form button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px;
  background: none; font: 400 0.9rem var(--font); color: var(--text); cursor: pointer; text-align: left; }
.menu-form button svg { color: var(--muted); }
.menu-form button:hover { background: var(--coral-soft); color: var(--ink-coral); }
.menu-form button:hover svg { color: inherit; }
.menu-form-plain { margin: 0; }
.menu-form-plain button { color: var(--ink); }
.menu-form-plain button:hover { background: var(--accent-soft); color: var(--accent-ink); }
.menu a.menu-run { gap: 12px; padding: 12px; margin-bottom: 4px; background: var(--accent-soft); border-radius: 14px; }
.menu a.menu-run:hover { background: var(--accent-soft-2); color: var(--ink); }
.menu-run-icon { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.menu a.menu-run .menu-run-icon svg { color: var(--mint); }
.menu-run-text { flex: 1; min-width: 0; display: grid; gap: 1px; line-height: 1.3; }
.menu-run-text strong { font-size: 0.88rem; }
.menu-run-text small { font-size: 0.76rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-run-bar { height: 4px; border-radius: 99px; background: rgba(53, 195, 199, 0.18); overflow: hidden; margin-top: 5px; }
.menu-run-bar i { display: block; height: 100%; width: calc(var(--p, 0) * 1%); border-radius: 99px; background: var(--accent); transition: width 0.6s ease; }
.menu a.menu-run .menu-run-go svg { color: var(--accent); }
.account.is-ready .menu a.menu-run { background: var(--mint-soft); }
.account.is-ready .menu-run-bar i { background: var(--mint); }
.account.is-failed .menu a.menu-run { background: var(--coral-soft); }
.menu.wide { min-width: 340px; max-height: 340px; overflow: auto; }
.menu .menu-text { flex: 1; min-width: 0; line-height: 1.3; }
.menu .menu-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--muted); margin-bottom: 14px; min-width: 0; }
.crumbs:empty { display: none; }
.crumbs a { text-decoration: none; color: var(--muted); white-space: nowrap; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: rgb(var(--ink-rgb) / 0.25); }
.crumbs .is-current { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* audit switcher (results header) */
.switcher { display: flex; align-items: center; gap: 2px; border-radius: 999px; padding: 3px; position: relative; }
.switcher .icon-btn { width: 34px; height: 34px; color: var(--text); }
.switcher .icon-btn:hover { background: var(--accent-soft); color: var(--accent-ink); }
.switcher .icon-btn.is-off { opacity: 0.3; pointer-events: none; }
.switcher details { position: relative; }
.switcher summary { list-style: none; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px;
  font-size: 0.86rem; font-weight: 500; color: var(--ink); cursor: pointer; white-space: nowrap; }
.switcher summary::-webkit-details-marker { display: none; }
.switcher summary:hover { background: rgb(var(--wash) / 0.7); }
.switcher summary .chev { color: var(--muted); }
.switcher .menu { left: 50%; right: auto; transform: translateX(-50%); }
.switcher .menu a { font-size: 0.86rem; padding: 8px 12px 8px 8px; }
.switcher .menu a small { color: var(--muted); }

/* ---------- layout ---------- */
main { min-width: 0; width: 100%; padding: 26px 0 64px; }
body.is-public main { padding: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; position: relative; z-index: 5; }
.page-head p { margin-top: 10px; max-width: 60ch; font-size: 1.02rem; }
.page-head .row { flex: none; }
.eyebrow { font-size: 0.74rem; font-weight: 600; color: var(--accent); margin-bottom: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 36px 0 14px; flex-wrap: wrap; }
.section-title h2 { font-size: 1.25rem; }
.bento { display: grid; gap: 18px; }
.bento > * { min-width: 0; }
.bento-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bento-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bento-wide { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.bento-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .bento-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .bento-4 { grid-template-columns: 1fr; } }
@media (max-width: 880px) { .bento-2, .bento-3, .bento-wide { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }

/* ---------- cards ---------- */
.card {
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 14px; display: flex; flex-direction: column;
}
a.card { text-decoration: none; color: inherit; transition: box-shadow 0.2s, transform 0.2s; }
a.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.card-body { padding: 18px 12px 10px; }
.card-body h3 + p, .card-body h2 + p, .card-body .row + p { margin-top: 8px; }
.card-pad { padding: 26px; }

/* the inset panel holding each card's visual */
.stage {
  position: relative; overflow: hidden;
  background: rgb(var(--wash) / 0.45);
  border: 1px solid rgb(var(--wash) / 0.5);
  border-radius: var(--radius-md);
  min-height: 190px; padding: 20px;
  display: grid; place-items: center;
}
.stage.plain { background: rgb(var(--wash) / 0.35); }
.stage.compact { min-height: 150px; }
.stage.tall { min-height: 240px; }
.stage img.illustration, .hero-illustration, .plan-illustration { width: 100%; max-width: 280px; height: auto; display: block; }
.stage .bubble[hidden] { display: none; }
.stage.tone-mint { background: linear-gradient(135deg, rgba(53, 179, 140, 0.22), rgb(var(--wash) / 0.4) 70%); }
.stage.tone-violet { background: linear-gradient(135deg, rgba(53, 195, 199, 0.22), rgb(var(--wash) / 0.4) 70%); }
.stage.tone-blue { background: linear-gradient(135deg, rgba(91, 141, 239, 0.24), rgb(var(--wash) / 0.4) 70%); }
.stage.tone-tangerine { background: linear-gradient(135deg, rgba(240, 137, 74, 0.24), rgb(var(--wash) / 0.4) 70%); }
.stage.tone-coral { background: linear-gradient(135deg, rgba(239, 107, 110, 0.24), rgb(var(--wash) / 0.4) 70%); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; width: 100%; }
.tile {
  border-radius: var(--radius-sm); box-shadow: var(--shadow-tile);
  padding: 18px 10px 14px; display: grid; justify-items: center; gap: 10px; text-align: center;
  font-size: 0.85rem; color: var(--text); text-decoration: none; transition: transform 0.15s, box-shadow 0.15s;
}
a.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.tile .tile-label { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-weight: 500; }
.tile .num { font-size: 1.5rem; font-weight: 600; color: var(--ink); line-height: 1; }

.bubble {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  color: var(--accent); box-shadow: var(--shadow-tile);
}
.bubble.lg { width: 72px; height: 72px; }
.bubble.solid { background: var(--accent); color: var(--on-accent); box-shadow: var(--glow); border: 0; }
.bubble.ink { background: var(--solid); color: var(--on-solid); border: 0; }
.bubble.quiet { color: var(--muted); }
.bubble.mint { background: var(--mint-soft); color: var(--mint); box-shadow: none; }
.bubble.coral { background: var(--coral-soft); color: var(--coral); box-shadow: none; }
.bubble.tangerine { background: var(--tangerine-soft); color: var(--tangerine); box-shadow: none; }
.bubble.violet { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.bubble.blue { background: var(--blue-soft); color: var(--blue); box-shadow: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  font: 500 0.94rem var(--font); padding: 0 22px; height: 44px; white-space: nowrap;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease, color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 0; box-shadow: var(--ring); }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--primary-shadow); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); border: 1px solid rgb(var(--ink-rgb) / 0.08); color: var(--ink); box-shadow: var(--shadow-tile); }
.btn-secondary:hover { box-shadow: var(--shadow-lift); }
.btn-quiet { background: transparent; color: var(--text); }
.btn-quiet:hover { background: rgb(var(--ink-rgb) / 0.05); color: var(--ink); }
.btn-lg { height: 52px; padding: 0 28px; font-size: 1rem; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 0.84rem; }
.btn:disabled, .btn[disabled] { opacity: 0.6; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-secondary:disabled, .btn-secondary[disabled] { background: rgb(var(--ink-rgb) / 0.06); border-color: transparent; color: var(--muted); opacity: 1; backdrop-filter: none; }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent-soft); color: var(--accent-ink); text-decoration: none; border: 0; cursor: pointer;
  font: 500 0.76rem var(--font); padding: 5px 12px; border-radius: 999px;
}
.pill:hover { background: var(--accent); color: var(--on-accent); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: transparent; color: var(--muted);
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent-ink); }
.icon-btn.danger:hover { background: var(--coral-soft); color: var(--coral); }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.76rem; font-weight: 500; padding: 4px 11px; border-radius: 999px;
  background: var(--line-soft); color: var(--text); white-space: nowrap;
}
/* a dot only where it means a live state (e.g. an import still collecting) */
.badge.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.risk-high, .status-supported, .state-error { background: var(--coral-soft); color: var(--ink-coral); }
.risk-medium, .status-contradicted, .state-stopped { background: var(--tangerine-soft); color: var(--ink-tangerine); }
.risk-low, .state-done, .state-ready, .state-ok { background: var(--mint-soft); color: var(--ink-mint); }
.risk-none, .status-unverifiable, .state-discarded { background: var(--line-soft); color: var(--muted); }
.state-collecting, .state-info { background: var(--accent-soft); color: var(--accent-ink); }
.lv-hidden { background: var(--mint-soft); color: var(--ink-mint); }
.lv-traceable { background: var(--blue-soft); color: var(--ink-blue); }
.lv-recognisable { background: var(--tangerine-soft); color: var(--ink-tangerine); }
.lv-identified { background: var(--coral-soft); color: var(--ink-coral); }

/* ---------- notices ---------- */
.flashes { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; }
.flashes li { max-width: 80ch; }
.notice, .flashes li {
  border-radius: 18px; box-shadow: var(--shadow-tile);
  padding: 13px 18px; font-size: 0.92rem; color: var(--ink);
  display: flex; gap: 12px; align-items: flex-start;
}
/* No stripe along the edge (it would bend with the corner): a message's kind
   shows in the icon's round tinted badge; the card itself stays neutral.
   Notices without an icon (errors under a form, an import that failed) keep a tinted surface instead. */
.flashes li > svg, .notice > svg:first-child { flex: none; box-sizing: content-box; padding: 6px; border-radius: 50%; margin: -3px 0; }
.flashes li.is-error > svg { background: var(--coral-soft); color: var(--ink-coral); }
.flashes li.is-warn > svg { background: var(--tangerine-soft); color: var(--ink-tangerine); }
.flashes li.is-ok > svg, .notice.ok > svg:first-child { background: var(--mint-soft); color: var(--ink-mint); }
.notice.warn { background: var(--tangerine-soft); }
.notice.bad { background: var(--coral-soft); }
.notice a { color: var(--accent-ink); font-weight: 500; }

/* ---------- forms ---------- */
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field > label, .label { font-size: 0.86rem; font-weight: 500; color: var(--ink); }
.hint { font-size: 0.82rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=search], textarea, select {
  width: 100%; padding: 12px 18px;
  border: 1px solid rgb(var(--ink-rgb) / 0.12); border-radius: 999px;
  background: rgb(var(--wash) / 0.75); color: var(--ink);
  font: 400 0.95rem var(--font);
  transition: box-shadow 0.15s ease, border-color 0.15s;
}
input:focus, textarea:focus, select:focus { outline: 0; border-color: var(--accent); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
textarea { resize: vertical; min-height: 150px; line-height: 1.55; border-radius: var(--radius-md); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; margin: 10px 0; cursor: pointer; color: var(--text); }
.check input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--accent); }


.file-drop {
  display: grid; justify-items: center; gap: 10px; text-align: center; cursor: pointer;
  padding: 26px 18px; border-radius: var(--radius-md);
  background: var(--surface); border: 1.5px dashed var(--line); color: var(--text); font-size: 0.9rem;
}
.file-drop:hover { border-color: var(--accent-line); }
.file-drop input[type=file] { font: 400 0.82rem var(--font); color: var(--muted); max-width: 100%; }

.copy-field { display: flex; gap: 6px; align-items: center; background: var(--surface); border-radius: 999px; border: 1px solid var(--line); padding: 4px 4px 4px 14px; }
.copy-field code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 0.8rem var(--mono); color: var(--ink); }

details.setup { margin-top: 12px; }
details.setup summary { cursor: pointer; font-size: 0.86rem; color: var(--accent-ink); list-style: none; font-weight: 500; }
details.setup summary::-webkit-details-marker { display: none; }
details.setup ol { margin: 12px 0; padding-left: 20px; display: grid; gap: 6px; font-size: 0.86rem; }
.env { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.env code { font: 0.74rem var(--mono); background: var(--line-soft); color: var(--ink); padding: 3px 8px; border-radius: 999px; }

/* option list (pick one of several, the quiz look) */
.options { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.option { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 999px;
  box-shadow: var(--shadow-tile); color: var(--ink); text-decoration: none; cursor: pointer; transition: box-shadow 0.15s, transform 0.15s; }
.option:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.option .radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; transition: border-color 0.15s, background 0.15s; }
.option .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); opacity: 0; }
.option:hover .radio { border-color: var(--accent); }
.option .bubble { width: 40px; height: 40px; }
.option .option-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.option .option-text strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.option .option-text small { color: var(--muted); font-size: 0.82rem; }
.option .end { flex: none; }

/* segmented progress (the quiz header) */
.segments { display: flex; gap: 6px; }
.segments i { flex: 1; height: 5px; border-radius: 99px; background: var(--line); transition: background 0.3s; }
.segments i.is-done { background: var(--solid); }
.segments i.is-active { background: var(--accent); }
.segments i.is-error { background: var(--coral); }

/* ---------- lists ---------- */
.list { display: grid; gap: 10px; }
.list-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 14px 20px 14px 14px; text-decoration: none; color: inherit;
  border-radius: 22px; box-shadow: var(--shadow-tile); transition: box-shadow 0.15s, transform 0.15s;
}
a.list-row:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.list-row .row { flex-wrap: nowrap; min-width: 0; }
.list-row .row > div { min-width: 0; }
.list-row .title { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .meta { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.list-row .end { display: flex; align-items: center; gap: 14px; }
.list-row .bubble { width: 42px; height: 42px; }
.score-sm { font-size: 1.1rem; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; min-width: 2.2em; text-align: right; }

.post { padding: 18px 16px 18px 22px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start;
  border-radius: 22px; box-shadow: var(--shadow-tile); }
.post p { color: var(--ink); overflow-wrap: anywhere; max-width: 70ch; }
.post .meta { font-size: 0.8rem; color: var(--muted); margin-top: 8px; }

/* ---------- empty ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.empty h3 { margin-bottom: 6px; }

/* ---------- score ring ---------- */
.ring { --val: 0; --ring-color: var(--accent); position: relative; width: 84px; height: 84px; flex: none; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-disc { fill: var(--ring-color); opacity: 0.12; }
.ring-track { fill: none; stroke: rgb(var(--ink-rgb) / 0.1); stroke-width: 8; }
.ring-fill { fill: none; stroke: var(--ring-color); stroke-width: 8; stroke-linecap: round;
  stroke-dasharray: var(--val) 100; transition: stroke-dasharray 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.ring.is-zero .ring-fill { display: none; }
.ring-text { position: relative; text-align: center; line-height: 1; }
.ring .num { display: block; font-size: 1.55rem; font-weight: 600; letter-spacing: -0.04em; color: var(--ink); }
.ring .den { display: block; font-size: 0.6rem; color: var(--muted); margin-top: 3px; letter-spacing: 0.02em; }
.ring.lg { width: 150px; height: 150px; }
.ring.lg .num { font-size: 2.8rem; }
.ring.lg .den { font-size: 0.74rem; margin-top: 5px; }
.ring.sm { width: 52px; height: 52px; }
.ring.sm .num { font-size: 1rem; }
.ring.sm .den { display: none; }
.tone-mint .ring, .ring.tone-mint { --ring-color: var(--mint); }
.tone-violet .ring, .ring.tone-violet { --ring-color: var(--accent); }
.tone-blue .ring, .ring.tone-blue { --ring-color: var(--blue); }
.tone-tangerine .ring, .ring.tone-tangerine { --ring-color: var(--tangerine); }
.tone-coral .ring, .ring.tone-coral { --ring-color: var(--coral); }
.risk-tone-high { --ring-color: var(--coral); } .risk-tone-medium { --ring-color: var(--tangerine); } .risk-tone-low { --ring-color: var(--mint); }

/* score meter (4 corroborated claims = 100) */
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; max-width: 280px; }
.meter span { height: 6px; border-radius: 99px; background: rgb(var(--ink-rgb) / 0.08); }
.meter span.on { background: var(--accent); }

/* decorative "document" lines, echoing the posts being read */
.lines { width: 100%; max-width: 320px; display: grid; gap: 10px; }
.lines span { height: 8px; border-radius: 99px; background: rgb(var(--wash) / 0.8); }
.lines span.hi { background: var(--accent); }

/* ---------- claims ---------- */
.claim, .finding, .lead { padding: 18px 22px; border-radius: 22px; box-shadow: var(--shadow-tile); }
.claim-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.claim-head p { color: var(--ink); }
.claim-head > div { min-width: 0; }
.lead-verdicts { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: none; }
.factors { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.factor { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--line-soft); font-size: 0.76rem; color: var(--text); }
.factor em { font-style: normal; color: var(--muted); }
.factor-contradiction { background: var(--coral-soft); color: var(--ink-coral); }
.factor-hard-link { background: var(--accent-soft); color: var(--accent-ink); }
.evidence { margin-top: 10px; display: grid; gap: 8px; }
.evidence a { font: 0.78rem var(--mono); color: var(--accent-ink); text-decoration: none; overflow-wrap: anywhere; }
.evidence a:hover { text-decoration: underline; }
.evidence blockquote { margin: 4px 0 0; padding: 10px 14px; background: rgb(var(--wash) / 0.45); border-radius: 14px; font-size: 0.86rem; color: var(--text); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 12px 6px; color: var(--ink); }
.steps li::before {
  content: counter(step); width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.78rem; font-weight: 600;
  background: var(--solid); color: var(--on-solid);
}

/* ---------- progress ---------- */
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 0.9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 5px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; width: 30%; background: var(--accent); border-radius: 99px; animation: slide 1.3s ease-in-out infinite; }
@keyframes slide { from { margin-left: -30%; } to { margin-left: 100%; } }

/* ---------- auth (public pages) ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-box { width: 100%; max-width: 470px; display: grid; gap: 16px; justify-items: center; text-align: center; }
.auth-brand { margin: 0 0 6px; }
.auth-brand .brand-mark { width: 60px; height: 60px; box-shadow: 0 16px 36px -14px rgba(20, 19, 23, 0.6); }
.auth-brand .brand-name { font-size: 1.2rem; }
.auth h1 { font-size: clamp(2.1rem, 5vw, 2.8rem); line-height: 1.02; letter-spacing: -0.04em; }
.auth h1 em { font-style: normal; color: var(--accent-ink); }
.auth .lede { color: var(--text); max-width: 40ch; font-size: 1.02rem; }
.auth-card { width: 100%; padding: 26px 26px 22px; text-align: left; margin-top: 8px; }
.auth-card .btn { width: 100%; margin-top: 4px; }
.auth-card .flashes { margin-bottom: 16px; }
.recovery-key { display: block; margin: 14px 0 10px; padding: 14px 16px; border-radius: 12px; background: rgb(var(--ink-rgb) / 0.06);
  font: 600 1.02rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.04em; color: var(--ink); word-break: break-word; user-select: all; }
.recovery-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.auth-card .recovery-actions .btn { width: auto; margin: 0; }
.auth-card .field:last-of-type { margin-bottom: 20px; }
.auth-foot { font-size: 0.92rem; color: var(--text); }
.auth-foot a { color: var(--accent-ink); text-decoration: none; font-weight: 500; }
.auth-points { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-size: 0.82rem; color: var(--text); }
.auth-points li { display: inline-flex; align-items: center; gap: 6px; }
.auth-points svg { color: var(--mint); flex: none; }
.auth .flashes { width: 100%; max-width: 470px; margin: 0 auto 16px; }
/* sign in / sign up: the pitch and the illustration beside the form */
.auth-unlock { min-height: 60vh; }
.auth-split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; padding: 20px; place-items: stretch; align-items: stretch; }
.auth-panel { position: relative; overflow: hidden; border-radius: 32px; padding: 34px 36px; display: flex; flex-direction: column; gap: 22px;
  background: rgb(var(--wash) / 0.34); border: 1px solid var(--glass-border); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow-card); }
.auth-panel .auth-brand { margin: 0; align-self: flex-start; }
.auth-panel .auth-brand .brand-mark { width: 44px; height: 44px; }
.auth-pitch { margin-top: auto; }
.auth-pitch h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); line-height: 1.05; letter-spacing: -0.04em; }
.auth-pitch h2 em { font-style: normal; color: var(--accent-ink); }
.auth-pitch p { margin-top: 12px; max-width: 44ch; font-size: 1.02rem; }
.auth-art { width: 100%; max-width: 520px; height: auto; align-self: center; margin: auto 0; }
.auth-panel .auth-points { justify-content: flex-start; margin: 0; }
.auth-split .auth-box { align-self: center; justify-self: center; justify-items: stretch; text-align: left; max-width: 420px; padding: 24px 4px; }
.auth-split .auth-box h1 { font-size: clamp(2rem, 3.4vw, 2.5rem); }
.auth-split .auth-card { margin-top: 10px; }
.auth-split .auth-foot { text-align: center; }
.auth-mobile-brand { display: none; }
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; padding: 12px; gap: 8px; }
  .auth-panel { display: none; }
  .auth-mobile-brand { display: flex; justify-self: center; }
  .auth-split .auth-box { text-align: center; }
}

/* ---------- landing (templates/landing.html) ----------
   Question, hook, steps, pricing. Built to the design-taste-frontend rules:
   hero of four elements, one sign-up label, no two sections alike. */
.ld { max-width: 1180px; margin: 0 auto; padding: 16px 24px 0; }
.ld-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 7px 7px 14px; border-radius: 999px;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-border); box-shadow: var(--shadow-card); }
.ld-nav nav { display: flex; gap: 6px; align-items: center; }
.ld h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1.05; letter-spacing: -0.04em; }

/* 1. the question: a violet-tinted card, text left, picture right */
.ld-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center;
  margin: 28px 0 0; padding: 44px 40px 44px 52px; background: linear-gradient(135deg, rgba(53, 195, 199, 0.16), var(--glass-strong) 58%); }
.ld-hero h1 { font-size: clamp(2.6rem, 4.6vw, 4rem); line-height: 1.04; letter-spacing: -0.045em; max-width: 14ch; }
.ld-hero-text p { margin-top: 22px; font-size: 1.16rem; line-height: 1.55; max-width: 32ch; color: var(--text); }
.ld-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 34px; }
.ld-hero-art img { display: block; width: 100%; max-width: 660px; height: auto; margin-left: auto; }

/* 2. the hook: ordinary posts and what each gives away (4 items, 4 cells) */
.ld-hook { padding: 104px 0 40px; }
.ld-hook > p, .ld-pricing-head p { margin-top: 16px; font-size: 1.1rem; max-width: 46ch; }
.ld-bento { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "work place" "work pet" "name name";
  gap: 16px; margin-top: 36px; }
.ld-cell { border-radius: var(--radius); padding: 26px 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px;
  border: 1px solid var(--glass-border); box-shadow: var(--shadow-card); }
.ld-cell blockquote { margin: 0; color: var(--ink); font-size: 1.15rem; line-height: 1.4; letter-spacing: -0.01em; font-weight: 500; }
.ld-reveal { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; font-weight: 500; }
.ld-reveal-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgb(var(--wash) / 0.75); flex: none; }
.b-work { grid-area: work; background: linear-gradient(160deg, rgba(91, 141, 239, 0.22), var(--glass-strong) 70%); }
.b-work blockquote { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.25; letter-spacing: -0.025em; }
.b-work .ld-reveal { color: var(--ink-blue); }
.b-place { grid-area: place; background: linear-gradient(160deg, rgba(240, 137, 74, 0.2), var(--glass-strong) 70%); }
.b-place .ld-reveal { color: var(--ink-tangerine); }
.b-pet { grid-area: pet; background: linear-gradient(160deg, rgba(53, 179, 140, 0.2), var(--glass-strong) 70%); }
.b-pet .ld-reveal { color: var(--ink-mint); }
.b-name { grid-area: name; flex-direction: row; align-items: center; background: linear-gradient(100deg, rgba(239, 107, 110, 0.18), var(--glass-strong) 60%); }
.b-name .ld-reveal { color: var(--ink-coral); flex: none; }

/* 3. three steps on one line, no boxes */
.ld-steps { padding: 96px 0 40px; }
.ld-steps ol { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; position: relative; }
.ld-steps ol::before { content: ""; position: absolute; top: 26px; left: 26px; right: 16%; border-top: 2px dashed rgba(53, 195, 199, 0.35); }
.ld-steps li { position: relative; }
.ld-step-icon { position: relative; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); box-shadow: var(--glow); }
.ld-steps h3 { margin-top: 22px; font-size: 1.2rem; }
.ld-steps li p { margin-top: 8px; font-size: 0.98rem; max-width: 30ch; }

/* 4. pricing: Free, and Pro a little wider and tinted */
.ld-pricing { padding: 96px 0 24px; }
.ld-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 56px 4px 36px; font-size: 0.84rem; color: var(--muted); }
.ld-foot .brand-mark { width: 30px; height: 30px; }

@media (max-width: 900px) {
  .ld { padding: 10px 12px 0; }
  .ld-hero { grid-template-columns: 1fr; gap: 24px; padding: 28px 22px; }
  .ld-hero h1 { max-width: none; }
  .ld-hero-art img { margin: 0 auto; max-width: 480px; }
  .ld-hook, .ld-steps, .ld-pricing { padding-top: 64px; }
  .ld-bento { grid-template-columns: 1fr; grid-template-areas: "work" "place" "pet" "name"; }
  .b-name { flex-direction: column; align-items: flex-start; }
  .ld-steps ol { grid-template-columns: 1fr; gap: 28px; }
  .ld-steps ol::before { top: 26px; bottom: 26px; left: 25px; right: auto; border-top: 0; border-left: 2px dashed rgba(53, 195, 199, 0.35); }
  .ld-steps li { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 18px; }
  .ld-steps li .ld-step-icon { grid-row: span 2; }
  .ld-steps h3 { margin-top: 4px; }
  .ld-nav .brand, .ld-foot .brand { gap: 10px; margin-right: 0; }
  .ld-nav .brand-name { display: inline; }
}
@media (max-width: 480px) { .ld-nav .btn-quiet { display: none; } }

/* ---------- legal pages ---------- */
.legal { max-width: 68ch; margin: 0 auto; padding: 40px 20px 24px; }
.legal-back { display: inline-block; margin-bottom: 28px; color: var(--muted); text-decoration: none; font-weight: 500; }
.legal-back:hover { color: var(--ink); }
.legal h2 { font-size: 1.2rem; margin: 32px 0 8px; }
.legal p, .legal li { font-size: 1rem; line-height: 1.65; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; display: grid; gap: 8px; margin: 8px 0 0; }
.legal-updated { margin: 8px 0 24px; font-size: 0.86rem !important; color: var(--muted); }
.legal a { color: var(--accent-ink); }

/* ---------- plans ---------- */
.price { font-size: 2.6rem; font-weight: 600; color: var(--ink); letter-spacing: -0.04em; margin: 14px 0 4px; line-height: 1; }
.price small { font-size: 0.95rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.ticks { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; font-size: 0.92rem; }
.ticks li { display: flex; gap: 10px; align-items: center; }
.ticks svg { color: var(--mint); flex: none; background: var(--mint-soft); border-radius: 50%; padding: 3px; box-sizing: content-box; }
.card.is-recommended { box-shadow: 0 0 0 2px var(--accent), var(--shadow-lift); }

footer.site { display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 18px 4px 28px; font-size: 0.82rem; color: var(--muted); }
footer.site.public { padding: 4px 36px 24px; }
footer.site nav, .ld-foot nav { display: flex; gap: 18px; }
footer.site a, .ld-foot a { color: var(--muted); text-decoration: none; }
footer.site a:hover, .ld-foot a:hover { color: var(--ink); }
.public-flashes .flashes { max-width: 1180px; margin: 16px auto 0; padding: 0 24px; }

/* the page's own confirm dialog (static/ui.js), instead of the browser's confirm() */
dialog.confirm { border: 0; padding: 24px 24px 18px; border-radius: 22px; max-width: min(92vw, 420px); color: var(--text);
  background: var(--glass-opaque); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow-lift); }
dialog.confirm::backdrop { background: rgba(20, 19, 23, 0.4); backdrop-filter: blur(3px); }
dialog.confirm p { color: var(--ink); font-size: 1.02rem; line-height: 1.45; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.sticky-bar { position: sticky; bottom: 18px; z-index: 5; margin-top: 18px; display: flex; justify-content: center; }
.sticky-bar .inner { border-radius: 999px; box-shadow: var(--shadow-lift);
  padding: 10px 10px 10px 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

/* ---------- sources ---------- */
.source-card { gap: 18px; }
.source-head { display: flex; gap: 14px; align-items: flex-start; }
.source-head .bubble { width: 46px; height: 46px; }
.source-head p { margin-top: 3px; }
.connect-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.connect-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: 18px; background: rgb(var(--wash) / 0.45); }
.connect-list li.connect-setup { display: block; background: none; padding: 0 12px 6px; }
.connect-list .bubble { width: 40px; height: 40px; box-shadow: none; }
.connect-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.connect-text strong { font-weight: 500; }
.connect-text small { color: var(--muted); font-size: 0.8rem; }
.upload-form { display: grid; gap: 12px; }
.upload-form .file-drop { padding: 28px 18px 22px; gap: 8px; background: rgb(var(--wash) / 0.45); border: 1.5px dashed rgb(var(--ink-rgb) / 0.2); transition: border-color 0.15s, background 0.15s; }
.upload-form .file-drop.is-over, .upload-form .file-drop:hover { border-color: var(--accent); background: rgb(var(--wash) / 0.7); }
.upload-form .file-drop.has-file { border-style: solid; border-color: var(--mint); }
.upload-form .file-drop .bubble { width: 44px; height: 44px; }
.upload-form .file-drop strong { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.upload-form .file-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-drop { position: relative; }
.upload-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.howto summary { color: var(--muted); }
.howto-list { margin: 10px 0 0; padding-left: 18px; font-size: 0.86rem; display: grid; gap: 6px; }
.account-box { margin-bottom: 18px; gap: 16px; }
.account-box.is-missing { box-shadow: 0 0 0 2px var(--coral), var(--shadow-card); }
.account-box .field { margin-bottom: 0; }

/* ---------- import panel ---------- */

.import-panel { padding: 22px 26px; margin-bottom: 22px; gap: 18px; animation: rise 0.25s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ip-head { display: flex; align-items: center; gap: 16px; }
.ip-head .bubble { flex: none; }
.ip-title { flex: 1; min-width: 0; }
.ip-title p { margin-top: 4px; }
.ip-count { text-align: center; line-height: 1; background: var(--solid); color: var(--on-solid); border-radius: 999px; padding: 10px 18px; display: grid; gap: 2px; }
.ip-count span { display: block; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ip-count small { font-size: 0.7rem; opacity: 0.7; }
.ip-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ip-steps li { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--muted); }
.ip-steps li::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--surface); }
.ip-steps li[data-state="active"] { color: var(--ink); font-weight: 500; }
.ip-steps li[data-state="active"]::before { box-shadow: none; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 0.9s linear infinite; width: 14px; height: 14px; margin: 2px; }
.ip-steps li[data-state="done"] { color: var(--text); }
.ip-steps li[data-state="done"]::before {
  box-shadow: none; background: var(--solid) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.ip-bar { height: 6px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; }
.ip-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--accent); transition: width 0.6s ease; }
.ip-bar[data-indeterminate="true"] i { width: 30% !important; animation: slide 1.3s ease-in-out infinite; }
.ip-latest { background: rgb(var(--wash) / 0.45); border-radius: 16px; padding: 12px 16px; }
.ip-latest span { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.ip-latest p { color: var(--ink); font-size: 0.9rem; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ip-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ip-spacer { flex: 1; }
.import-panel[data-state="error"] .bubble, .import-panel[data-state="cancelled"] .bubble { color: var(--muted); }
@media (max-width: 720px) { .ip-steps { grid-template-columns: 1fr 1fr; } }

/* ---------- photos ---------- */
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { position: relative; margin: 0; width: 108px; height: 108px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-tile); background: var(--stage); transition: opacity 0.2s ease, transform 0.2s ease; }
.thumb.removing { opacity: 0.35; transform: scale(0.96); }
.thumb-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb form { position: absolute; top: 6px; right: 6px; margin: 0; }
.thumb-remove {
  width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(20, 19, 23, 0.65); color: #fff; font: 500 16px/1 var(--font);
  display: grid; place-items: center; transition: background 0.15s ease, transform 0.15s ease;
}
.thumb-remove:hover { background: var(--coral); transform: scale(1.08); }
.lightbox { padding: 12px; border-radius: 24px; box-shadow: var(--shadow-lift); max-width: min(92vw, 900px); }
.lightbox::backdrop { background: rgba(20, 19, 23, 0.55); backdrop-filter: blur(4px); }
.lightbox img { display: block; max-width: 100%; max-height: 78vh; border-radius: 16px; }
.lightbox form { display: flex; justify-content: flex-end; margin-top: 10px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.photo-card { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 14px; align-items: start; border-radius: 24px; }
.photo-card img { width: 96px; height: 96px; object-fit: cover; border-radius: 16px; background: var(--stage); }
.photo-card ul { margin: 8px 0 0; padding-left: 16px; font-size: 0.86rem; display: grid; gap: 2px; }

/* ---------- audit run ---------- */
.run-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
.run-aside { position: sticky; top: 84px; min-width: 0; }
@media (max-width: 960px) { .run-layout { grid-template-columns: 1fr; } .run-aside { position: static; } }
.run-summary { gap: 16px; }
.run-stage { min-height: 170px; padding: 6px; }
.run-timer { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 5px 12px; box-shadow: var(--shadow-tile);
  font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; font-size: 0.84rem; }
.run-stage .run-timer { position: absolute; top: 12px; right: 12px; }
.run-now { display: flex; gap: 14px; align-items: center; padding: 0 8px; }
.run-pct { --val: 0; position: relative; width: 64px; height: 64px; flex: none; display: grid; place-items: center; }
.run-pct svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.run-pct .ring-track { fill: none; stroke: var(--accent-soft); stroke-width: 9; }
.run-pct .ring-fill { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; stroke-dasharray: var(--val) 100;
  transition: stroke-dasharray 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), stroke 0.3s; }
.run-pct span { position: relative; font-weight: 600; color: var(--ink); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
[data-state="done"] .run-pct .ring-fill { stroke: var(--mint); }
[data-state="error"] .run-pct .ring-fill { stroke: var(--coral); }
.run-now-text { min-width: 0; }
.run-step-of { font-size: 0.82rem; font-weight: 600; color: var(--accent); }
[data-state="done"] .run-step-of { color: var(--ink-mint); }
.run-now-text h3 { margin-top: 3px; }
.run-now-text .hint { margin-top: 3px; line-height: 1.4; }
.run-found, .run-leave { padding: 0 8px; }
.run-label { display: flex; gap: 6px; align-items: center; font-size: 0.78rem; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.run-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.run-chips li { font-size: 0.8rem; padding: 4px 11px; border-radius: 999px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-tile); animation: af-in 0.4s both; }
.run-facts { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; margin: 0 8px; }
.run-facts div { background: rgb(var(--wash) / 0.55); border-radius: 14px; padding: 9px 12px; display: grid; line-height: 1.25; }
.run-facts strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.run-facts span { font-size: 0.72rem; color: var(--muted); }
.run-summary .notice { margin: 0 4px; }
.run-leave { display: grid; gap: 6px; font-size: 0.8rem; color: var(--muted); padding-top: 12px; padding-bottom: 6px; border-top: 1px solid var(--line-soft); }
.run-leave > span { display: flex; gap: 8px; align-items: center; }
.run-leave > span svg { color: var(--mint); flex: none; }
.run-leave form { margin: 0; }
.run-cancel { color: var(--muted); padding: 0 10px; margin-left: -10px; }
.run-cancel:hover { background: var(--coral-soft); color: var(--ink-coral); }

/* the stages, as a timeline */
.run-main { padding: 10px 14px; min-width: 0; }
.tl { list-style: none; margin: 0; padding: 6px 0; }
.tl-step { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 12px 10px; border-radius: 20px; transition: background 0.3s; }
.tl-step::before { content: ""; position: absolute; left: 29px; top: 56px; bottom: -10px; width: 2px; border-radius: 2px; background: var(--line); }
.tl-step:last-child::before { display: none; }
.tl-step[data-state="done"]::before { background: color-mix(in srgb, var(--mint) 45%, transparent); }
.tl-step[data-state="active"] { background: color-mix(in srgb, var(--accent-soft) 70%, transparent); }
.tl-mark { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); transition: background 0.3s, color 0.3s; }
.tl-mark > span { display: grid; place-items: center; }
.tl-check { display: none !important; }
.tl-step[data-state="done"] .tl-mark { background: var(--mint-soft); color: var(--ink-mint); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mint) 35%, transparent); }
.tl-step[data-state="done"] .tl-icon { display: none; }
.tl-step[data-state="done"] .tl-check { display: grid !important; }
.tl-step[data-state="active"] .tl-mark { background: var(--accent); color: var(--on-accent); box-shadow: var(--glow); }
.tl-step[data-state="active"] .tl-mark::after { content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--accent); border-right-color: rgba(53, 195, 199, 0.35); animation: spin 0.9s linear infinite; }
.tl-step[data-state="error"] .tl-mark { background: var(--coral); color: var(--on-accent); box-shadow: none; }
.tl-body { min-width: 0; padding-top: 1px; }
.tl-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; min-height: 38px; }
.tl-title { min-width: 0; }
.tl-title strong { display: block; font-weight: 500; color: var(--muted); font-size: 0.98rem; }
.tl-title span { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 1px; }
.tl-step[data-state="active"] .tl-title strong, .tl-step[data-state="done"] .tl-title strong, .tl-step[data-state="error"] .tl-title strong { color: var(--ink); }
.tl-step[data-state="active"] .tl-title span { color: var(--text); }
.tl-step[data-state="done"] .tl-title span { display: none; }
.tl-side { display: flex; gap: 10px; align-items: center; flex: none; padding-top: 1px; }
.tl-side em { font-style: normal; font-size: 0.78rem; color: var(--text); background: rgb(var(--wash) / 0.7); border-radius: 999px; padding: 2px 10px; font-variant-numeric: tabular-nums; }
.tl-side em:empty, .tl-side time:empty { display: none; }
.tl-side time { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-live { display: none; height: 4px; border-radius: 99px; background: rgba(53, 195, 199, 0.16); overflow: hidden; margin-top: 10px; max-width: 260px; }
.tl-live i { display: block; height: 100%; width: 35%; border-radius: 99px; background: var(--accent); animation: slide 1.3s ease-in-out infinite; }
.tl-step[data-state="active"] .tl-live { display: block; }
@media (max-width: 640px) {
  .tl-step { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 10px 6px; }
  .tl-step::before { left: 21px; top: 48px; }
  .tl-mark { width: 32px; height: 32px; }
  .tl-head { flex-direction: column; gap: 4px; min-height: 0; }
}

/* the admins' console, inside each step */
.tl-toolbar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 8px 14px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.tl-toolbar-title { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; color: var(--ink); font-size: 0.92rem; }
.tl-toolbar-title .badge { font-style: normal; }
.tl-input { font-size: 0.78rem; color: var(--muted); }
.tl-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.tl-filters .pl-search { flex: 1; min-width: 140px; }
[data-tl-expand] svg { transition: transform 0.15s; }
[data-tl-expand][aria-pressed="true"] svg { transform: rotate(180deg); }
.tl-admin { margin-top: 10px; }
.tl-admin > summary { display: inline-flex; align-items: center; gap: 7px; list-style: none; cursor: pointer; font-size: 0.76rem; color: var(--text);
  padding: 4px 12px 4px 10px; border-radius: 999px; background: rgb(var(--ink-rgb) / 0.05); max-width: 100%; }
.tl-admin > summary::-webkit-details-marker { display: none; }
.tl-admin > summary:hover { background: rgb(var(--ink-rgb) / 0.09); }
.tl-admin:not([data-recorded]) > summary { opacity: 0.5; pointer-events: none; }
.tl-admin[open] > summary { background: var(--accent-soft-2); color: var(--accent-ink); }
.tl-admin[open] > summary .pl-err { color: var(--ink-coral); }
.tl-admin.is-error > summary { background: var(--coral-soft); color: var(--ink-coral); }
.tl-admin.is-filtered-out { display: none; }
.tl-console { margin-top: 10px; border-radius: 16px; background: rgb(var(--wash) / 0.6); box-shadow: inset 0 0 0 1px var(--line-soft); padding: 12px; display: grid; gap: 12px; animation: rise 0.2s ease both; }
.tl-stats { display: grid; gap: 14px; }
.tl-stats:empty { display: none; }
.tl-node header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.8rem; cursor: help; }
.tl-node header .pl-ico { margin-top: 0; }
.tl-node header strong { font-weight: 600; }
.tl-node-type { font-size: 0.7rem; color: var(--muted); }
.tl-node code { font: 0.7rem var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.tl-kvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; margin-top: 8px; }
.tl-kv { background: var(--surface); border-radius: 12px; padding: 8px 10px; display: grid; gap: 1px; box-shadow: var(--shadow-tile); min-width: 0; }
.tl-kv strong { font-size: 0.95rem; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.3; }
.tl-kv span { font-size: 0.7rem; color: var(--muted); line-height: 1.3; }
.tl-log { max-height: min(62vh, 640px); overflow: auto; font-size: 0.82rem; scrollbar-gutter: stable; }
[data-tl-static] .tl-log { max-height: none; overflow: visible; }  /* a finished run's page: the log reads top to bottom, no box to scroll */
.tl-stats:not(:empty) + .tl-log { border-top: 1px solid var(--line-soft); padding-top: 8px; }

/* ---------- pipeline view (admins) ---------- */
.pl-llm { background: var(--accent); } .pl-tool { background: var(--tangerine); } .pl-code { background: #6f6b80; } .pl-data { background: var(--mint); } .pl-rose { background: var(--coral); }
.pl-filter { border: 0; border-radius: 999px; padding: 6px 12px; font: 500 0.76rem var(--font); color: var(--text); background: rgb(var(--wash) / 0.5); cursor: pointer; }
.pl-filter[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.pl-search { flex: 1; min-width: 140px; padding: 7px 14px; font-size: 0.8rem; }
.pl-err { color: var(--coral); font-weight: 500; }
/* a log row: when · who · what it did → what came back · how long. One that recorded its call opens (pipeline/io.js). */
.pl-row { border-radius: 10px; overflow-wrap: anywhere; }
.pl-row + .pl-row { margin-top: 1px; }
.pl-line { display: grid; grid-template-columns: 40px 12px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 6px 8px; border-radius: 10px;
  transition: background 0.15s ease; }
.pl-line:hover { background: rgb(var(--wash) / 0.7); }
summary.pl-line { list-style: none; cursor: pointer; }
summary.pl-line::-webkit-details-marker { display: none; }
summary.pl-line .pl-dur::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 10px; border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted); transform: translateY(-2px) rotate(-45deg); transition: transform 0.18s ease; }
details.pl-row[open] > summary .pl-dur::after { transform: translateY(-3px) rotate(45deg); }
details.pl-row[open] > summary { background: rgb(var(--wash) / 0.9); }
details.pl-row[open] { background: rgb(var(--wash) / 0.45); margin-block: 4px; }
.pl-row.is-error .pl-act { color: var(--ink-coral); }
.pl-row.is-report .pl-act { color: var(--ink); font-weight: 500; }
.pl-time { color: var(--muted); font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 0.7rem; padding-top: 3px; }
.pl-ico { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; }
.pl-row.is-second .pl-ico { background: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 28%, transparent); }
.pl-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; line-height: 1.5; }
.pl-step { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-act { color: var(--text); min-width: 0; }
.pl-text small { flex-basis: 100%; color: var(--muted); font-size: 0.7rem; font-variant-numeric: tabular-nums; }
.pl-pill { font-style: normal; font-size: 0.7rem; font-weight: 500; line-height: 1.5; padding: 1px 9px; border-radius: 999px; white-space: nowrap;
  background: var(--line-soft); color: var(--text); }
.pl-pill.is-ok { background: var(--mint-soft); color: var(--ink-mint); }
.pl-pill.is-bad { background: var(--coral-soft); color: var(--ink-coral); }
.pl-pill.is-warn { background: var(--tangerine-soft); color: var(--ink-tangerine); }
.pl-dur { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.72rem; padding-top: 3px; white-space: nowrap; }
.pl-divider { display: flex; align-items: center; gap: 12px; margin: 14px 8px 8px; font-size: 0.72rem; font-weight: 500; color: var(--accent-ink); }
.pl-divider::before, .pl-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.pl-divider::before { flex: 0 0 40px; }
.pl-divider.is-second { color: var(--ink-blue); }
.pl-peeks { display: inline-flex; align-self: center; }
.pl-peek { width: 22px; height: 22px; border-radius: 7px; object-fit: cover; background: var(--line); box-shadow: 0 0 0 2px var(--surface); }
.pl-peek + .pl-peek { margin-left: -6px; }
.pl-peek:not([src]) { display: none; }

/* the opened row */
.pl-io { margin: 2px 8px 10px 68px; padding: 14px 16px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-tile);
  display: grid; gap: 14px; min-width: 0; animation: rise 0.18s ease both; }
.pl-io:empty { display: none; }
@media (max-width: 640px) { .pl-io { margin-left: 8px; } }
.pl-io section { display: grid; gap: 8px; min-width: 0; }
.pl-io h4 { margin: 0; font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.pl-io a, .tl-stats a { color: var(--accent-ink); text-decoration: none; overflow-wrap: anywhere; }
.pl-io a:hover, .tl-stats a:hover { text-decoration: underline; }
.pl-lead { margin: 0; color: var(--ink); line-height: 1.5; max-width: 72ch; }
.pl-title { margin: 0; font-weight: 600; color: var(--ink); }
.pl-desc { margin: 0; color: var(--text); max-width: 72ch; }
.pl-q { margin: 0; color: var(--muted); font-style: italic; }
.pl-foot { margin: 0; color: var(--muted); font-size: 0.74rem; }
.pl-none { color: var(--muted); }
.pl-more > summary { list-style: none; cursor: pointer; }
.pl-more > summary::-webkit-details-marker { display: none; }
.pl-more > summary b { font-weight: 500; color: var(--accent-ink); white-space: nowrap; }
.pl-more[open] > summary { display: none; }
.pl-kv { margin: 0; display: grid; grid-template-columns: minmax(84px, max-content) minmax(0, 1fr); gap: 5px 14px; }
.pl-kv dt { color: var(--muted); }
.pl-kv dd { margin: 0; min-width: 0; color: var(--text); }
.pl-kv .pl-kv { padding: 8px 10px; border-radius: 10px; background: rgb(var(--wash) / 0.7); }
.pl-io-list { margin: 0; padding-left: 16px; display: grid; gap: 3px; }
.pl-chips { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.pl-chips i { font-style: normal; font-size: 0.74rem; padding: 1px 9px; border-radius: 999px; background: rgb(var(--wash) / 0.9); box-shadow: inset 0 0 0 1px var(--line); }
.pl-chips i.is-warn { background: var(--tangerine-soft); box-shadow: none; }
.pl-chips i.is-warn a { color: var(--ink-tangerine); }
.pl-io-pic { display: inline-flex; align-items: center; gap: 8px; }
.pl-table-wrap { overflow-x: auto; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-soft); }
.pl-table { border-collapse: collapse; width: 100%; font-size: 0.78rem; }
.pl-table th { text-align: left; font-weight: 500; color: var(--muted); padding: 7px 12px; background: rgb(var(--wash) / 0.7); white-space: nowrap; }
.pl-table td { padding: 8px 12px; border-top: 1px solid var(--line-soft); vertical-align: top; line-height: 1.45; overflow-wrap: anywhere; }
.tl-console, .tl-stats, .tl-node { min-width: 0; }  /* a wide table scrolls in its own box, never past the card */
.pl-table tbody tr { transition: background 0.15s ease; }
.pl-table tbody tr:hover { background: rgb(var(--wash) / 0.5); }
.pl-table td strong { font-weight: 500; color: var(--ink); }
.pl-table q { color: var(--text); quotes: "“" "”"; }
.pl-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-weight { margin-left: 6px; font-size: 0.5rem; letter-spacing: 2px; color: var(--accent); vertical-align: middle; white-space: nowrap; overflow-wrap: normal; }
.pl-table td:has(> .pl-pill) { white-space: nowrap; overflow-wrap: normal; }  /* a kind and its weight stay on one line */
.pl-leads td:first-child { min-width: 180px; } .pl-leads td:nth-child(3) { min-width: 220px; }
.pl-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pl-results li { display: grid; gap: 1px; }
.pl-results small, .pl-results span { color: var(--muted); }
.pl-results span { color: var(--text); max-width: 80ch; }
.pl-entry { display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgb(var(--wash) / 0.7); min-width: 0; font-size: 0.8rem; }
.pl-entry + .pl-entry { margin-top: 6px; }
.pl-entry .pl-kv .pl-kv { background: var(--surface); }
.pl-entry header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: default; }
.pl-entry header strong { font-weight: 600; color: var(--ink); }
.pl-raw > summary { cursor: pointer; color: var(--muted); font-size: 0.74rem; width: fit-content; border-radius: 6px; }
.pl-raw > summary:hover { color: var(--text); }
.pl-raw pre { margin: 8px 0 0; padding: 12px; border-radius: 10px; background: rgb(var(--wash) / 0.9); font: 0.72rem/1.5 var(--mono); white-space: pre-wrap;
  overflow-wrap: anywhere; max-height: 320px; overflow: auto; color: var(--text); }

/* pictures: the account's against a profile's; the owner's photos. All open in the lightbox. */
.pl-zoom { position: relative; display: inline-grid; padding: 0; border: 0; background: none; border-radius: 12px; cursor: zoom-in; line-height: 0; flex: none;
  transition: transform 0.18s ease; }
.pl-zoom:hover { transform: translateY(-1px) scale(1.03); }
.pl-zoom:active { transform: scale(0.98); }
.pl-pic { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--line); flex: none; box-shadow: 0 0 0 1px rgb(var(--ink-rgb) / 0.08); }
.pl-pic.sm { width: 34px; height: 34px; border-radius: 9px; }
.pl-pic.lg { width: 132px; height: 132px; border-radius: 16px; }
.pl-pic-missing { display: inline-block; background: repeating-linear-gradient(135deg, var(--line) 0 6px, var(--line-soft) 6px 12px); }
.pl-pic-tag { position: absolute; left: 6px; bottom: 6px; padding: 1px 7px; border-radius: 999px; font: 500 0.64rem/1.5 var(--font); color: var(--ink);
  background: rgb(11 19 22 / 0.72); backdrop-filter: blur(4px); }
.pl-zoom.is-missing { cursor: default; pointer-events: none; }
.pl-zoom.is-missing .pl-pic { background: repeating-linear-gradient(135deg, var(--line) 0 6px, var(--line-soft) 6px 12px); }
.pl-pair { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.pl-pair figure { margin: 0; display: grid; gap: 6px; justify-items: center; max-width: 150px; }
.pl-pair .pl-pic { width: 92px; height: 92px; border-radius: 16px; }
.pl-pair figcaption { font-size: 0.7rem; color: var(--muted); text-align: center; line-height: 1.3; overflow-wrap: anywhere; }
.pl-vs { font-size: 0.7rem; color: var(--muted); margin-top: 38px; }
.pl-score { display: grid; gap: 3px; margin-left: 8px; align-content: start; padding-top: 14px; }
.pl-pairs .pl-score { flex-basis: 100%; margin-left: 0; padding-top: 0; }
.pl-score strong { font-size: 1.7rem; font-weight: 600; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pl-score span, .pl-score em { font-size: 0.7rem; color: var(--muted); font-style: normal; }
.pl-score em { color: var(--text); }
.pl-score meter, .pl-leads meter { appearance: none; -webkit-appearance: none; display: block; width: 120px; height: 6px; margin-top: 4px; border: 0; border-radius: 99px;
  background: var(--line); overflow: hidden; }
.pl-leads meter { width: 64px; }
.pl-io meter::-webkit-meter-bar, .tl-stats meter::-webkit-meter-bar { background: var(--line); border: 0; border-radius: 99px; height: 6px; }
.pl-io meter::-webkit-meter-optimum-value, .pl-io meter::-webkit-meter-suboptimum-value, .pl-io meter::-webkit-meter-even-less-good-value,
.tl-stats meter::-webkit-meter-optimum-value, .tl-stats meter::-webkit-meter-suboptimum-value, .tl-stats meter::-webkit-meter-even-less-good-value { background: var(--accent); border-radius: 99px; }
.pl-io meter::-moz-meter-bar, .tl-stats meter::-moz-meter-bar { background: var(--accent); border-radius: 99px; }
.pl-outcome { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 0.76rem; }
.pl-pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 8px; }
.pl-pairs .pl-entry + .pl-entry { margin-top: 0; }
.pl-avatars { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-photo { display: flex; gap: 14px; align-items: flex-start; }
.pl-photo + .pl-photo { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.pl-photo > div { display: grid; gap: 8px; min-width: 0; flex: 1; }
@media (max-width: 640px) { .pl-photo { flex-direction: column; } }
.pl-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 8px; }
.pl-photo-card { margin: 0; display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 14px; background: rgb(var(--wash) / 0.7); min-width: 0; }
.pl-photo-card .pl-pic.lg { width: 96px; height: 96px; }
.pl-photo-card figcaption { display: grid; gap: 5px; min-width: 0; font-size: 0.78rem; }
.pl-photo-card figcaption > span { display: flex; flex-wrap: wrap; gap: 5px; }
.pl-photo-card em { font-style: normal; color: var(--ink); }
.pl-photo-card ul { margin: 0; padding-left: 15px; color: var(--text); }
.pl-photo-card small { color: var(--muted); line-height: 1.4; }
.pl-rounds { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pl-rounds li { display: grid; gap: 1px; padding: 8px 12px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-tile); min-width: 150px; }
.pl-rounds strong { font-size: 1.05rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.pl-rounds span { font-size: 0.74rem; color: var(--text); }
.pl-rounds small { font-size: 0.68rem; color: var(--muted); }
.pl-rounds li.is-second strong { color: var(--ink-blue); }
.pl-debug { color: var(--accent-ink); margin-left: 6px; white-space: nowrap; }
.pl-sub { font-size: 0.74rem; font-weight: 500; color: var(--muted); margin: 16px 0 8px; }
.pl-io .pl-sub { margin: 4px 0 0; }
.pl-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 0.74rem; font-weight: 500; padding: 4px 10px 4px 8px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.pl-badge svg { width: 13px; height: 13px; }
.pl-badge.is-locked { background: var(--line-soft); color: var(--muted); text-decoration: line-through; }
.pl-list { margin: 0; padding-left: 16px; font-size: 0.82rem; display: grid; gap: 3px; }
.pl-list li { overflow-wrap: anywhere; }
.pl-list span { color: var(--muted); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

/* ---------- findings (legacy report) ---------- */
.finding p { color: var(--ink); margin-top: 2px; }
.finding-cat { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.finding-action { margin-top: 10px; font-size: 0.88rem; color: var(--text) !important; }
.finding-action strong { font-weight: 500; color: var(--ink); }

/* ---------- where we looked ---------- */
.looked summary { cursor: pointer; list-style: none; }
.looked summary::-webkit-details-marker { display: none; }
.lookups { display: grid; margin-top: 12px; }
.lookup { display: grid; grid-template-columns: 170px minmax(0, 1fr) 130px 100px; gap: 12px; align-items: center; padding: 8px 2px; border-top: 1px solid var(--line-soft); font-size: 0.88rem; }
.lookup-site { color: var(--ink); }
.lookup-found a { color: var(--accent-ink); text-decoration: none; font-weight: 500; }
@media (max-width: 720px) { .lookup { grid-template-columns: 1fr 1fr; } }

/* ================= results page ================= */
.chain { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 0.8rem; color: var(--muted); }
.chain li + li::before { content: "→"; margin-right: 4px; color: var(--line); }
.chain li:first-child { color: var(--accent-ink); }
.dead-ends { margin: 8px 0 0; padding-left: 18px; font-size: 0.86rem; display: grid; gap: 4px; }

/* verdict */
.verdict { padding: 14px; gap: 0; }
.verdict-hero { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 28px; align-items: center; }
.hero-stage { min-height: 250px; align-self: stretch; display: grid; place-items: center; padding: 12px; }
.hero-illustration { max-width: 340px; }
.verdict-text { min-width: 0; padding: 12px 20px 12px 0; }
.verdict-points { margin: 22px 14px 0; }
@media (max-width: 760px) {
  .verdict-hero { grid-template-columns: 1fr; gap: 14px; }
  .hero-stage { min-height: 200px; }
  .verdict-text { padding: 4px 8px 8px; }
  .verdict-points { margin: 18px 4px 0; }
}
.verdict-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.level-badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: 0.78rem; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; background: var(--line-soft); color: var(--text);
}
.level-hidden .level-badge { background: var(--mint-soft); color: var(--ink-mint); }
.level-traceable .level-badge { background: var(--blue-soft); color: var(--ink-blue); }
.level-recognisable .level-badge { background: var(--tangerine-soft); color: var(--ink-tangerine); }
.level-identified .level-badge { background: var(--coral-soft); color: var(--ink-coral); }
.level-hidden { --ring-color: var(--mint); } .level-traceable { --ring-color: var(--blue); }
.level-recognisable { --ring-color: var(--tangerine); } .level-identified { --ring-color: var(--coral); }
.headline { font-size: clamp(1.4rem, 2.4vw, 1.85rem); line-height: 1.22; margin-top: 14px; letter-spacing: -0.03em; }

.scale { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.scale li { display: grid; gap: 7px; }
.scale-bar { height: 6px; border-radius: 99px; background: var(--line); }
.scale-label { font-size: 0.76rem; color: var(--muted); }
.scale li.is-past .scale-bar { background: var(--solid); opacity: 0.35; }
.scale li.is-current .scale-label { color: var(--ink); font-weight: 600; }
.scale li.is-current .scale-bar { background: var(--ring-color, var(--accent)); }

.verdict-points { list-style: none; padding: 20px 0 0; border-top: 1px solid var(--line-soft);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
.verdict-points li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; color: var(--ink); font-size: 0.94rem; line-height: 1.5; }
@media (max-width: 720px) { .verdict-points { grid-template-columns: 1fr; } }
.kp-icon {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.score-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 12px; border-radius: 999px;
  background: rgb(var(--ink-rgb) / 0.07); font-size: 0.86rem; color: var(--text);
}
.score-chip .trend { background: rgb(var(--wash) / 0.8); }
.score-chip strong { font-weight: 600; color: var(--ink); }
.score-chip .arrow { color: var(--muted); }
.score-chip .trend { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--line-soft); color: var(--muted); }
.score-chip.trend-up .trend { background: var(--coral-soft); color: var(--coral); }
.score-chip.trend-down .trend { background: var(--mint-soft); color: var(--mint); }

/* exposure map */
.map-card { padding: 0; overflow: hidden; }
.xmap { position: relative; height: var(--xmap-h, 420px); cursor: grab;
  background: radial-gradient(circle, rgb(var(--ink-rgb) / 0.14) 1px, transparent 1.2px) 0 0 / 18px 18px, rgb(var(--wash) / 0.3); }
.xmap:active { cursor: grabbing; }
.xmap svg { display: block; width: 100%; height: 100%; }
.xmap-tools { position: absolute; top: 14px; left: 14px; z-index: 2; display: flex; gap: 2px; padding: 4px; border-radius: 999px; box-shadow: var(--shadow-tile); }
.xmap-tools button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: var(--text); font-size: 15px; cursor: pointer; }
.xmap-tools button:hover { background: var(--accent-soft); color: var(--accent-ink); }
.xmap-link { fill: none; stroke: var(--line-strong); stroke-width: 1.6; }
.xmap-link.sens-high { stroke: #f6b9ba; } .xmap-link.sens-medium { stroke: #f7cdb0; } .xmap-link.sens-low { stroke: #ade3cf; }
.xmap-link.grp-likely { stroke-dasharray: 7 5; }
.xmap-link.grp-possible { stroke-dasharray: 2 5; stroke-linecap: round; opacity: 0.8; }
.xmap-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.xmap-card { box-sizing: border-box; height: 100%; display: flex; gap: 9px; align-items: flex-start; padding: 9px 10px; border-radius: 16px;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line-soft), 0 4px 12px rgba(0, 0, 0, 0.08); color: var(--text); text-decoration: none;
  font: 12px/1.35 var(--font); overflow: hidden; }
a.xmap-card:hover { box-shadow: 0 0 0 1.5px var(--accent-line), 0 6px 16px rgba(0, 0, 0, 0.14); }
.xmap-pic { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); }
.xmap-pic img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.xmap-body { display: grid; gap: 1px; min-width: 0; }
.xmap-title { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xmap-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.xmap-meta { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xmap-account { background: var(--solid); color: color-mix(in srgb, var(--on-solid) 70%, transparent); box-shadow: none; align-items: center; }
.xmap-account .xmap-title { color: var(--on-solid); }
.xmap-account .xmap-pic { width: 38px; height: 38px; background: color-mix(in srgb, var(--on-solid) 12%, transparent); color: var(--on-solid); }
.xmap-badge { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 2px var(--solid); }
.xmap-lead.grp-tied { box-shadow: 0 0 0 1.5px var(--accent), 0 4px 12px rgba(0, 0, 0, 0.08); }
.xmap-lead.grp-likely .xmap-pic { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--tangerine); }
.xmap-card.grp-possible { outline: 1.5px dashed var(--line); outline-offset: -1.5px; }
.xmap-card.grp-possible .xmap-title, .xmap-card.grp-possible .xmap-text { color: var(--text); }
/* A finding's sensitivity is a word next to its title (and the icon's tint), never an edge stripe. */
.xmap-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.xmap-sens { flex: none; font-weight: 600; font-size: 10px; line-height: 1.5; padding: 0 7px; border-radius: 999px; }
.xmap-finding.sens-high .xmap-sens { background: var(--coral-soft); color: var(--ink-coral); }
.xmap-finding.sens-medium .xmap-sens { background: var(--tangerine-soft); color: var(--ink-tangerine); }
.xmap-finding.sens-low .xmap-sens { background: var(--mint-soft); color: var(--ink-mint); }
.xmap-finding.sens-high .xmap-pic { background: var(--coral-soft); color: var(--coral); }
.xmap-finding.sens-medium .xmap-pic { background: var(--tangerine-soft); color: var(--tangerine); }
.xmap-finding.sens-low .xmap-pic { background: var(--mint-soft); color: var(--mint); }
.map-card .map-legend { padding: 12px 20px 16px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.78rem; color: var(--text); padding: 4px 8px 0; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lg-dot.lg-lead { background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent); }
.lg-dot.lg-likely { background: transparent; border: 2px dashed var(--tangerine); box-sizing: border-box; }
.lg-line { width: 22px; height: 0; border-top: 2px dotted var(--muted); display: inline-block; }
.lg-line.lg-dashed { border-top-style: dashed; border-top-color: var(--tangerine); }
.lg-dot.sens-high { background: var(--coral); } .lg-dot.sens-medium { background: var(--tangerine); } .lg-dot.sens-low { background: var(--mint); }

/* what a stranger would learn */
.exposures { padding: 6px 24px 14px; gap: 0; }
.xgroup { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 20px 0 8px; }
.xgroup h3 { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.xgroup-tied h3 { color: var(--ink-coral); } .xgroup-likely h3 { color: var(--ink-tangerine); } .xgroup-possible h3 { color: var(--muted); }
.xrow { display: grid; grid-template-columns: 36px 128px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0;
  border-top: 1px solid var(--line-soft); scroll-margin-top: 20px; }
.xrow:target { background: var(--accent-soft); box-shadow: 0 0 0 10px var(--accent-soft); border-radius: 12px; }
.xrow-icon { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); overflow: hidden; }
.xrow-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xrow.sens-high .xrow-icon { background: var(--coral-soft); color: var(--coral); }
.xrow.sens-medium .xrow-icon { background: var(--tangerine-soft); color: var(--tangerine); }
.xrow.sens-low .xrow-icon { background: var(--mint-soft); color: var(--mint); }
.xrow-cat { font-size: 0.8rem; color: var(--muted); }
.infer-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 18px; margin-top: 12px; padding: 16px;
  border-radius: 20px; background: rgb(var(--wash) / 0.55); box-shadow: var(--shadow-tile); }
.infer-img { width: 132px; height: 132px; object-fit: cover; border-radius: 14px; background: var(--stage); position: sticky; top: 90px; }
.infer-eye { margin: 0 0 10px; color: var(--ink); font-size: 0.92rem; line-height: 1.45; }
.infer-list { list-style: none; margin: 0; padding: 0; display: grid; }
.infer-list li { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 1px; align-items: baseline;
  padding: 8px 0; border-top: 1px solid var(--line-soft); }
.infer-kind { grid-row: span 2; font-size: 0.76rem; font-weight: 600; color: var(--muted); padding-top: 2px; }
.infer-means { color: var(--ink); font-size: 0.88rem; font-weight: 500; overflow-wrap: anywhere; }
.infer-clue { grid-column: 2; color: var(--muted); font-size: 0.78rem; overflow-wrap: anywhere; }
.infer-conf { grid-column: 3; grid-row: 1; font-size: 0.7rem; padding: 2px 8px; border-radius: 999px; background: var(--line-soft); color: var(--muted); }
.conf-high .infer-conf { background: var(--coral-soft); color: var(--ink-coral); }
.conf-medium .infer-conf { background: var(--tangerine-soft); color: var(--ink-tangerine); }
@media (max-width: 640px) {
  .infer-card { grid-template-columns: 1fr; }
  .infer-img { position: static; width: 100%; height: 180px; }
  .infer-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .infer-kind { grid-row: auto; grid-column: 1 / -1; }
  .infer-clue { grid-column: 1 / -1; }
  .infer-conf { grid-column: 2; grid-row: 2; }
}
.photo-infer { margin: 4px 0 0; padding-left: 16px; font-size: 0.82rem; display: grid; gap: 2px; }
.photo-infer li { overflow-wrap: anywhere; }
.pro-badge { display: inline-block; margin-left: 6px; border-radius: 999px; font-style: normal; padding: 1px 8px; font-size: 0.72rem; font-weight: 600;
 vertical-align: 2px; background: linear-gradient(135deg, #f7c46c, #f08a5d); color: var(--on-accent); }
.xrow-why { display: block; margin-top: 2px; font-size: 0.76rem; color: var(--muted); }
.xrow-what { color: var(--ink); font-size: 0.94rem; line-height: 1.45; overflow-wrap: anywhere; max-width: 72ch; }
.xrow-side { display: flex; align-items: center; gap: 12px; flex: none; }
.xrow-side .prob { font-size: 0.8rem; color: var(--text); font-variant-numeric: tabular-nums; background: rgb(var(--wash) / 0.5); padding: 2px 9px; border-radius: 999px; }
.xrow-side .src, .ap-claim .src { font-size: 0.78rem; color: var(--accent-ink); text-decoration: none; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xrow-side .src::after { content: " ↗"; }
.sens-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; }
.xrow.sens-high .sens-dot { background: var(--coral); } .xrow.sens-medium .sens-dot { background: var(--tangerine); } .xrow.sens-low .sens-dot { background: var(--mint); }
.spark { display: grid; grid-template-columns: repeat(24, 4px); gap: 2px; align-items: end; height: 26px; }
.spark i { display: block; height: max(var(--h), 8%); border-radius: 1px; background: var(--accent-line); }
.spark i.is-quiet { background: var(--tangerine); opacity: .85; }
@media (max-width: 720px) {
  .xrow { grid-template-columns: 36px minmax(0, 1fr); gap: 6px 12px; }
  .xrow-cat { grid-column: 2; }
  .xrow-what { grid-column: 2; }
  .xrow-side { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; }
}
.effort { display: inline-flex; align-items: center; gap: 4px; font-size: 0.76rem; color: var(--muted); white-space: nowrap; }
.empty-good { flex-direction: row; gap: 20px; align-items: center; }
.empty-good img { width: 200px; height: auto; flex: none; }
.empty-good p { margin-top: 4px; max-width: 60ch; }
@media (max-width: 640px) { .empty-good { flex-direction: column; text-align: center; } }

/* what to do */
.plan-card { padding: 18px 22px 10px; }
.plan-bar { height: 6px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; margin-bottom: 8px; }
.plan-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.4s ease; }
.plan { list-style: none; margin: 0; padding: 0; }
.plan li { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.plan li:first-child { border-top: 0; }
.plan label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; color: var(--ink); font-size: 0.94rem; }
.plan input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.plan input:checked + .plan-text { text-decoration: line-through; color: var(--muted); }
.plan-if { font-style: normal; color: var(--muted); font-size: 0.8rem; }
.plan-tags { display: flex; align-items: center; gap: 12px; flex: none; }
.plan-tags a { text-decoration: none; color: var(--accent-ink); }
.impact-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.impact-high .impact-dot { background: var(--coral); } .impact-medium .impact-dot { background: var(--tangerine); } .impact-low .impact-dot { background: var(--mint); }

/* how we checked */
.appendix { margin-top: 32px; padding: 0; gap: 0; }
.appendix > summary { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 20px 24px; cursor: pointer; list-style: none; }
.appendix > summary::-webkit-details-marker { display: none; }
.appendix > summary::before, .looked > summary::before { content: ""; width: 0; height: 0; border-left: 6px solid var(--muted); border-top: 5px solid transparent; border-bottom: 5px solid transparent; align-self: center; transition: transform 0.15s ease; margin-right: 4px; }
.appendix[open] > summary::before, .looked[open] > summary::before { transform: rotate(90deg); }
.looked > summary { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.ap-title { font-weight: 600; color: var(--ink); font-size: 1.02rem; }
.ap-body { padding: 0 24px 24px; display: grid; gap: 26px; border-top: 1px solid var(--line-soft); }
.ap-block { padding-top: 22px; }
.ap-block h3 { font-size: 0.98rem; }
.ap-block > .hint { margin: 2px 0 12px; max-width: 70ch; }
.ap-sub { margin: 18px 0 0; font-size: 0.86rem; color: var(--ink); font-weight: 500; }
.ap-leads { list-style: none; margin: 0; padding: 0; }
.ap-lead { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.ap-lead-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ap-lead-what { color: var(--ink); font-size: 0.92rem; }
.ap-lead-what a { color: var(--ink); text-decoration: none; }
.ap-lead-what a:hover { color: var(--accent-ink); }
.ap-lead .hint { margin-top: 6px; }
.ap-claims { display: grid; gap: 14px; }
.ap-kind-head { display: flex; align-items: center; gap: 10px; }
.ap-kind-head .kp-icon { width: 26px; height: 26px; }
.ap-kind-head strong { font-weight: 500; color: var(--ink); font-size: 0.92rem; }
.ap-claim { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0 0 36px; font-size: 0.9rem; color: var(--ink); }
.ap-missing { margin: 6px 0 0 36px; font-size: 0.84rem; color: var(--text); }
.ap-thumbs summary { cursor: pointer; }

/* -- New audit form ---------------------------------------------------------- */
.af { display: grid; gap: 22px; min-width: 0; }
.af-who { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius-md);
  background: var(--gradient-soft); }
.af-avatar { position: relative; flex: none; width: 60px; height: 60px; }
.af-avatar img, .af-avatar-empty { display: block; width: 60px; height: 60px; border-radius: 50%; object-fit: cover;
  background: var(--surface); box-shadow: 0 0 0 3px var(--surface), 0 6px 16px -6px rgba(20, 19, 23, 0.35); }
.af-badge { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 24px; height: 24px;
  border-radius: 50%; background: var(--solid); color: var(--on-solid); box-shadow: 0 0 0 2px var(--surface); }
.af-who-text { flex: 1; min-width: 0; }
.af-name { color: var(--ink); font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-sub { color: var(--muted); font-size: 0.88rem; margin-top: 1px; }
.af-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.af-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 0.76rem;
  color: var(--text); background: rgb(var(--wash) / 0.6); }
.af-tag.ok { color: var(--ink-mint); background: var(--mint-soft); }
.af-review { flex: none; }

.af-title { margin: 0; font-size: 1rem; color: var(--ink); font-weight: 600; }
.af-lede { margin: 4px 0 14px; color: var(--muted); font-size: 0.86rem; }
.af-clues { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.af-clues li { display: flex; gap: 14px; padding: 14px 16px; border-radius: 18px; box-shadow: var(--shadow-tile); animation: af-in .45s both; }
.af-clues li:nth-child(2) { animation-delay: .06s; } .af-clues li:nth-child(3) { animation-delay: .12s; } .af-clues li:nth-child(4) { animation-delay: .18s; } .af-clues li:nth-child(5) { animation-delay: .24s; }
.af-ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  color: var(--accent); background: var(--accent-soft); }
.af-clue { flex: 1; min-width: 0; display: grid; gap: 4px; align-content: center; min-height: 36px; }
.af-clue p { margin: 0; color: var(--muted); font-size: 0.83rem; line-height: 1.45; }
.af-clue-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.af-clue-head > * { min-width: 0; }
.af-k { color: var(--text); font-size: 0.84rem; font-weight: 500; }
.af-v { color: var(--ink); font-weight: 600; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-opt { color: var(--muted); font-size: 0.76rem; }
.af-thumb { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line); }
.af-clue input { margin-top: 4px; }
.af-bio { margin: 2px 0 0; padding: 4px 0 0; color: var(--ink); font-size: 0.86rem; line-height: 1.45; overflow-wrap: anywhere; }
.af-bio-tag { display: inline-block; margin-right: 4px; padding: 1px 8px; border-radius: 999px; font-weight: 600; font-size: 0.74rem;
  background: var(--accent-soft); color: var(--accent-ink); vertical-align: 1px; }
.af-meta span { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 10px; border-radius: 999px;
  background: rgb(var(--wash) / 0.5); color: var(--text); font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-meta svg { flex: none; color: var(--muted); }
.af-note { display: flex; align-items: center; gap: 7px; margin: 12px 2px 0; color: var(--muted); font-size: 0.8rem; }
.af-note svg { color: var(--mint); flex: none; }

.af-choice { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 22px;
  box-shadow: var(--shadow-tile); cursor: pointer; transition: box-shadow .15s, background .15s; }
.af-choice:hover { box-shadow: var(--shadow-lift); }
.af-choice:has(input:checked) { background: var(--accent-soft); }
.af-choice input { position: absolute; opacity: 0; pointer-events: none; }
.af-choice strong { display: block; color: var(--ink); font-weight: 500; font-size: 0.92rem; }
.af-choice small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 1px; }
.af-switch { flex: none; position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--line-strong); transition: background .2s; }
.af-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 1px 3px rgba(20, 19, 23, .25); transition: transform .2s; }
.af-choice input:checked + .af-switch { background: var(--accent); }
.af-choice input:checked + .af-switch::after { transform: translateX(18px); }
.af-choice input:focus-visible + .af-switch { outline: 2px solid var(--accent); outline-offset: 2px; }

.af-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.af-foot .btn { gap: 8px; }
.af-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 0.82rem; }
.af-facts span { display: inline-flex; align-items: center; gap: 6px; }

@keyframes af-in { from { opacity: 0; transform: translateY(4px); } }
@media (max-width: 560px) {
  .af-who { flex-wrap: wrap; }
  .af-review { width: 100%; justify-content: center; }
  .af-clue-head { flex-wrap: wrap; }
}

/* ---------- home ---------- */
.home-head { align-items: flex-end; }
.home-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 0.95rem !important; }
.account-pills { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; border-radius: 999px; background: rgb(var(--wash) / 0.45); border: 1px solid var(--glass-border); }
.account-pills a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; text-decoration: none; font-size: 0.86rem; color: var(--text); }
.account-pills a:hover { background: rgb(var(--wash) / 0.8); color: var(--ink); }
.account-pills a.is-current { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: var(--shadow-tile); }
.lvd-hidden { background: var(--mint) !important; } .lvd-traceable { background: var(--accent) !important; }
.lvd-recognisable { background: var(--tangerine) !important; } .lvd-identified { background: var(--coral) !important; }

.home-running { flex-direction: row; align-items: center; gap: 16px; padding: 14px 16px; margin-bottom: 18px; text-decoration: none; color: inherit; }
.home-running .bubble { width: 46px; height: 46px; }
.home-running-text { flex: 1; min-width: 0; display: grid; gap: 1px; line-height: 1.35; text-decoration: none; color: inherit; }
.home-running form { margin: 0; }
.run-cancel-btn { color: var(--muted); }
.run-cancel-btn:hover { background: var(--coral-soft); color: var(--ink-coral); }
.home-running-text strong { font-size: 0.98rem; }
.home-running-text small { color: var(--text); font-size: 0.84rem; }
.home-running .menu-run-bar { max-width: 360px; margin-top: 6px; }
@media (max-width: 560px) { .home-running .btn-secondary { display: none; } }

/* the four numbers */
.home-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .home-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .home-tiles { gap: 10px; }
  .home-tile { padding: 14px; min-height: 0; gap: 6px; border-radius: 22px; }
  .tile-value { font-size: 1.45rem; }
  .tile-label { font-size: 0.66rem; }
  .home-tile .tile-foot { display: none; }
  .tile-counts { font-size: 0.76rem; }
}
.home-tile { padding: 18px 20px; gap: 8px; min-height: 164px; text-decoration: none; color: inherit; }
.tile-label { font-size: 0.84rem; font-weight: 600; color: var(--muted); }
.tile-value { font-size: 2rem; font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; color: var(--ink); }
.tile-value small { font-size: 0.95rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.tile-foot { margin-top: auto; font-size: 0.8rem; color: var(--muted); line-height: 1.4; }
.tile-level.tone-mint { background: linear-gradient(150deg, rgba(53, 179, 140, 0.3), var(--glass-strong) 70%); }
.tile-level.tone-violet { background: linear-gradient(150deg, rgba(53, 195, 199, 0.3), var(--glass-strong) 70%); }
.tile-level.tone-blue { background: linear-gradient(150deg, rgba(91, 141, 239, 0.3), var(--glass-strong) 70%); }
.tile-level.tone-tangerine { background: linear-gradient(150deg, rgba(240, 137, 74, 0.3), var(--glass-strong) 70%); }
.tile-level.tone-coral { background: linear-gradient(150deg, rgba(239, 107, 110, 0.3), var(--glass-strong) 70%); }
.tile-level.level-hidden .tile-value { color: var(--ink-mint); } .tile-level.level-traceable .tile-value { color: var(--ink-blue); }
.tile-level.level-recognisable .tile-value { color: var(--ink-tangerine); } .tile-level.level-identified .tile-value { color: var(--ink-coral); }
.tile-level .scale { margin: 4px 0 0; }
.tile-score-row { display: flex; align-items: baseline; gap: 10px; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 0.8rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.delta.is-better { background: var(--mint-soft); color: var(--ink-mint); }
.delta.is-worse { background: var(--coral-soft); color: var(--ink-coral); }
.spark-line { display: block; width: 100%; height: auto; overflow: visible; --spark: var(--accent); }
.spark-line.tone-mint { --spark: var(--mint); } .spark-line.tone-tangerine { --spark: var(--tangerine); } .spark-line.tone-coral { --spark: var(--coral); }
.spark-line polyline { fill: none; stroke: var(--spark); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.spark-line polygon { fill: var(--spark); opacity: 0.12; }
.spark-line circle { fill: var(--surface); stroke: var(--spark); stroke-width: 2.5; }
.tile-counts { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 3px; font-size: 0.84rem; color: var(--text); }
.tile-counts li { display: flex; align-items: center; gap: 8px; }
.tile-counts i { width: 8px; height: 8px; border-radius: 50%; }
.g-tied i { background: var(--coral); } .g-likely i { background: var(--tangerine); } .g-possible i { background: var(--line); box-shadow: inset 0 0 0 1.5px var(--muted); }
.tile-fixed .plan-bar { margin: 6px 0 0; height: 8px; }

/* what a stranger can see · fix next */
.home-panels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: stretch; }
@media (max-width: 880px) { .home-panels { grid-template-columns: 1fr; } }
.home-panel { padding: 20px 22px 18px; gap: 12px; }
.home-panel > header { display: grid; gap: 3px; }
.home-panel > header h2 { font-size: 1.15rem; }
.home-panel > header .muted { line-height: 1.4; }
.home-panel > footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 14px; border-top: 1px solid var(--line-soft); }
.home-panel > footer form { margin: 0; }
.home-empty { display: flex; align-items: center; gap: 8px; padding: 18px 0; color: var(--text); font-size: 0.92rem; }
.home-empty svg { color: var(--mint); }
.home-clear { display: flex; align-items: center; gap: 16px; padding: 8px 0; }
.home-clear img { width: 140px; height: auto; flex: none; }
.stranger-list, .fix-list { list-style: none; margin: 0; padding: 0; display: grid; }
.stranger-list li + li, .fix-list li + li { border-top: 1px solid var(--line-soft); }
.stranger-list a { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 6px; margin: 0 -6px;
  border-radius: 14px; text-decoration: none; color: inherit; }
.stranger-list a:hover { background: rgb(var(--wash) / 0.6); }
.stranger-list .sens-high .xrow-icon { background: var(--coral-soft); color: var(--coral); }
.stranger-list .sens-medium .xrow-icon { background: var(--tangerine-soft); color: var(--tangerine); }
.stranger-list .sens-low .xrow-icon { background: var(--mint-soft); color: var(--mint); }
.stranger-list .grp-possible .xrow-icon { box-shadow: inset 0 0 0 1.5px currentColor; background: transparent; }
.stranger-text { min-width: 0; display: grid; line-height: 1.35; }
.stranger-text strong { font-weight: 500; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stranger-text small { font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stranger-group { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.grp-tied .stranger-group { color: var(--ink-coral); } .grp-likely .stranger-group { color: var(--ink-tangerine); }
.fix-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 11px 0; transition: opacity 0.25s, transform 0.25s; }
.fix-list label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; color: var(--ink); font-size: 0.92rem; line-height: 1.45; min-width: 0; }
.fix-list input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--mint); flex: none; }
.fix-list li.is-done .fix-text { text-decoration: line-through; color: var(--muted); }
.fix-list li.is-leaving { opacity: 0; transform: translateX(12px); }
@media (max-width: 560px) { .fix-list li { flex-direction: column; gap: 4px; } .fix-list .plan-tags { padding-left: 30px; } .stranger-group { display: none; } }

.home-lists { margin-top: 8px; align-items: start; }
.home-lists .section-title { align-items: center; min-height: 36px; }
.source-row > .row { text-decoration: none; color: inherit; }
.source-row .pill svg { margin-left: -2px; }
.source-add { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; border: 1.5px dashed rgba(20, 19, 23, 0.16); }
a.source-add:hover { background: rgb(var(--wash) / 0.45); box-shadow: none; border-color: var(--accent); }
.source-add .bubble { box-shadow: none; background: rgb(var(--wash) / 0.6); }
@media (max-width: 880px) { .source-row { grid-template-columns: minmax(0, 1fr) auto; } }

/* before the first audit: Audit and Sources */
.start-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
@media (max-width: 860px) { .start-cards { grid-template-columns: 1fr; } .start-card.is-next { order: -1; } }
.start-card { padding: 14px; transition: box-shadow 0.2s; }
.start-card.is-next { box-shadow: 0 0 0 2px var(--accent), var(--shadow-lift); }
.start-card .stage { min-height: 200px; }
.start-body { padding: 20px 12px 8px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.start-body h2 { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; }
.start-body h2 svg { color: var(--accent); }
.start-body > p { font-size: 0.95rem; max-width: 46ch; }
.start-source { display: grid; gap: 6px; margin-top: 4px; }
.start-source > span { font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.start-source select { padding: 11px 40px 11px 16px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background: rgb(var(--wash) / 0.85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8798' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center / 16px no-repeat; }
.start-wait { display: flex; align-items: center; gap: 8px; font-size: 0.88rem !important; color: var(--muted); padding: 10px 14px;
  border-radius: 14px; background: rgb(var(--wash) / 0.5); }
.start-cta { margin-top: auto; padding-top: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.start-cta .muted { display: inline-flex; align-items: center; gap: 6px; }
.btn.is-disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.start-sources { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.start-sources a { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 16px; text-decoration: none; color: inherit;
  background: rgb(var(--wash) / 0.6); transition: background 0.15s; }
.start-sources a:hover { background: var(--surface); }
.start-sources .bubble { width: 34px; height: 34px; box-shadow: none; }
.start-src-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.start-src-text strong { font-weight: 500; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.start-src-text small { font-size: 0.76rem; color: var(--muted); }
.start-ok { display: inline-flex; align-items: center; gap: 4px; font-size: 0.76rem; font-weight: 500; color: var(--ink-mint); }
.start-add a { background: transparent; border: 1.5px dashed rgb(var(--ink-rgb) / 0.14); }
.start-add a:hover { border-color: var(--accent); background: rgb(var(--wash) / 0.5); }
.start-add a > svg { color: var(--muted); }
.home-points-foot { margin-top: 20px; }

/* Admin debug view of a failed model call */
.dbg-turns { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.dbg-turns li { border-radius: 18px; padding: 14px 18px; box-shadow: var(--shadow-tile); }
.dbg-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.dbg-assistant { box-shadow: 0 0 0 1px var(--accent-line), var(--shadow-tile); }
.dbg-last { box-shadow: 0 0 0 2px var(--tangerine); }
.dbg-failed { background: var(--coral-soft) !important; color: var(--ink-coral); }
.dbg-pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.78rem; max-height: 420px; overflow: auto; }

/* ---------- reduced transparency: the chrome goes opaque ---------- */
@media (prefers-reduced-transparency: reduce) {
  .glass, .menu, .lightbox, .sticky-bar .inner, .run-timer, .xmap-tools, .switcher, .topbar, .ld-nav {
    background: var(--glass-opaque); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- phones ---------- */
@media (max-width: 880px) {
  .app { padding: 10px 12px 0; }
  .topbar { top: 8px; padding: 5px 5px 5px 10px; gap: 2px; }
  .brand { margin-right: 6px; gap: 0; }
  .brand-name { display: none; }
  .nav a { padding: 0 11px; font-size: 0.86rem; height: 36px; }
  .nav a svg { display: none; }
  .account-text, .account .chev { display: none; }
  .account > summary { padding: 0 3px; gap: 0; }
  main { padding: 18px 0 56px; }
  .page-head { margin-bottom: 20px; }
  .tiles { gap: 6px; }
  .tile { padding: 14px 4px 12px; font-size: 0.78rem; }
  .list-row { grid-template-columns: 1fr; }
  .switcher summary { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- plans (templates/_plans.html): landing and Plan page ----------
   Three tiers, deliberately unequal: Free is narrow and shows what stays
   locked, the full report leads, the bundle is the step up. */
.plans { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; margin-top: 36px; align-items: stretch; }
.plan-tier { position: relative; display: flex; flex-direction: column; padding: 26px 26px 28px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden; }
.plan-tier > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-tier h3 { font-size: 1.2rem; }
.tier-mark { font-size: 0.78rem; color: var(--muted); background: rgb(var(--wash) / 0.7); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.tier-price { margin-top: 14px; font-size: 2.6rem; font-weight: 600; color: var(--ink); letter-spacing: -0.04em; line-height: 1; }
.tier-price small { font-size: 0.95rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.tier-pitch { margin-top: 10px; color: var(--text); font-size: 0.96rem; max-width: 34ch; }
.tier-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 11px; font-size: 0.92rem; color: var(--text); }
.tier-list li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; line-height: 1.4; }
.tier-list svg { color: var(--ink-mint); margin-top: 1px; }
.tier-list li.is-off, .tier-list li.is-off svg { color: var(--muted); }
.tier-buy { margin-top: auto; padding-top: 26px; }
.tier-buy .btn { width: 100%; justify-content: center; }
.tier-free { background: rgb(var(--wash) / 0.55); box-shadow: 0 0 0 1px var(--line-soft); }
.tier-report { background: linear-gradient(160deg, rgba(53, 195, 199, 0.16), var(--surface) 55%);
  box-shadow: 0 0 0 1.5px var(--accent-line), var(--shadow-lift); }
.tier-report .tier-mark { color: var(--accent-ink); background: var(--accent-soft); }
@media (max-width: 960px) {
  .plans { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tier-report { grid-column: 1 / -1; grid-row: 1; }
}
@media (max-width: 620px) { .plans { grid-template-columns: 1fr; } .tier-report { grid-column: auto; } }

.ld-pricing-go { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }

/* Plan page */
.unlock-context { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius-md);
  background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent-line); margin-bottom: 18px; flex-wrap: wrap; }
.unlock-context > div { display: grid; gap: 2px; min-width: 0; }
.unlock-context .btn { margin-left: auto; }
.owned { padding: 20px 22px; gap: 10px; margin-bottom: 8px; }
.owned > header h2 { font-size: 1.1rem; }
.owned-list { list-style: none; margin: 0; padding: 0; }
.owned-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.owned-list li:first-child { border-top: 0; }
.owned-list li.is-open .bubble { color: var(--muted); }
.owned-name { display: grid; gap: 1px; min-width: 0; }
.owned-name small { color: var(--muted); font-size: 0.82rem; }
.owned-meter { margin-left: auto; display: flex; gap: 4px; }
.owned-meter i { width: 22px; height: 6px; border-radius: 99px; background: var(--accent); }
.owned-meter i.is-used { background: var(--line-strong); }
.bubble.sm { width: 34px; height: 34px; }
.admin-note { margin-top: 26px; display: flex; gap: 8px; align-items: center; }

/* ---------- the free report's locked parts (templates/_locked.html) ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lock-bar { display: block; height: 9px; width: min(100%, 320px); border-radius: 99px;
  background: linear-gradient(90deg, rgb(var(--ink-rgb) / 0.14), rgb(var(--ink-rgb) / 0.05)); }
.xrow.is-locked:nth-of-type(3n+1) .lock-bar { width: min(100%, 240px); }
.xrow.is-locked:nth-of-type(3n+2) .lock-bar { width: min(100%, 290px); }
.xrow.is-locked .xrow-icon { background: rgb(var(--wash) / 0.9); color: var(--muted); }
.xrow.is-locked .src { color: var(--muted); }
.xrow.is-locked .src::after { content: none; }
.lock-icon { display: inline-grid; place-items: center; color: var(--muted); }
.stranger-list .xrow.is-locked { grid-template-columns: 36px 1fr auto; padding: 10px 0; }
.stranger-list .xrow.is-locked .xrow-cat { display: none; }
.unlock-card { margin-top: 18px; padding: 24px 26px; flex-direction: row; align-items: center; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(53, 195, 199, 0.16), var(--surface) 60%); box-shadow: 0 0 0 1.5px var(--accent-line), var(--shadow-lift); }
.unlock-text { flex: 1 1 380px; }
.unlock-text h2 { font-size: 1.3rem; }
.unlock-text p { margin-top: 8px; color: var(--text); max-width: 62ch; }
.unlock-go { display: grid; gap: 8px; justify-items: start; }
.plan-card.is-locked .plan li, .fix-locked .plan li { align-items: center; }
.plan-card.is-locked .lock-bar, .fix-locked .lock-bar { width: min(80%, 420px); }
.plan-locked-note, .fix-locked p { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 0.9rem; }
.upload-locked { display: grid; gap: 14px; justify-items: start; padding: 18px; border-radius: var(--radius-md); background: rgb(var(--wash) / 0.5); }
.upload-locked p { color: var(--text); font-size: 0.92rem; max-width: 52ch; }

/* ---------- landing: only you can read your results (templates/_vault.html) ----------
   The promise, then the questions people ask about it, full width. */
.ld-vault { padding: 96px 0 40px; }
.ld-vault-lede { margin-top: 14px; font-size: 1.08rem; max-width: 44ch; }
.ld-vault-quote { margin-top: 30px; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.ld-whatif { display: grid; gap: 8px; margin-top: 16px; }
.ld-whatif-item { border-radius: var(--radius-md); background: rgb(var(--wash) / 0.5); box-shadow: 0 0 0 1px var(--line-soft); transition: background 0.2s; }
.ld-whatif-item[open] { background: var(--surface); box-shadow: 0 0 0 1.5px var(--accent-line); }
.ld-whatif-item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px;
  cursor: pointer; font-weight: 600; color: var(--ink); font-size: 1rem; border-radius: inherit; }
.ld-whatif-item summary::-webkit-details-marker { display: none; }
.ld-whatif-chev { color: var(--muted); transition: transform 0.2s; display: grid; }
.ld-whatif-item[open] .ld-whatif-chev { transform: rotate(180deg); color: var(--accent); }
.ld-whatif-item p { padding: 0 20px 18px; font-size: 0.95rem; color: var(--text); max-width: 64ch; }
@media (max-width: 900px) { .ld-vault { padding-top: 64px; } }

/* Account page: password change and deletion */
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.account-grid h2 { font-size: 1.15rem; margin-bottom: 8px; }
.account-grid .hint { font-size: 0.9rem; margin-bottom: 18px; }
.account-form .flashes { margin-bottom: 16px; }
.account-danger { border-color: rgb(239 107 110 / 0.35); }
.btn-danger { background: var(--coral-soft); color: var(--coral); border: 1px solid rgb(239 107 110 / 0.4); }
.btn-danger:hover { background: var(--coral); color: #fff; }

/* Password strength meter (static/password.js): four bars fill with the score */
.pw-meter { display: grid; gap: 7px; margin-top: 2px; }
.pw-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.pw-bars i { display: block; height: 5px; border-radius: 3px; background: rgb(var(--ink-rgb) / 0.12); transition: background 0.25s ease; }
.pw-text { font-size: 0.82rem; color: var(--muted); line-height: 1.45; }
.pw-text strong { color: var(--ink); font-weight: 500; }
.pw-text strong:empty + span { margin-left: 0; }
.pw-meter[data-score="0"] i:nth-child(-n+1), .pw-meter[data-score="1"] i:nth-child(-n+2) { background: var(--coral); }
.pw-meter[data-score="2"] i:nth-child(-n+3) { background: var(--tangerine, #f0a35e); }
.pw-meter[data-score="3"] i:nth-child(-n+4) { background: var(--accent); }
.pw-meter[data-score="4"] i { background: var(--mint, #5bd6a8); }
.pw-meter[data-score="0"] strong, .pw-meter[data-score="1"] strong { color: var(--coral); }
.pw-meter[data-score="4"] strong { color: var(--mint, #5bd6a8); }

/* Appendix: the post a detail came from */
.ap-quote { display: block; margin-top: 3px; font-size: 0.82rem; color: var(--muted); font-style: italic; }
.ap-quote::before, .ap-quote::after { content: '"'; }
.ap-sourced { text-decoration: underline dotted rgb(var(--ink-rgb) / 0.4); text-underline-offset: 3px; cursor: help; }

/* Email confirmation (templates/confirm.html) */
.confirm-card { display: grid; gap: 14px; }
.confirm-card .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Your privileges (templates/billing.html, paid users): the card, its meter, and the "need more" row */
.card.priv { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 26px; padding: 26px 28px; margin-bottom: 14px;
  background: linear-gradient(160deg, rgba(53, 195, 199, 0.16), var(--surface) 55%); }
.priv h2 { font-size: 1.35rem; margin: 6px 0 4px; }
.priv-paid { color: var(--muted); font-size: 0.88rem; } .priv-paid a { color: var(--accent-ink); text-decoration: none; font-weight: 500; }
.priv .tier-list { margin-top: 16px; }
.priv-side { position: relative; display: grid; align-content: end; min-height: 200px; }
.priv-art { position: absolute; top: 0; left: 0; width: 100%; height: 150px; object-fit: contain; }
.slotmeter { position: relative; display: grid; gap: 8px; text-align: center; justify-items: center; }
.slot-segs { width: 100%; }
.slot-big { font-size: 2.4rem; font-weight: 600; letter-spacing: -0.04em; color: var(--ink); line-height: 1; }
.slot-big small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.slot-segs { display: flex; gap: 6px; max-width: 320px; } .slot-segs i { flex: 1; height: 8px; border-radius: 99px; background: var(--accent); } .slot-segs i.is-free { background: var(--line-strong); }
.slot-legend { font-size: 0.82rem; color: var(--muted); }
.card.more { display: flex; flex-direction: row; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 22px; margin-top: 14px; }
.more-text { display: grid; gap: 2px; flex: 1 1 360px; min-width: 0; } .more-text small { color: var(--muted); }
.more-buttons { display: flex; gap: 10px; flex: none; } .more-buttons form { margin: 0; }
.card.more.is-due { box-shadow: 0 0 0 1.5px var(--accent), var(--shadow-tile); }
@media (max-width: 760px) { .card.priv { grid-template-columns: 1fr; } .priv-side { min-height: 0; padding-top: 150px; } }
/* the payments ledger: the footer of the "need more" card, aligned with its text (past the icon) */
.more-foot { flex: 1 1 100%; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft);
  display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; }
.more-foot.is-bare { margin-top: 0; padding-top: 0; border-top: 0; }
.more-foot-label { grid-column: 2; font-size: 0.7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; padding-top: 3px; }
.pay-table { grid-column: 2; width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.pay-table td { padding: 6px 0; vertical-align: baseline; }
.pay-date { width: 12ch; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-name { color: var(--ink); }
.pay-receipt { width: 9ch; } .pay-receipt a { color: var(--accent-ink); text-decoration: none; font-weight: 500; font-size: 0.84rem; display: inline-flex; gap: 4px; align-items: center; }
.pay-amount { width: 6ch; text-align: right; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .more-foot { grid-template-columns: 1fr; } .more-foot-label, .pay-table { grid-column: 1; } .pay-receipt { width: auto; } }
