/* Paste Guard site. Same design tokens as the extension (src/theme.js). System fonts only, no external assets.
 * Direction: "The Clear Checkpoint" (see DESIGN.md). One container, one grid, one accent.
 * Motion is CSS only. Every animated element's base style is its FINAL state, so with animation off or failing the
 * page is complete. Only transform and opacity are animated. */
:root { color-scheme: light dark;
  --font: ui-sans-serif, system-ui, "SF Pro Display", "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 80px;
  --r-xs: 6px; --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-pill: 999px;
  /* type scale */
  --t-caption: 13px; --t-ui: 15px; --t-body: 1.0625rem; --t-lede: 1.25rem; --t-title: 1.25rem;
  --t-headline: clamp(1.5rem, 3vw, 2rem); --t-page: clamp(2rem, 4.4vw, 3rem); --t-display: clamp(2.4rem, 5.4vw, 4rem); --t-data: 14px;
  --max: 1120px; --gut: 16px; --head: 64px;
  --accent: #335dff; --accent-strong: #2748d9; --focus: #335dff;
  --bg: #f1f3ff; --surface: #ffffff; --surface2: rgba(25, 40, 120, .05); --line: rgba(30, 45, 120, .14); --grid: rgba(30, 45, 120, .06);
  --text: #0e1330; --muted: #4a5578; --link: #2446d6;
  --ok: #0b7a41; --ok-bg: rgba(15, 150, 80, .10); --bad: #b42f1c; --bad-bg: rgba(220, 70, 50, .10);
  --shadow: 0 4px 12px rgba(20, 30, 90, .10), 0 1px 3px rgba(20, 30, 90, .08);
  --shadow-lg: 0 18px 44px rgba(20, 30, 90, .16), 0 4px 12px rgba(20, 30, 90, .08);
  --ease: cubic-bezier(.2, .8, .2, 1); }
@media (prefers-color-scheme: dark) { :root {
  --bg: #0a0d1c; --surface: #141a36; --surface2: rgba(255, 255, 255, .05); --line: rgba(160, 175, 255, .18); --grid: rgba(160, 175, 255, .06);
  --text: #eef1ff; --muted: #a6aecf; --link: #9db4ff; --focus: #9db4ff;
  --ok: #4be09a; --ok-bg: rgba(75, 224, 154, .14); --bad: #ff8f7e; --bad-bg: rgba(255, 120, 100, .14);
  --shadow: 0 4px 14px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .4);
  --shadow-lg: 0 22px 54px rgba(0, 0, 0, .5), 0 4px 14px rgba(0, 0, 0, .4); } }
@media (min-width: 720px) { :root { --gut: 24px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head) + var(--s4)); accent-color: var(--accent); }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--t-body)/1.65 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
/* browser surfaces carry the palette too */
::selection { background: var(--accent); color: #fff; }
textarea, input { caret-color: var(--accent); }
* { scrollbar-color: color-mix(in srgb, var(--muted) 55%, transparent) transparent; scrollbar-width: thin; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--r-xs); }
img, video { max-width: 100%; }
.skip { position: absolute; left: var(--s4); top: -64px; z-index: 60; padding: var(--s2) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); }
.skip:focus { top: var(--s2); }
.vh, .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

/* ---------- header: sticky, minimal, menu works without JavaScript ---------- */
.site-head { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); view-transition-name: site-head; }
.site-head nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: var(--head); }
.brand { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 800; letter-spacing: -.01em; color: var(--text); text-decoration: none; }
.logo { width: 26px; height: 26px; color: var(--accent); flex: none; }
.links { display: none; gap: var(--s5); margin: 0; padding: 0; list-style: none; font-size: var(--t-ui); font-weight: 600; }
.links a, .menu li a { color: var(--muted); text-decoration: none; padding: var(--s1) 0; border-bottom: 2px solid transparent; transition: color 150ms var(--ease), border-color 150ms var(--ease); }
.links a:hover, .menu li a:hover { color: var(--text); border-bottom-color: var(--line); }
.links a[aria-current="page"], .menu a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.menu summary { list-style: none; cursor: pointer; padding: var(--s2) var(--s4); border: 1px solid var(--line); border-radius: var(--r-pill); font-size: var(--t-ui); font-weight: 600; background: var(--surface); }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { border-color: var(--accent); }
.menu ul { position: absolute; left: 0; right: 0; top: 100%; margin: 0; padding: var(--s3) var(--gut) var(--s5); list-style: none; background: var(--bg); border-bottom: 1px solid var(--line); display: grid; gap: var(--s2); font-size: var(--t-title); font-weight: 600; box-shadow: var(--shadow); }
.menu li a { display: inline-block; padding: var(--s2) 0; }
@media (min-width: 800px) { .links { display: flex; } .menu { display: none; } }

