/* Fixlog theme tokens. Dark is the default; light is an option the page remembers.
   Every colour pair below is measured by tools/check-theme.mjs. */
:root, html[data-theme="dark"] {
  color-scheme: dark;
  --bg-0: #0c0d10;  --bg-1: #14161a;  --bg-2: #1b1d22;  --bg-3: #24272e;  --bg-4: #2e323a;
  --bg-code: #08090b;  --text-code: #f3f4f6;
  --text-1: #f3f4f6;  --text-2: #b9bdc7;  --text-3: #8f95a3;  --text-off: #646a77;
  --line-1: #262930;  --line-2: #6e7482;
  --accent: #f0282d;  --accent-fill: #d91f25;  --accent-fill-hover: #e2242a;  --accent-fill-press: #b8181d;
  --accent-text: #ff6f72;  --on-accent: #ffffff;
  --ok: #4ccb7a;  --ok-bg: #10261a;  --warn: #f2b84b;  --warn-bg: #2a2008;  --err: #ff8a8c;  --err-bg: #2c1214;
  --star: #f5c04e;  --focus: #ffffff;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg-0: #f5f5f7;  --bg-1: #ffffff;  --bg-2: #ffffff;  --bg-3: #ebecef;  --bg-4: #dcdee3;
  --bg-code: #1b1d22;
  --text-1: #1b1d22;  --text-2: #4a4f5a;  --text-3: #5f6470;  --text-off: #9a9fab;
  --line-1: #dcdee3;  --line-2: #70757f;
  --accent-text: #c4161c;
  --ok: #126e34;  --ok-bg: #e3f6ea;  --warn: #8a5a00;  --warn-bg: #fdf1d3;  --err: #b3141a;  --err-bg: #fde8e8;
  --star: #8a5a00;  --focus: #1b1d22;
}
/* The same for both themes. */
:root {
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px;  --s-4: 16px;  --s-5: 24px;  --s-6: 32px;  --s-7: 48px;  --s-8: 64px;
  --r-1: 6px;  --r-2: 10px;  --r-3: 14px;  --r-pill: 999px;
  --m-fast: 120ms;  --m-base: 200ms;  --m-slow: 280ms;  --m-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-ui: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

/* Fonts. Both under the SIL Open Font License 1.1 (fonts/OFL.txt). Stored in the repo, never fetched. */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/geist-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
}

/* Type scale: size / line height. 1rem is 16 px. Nothing is smaller than --t-label. */
:root {
  --t-display: 1.875rem/2.25rem;
  --t-h1: 1.5rem/1.875rem;
  --t-h2: 1.25rem/1.625rem;
  --t-title: 1.125rem/1.5rem;
  --t-read: 1.125rem/1.75rem;
  --t-body: 1rem/1.5rem;
  --t-meta: 0.875rem/1.25rem;
  --t-label: 0.75rem/1rem;
  --t-code: 0.875rem/1.375rem;
  --t-tag: 0.8125rem/1.125rem;
  --bar-h: 56px;
  --tabs-h: 57px;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text-1);
  font: 400 var(--t-body) var(--font-ui);
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom));
}
h1, h2, h3, p { margin: 0; }
h1 { font: 700 var(--t-h1) var(--font-ui); letter-spacing: -0.01em; margin: var(--s-5) 0 var(--s-4); }
h1:focus { outline: none; }
h2 { font: 600 var(--t-h2) var(--font-ui); margin: var(--s-6) 0 var(--s-3); }
h3 { font: 600 var(--t-title) var(--font-ui); }
p { margin: 0 0 var(--s-4); }
pre, code { font-family: var(--font-mono); }
.icon { width: 24px; height: 24px; flex: none; }
.icon-s { width: 16px; height: 16px; flex: none; }

/* Skip link: hidden until it has focus. */
.skip {
  position: absolute; left: var(--s-2); top: var(--s-2); z-index: 30;
  transform: translateY(-200%);
  background: var(--bg-3); color: var(--text-1);
  padding: var(--s-3) var(--s-4); border-radius: var(--r-2);
  font-weight: 600; text-decoration: none;
}
.skip:focus { transform: none; }

/* Notice: plain small text that scrolls away. */
.notice { background: var(--bg-0); color: var(--text-3); font: 500 var(--t-label) var(--font-ui); text-align: center; padding: var(--s-1) var(--s-4); margin: 0; }

/* Top bar */
.bar {
  position: sticky; top: 0; z-index: 20;
  min-height: var(--bar-h);
  background: var(--bg-2);
  border-bottom: 1px solid var(--line-1);
}
.bar-in { min-height: var(--bar-h); max-width: 1120px; margin: 0 auto; padding: 0 var(--s-4); display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s-2); }
.bar-in > .logo, .bar-in > .back { min-height: var(--bar-h); }

/* Search box: in the top bar. Under 900 px a second bar row, on Home only. */
.qbox { position: relative; order: 9; flex: 1 0 100%; display: none; margin: 0 0 var(--s-3); }
body[data-screen="home"] .qbox { display: block; }
.qbox input {
  height: 52px; min-height: 52px; margin: 0;
  padding: 0 52px 0 44px;
  background: var(--bg-1); border-radius: var(--r-2);
  -webkit-appearance: none; appearance: none;
}
.qbox input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.qicon { position: absolute; left: 12px; top: 14px; color: var(--text-3); pointer-events: none; }
.qclear {
  position: absolute; right: 4px; top: 4px;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-1);
  display: grid; place-items: center;
  background: transparent; color: var(--text-2); cursor: pointer;
}
.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.logo { display: inline-flex; align-items: center; min-height: 44px; border-radius: var(--r-1); }
.logo img { width: 83px; height: 28px; display: block; }
.logo-light { display: none !important; }
html[data-theme="light"] .logo-dark { display: none !important; }
html[data-theme="light"] .logo-light { display: block !important; }
.back {
  display: none; align-items: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-3) 0 var(--s-2); margin-left: calc(-1 * var(--s-2));
  color: var(--text-1); text-decoration: none; font-weight: 600; border-radius: var(--r-2);
}
body[data-screen="card"] .logo { display: none; }
body[data-screen="card"] .back { display: inline-flex; }
.top { display: none; }
.top a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3);
  color: var(--text-2); text-decoration: none; font-weight: 500; border-radius: var(--r-2);
}
.top a[aria-current="page"]:not(.btn) { color: var(--text-1); }