/* ---------- type ---------- */
h1 { margin: 0 0 var(--s4); font-size: var(--t-page); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
h2 { margin: 0 0 var(--s3); font-size: var(--t-headline); line-height: 1.15; font-weight: 750; letter-spacing: -.02em; text-wrap: balance; }
h3 { margin: 0 0 var(--s2); font-size: var(--t-title); line-height: 1.3; font-weight: 700; }
p { margin: 0 0 var(--s4); }
code { font-family: var(--mono); font-size: .88em; padding: 1px 6px; border-radius: var(--r-xs); background: var(--surface2); border: 1px solid var(--line); overflow-wrap: anywhere; }
pre { overflow-x: auto; margin: 0 0 var(--s4); padding: var(--s4); border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); font: var(--t-data)/1.5 var(--mono); }
pre code { padding: 0; border: 0; background: none; }
.note, .muted { color: var(--muted); }
.note { font-size: var(--t-caption); line-height: 1.5; font-weight: 500; }
.tag { font-family: var(--mono); font-size: .86em; padding: 1px 7px; border-radius: var(--r-pill); background: var(--ok-bg); color: var(--ok); font-weight: 700; white-space: nowrap; }
kbd { font: 600 var(--t-caption)/1 var(--mono); padding: 2px 6px; border-radius: var(--r-xs); border: 1px solid currentColor; }

/* ---------- buttons: solid accent, crisp hover and focus ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 24px; border-radius: var(--r-md); font: inherit; font-size: var(--t-ui); font-weight: 700; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background-color 150ms var(--ease), border-color 150ms var(--ease), transform 150ms var(--ease); }
.btn:active { transform: translateY(1px); }
.btn.primary { color: #fff; background: var(--accent); box-shadow: inset 0 -2px 0 var(--accent-strong); }
.btn.primary:hover { background: var(--accent-strong); }
.btn.quiet { color: var(--text); background: var(--surface); border-color: var(--line); }
.btn.quiet:hover { border-color: var(--accent); }
.btn.soon { color: var(--muted); background: transparent; border: 1px dashed var(--line); cursor: default; user-select: none; }
.btn.soon:active { transform: none; }

/* ---------- landing: hero with a live demo ---------- */
.hero { position: relative; isolation: isolate; padding: var(--s7) 0 var(--s8); overflow-x: clip; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px; background-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, canvastext 40%, transparent 100%); mask-image: linear-gradient(to bottom, canvastext 40%, transparent 100%); }
.hero-grid { display: grid; gap: var(--s7); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s8); } .hero { padding-top: var(--s8); } }
.hero h1 { font-size: var(--t-display); line-height: 1.04; letter-spacing: -.035em; }
.lede { max-width: 52ch; font-size: var(--t-lede); line-height: 1.6; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s5) 0 var(--s3); }