/* Tab bar (phones and tablets) */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--bg-2);
  border-top: 1px solid var(--line-1);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; justify-content: center;
}
.tabs a {
  flex: 1; max-width: 180px; min-height: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-1);
  color: var(--text-3); text-decoration: none;
  font: 500 var(--t-label) var(--font-ui);
  border-top: 3px solid transparent;
}
.tabs a[aria-current="page"] { color: var(--text-1); border-top-color: var(--accent); }

/* Layout */
main { max-width: 1120px; margin: 0 auto; padding: 0 var(--s-4) var(--s-6); }
.screen { display: none; max-width: 720px; margin: 0 auto; }
.screen.on { display: block; }
@media (min-width: 600px) {
  main, .bar-in { padding-left: var(--s-5); padding-right: var(--s-5); }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabs { display: none; }
  main, .bar-in { padding-left: var(--s-6); padding-right: var(--s-6); }
  .top { display: flex; align-items: center; gap: var(--s-1); flex: 1; }
  .top .end { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
  .top .btn { min-height: 44px; width: auto; }
  .bar-in { flex-wrap: nowrap; }
  .top { flex: none; order: 3; }
  .top .end { margin-left: var(--s-2); }
  .qbox, body[data-screen="home"] .qbox { display: block; order: 2; flex: 1 1 auto; max-width: 480px; margin: var(--s-1) auto; }
  h1 { font: 700 var(--t-display) var(--font-ui); letter-spacing: -0.01em; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5);
  border: 0; border-radius: var(--r-2);
  background: var(--accent-fill); color: var(--on-accent);
  font: 600 var(--t-body) var(--font-ui); white-space: nowrap;
  cursor: pointer; text-decoration: none;
  transition: background-color var(--m-fast) var(--m-ease), transform var(--m-fast) var(--m-ease);
}
.btn:active { background: var(--accent-fill-press); transform: scale(0.98); }
.btn.ghost { background: var(--bg-3); color: var(--text-1); border: 1px solid var(--line-2); }
.btn.ghost:active, .btn.ghost[aria-pressed="true"] { background: var(--bg-4); }
.btn.block { display: flex; width: 100%; }
.mt { margin-top: var(--s-4); }

/* Inputs */
label { display: block; font: 500 var(--t-meta) var(--font-ui); color: var(--text-2); margin: var(--s-4) 0 var(--s-1); }
input, textarea, select {
  width: 100%; min-height: 48px;
  font: 400 var(--t-body) var(--font-ui); font-size: 16px;
  padding: var(--s-3);
  border: 1px solid var(--line-2); border-radius: var(--r-2);
  background: var(--bg-1); color: var(--text-1);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
.search { display: flex; gap: var(--s-2); margin-bottom: var(--s-4); }

/* Focus: one ring for every link, button, input and card. */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .fix:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
input:focus:not(:focus-visible), textarea:focus:not(:focus-visible), select:focus:not(:focus-visible) { outline: none; }

/* Cards and content */
.tag { background: var(--bg-3); color: var(--text-2); border-radius: var(--r-1); padding: var(--s-1) var(--s-2); font: 500 var(--t-tag) var(--font-mono); }
.chip { border: 1px solid var(--line-1); border-radius: var(--r-1); padding: var(--s-1) var(--s-2); font: 500 var(--t-meta) var(--font-ui); color: var(--text-2); }
.stars { color: var(--star); letter-spacing: 1px; }
.mute { color: var(--text-2); font: 400 var(--t-meta) var(--font-ui); }
.num { font-variant-numeric: tabular-nums; }
pre { background: var(--bg-code); color: var(--text-code); padding: var(--s-3); border-radius: var(--r-2); overflow: auto; white-space: pre-wrap; word-break: break-all; font: 400 var(--t-code) var(--font-mono); margin: var(--s-2) 0; }
.conf { border-top: 1px solid var(--line-1); padding: var(--s-3) 0; }
.avatar { width: var(--s-8); height: var(--s-8); border-radius: 50%; background: var(--bg-4); color: var(--text-1); display: grid; place-items: center; font: 700 var(--t-h1) var(--font-ui); }
.warn { background: var(--warn-bg); color: var(--warn); border-radius: var(--r-2); padding: var(--s-3); font: 400 var(--t-meta) var(--font-ui); }
.appearance { display: flex; gap: var(--s-2); }
.appearance .btn { flex: 1; }
.rate { font-size: 1.875rem; line-height: 2.25rem; }

/* Home: tag chips, sort, count line, rows, loading and empty states. */
.home-side { margin-bottom: var(--s-4); }
.side-h { font: 500 var(--t-meta) var(--font-ui); color: var(--text-2); margin: 0 0 var(--s-2); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.fchip {
  min-height: 44px; min-width: 44px; padding: 0 var(--s-3);
  display: inline-flex; align-items: center; gap: var(--s-1);
  border: 1px solid var(--line-2); border-radius: var(--r-pill);
  background: var(--bg-1); color: var(--text-2);
  font: 500 var(--t-tag) var(--font-mono); cursor: pointer;
  transition: background-color var(--m-fast) var(--m-ease);
}
.fchip.more { font-family: var(--font-ui); font-size: 0.875rem; }
.fchip[aria-pressed="true"] { background: var(--bg-4); color: var(--text-1); border-color: var(--text-1); }
.sort { margin-top: var(--s-2); }
.sort label { margin-top: var(--s-3); }
.count { color: var(--text-2); font: 500 var(--t-meta) var(--font-ui); margin: 0 0 var(--s-3); font-variant-numeric: tabular-nums; }
#feed { display: flex; flex-direction: column; gap: var(--s-3); }

.fix {
  display: flex; flex-direction: column; gap: var(--s-2);
  min-height: 88px; min-width: 0; padding: var(--s-4);
  background: var(--bg-1); border: 1px solid var(--line-1); border-radius: var(--r-3);
  color: var(--text-1); text-decoration: none;
  transition: background-color var(--m-fast) var(--m-ease), transform var(--m-fast) var(--m-ease);
}
.fix:active { background: var(--bg-4); transform: scale(0.99); }
.fix-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); flex-wrap: wrap; }
.fix-title {
  font: 600 var(--t-title) var(--font-ui); margin: 0;
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.fix-sym { display: block; color: var(--text-2); font: 400 var(--t-meta) var(--font-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fix-foot { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); min-width: 0; }
.fix-foot .chip { overflow-wrap: anywhere; }
.fix .tag { overflow-wrap: anywhere; }
.by { margin-left: auto; color: var(--text-3); display: inline-flex; }
.pill { display: inline-flex; align-items: center; gap: var(--s-1); border-radius: var(--r-pill); padding: 2px var(--s-3) 2px var(--s-2); font: 500 var(--t-meta) var(--font-ui); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill-un { background: var(--bg-3); color: var(--text-2); }
.pill-au { background: var(--bg-3); color: var(--text-1); }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-dis { background: var(--warn-bg); color: var(--warn); }
.rate { display: inline-flex; align-items: center; gap: var(--s-1); font: 500 var(--t-meta) var(--font-ui); font-variant-numeric: tabular-nums; }
.rate .star { color: var(--star); }
.rate-n { color: var(--text-1); }
.rate-c { color: var(--text-3); }
mark { background: var(--bg-4); color: var(--text-1); border-radius: var(--r-1); padding: 0 2px; }

.skel { pointer-events: none; animation: pulse 1.2s ease-in-out infinite alternate; }
.sk { display: block; height: 14px; border-radius: var(--r-1); background: var(--bg-3); }
.sk-top { width: 40%; }
.sk-title { width: 85%; height: 20px; }
.sk-line { width: 70%; }
.sk-foot { width: 50%; }
@keyframes pulse { from { opacity: 1; } to { opacity: 0.45; } }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-2); padding: var(--s-6) var(--s-4); background: var(--bg-1); border: 1px solid var(--line-1); border-radius: var(--r-3); }
.empty-icon { width: 40px; height: 40px; color: var(--text-3); }
.empty-h { font: 600 var(--t-title) var(--font-ui); margin: 0; }
.empty-p { color: var(--text-2); margin: 0 0 var(--s-2); }
.empty .btn { white-space: normal; text-align: center; }
.clear-tag { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-2); color: var(--accent-text); font-weight: 600; border-radius: var(--r-1); }

dialog { width: min(480px, calc(100vw - 32px)); max-height: 80vh; padding: var(--s-5); border: 1px solid var(--line-2); border-radius: var(--r-3); background: var(--bg-2); color: var(--text-1); }
dialog::backdrop { background: rgb(0 0 0 / 0.6); }
dialog h2 { margin-top: 0; }

@media (min-width: 900px) {
  #home { max-width: none; }
  .home-grid { display: grid; grid-template-columns: minmax(0, 720px) 320px; justify-content: space-between; column-gap: var(--s-6); align-items: start; }
  .home-main { grid-column: 1; grid-row: 1; min-width: 0; }
  .home-side { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--bar-h) + var(--s-5)); margin: 0; }
}