.stage-wrap { position: relative; }
.stage { margin: 0; }
.stage-in { position: relative; display: grid; gap: var(--s4); padding: var(--s4); border-radius: var(--r-lg); background: var(--surface2); border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; }
.chat { border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.chat-bar { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s4); border-bottom: 1px solid var(--line); font-size: var(--t-caption); font-weight: 600; color: var(--muted); }
.dots { width: 37px; height: 9px; background: radial-gradient(circle at 4.5px 50%, var(--line) 4.5px, transparent 5px) 0 0 / 14px 9px repeat-x; margin-right: 0; }
.chat-input { display: grid; padding: var(--s4); font: var(--t-ui)/1.6 var(--font); min-height: 56px; }
.chat-input p { grid-area: 1 / 1; margin: 0; overflow-wrap: anywhere; }
.in-before { opacity: 0; }
.in-before mark { position: relative; background: none; color: inherit; }
.in-before mark::after { content: ""; position: absolute; inset: -1px -2px; background: var(--bad-bg); border-bottom: 2px solid var(--bad); border-radius: var(--r-xs); }
.dlg { position: relative; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); padding: var(--s4); }
.dlg-head { display: flex; gap: var(--s3); align-items: center; margin-bottom: var(--s3); }
.dlg-head strong { display: block; font-size: var(--t-ui); }
.dlg-head span:not(.dlg-shield) { display: block; font-size: var(--t-caption); color: var(--muted); line-height: 1.4; }
.dlg-shield, .dlg-ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--bad-bg); color: var(--bad); }
.dlg-ico { width: 30px; height: 30px; }
.dlg-shield svg { width: 20px; height: 20px; } .dlg-ico svg { width: 16px; height: 16px; }
.dlg-rows { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; gap: var(--s2); }
.dlg-rows li { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--surface2); border: 1px solid var(--line); }
.dlg-name { flex: 1; min-width: 0; font-size: var(--t-ui); font-weight: 700; line-height: 1.25; }
.dlg-name small { display: block; font: 500 var(--t-caption)/1.3 var(--mono); color: var(--muted); }
.dlg-x { padding: 1px 8px; border-radius: var(--r-pill); background: var(--bad-bg); color: var(--bad); font-size: var(--t-caption); font-weight: 700; }
.dlg-ign { padding: 3px 10px; border: 1px solid var(--line); border-radius: var(--r-pill); font-size: var(--t-caption); font-weight: 600; color: var(--muted); }
.dlg-mask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s3); padding: var(--s2) var(--s3); border: 1px dashed var(--line); border-radius: var(--r-sm); font-size: var(--t-caption); }
.dlg-mask small { color: var(--muted); font-weight: 600; font-size: var(--t-caption); }
.dlg-mask code { padding: 0; border: 0; background: none; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.b { display: inline-flex; align-items: center; gap: var(--s2); padding: 9px 16px; border-radius: var(--r-sm); background: var(--surface2); border: 1px solid var(--line); font-size: var(--t-ui); font-weight: 700; }
.b.primary { flex: 1 1 100%; justify-content: center; color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.b.ghost { background: none; border-color: transparent; color: var(--muted); }
.stage figcaption { margin-top: var(--s3); font-size: var(--t-caption); line-height: 1.5; color: var(--muted); font-weight: 500; }
.stage figcaption code { font-size: 1em; }
.replay { margin-top: var(--s3); padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--text); font: 600 var(--t-ui)/1.4 var(--font); cursor: pointer; transition: border-color 150ms var(--ease); }
.replay:hover { border-color: var(--accent); }
.replay[hidden] { display: none; }

/* ---------- landing sections: one grid (heading left, content right) ---------- */
.sec { display: grid; gap: var(--s5); padding: var(--s7) 0; border-top: 1px solid var(--line); }
.sec-head { align-self: start; }
.sec-head h2 { margin-bottom: var(--s3); }
.sec-head p { margin-bottom: 0; color: var(--muted); }
@media (min-width: 900px) {
  .sec { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s7); padding: var(--s8) 0 var(--s8); }
  .sec-head { position: sticky; top: calc(var(--head) + var(--s5)); }
}
.sec-body { min-width: 0; margin: 0; }
.feature { list-style: none; padding: 0; display: grid; gap: 0; }
.feature li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--s5); padding: var(--s5) 0; border-top: 1px solid var(--line); }
.feature p { margin: 0; color: var(--muted); }
.f-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); color: var(--accent); transition: transform 150ms var(--ease), border-color 150ms var(--ease); }
.f-ico svg { width: 24px; height: 24px; }
.feature li:hover .f-ico { transform: translateY(-2px); border-color: var(--accent); }