/* Fix card (job ux4). Phone: one column in the reader's order, an action bar in place of the tabs.
   From 900 px: the card on the left, a sticky column on the right. */
:root { --act-h: 73px; }
body[data-bar] { padding-bottom: calc(var(--act-h) + env(safe-area-inset-bottom)); }
body[data-bar] .tabs { display: none; }
.cd { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "top pill" "title title" "author author" "match match" "rate rate" "body body"; column-gap: var(--s-2); align-items: center; padding-top: var(--s-4); }
.cd-side { display: contents; }
.cd-top { grid-area: top; min-width: 0; }
.cd-pill { grid-area: pill; justify-self: start; min-width: 0; }
.cd-title { grid-area: title; font: 700 var(--t-h1) var(--font-ui); margin: var(--s-3) 0 var(--s-3); overflow-wrap: anywhere; }
.cd-author { grid-area: author; min-width: 0; }
.cd-rate { grid-area: rate; margin-top: var(--s-2); }
.cd-chips { display: none; }
.cd-body { grid-area: body; min-width: 0; }
.cd-tag { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; max-width: 100%; text-decoration: none; border-radius: var(--r-1); }
.cd-tag .tag { overflow-wrap: anywhere; }
.cd .pill { white-space: normal; }

.who { display: flex; align-items: center; gap: var(--s-2); min-width: 0; }
.who-c { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--bg-4); color: var(--text-1); display: grid; place-items: center; font: 600 var(--t-meta) var(--font-ui); }
.who-t { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 var(--s-1); min-width: 0; font: 400 var(--t-meta) var(--font-ui); color: var(--text-2); overflow-wrap: anywhere; }
.who-t .icon-s { color: var(--text-3); }
.who-n { color: var(--text-1); font-weight: 600; }
.who-k { margin-left: calc(-1 * var(--s-1)); }
.who-d { color: var(--text-3); }

.cf { margin: var(--s-5) 0 0; overflow-wrap: anywhere; }
.cf-h { font: 500 var(--t-label) var(--font-ui); color: var(--text-3); margin: 0 0 var(--s-1); }
.cf p { margin: 0; }
.cf-sym p { font: 400 var(--t-read) var(--font-ui); color: var(--text-1); }
.cf-setup p, .cf-step p, .cf-check > p { font: 400 var(--t-body) var(--font-ui); color: var(--text-1); }
.cf-fix { background: var(--bg-1); border-radius: var(--r-3); padding: 16px; border-left: 3px solid var(--accent); }
.cf-fix p { font: 400 var(--t-read) var(--font-ui); color: var(--text-1); }

.code { position: relative; margin: var(--s-3) 0 0; }
.code pre { margin: 0; padding: var(--s-3) 52px var(--s-3) var(--s-3); background: var(--bg-code); color: var(--text-code); border-radius: var(--r-1); font: 400 var(--t-code) var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; overflow: visible; }
.copy { position: absolute; top: 0; right: 0; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-1); display: grid; place-items: center; background: transparent; color: var(--text-code); cursor: pointer; }
.safe { display: flex; gap: var(--s-2); align-items: flex-start; margin: var(--s-3) 0 0; color: var(--text-3); font: 400 var(--t-meta) var(--font-ui); }
.safe .icon-s { margin-top: 2px; }
.safe-warn { background: var(--warn-bg); color: var(--warn); border-radius: var(--r-2); padding: var(--s-3); }

.cd-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: var(--s-2); align-items: center; background: var(--bg-2); border-top: 1px solid var(--line-1); padding: 12px var(--s-4) calc(12px + env(safe-area-inset-bottom)); }
.cd-worked { flex: 1; }
.cd-md { width: 48px; min-width: 48px; padding: 0; flex: none; }
.cd-done { flex: 1; margin: 0; min-height: 48px; display: flex; align-items: center; justify-content: center; color: var(--ok); font-weight: 600; }

.confs-h { margin: var(--s-6) 0 var(--s-2); display: flex; align-items: baseline; gap: var(--s-2); }
.confs-n { color: var(--text-3); font-variant-numeric: tabular-nums; }
.confs { list-style: none; margin: 0; padding: 0; }
.conf { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); padding: var(--s-4) 0; overflow-wrap: anywhere; }
.conf:focus { outline: none; }
.conf-chips { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.conf-stars { display: inline-flex; gap: 2px; }
.conf-stars .star { color: var(--star); }
.conf-stars .star-off { color: var(--bg-4); }
.conf-no { display: inline-flex; align-items: center; gap: var(--s-1); color: var(--warn); font: 600 var(--t-meta) var(--font-ui); }
.conf-note { margin: 0; color: var(--text-1); }
.conf-date { margin: 0; color: var(--text-3); font: 400 var(--t-meta) var(--font-ui); }
.conf-none { color: var(--text-2); margin: 0; }
.show-all { margin-top: var(--s-2); }

.notfound { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); padding-top: var(--s-6); }
.notfound h1 { margin: 0; }

.toast { position: fixed; z-index: 40; left: var(--s-4); right: var(--s-4); bottom: calc(var(--tabs-h) + var(--s-3) + env(safe-area-inset-bottom)); display: none; padding: var(--s-3) var(--s-4); background: var(--bg-2); color: var(--text-1); border: 1px solid var(--line-1); border-radius: var(--r-3); box-shadow: 0 16px 48px rgb(0 0 0 / 0.6); font: 500 var(--t-body) var(--font-ui); }
body[data-bar] .toast { bottom: calc(var(--act-h) + var(--s-3) + env(safe-area-inset-bottom)); }
.toast.on { display: block; }

@media (min-width: 900px) {
  body[data-bar] { padding-bottom: 0; }
  #card { max-width: none; }
  .cd { grid-template-columns: minmax(0, 720px) 320px; grid-template-areas: none; justify-content: space-between; column-gap: var(--s-6); align-items: start; }
  .cd-top { grid-column: 1; grid-row: 1; }
  .cd-title { grid-column: 1; grid-row: 2; font: 700 var(--t-display) var(--font-ui); }
  .cd-body { grid-column: 1; grid-row: 3; }
  .cd-side { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4); grid-column: 2; grid-row: 1 / span 3; position: sticky; top: calc(var(--bar-h) + var(--s-5)); padding: var(--s-4); background: var(--bg-1); border: 1px solid var(--line-1); border-radius: var(--r-3); }
  .cd-pill, .cd-author, .cd-match, .cd-rate { grid-area: auto; margin: 0; }
  .cd-actions { position: static; width: 100%; padding: 0; background: none; border: 0; }
  .cd-chips { display: flex; flex-wrap: wrap; gap: var(--s-1); }
  .toast, body[data-bar] .toast { left: auto; right: var(--s-5); bottom: var(--s-5); max-width: 360px; }
}