.chip-groups { display: grid; gap: var(--s5); }
.chip-group { position: relative; }
.chip-group h3 { display: flex; align-items: center; min-height: 32px; margin: 0 0 var(--s2); font-size: var(--t-ui); font-weight: 700; color: var(--muted); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2); padding: 0; margin: 0; }
.chips li { margin: 0; }
.chip { padding: 7px 14px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); color: var(--text); font: 600 var(--t-ui)/1.4 var(--font); cursor: default; transition: border-color 150ms var(--ease), background-color 150ms var(--ease), transform 150ms var(--ease); }
.js .chip { cursor: pointer; }
.js .chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.js .chip[aria-pressed="false"]:not(:hover) { transform: none; }
/* one preview panel, fixed height so nothing below it moves; left column on desktop, under the chips on phones */
.preview { height: 168px; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; min-width: 0; }
.preview[hidden] { display: none; }
.pv-body { min-width: 0; }
.pv-name { margin: 0 0 var(--s2); font-size: var(--t-ui); font-weight: 700; line-height: 1.3; }
.pv-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: 0; }
.pv-sample { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 2px 8px; font-size: var(--t-data); }
.pv-arrow { color: var(--muted); }
.pv-hint { margin: 0; font-size: var(--t-caption); color: var(--muted); font-weight: 500; }
.pv-body.swap { animation: pvIn 160ms var(--ease); }
.catches .sec-head { position: static; }
@media (min-width: 900px) {
  .catches { grid-template-rows: auto 1fr; }
  .catches .sec-body { grid-column: 2; grid-row: 1 / span 2; }
  .catches .preview { grid-column: 1; grid-row: 2; align-self: start; position: sticky; top: calc(var(--head) + var(--s5)); }
}
.steps { list-style: none; counter-reset: step; padding: 0; }
.steps > li { position: relative; counter-increment: step; padding: 0 0 var(--s6) 56px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--accent); background: var(--bg); color: var(--link); font-weight: 800; }
.steps > li::after { content: ""; position: absolute; left: 17px; top: 42px; bottom: 6px; width: 2px; background: var(--line); }
.steps > li:last-child { padding-bottom: 0; } .steps > li:last-child::after { display: none; }
.steps h3 { margin-bottom: var(--s2); line-height: 36px; }
.steps p { margin-bottom: var(--s3); }
.mock { max-width: 460px; margin: var(--s3) 0 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); overflow: hidden; }
.mock-tabs { display: flex; gap: var(--s4); padding: 0 var(--s3); border-bottom: 1px solid var(--line); background: var(--surface2); font-size: var(--t-caption); font-weight: 600; color: var(--muted); }
.mock-tabs span { padding: var(--s2) 0; border-bottom: 2px solid transparent; } .mock-tabs .on { color: var(--text); border-bottom-color: var(--accent); }
.mock-bar { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); font-size: var(--t-caption); color: var(--muted); }
.mock-bar .grow { flex: 1; } .rec { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--bad); }
.mock-empty { padding: var(--s6) var(--s3); text-align: center; font-size: var(--t-ui); color: var(--muted); }
.mock figcaption { padding: var(--s2) var(--s3); border-top: 1px solid var(--line); font-size: var(--t-caption); color: var(--muted); }

.sites { display: flex; flex-wrap: wrap; gap: var(--s2); padding: 0; margin: 0 0 var(--s3); list-style: none; }
.sites li { padding: 6px 14px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: var(--t-ui); transition: border-color 150ms var(--ease); }
.sites li:hover { border-color: var(--accent); }
.demo { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); margin-bottom: var(--s3); }
.demo video, .demo img { display: block; width: 100%; height: auto; }
.demo video { aspect-ratio: 960 / 738; background: var(--surface); } /* reserve the poster's size so the page never shifts */
.plain { padding-left: var(--s5); }
.plain li { margin-bottom: var(--s2); }