/* Hover: only where a pointer can hover. One layer up. */
@media (hover: hover) {
  .btn:hover { background: var(--accent-fill-hover); }
  .btn.ghost:hover { background: var(--bg-4); }
  .top a:not(.btn):hover, .back:hover, .tabs a:hover { color: var(--text-1); }
  .btn:active { background: var(--accent-fill-press); }
  .btn.ghost:active { background: var(--bg-4); }
  .fix:hover, .fchip:hover { background: var(--bg-3); }
  .fix:active { background: var(--bg-4); }
  .qclear:hover { color: var(--text-1); background: var(--bg-3); }
  .copy:hover { background: rgb(255 255 255 / 0.12); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .btn:active, .fix:active { transform: none; }
  .skel { animation: none !important; opacity: 0.7; }
}

/* The confirm step (job ux5). One dialog: a sheet at the bottom under 900 px, centred from 900 px. */
.btn.quiet { background: transparent; color: var(--text-2); border: 0; }
.cd-no { flex: none; padding: 0 var(--s-4); }
.cd-done { gap: var(--s-2); }
.cd-done .icon { color: var(--ok); }
.cd-done:focus { outline: none; }
.cd-reported, .cd-reported .icon { color: var(--warn); }
.cd-own { flex: 1; margin: 0; min-height: 48px; display: flex; align-items: center; color: var(--text-3); font: 400 var(--t-meta) var(--font-ui); }

dialog.sheet {
  padding: 0; border: 1px solid var(--line-1); background: var(--bg-2); color: var(--text-1);
  max-height: 90dvh; overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 16px 48px rgb(0 0 0 / 0.6);
}
dialog.sheet::backdrop { background: rgb(0 0 0 / 0.6); }
dialog.sheet[open]::backdrop { animation: sheet-fade var(--m-slow) var(--m-ease); }
.sheet-in { padding: var(--s-5) var(--s-4) calc(var(--s-5) + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--s-4); }
.sheet-head { display: flex; align-items: flex-start; gap: var(--s-2); }
.sheet-head h2 { flex: 1; margin: 0; font: 600 var(--t-h2) var(--font-ui); padding-top: 9px; }
.sheet-x { width: 44px; height: 44px; flex: none; padding: 0; border: 0; border-radius: var(--r-1); display: grid; place-items: center; background: transparent; color: var(--text-2); cursor: pointer; margin: 0 calc(-1 * var(--s-2)) 0 0; }
.sheet-check { background: var(--bg-1); border: 1px solid var(--line-1); border-radius: var(--r-2); padding: var(--s-3); overflow-wrap: anywhere; }
.sheet-check p { margin: 0; }
.sheet-check-h { font: 500 var(--t-label) var(--font-ui); color: var(--text-3); margin-bottom: var(--s-1) !important; }
.sheet-check pre { margin: var(--s-2) 0 0; border-radius: var(--r-1); }
.sheet-row { display: flex; flex-direction: column; gap: var(--s-2); }
.sheet-say { margin: 0; color: var(--text-1); }

.stars-in { border: 0; margin: 0; padding: 0; min-width: 0; }
.stars-in legend { padding: 0; margin: 0 0 var(--s-2); font: 600 var(--t-body) var(--font-ui); color: var(--text-1); }
.stars-row { display: flex; gap: var(--s-1); }
.stars-row input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.stars-row label { width: 44px; height: 44px; margin: 0; display: grid; place-items: center; border-radius: var(--r-1); color: var(--text-off); cursor: pointer; }
.stars-row label.on { color: var(--star); }
.star-i { width: 44px; height: 44px; display: block; }
.stars-row input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 0; }

.sheet-line label { margin: 0 0 var(--s-1); font: 600 var(--t-body) var(--font-ui); color: var(--text-1); }
.help { margin: 0 0 var(--s-2); color: var(--text-2); font: 400 var(--t-meta) var(--font-ui); }
.help-n { margin: var(--s-1) 0 0; text-align: right; color: var(--text-3); font-variant-numeric: tabular-nums; }

.field-err { display: none; }
.field-err.on { display: flex; align-items: flex-start; gap: var(--s-2); margin-top: var(--s-2); padding: var(--s-2) var(--s-3); background: var(--err-bg); color: var(--err); border-radius: var(--r-2); font: 500 var(--t-meta) var(--font-ui); }
.field-err .icon { width: 20px; height: 20px; }

.toast-err { display: flex; border-radius: var(--r-3); box-shadow: 0 16px 48px rgb(0 0 0 / 0.6); font: 500 var(--t-body) var(--font-ui); align-items: center; gap: var(--s-2); position: fixed; z-index: 2; left: var(--s-4); right: var(--s-4); top: var(--s-4); bottom: auto; padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4); background: var(--err-bg); color: var(--err); border: 1px solid var(--err); }
.toast-err[hidden] { display: none; }
.toast-err span { flex: 1; }
.toast-x { width: 44px; height: 44px; flex: none; padding: 0; border: 0; border-radius: var(--r-1); display: grid; place-items: center; background: transparent; color: var(--err); cursor: pointer; }

@media (max-width: 899.98px) {
  dialog.sheet {
    position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%;
    border-width: 1px 0 0; border-radius: var(--r-3) var(--r-3) 0 0;
  }
  dialog.sheet[open] { animation: sheet-up var(--m-slow) var(--m-ease); }
}
@media (min-width: 900px) {
  dialog.sheet { width: 480px; max-width: calc(100vw - 64px); margin: auto; border-radius: var(--r-3); }
  dialog.sheet[open] { animation: sheet-fade var(--m-slow) var(--m-ease); }
  .sheet-in { padding: var(--s-5); }
  .sheet-row { flex-direction: row; }
  .sheet-row .btn { flex: 1; }
  .cd-actions { flex-wrap: wrap; }
  .cd-no { flex: 1; }
  .toast-err { left: auto; right: var(--s-5); top: var(--s-5); max-width: 400px; }
}
@media (hover: hover) {
  .btn.quiet:hover { background: var(--bg-3); color: var(--text-1); }
  .sheet-x:hover { background: var(--bg-3); color: var(--text-1); }
  .stars-row label:hover { background: var(--bg-3); }
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-fade { from { opacity: 0; } to { opacity: 1; } }

/* The one larger motion: after a good Send the check draws in and the pill fades to its new words, 400 ms. */
.cd-done.just .icon path { stroke-dasharray: 24; animation: draw-in 400ms var(--m-ease) both; }
.pill.just { animation: sheet-fade 400ms var(--m-ease) both; }
@keyframes draw-in { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  dialog.sheet[open], dialog.sheet[open]::backdrop, .cd-done.just .icon path, .pill.just { animation: none !important; }
}
@media (max-width: 479.98px) {
  .cd-actions .cd-worked, .cd-actions .cd-no { flex: 1 1 0; min-width: 0; padding: 0 var(--s-2); }
  .cd-actions .cd-worked .icon, .cd-actions .cd-no .icon { display: none; }
}
@media (max-width: 359.98px) {
  .cd-actions { gap: var(--s-1); padding-left: var(--s-3); padding-right: var(--s-3); }
  .cd-actions .cd-worked, .cd-actions .cd-no { padding: 0 var(--s-1); font-size: 0.9375rem; }
}

/* The post form (job ux6): one box per field, its problems under it in the checker's words. */
.post-lead { color: var(--text-2); font: 400 var(--t-body) var(--font-ui); margin: 0 0 var(--s-4); }
.post-side { display: none; }
.draft-line { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin: 0 0 var(--s-2); padding: var(--s-1) var(--s-1) var(--s-1) var(--s-3); background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--r-2); color: var(--text-2); font: 500 var(--t-meta) var(--font-ui); }
.draft-line[hidden] { display: none; }
.draft-line .btn.quiet { min-height: 44px; padding: 0 var(--s-3); }
.pf { margin: 0 0 var(--s-2); }
.pf label { margin: var(--s-4) 0 var(--s-1); font: 600 var(--t-body) var(--font-ui); color: var(--text-1); }
.pf .help { margin: 0 0 var(--s-2); }
.pf .help code { font: 500 var(--t-tag) var(--font-mono); color: var(--text-1); }
.pf .help-n { margin: var(--s-1) 0 0; }
#f textarea { resize: vertical; display: block; line-height: 1.5rem; }
#f textarea.mono { font-family: var(--font-mono); }
#f input[aria-invalid="true"], #f textarea[aria-invalid="true"] { border-color: var(--accent); }
#f .field-err.on { display: block; }
.err-one { display: flex; align-items: flex-start; gap: var(--s-2); margin: 0; }
.err-one + .err-one { margin-top: var(--s-2); }
.err-one .icon { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.err-what, .err-fix { display: block; }
.err-fix { font-weight: 400; }
.tick { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; margin: var(--s-5) 0 var(--s-2); font: 500 var(--t-body) var(--font-ui); color: var(--text-1); cursor: pointer; }
.tick input { width: 24px; height: 24px; min-height: 0; margin: 0; padding: 0; flex: none; accent-color: var(--accent-fill); cursor: pointer; }
.filled { margin: var(--s-4) 0 var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line-1); border-radius: var(--r-2); background: var(--bg-1); }
.filled-h { margin: 0 0 var(--s-2); font: 500 var(--t-label) var(--font-ui); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.filled dl { margin: 0; display: grid; gap: var(--s-2); }
.filled dl div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-1) var(--s-3); }
.filled dt { color: var(--text-2); font: 400 var(--t-meta) var(--font-ui); }
.filled dd { margin: 0; color: var(--text-1); font: 500 var(--t-meta) var(--font-mono); }
.post-note { color: var(--text-3); font: 400 var(--t-meta) var(--font-ui); margin: 0 0 var(--s-3); }
#f-err.on { margin: 0 0 var(--s-3); }
.post-count { color: var(--err); font: 600 var(--t-body) var(--font-ui); margin: 0 0 var(--s-3); }
.post-count:empty { display: none; }
.posted { margin: var(--s-4) 0; padding: var(--s-5) var(--s-4); background: var(--ok-bg); color: var(--ok); border-radius: var(--r-3); display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); }
.posted[hidden] { display: none; }
.posted-h { display: flex; align-items: center; gap: var(--s-2); font: 600 var(--t-title) var(--font-ui); margin: 0; }
.posted-h:focus { outline: none; }
.posted-h .icon { width: 24px; height: 24px; flex: none; }
.posted-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--ok); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 900px) {
  #post { max-width: 1072px; }
  .post-grid { display: grid; grid-template-columns: minmax(0, 720px) 320px; gap: var(--s-6); align-items: start; }
  .post-side { display: block; position: sticky; top: calc(var(--bar-h) + var(--s-5)); margin-top: var(--s-4); padding: var(--s-4); border: 1px solid var(--line-1); border-radius: var(--r-3); background: var(--bg-1); }
  .post-side .side-h { margin: 0 0 var(--s-3); }
  .post-side p { color: var(--text-2); font: 400 var(--t-meta) var(--font-ui); margin: 0; padding: var(--s-2) 0; border-top: 1px solid var(--line-1); }
  .posted .btn { width: auto; }
}