/* ---------- footer: grouped columns ---------- */
.site-foot { margin-top: var(--s8); padding: var(--s7) 0 var(--s8); border-top: 1px solid var(--line); background: var(--surface2); font-size: var(--t-ui); }
.foot-grid { display: grid; gap: var(--s6) var(--s5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.foot-brand { grid-column: 1 / -1; color: var(--muted); max-width: 40ch; }
.foot-brand p { margin: var(--s3) 0 0; }
.site-foot h2 { margin: 0 0 var(--s3); font-size: var(--t-ui); font-weight: 700; letter-spacing: 0; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.site-foot nav a { color: var(--muted); text-decoration: none; }
.site-foot nav a:hover { color: var(--text); text-decoration: underline; }
.site-foot .fine { margin: var(--s7) 0 0; padding-top: var(--s4); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--t-caption); max-width: 70ch; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .foot-brand { grid-column: auto; } }

/* ---------- reading pages ---------- */
main > .wrap:first-child { padding-top: var(--s6); }
.landing > .wrap:first-child { padding-top: 0; }
.read { max-width: 68ch; min-width: 0; }
.read h1 { margin-bottom: var(--s5); }
.read .summary { font-size: var(--t-lede); line-height: 1.55; color: var(--muted); padding-bottom: var(--s5); border-bottom: 1px solid var(--line); margin-bottom: var(--s5); }
.read h2 { margin-top: var(--s7); }
.read ul, .read ol { padding-left: var(--s5); margin: 0 0 var(--s4); }
.read li { margin-bottom: var(--s2); }
.note-box { margin: var(--s5) 0; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface2); color: var(--muted); font-size: var(--t-ui); }
.cta-box { margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--line); }
.cta-box h2 { margin-top: 0; }
.read-grid { display: grid; gap: var(--s5); }
.toc { font-size: var(--t-ui); }
.toc h2 { margin: 0 0 var(--s2); font-size: var(--t-caption); font-weight: 700; letter-spacing: .02em; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 5px 0 5px var(--s3); margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; transition: color 150ms var(--ease), border-color 150ms var(--ease); }
.toc li a:hover { color: var(--text); border-left-color: var(--accent); }
@media (min-width: 1000px) {
  .read-grid { grid-template-columns: minmax(0, 68ch) 240px; justify-content: space-between; align-items: start; }
  .toc { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--head) + var(--s5)); }
  .read-grid > .read { grid-column: 1; grid-row: 1; }
}
.progress { display: none; position: fixed; z-index: 50; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.wide-table { max-width: none; }
.read.wide-table { max-width: none; }
.read.wide-table > h1, .read.wide-table > .summary, .read.wide-table > p, .read.wide-table > h2, .read.wide-table .cta-box { max-width: 68ch; }
td code { white-space: nowrap; }
table { width: 100%; border-collapse: collapse; font-size: var(--t-ui); margin-bottom: var(--s4); }
th, td { text-align: left; vertical-align: top; padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: 1px solid var(--line); }
thead th { font-size: var(--t-caption); color: var(--muted); }
tbody th { font-weight: 700; }
@media (max-width: 720px) { table, thead, tbody, tr, th, td { display: block; } thead { position: absolute; left: -9999px; } tr { padding: var(--s3) 0; border-bottom: 1px solid var(--line); } th, td { border: 0; padding: 2px 0; } td:nth-child(3)::before { content: "On by default: "; color: var(--muted); } td:nth-child(2)::before { content: "Placeholder: "; color: var(--muted); } }

/* ---------- scanner (a tool: no animation in the results except one gentle fade) ---------- */
.trust { padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--ok-bg); }
.tool { display: grid; gap: var(--s6); grid-template-columns: 1fr; margin: var(--s5) 0; }
@media (min-width: 900px) { .tool { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.tool label:not(.groups label) { display: block; font-weight: 700; margin-bottom: var(--s2); }
textarea { width: 100%; padding: var(--s3); font: var(--t-data)/1.5 var(--mono); color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); resize: vertical; transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin: var(--s3) 0; }
.groups { margin: var(--s4) 0 0; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-sm); display: grid; gap: var(--s2); }
.groups legend { padding: 0 var(--s2); font-weight: 700; font-size: var(--t-ui); }
.groups label { display: flex; gap: var(--s2); align-items: center; font-weight: 500; margin: 0; }
.results h2 { margin: var(--s5) 0 var(--s2); font-size: var(--t-title); }
.results h2:first-child { margin-top: 0; }
.results.has { animation: fade 180ms var(--ease); }
.rows { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.rows li { display: flex; gap: var(--s3); align-items: baseline; padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.rows .prev { font-family: var(--mono); color: var(--muted); }
.rows .times { margin-left: auto; font-weight: 700; color: var(--bad); }
.marked { max-height: 18rem; overflow: auto; padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); white-space: pre-wrap; overflow-wrap: anywhere; font: var(--t-data)/1.5 var(--mono); }
.marked:empty { display: none; }
.marked mark { background: var(--bad-bg); color: var(--bad); border-bottom: 2px solid var(--bad); border-radius: var(--r-xs); padding: 0 3px; font-weight: 700; }
.marked mark .prev { margin-right: 6px; }
.marked mark .tag { background: none; color: inherit; padding: 0; font-weight: 600; }
#output { background: var(--surface2); }

/* ---------- motion: enhancement only ---------- */
@keyframes fade { from { opacity: .4; } }
@keyframes pvIn { from { opacity: 0; transform: translateY(4px); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes rise-soft { from { opacity: .6; transform: translateY(10px); } }
@keyframes beforeLife { 0% { opacity: 0; transform: translateY(6px); } 8% { opacity: 1; transform: none; } 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes afterLife { 0%, 88% { opacity: 0; transform: translateY(4px); } 100% { opacity: 1; transform: none; } }
@keyframes markOn { 0%, 22% { opacity: 0; } 30%, 100% { opacity: 1; } }
@keyframes dlgIn { 0%, 38% { opacity: 0; transform: translateY(24px) scale(.98); animation-timing-function: var(--ease); } 50%, 100% { opacity: 1; transform: none; } }
@keyframes press { 0%, 80% { transform: none; } 84% { transform: scale(.96); } 90%, 100% { transform: none; } }
@keyframes grow { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise-soft 600ms var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 80ms; } .hero-copy > :nth-child(3) { animation-delay: 160ms; } .hero-copy > :nth-child(4) { animation-delay: 220ms; }
  .stage-wrap { animation: rise-soft 700ms var(--ease) 120ms both; }
  .stage .in-before { animation: beforeLife 3.8s linear both; }
  .stage .in-after { animation: afterLife 3.8s linear both; }
  .stage .in-before mark::after { animation: markOn 3.8s linear both; }
  .stage .dlg { animation: dlgIn 3.8s linear both; }
  .stage .dlg-rows li { animation: rise 400ms var(--ease) both; animation-delay: calc(1.95s + var(--i) * 100ms); }
  .stage .dlg-mask { animation: rise 400ms var(--ease) 2.5s both; }
  .stage .b.primary { animation: press 3.8s linear both; }
  .stage.is-reset *, .stage.is-reset *::before, .stage.is-reset *::after { animation: none !important; }
  @supports (animation-timeline: view()) {
    .sec { animation: rise-soft linear both; animation-timeline: view(); animation-range: entry 0% entry 30%; }
  }
  @supports (animation-timeline: scroll()) {
    .progress { display: block; animation: grow linear both; animation-timeline: scroll(root); }
  }
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 160ms; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .replay { display: none; }
}

/* ---------- 1.2.0: home "new" cards and the Restore / Mask this demo ---------- */
.new-grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 800px) { .new-grid { grid-template-columns: 1fr 1fr; } .new-cta { grid-column: 1 / -1; } }
.new-card { padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.new-card h3 { margin: var(--s3) 0 var(--s2); font-size: var(--t-title); }
.new-card p:last-child { margin-bottom: 0; color: var(--muted); }
.new-flow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0; font-family: var(--mono); font-size: var(--t-data); }
.flow-a { padding: 2px 8px; border-radius: var(--r-xs); background: var(--bad-bg); color: var(--bad); font-weight: 700; overflow-wrap: anywhere; }
.flow-b { padding: 2px 8px; border-radius: var(--r-xs); background: var(--surface2); border-bottom: 2px dotted var(--accent); font-weight: 700; overflow-wrap: anywhere; }
.flow-arrow { color: var(--muted); }
.new-cta { margin: var(--s3) 0 0; display: flex; flex-wrap: wrap; gap: var(--s3); }
kbd { font: 600 12px var(--mono); padding: 1px 6px; margin-left: 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: var(--r-xs); background: var(--surface2); color: var(--muted); white-space: nowrap; }

.rd-steps { list-style: none; margin: var(--s5) 0; padding: 0; display: grid; gap: var(--s3); grid-template-columns: 1fr; }
@media (min-width: 800px) { .rd-steps { grid-template-columns: repeat(3, 1fr); } }
.rd-steps li { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.rd-steps p { margin: 2px 0 0; color: var(--muted); font-size: var(--t-ui); }
.rd-n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-weight: 800; }
.rd { display: grid; gap: var(--s5); grid-template-columns: 1fr; margin: var(--s5) 0; }
@media (min-width: 960px) { .rd { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.rd-card { padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.rd-card h2 { margin: 0 0 var(--s3); font-size: var(--t-title); }
.rd-card h3 { margin: var(--s4) 0 var(--s2); font-size: var(--t-ui); }
.rd-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s3); animation: fade 160ms var(--ease); }
.rd-selbar[hidden], .rd-check[hidden], .rd-pill[hidden], .rd-empty[hidden] { display: none; }
.rd-mask { display: inline-flex; align-items: center; gap: var(--s1); padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--accent); background: var(--surface); color: var(--accent); font: inherit; font-size: var(--t-ui); font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.rd-mask:hover { background: var(--accent); color: #fff; } .rd-mask:hover kbd { color: #fff; border-color: rgba(255,255,255,.5); background: transparent; }
.rd-check { margin-top: var(--s4); padding: var(--s4); border: 1px solid var(--accent); border-radius: var(--r-md); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); box-shadow: var(--shadow-lg); }
.rd-check.rd-in { animation: pvIn 220ms var(--ease); }
.rd-check-head { display: flex; align-items: center; gap: var(--s2); color: var(--accent); } .rd-check-head svg { width: 22px; height: 22px; }
.rd-found { list-style: none; margin: var(--s3) 0 0; padding: 0; max-height: 14rem; overflow: auto; }
.rd-found li { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: baseline; padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.rd-found .prev { font-family: var(--mono); color: var(--muted); } .rd-arrow { color: var(--muted); }
.rd-same { font-size: var(--t-caption); color: var(--ok); }
.rd-found .times { margin-left: auto; font-weight: 700; color: var(--bad); }
.rd-status { min-height: 1.6em; margin: var(--s2) 0 0; color: var(--muted); font-size: var(--t-ui); }
.rd-dict { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }
.rd-chips { list-style: none; margin: 0 0 var(--s3); padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.rd-chips li { display: inline-flex; align-items: center; gap: var(--s1); padding: 2px 4px 2px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface2); font-size: var(--t-ui); }
.rd-x { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; width: 28px; height: 28px; border-radius: var(--r-pill); cursor: pointer; } .rd-x:hover { background: var(--bad-bg); color: var(--bad); }
.rd-warn { margin: 0 0 var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--bad-bg); color: var(--bad); font-size: var(--t-ui); }
.rd-small { padding: 7px 14px; font-size: var(--t-caption); }
.rd-switch { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 600; cursor: pointer; }
.rd-switch input { width: 20px; height: 20px; }
.rd-chat { min-height: 14rem; max-height: 22rem; overflow: auto; margin: var(--s3) 0; padding: var(--s3); display: flex; flex-direction: column; gap: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); }
.rd-empty { margin: auto; max-width: 28ch; text-align: center; color: var(--muted); font-size: var(--t-ui); }
.rd-msg { max-width: 92%; padding: var(--s2) var(--s4); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); animation: pvIn 200ms var(--ease); overflow-wrap: anywhere; }
.rd-msg.user { align-self: flex-end; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.rd-who { display: block; font-size: var(--t-caption); color: var(--muted); font-weight: 700; }
.rd-body { white-space: pre-wrap; font-size: var(--t-ui); }
.rd-val { border-bottom: 2px dotted var(--accent); font-weight: 700; }
.rd-pill { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-bottom: var(--s3); padding: 6px 8px 6px 14px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow-lg); font-size: var(--t-ui); font-weight: 600; animation: pvIn 200ms var(--ease); }
.rd-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.rd-chat.rd-ph ~ .rd-pill .rd-dot { background: var(--muted); }
.rd-pill button { font: inherit; font-size: var(--t-caption); font-weight: 700; padding: 5px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface2); color: var(--text); cursor: pointer; }
.rd-pill button:hover { border-color: var(--accent); }
.rd-recv { margin-top: var(--s3); } .rd-recv textarea { background: var(--surface2); margin-top: var(--s2); }
.rd-mem { justify-content: space-between; color: var(--muted); font-size: var(--t-ui); }
.rd-table { width: 100%; border-collapse: collapse; margin: var(--s3) 0 var(--s5); font-size: var(--t-ui); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.rd-table th, .rd-table td { text-align: left; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); vertical-align: top; }
.rd-table thead th { background: var(--surface2); font-size: var(--t-caption); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.rd-table tbody th { font-weight: 700; }
@media (max-width: 640px) { .rd-table { display: block; overflow-x: auto; } }

/* ---- tutorial video page ---- */
.howto { margin: var(--s4, 24px) 0; }
.howto video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 16px; background: #0a0d1c; border: 1px solid var(--border); }
.chap-h { font-size: var(--t-body, 1rem); margin: 20px 0 8px; }
.chaps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chap { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface, transparent); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.chap:hover { border-color: var(--link); } .chap:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.chap-t { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