/* Paste and preview (job ux7): a pasted Markdown card fills the boxes; the draft is seen as a card before it posts. */
.paste { margin: 0 0 var(--s-2); padding: var(--s-4); background: var(--bg-1); border: 1px solid var(--line-1); border-radius: var(--r-3); }
.paste-h { margin: 0 0 var(--s-1); font: 600 var(--t-title) var(--font-ui); color: var(--text-1); }
.paste .help { margin: 0; }
.paste label { margin: var(--s-3) 0 var(--s-1); font: 600 var(--t-body) var(--font-ui); color: var(--text-1); }
#f #md { background: var(--bg-0); font-family: var(--font-mono); resize: vertical; }
.paste-go { margin-top: var(--s-3); }
.paste-say { margin: var(--s-3) 0 0; color: var(--text-1); font: 500 var(--t-meta) var(--font-ui); overflow-wrap: anywhere; }
.paste-say:empty { display: none; }
.paste-ask { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); padding: var(--s-3); background: var(--warn-bg); border-radius: var(--r-2); }
.paste-ask[hidden] { display: none; }
.paste-ask p { flex: 1 1 100%; margin: 0; color: var(--warn); font: 600 var(--t-meta) var(--font-ui); }
.paste-ask .btn { flex: 1 1 0; min-width: 0; padding: 0 var(--s-3); }
.paste code { font: 500 var(--t-tag) var(--font-mono); }
#f .is-filled { border-left: 3px solid var(--ok); }
.pv[hidden] { display: none; }
.pv-strip { display: flex; align-items: center; gap: var(--s-2); margin: 0; padding: var(--s-3) var(--s-4); background: var(--bg-3); color: var(--text-1); border-radius: var(--r-2); font: 600 var(--t-body) var(--font-ui); }
.pv-strip:focus { outline: none; }
.pv-strip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pv-strip .icon { width: 24px; height: 24px; flex: none; }
.pv-row { display: flex; flex-direction: column; gap: var(--s-2); margin: var(--s-5) 0 var(--s-3); }
.pv-row .btn { width: 100%; }
@media (min-width: 900px) {
  /* The preview keeps the form's left column, so the card uses its one-column layout here. */
  .pv .cd { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "top pill" "title title" "author author" "match match" "rate rate" "body body"; column-gap: var(--s-2); align-items: center; }
  .pv .cd-side { display: contents; }
  .pv .cd-top { grid-area: top; }
  .pv .cd-pill { grid-area: pill; justify-self: start; }
  .pv .cd-title { grid-area: title; }
  .pv .cd-author { grid-area: author; }
  .pv .cd-rate { grid-area: rate; }
  .pv .cd-body { grid-area: body; }
  .pv .cd-chips { display: none; }
  .pv-row { flex-direction: row; }
  .pv-row .btn { width: auto; }
}

/* You, review mode and the builder page (job ux8). */
.h-count { display: flex; align-items: baseline; gap: var(--s-2); }
.h-n { color: var(--text-3); font-variant-numeric: tabular-nums; }
.h-n:empty { display: none; }
.you-wait h2 { margin-top: 0; }
.you-none { color: var(--text-2); margin: 0 0 var(--s-3); }
.fix-ask { display: flex; align-items: center; gap: var(--s-2); color: var(--text-2); font: 500 var(--t-meta) var(--font-ui); }
.fix-ask .icon-s { color: var(--accent-text); }
.me { margin: var(--s-6) 0 0; }
.me-pub { margin-top: var(--s-5); }
.me-line { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.me-line > div { min-width: 0; overflow-wrap: anywhere; }
.me-n { margin: 0; font: 700 var(--t-h2) var(--font-ui); color: var(--text-1); }
h1.me-n { font: 700 var(--t-h1) var(--font-ui); }
.me-l { margin: 0; color: var(--text-2); font: 400 var(--t-meta) var(--font-ui); }
.nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin: var(--s-4) 0 0; }
.nums > div { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-1); min-width: 0; padding: var(--s-3) var(--s-2); background: var(--bg-1); border: 1px solid var(--line-1); border-radius: var(--r-3); text-align: center; overflow-wrap: anywhere; }
.nums dd { margin: 0; }
.nums dt { color: var(--text-3); font: 400 var(--t-meta) var(--font-ui); }
.num-v { display: inline-flex; align-items: center; gap: var(--s-1); color: var(--text-1); font: 700 var(--t-display) var(--font-ui); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.num-v .icon { color: var(--star); }
.num-none { font: 600 var(--t-title) var(--font-ui); color: var(--text-2); }
.agents { list-style: none; margin: 0; padding: 0; }
.agent { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line-1); }
.agent > .icon { color: var(--text-2); }
.agent-t { display: flex; flex-direction: column; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.agent-n { font-weight: 600; color: var(--text-1); }
.agent-d { color: var(--text-3); font: 400 var(--t-meta) var(--font-ui); font-variant-numeric: tabular-nums; }
.agent-x { min-height: 44px; padding: 0 var(--s-3); }
.agent-off { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3); color: var(--warn); font: 600 var(--t-meta) var(--font-ui); }
.agent-off:focus { outline: none; }
.agents-note { margin: var(--s-3) 0 0; color: var(--text-3); font: 400 var(--t-meta) var(--font-ui); }
.appearance { gap: 0; }
.appearance .btn { min-height: 44px; height: 44px; border-radius: 0; }
.appearance .btn:first-child { border-radius: var(--r-2) 0 0 var(--r-2); }
.appearance .btn:last-child { border-radius: 0 var(--r-2) var(--r-2) 0; border-left-width: 0; }
.appearance .btn[aria-pressed="true"] { background: var(--bg-4); box-shadow: inset 0 -3px 0 var(--accent); }
.me-you { margin: var(--s-3) 0 0; }
.me-you a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-2); font: 500 var(--t-meta) var(--font-ui); text-underline-offset: 3px; }
.who-a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; border-radius: var(--r-1); }
.rv-strip { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-4) 0 0; padding: var(--s-3) var(--s-4); background: var(--bg-3); color: var(--text-1); border-radius: var(--r-2); font: 600 var(--t-meta) var(--font-ui); }
.rv-yes, .rv-back { flex: 1 1 0; min-width: 0; padding: 0 var(--s-3); }
[data-you] { position: relative; }
.you-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent-fill); color: var(--on-accent); font: 700 var(--t-label) var(--font-ui); font-variant-numeric: tabular-nums; }
.tabs .you-n { position: absolute; top: 6px; left: calc(50% + 6px); }
.top .you-n { margin-left: var(--s-2); }
@media (min-width: 900px) {
  #builder, #you { max-width: 720px; }
  .rv-yes, .rv-back { flex: 1 1 100%; }
}
@media (hover: hover) {
  .who-a:hover, .me-you a:hover { color: var(--text-1); }
}

/* Agents (job ux9): three rules, three steps, a Copy button on every call.
   Phone: one column, rules first. From 900 px: steps on the left, the rules a sticky column on the right. */
.ag-lead { color: var(--text-2); font: 400 var(--t-body) var(--font-ui); margin: 0 0 var(--s-4); }
.ag-rules { list-style: none; margin: 0; padding: 0; }
.ag-rules li { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3) 0; color: var(--text-1); font: 400 var(--t-body) var(--font-ui); }
.ag-rules li + li { border-top: 1px solid var(--line-1); }
.ag-rules .icon { color: var(--text-2); }
.ag-say { color: var(--text-1); font: 400 var(--t-body) var(--font-ui); margin: 0; }
.ag-label { color: var(--text-3); font: 500 var(--t-label) var(--font-ui); margin: var(--s-3) 0 var(--s-1); }
.ag-steps .code { margin: 0; }
.ag-warn { display: flex; align-items: flex-start; gap: var(--s-2); margin: var(--s-6) 0 var(--s-4); }
.ag-warn .icon { width: 20px; height: 20px; flex: none; }
.ag-sample { color: var(--text-3); font: 400 var(--t-meta) var(--font-ui); margin: 0; }
@media (min-width: 900px) {
  #agents { max-width: 1072px; }
  .ag-grid { display: grid; grid-template-columns: minmax(0, 720px) 320px; column-gap: var(--s-6); align-items: start; }
  .ag-steps { grid-column: 1; grid-row: 1; min-width: 0; }
  .ag-rules { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--bar-h) + var(--s-5)); margin-top: var(--s-6); }
  .ag-steps > h2:first-child { margin-top: var(--s-6); }
}

/* Offline strip (job ux9): in the page flow under the top bar, so it pushes the content down. */
.offline { margin: 0; }
.offline-in { display: flex; align-items: center; gap: var(--s-2); max-width: 1120px; margin: 0 auto; padding: var(--s-2) var(--s-4); background: var(--warn-bg); color: var(--warn); font: 500 var(--t-meta) var(--font-ui); }
.offline-in[hidden] { display: none; }
.offline-in .icon { width: 20px; height: 20px; flex: none; }
.offline:has(.offline-in:not([hidden])) { background: var(--warn-bg); }

/* Scripts off (job ux9). */
.noscript { margin: var(--s-4) 0 0; padding: var(--s-3) var(--s-4); background: var(--bg-1); color: var(--text-1); border: 1px solid var(--line-1); border-radius: var(--r-2); }

/* Setup match (job ux10): the "My setup" editor on You, the match pill on rows and cards,
   the hint line in a card's Setup field, the "Shares my setup" chip on Home. */
.setup-note { margin: 0 0 var(--s-3); color: var(--text-2); font: 400 var(--t-meta) var(--font-ui); }
.setup-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.setup-list:empty { display: none; }
.setup-item { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; padding-left: var(--s-3); border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--bg-1); color: var(--text-1); font: 500 var(--t-meta) var(--font-ui); }
.setup-item > span { min-width: 0; overflow-wrap: anywhere; }
.setup-x { flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-pill); display: grid; place-items: center; background: transparent; color: var(--text-2); cursor: pointer; }
.setup-none { margin: 0; color: var(--text-3); font: 400 var(--t-meta) var(--font-ui); }
.setup-none[hidden] { display: none; }
.setup-form label { margin-top: var(--s-4); }
.setup-row { display: flex; gap: var(--s-2); }
.setup-row input { flex: 1; min-width: 0; }
.setup-row .btn { flex: none; }
.setup-err { margin: var(--s-1) 0 0; color: var(--warn); font: 500 var(--t-meta) var(--font-ui); min-height: 1.25rem; }
.setup-err:empty { min-height: 0; }
.match { display: inline-flex; align-items: center; gap: var(--s-1); border-radius: var(--r-pill); padding: 2px var(--s-3) 2px var(--s-2); background: var(--bg-3); color: var(--text-1); font: 500 var(--t-meta) var(--font-ui); font-variant-numeric: tabular-nums; white-space: nowrap; }
.match-none { color: var(--text-3); padding-left: var(--s-3); }
.cd-match { grid-area: match; margin-top: var(--s-2); }
.match-line { display: flex; align-items: flex-start; gap: var(--s-2); margin: var(--s-2) 0 0; color: var(--text-2); font: 400 var(--t-meta) var(--font-ui); overflow-wrap: anywhere; }
.match-warn { color: var(--warn); }
.match-line .icon-s { margin-top: 2px; }
.mine-chips { margin-bottom: var(--s-2); }
.fchip-mine { font-family: var(--font-ui); font-size: 0.875rem; }
@media (hover: hover) {
  .setup-x:hover { background: var(--bg-3); color: var(--text-1); }
}
