/* BTC Puzzle design system, v4
   Palette and typeface are taken from the live site: neutral greys (#222 / #282828 / #2e2e2e / #363636),
   Bitcoin orange #F7931A, Parkinsans. Orange is reserved for the active pool and the one primary action. */

:root {
  /* layout: left-aligned 12-column page, flat panels separated by 1px lines, no glow or gradients */
  --bg: #f1f1f1;
  --panel: #ffffff;
  --raised: #f6f6f6;
  --sunk: #e7e7e7;
  --line: #dcdcdc;
  --line-strong: #bdbdbd;
  --text: #222222;
  --text-2: #555555;
  --muted: #777777;
  --accent: #f7931a;
  --accent-hover: #e38412;
  --accent-text: #9a5300;
  --accent-wash: #fdf1e0;
  --on-accent: #1d1d1d;
  --ok: #2f7d2f;
  --ok-wash: #e6f2e6;
  --bad: #b3372f;
  --bad-wash: #f8e7e5;
  --premium: #7a55b8;
  --premium-wash: #efe9f8;
  --warn: #8a6100;
  --warn-wash: #fbf0d2;
  --info: #2565a8;
  --info-wash: #e4eefa;
  --cell-solved: #cfcfcf;
  --cell-solved-text: #555555;
  --overlay-shadow: 0 12px 40px rgba(0, 0, 0, .18);
  --panel-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 28px rgba(0, 0, 0, .05);
  /* chrome tokens: notice strip, header, sub-bar, menus, drawer, bottom bar and footer. Light values follow the surfaces and text of the theme; the dark blocks keep the original black chrome. */
  --hd-bg: var(--panel); --hd-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px rgba(0, 0, 0, .06); --hd-line: var(--line);
  --hd-fg: var(--text); --hd-fg-2: var(--text-2); --hd-strong: var(--text); --hd-muted: #666666; --hd-hover: var(--sunk); --hd-accent: var(--accent-text);
  --hd-nav-on-bg: var(--accent-wash); --hd-nav-on-ring: transparent; --hd-nav-glow: none; --hd-burger-line: #8c8c8c;
  --tl-bg: var(--raised); --tl-line: var(--line); --tl-fg: var(--text-2); --tl-link: var(--text); --tl-req-fg: var(--bad); --tl-ok-fg: #2a712a; --tl-info-bg: var(--sunk); --tl-info-fg: var(--text-2); --tl-dot: var(--line-strong); --tl-nav-hover: var(--sunk);
  --hd-sub-bg: var(--raised); --hd-sub-line: var(--line); --hd-sub-fg: var(--text-2); --hd-sub-strong: var(--text); --hd-chip-bg: var(--accent-wash); --hd-chip-hover: #fae3c2;
  --hd-pop-bg: var(--panel); --hd-pop-line: var(--line-strong); --hd-pop-shadow: var(--overlay-shadow); --hd-pop-fg: var(--text-2); --hd-pop-sep: var(--line); --hd-pop-hover: var(--raised); --hd-tile-bg: var(--raised); --hd-tile-line: var(--line);
  --hd-price-bg: var(--panel); --hd-price-line: var(--line); --ub-bg: var(--panel); --ub-line: var(--line-strong);
  --mg-bg: var(--panel); --mg-shadow: 0 18px 40px rgba(0, 0, 0, .12); --mg-hover: var(--raised); --mg-now-bg: var(--raised); --mg-now-bg-hover: var(--sunk); --hd-dim: rgba(30, 30, 30, .35);
  --dr-bg: var(--panel); --dr-line: var(--line); --dr-hover: var(--raised); --dr-tile-line: var(--line-strong); --dr-chev: var(--muted); --bb-bg: var(--panel); --bb-fg: #666666;
  --ft-bg: var(--panel); --ft-card: var(--raised); --ft-solved-bg: var(--sunk); --ft-all: var(--text-2); --ft-social-bg: var(--raised); --ft-note: #666666;

  --font: "Parkinsans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SFMono-Regular", Consolas, Menlo, monospace;

  --t-xs: 12px;
  --t-sm: 13.5px;
  --t-base: 15px;
  --t-md: 17px;
  --t-lg: 21px;
  --t-xl: clamp(24px, 1.2vw + 19px, 32px);
  --t-2xl: clamp(31px, 2.6vw + 20px, 54px);

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  --page: 1320px;
  --gutter: clamp(16px, 3.4vw, 40px);
  --gap-section: clamp(56px, 6vw, 96px);
  --header-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1e1e1e; --panel: #272727; --raised: #2f2f2f; --sunk: #191919;
    --line: #363636; --line-strong: #4a4a4a;
    --text: #e4e4e4; --text-2: #b7b7b7; --muted: #8b8b8b;
    --accent-hover: #ffa637; --accent-text: #f7931a; --accent-wash: #3a2c18;
    --ok: #5fb85f; --ok-wash: #233223; --bad: #e0685f; --bad-wash: #3a2422;
    --premium: #a884db; --premium-wash: #2f2a3a; --warn: #e0b050; --warn-wash: #352a12; --info: #6aa5e8; --info-wash: #1c2a3b;
    --cell-solved: #3f3f3f; --cell-solved-text: #a3a3a3;
    --overlay-shadow: -5px 5px 15px rgba(0, 0, 0, .6); --panel-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px rgba(0, 0, 0, .28);
    --hd-bg: linear-gradient(#000, #131313); --hd-shadow: 0 6px 24px rgba(0, 0, 0, .3); --hd-line: #333;
    --hd-fg: #e4e4e4; --hd-fg-2: #d9d9d9; --hd-strong: #fff; --hd-muted: #8b8b8b; --hd-hover: #222; --hd-accent: #f7931a;
    --hd-nav-on-bg: #1c1c1c; --hd-nav-on-ring: #2e2e2e; --hd-nav-glow: 0 0 12px rgba(247, 147, 26, .6); --hd-burger-line: #3a3a3a;
    --tl-bg: #000; --tl-line: #242424; --tl-fg: #b7b7b7; --tl-link: #e4e4e4; --tl-req-fg: #ee7a70; --tl-ok-fg: #5fb85f; --tl-info-bg: #2a2a2a; --tl-info-fg: #d0d0d0; --tl-dot: #454545; --tl-nav-hover: #1c1c1c;
    --hd-sub-bg: #0b0b0b; --hd-sub-line: #1f1f1f; --hd-sub-fg: #b7b7b7; --hd-sub-strong: #f1f1f1; --hd-chip-bg: #241a0c; --hd-chip-hover: #35250f;
    --hd-pop-bg: #0d0d0d; --hd-pop-line: #2e2e2e; --hd-pop-shadow: 0 16px 40px rgba(0, 0, 0, .6); --hd-pop-fg: #cfcfcf; --hd-pop-sep: #222; --hd-pop-hover: #161616; --hd-tile-bg: #1f1f1f; --hd-tile-line: #333;
    --hd-price-bg: #1a1a1a; --hd-price-line: #262626; --ub-bg: #161616; --ub-line: #333;
    --mg-bg: #0b0b0b; --mg-shadow: 0 24px 48px rgba(0, 0, 0, .45); --mg-hover: #171717; --mg-now-bg: #131313; --mg-now-bg-hover: #151515; --hd-dim: rgba(8, 8, 8, .5);
    --dr-bg: #0d0d0d; --dr-line: #2a2a2a; --dr-hover: #1c1c1c; --dr-tile-line: #454545; --dr-chev: #5a5a5a; --bb-bg: #000; --bb-fg: #a3a3a3;
    --ft-bg: #000; --ft-card: #0d0d0d; --ft-solved-bg: #2e2e2e; --ft-all: #d0d0d0; --ft-social-bg: #141414; --ft-note: #6f6f6f;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1e1e1e; --panel: #272727; --raised: #2f2f2f; --sunk: #191919;
  --line: #363636; --line-strong: #4a4a4a;
  --text: #e4e4e4; --text-2: #b7b7b7; --muted: #8b8b8b;
  --accent-hover: #ffa637; --accent-text: #f7931a; --accent-wash: #3a2c18;
  --ok: #5fb85f; --ok-wash: #233223; --bad: #e0685f; --bad-wash: #3a2422;
  --premium: #a884db; --premium-wash: #2f2a3a; --warn: #e0b050; --warn-wash: #352a12; --info: #6aa5e8; --info-wash: #1c2a3b;
  --cell-solved: #3f3f3f; --cell-solved-text: #a3a3a3;
  --overlay-shadow: -5px 5px 15px rgba(0, 0, 0, .6); --panel-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px rgba(0, 0, 0, .28);
  --hd-bg: linear-gradient(#000, #131313); --hd-shadow: 0 6px 24px rgba(0, 0, 0, .3); --hd-line: #333;
  --hd-fg: #e4e4e4; --hd-fg-2: #d9d9d9; --hd-strong: #fff; --hd-muted: #8b8b8b; --hd-hover: #222; --hd-accent: #f7931a;
  --hd-nav-on-bg: #1c1c1c; --hd-nav-on-ring: #2e2e2e; --hd-nav-glow: 0 0 12px rgba(247, 147, 26, .6); --hd-burger-line: #3a3a3a;
  --tl-bg: #000; --tl-line: #242424; --tl-fg: #b7b7b7; --tl-link: #e4e4e4; --tl-req-fg: #ee7a70; --tl-ok-fg: #5fb85f; --tl-info-bg: #2a2a2a; --tl-info-fg: #d0d0d0; --tl-dot: #454545; --tl-nav-hover: #1c1c1c;
  --hd-sub-bg: #0b0b0b; --hd-sub-line: #1f1f1f; --hd-sub-fg: #b7b7b7; --hd-sub-strong: #f1f1f1; --hd-chip-bg: #241a0c; --hd-chip-hover: #35250f;
  --hd-pop-bg: #0d0d0d; --hd-pop-line: #2e2e2e; --hd-pop-shadow: 0 16px 40px rgba(0, 0, 0, .6); --hd-pop-fg: #cfcfcf; --hd-pop-sep: #222; --hd-pop-hover: #161616; --hd-tile-bg: #1f1f1f; --hd-tile-line: #333;
  --hd-price-bg: #1a1a1a; --hd-price-line: #262626; --ub-bg: #161616; --ub-line: #333;
  --mg-bg: #0b0b0b; --mg-shadow: 0 24px 48px rgba(0, 0, 0, .45); --mg-hover: #171717; --mg-now-bg: #131313; --mg-now-bg-hover: #151515; --hd-dim: rgba(8, 8, 8, .5);
  --dr-bg: #0d0d0d; --dr-line: #2a2a2a; --dr-hover: #1c1c1c; --dr-tile-line: #454545; --dr-chev: #5a5a5a; --bb-bg: #000; --bb-fg: #a3a3a3;
  --ft-bg: #000; --ft-card: #0d0d0d; --ft-solved-bg: #2e2e2e; --ft-all: #d0d0d0; --ft-social-bg: #141414; --ft-note: #6f6f6f;
}
:root[data-theme="light"] { color-scheme: light; }
/* the mega menu and the drawer re-declare the surface variables with their dark values; only in the dark theme (the light theme keeps the light surfaces) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .menu-list.mega-list { --panel: #151515; --raised: #1c1c1c; --line: #2a2a2a; --line-strong: #3a3a3a; --text: #f1f1f1; --text-2: #b7b7b7; --muted: #8b8b8b; --accent-text: #f7931a; --sunk: #2a2a2a; } :root:not([data-theme="light"]) .drawer-panel { --accent-wash: #3a2c18; --accent-text: #f7931a; --panel: #0d0d0d; --raised: #1c1c1c; --sunk: #2a2a2a; --line: #2a2a2a; --line-strong: #454545; --text: #f1f1f1; --text-2: #b7b7b7; --muted: #8b8b8b; } }
:root[data-theme="dark"] .menu-list.mega-list { --panel: #151515; --raised: #1c1c1c; --line: #2a2a2a; --line-strong: #3a3a3a; --text: #f1f1f1; --text-2: #b7b7b7; --muted: #8b8b8b; --accent-text: #f7931a; --sunk: #2a2a2a; }
:root[data-theme="dark"] .drawer-panel { --accent-wash: #3a2c18; --accent-text: #f7931a; --panel: #0d0d0d; --raised: #1c1c1c; --sunk: #2a2a2a; --line: #2a2a2a; --line-strong: #454545; --text: #f1f1f1; --text-2: #b7b7b7; --muted: #8b8b8b; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 20px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--t-base)/1.6 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; flex: none; }
canvas { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }

.hex { font-family: var(--mono); font-size: .92em; letter-spacing: -0.01em; }
.num { font-variant-numeric: tabular-nums; }
.t2 { color: var(--text-2); }
.muted { color: var(--muted); }
.accent { color: var(--accent-text); }
.ok { color: var(--ok); }
.link { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.link:hover { color: var(--accent-text); text-decoration-color: currentColor; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; }

.page { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding-top: var(--gap-section); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; margin-bottom: 24px; }
.section-head h2 { font-size: var(--t-xl); }
.section-head p { color: var(--text-2); max-width: 62ch; margin-top: 8px; }
.cols { display: grid; gap: 24px; }
.cols > *, .split > * { min-width: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: var(--r-md); border: 1px solid transparent; font-weight: 600; font-size: var(--t-base); white-space: nowrap; transition: background-color .12s, border-color .12s, color .12s; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 1px 2px rgba(0, 0, 0, .25); }
.btn:active { transform: translateY(1px); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--panel); border-color: var(--line-strong); color: var(--text); }
.btn-secondary:hover { border-color: var(--text); }
.btn-quiet { color: var(--text-2); padding: 0 12px; }
.btn-quiet:hover { background: var(--raised); color: var(--text); }
.btn-danger { background: var(--panel); border-color: var(--bad); color: var(--bad); }
.btn-danger:hover { background: var(--bad); color: #fff; }
.btn-sm { height: 34px; padding: 0 12px; font-size: var(--t-sm); }
.btn-lg { height: 48px; padding: 0 22px; font-size: var(--t-md); }
.btn-icon { width: 42px; padding: 0; }
.btn-icon.btn-sm { width: 34px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.is-busy { position: relative; color: transparent; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--on-accent); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- status tags ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--r-sm); background: var(--raised); border: 1px solid var(--line); font-size: var(--t-xs); font-weight: 500; color: var(--text-2); white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.tag.plain::before { display: none; }
.tag-ok { background: var(--ok-wash); border-color: transparent; color: var(--ok); } .tag-ok::before { background: var(--ok); }
.tag-accent { background: var(--accent-wash); border-color: transparent; color: var(--accent-text); } .tag-accent::before { background: var(--accent); }
.tag-bad { background: var(--bad-wash); border-color: transparent; color: var(--bad); } .tag-bad::before { background: var(--bad); }
.tag-premium { background: var(--premium-wash); border-color: transparent; color: var(--premium); } .tag-premium::before { background: var(--premium); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- panels and data ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--panel-shadow); }
.panel > :first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.panel > :last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.panel-pad { padding: clamp(16px, 2vw, 24px); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: var(--t-md); display: flex; align-items: center; gap: 10px; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); overflow: hidden; }
.facts > div { padding: 14px clamp(16px, 2vw, 24px); box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.facts dt { font-size: var(--t-sm); color: var(--muted); }
.facts dd { font-size: 23px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.facts dd small { font-size: var(--t-sm); font-weight: 400; color: var(--text-2); letter-spacing: 0; }

.pairs { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; font-size: var(--t-sm); }
.pairs dt { color: var(--muted); }
.pairs dd { text-align: right; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.pairs dd.hex { white-space: nowrap; overflow-wrap: normal; font-size: 12.5px; }

.meter { height: 8px; border-radius: 4px; background: var(--sunk); overflow: hidden; }
.meter > i { display: block; height: 100%; min-width: 3px; background: var(--accent); border-radius: 3px; }

.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.table th { text-align: left; font-weight: 500; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--raised); }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--raised); }
.table .r { text-align: right; }
.table tr.is-new td { animation: rowNew 1.6s ease-out; }
@keyframes rowNew { from { background: var(--accent-wash); } }

.copyline { display: flex; align-items: center; gap: 4px; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised); padding: 3px 3px 3px 12px; }
.copyline > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: var(--t-sm); }
.copy { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--muted); }
.copy:hover { background: var(--sunk); color: var(--text); }
.copy.is-done { color: var(--ok); }

.code { background: #1d1d1d; color: #dfdfdf; border-radius: var(--r-md); font: 400 13px/1.7 var(--mono); padding: 14px 16px; overflow-x: auto; white-space: pre; border: 1px solid #363636; }
.code .c { color: #8b8b8b; } .code .a { color: #f7931a; } .code .g { color: #5fb85f; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field > label, .label { font-size: var(--t-sm); font-weight: 500; }
.help { font-size: var(--t-xs); color: var(--muted); }
.help-bad { color: var(--bad); }
.input, .select, .textarea { width: 100%; height: 42px; padding: 0 12px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--panel); outline: none; }
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.input.is-bad { border-color: var(--bad); }
.input.hex { font-size: var(--t-sm); }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23888' stroke-width='1.6'><path d='M1 1.5l5 5 5-5'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-wrap > .input { padding-left: 38px; }
.choice { display: inline-flex; align-items: center; gap: 9px; font-size: var(--t-sm); cursor: pointer; }
.choice input { appearance: none; margin: 0; width: 18px; height: 18px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--panel); display: grid; place-items: center; cursor: pointer; }
.choice input[type="radio"] { border-radius: 50%; }
.choice input:checked { background: var(--accent); border-color: var(--accent); }
.choice input[type="checkbox"]:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--on-accent); border-top: 0; border-right: 0; transform: rotate(-45deg) translateY(-1px); }
.choice input[type="radio"]:checked::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--on-accent); }
.choice input[role="switch"] { width: 36px; height: 20px; border-radius: 10px; background: var(--sunk); place-items: center start; padding: 0 2px; transition: background-color .15s; }
.choice input[role="switch"]:checked { background: var(--accent); }
.choice input[role="switch"]::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); border: 0; transform: none; transition: transform .15s, background-color .15s; }
.choice input[role="switch"]:checked::after { transform: translateX(16px); background: var(--on-accent); width: 14px; height: 14px; }
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; outline-offset: 6px; background: linear-gradient(90deg, var(--accent) var(--p, 0%), var(--sunk) var(--p, 0%)); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--panel); border: 2px solid var(--accent); cursor: grab; }
.slider::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--panel); border: 2px solid var(--accent); cursor: grab; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; background: var(--panel); }
.seg button { height: 32px; padding: 0 12px; font-size: var(--t-sm); font-weight: 500; color: var(--text-2); }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }

/* ---------- tabs, pager, crumbs ---------- */
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; padding: 0 clamp(16px, 2vw, 24px); }
.tabs button { height: 42px; font-size: var(--t-sm); font-weight: 500; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.pager { display: inline-flex; gap: 4px; }
.pager a, .pager span { min-width: 34px; height: 34px; padding: 0 8px; display: grid; place-items: center; border-radius: var(--r-md); font-size: var(--t-sm); font-variant-numeric: tabular-nums; color: var(--text-2); }
.pager a:hover { background: var(--raised); }
.pager a[aria-current] { background: var(--text); color: var(--bg); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: var(--t-sm); color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text); }

/* ---------- messages and overlays ---------- */
.note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel); font-size: var(--t-sm); }
.note strong { display: block; font-weight: 600; }
.note p { color: var(--text-2); }
.note svg { margin-top: 2px; }
.note-accent { background: var(--accent-wash); border-color: transparent; } .note-accent svg { color: var(--accent-text); }
.note-ok { background: var(--ok-wash); border-color: transparent; } .note-ok svg { color: var(--ok); }
.note-bad { background: var(--bad-wash); border-color: transparent; } .note-bad svg { color: var(--bad); }
.toasts { position: fixed; z-index: 100; right: 16px; bottom: 16px; display: grid; gap: 8px; max-width: calc(100% - 32px); }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: var(--r-md); font-size: var(--t-sm); box-shadow: var(--overlay-shadow); }
@media (max-width: 767px) { .toasts { bottom: 76px; left: 16px; } }
dialog.dialog { width: min(460px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--panel); color: var(--text); box-shadow: var(--overlay-shadow); }
dialog.dialog::backdrop { background: rgba(0, 0, 0, .55); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h3 { font-size: var(--t-md); }
.dialog-body { padding: 16px 20px; color: var(--text-2); font-size: var(--t-sm); }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; font-weight: 500; font-size: var(--t-md); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { color: var(--muted); transition: transform .15s; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details > div { padding: 0 32px 18px 0; color: var(--text-2); max-width: 68ch; }

/* ---------- site header (black in both themes, like the live site) ---------- */
.topline { background: var(--tl-bg); color: var(--tl-fg); font-size: var(--t-xs); border-bottom: 1px solid var(--tl-line); }
.topline .page { display: flex; align-items: center; gap: 20px; min-height: 40px; }
.topline a { color: var(--tl-link); }
.topline a:hover { color: var(--hd-accent); }
.notice { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.notice-tag { flex: none; display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: var(--r-sm); font-size: 11px; font-weight: 600; background: var(--accent-wash); color: var(--accent-text); }
.notice-tag[data-kind="req"] { background: var(--bad-wash); color: var(--tl-req-fg); }
.notice-tag[data-kind="ok"] { background: var(--ok-wash); color: var(--tl-ok-fg); }
.notice-tag[data-kind="info"] { background: var(--tl-info-bg); color: var(--tl-info-fg); }
.notice-tag[data-kind="token"] { background: var(--premium-wash); color: var(--premium); }
.notice-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--hd-fg); text-align: left; }
.notice-text.is-in, .notice-tag.is-in { animation: noticeIn .35s ease-out; }
@keyframes noticeIn { from { opacity: 0; transform: translateY(5px); } }
.notice-dots { flex: none; display: flex; align-items: center; gap: 5px; margin-left: auto; padding-left: 6px; }
.notice-dots button { position: relative; width: 6px; height: 6px; border-radius: 3px; background: var(--tl-dot); transition: width .2s, background-color .2s; }
.notice-dots button::after { content: ""; position: absolute; inset: -8px -3px; }
.notice-dots button[aria-current="true"] { width: 18px; background: var(--accent); }
.notice-nav { display: none; flex: none; }
.notice-nav button { width: 26px; height: 26px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--hd-muted); }
.notice-nav button:hover { background: var(--tl-nav-hover); color: var(--hd-strong); }
.notice-nav svg { width: 14px; height: 14px; }
@media (min-width: 768px) { .notice-nav { display: flex; } }
/* sub-bar: sponsor dropdowns, pool speed and BTC price. Second row of the sticky header. */
.subbar { background: var(--hd-sub-bg); border-top: 1px solid var(--hd-sub-line); font-size: var(--t-xs); color: var(--hd-sub-fg); }
.header .subbar .page { position: relative; height: auto; min-height: 42px; gap: 6px; }
@media (min-width: 900px) { .ad { position: relative; } }
.pool-now { display: none; align-items: center; gap: 8px; margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pool-now b { color: var(--hd-sub-strong); font-weight: 600; }
@media (min-width: 900px) { .pool-now { display: inline-flex; } }
.ad > button { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 7px 0 11px; border-radius: var(--r-md); background: var(--hd-chip-bg); color: var(--hd-accent); font-size: var(--t-xs); font-weight: 600; transition: background-color .12s, color .12s; }
.ad > button svg { width: 13px; height: 13px; opacity: .8; transition: transform .15s; }
.ad > button:hover { background: var(--hd-chip-hover); }
.ad > button[aria-expanded="true"] { background: var(--accent); color: #1d1d1d; }
.ad > button[aria-expanded="true"] svg { transform: rotate(180deg); opacity: 1; }
.ad-list { position: absolute; z-index: 5; top: calc(100% + 6px); left: var(--gutter); right: var(--gutter); display: none; background: var(--hd-pop-bg); border: 1px solid var(--hd-pop-line); border-radius: var(--r-lg); box-shadow: var(--hd-pop-shadow); overflow: hidden; white-space: normal; }
.ad-list.is-open { display: block; }
@media (min-width: 900px) { .ad-list { left: 0; right: auto; width: 300px; } }
.ad-list > small { display: block; padding: 10px 16px 0; font-size: 11px; color: var(--hd-muted); }
.ad-list a { display: grid; gap: 4px; padding: 14px 16px 16px; color: var(--hd-pop-fg); }
.ad-list a + a { border-top: 1px solid var(--hd-pop-sep); }
.ad-list a:hover { background: var(--hd-pop-hover); color: var(--hd-pop-fg); }
.ad-list a b { display: flex; align-items: center; gap: 10px; color: var(--hd-strong); font-size: var(--t-base); font-weight: 600; }
.ad-list a b i { width: 26px; height: 26px; border-radius: 7px; background: var(--hd-tile-bg); border: 1px solid var(--hd-tile-line); display: grid; place-items: center; font-style: normal; font-size: 12px; color: var(--hd-accent); }
.ad-list a u { text-decoration: none; color: var(--hd-accent); font-size: var(--t-sm); font-weight: 600; margin-top: 4px; }
.ad-list a span { font-size: var(--t-xs); line-height: 1.5; }
.price { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 11px 0 5px; margin-left: auto; border-radius: var(--r-md); background: var(--hd-price-bg); border: 1px solid var(--hd-price-line); color: var(--hd-strong); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price i { width: 18px; height: 18px; border-radius: 50%; background: #f7931a; color: #000; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; font-family: Arial, sans-serif; }
.price small { color: var(--hd-muted); font-size: inherit; font-weight: 500; }
@media (min-width: 900px) { .price { margin-left: 14px; } }

.header { position: sticky; top: 0; z-index: 40; background: var(--hd-bg); box-shadow: var(--hd-shadow); color: var(--hd-fg); border-bottom: 1px solid var(--hd-line); }
.header .page { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; color: var(--hd-strong); }
.brand i { width: 22px; height: 22px; border-radius: 5px; background: #f7931a; display: grid; place-items: center; }
.brand i::after { content: ""; width: 8px; height: 8px; border-radius: 2px; background: #000; }
.nav { display: none; align-items: center; gap: 2px; }
.nav > a, .nav > .menu > button { height: 36px; padding: 0 12px; border-radius: var(--r-md); display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-base); font-weight: 600; color: var(--hd-fg-2); }
.nav > a:hover, .nav > .menu > button:hover, .nav > .menu > button[aria-expanded="true"] { background: var(--hd-hover); color: var(--hd-strong); }
.nav > a[aria-current="page"] { color: var(--hd-accent); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.header-tools .btn-quiet { color: var(--hd-fg-2); }
.header-tools .btn-quiet:hover { background: var(--hd-hover); color: var(--hd-strong); }
.only-wide { display: none; }
@media (min-width: 1080px) { .nav { display: flex; } .only-wide { display: inline-flex; } .only-narrow { display: none !important; } }
.menu { position: relative; }
.menu-list { position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px; padding: 6px; background: var(--panel); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--overlay-shadow); display: none; }
.menu-list.is-open { display: block; }
.menu-list a { display: block; padding: 8px 12px; border-radius: var(--r-md); font-size: var(--t-sm); font-weight: 500; }
.menu-list a small { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-xs); }
.menu-list a:hover { background: var(--raised); }

.burger { width: 38px; height: 38px; border-radius: var(--r-md); border: 1px solid var(--hd-burger-line); color: var(--hd-strong); display: grid; place-items: center; }
.burger:hover { border-color: var(--accent); }

/* page stays still while the menu is open */
html.no-scroll, html.no-scroll body { overflow: hidden; }
.drawer-scrim { touch-action: none; }
.drawer-body { overscroll-behavior: contain; }

/* phone and tablet menu: black sheet from the right, theme switch at the bottom */
.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; transition: visibility 0s .28s; }
.drawer.is-open { visibility: visible; transition: none; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .25s; }
.drawer.is-open .drawer-scrim { opacity: 1; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(340px, 88%); background: var(--dr-bg); color: var(--hd-sub-strong); border-left: 1px solid var(--dr-line); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.drawer.is-open .drawer-panel { transform: none; }
.drawer-top { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); padding: 0 12px 0 18px; border-bottom: 1px solid var(--dr-line); flex: none; }
.drawer-body { flex: 1; overflow: auto; padding: 10px; }
.drawer-nav { display: grid; gap: 1px; }
.drawer-nav + .drawer-nav { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--dr-line); }
.drawer-nav a { display: flex; align-items: center; gap: 13px; padding: 6px 8px; border-radius: var(--r-md); font-size: var(--t-base); font-weight: 600; }
.drawer-nav a .tile { width: 34px; height: 34px; }
.drawer-nav a .tile svg { width: 17px; height: 17px; }
.drawer-nav a:hover { background: var(--dr-hover); }
.drawer-nav a:hover .tile { color: var(--hd-accent); border-color: var(--dr-tile-line); }
.drawer-nav a > svg:last-child { margin-left: auto; color: var(--dr-chev); width: 15px; height: 15px; }
.drawer-foot { flex: none; display: grid; gap: 14px; padding: 14px 18px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--dr-line); }
.drawer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: var(--t-sm); color: var(--hd-sub-fg); }
.drawer-row > span { display: inline-flex; align-items: center; gap: 10px; }
.drawer-foot .btn-secondary { background: transparent; color: var(--hd-sub-strong); }

.bottombar { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--bb-bg); border-top: 1px solid var(--hd-line); padding-bottom: env(safe-area-inset-bottom); }
.bottombar a { display: grid; justify-items: center; gap: 3px; padding: 9px 0 8px; font-size: 11px; font-weight: 500; color: var(--bb-fg); }
.bottombar a { position: relative; }
.bottombar a[aria-current="page"] { color: var(--hd-accent); }
.bottombar a[aria-current="page"]::before { content: ""; position: absolute; top: -1px; left: 50%; width: 28px; height: 2px; margin-left: -14px; background: var(--accent); border-radius: 0 0 2px 2px; }
@media (min-width: 768px) { .bottombar { display: none; } }
@media (max-width: 767px) { body { padding-bottom: 62px; } }

/* ---------- footer (follows the theme) ---------- */
.footer { margin-top: var(--gap-section); background: var(--ft-bg); color: var(--hd-sub-fg); font-size: var(--t-sm); border-top: 1px solid var(--dr-line); }
.footer .page { padding-top: clamp(24px, 4vw, 48px); padding-bottom: 24px; }
.footer a:hover { color: var(--hd-accent); }
.footer-start { display: grid; gap: 22px; padding: clamp(18px, 3vw, 30px); border: 1px solid var(--dr-line); border-radius: var(--r-lg); background: var(--ft-card); }
.footer-start h3 { font-size: var(--t-lg); color: var(--hd-strong); }
.footer-start p { margin-top: 4px; max-width: 52ch; }
.footer-start .btn-secondary { background: transparent; color: var(--hd-sub-strong); border-color: var(--dr-tile-line); }
.footer-start .btn-secondary:hover { border-color: var(--hd-strong); }
@media (min-width: 900px) { .footer-start { grid-template-columns: 1fr auto; align-items: center; gap: 40px; } }
@media (max-width: 560px) { .footer-start .row .btn { flex: 1; } }
.jump { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 18px; }
.jump a { width: 36px; height: 36px; border-radius: 6px; display: grid; place-items: center; font-size: var(--t-xs); font-weight: 600; font-variant-numeric: tabular-nums; border: 1px solid var(--dr-tile-line); color: var(--hd-muted); }
.jump a.solved { background: var(--ft-solved-bg); border-color: transparent; color: var(--bb-fg); }
.jump a.pool { background: #f7931a; border-color: transparent; color: #1d1d1d; }
.jump a.next { border-color: var(--accent); color: var(--hd-accent); }
.jump a.all { width: auto; padding: 0 12px; border-style: dashed; color: var(--ft-all); }
.jump a:not(.pool):hover { border-color: var(--hd-strong); color: var(--hd-strong); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px; margin-top: clamp(32px, 4vw, 48px); }
.footer-about { grid-column: 1 / -1; display: grid; gap: 14px; align-content: start; max-width: 340px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.7fr repeat(4, 1fr); } .footer-about { grid-column: auto; } }
.footer h4 { font-size: var(--t-xs); font-weight: 500; color: var(--hd-muted); margin-bottom: 12px; }
.footer li + li { margin-top: 9px; }
.footer li a { color: var(--hd-fg); }
.socials { display: flex; gap: 8px; }
.socials a { width: 38px; height: 38px; border-radius: var(--r-md); border: 1px solid var(--hd-pop-line); background: var(--ft-social-bg); display: grid; place-items: center; color: var(--ft-all); }
.socials a:hover { border-color: var(--accent); }
.footer-status { display: flex; flex-wrap: wrap; gap: 8px 0; margin-top: clamp(28px, 4vw, 40px); padding: 13px 0; border-block: 1px solid var(--tl-line); font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.footer-status span { display: inline-flex; align-items: center; gap: 8px; padding-right: 16px; margin-right: 16px; border-right: 1px solid var(--dr-line); }
.footer-status span:last-child { border: 0; margin: 0; padding: 0; }
.footer-status b { color: var(--hd-fg); font-weight: 500; }
.footer-end { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-top: 16px; color: var(--hd-muted); font-size: var(--t-xs); }
.footer-end nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-note { margin-top: 10px; color: var(--ft-note); font-size: var(--t-xs); max-width: 86ch; }

/* bands: a strip on top of a panel that says what state the puzzle is in */
.band { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px clamp(16px, 2vw, 24px); font-size: var(--t-sm); font-weight: 600; }
.band > span { display: inline-flex; align-items: center; gap: 9px; }
.band small { font-size: var(--t-xs); font-weight: 500; }
.band-now { background: var(--accent); color: var(--on-accent); }
.band-now .live-dot { background: var(--on-accent); }
.band-next { background: var(--raised); color: var(--text); border-bottom: 1px solid var(--line); }
.band-next small { color: var(--muted); }
.panel.is-now { border-color: var(--accent); }
.pz-n { width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; flex: none; font-size: var(--t-md); font-weight: 700; font-variant-numeric: tabular-nums; border: 1px solid var(--line-strong); color: var(--text-2); }
.pz-n.pool { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.pz-n.next { border-color: var(--accent); color: var(--accent-text); }

/* language picker: a scrolling list, so adding a language never changes the layout */
.flag { display: block; width: 24px; height: 16px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(128, 128, 128, .4); flex: none; }
.flag svg { width: 100%; height: 100%; }
[data-lang-flag] { display: inline-flex; }
.lang-list { display: grid; gap: 2px; max-height: min(336px, 52vh); overflow-y: auto; overscroll-behavior: contain; }
.lang-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: var(--r-md); font-size: var(--t-sm); text-align: left; color: var(--text); }
.lang-list button:hover { background: var(--raised); }
.lang-list button small { margin-left: auto; font-size: var(--t-xs); font-weight: 500; color: var(--muted); letter-spacing: .03em; }
.lang-list button svg.icon { width: 16px; height: 16px; color: var(--accent-text); visibility: hidden; }
.lang-list button[aria-selected="true"] { background: var(--raised); font-weight: 600; }
.lang-list button[aria-selected="true"] svg.icon { visibility: visible; }
.menu-list.lang-menu { left: auto; right: 0; width: 248px; padding: 6px; }
details.lang-row { position: relative; }
details.lang-row summary { list-style: none; cursor: pointer; }
details.lang-row summary::-webkit-details-marker { display: none; }
.lang-trigger { display: inline-flex; align-items: center; gap: 9px; height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-md); color: var(--text); font-weight: 500; }
.lang-trigger svg.icon { width: 14px; height: 14px; color: var(--muted); transition: transform .15s; }
details.lang-row[open] .lang-trigger { border-color: var(--accent); }
details.lang-row[open] .lang-trigger svg.icon { transform: rotate(180deg); }
.lang-pop { position: absolute; z-index: 2; right: 0; bottom: calc(100% + 8px); width: min(248px, 100%); padding: 6px; background: #161616; border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: 0 -10px 32px rgba(0, 0, 0, .55); }

/* long keys and addresses: keeps the start and the end, hides the middle, tap to copy */
.hexv { display: inline-flex; align-items: center; max-width: 100%; min-width: 0; font-family: var(--mono); font-size: var(--t-sm); letter-spacing: -0.01em; cursor: pointer; text-align: left; vertical-align: bottom; }
.hexv .h { flex: 0 1 auto; min-width: 4ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hexv .t { flex: none; white-space: nowrap; }
.hexv svg { width: 14px; height: 14px; margin-left: 7px; color: var(--muted); }
.hexv:hover svg { color: var(--text); }
.hexv.is-done svg { color: var(--ok); }
.copyline > .hexv { flex: 1; font-size: var(--t-sm); }

/* where a value sits between two ends */
.track { position: relative; height: 8px; border-radius: 4px; background: var(--sunk); }
.track::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), var(--line-strong) calc(25% - 1px) 25%); opacity: .7; }
.track > i { position: absolute; top: -6px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 0 3px var(--panel); }
.track-ends { display: flex; justify-content: space-between; font-size: var(--t-xs); color: var(--muted); margin-top: 8px; }

/* theme button shows the theme you would switch to */
.i-sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: block; } :root:not([data-theme="light"]) .i-moon { display: none; } }
:root[data-theme="dark"] .i-sun { display: block; } :root[data-theme="dark"] .i-moon { display: none; }

/* icon tile */
.tile { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--raised); border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-2); flex: none; }

/* tables that turn into stacked records on phones */
@media (max-width: 720px) {
  .table td, .table th { padding: 10px 12px; }
  .hm { display: none; }
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody { display: block; }
  .table.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 16px; border-bottom: 1px solid var(--line); }
  .table.stack tr:last-child { border-bottom: 0; }
  .table.stack td { display: block; padding: 0; border: 0; white-space: normal; text-align: left; min-width: 0; overflow-wrap: anywhere; background: none !important; }
  .table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: var(--t-xs); color: var(--muted); margin-bottom: 1px; font-family: var(--font); }
  .table.stack td:first-child, .table.stack td.wide { grid-column: 1 / -1; }
  .table.stack td:first-child { font-size: var(--t-md); }
  .table.stack td:first-child::before { display: none; }
}

/* ==========================================================================
   Homepage components (moved here so inner pages can reuse them)
   ========================================================================== */
@media (max-width: 640px) {
  .hero h1 { font-size: 34px; }
  .hero-actions .btn { width: 100%; }
  .hero-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
  .cell.pool, .cell.next { font-size: 9px !important; }
  .section-head { margin-bottom: 18px; }
}
.cell.pool { position: relative; }
.cell.pool::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; animation: ring 2.4s ease-out infinite; }
@keyframes ring { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } to { box-shadow: 0 0 0 9px transparent; } }
.days { margin-top: 4px; }
.days .bars { display: flex; align-items: flex-end; gap: 3px; height: 64px; }
.days .bars i { flex: 1; min-width: 0; background: var(--cell-solved); border-radius: 2px 2px 0 0; }
.days .bars i:last-child { background: var(--accent); }
.days .axis { display: flex; justify-content: space-between; font-size: var(--t-xs); color: var(--muted); margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.rank .meter { height: 3px; margin-top: 7px; background: var(--raised); }
.rank .meter i { background: var(--line-strong); min-width: 2px; }
.rank li:first-child .meter i { background: var(--accent); }
/* Cloud Search panel is black in both themes, like the header */
.calc { --panel: #0d0d0d; --raised: #1c1c1c; --sunk: #2a2a2a; --line: #2e2e2e; --line-strong: #454545; --text: #f1f1f1; --text-2: #b7b7b7; --muted: #8b8b8b; --accent-text: #f7931a; background: #0d0d0d; color: #f1f1f1; border-color: #2e2e2e; }

.hero > *, .pool-body > *, .live > *, .how > *, .about > *, .faq-wrap > * { min-width: 0; }
.hero { padding-top: clamp(32px, 4.5vw, 64px); display: grid; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (min-width: 1080px) { .hero { grid-template-columns: 5fr 6fr; } }
.hero h1 { font-size: var(--t-2xl); letter-spacing: -0.025em; line-height: 1.06; }
.hero-text { color: var(--text-2); font-size: var(--t-md); max-width: 54ch; margin-top: 20px; }
.hero-actions { margin-top: 28px; }
.hero-links { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: var(--t-sm); }

.ladder-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin-bottom: 14px; }
.ladder-head h2 { font-size: var(--t-md); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--t-xs); color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.ladder { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; }
.cell { aspect-ratio: 1; border-radius: 4px; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--muted); animation: cellIn .35s both; animation-delay: calc(var(--i) * 4ms); }
.cell.solved { background: var(--cell-solved); border-color: transparent; color: var(--cell-solved-text); }
.cell.pool { background: var(--accent); border-color: transparent; color: var(--on-accent); font-weight: 700; }
.cell.next { border-color: var(--accent); color: var(--accent-text); }
.cell:hover { border-color: var(--text); }
.cell[aria-pressed="true"] { outline: 2px solid var(--text); outline-offset: 1px; }
@keyframes cellIn { from { opacity: 0; } }
@media (max-width: 560px) { .cell { font-size: 0; } .ladder { gap: 2px; } }
.readout { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; align-items: end; }
@media (min-width: 640px) { .readout { grid-template-columns: auto auto 1fr auto; } }
.readout dt { font-size: var(--t-xs); color: var(--muted); }
.readout dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.readout .big { font-size: var(--t-lg); line-height: 1.2; }

.pool-body { display: grid; gap: 24px; padding: clamp(16px, 2vw, 24px); }
@media (min-width: 1000px) { .pool-body { grid-template-columns: 7fr 5fr; gap: 40px; } }
.sample canvas { width: 100%; height: 170px; border-radius: var(--r-sm); }
.sample figcaption { margin-top: 10px; font-size: var(--t-sm); color: var(--text-2); max-width: 64ch; }
.progress-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 8px; font-size: var(--t-sm); }
.progress-line b { font-size: 30px; line-height: 1; letter-spacing: -0.02em; font-weight: 600; font-variant-numeric: tabular-nums; }
.pool-side { display: grid; gap: 18px; align-content: start; }

.panel-head h3 .pz-n { margin-right: 4px; }
.title-stack { display: grid; gap: 5px; justify-items: start; line-height: 1.2; }
.band svg.icon { width: 16px; height: 16px; }
.after-title { font-size: var(--t-md); margin: 32px 0 14px; }
.nexts { display: grid; gap: 20px; }
@media (min-width: 760px) { .nexts { grid-template-columns: 1fr 1fr; } }
.nexts > * { min-width: 0; }
.next-body { display: grid; gap: 18px; padding: clamp(16px, 2vw, 24px); }
.next-top { display: flex; align-items: center; gap: 14px; }
.next-top > div { flex: 1; min-width: 0; }
.next-top h3 { font-size: var(--t-md); }
.next-top p { font-variant-numeric: tabular-nums; }
.live { display: grid; gap: 20px; }
@media (min-width: 1080px) { .live { grid-template-columns: 7fr 4fr; } }
.rank { counter-reset: r; }
.rank li { counter-increment: r; display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 10px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.rank li:last-child { border-bottom: 0; }
.rank li::before { content: counter(r); color: var(--muted); font-variant-numeric: tabular-nums; }
.rank small { display: block; color: var(--muted); font-size: var(--t-xs); }
.rank b { font-weight: 600; font-variant-numeric: tabular-nums; }

.how { display: grid; gap: 28px; align-items: start; }
@media (min-width: 1000px) { .how { grid-template-columns: 7fr 5fr; gap: 56px; } .how .calc { position: sticky; top: calc(var(--header-h) + 62px); } }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li > span { width: 36px; height: 36px; border-radius: var(--r-md); border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: var(--t-sm); font-weight: 600; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.steps h3 { font-size: var(--t-md); margin-bottom: 4px; }
.steps p { color: var(--text-2); max-width: 62ch; }
.calc-amount { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 0 14px; }
.calc-amount output { font-size: 40px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.calc .pairs { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: var(--t-base); gap: 10px 20px; }
.calc .pairs dd { font-weight: 600; }
.calc .help { margin-top: 16px; }


.sv { display: grid; grid-template-columns: 1fr; grid-template-areas: "id" "pos" "keys" "pool"; gap: 18px 16px; padding: 20px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.sv:last-child { border-bottom: 0; }
.sv > * { min-width: 0; }
.sv-id { grid-area: id; display: flex; align-items: center; gap: 12px; }
.sv-n { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--cell-solved); color: var(--cell-solved-text); display: grid; place-items: center; font-weight: 700; font-size: var(--t-md); font-variant-numeric: tabular-nums; flex: none; }
.sv-id .found { font-weight: 600; }
.sv-id b { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--t-md); font-weight: 600; line-height: 1.2; }
.sv-id small { display: block; margin-top: 3px; }
.sv-pool .btn { width: max-content; }
.sv-id small, .sv-pool small { font-size: var(--t-sm); color: var(--text-2); }
.sv-pos { grid-area: pos; }
.sv-pos p { font-size: var(--t-sm); color: var(--text-2); margin-bottom: 14px; }
.sv-pos p b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.sv-scan { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: baseline; font-size: var(--t-sm); color: var(--text-2); }
.sv-scan b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.sv-scan .meter, .sv-scan small { grid-column: 1 / -1; }
.sv-scan .meter { height: 8px; }
.sv-pos .track-ends + .sv-scan { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.sv-scan .meter i { background: var(--text-2); }
.sv-scan small { font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.sv-keys { grid-area: keys; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.sv-keys > div { min-width: 0; }
.sv-keys dt { font-size: var(--t-xs); color: var(--muted); }
.sv-pool { grid-area: pool; text-align: left; font-size: var(--t-sm); display: grid; align-content: center; }
.sv-pool b { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (min-width: 1000px) {
  .sv { grid-template-columns: 250px minmax(200px, 1fr) minmax(0, 420px) auto; grid-template-areas: "id pos keys pool"; gap: 36px; align-items: center; }
  .sv-pool { text-align: right; }
  .sv-keys { grid-template-columns: 1fr 1fr; gap: 8px 20px; }
}
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 1080px) { .tools { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.tools a { position: relative; display: grid; gap: 14px; align-content: start; min-width: 0; padding: clamp(16px, 2vw, 22px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--panel-shadow); transition: border-color .15s, transform .15s; }
.tools a:hover { border-color: var(--accent); transform: translateY(-2px); }
.tools .tile { width: 54px; height: 54px; border-radius: 13px; background: var(--accent-wash); border-color: transparent; color: var(--accent-text); }
.tools .tile svg { width: 27px; height: 27px; stroke-width: 1.6; }
.tools a > svg { position: absolute; top: clamp(16px, 2vw, 22px); right: clamp(14px, 2vw, 20px); width: 16px; height: 16px; color: var(--muted); }
.tools a:hover > svg { color: var(--accent-text); }
.tools h3 { font-size: var(--t-md); line-height: 1.25; }
.tools p { color: var(--text-2); font-size: var(--t-sm); line-height: 1.45; margin-top: 5px; }
@media (min-width: 700px) { .tools a { grid-template-columns: auto 1fr; align-items: center; gap: 16px; padding-right: 44px; } }
.about { display: grid; overflow: hidden; }
.about > * { min-width: 0; border-radius: 0 !important; }
@media (min-width: 1000px) { .about { grid-template-columns: 7fr 5fr; } }
.about-facts li { display: grid; grid-template-columns: 56px 1fr; gap: 4px 26px; align-items: center; padding: 18px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.about-facts li:last-child { border-bottom: 0; }
.about-facts { display: grid; grid-auto-rows: 1fr; height: 100%; }
.about-facts .k { position: relative; width: 56px; height: 56px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line); display: grid; place-items: center; color: var(--text); }
.about-facts .k svg { width: 26px; height: 26px; stroke-width: 1.6; }
.about-facts .k b { position: absolute; right: -14px; bottom: -7px; height: 22px; padding: 0 7px; border-radius: 7px; background: var(--accent); color: var(--on-accent); font-size: 11.5px; font-weight: 700; line-height: 22px; letter-spacing: -0.01em; white-space: nowrap; box-shadow: 0 0 0 3px var(--panel); transform: rotate(-4deg); }
.about-facts h3 { font-size: var(--t-md); }
.about-facts p { color: var(--text-2); font-size: var(--t-sm); margin-top: 3px; max-width: 54ch; }
.about-side { display: grid; gap: 20px; align-content: start; padding: clamp(16px, 2vw, 24px); background: var(--raised); border-top: 1px solid var(--line); }
@media (min-width: 1000px) { .about-side { border-top: 0; border-left: 1px solid var(--line); } }
.about-side h3 { font-size: var(--t-md); }
.about-side p { color: var(--text-2); font-size: var(--t-sm); margin-top: 3px; }
.term { border-radius: var(--r-lg); overflow: hidden; border: 1px solid #363636; background: #161616; }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid #2a2a2a; color: #8b8b8b; font-size: var(--t-xs); }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a3a3a; }
.term-bar i:first-child { background: #f7931a; }
.term-bar span { margin-left: auto; }
.term .code { border: 0; border-radius: 0; background: transparent; }
.faq-wrap { display: grid; gap: 20px; }
@media (min-width: 1000px) { .faq-wrap { grid-template-columns: 4fr 8fr; gap: 56px; } }

/* ==========================================================================
   Extended kit: everything below was added for the UI kit and inner pages
   ========================================================================== */

/* ---------- buttons, extra ---------- */
.btn-soft { background: var(--accent-wash); color: var(--accent-text); }
.btn-soft:hover { background: color-mix(in srgb, var(--accent) 26%, var(--panel)); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--r-md) 0 0 var(--r-md); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.btn-group .btn:hover, .btn-group .btn[aria-pressed="true"] { position: relative; z-index: 1; }
.btn-group .btn[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-split { display: inline-flex; }
.btn-split .btn:first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.btn-split .btn:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; padding: 0 10px; border-left: 1px solid rgba(0, 0, 0, .22); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line); font-size: 11px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.count-accent { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.count-bad { background: var(--bad); border-color: transparent; color: #fff; }
.has-dot { position: relative; }
.has-dot::after { content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--panel); }

/* ---------- tags, extra ---------- */
.tag-warn { background: var(--warn-wash); border-color: transparent; color: var(--warn); } .tag-warn::before { background: var(--warn); }
.tag-info { background: var(--info-wash); border-color: transparent; color: var(--info); } .tag-info::before { background: var(--info); }
.tag-lg { height: 28px; padding: 0 11px; font-size: var(--t-sm); }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--panel); font-size: var(--t-sm); font-weight: 500; color: var(--text-2); white-space: nowrap; }
.chip:hover { border-color: var(--text); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip svg { width: 14px; height: 14px; }
.chip .x { margin-right: -4px; opacity: .7; }
.kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; background: var(--panel); font: 500 11px/1 var(--mono); color: var(--text-2); }

/* ---------- forms, extra ---------- */
.input-sm { height: 34px; font-size: var(--t-sm); }
.input-lg { height: 50px; font-size: var(--t-md); }
.input.is-ok { border-color: var(--ok); }
.help-ok { color: var(--ok); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--raised); color: var(--muted); cursor: not-allowed; }
.input[readonly] { background: var(--raised); }
.req { color: var(--bad); margin-left: 2px; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-top a, .field-top small { font-size: var(--t-xs); color: var(--muted); font-weight: 400; }
.affix { display: flex; }
.affix > span, .affix > button { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--line-strong); background: var(--raised); color: var(--text-2); font-size: var(--t-sm); white-space: nowrap; }
.affix > :first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.affix > :last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.affix > .input { border-radius: 0; min-width: 0; position: relative; }
.affix > .input:first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.affix > .input:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.affix > .input:focus { z-index: 1; }
.affix > * + * { margin-left: -1px; }
.affix > button { font-weight: 600; color: var(--text); }
.affix > button:hover { border-color: var(--text); position: relative; z-index: 1; }
.affix > button.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.input-wrap > .input-btn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--muted); }
.input-wrap > .input-btn:hover { background: var(--raised); color: var(--text); }
.input-wrap > .input-btn svg { position: static; transform: none; }
.input-wrap.has-btn > .input { padding-right: 42px; }
.input-wrap.no-icon > .input { padding-left: 12px; }
.stepper { display: inline-flex; }
.stepper button { width: 42px; height: 42px; border: 1px solid var(--line-strong); background: var(--raised); display: grid; place-items: center; }
.stepper button:first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.stepper button:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.stepper button:hover { border-color: var(--text); position: relative; z-index: 1; }
.stepper input { width: 64px; height: 42px; border: 1px solid var(--line-strong); border-inline: 0; background: var(--panel); text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; outline-offset: -2px; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.counter { justify-self: end; font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.tags-input { display: flex; flex-wrap: wrap; gap: 6px; min-height: 42px; padding: 5px 6px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--panel); cursor: text; }
.tags-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.tags-input input { flex: 1; min-width: 90px; height: 30px; border: 0; background: none; outline: none; padding: 0 6px; }
.tok { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 4px 0 10px; border-radius: var(--r-sm); background: var(--raised); border: 1px solid var(--line); font-size: var(--t-sm); }
.tok button { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 3px; color: var(--muted); }
.tok button:hover { background: var(--sunk); color: var(--text); }
.tok svg { width: 12px; height: 12px; }
.dropzone { display: grid; justify-items: center; gap: 8px; padding: 28px 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--raised); text-align: center; cursor: pointer; transition: border-color .12s, background-color .12s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-wash); }
.dropzone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dropzone b { font-weight: 600; }
.dropzone small { color: var(--muted); font-size: var(--t-xs); }
.otp { display: flex; gap: 8px; }
.otp input { width: 44px; height: 52px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--panel); text-align: center; font: 600 20px/1 var(--mono); outline: none; }
.otp input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.choice-cards { display: grid; gap: 10px; }
@media (min-width: 640px) { .choice-cards.cols-2 { grid-template-columns: 1fr 1fr; } .choice-cards.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.choice-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--panel); cursor: pointer; transition: border-color .12s, background-color .12s; }
.choice-card:hover { border-color: var(--text); }
.choice-card input { appearance: none; margin: 2px 0 0; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--panel); flex: none; display: grid; place-items: center; }
.choice-card input:checked { background: var(--accent); border-color: var(--accent); }
.choice-card input:checked::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--on-accent); }
.choice-card:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.choice-card b { display: block; font-weight: 600; }
.choice-card small { display: block; color: var(--text-2); font-size: var(--t-sm); }
.choice-card .end { margin-left: auto; text-align: right; font-weight: 600; white-space: nowrap; }
.fieldset { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin: 0; display: grid; gap: 16px; min-width: 0; }
.fieldset legend { padding: 0 8px; font-weight: 600; font-size: var(--t-sm); }
.form-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.setting b { display: block; font-weight: 600; }
.setting small { display: block; color: var(--text-2); font-size: var(--t-sm); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters .select { width: auto; height: 32px; font-size: var(--t-sm); padding-left: 10px; }
.filters .grow { flex: 1; min-width: 160px; }
.editor { border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--panel); overflow: hidden; }
.editor:focus-within { border-color: var(--accent); }
.editor-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--raised); }
.editor-bar button { min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--text-2); font-weight: 600; font-size: var(--t-sm); }
.editor-bar button:hover, .editor-bar button[aria-pressed="true"] { background: var(--sunk); color: var(--text); }
.editor-bar i { width: 1px; margin: 6px 4px; background: var(--line-strong); }
.editor textarea { display: block; width: 100%; min-height: 110px; padding: 12px 14px; border: 0; background: none; outline: none; resize: vertical; line-height: 1.6; }
.editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 14px; border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--muted); }

/* ---------- navigation, extra ---------- */
.tabs.pill { gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--raised); }
.tabs.pill button { height: 34px; padding: 0 14px; border: 0; margin: 0; border-radius: var(--r-md); }
.tabs.pill button[aria-selected="true"] { background: var(--panel); box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.tabs button .count { margin-left: 6px; }
.sidenav { display: grid; gap: 2px; }
.sidenav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--r-md); font-size: var(--t-sm); font-weight: 500; color: var(--text-2); }
.sidenav a:hover { background: var(--raised); color: var(--text); }
.sidenav a[aria-current="page"] { background: var(--raised); color: var(--text); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.sidenav a .count { margin-left: auto; }
.sidenav h4 { font-size: var(--t-xs); font-weight: 500; color: var(--muted); padding: 12px 12px 4px; }
.sidenav hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.steps-nav { display: flex; counter-reset: st; }
.steps-nav li { flex: 1; counter-increment: st; position: relative; display: grid; justify-items: center; gap: 6px; font-size: var(--t-xs); color: var(--muted); text-align: center; }
.steps-nav li::before { content: counter(st); position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--panel); display: grid; place-items: center; font-weight: 600; font-size: var(--t-sm); color: var(--text-2); }
.steps-nav li::after { content: ""; position: absolute; top: 14px; left: -50%; right: 50%; height: 1px; background: var(--line-strong); }
.steps-nav li:first-child::after { display: none; }
.steps-nav li.done::before { content: "✓"; background: var(--text); border-color: var(--text); color: var(--bg); }
.steps-nav li.done + li::after { background: var(--text); }
.steps-nav li.now { color: var(--text); font-weight: 600; }
.steps-nav li.now::before { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.menu-list hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu-list a.row-ic, .menu-list button.row-ic { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border-radius: var(--r-md); font-size: var(--t-sm); font-weight: 500; text-align: left; }
.menu-list button.row-ic:hover { background: var(--raised); }
.menu-list .row-ic svg { width: 16px; height: 16px; color: var(--muted); }
.menu-list .danger, .menu-list .danger svg { color: var(--bad); }
.menu-list.right { left: auto; right: 0; }
.menu-list .kbd { margin-left: auto; }
.pager-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px clamp(16px, 2vw, 24px); border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--text-2); }
.page-head { display: grid; gap: 14px; padding: clamp(20px, 3vw, 32px) 0 0; }
.page-head h1 { font-size: var(--t-xl); letter-spacing: -0.02em; }
.page-head .row { justify-content: space-between; align-items: flex-start; }
.page-head .tabs { padding: 0; margin-top: 6px; }
.frame { border: 1px solid var(--line-strong); border-radius: var(--r-lg); overflow: hidden; background: var(--bg); }
.frame .header, .frame .bottombar { position: static; }
.frame .bottombar { display: grid; }
.frame-phone { max-width: 390px; margin-inline: auto; }

/* ---------- data, extra ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--panel-shadow); min-width: 0; }
.stat dt, .stat .lab { font-size: var(--t-sm); color: var(--muted); }
.stat b { font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat b small { font-size: var(--t-sm); font-weight: 400; color: var(--text-2); letter-spacing: 0; }
.stat svg.spark { width: 100%; height: 34px; margin-top: 6px; }
.delta { font-size: var(--t-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.spark path { fill: none; stroke: var(--text-2); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.spark .area { fill: var(--raised); stroke: none; }
.spark circle { fill: var(--accent); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 64px; }
.bars i { flex: 1; min-width: 0; background: var(--cell-solved); border-radius: 2px 2px 0 0; }
.bars i:last-child, .bars i.on { background: var(--accent); }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart .fill { fill: var(--accent); opacity: .12; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .pt { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.ring { position: relative; width: 96px; height: 96px; display: grid; place-items: center; flex: none; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; stroke: var(--sunk); }
.ring circle + circle { stroke: var(--accent); stroke-linecap: round; }
.ring b { font-size: var(--t-md); font-weight: 600; font-variant-numeric: tabular-nums; }
.ring small { display: block; font-size: 10.5px; color: var(--muted); text-align: center; font-weight: 400; }
.meter-lg { height: 12px; border-radius: 6px; } .meter-lg > i { border-radius: 6px; }
.meter-ok > i { background: var(--ok); } .meter-bad > i { background: var(--bad); }
.meter-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; height: 8px; }
.meter-steps i { border-radius: 2px; background: var(--sunk); }
.meter-steps i.on { background: var(--accent); }
.table-sm td, .table-sm th { padding: 7px 12px; }
.table th[data-sort] { cursor: pointer; user-select: none; }
.table th[data-sort]::after { content: "↕"; margin-left: 6px; opacity: .45; font-size: 11px; }
.table th[data-sort][aria-sort="ascending"]::after { content: "↑"; opacity: 1; color: var(--accent-text); }
.table th[data-sort][aria-sort="descending"]::after { content: "↓"; opacity: 1; color: var(--accent-text); }
.table tr.is-selected td { background: var(--accent-wash); }
.table td.check, .table th.check { width: 1%; padding-right: 0; }
.table-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.empty { display: grid; justify-items: center; gap: 8px; padding: 40px 20px; text-align: center; }
.empty .tile { width: 52px; height: 52px; border-radius: 13px; margin-bottom: 4px; }
.empty .tile svg { width: 24px; height: 24px; }
.empty h3 { font-size: var(--t-md); }
.empty p { color: var(--text-2); font-size: var(--t-sm); max-width: 42ch; }
.empty .btn { margin-top: 8px; }
.avatar { width: 36px; height: 36px; border-radius: var(--r-md); background: var(--raised); border: 1px solid var(--line); display: grid; place-items: center; flex: none; font-size: var(--t-xs); font-weight: 700; color: var(--text-2); text-transform: uppercase; overflow: hidden; }
.avatar-sm { width: 26px; height: 26px; border-radius: 6px; font-size: 10px; }
.avatar-lg { width: 56px; height: 56px; border-radius: 14px; font-size: var(--t-md); }
.avatar.is-accent { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.avatars { display: flex; } .avatars .avatar { margin-left: -8px; box-shadow: 0 0 0 2px var(--panel); } .avatars .avatar:first-child { margin-left: 0; }
.rank-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 11px; font-weight: 600; background: var(--raised); border: 1px solid var(--line); color: var(--text-2); }
.rank-tag.king { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.rank-tag.staff { background: var(--premium-wash); border-color: transparent; color: var(--premium); }
.timeline { display: grid; }
.timeline li { position: relative; display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; padding-bottom: 18px; font-size: var(--t-sm); }
.timeline li::before { content: ""; width: 10px; height: 10px; margin: 5px 5px 0; border-radius: 50%; background: var(--panel); border: 2px solid var(--line-strong); position: relative; z-index: 1; }
.timeline li::after { content: ""; position: absolute; left: 9.5px; top: 12px; bottom: -6px; width: 1px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; } .timeline li:last-child::after { display: none; }
.timeline li.ok::before { border-color: var(--ok); background: var(--ok); }
.timeline li.accent::before { border-color: var(--accent); background: var(--accent); }
.timeline li.bad::before { border-color: var(--bad); background: var(--bad); }
.timeline b { font-weight: 600; } .timeline p { color: var(--text-2); } .timeline time { color: var(--muted); font-size: var(--t-xs); white-space: nowrap; }
.codebox { border-radius: var(--r-lg); overflow: hidden; border: 1px solid #363636; background: #161616; }
.codebox-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px 6px 14px; border-bottom: 1px solid #2a2a2a; color: #8b8b8b; font-size: var(--t-xs); }
.codebox-bar .tabs { border: 0; padding: 0; gap: 14px; }
.codebox-bar .tabs button { height: 28px; color: #8b8b8b; }
.codebox-bar .tabs button[aria-selected="true"] { color: #fff; }
.codebox-bar .copy:hover { background: #2a2a2a; color: #fff; }
.codebox .code { border: 0; border-radius: 0; background: transparent; }
.code .k { color: #a884db; } .code .s { color: #5fb85f; } .code .n { color: #6aa5e8; }
.method { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 4px; font: 600 11px/1 var(--mono); background: var(--ok-wash); color: var(--ok); }
.method.m-post { background: var(--info-wash); color: var(--info); } .method.m-del { background: var(--bad-wash); color: var(--bad); }
.endpoint { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); min-width: 0; }
.endpoint code { font-family: var(--mono); font-size: var(--t-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.skel { display: block; height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--raised) 25%, var(--sunk) 50%, var(--raised) 75%); background-size: 200% 100%; animation: skel 1.4s linear infinite; }
@keyframes skel { to { background-position: -200% 0; } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: spin .7s linear infinite; display: inline-block; }
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }
.loadbar { height: 3px; background: var(--sunk); overflow: hidden; border-radius: 2px; }
.loadbar::after { content: ""; display: block; width: 35%; height: 100%; background: var(--accent); animation: loadbar 1.3s ease-in-out infinite; }
@keyframes loadbar { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: var(--t-xs); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
[data-tip] { position: relative; }
[data-tip]::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px); padding: 6px 9px; border-radius: var(--r-sm); background: var(--text); color: var(--bg); font: 500 12px/1.3 var(--font); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s; z-index: 30; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.popover { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; width: 280px; max-width: calc(100vw - 32px); padding: 14px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--overlay-shadow); display: none; font-size: var(--t-sm); }
.popover.is-open { display: block; }
.countdown { display: inline-flex; align-items: center; gap: 6px; font: 600 var(--t-lg)/1 var(--mono); font-variant-numeric: tabular-nums; }
.countdown.is-low { color: var(--bad); }

/* generic link list (was the "Not just a pool" list) */
.linklist { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); overflow: hidden; }
.linklist a { display: flex; align-items: center; gap: 13px; padding: 10px 14px 10px 10px; }
.linklist a + a { border-top: 1px solid var(--line); }
.linklist a > span:nth-child(2) { flex: 1; min-width: 0; }
.linklist b { display: block; font-size: var(--t-base); font-weight: 600; line-height: 1.25; }
.linklist small { display: block; font-size: var(--t-xs); color: var(--muted); }
.linklist .tile { width: 38px; height: 38px; }
.linklist a > svg { width: 15px; height: 15px; color: var(--muted); transition: transform .15s, color .15s; }
.linklist a:hover { background: var(--raised); }
.linklist a:hover .tile { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.linklist a:hover > svg { color: var(--accent-text); transform: translateX(3px); }

/* ---------- feedback, extra ---------- */
.note-warn { background: var(--warn-wash); border-color: transparent; } .note-warn svg { color: var(--warn); }
.note-info { background: var(--info-wash); border-color: transparent; } .note-info svg { color: var(--info); }
.note > div { flex: 1; min-width: 0; }
.note .close { width: 28px; height: 28px; margin: -4px -6px 0 0; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--muted); flex: none; }
.note .close:hover { background: rgba(128, 128, 128, .2); color: var(--text); }
.note .close svg { margin: 0; color: inherit; width: 15px; height: 15px; }
.note .actions { display: flex; gap: 8px; margin-top: 10px; }
.banner { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: var(--accent); color: var(--on-accent); font-size: var(--t-sm); font-weight: 500; text-align: center; }
.banner a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.banner-bad { background: var(--bad); color: #fff; }
.toast { display: flex; align-items: center; gap: 10px; }
.toast svg { width: 16px; height: 16px; flex: none; }
.toast.ok svg { color: #5fb85f; } .toast.bad svg { color: #ee7a70; }
dialog.dialog.wide { width: min(640px, calc(100% - 32px)); }
dialog.sheet { margin: auto auto 0; width: 100%; max-width: 560px; border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom: 0; }
dialog.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 10px auto 0; }
.cookie { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--overlay-shadow); font-size: var(--t-sm); }
.cookie p { flex: 1; min-width: 220px; color: var(--text-2); }

/* ---------- community ---------- */
.thread { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.thread:last-child { border-bottom: 0; }
.thread:hover { background: var(--raised); }
.thread h3 { font-size: var(--t-base); font-weight: 600; line-height: 1.3; }
.thread h3 .tag { margin-left: 6px; vertical-align: 1px; }
.thread p { font-size: var(--t-xs); color: var(--muted); margin-top: 3px; }
.thread .nums { display: flex; gap: 16px; text-align: right; font-size: var(--t-xs); color: var(--muted); }
.thread .nums b { display: block; font-size: var(--t-sm); color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.thread.is-pinned { background: var(--accent-wash); }
@media (max-width: 560px) { .thread .nums span + span { display: none; } }
.post { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.post:last-child { border-bottom: 0; }
.post-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--t-sm); }
.post-head time { color: var(--muted); font-size: var(--t-xs); margin-left: auto; }
.post-body { margin-top: 8px; color: var(--text); max-width: 72ch; }
.post-body p + p { margin-top: 10px; }
.post-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.react { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 15px; border: 1px solid var(--line); background: var(--raised); font-size: var(--t-xs); font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.react svg { width: 14px; height: 14px; }
.react:hover { border-color: var(--line-strong); color: var(--text); }
.react[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-wash); color: var(--accent-text); }
.quote { margin: 10px 0; padding: 10px 14px; border-left: 3px solid var(--line-strong); background: var(--raised); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--text-2); font-size: var(--t-sm); }
.quote cite { display: block; font-style: normal; font-weight: 600; color: var(--text); margin-bottom: 2px; }

/* ---------- plans and payments ---------- */
.plans { display: grid; gap: 16px; align-items: start; }
@media (min-width: 860px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { display: grid; gap: 16px; align-content: start; min-width: 0; }
.plan-body { display: grid; gap: 16px; padding: clamp(16px, 2vw, 24px); }
.plan h3 { font-size: var(--t-md); }
.plan .price-big { font-size: 38px; line-height: 1; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.plan .price-big small { font-size: var(--t-sm); font-weight: 400; color: var(--text-2); letter-spacing: 0; }
.ticks { display: grid; gap: 9px; font-size: var(--t-sm); }
.ticks li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; align-items: start; }
.ticks svg { width: 16px; height: 16px; margin-top: 3px; color: var(--ok); }
.ticks li.no { color: var(--muted); } .ticks li.no svg { color: var(--muted); }
.summary { display: grid; gap: 10px; font-size: var(--t-sm); }
.summary div { display: flex; justify-content: space-between; gap: 16px; }
.summary dt { color: var(--text-2); } .summary dd { font-variant-numeric: tabular-nums; }
.summary .total { padding-top: 12px; border-top: 1px solid var(--line); font-size: var(--t-md); font-weight: 600; }
.summary .total dt { color: var(--text); }
.summary .off dd { color: var(--ok); }
.paybox { display: grid; gap: 18px; }
@media (min-width: 640px) { .paybox { grid-template-columns: auto 1fr; align-items: center; gap: 24px; } }
.qr { width: 148px; height: 148px; padding: 10px; border-radius: var(--r-md); background: #fff; justify-self: center; }
.qr canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.pay-amount { font: 600 22px/1.2 var(--mono); letter-spacing: -0.02em; overflow-wrap: anywhere; }

/* ---------- account ---------- */
.profile { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.profile > div { flex: 1 1 220px; min-width: 0; }
.profile h2 { font-size: var(--t-lg); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.profile p { color: var(--text-2); font-size: var(--t-sm); margin-top: 2px; }
.worker { display: grid; gap: 14px; padding: 16px; }
.worker-top { display: flex; align-items: center; gap: 12px; }
.worker-top > div { flex: 1; min-width: 0; }
.worker-top b { display: block; font-weight: 600; }
.worker-top small { display: block; color: var(--muted); font-size: var(--t-xs); }
.keyrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.keyrow:last-child { border-bottom: 0; }
.keyrow > div { flex: 1; min-width: 160px; }
.keyrow b { display: block; font-weight: 600; }
.keyrow code { font-family: var(--mono); font-size: var(--t-sm); color: var(--text-2); overflow-wrap: anywhere; }
.auth { width: min(420px, 100%); margin-inline: auto; display: grid; gap: 18px; }
.auth h2 { font-size: var(--t-lg); }

/* ---------- long-form content ---------- */
.prose { max-width: 70ch; color: var(--text); line-height: 1.7; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: var(--t-xl); margin-top: 1.6em; }
.prose h3 { font-size: var(--t-lg); margin-top: 1.4em; }
.prose h4 { font-size: var(--t-md); margin-top: 1.2em; }
.prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; } .prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose li + li { margin-top: .35em; } .prose li::marker { color: var(--muted); }
.prose blockquote { margin-inline: 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--accent); color: var(--text-2); }
.prose code { font-family: var(--mono); font-size: .9em; padding: 2px 5px; border-radius: 4px; background: var(--raised); border: 1px solid var(--line); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose figure figcaption { font-size: var(--t-sm); color: var(--muted); margin-top: 8px; }
.prose .lead { font-size: var(--t-md); color: var(--text-2); }
.notfound { display: grid; justify-items: center; gap: 10px; padding: 48px 20px; text-align: center; }
.notfound .cells { display: flex; gap: 6px; margin-bottom: 10px; }
.notfound .cells span { width: 56px; height: 56px; border-radius: var(--r-md); display: grid; place-items: center; font-size: 26px; font-weight: 700; border: 1px solid var(--line-strong); color: var(--text-2); }
.notfound .cells span:nth-child(2) { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.notfound h2 { font-size: var(--t-xl); } .notfound p { color: var(--text-2); max-width: 44ch; }

/* range states, shared by the range grid, tables and legends */
.range-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14px, 1fr)); gap: 3px; }
.range-grid i { aspect-ratio: 1; border-radius: 2px; background: var(--sunk); }
.range-grid i.done { background: var(--accent); }
.range-grid i.busy { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent); animation: pulse 1.8s ease-in-out infinite; }
.range-grid i.mine { background: var(--ok); }



/* ==========================================================================
   Puzzle (pool) detail page
   ========================================================================== */
/* range ID: seven hex characters as squares, one hidden for security */
.hexid { display: inline-flex; gap: 2px; }
.hexid i { width: 20px; height: 24px; border-radius: 3px; background: var(--raised); border: 1px solid var(--line); display: grid; place-items: center; font: 500 12px/1 var(--mono); font-style: normal; color: var(--text); }
.hexid i.x { background: transparent; border-style: dashed; color: var(--muted); }
.hexid-lg i { width: 30px; height: 36px; font-size: 17px; border-radius: 5px; }
.range-row { display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 11px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.range-row:last-child { border-bottom: 0; }
.range-row:hover { background: var(--raised); }
.range-row.is-new { animation: rowNew 1.6s ease-out; }
.range-who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.range-who > div { min-width: 0; }
.range-who b { display: block; font: 500 var(--t-sm)/1.3 var(--mono); }
.range-who small { display: block; color: var(--muted); font-size: var(--t-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.range-who small strong { color: var(--accent-text); font-weight: 600; margin-right: 3px; }
.range-when { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.range-when small { display: block; color: var(--muted); font-size: var(--t-xs); }
@media (max-width: 720px) {
  .range-row { grid-template-columns: 1fr auto; grid-template-areas: "who go" "hex when"; gap: 10px 12px; }
  .range-who { grid-area: who; } .range-row .hexid { grid-area: hex; } .range-when { grid-area: when; align-self: center; justify-self: end; } .range-row > .link { grid-area: go; justify-self: end; }
  .range-when small { display: inline; margin-left: 6px; }
}
.avatar.is-king { box-shadow: 0 0 0 2px var(--accent); }
.pz-switch { display: flex; gap: 6px; }
.pz-switch .pz-n { width: 40px; height: 40px; font-size: var(--t-base); }
.pz-switch a.pz-n:hover { border-color: var(--text); color: var(--text); }
.pz-hero { display: grid; }
@media (min-width: 900px) { .pz-hero { grid-template-columns: 1fr 1fr; } .pz-hero > div + div { border-left: 1px solid var(--line); border-top: 0; } }
.pz-hero > div { display: grid; gap: 18px; align-content: start; padding: clamp(16px, 2.4vw, 28px); min-width: 0; }
.pz-hero > div + div { border-top: 1px solid var(--line); }
.bigfig { font-size: clamp(30px, 3.4vw + 14px, 46px); font-weight: 600; letter-spacing: -0.025em; line-height: 1; font-variant-numeric: tabular-nums; }
.bigfig small { font-size: .42em; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.lab { font-size: var(--t-sm); color: var(--muted); }
.detail { display: grid; gap: 20px; }
@media (min-width: 1080px) { .detail { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: start; } }
.detail > * { min-width: 0; display: grid; gap: 20px; align-content: start; }
.keysfig { font: 600 clamp(17px, 1.2vw + 12px, 22px)/1.3 var(--font); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wallet { display: grid; gap: 14px; align-items: center; }
@media (min-width: 760px) { .wallet { grid-template-columns: auto 1fr minmax(260px, 380px); gap: 18px; } }
.panel-foot { padding: 12px clamp(16px, 2vw, 24px); border-top: 1px solid var(--line); text-align: center; }
.rank li .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rank li .who > div { min-width: 0; flex: 1; }

/* puzzle page, finishing touches */
/* soft orange light behind the top of a page: spans the whole window so it never shows an edge */
body { overflow-x: clip; }
.wash { position: relative; z-index: 0; }
.wash::before { content: ""; position: absolute; z-index: -1; top: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); height: 620px; pointer-events: none;
  background: radial-gradient(ellipse 55% 90% at 28% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 72%); }
.pz-n-xl { width: 60px; height: 60px; border-radius: 14px; font-size: 25px; box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 35%, transparent); }
.tag svg { width: 13px; height: 13px; }
.page-head .meta-chips { gap: 8px; justify-content: flex-start; }
.coin { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; margin-right: .4em; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 700 .52em/1 Arial, sans-serif; vertical-align: .3em; }
.tool-pair { display: grid; gap: 10px; }
@media (min-width: 520px) { .tool-pair { grid-template-columns: 1fr 1fr; } }
.tool-pair a { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--raised); min-width: 0; transition: border-color .15s; }
.tool-pair a > span:nth-child(2) { flex: 1; min-width: 0; }
.tool-pair b { display: block; font-weight: 600; line-height: 1.25; }
.tool-pair small { display: block; font-size: var(--t-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-pair .tile { background: var(--panel); }
.tool-pair a > svg { width: 15px; height: 15px; color: var(--muted); }
.tool-pair a:hover { border-color: var(--accent); }
.tool-pair a:hover .tile { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.milestone { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--raised); }
.milestone .meter { background: var(--sunk); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-top .tile { width: 32px; height: 32px; border-radius: 9px; }
.stat-top .tile svg { width: 16px; height: 16px; }
.stat .avatars .avatar { width: 30px; height: 30px; font-size: 10px; }
.ruler { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 14px; margin-bottom: 14px; }
.ruler > div { min-width: 0; display: grid; gap: 2px; }
.ruler > i { height: 9px; margin-bottom: 7px; border-bottom: 1px dashed var(--line-strong); border-inline: 1px solid var(--line-strong); }
.sample-canvas { width: 100%; height: 130px; display: block; border-radius: var(--r-sm); }
.facts.est dd { font-size: 28px; letter-spacing: -0.02em; }
.panel-head h3 > svg { color: var(--muted); }

/* ==========================================================================
   Inner pages
   ========================================================================== */
.narrow { max-width: 860px; }
.page-head .lede { color: var(--text-2); max-width: 70ch; margin-top: 4px; }
.page-head .back { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); color: var(--text-2); }
.page-head .back:hover { color: var(--accent-text); }
.page-head .back svg { width: 14px; height: 14px; }
.block { margin-top: 20px; }
.block-lg { margin-top: clamp(32px, 4vw, 56px); }
.h-sec { font-size: var(--t-lg); margin-bottom: 14px; }

/* log in and register */
.auth-wrap { display: grid; gap: 20px; max-width: 980px; margin: clamp(24px, 5vw, 64px) auto 0; align-items: stretch; }
@media (min-width: 900px) { .auth-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.auth-card { display: grid; gap: 18px; align-content: start; padding: clamp(20px, 3vw, 36px); }
.auth-card h1 { font-size: var(--t-xl); }
.auth-side { --text: #f1f1f1; --text-2: #b7b7b7; --line: #2a2a2a; --raised: #1c1c1c; --ok: #5fb85f; display: grid; gap: 22px; align-content: center; padding: clamp(20px, 3vw, 40px); border-radius: var(--r-lg); background: radial-gradient(90% 70% at 0% 0%, rgba(247, 147, 26, .2), transparent 70%), #0d0d0d; border: 1px solid #2a2a2a; color: #f1f1f1; }
.auth-side h2 { font-size: var(--t-xl); }
.auth-side .facts { border-radius: var(--r-md); border: 1px solid #2a2a2a; }
.auth-side .facts > div { box-shadow: 1px 0 0 #2a2a2a, 0 1px 0 #2a2a2a; }
.auth-side .facts dt { color: #8b8b8b; }

/* docs and long pages with a side index */
.doc { display: grid; gap: 28px; margin-top: 24px; }
@media (min-width: 1000px) { .doc { grid-template-columns: 230px minmax(0, 1fr); gap: 56px; align-items: start; } .doc > aside { position: sticky; top: calc(var(--header-h) + 66px); max-height: calc(100vh - var(--header-h) - 90px); overflow: auto; } }
.doc > * { min-width: 0; }
.doc > aside { display: none; }
@media (min-width: 1000px) { .doc > aside { display: block; } }
.toc { display: grid; gap: 1px; font-size: var(--t-sm); border-left: 1px solid var(--line); }
.toc a { padding: 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--text-2); }
.toc a:hover { color: var(--text); }
.toc a.sub { padding-left: 26px; font-size: var(--t-xs); }
.toc a.is-active { border-left-color: var(--accent); color: var(--text); font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); display: block; overflow-x: auto; }
.prose th { text-align: left; font-weight: 500; color: var(--muted); background: var(--raised); }
.prose th, .prose td { padding: 9px 12px; border: 1px solid var(--line); vertical-align: top; }
.prose pre { background: #161616; color: #dfdfdf; border: 1px solid #363636; border-radius: var(--r-md); padding: 14px 16px; overflow-x: auto; font: 400 13px/1.65 var(--mono); }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.prose h2 { scroll-margin-top: calc(var(--header-h) + 70px); }
.prose h3 { scroll-margin-top: calc(var(--header-h) + 70px); }
.prose h3 code { margin-left: 6px; background: var(--ok-wash); border-color: transparent; color: var(--ok); font-weight: 600; }
.prose.wide { max-width: none; }
.prose.wide > p, .prose.wide > ul, .prose.wide > ol, .prose.wide > blockquote { max-width: 74ch; }

/* tool pages */
.tool-grid { display: grid; gap: 20px; margin-top: 24px; }
@media (min-width: 1000px) { .tool-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }
.tool-grid > * { min-width: 0; }
.form-stack { display: grid; gap: 16px; }
.result-list { display: grid; }
.result-list > div { display: grid; gap: 3px; padding: 14px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); min-width: 0; }
.result-list > div:last-child { border-bottom: 0; }
.result-list dt { font-size: var(--t-xs); color: var(--muted); }
.result-list dd { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.result-list dd.big { font-size: var(--t-xl); letter-spacing: -0.02em; line-height: 1.15; }
.krow { display: grid; grid-template-columns: 44px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; padding: 9px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.krow:last-child { border-bottom: 0; }
.krow:hover { background: var(--raised); }
.krow > * { min-width: 0; }
.krow .idx { color: var(--muted); font-variant-numeric: tabular-nums; font-size: var(--t-xs); }
.krow.is-hit { background: var(--accent-wash); }
.krow.head { font-size: var(--t-xs); color: var(--muted); background: var(--raised); padding-block: 9px; }
.krow.head:hover { background: var(--raised); }
.krow small { display: block; font-size: var(--t-xs); color: var(--muted); }
@media (max-width: 720px) { .krow { grid-template-columns: 34px minmax(0, 1fr); gap: 4px 10px; } .krow > :nth-child(n+3) { grid-column: 2; } .krow.head { display: none; } .krow [data-m]::before { content: attr(data-m); font-size: var(--t-xs); color: var(--muted); margin-right: 8px; font-family: var(--font); } }
.bitgrid { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; max-width: 560px; user-select: none; }
.bitgrid button { aspect-ratio: 1; border-radius: 3px; border: 1px solid var(--line-strong); background: var(--panel); font: 500 9px/1 var(--mono); color: var(--muted); }
.bitgrid button[aria-pressed="true"] { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.bitgrid button:disabled { background: var(--sunk); border-color: transparent; color: transparent; cursor: not-allowed; }
.bitgrid button.fixed { box-shadow: inset 0 0 0 2px var(--text); }

/* cloud search */
.cs-hero { --text: #f1f1f1; --text-2: #b7b7b7; --muted: #8b8b8b; display: grid; gap: 24px; padding: clamp(22px, 4vw, 48px); border-radius: var(--r-lg); border: 1px solid #2a2a2a; color: #f1f1f1; background: radial-gradient(70% 90% at 100% 0%, rgba(247, 147, 26, .22), transparent 65%), #0d0d0d; }
@media (min-width: 900px) { .cs-hero { grid-template-columns: 1.2fr 1fr; align-items: center; } }
.cs-hero h1 { font-size: var(--t-2xl); letter-spacing: -0.025em; line-height: 1.06; }
.cs-hero p { color: #b7b7b7; font-size: var(--t-md); margin-top: 14px; max-width: 46ch; }
.cs-hero .facts { border: 1px solid #2a2a2a; border-radius: var(--r-md); grid-template-columns: 1fr 1fr; }
.cs-hero .facts > div { box-shadow: 1px 0 0 #2a2a2a, 0 1px 0 #2a2a2a; }
.cs-hero .facts dt { color: #8b8b8b; }
.insts { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.inst { display: grid; gap: 14px; padding: 18px; align-content: start; }
.inst-top { display: flex; align-items: center; gap: 12px; }
.inst-top > div { flex: 1; min-width: 0; }
.inst-top b { display: block; font-size: var(--t-md); font-weight: 600; line-height: 1.2; }
.inst-top small { color: var(--muted); font-size: var(--t-xs); }
.inst-price { font-size: var(--t-lg); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inst-price small { font-size: var(--t-xs); font-weight: 400; color: var(--text-2); }
.inst .pairs { gap: 5px 16px; }
.gpu-mark { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; font-size: var(--t-sm); font-weight: 700; background: var(--accent-wash); color: var(--accent-text); flex: none; font-variant-numeric: tabular-nums; }

/* benchmark */
.bench { display: grid; grid-template-columns: 34px minmax(0, 1.1fr) minmax(0, 2fr) auto auto; gap: 14px; align-items: center; padding: 10px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.bench:last-child { border-bottom: 0; }
.bench:hover { background: var(--raised); }
.bench .n { color: var(--muted); font-variant-numeric: tabular-nums; font-size: var(--t-xs); }
.bench b { font-weight: 600; }
.bench .sp { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; min-width: 108px; }
.bench .mr { color: var(--text-2); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; min-width: 92px; }
.bench .meter { height: 6px; }
.bench:nth-child(-n+3) .meter i { background: var(--accent); }
.bench .meter i { background: var(--line-strong); }
@media (max-width: 720px) { .bench { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 4px 10px; } .bench .meter { grid-column: 2 / -1; grid-row: 2; } .bench .mr { grid-column: 2 / -1; text-align: left; font-size: var(--t-xs); } }

/* realtime status */
.event { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 10px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); font-size: var(--t-sm); animation: rowNew 1.6s ease-out; }
.event:last-child { border-bottom: 0; }
.event time { color: var(--muted); font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.event .who { font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .event { grid-template-columns: auto minmax(0, 1fr) auto; } .event .hexid { grid-column: 2; grid-row: 2; } .event time { grid-column: 3; grid-row: 1; } }

/* forum topic: wider post header */
.post .prose { max-width: 76ch; margin-top: 10px; }
.post-side { display: grid; justify-items: center; gap: 6px; width: 64px; }
.post-side small { font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.3; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .post { grid-template-columns: 1fr; } .post-side { display: flex; width: auto; justify-items: start; align-items: center; gap: 10px; } .post-side .avatar-lg { width: 36px; height: 36px; border-radius: var(--r-md); } }
.ann { display: grid; gap: 4px; padding: 16px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.ann:last-child { border-bottom: 0; }
.ann:hover { background: var(--raised); }
.ann b { font-size: var(--t-md); font-weight: 600; }
.ann small { color: var(--muted); font-size: var(--t-xs); }
.token-coin { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font: 700 14px/1 var(--font); letter-spacing: -0.02em; color: var(--on-accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-wash); flex: none; }
.pz-table td:first-child { width: 1%; }
.pz-table .pz-n { width: 38px; height: 38px; font-size: var(--t-sm); }
.pz-table .pz-n.solved { background: var(--cell-solved); border-color: transparent; color: var(--cell-solved-text); }
.pz-table tr.flash td { animation: rowNew 1.8s ease-out; }
.pz-table small { display: block; color: var(--muted); font-size: var(--t-xs); }
.pz-table[data-detailed="false"] .det { display: none; }

/* calc visual + faq side */
.calc-amount { align-items: flex-end; }
.calc-time { display: grid; text-align: right; line-height: 1.3; color: var(--text-2); }
.calc-time b { font-weight: 600; color: var(--text); white-space: nowrap; }
.calc-time small { font-size: var(--t-xs); color: var(--muted); white-space: nowrap; }
.calc-scale { display: flex; justify-content: space-between; margin-top: 6px; font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.calc-grid { display: grid; grid-template-columns: repeat(40, 1fr); gap: 2px; margin-top: 20px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: #080808; }
.calc-grid i { aspect-ratio: 1; border-radius: 1px; background: #232323; }
.calc-grid i.on { background: var(--accent); }
.calc-cap { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.calc-cap i { width: 8px; height: 8px; border-radius: 1px; background: var(--accent); flex: none; }
@media (min-width: 1000px) { .faq-side { position: sticky; top: calc(var(--header-h) + 62px); align-self: start; } }

/* mega menu: full width sheet under the header */
.menu.mega { position: static; }
.menu-list.mega-list { left: 0; right: 0; top: 100%; min-width: 0; padding: 0; border: 0; border-top: 1px solid var(--dr-line); border-bottom: 1px solid var(--hd-line); border-radius: 0; background: var(--mg-bg); color: var(--hd-sub-strong); box-shadow: var(--mg-shadow); }
.header .mega-grid { display: grid; grid-template-columns: 1fr 1fr 1fr minmax(240px, 300px); gap: 12px 28px; height: auto; align-items: start; padding-top: 26px; padding-bottom: 30px; }
.mega-grid > * { min-width: 0; }
.mega-col h4 { font-size: var(--t-xs); font-weight: 500; color: var(--hd-muted); padding: 0 10px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--hd-pop-sep); }
.mega-list .mega-col > a { display: flex; align-items: center; gap: 13px; padding: 9px 10px; border-radius: var(--r-md); }
.mega-col .tile { width: 40px; height: 40px; flex: none; transition: background .15s, color .15s, border-color .15s; }
.mega-col b { display: block; font-size: var(--t-base); font-weight: 600; line-height: 1.3; color: var(--hd-sub-strong); }
.mega-list .mega-col a small { font-size: var(--t-xs); color: var(--hd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mega-col > a > span:last-child { min-width: 0; }
.mega-list .mega-col > a:hover { background: var(--mg-hover); }
.mega-col > a:hover .tile { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.mega-list .mega-col > a.mega-all { margin-top: 4px; padding-left: 63px; font-size: var(--t-sm); font-weight: 600; color: var(--accent-text); gap: 6px; }
.mega-all svg { width: 14px; height: 14px; transition: transform .15s; }
.mega-all:hover svg { transform: translateX(3px); }
.mega-list a.mega-now { display: grid; gap: 10px; justify-items: start; padding: 18px; border: 1px solid var(--hd-pop-line); border-radius: var(--r-lg); background: linear-gradient(160deg, rgba(247, 147, 26, .13), rgba(247, 147, 26, 0) 55%), var(--mg-now-bg); }
.mega-list a.mega-now:hover { background: linear-gradient(160deg, rgba(247, 147, 26, .2), rgba(247, 147, 26, 0) 60%), var(--mg-now-bg-hover); border-color: var(--dr-tile-line); }
.mega-now > b { font-size: var(--t-lg); font-weight: 600; line-height: 1.1; margin-top: 2px; }
.mega-reward { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.mega-reward small { display: inline !important; font-size: var(--t-sm) !important; font-weight: 400; color: var(--hd-muted); letter-spacing: 0; }
.mega-now .meter { width: 100%; }
.mega-now .btn { margin-top: 4px; }

.header .menu-list { z-index: 60; }
.header .subbar .page { z-index: 0; }

.mega-list.is-open::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 100vh; margin-top: 1px; background: var(--hd-dim); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); animation: mega-dim .18s ease-out; }
@keyframes mega-dim { from { opacity: 0; } }

/* inner page overflow guards */
.prose { overflow-wrap: anywhere; min-width: 0; }
.prose table { display: block; max-width: 100%; overflow-x: auto; }
.prose pre { max-width: 100%; overflow-x: auto; }
.prose img { max-width: 100%; height: auto; }
.post > *, .post-side > *, .tool-grid > *, .result-list > div > *, .pairs > * { min-width: 0; }
.filters .btn-group { flex-wrap: wrap; }

.brand .logo { display: block; height: 21px; width: auto; aspect-ratio: 1168 / 169; color: var(--hd-strong); overflow: visible; }
@media (max-width: 420px) { .brand .logo { height: 18px; } }

/* puzzle quick view: sits on top of the grid, inside the panel padding; the panel keeps its size */
.panel.is-detail { position: relative; }
.panel.is-detail > :not(.pzq) { visibility: hidden; }
.pzq { position: absolute; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; overscroll-behavior: contain; outline: 0; animation: pzq-in .16s ease-out; }
@keyframes pzq-in { from { opacity: 0; transform: translateX(8px); } }
.pzq { gap: 0; }
.pzq > * { flex: none; }
.pzq-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pzq-back { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 8px; border-radius: var(--r-md); font-size: var(--t-sm); font-weight: 600; color: var(--text-2); }
.pzq-back:hover { background: var(--raised); color: var(--text); }
.pzq-back svg { width: 16px; height: 16px; }
.pzq-nav { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.pzq-nav button { width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--r-md); color: var(--text-2); }
.pzq-nav button:hover:not(:disabled) { background: var(--raised); color: var(--text); }
.pzq-nav button:disabled { opacity: .35; }
.pzq-nav svg { width: 16px; height: 16px; }
.pzq-hero { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--raised); }
.pzq-hero .pz-n { width: 52px; height: 52px; font-size: var(--t-lg); border-radius: var(--r-md); flex: none; }
.pzq-name { display: grid; gap: 5px; justify-items: start; min-width: 0; }
.pzq-name h3 { font-size: var(--t-lg); line-height: 1.1; white-space: nowrap; }
.pzq-reward { margin-left: auto; display: grid; justify-items: end; text-align: right; gap: 1px; }
.pzq-reward .lab { font-size: var(--t-xs); color: var(--muted); }
.pzq-reward b { font-size: clamp(22px, 1.4vw + 14px, 30px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pzq-reward b small { font-size: .5em; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.pzq-reward .usd { font-size: var(--t-xs); color: var(--text-2); font-variant-numeric: tabular-nums; }
.pzq .pzq-rows { flex: 1 0 auto; display: grid; grid-auto-rows: minmax(34px, 1fr); margin-top: 6px; }
.pzq-rows > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 2px; border-bottom: 1px solid var(--line); min-width: 0; }
.pzq-rows > div:last-child { border-bottom: 0; }
.pzq-rows dt { font-size: var(--t-sm); color: var(--muted); white-space: nowrap; }
.pzq-rows dd { font-weight: 600; font-size: var(--t-sm); font-variant-numeric: tabular-nums; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.pzq-rows .mono { font-family: var(--mono); font-weight: 500; font-size: var(--t-xs); }
.pzq-rows .hexv { justify-content: flex-end; max-width: 100%; }
.pzq-act { padding: 10px 1px 3px; }
@media (max-width: 520px) { .pzq-hero { padding: 12px; gap: 10px; } .pzq-hero .pz-n { width: 42px; height: 42px; font-size: var(--t-md); } .pzq-name h3 { font-size: var(--t-md); } }

/* ads: own typeface, label in the corner, one-line headline */
.ad-list { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; letter-spacing: 0; }
.ad-list > small { position: absolute; z-index: 1; top: 12px; right: 14px; padding: 2px 7px; border: 1px solid var(--hd-pop-line); border-radius: 5px; background: var(--hd-pop-bg); font-size: 10px; line-height: 1.4; color: var(--hd-muted); pointer-events: none; }
.ad-list a { min-width: 0; }
.ad-list a:first-of-type b { padding-right: 84px; }
.ad-list a b { font-weight: 700; }
.ad-list a u { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pz-table .pk { display: flex; align-items: center; gap: 8px; margin-top: 5px; max-width: 100%; min-width: 0; }
.pz-table .pk > span { flex: none; padding: 1px 6px; border-radius: 5px; background: var(--raised); border: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.pz-table .pk .hexv { font-size: var(--t-xs); color: var(--text-2); min-width: 0; }
.pz-table td.wide > .hexv { display: flex; width: fit-content; }

/* puzzle list page: a lower, wider grid, and the detail laid out sideways when the box is wide */
@media (min-width: 760px) { .ladder-wide { grid-template-columns: repeat(20, 1fr); } }
@media (min-width: 1100px) { .ladder-wide { grid-template-columns: repeat(32, 1fr); } }
.pzq { container-type: inline-size; }
.pzq .pzq-body { flex: 1 0 auto; display: flex; flex-direction: column; }
@container (min-width: 820px) {
  .pzq .pzq-body { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 8px 32px; margin-top: 6px; }
  .pzq-body .pzq-hero { margin-top: 0; padding: 8px 14px; min-height: 0; overflow: hidden; }
  .pzq-body .pzq-hero .pz-n { width: 40px; height: 40px; font-size: var(--t-md); }
  .pzq-body .pzq-name h3 { font-size: var(--t-md); }
  .pzq-body .pzq-reward b { font-size: 22px; }
  .pzq-body .pzq-reward .lab { display: none; }
  .pzq .pzq-body .pzq-rows { grid-column: 2; grid-row: 1 / 3; flex: none; min-height: 0; grid-template-columns: 1fr 1fr; column-gap: 32px; grid-auto-rows: minmax(0, 1fr); margin-top: 0; }
  .pzq-body .pzq-rows > div { padding-block: 0; }
  .pzq-body .pzq-rows > div:nth-last-child(-n+2):nth-child(odd), .pzq-body .pzq-rows > div:last-child { border-bottom: 0; }
  .pzq-body .pzq-act { grid-column: 1; padding: 0 1px 2px; }
  .pzq-body .pzq-act .btn { height: 32px; min-height: 0; font-size: var(--t-sm); }
}

.pzq-key { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); font-family: var(--mono); font-size: var(--t-sm); font-weight: 600; letter-spacing: 0; text-align: right; cursor: pointer; }
.pzq-key span { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.pzq-key svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; }
.pzq-key:hover { background: color-mix(in srgb, var(--ok) 20%, transparent); }
.pzq-rows > .is-key dd { flex: 1 1 0; }

/* key list: both addresses stacked in one column */
.krow.k3 { grid-template-columns: 44px minmax(0, 1.25fr) minmax(0, 1fr); }
.kaddrs { display: grid; gap: 4px; }
.kaddrs > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kaddrs abbr { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 5px; border: 1px solid var(--line-strong); background: var(--raised); font-size: 10px; font-weight: 600; color: var(--muted); text-decoration: none; cursor: help; }
.kaddrs .hexv { flex: 0 1 auto; min-width: 0; }
.ktags { display: inline-flex; gap: 4px; flex: none; }
.ktags .tag { font-size: 10px; padding: 1px 6px; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .krow.k3 { grid-template-columns: 34px minmax(0, 1fr); } .kaddrs > div { flex-wrap: wrap; row-gap: 3px; } }

.oneline { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) { .kaddrs > div { display: grid; grid-template-columns: 20px minmax(0, 1fr); flex-wrap: nowrap; } .kaddrs .hexv { justify-self: start; } .kaddrs .ktags { grid-column: 2; flex-wrap: wrap; } }

/* long explanatory text in a full-width panel: two columns so it uses the width and lines stay readable */
.prose.wide.cols > * { max-width: none; }
@media (min-width: 1000px) {
  .prose.wide.cols { display: block; columns: 2; column-gap: clamp(40px, 4vw, 72px); column-rule: 1px solid var(--line); }
  .prose.wide.cols > * + * { margin-top: 14px; }
  .prose.wide.cols > h2:not(:first-child), .prose.wide.cols > h3:not(:first-child) { margin-top: 28px; }
  .prose.cols > h2, .prose.cols > h3, .prose.cols > h4 { break-after: avoid; }
  .prose.cols > pre, .prose.cols > table, .prose.cols > blockquote, .prose.cols > p, .prose.cols li { break-inside: avoid; }
}

.stat b { overflow-wrap: anywhere; }
@media (max-width: 520px) { .stat b { font-size: 21px; } .stat { padding: 14px; } .stat-top { flex-wrap: wrap; } .bench.bench-head { display: none; } }
.prose > :first-child, .prose.wide.cols > :first-child { margin-top: 0; }

/* key list: scan options, closed until asked for */
.scan-box { display: grid; gap: 14px 16px; padding: 16px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); background: var(--raised); align-items: end; }
.scan-box[hidden] { display: none; }
.scan-box .field { margin: 0; }
.scan-box .select { width: 100%; }
.scan-go { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
@media (min-width: 760px) { .scan-box { grid-template-columns: minmax(180px, 240px) minmax(180px, 240px) 1fr; } }
#scan-toggle[aria-expanded="true"] { background: var(--raised); border-color: var(--text-2); }
#scan-toggle[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }

@media (max-width: 520px) { .filters .btn-group { flex-wrap: nowrap; width: 100%; } .filters .btn-group .btn { flex: 1 1 auto; padding: 0 6px; font-size: 12px; gap: 2px; } .table-tools > .filters { width: 100%; } }

/* forum ranks: shield with the level, and the user card */
.shield { width: 22px; height: 26px; flex: none; --c: #4caf6a; }
.shield .s-out { fill: color-mix(in srgb, var(--c) 30%, #1a1a1a); stroke: var(--c); stroke-width: 1.4; stroke-linejoin: round; }
.shield .s-in { fill: var(--c); opacity: .9; }
.shield text { font: 700 10px/1 var(--font); fill: #10160f; }
.shield.sm { width: 14px; height: 17px; vertical-align: -3px; margin-right: 5px; }
.shield.sm text { display: none; }
.shield.lg { width: 40px; height: 47px; }
.shield[data-lvl="2"] { --c: #4aa3df; } .shield[data-lvl="3"] { --c: #7c8cf0; } .shield[data-lvl="4"] { --c: #a77bea; } .shield[data-lvl="5"] { --c: #d572c8; }
.shield[data-lvl="6"] { --c: #e8697f; } .shield[data-lvl="7"] { --c: #ee8a4a; } .shield[data-lvl="8"] { --c: #f7931a; } .shield[data-lvl="9"] { --c: #e8c14a; } .shield[data-lvl="10"] { --c: #f5e08a; }
.post-side { align-content: start; width: auto; }
.user-pop { position: relative; display: inline-flex; align-items: center; gap: 9px; padding: 3px 8px 3px 4px; border-radius: var(--r-md); cursor: pointer; outline: 0; }
.user-pop:hover, .user-pop:focus-within, .user-pop:focus { background: var(--raised); }
.up-name { display: grid; line-height: 1.25; }
.up-name b { font-size: var(--t-base); }
.up-name small { font-size: var(--t-xs); color: var(--muted); }
.usercard { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 300px; max-width: calc(100vw - 48px); padding: 16px; background: #0b0b0b; color: #f1f1f1; border: 1px solid #2e2e2e; border-radius: var(--r-lg); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); display: none; cursor: default; font-family: var(--font); }
.user-pop:hover .usercard, .user-pop:focus .usercard, .user-pop:focus-within .usercard { display: block; }
.uc-top { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid #222; }
.uc-top b { display: block; font-size: var(--t-md); line-height: 1.2; }
.uc-top small { display: block; font-size: var(--t-xs); color: #8b8b8b; }
.lvlbar { display: flex; gap: 3px; margin-top: 7px; }
.lvlbar i { width: 12px; height: 4px; border-radius: 2px; background: #2a2a2a; }
.lvlbar i.on { background: var(--accent); }
.usercard dl { display: grid; gap: 8px; margin-top: 14px; font-size: var(--t-sm); }
.usercard dl > div { display: flex; justify-content: space-between; gap: 14px; }
.usercard dt { color: #8b8b8b; white-space: nowrap; }
.usercard dd { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.usercard dd.zero { color: var(--bad); }
.post-head .tag svg { width: 12px; height: 12px; }
@media (max-width: 560px) { .post { grid-template-columns: 1fr; } .post-side { display: none; } }

/* topic page: posts with a side column */
.topic-grid { display: grid; gap: 20px; }
.topic-grid > * { min-width: 0; }
.topic-grid > aside { display: grid; gap: 20px; align-content: start; }
@media (min-width: 1100px) { .topic-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; } .topic-grid > aside { position: sticky; top: calc(var(--header-h) + 66px); } }
.topic-grid .post .prose, .topic-grid .post .prose > * { max-width: none; }
.result-list.tight > div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 10px 16px; }
.result-list.tight dd { font-size: var(--t-sm); text-align: right; }
.people { display: grid; max-height: 320px; overflow-y: auto; }
.people > div { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: var(--t-sm); min-width: 0; }
.people > div:last-child { border-bottom: 0; }
.people small { display: block; font-size: var(--t-xs); color: var(--muted); }
.people .avatar { width: 30px; height: 30px; flex: none; }

.topic-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.topic-bar .meta-chips { margin: 0; justify-content: flex-end; }
.shield.sm { display: inline-block; }
.people > div > span:last-child { min-width: 0; }

/* scrollbars: one thin themed bar everywhere, the page included */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; min-height: 36px; }
::-webkit-scrollbar-thumb:hover { background-color: var(--muted); }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: transparent; }
html::-webkit-scrollbar { width: 12px; }
html::-webkit-scrollbar-track { background: var(--bg); }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; } }

/* cloud search: instance cards built to be picked */
.page.wash { display: flow-root; }
.insts { gap: 18px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.inst { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; transition: border-color .15s, transform .15s, box-shadow .15s; }
.inst:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0, 0, 0, .28); }
.inst.is-pick { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, var(--panel)), var(--panel) 46%); }
.inst-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 0; min-height: 38px; }
.vendor { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--text-2); }
.vendor i { width: 18px; height: 18px; border-radius: 5px; background: #76b900; display: grid; place-items: center; }
.vendor i::after { content: ""; width: 8px; height: 8px; border-radius: 2px; background: rgba(0, 0, 0, .55); }
.vendor[data-v="AMD"] i { background: #ed1c24; }
.inst-up { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: var(--text-2); font-variant-numeric: tabular-nums; }
.inst-up i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.inst-name { padding: 12px 18px 0; }
.inst-name b { display: block; font-size: var(--t-lg); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
.inst-name b span { color: var(--accent-text); }
.inst-name small { display: block; margin-top: 3px; color: var(--muted); font-size: var(--t-xs); }
.inst-buy { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 16px 18px 0; }
.inst-buy .inst-price { font-size: 30px; font-weight: 600; letter-spacing: -0.025em; line-height: 1; }
.inst-buy .inst-price small { font-size: var(--t-sm); letter-spacing: 0; }
.inst-day { font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.inst-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 18px 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised); }
.inst-stats > div { padding: 9px 10px; min-width: 0; }
.inst-stats > div + div { border-left: 1px solid var(--line); }
.inst-stats dt { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inst-stats dd { font-size: var(--t-md); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 2px; }
.inst-stats dd small { display: block; font-size: 10.5px; font-weight: 400; color: var(--muted); }
.inst-speed { height: 3px; margin: 10px 18px 0; border-radius: 2px; background: var(--line); overflow: hidden; }
.inst-speed i { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
.inst-meta { display: flex; justify-content: space-between; gap: 10px; padding: 10px 18px 0; margin-top: auto; font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.inst > .btn { margin: 14px 18px 18px; width: auto; }
@media (prefers-reduced-motion: reduce) { .inst:hover { transform: none; } }

/* docs: side index as a card, one line per entry, endpoints with their method */
@media (min-width: 1000px) { .doc { grid-template-columns: 264px minmax(0, 1fr); gap: 40px; } .doc > aside { overflow: visible; max-height: none; } }
.toc-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--panel-shadow); padding: 8px; max-height: calc(100vh - var(--header-h) - 100px); overflow-x: hidden; overflow-y: auto; }
.toc-card h4 { font-size: var(--t-xs); font-weight: 500; color: var(--muted); padding: 8px 10px 10px; }
.toc { border-left: 0; gap: 2px; }
.toc a { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; padding: 7px 10px; border: 0; border-radius: var(--r-md); color: var(--text-2); position: relative; }
.toc a > span:not(.method), .toc a > code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc a:hover { background: var(--raised); color: var(--text); }
.toc a.sub { padding-left: 22px; font-size: var(--t-xs); }
.toc a.ep { padding-left: 10px; }
.toc a.ep code { font-family: var(--mono); font-size: 11.5px; }
.toc a.is-active { background: var(--raised); color: var(--text); font-weight: 600; border: 0; }
.toc a.is-active::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 2px; background: var(--accent); }
.toc .method { height: 18px; padding: 0 5px; font-size: 10px; flex: none; min-width: 44px; justify-content: center; }
.method.m-put { background: var(--warn-wash, #3a3220); color: var(--warn, #e0b24a); }
.method.m-patch { background: var(--premium-wash); color: var(--premium); }
.prose h3.ep-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2em; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised); font-size: var(--t-md); }
.prose h3.ep-h code { margin: 0; padding: 0; border: 0; background: none; color: var(--text); font-size: var(--t-base); font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.prose h3.ep-h .method { height: 24px; padding: 0 9px; font-size: 12px; }

.prose th, .prose td { overflow-wrap: normal; word-break: normal; }
.prose th { white-space: nowrap; }
.prose td code { white-space: nowrap; }
.prose td:last-child { min-width: 220px; }

/* FAQ page: search first, topics under it, one column of answers */
.faq-hero { display: grid; justify-items: center; text-align: center; gap: 10px; padding: clamp(24px, 4vw, 44px) 0 8px; }
.faq-hero h1 { font-size: var(--t-2xl); letter-spacing: -0.025em; line-height: 1.08; margin-top: 6px; }
.faq-hero p { color: var(--text-2); }
.faq-search { width: min(640px, 100%); margin-top: 14px; }
.faq-search .input { height: 54px; border-radius: 14px; font-size: var(--t-md); box-shadow: var(--panel-shadow); }
.faq-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.faq-main { max-width: 860px; margin: 18px auto 0; }
.faq-found { min-height: 22px; font-size: var(--t-sm); color: var(--muted); margin-bottom: 8px; }
.faq-card { padding: 4px clamp(16px, 2.4vw, 28px); }
.faq-card[hidden] { display: none; }
.faq-card > details:first-of-type { border-top: 0; }
.faq-card > details:last-of-type { border-bottom: 0; }
.faq-card summary { padding-block: 16px; }
.faq-card details[open] > summary { color: var(--accent-text); }
.faq-more { margin-top: clamp(32px, 5vw, 56px); }
.faq-links { display: grid; gap: 12px; }
@media (min-width: 720px) { .faq-links { grid-template-columns: repeat(3, 1fr); } }
.faq-links a { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); min-width: 0; transition: border-color .15s; }
.faq-links a:hover { border-color: var(--accent); }
.faq-links a > span:nth-child(2) { flex: 1; min-width: 0; }
.faq-links b { display: block; font-weight: 600; line-height: 1.25; }
.faq-links small { display: block; font-size: var(--t-xs); color: var(--muted); }
.faq-links a > svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.faq-links .tile { width: 40px; height: 40px; flex: none; }

/* docs side index, second pass: numbered sections, reading progress, read and current states */
.toc-card { padding: 0 8px 10px; --p: 0%; scroll-behavior: smooth; }
.toc-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; margin: 0 -8px 8px; padding: 14px 18px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.toc-head::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: var(--p); background: var(--accent); border-radius: 0 2px 2px 0; transition: width .15s linear; }
.toc-card .toc-head h4 { padding: 0; font-size: var(--t-sm); font-weight: 600; color: var(--text); }
#toc-pct { font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.toc { counter-reset: sec; gap: 1px; }
.toc a { padding: 8px 10px; gap: 10px; font-size: var(--t-sm); transition: background-color .12s, color .12s; }
.toc a:not(.sub) { counter-increment: sec; }
.toc a:not(.sub)::before { content: counter(sec, decimal-leading-zero); position: static; width: 22px; flex: none; background: none; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.toc a.sub { margin-left: 20px; padding: 6px 10px 6px 14px; border-left: 1px solid var(--line); border-radius: 0 var(--r-md) var(--r-md) 0; font-size: var(--t-xs); }
.toc a.sub.ep { margin-left: 0; border-left: 0; border-radius: var(--r-md); padding-left: 10px; }
.toc a.is-done { color: var(--muted); }
.toc a.is-done:not(.sub)::before { content: ""; width: 22px; height: 14px; background: var(--ok); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 7.500 3.500 3.500L13 4'/%3E%3C/svg%3E") left center / 22px 14px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 7.500 3.500 3.500L13 4'/%3E%3C/svg%3E") left center / 22px 14px no-repeat; }
.toc a.is-active { background: var(--accent-wash); color: var(--text); font-weight: 600; }
.toc a.is-active:not(.sub)::before { top: auto; bottom: auto; left: auto; width: 22px; border-radius: 0; background: none; color: var(--accent-text); }
.toc a.sub.is-active { border-left-color: var(--accent); box-shadow: inset 1px 0 0 var(--accent); }
.toc a.sub.is-active::before { content: none; }
.doc > aside > .btn { margin-top: 14px !important; }

.doc .prose.wide > *, .narrow .prose.wide > * { max-width: none; }
@media (min-width: 1000px) { .doc .prose table { display: table; width: 100%; } }

/* contact page */
.ct-hero { --text: #f1f1f1; --text-2: #b7b7b7; --muted: #8b8b8b; --line: #2a2a2a; --line-strong: #454545; --raised: #1c1c1c; --panel: #151515; display: grid; gap: 28px; padding: clamp(22px, 4vw, 44px); border: 1px solid #2a2a2a; border-radius: var(--r-lg); color: #f1f1f1; background: radial-gradient(60% 110% at 100% 0%, rgba(247, 147, 26, .2), transparent 62%), #0d0d0d; }
@media (min-width: 900px) { .ct-hero { grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); align-items: center; gap: 48px; } }
.ct-hero > * { min-width: 0; }
.ct-mail { display: flex; gap: 18px; align-items: flex-start; }
.ct-mail .tile { width: 48px; height: 48px; flex: none; background: rgba(247, 147, 26, .14); border-color: transparent; color: #f7931a; }
.ct-mail .tile svg { width: 22px; height: 22px; }
.ct-mail .lab { font-size: var(--t-sm); color: #8b8b8b; }
.ct-addr { display: block; font-size: clamp(22px, 2.6vw + 10px, 38px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; color: #fff; overflow-wrap: anywhere; margin-top: 2px; }
.ct-addr:hover { color: #f7931a; }
.ct-mail p { color: #b7b7b7; max-width: 52ch; margin-top: 10px; }
.ct-ghost { background: transparent; color: #f1f1f1; border-color: #454545; }
.ct-ghost:hover { background: #1c1c1c; }
.ct-times { display: grid; border: 1px solid #2a2a2a; border-radius: var(--r-md); background: rgba(0, 0, 0, .35); }
.ct-times > div { padding: 16px 18px; }
.ct-times > div + div { border-top: 1px solid #2a2a2a; }
.ct-times dt { font-size: var(--t-xs); color: #8b8b8b; }
.ct-times dd { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ct-times dd small { font-size: var(--t-sm); font-weight: 400; color: #b7b7b7; letter-spacing: 0; }
.ct-times::before { content: "We aim to reply within"; display: block; padding: 12px 18px; border-bottom: 1px solid #2a2a2a; font-size: var(--t-sm); font-weight: 600; }
.ct-grid { display: grid; gap: 24px; }
.ct-grid > * { min-width: 0; }
@media (min-width: 900px) { .ct-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: start; } }
.ct-ticks { gap: 14px; font-size: var(--t-base); }
.ct-ticks li { grid-template-columns: 20px 1fr; }
.ct-ticks svg { width: 18px; height: 18px; }
.ct-ticks b { display: block; font-weight: 600; }
.ct-ticks span { color: var(--text-2); font-size: var(--t-sm); }
.ct-ticks span b { color: var(--text); font-size: var(--t-base); }
.ct-ways { display: grid; gap: 10px; }
.ct-ways a { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--panel-shadow); min-width: 0; transition: border-color .15s; }
.ct-ways a:hover { border-color: var(--accent); }
.ct-ways a:hover .tile { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.ct-ways a > span:nth-child(2) { flex: 1; min-width: 0; }
.ct-ways b { display: block; font-weight: 600; line-height: 1.25; }
.ct-ways small { display: block; font-size: var(--t-xs); color: var(--muted); }
.ct-ways .tile { width: 40px; height: 40px; flex: none; transition: background .15s, color .15s; }
.ct-ways a > svg { width: 15px; height: 15px; color: var(--muted); flex: none; }

/* short explanatory text under a tool */
.about-card { display: flex; gap: clamp(14px, 2vw, 22px); align-items: flex-start; padding: clamp(18px, 2.4vw, 28px); }
.about-card > .tile { width: 46px; height: 46px; flex: none; background: var(--accent-wash); border-color: transparent; color: var(--accent-text); }
.about-card > .tile svg { width: 21px; height: 21px; }
.about-card > div { min-width: 0; flex: 1; }
.about-card h2 { font-size: var(--t-lg); line-height: 1.2; letter-spacing: -0.01em; }
.about-lead { margin-top: 6px; font-weight: 600; color: var(--text); }
.about-card .prose { margin-top: 8px; color: var(--text-2); font-size: var(--t-base); line-height: 1.65; }
.about-card .prose.wide > * { max-width: none; }
.about-card .prose h2, .about-card .prose h3 { font-size: var(--t-md); color: var(--text); }
@media (max-width: 520px) { .about-card { flex-direction: column; } }

.bench-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
/* vendor mark: drop the official logo files in assets/ and uncomment to replace the coloured square
.vendor[data-v="NVIDIA"] i { background: url(nvidia.svg) center / contain no-repeat; }
.vendor[data-v="AMD"] i { background: url(amd.svg) center / contain no-repeat; }
.vendor i::after { content: none; } */

/* ===== member area ===== */
.user-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 5px; border: 1px solid var(--ub-line); border-radius: var(--r-md); background: var(--ub-bg); color: var(--hd-sub-strong); font-size: var(--t-sm); font-weight: 600; }
.user-btn:hover, .user-btn[aria-expanded="true"] { background: var(--hd-hover); border-color: var(--dr-tile-line); }
.user-btn > svg { width: 14px; height: 14px; color: var(--hd-muted); transition: transform .15s; }
.user-btn[aria-expanded="true"] > svg { transform: rotate(180deg); }
.menu-list.user-menu { width: 280px; padding: 8px; }
.um-head { display: flex; align-items: center; gap: 12px; padding: 8px 8px 12px; }
.um-head b { display: flex; align-items: center; gap: 8px; font-size: var(--t-base); }
.um-head small { display: block; font-size: var(--t-xs); color: var(--muted); }
.um-money, .acct-money { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised); margin: 0 4px 8px; }
.um-money > div, .acct-money > div { padding: 8px 12px; min-width: 0; }
.um-money > div + div, .acct-money > div + div { border-left: 1px solid var(--line); }
.um-money dt, .acct-money dt { font-size: 11px; color: var(--muted); }
.um-money dd, .acct-money dd { font-weight: 600; font-variant-numeric: tabular-nums; font-size: var(--t-sm); }
.menu-list a.row-ic .count { margin-left: auto; }

.acct { display: grid; gap: 24px; padding-top: clamp(18px, 2.4vw, 28px); }
.acct > * { min-width: 0; }
@media (min-width: 1000px) { .acct { grid-template-columns: 272px minmax(0, 1fr); gap: 36px; align-items: start; } .acct-side { position: sticky; top: calc(var(--header-h) + 62px); } }
.acct-card { padding: 16px 12px 10px; }
.acct-user { display: flex; align-items: center; gap: 12px; padding: 0 4px 14px; }
.acct-user > div { min-width: 0; }
.acct-user b { display: flex; align-items: center; gap: 8px; font-size: var(--t-md); line-height: 1.2; }
.acct-user button { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; font-size: var(--t-xs); color: var(--muted); }
.acct-user button:hover { color: var(--text); }
.acct-user button svg { width: 12px; height: 12px; }
.acct-money { margin: 0 4px 10px; }
.acct-nav a svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.acct-nav a[aria-current="page"] svg:first-child, .acct-nav a:hover svg:first-child { color: var(--accent-text); }
.acct-nav a.danger, .acct-nav a.danger svg { color: var(--bad); }
.acct-bal { margin-left: auto; font-size: var(--t-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
.bad { color: var(--bad); } .ok { color: var(--ok); }
.acct-support { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 12px; font-size: var(--t-xs); color: var(--muted); }
.acct-support a:hover { color: var(--text); }
.acct-jump { display: none; }
@media (max-width: 999px) {
  .acct-jump { display: flex; align-items: center; gap: 10px; width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised); font-size: var(--t-sm); font-weight: 600; }
  .acct-jump svg { width: 16px; height: 16px; } .acct-jump svg:last-child { margin-left: auto; color: var(--muted); transition: transform .15s; }
  .acct-jump[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }
  .acct-nav { display: none; margin-top: 8px; } .acct-nav.is-open { display: grid; }
  .acct-card { padding-bottom: 12px; } .acct-support { display: none; }
}
.acct-head { margin-bottom: 4px; }
.acct-head h1 { font-size: var(--t-xl); letter-spacing: -0.02em; line-height: 1.1; margin-top: 10px; }
.acct-head p { color: var(--text-2); margin-top: 6px; max-width: 70ch; }
.acct-main > .block:first-of-type, .acct-main > .acct-seg { margin-top: 20px; }
.acct-two { display: grid; gap: 20px; }
.acct-two > * { min-width: 0; margin: 0; }
@media (min-width: 760px) { .acct-two { grid-template-columns: 1fr 1fr; align-items: start; } }
.acct-share { display: grid; gap: 18px; padding: clamp(16px, 2vw, 24px); }
@media (min-width: 760px) { .acct-share { grid-template-columns: auto minmax(0, 1fr); gap: 36px; align-items: center; } }
.acct-share .lab { display: block; font-size: var(--t-xs); color: var(--muted); margin-bottom: 4px; }
.acct-share .bigfig { font-size: clamp(24px, 2vw + 12px, 34px); }
.acct-share .prose { font-size: var(--t-sm); color: var(--text-2); }
.acct-share .prose > * { max-width: none; }
.setting small.hex { margin-top: 4px; font-size: var(--t-xs); } .setting small.hex b { display: inline; color: var(--accent-text); }
.copyline .copy + .copy { margin-left: 0; }
.btn.danger, .btn.danger svg { color: var(--bad); }
.acct-tpl { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 16px; }
.acct-tpl > div { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.acct-tpl > div > div { min-width: 0; flex: 1; max-width: 420px; }
.acct-tpl .lab { display: block; font-size: var(--t-xs); color: var(--muted); margin-bottom: 3px; }
.acct-tpl .select { width: 100%; height: 36px; }
.irows { display: grid; gap: 10px; }
.irow { display: grid; gap: 12px; padding: 14px 16px; align-items: center; transition: border-color .15s; }
.irow:hover { border-color: var(--accent); }
@media (min-width: 900px) { .irow { grid-template-columns: minmax(200px, 1.1fr) minmax(0, 2fr) auto; gap: 24px; } }
.irow-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.irow-main b { display: block; font-size: var(--t-md); line-height: 1.2; } .irow-main b span { color: var(--accent-text); }
.irow-main small { display: block; font-size: var(--t-xs); color: var(--muted); margin-top: 2px; }
.irow-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; }
@media (min-width: 620px) { .irow-facts { grid-template-columns: 1.3fr 1fr .8fr 1fr; } }
.irow-facts dt { font-size: 11px; color: var(--muted); }
.irow-facts dd { font-size: var(--t-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.irow-buy { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 16px; }
.irow-buy .inst-price { font-size: var(--t-lg); }
.irow-buy > small { grid-column: 1; font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.irow-buy .btn { grid-column: 2; grid-row: 1 / 3; min-width: 84px; }
.tpl-item { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px clamp(16px, 2vw, 24px); }
.tpl-item > div:nth-child(2) { flex: 1; min-width: 200px; }
.tpl-item b { display: block; font-size: var(--t-md); } .tpl-item small { display: block; font-size: var(--t-xs); color: var(--text-2); margin-top: 2px; }
.tpl-form { display: grid; }
.tpl-field { display: grid; gap: 8px; padding: 14px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .tpl-field { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; } .tpl-field > label { padding-top: 9px; } }
.tpl-field code { font-family: var(--mono); font-size: var(--t-sm); color: var(--accent-text); }
.tpl-field .input { width: 100%; } .tpl-field .help { margin-top: 8px; max-width: 80ch; }
.tpl-save { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px clamp(16px, 2vw, 24px); background: var(--raised); }
.tpl-save .input { flex: 1; min-width: 200px; }
.bill-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: clamp(18px, 3vw, 30px); border: 1px solid #2a2a2a; border-radius: var(--r-lg); color: #f1f1f1; background: radial-gradient(60% 120% at 100% 0%, rgba(247, 147, 26, .18), transparent 62%), #0d0d0d; --text: #f1f1f1; --text-2: #b7b7b7; --line-strong: #454545; --panel: #151515; --bg: #0d0d0d; }
.bill-hero .lab { display: block; font-size: var(--t-sm); color: #8b8b8b; margin-bottom: 4px; }
.bill-hero .bad { color: #ff7a70; }

.um-money > a, .acct-money > a { display: block; padding: 8px 12px; min-width: 0; border-radius: 0; transition: background-color .12s; }
.menu-list .um-money > a { display: block; padding: 8px 12px; border-radius: 0; }
.um-money > a + a, .acct-money > a + a { border-left: 1px solid var(--line); }
.um-money > a:hover, .acct-money > a:hover, .acct-money > a[aria-current="page"] { background: var(--accent-wash); }
.um-money small, .acct-money small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.um-money b, .acct-money b { font-weight: 600; font-variant-numeric: tabular-nums; font-size: var(--t-sm); }
.um-money, .acct-money { overflow: hidden; }
.refill { display: grid; gap: 16px; color: var(--text); }
.refill p { color: var(--text-2); }
.coins { display: flex; flex-wrap: wrap; gap: 6px; }
.coins span { height: 26px; padding: 0 9px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 13px; background: var(--raised); font-size: 11px; font-weight: 600; color: var(--text-2); }
.rf-total { display: grid; gap: 2px; justify-items: center; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised); }
.rf-total span { font-size: var(--t-sm); color: var(--muted); }
.rf-total b { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.refill small { color: var(--muted); font-size: var(--t-xs); text-align: center; }
.refill .affix > span { font-weight: 600; }

.myinst { overflow: hidden; }
.myinst-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.myinst-head b { display: block; font-size: var(--t-lg); line-height: 1.15; } .myinst-head b span { color: var(--accent-text); }
.myinst-head small { display: block; font-size: var(--t-xs); color: var(--muted); margin-top: 2px; }
.myinst-head .inst-price { font-size: var(--t-xl); }
.myinst-state { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 14px clamp(16px, 2vw, 24px); background: var(--accent-wash); border-bottom: 1px solid var(--line); }
.myinst-state > div:nth-child(2) { flex: 1; min-width: 200px; }
.myinst-state b { font-weight: 600; } .myinst-state small { display: block; font-size: var(--t-sm); color: var(--text-2); }
.myinst-more { border-bottom: 1px solid var(--line); } .myinst-more:last-of-type { border-bottom: 0; }
.myinst-more summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 13px clamp(16px, 2vw, 24px); font-weight: 600; font-size: var(--t-sm); }
.myinst-more summary::-webkit-details-marker { display: none; }
.myinst-more summary svg { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.myinst-more[open] summary svg { transform: rotate(180deg); }
.myinst-more summary:hover { background: var(--raised); }
.envlist { margin: 0 clamp(16px, 2vw, 24px) 16px; border: 1px solid #363636; border-radius: var(--r-md); background: #161616; color: #dfdfdf; font: 400 12.5px/1.5 var(--mono); padding: 6px 0; }
.envlist > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 3px 14px; }
.envlist dt { color: #8b8b8b; } .envlist dd { overflow-wrap: anywhere; }
@media (max-width: 560px) { .envlist > div { grid-template-columns: 1fr; gap: 0; padding: 5px 12px; } }

.myinst-state.is-run { background: var(--ok-wash); }
.myinst-state .live-dot { flex: none; }
.myinst-gpu { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-bottom: 1px solid var(--line); }
.myinst-gpu > div { display: grid; gap: 3px; padding: 14px clamp(16px, 2vw, 24px); min-width: 0; }
.myinst-gpu > div + div { border-left: 1px solid var(--line); }
.myinst-gpu .lab { font-size: var(--t-xs); color: var(--muted); }
.myinst-gpu b { font-size: var(--t-lg); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.myinst-gpu .meter { height: 5px; margin-top: 4px; }
@media (max-width: 560px) { .myinst-gpu > div + div { border-left: 0; border-top: 1px solid var(--line); } }

/* custom dropdown (built from every select.select) */
.dd { position: relative; display: inline-block; min-width: 0; max-width: 100%; vertical-align: middle; }
.field > .dd, .dd-block, .form-stack .dd, .tpl-field .dd, .scan-box .dd { display: block; width: 100%; }
.dd-native { position: absolute !important; inset: 0 auto auto 0; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; padding: 0; border: 0; margin: 0 !important; }
.dd-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--panel); color: var(--text); text-align: left; font-size: inherit; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.dd-btn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn > svg { width: 15px; height: 15px; flex: none; color: var(--muted); transition: transform .15s; }
.dd-btn:hover { border-color: var(--text-2); }
.dd-btn:focus-visible, .dd.is-open .dd-btn { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.dd.is-open .dd-btn > svg { transform: rotate(180deg); }
.dd-pop { position: fixed; z-index: 200; display: none; flex-direction: column; width: max-content; max-width: min(360px, calc(100vw - 16px)); padding: 6px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--panel); color: var(--text); box-shadow: var(--overlay-shadow); font-size: var(--t-sm); }
.dd.is-open .dd-pop { display: flex; animation: dd-in .12s ease-out; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } }
.dd-search { position: relative; margin-bottom: 6px; flex: none; }
.dd-search[hidden] { display: none; }
.dd-search svg { position: absolute; left: 10px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; color: var(--muted); pointer-events: none; }
.dd-search input { width: 100%; height: 36px; padding: 0 10px 0 32px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised); color: var(--text); outline: 0; font-size: var(--t-sm); }
.dd-search input:focus { border-color: var(--accent); }
.dd-list { display: grid; gap: 1px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; margin: 0; padding: 0; list-style: none; }
.dd-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 10px; border-radius: var(--r-md); cursor: pointer; white-space: nowrap; }
.dd-list li[hidden] { display: none; }
.dd-list li > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dd-list li svg { width: 15px; height: 15px; flex: none; color: var(--accent-text); visibility: hidden; }
.dd-list li.is-act { background: var(--raised); }
.dd-list li[aria-selected="true"] { font-weight: 600; }
.dd-list li[aria-selected="true"] svg { visibility: visible; }
.dd-list li[aria-disabled="true"] { color: var(--muted); cursor: default; }
.dd-none { padding: 14px 10px; color: var(--muted); text-align: center; }
.filters .dd, .table-tools .dd, .setting .dd { width: auto; }
.filters .dd-btn { min-width: 150px; }
.affix > .dd { flex: 1; min-width: 0; margin: 0; } .affix > .dd:first-child .dd-btn { border-radius: var(--r-md) 0 0 var(--r-md); }
.jump .dd { display: block; width: 100%; }

/* dashboard: share, challenge, scan options */
.share-hero { display: grid; gap: 22px; padding: clamp(20px, 3vw, 32px); border: 1px solid #2a2a2a; border-radius: var(--r-lg); color: #f1f1f1; background: radial-gradient(55% 130% at 0% 0%, rgba(247, 147, 26, .2), transparent 62%), #0d0d0d; --text: #f1f1f1; --text-2: #b7b7b7; --muted: #8b8b8b; }
@media (min-width: 820px) { .share-hero { grid-template-columns: auto minmax(0, 1fr); gap: 48px; align-items: center; } .share-ticks { padding-left: 48px; border-left: 1px solid #2a2a2a; } }
.share-amt { display: grid; gap: 6px; }
.share-amt .lab { display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); color: #b7b7b7; }
.share-amt .bigfig { font-size: clamp(30px, 2.6vw + 14px, 46px); white-space: nowrap; }
.share-amt > small { font-size: var(--t-xs); color: #8b8b8b; }
.share-ticks { gap: 12px; font-size: var(--t-sm); color: #b7b7b7; }
.share-ticks b { color: #f1f1f1; font-weight: 600; }
.share-ticks svg { color: #f7931a; }
.challenge { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: clamp(16px, 2vw, 22px) clamp(16px, 2vw, 24px); }
.challenge > .tile { width: 46px; height: 46px; flex: none; background: var(--accent-wash); border-color: transparent; color: var(--accent-text); }
.challenge > div { flex: 1; min-width: 220px; }
.challenge h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--t-md); }
.challenge p { color: var(--text-2); font-size: var(--t-sm); margin-top: 3px; }
.opt-grid { display: grid; gap: 12px; padding: clamp(14px, 2vw, 20px); }
@media (min-width: 820px) { .opt-grid { grid-template-columns: repeat(3, 1fr); } }
.opt-card { display: grid; gap: 8px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised); cursor: pointer; transition: border-color .15s, background-color .15s; min-width: 0; }
.opt-card:hover { border-color: var(--line-strong); }
.opt-card:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.opt-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.opt-top b { font-size: var(--t-sm); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.opt-top input[role="switch"] { appearance: none; flex: none; width: 38px; height: 22px; border-radius: 11px; background: var(--line-strong); position: relative; cursor: pointer; transition: background-color .15s; }
.opt-top input[role="switch"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.opt-top input[role="switch"]:checked { background: var(--accent); }
.opt-top input[role="switch"]:checked::after { transform: translateX(16px); }
.opt-card > small { font-size: var(--t-sm); color: var(--text-2); line-height: 1.5; }
.opt-ex { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--line-strong); font-size: var(--t-xs); }
.opt-ex i { font-style: normal; color: var(--muted); }
.opt-ex .hex b { color: var(--accent-text); font-weight: 600; }

/* search instances: aligned rows */
.irows { gap: 12px; }
.irow { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 14px 16px; padding: 16px 18px; align-items: center; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.irow::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); opacity: 0; transition: opacity .15s; }
.irow:hover { border-color: var(--line-strong); box-shadow: 0 10px 24px rgba(0, 0, 0, .22); } .irow:hover::before { opacity: 1; }
.irow-main { gap: 12px; }
.irow-n { flex: none; min-width: 44px; height: 44px; padding: 0 8px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--accent-wash); color: var(--accent-text); font-weight: 700; font-size: var(--t-md); font-variant-numeric: tabular-nums; }
.irow-main > div { min-width: 0; }
.irow-main b { font-size: var(--t-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.irow-main .vendor { margin-top: 4px; font-size: 10px; } .irow-main .vendor i { width: 12px; height: 12px; border-radius: 3px; } .irow-main .vendor i::after { width: 5px; height: 5px; border-radius: 1px; }
.irow-specs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.irow-specs span { height: 24px; padding: 0 9px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); font-size: 11px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.irow-specs b { color: var(--text); font-weight: 600; }
.irow-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised); }
.irow-facts > div { padding: 9px 12px; min-width: 0; border-bottom: 1px solid var(--line); }
.irow-facts > div:nth-child(odd) { border-right: 1px solid var(--line); } .irow-facts > div:nth-last-child(-n+2) { border-bottom: 0; }
.irow-facts dd { font-size: var(--t-base); white-space: nowrap; } .irow-facts dd small { font-size: 11px; font-weight: 400; color: var(--muted); }
.irow-facts .inst-speed { display: block; margin: 5px 0 0; height: 3px; }
.irow-buy { display: grid; gap: 1px; grid-template-columns: none; }
.irow-buy .inst-price { font-size: var(--t-xl); line-height: 1.1; letter-spacing: -0.02em; }
.irow-buy > small { grid-column: auto; }
.irow > .btn { min-width: 96px; }
@media (min-width: 1180px) {
  .irow { grid-template-columns: 220px minmax(0, 1fr) 132px auto; gap: 8px 20px; }
  .irow-main { grid-column: 1; grid-row: 1; } .irow-specs { grid-column: 1; grid-row: 2; }
  .irow-facts { grid-column: 2; grid-row: 1 / 3; grid-template-columns: 1.25fr 1fr .8fr 1fr; align-self: stretch; }
  .irow-facts > div { border-bottom: 0; border-right: 1px solid var(--line); display: grid; align-content: center; } .irow-facts > div:last-child { border-right: 0; }
  .irow-buy { grid-column: 3; grid-row: 1 / 3; justify-items: end; text-align: right; } .irow > .btn { grid-column: 4; grid-row: 1 / 3; }
}

.irow-facts dt { white-space: nowrap; }
.irow-specs span { height: 22px; padding: 0 7px; font-size: 10.5px; }
@media (min-width: 1180px) { .irow { grid-template-columns: 250px minmax(0, 1fr) 124px auto; gap: 8px 18px; } .irow-specs { flex-wrap: nowrap; gap: 4px; } .irow-buy .inst-price { font-size: var(--t-lg); } .irow-facts dd { font-size: var(--t-sm); } .irow > .btn { min-width: 84px; } }

/* settings: 2FA and kingdom */
.twofa { display: grid; gap: 20px; padding: clamp(16px, 2vw, 24px); }
@media (min-width: 860px) { .twofa { grid-template-columns: minmax(0, 1fr) auto; gap: 36px; align-items: center; } }
.twofa-info { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.twofa-info > .tile { width: 46px; height: 46px; flex: none; background: var(--ok-wash); border-color: transparent; color: var(--ok); }
.twofa-info h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: var(--t-md); }
.twofa-info p { color: var(--text-2); font-size: var(--t-sm); margin-top: 4px; max-width: 56ch; }
.twofa-box { display: grid; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--raised); justify-items: start; }
.twofa-box .lab { font-size: var(--t-sm); color: var(--text-2); }
.twofa-box .otp { gap: 6px; align-items: center; }
.twofa-box .otp input { width: 42px; height: 50px; }
.twofa-box .otp i { width: 10px; height: 2px; border-radius: 1px; background: var(--line-strong); margin: 0 3px; }
.twofa-box .btn { width: 100%; }
@media (max-width: 420px) { .twofa-box .otp input { width: 36px; height: 46px; } .twofa-box .otp { gap: 4px; } }
.kingdom { display: grid; gap: 22px; padding: clamp(16px, 2vw, 24px); }
@media (min-width: 900px) { .kingdom { grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; } }
.kingdom > * { min-width: 0; }
.k-preview .lab { display: block; font-size: var(--t-xs); color: var(--muted); margin-bottom: 8px; }
.k-card { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 22px 18px; border: 1px solid #2a2a2a; border-radius: var(--r-lg); color: #f1f1f1; background: radial-gradient(90% 70% at 50% 0%, rgba(247, 147, 26, .2), transparent 70%), #0d0d0d; }
.k-card b { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-md); }
.k-card p { color: #b7b7b7; font-size: var(--t-sm); margin-top: 4px; overflow-wrap: anywhere; }
.kimg-art { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: var(--r-md); background: radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--b) 45%, var(--a)), var(--a)); color: var(--b); }
.kimg-art svg { width: 46%; height: 46%; stroke-width: 1.5; }
.kimg-art.k-big { width: 112px; border-radius: 18px; box-shadow: 0 0 0 3px rgba(247, 147, 26, .5); }
.k-form { display: grid; gap: 18px; }
.kimgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; }
.kimg { position: relative; cursor: pointer; border-radius: var(--r-md); }
.kimg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.kimg .kimg-art { transition: transform .12s; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.kimg:hover .kimg-art { transform: scale(1.04); }
.kimg-ok { position: absolute; top: -5px; right: -5px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: none; place-items: center; box-shadow: 0 0 0 2px var(--panel); }
.kimg-ok svg { width: 12px; height: 12px; stroke-width: 2.6; }
.kimg input:checked ~ .kimg-art { box-shadow: 0 0 0 2px var(--accent); }
.kimg input:checked ~ .kimg-ok { display: grid; }
.kimg input:focus-visible ~ .kimg-art { box-shadow: 0 0 0 3px var(--accent-wash), 0 0 0 2px var(--accent); }

.k-pick { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised); }
.k-pick > .kimg-art { width: 56px; flex: none; }
.k-pick > div { flex: 1; min-width: 140px; }
.k-pick b { display: block; font-weight: 600; } .k-pick small { display: block; font-size: var(--t-xs); color: var(--muted); }
dialog.kdlg { width: min(880px, calc(100% - 24px)); max-height: calc(100dvh - 32px); }
dialog.kdlg[open] { display: flex; flex-direction: column; }
.kdlg .dialog-head h3 { display: flex; align-items: center; gap: 10px; }
.kd-grid { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; align-content: start; }
.kdlg .dialog-foot { border-top: 1px solid var(--line); padding-top: 12px; align-items: center; flex-wrap: wrap; }
.kdlg .kimg-ok { top: 4px; right: 4px; box-shadow: none; }
@media (max-width: 520px) { .kd-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; padding: 12px 14px; } }

/* payments: summary and transaction rows */
.pay-sum { display: grid; gap: 14px; }
@media (min-width: 820px) { .pay-sum { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.pay-main { display: grid; gap: 4px; padding: clamp(18px, 3vw, 28px); border: 1px solid #2a2a2a; border-radius: var(--r-lg); color: #f1f1f1; background: radial-gradient(60% 130% at 0% 0%, rgba(95, 184, 95, .16), transparent 62%), #0d0d0d; }
.pay-main .lab { font-size: var(--t-sm); color: #b7b7b7; } .pay-main > small { font-size: var(--t-xs); color: #8b8b8b; }
.pay-bar { display: flex; gap: 3px; height: 8px; margin-top: 14px; }
.pay-bar i { display: block; min-width: 6px; border-radius: 4px; }
.pay-bar .st-confirmed { background: #5fb85f; } .pay-bar .st-created { background: #6b6b6b; } .pay-bar .st-failed { background: #e0685f; }
.pay-side { display: grid; gap: 14px; }
.pay-side > div { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--panel-shadow); }
.pay-side > div > div { flex: 1; min-width: 0; }
.pay-side small { display: block; font-size: var(--t-xs); color: var(--muted); }
.pay-side b { font-size: var(--t-lg); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.tx-ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; }
.tx-ic svg { width: 17px; height: 17px; stroke-width: 2.2; }
.tx-ic.st-confirmed { background: var(--ok-wash); color: var(--ok); } .tx-ic.st-created { background: var(--raised); color: var(--text-2); border: 1px solid var(--line); } .tx-ic.st-failed { background: var(--bad-wash); color: var(--bad); }
.tx-month { padding: 10px clamp(16px, 2vw, 24px); background: var(--raised); border-bottom: 1px solid var(--line); font-size: var(--t-xs); font-weight: 500; color: var(--muted); }
.tx-month:not(:first-child) { border-top: 1px solid var(--line); }
.tx { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 14px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); transition: background-color .12s; }
.tx:last-child { border-bottom: 0; } .tx[hidden], .tx-month[hidden] { display: none; }
.tx:hover { background: var(--raised); }
.tx-main { min-width: 0; }
.tx-main b { display: block; font-weight: 600; line-height: 1.25; }
.tx-main small { display: block; font-size: var(--t-xs); color: var(--muted); margin-top: 1px; min-width: 0; }
.tx-main .hexv { font-size: var(--t-xs); color: var(--text-2); max-width: 100%; }
.tx time { grid-column: 2; font-size: var(--t-xs); color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx time small { margin-left: 6px; color: var(--muted); font-size: inherit; }
.tx-amt { grid-column: 3; grid-row: 1; font-size: var(--t-lg); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; text-align: right; }
.tx-amt.st-confirmed { color: var(--ok); } .tx-amt.st-failed { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.tx-act { grid-column: 3; justify-self: end; }
@media (min-width: 860px) { .tx { grid-template-columns: auto minmax(0, 1fr) 150px 110px 130px; gap: 16px; } .tx time, .tx-amt, .tx-act { grid-column: auto; grid-row: auto; } .tx time small { display: block; margin: 0; } }

/* a status strip tucked behind the card it belongs to */
.stack-card { position: relative; }
.stack-back { display: flex; align-items: center; gap: 14px; padding: 14px clamp(16px, 2vw, 24px) 30px; margin: 0 10px; border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; background: linear-gradient(180deg, color-mix(in srgb, var(--ok) 18%, var(--panel)), color-mix(in srgb, var(--ok) 7%, var(--panel))); }
.stack-back > svg { width: 20px; height: 20px; flex: none; color: var(--ok); }
.stack-back > div { flex: 1; min-width: 0; }
.stack-back strong { display: block; font-weight: 600; font-size: var(--t-sm); }
.stack-back p { font-size: var(--t-xs); color: var(--text-2); }
.stack-card > .panel { position: relative; margin-top: -16px; box-shadow: 0 -10px 24px rgba(0, 0, 0, .28), var(--panel-shadow); }
@media (max-width: 520px) { .stack-back { margin: 0 6px; } .stack-back .tag { display: none; } }

/* template form: grouped, human labels, the config key as a small tag */
.tgrp { display: grid; gap: 16px; margin: 0; padding: clamp(18px, 2.2vw, 26px) clamp(16px, 2vw, 24px); border: 0; border-bottom: 1px solid var(--line); min-width: 0; }
@media (min-width: 900px) { .tgrp { grid-template-columns: 240px minmax(0, 1fr); gap: 36px; } }
.tgrp-head { display: flex; gap: 12px; align-items: flex-start; }
.tgrp-head .tile { width: 38px; height: 38px; flex: none; }
.tgrp-head h4 { font-size: var(--t-base); font-weight: 600; }
.tgrp-head p { font-size: var(--t-sm); color: var(--text-2); margin-top: 2px; }
.tgrp-body { display: grid; gap: 16px; min-width: 0; }
.tgrp-body .form-row { display: grid; gap: 16px; } .tgrp-body .form-row[hidden] { display: none; }
@media (min-width: 620px) { .tgrp-body .form-row { grid-template-columns: 1fr 1fr; } }
.tgrp-body .field { min-width: 0; } .tgrp-body .input, .tgrp-body .textarea { width: 100%; }
.tkey { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; background: var(--raised); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tsw { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised); cursor: pointer; transition: border-color .15s, background-color .15s; }
.tsw:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.tsw > span { min-width: 0; }
.tsw b { font-weight: 600; margin-right: 8px; }
.tsw .tkey { background: var(--panel); }
.tsw small { display: block; margin-top: 4px; font-size: var(--t-sm); color: var(--text-2); line-height: 1.5; }
.tsw input[role="switch"] { appearance: none; flex: none; width: 38px; height: 22px; margin-top: 1px; border-radius: 11px; background: var(--line-strong); position: relative; cursor: pointer; transition: background-color .15s; }
.tsw input[role="switch"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.tsw input[role="switch"]:checked { background: var(--accent); } .tsw input[role="switch"]:checked::after { transform: translateX(16px); }
.tg-more { padding-left: 14px; border-left: 2px solid var(--accent); }
.tform-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px clamp(16px, 2vw, 24px); background: var(--raised); border-radius: 0 0 var(--r-lg) var(--r-lg); margin-top: -1px; border-top: 1px solid var(--line); }

/* my instances: three states */
.myinst-head .tag { flex: none; }
.myinst-state { position: relative; overflow: hidden; isolation: isolate; }
.myinst-state > * { position: relative; }
.myinst-state.is-run { background: linear-gradient(100deg, color-mix(in srgb, var(--ok) 26%, var(--panel)), color-mix(in srgb, var(--ok) 8%, var(--panel)) 55%, var(--panel)); }
.myinst-state.is-run::before { content: ""; position: absolute; z-index: -1; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 22px, color-mix(in srgb, var(--ok) 12%, transparent) 22px 23px); -webkit-mask: linear-gradient(90deg, #000, transparent 70%); mask: linear-gradient(90deg, #000, transparent 70%); animation: inst-scan 3.2s linear infinite; }
.myinst-state.is-run::after { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: -30%; width: 30%; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ok) 22%, transparent), transparent); animation: inst-sweep 3.6s ease-in-out infinite; }
@keyframes inst-scan { to { background-position: 50px 0; } }
@keyframes inst-sweep { to { left: 110%; } }
.myinst.is-run { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.myinst-state.is-load { background: linear-gradient(100deg, var(--accent-wash), var(--panel) 80%); }
.myinst-state .loadbar { display: block; height: 3px; margin-top: 10px; max-width: 320px; border-radius: 2px; background: var(--line); overflow: hidden; }
.myinst-state .loadbar i { display: block; height: 100%; width: 35%; border-radius: 2px; background: var(--accent); animation: inst-load 1.4s ease-in-out infinite; }
@keyframes inst-load { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.myinst-state.is-dead { background: linear-gradient(100deg, var(--bad-wash), var(--panel) 80%); }
.myinst-state.is-dead > svg { width: 20px; height: 20px; flex: none; color: var(--bad); }
.myinst.is-dead { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.myinst-gpu.is-off b { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .myinst-state.is-run::before, .myinst-state.is-run::after, .myinst-state .loadbar i { animation: none; } }

.myinst-gpu.is-off .meter i { display: none; }

/* template form: stacked groups, closed until asked for */
@media (min-width: 900px) { .tgrp { grid-template-columns: 1fr; gap: 16px; } }
.tgrp-head { align-items: center; }
.tnew { overflow: hidden; }
.tnew > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 16px clamp(16px, 2vw, 24px); }
.tnew > summary::-webkit-details-marker { display: none; }
.tnew > summary:hover { background: var(--raised); }
.tnew > summary .tile { width: 40px; height: 40px; flex: none; background: var(--accent-wash); border-color: transparent; color: var(--accent-text); }
.tnew > summary > span:nth-child(2) { flex: 1; min-width: 0; }
.tnew > summary b { display: block; font-size: var(--t-md); font-weight: 600; } .tnew > summary small { display: block; font-size: var(--t-sm); color: var(--text-2); }
.tnew > summary > svg { width: 18px; height: 18px; color: var(--muted); transition: transform .15s; }
.tnew[open] > summary { border-bottom: 1px solid var(--line); } .tnew[open] > summary > svg { transform: rotate(180deg); }

/* loading buttons, every variant */
.btn.is-busy, .btn.is-busy:disabled { opacity: 1; cursor: progress; }
.btn.is-busy > * { visibility: hidden; }
.btn.is-busy::after { inset: 0; margin: auto; border-color: var(--busy, var(--on-accent)); border-right-color: transparent; }
.btn-secondary.is-busy, .btn-soft.is-busy, .btn-quiet.is-busy { --busy: var(--text); }
.btn-danger.is-busy { --busy: var(--bad); }
.btn.is-busy-text, .btn.is-busy-text:disabled { opacity: .85; cursor: progress; }
.busy-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: none; }
/* empty states */
.empty.is-bad .tile { background: var(--bad-wash); border-color: transparent; color: var(--bad); }
.empty.is-ok .tile { background: var(--ok-wash); border-color: transparent; color: var(--ok); }
.empty-sm { display: flex; align-items: center; justify-items: start; gap: 14px; padding: 18px clamp(16px, 2vw, 24px); text-align: left; }
.empty-sm .tile { width: 40px; height: 40px; border-radius: var(--r-md); margin: 0; flex: none; } .empty-sm .tile svg { width: 18px; height: 18px; }
.empty-sm h3 { font-size: var(--t-base); } .empty-sm p { max-width: none; }
.table tr.empty-row td { padding: 28px 16px; text-align: center; color: var(--muted); font-size: var(--t-sm); }
.table tr.empty-row:hover td { background: none; }
.empty-row svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 8px; }

.empty-row svg { display: inline-block; }
/* wizard steps */
.wiz { --p: 0%; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 22px clamp(8px, 2vw, 24px) 18px; list-style: none; border-bottom: 1px solid var(--line); }
.wiz::before, .wiz::after { content: ""; position: absolute; top: 37px; left: calc(12.5% + clamp(8px, 2vw, 24px) * .75); height: 2px; border-radius: 1px; }
.wiz::before { right: calc(12.5% + clamp(8px, 2vw, 24px) * .75); background: var(--line-strong); }
.wiz::after { width: calc((75% - clamp(8px, 2vw, 24px) * 1.5) * var(--n, 0)); background: var(--accent); transition: width .35s cubic-bezier(.4, 0, .2, 1); }
.wiz li { position: relative; z-index: 1; display: grid; justify-items: center; }
.wiz button { display: grid; justify-items: center; gap: 8px; padding: 0 4px; color: var(--muted); font-size: var(--t-sm); font-weight: 500; cursor: pointer; }
.wiz i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--panel); font-style: normal; font-weight: 600; font-size: var(--t-sm); font-variant-numeric: tabular-nums; transition: background-color .25s, border-color .25s, color .25s, box-shadow .25s, transform .25s; }
.wiz i svg { width: 15px; height: 15px; stroke-width: 2.6; }
.wiz li.is-done i { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.wiz li.is-done button { color: var(--text-2); }
.wiz li.is-now i { border-color: var(--accent); color: var(--accent-text); box-shadow: 0 0 0 5px var(--accent-wash); transform: scale(1.06); }
.wiz li.is-now button { color: var(--text); font-weight: 600; }
.wiz button:hover i { border-color: var(--accent); }
.wiz-body { overflow: hidden; }
.wiz-body .tgrp { border-bottom: 0; min-height: 300px; align-content: start; }
.wiz-body .tgrp[hidden] { display: none; }
.wiz-body .tgrp.from-r { animation: wiz-r .28s cubic-bezier(.2, .7, .2, 1); } .wiz-body .tgrp.from-l { animation: wiz-l .28s cubic-bezier(.2, .7, .2, 1); }
@keyframes wiz-r { from { opacity: 0; transform: translateX(28px); } } @keyframes wiz-l { from { opacity: 0; transform: translateX(-28px); } }
.tform-foot .btn svg { width: 16px; height: 16px; }
@media (max-width: 520px) { .wiz button span { font-size: 11px; } .wiz i { width: 28px; height: 28px; } .wiz::before, .wiz::after { top: 35px; } }
@media (prefers-reduced-motion: reduce) { .wiz-body .tgrp { animation: none !important; } }

/* help strip tucked under the account menu */
.acct-card { position: relative; z-index: 1; }
.acct-help { display: grid; margin: -14px 10px 0; padding: 24px 6px 6px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); background: color-mix(in srgb, var(--panel) 55%, var(--bg)); font-size: var(--t-xs); }
.acct-help .lab { padding: 0 8px 4px; font-size: 11px; color: var(--muted); }
.acct-help a { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: var(--r-md); color: var(--text-2); min-width: 0; }
.acct-help a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-help a svg { width: 14px; height: 14px; flex: none; color: var(--muted); }
.acct-help a svg:last-child { width: 12px; height: 12px; opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.acct-help a:hover { background: var(--raised); color: var(--text); }
.acct-help a:hover svg:first-child { color: var(--accent-text); } .acct-help a:hover svg:last-child { opacity: 1; transform: none; }
@media (max-width: 999px) { .acct-help { display: none; } }

/* coin icons */
svg.coin-ic { width: 16px; height: 16px; flex: none; border-radius: 50%; }
.um-money small, .acct-money small { display: flex; align-items: center; gap: 6px; }
span.coin-ic.coin-xl { display: block; width: 52px; height: 52px; flex: none; }
span.coin-ic.coin-xl svg { width: 100%; height: 100%; }
.setting > svg.coin-ic { width: 28px; height: 28px; }

.coin-cloud { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent-wash); color: var(--accent-text); } .coin-cloud svg { width: 15px; height: 15px; }

/* completed scans: the range is the hero of each row */
.hexid-lg { gap: 4px; }
.hexid-lg i { width: 34px; height: 42px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, var(--raised), var(--panel)); font: 600 18px/1 var(--mono); color: var(--text); font-style: normal; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 2px rgba(0, 0, 0, .25); }
.hexid-lg i.x { border: 1px dashed var(--accent); background: var(--accent-wash); color: var(--accent-text); box-shadow: none; }
.hexid-lg i.x svg { width: 15px; height: 15px; }
.scans { display: grid; }
.scan { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 14px; align-items: center; padding: 16px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); transition: background-color .12s; }
.scan:hover { background: var(--raised); } .scan:hover .hexid-lg i:not(.x) { border-color: var(--accent); }
.scan-ok { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--ok-wash); color: var(--ok); flex: none; }
.scan-ok svg { width: 15px; height: 15px; stroke-width: 2.4; }
.scan-who { grid-column: 2; min-width: 0; } .scan-who b { display: block; font-weight: 600; } .scan-who small { display: block; font-size: var(--t-xs); color: var(--muted); }
.scan dl { grid-column: 2; display: flex; gap: 24px; }
.scan dt { font-size: 11px; color: var(--muted); } .scan dd { font-weight: 600; font-size: var(--t-sm); font-variant-numeric: tabular-nums; white-space: nowrap; } .scan dd small { font-weight: 400; color: var(--muted); font-size: 11px; }
.scan time { grid-column: 2; font-size: var(--t-xs); color: var(--text-2); white-space: nowrap; }
.scans-note { display: flex; align-items: center; gap: 8px; padding: 12px clamp(16px, 2vw, 24px); font-size: var(--t-xs); color: var(--muted); background: var(--raised); }
.scans-note svg { width: 13px; height: 13px; color: var(--accent-text); flex: none; }
@media (min-width: 900px) { .scan { grid-template-columns: auto auto minmax(120px, 1fr) auto 130px; gap: 22px; } .scan-who, .scan dl, .scan time { grid-column: auto; } .scan time { text-align: right; } .scan dl > div { min-width: 96px; } }
@media (max-width: 420px) { .hexid-lg i { width: 30px; height: 38px; font-size: 16px; } .hexid-lg { gap: 3px; } }

/* BCPZ withdraw and convert */
.wd { display: grid; gap: 18px 20px; padding: clamp(16px, 2vw, 24px); }
@media (min-width: 760px) { .wd { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.wd .field { min-width: 0; } .wd .input, .wd .dd { width: 100%; }
.wd .affix > span { gap: 7px; font-weight: 600; color: var(--text); }
.wd .affix > .input { border-radius: var(--r-md) 0 0 var(--r-md); }
.wd-amt .affix > * { height: 50px; } .wd .dd-btn { height: 50px; }
.wd-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.cv { display: grid; gap: 14px; padding: clamp(16px, 2vw, 24px); }
.cv-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--raised); transition: border-color .15s; }
.cv-card:hover { border-color: var(--accent); }
.cv-flow { display: flex; align-items: center; gap: 8px; }
.cv-flow > svg { width: 16px; height: 16px; color: var(--muted); transition: transform .15s, color .15s; }
.cv-card:hover .cv-flow > svg { color: var(--accent-text); transform: translateX(2px); }
.cv-coin { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; flex: none; }
.cv-coin svg.coin-ic { width: 40px; height: 40px; }
.cv-cloud { background: var(--accent-wash); color: var(--accent-text); } .cv-cloud svg { width: 20px; height: 20px; }
.cv-card b { display: block; font-weight: 600; } .cv-card small { display: block; font-size: var(--t-sm); color: var(--text-2); }
@media (max-width: 560px) { .cv-card { grid-template-columns: 1fr; justify-items: start; } .cv-card .btn { width: 100%; } }

.wd .field { align-content: start; } .wd .field-top { min-height: 0; align-items: center; }

/* range id, large: one dark grouped block with mono digits */
.hexid-lg { gap: 0; padding: 3px; border: 1px solid #333; border-radius: 10px; background: #0b0b0b; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6); transition: border-color .15s; }
.hexid-lg i { width: 32px; height: 40px; border: 0; border-radius: 0; background: none; box-shadow: none; color: #f1f1f1; font: 500 19px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.hexid-lg i + i { box-shadow: inset 1px 0 0 #242424; }
.hexid-lg i.x { border: 0; border-radius: 6px; margin: 0 2px; width: 30px; background: rgba(247, 147, 26, .16); color: #f7931a; box-shadow: inset 0 0 0 1px rgba(247, 147, 26, .5); }
.hexid-lg i.x + i { box-shadow: none; }
.scan:hover .hexid-lg i:not(.x) { border-color: transparent; }
.scan:hover .hexid-lg { border-color: var(--accent); }
@media (max-width: 420px) { .hexid-lg i { width: 28px; height: 36px; font-size: 17px; } .hexid-lg i.x { width: 26px; } }

/* range id, medium: the same dark block, smaller */
.hexid-md { gap: 0; padding: 2px 3px; border: 1px solid #333; border-radius: 8px; background: #0b0b0b; }
.hexid-md i { width: 19px; height: 26px; border: 0; border-radius: 0; background: none; color: #f1f1f1; font: 500 14px/1 var(--mono); }
.hexid-md i.x { width: 20px; height: 22px; margin: 0 2px; border: 0; border-radius: 5px; background: rgba(247, 147, 26, .18); color: #f7931a; }
.hexid-md i.x svg { width: 11px; height: 11px; }
/* homepage live feed */
.feed-head, .feed-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 12px clamp(16px, 2vw, 24px); }
.feed-head { padding-block: 9px; background: var(--raised); border-bottom: 1px solid var(--line); font-size: var(--t-xs); color: var(--muted); }
.feed-head span:nth-child(n+3) { display: none; }
.feed-row { border-bottom: 1px solid var(--line); transition: background-color .12s; }
.feed-row:hover { background: var(--raised); } .feed-row:hover .hexid-md { border-color: var(--accent); }
.feed-row.is-new { animation: feedNew 1.8s ease-out; }
@keyframes feedNew { 0% { background: var(--accent-wash); transform: translateY(-6px); opacity: 0; } 18% { transform: none; opacity: 1; } 100% { background: transparent; } }
.feed-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.feed-who .avatar { width: 34px; height: 34px; flex: none; }
.feed-who > div { min-width: 0; }
.feed-who b { display: block; font-size: var(--t-sm); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-who small { display: block; font-size: var(--t-xs); color: var(--text-2); }
.feed-who small span { color: var(--muted); } .feed-who small span::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); vertical-align: middle; margin: 0 7px 0 5px; }
.feed-took, .feed-row time { display: none; }
.feed-took b { font-weight: 600; font-size: var(--t-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
.feed-row time { font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.feed-row time.now { color: var(--ok); font-weight: 600; } .feed-row time.now i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: 6px; }
@media (min-width: 700px) { .feed-head, .feed-row { grid-template-columns: minmax(0, 1fr) 170px 110px 84px; } .feed-head span:nth-child(n+3), .feed-took { display: block; } .feed-row time { display: block; } .feed-head span:nth-child(n+3), .feed-took { text-align: right; } }
@media (prefers-reduced-motion: reduce) { .feed-row.is-new { animation: none; } }

.hexid i.x svg { display: block; }
.feed-who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 699px) { .feed-who small span { display: none; } }
@media (min-width: 700px) { .feed-head, .feed-row { grid-template-columns: minmax(0, 1fr) auto 110px 84px; } .feed-head span:nth-child(2) { width: 160px; } }

/* hidden character: muted, reads as inactive */
.hexid-lg i.x, .hexid-md i.x { background: #1c1c1c; color: #6f6f6f; box-shadow: inset 0 0 0 1px #2e2e2e; }
.scans-note svg { color: var(--muted); }

.hexid-md i.x, .hexid-lg i.x { display: grid; place-items: center; line-height: 0; align-self: center; }
.hexid-md { align-items: center; }

/* homepage worker ranking with avatars */
.rank li { grid-template-columns: 22px auto minmax(0, 1fr) auto; gap: 12px; padding-block: 12px; transition: background-color .12s; }
.rank li:hover { background: var(--raised); }
.rank li::before { text-align: center; font-size: var(--t-xs); font-weight: 600; }
.rank li:nth-child(-n+3)::before { width: 22px; height: 22px; line-height: 22px; border-radius: 50%; background: var(--raised); border: 1px solid var(--line); color: var(--text); }
.rank li:first-child::before { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.rk-av { position: relative; flex: none; }
.rk-av .avatar { width: 38px; height: 38px; }
.rank li:first-child .rk-av .avatar { box-shadow: 0 0 0 2px var(--accent); }
.rk-av > i { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); border: 2px solid var(--panel); }
.rank .hex { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank li > div { min-width: 0; }

/* balances: one compact row each, icon and name left, amount right */
.um-money, .acct-money { grid-template-columns: 1fr; }
.um-money > a, .acct-money > a, .menu-list .um-money > a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; }
.um-money > a + a, .acct-money > a + a { border-left: 0; border-top: 1px solid var(--line); }
.um-money small, .acct-money small { gap: 8px; font-size: var(--t-xs); color: var(--text-2); }
.um-money svg.coin-ic, .acct-money svg.coin-ic { width: 20px; height: 20px; }
.um-money b, .acct-money b { font-size: var(--t-base); }

/* balances, final: one quiet line each */
.acct-card .acct-money, .user-menu .um-money { display: grid; grid-template-columns: 1fr; border: 0; background: none; margin-bottom: 8px; gap: 2px; }
.acct-card .acct-money > a, .user-menu .um-money > a { display: flex !important; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border: 0; border-radius: var(--r-md); background: var(--raised); }
.acct-card .acct-money > a:hover, .user-menu .um-money > a:hover, .acct-card .acct-money > a[aria-current="page"] { background: var(--accent-wash); }
.acct-card .acct-money small, .user-menu .um-money small { display: inline-flex !important; flex-direction: row; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.acct-card .acct-money svg.coin-ic, .user-menu .um-money svg.coin-ic { display: inline-block; width: 15px; height: 15px; flex: none; }
.acct-card .acct-money b, .user-menu .um-money b { font-size: var(--t-xs); font-weight: 600; color: var(--text-2); white-space: nowrap; }

.acct-nav a svg.coin-ic { width: 17px; height: 17px; }
.acct-nav a .acct-bal { color: var(--text-2); }
.acct-user { padding-bottom: 6px; }

/* found keys: plain rows */
.fkeys { display: grid; }
.fkey { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 14px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.fkey:last-child { border-bottom: 0; }
.fkey:hover { background: var(--raised); }
.fkey-who { min-width: 0; grid-column: 1; }
.fkey-who b { display: block; font-weight: 600; } .fkey-who small { display: block; font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.fkey code { grid-column: 1 / -1; min-width: 0; font: 400 var(--t-xs)/1.4 var(--mono); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fkey .btn { grid-column: 2; grid-row: 1; }
@media (min-width: 860px) { .fkey { grid-template-columns: 210px minmax(0, 1fr) auto; } .fkey code { grid-column: 2; } .fkey .btn { grid-column: 3; grid-row: auto; } }

.fkey { grid-template-columns: minmax(0, 1fr) auto !important; gap: 8px 16px; }
.fkey-who b { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fkey .btn { grid-column: 2 !important; grid-row: 1 !important; background: var(--raised); border-color: var(--line); color: var(--text); }
.fkey:hover .btn { background: var(--panel); border-color: var(--line-strong); }
.fkey code { grid-column: 1 / -1 !important; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; word-break: break-all; line-height: 1.6; max-width: 86ch; }

.fkey-who { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.fkey-who small { margin-left: auto; white-space: nowrap; }

/* account menu, visual pass (same structure) */
.acct-card { padding: 0 10px 10px; overflow: hidden; }
.acct-user { margin: 0 -10px 6px; padding: 18px 16px 16px; border-bottom: 1px solid var(--line); background: radial-gradient(120% 140% at 0% 0%, var(--accent-wash), transparent 60%); }
.acct-user .avatar { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent); }
.acct-nav { gap: 1px; }
.acct-nav h4 { display: flex; align-items: center; gap: 10px; padding: 14px 10px 6px; font-size: 11px; letter-spacing: .02em; color: var(--muted); }
.acct-nav h4::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.acct-nav a { position: relative; height: 38px; padding: 0 10px 0 6px; gap: 11px; border-radius: 10px; box-shadow: none !important; transition: background-color .12s, color .12s; }
.acct-nav a > svg.icon:first-child { width: 28px; height: 28px; padding: 6px; border-radius: 8px; background: var(--raised); border: 1px solid var(--line); color: var(--text-2); transition: background-color .12s, color .12s, border-color .12s; }
.acct-nav a > svg.coin-ic { width: 28px; height: 28px; padding: 4px; border-radius: 8px; background: var(--raised); border: 1px solid var(--line); }
.acct-nav a:hover > svg.icon:first-child { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.acct-nav a[aria-current="page"] { background: var(--accent-wash); color: var(--text); font-weight: 600; }
.acct-nav a[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.acct-nav a[aria-current="page"] > svg.icon:first-child { background: var(--accent); border-color: transparent; color: var(--on-accent) !important; }
.acct-nav a[aria-current="page"] > svg.coin-ic { border-color: var(--accent); }
.acct-nav .acct-bal { padding: 2px 7px; border-radius: 6px; background: var(--raised); border: 1px solid var(--line); font-size: 11px; color: var(--text-2); }
.acct-nav a[aria-current="page"] .acct-bal { background: var(--panel); }
.acct-nav hr { margin: 10px 0 6px; }
.acct-nav a.danger > svg.icon:first-child { background: var(--bad-wash); border-color: transparent; color: var(--bad); }
.acct-nav a.danger:hover { background: var(--bad-wash); }
.acct-nav a.danger:hover > svg.icon:first-child { color: var(--bad); border-color: transparent; }

/* BCPZ history rows */
.tx.tk { grid-template-columns: auto minmax(0, 1fr) auto; }
.tk-flow { display: none; align-items: center; gap: 8px; font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk-flow b { font-weight: 500; color: var(--text-2); } .tk-flow svg { width: 12px; height: 12px; }
.tx.tk .tx-amt { grid-column: auto; grid-row: auto; white-space: nowrap; } .tx.tk .tx-amt small { font-size: var(--t-xs); font-weight: 400; color: var(--muted); }
.tx.tk .tx-ic { width: 30px; height: 30px; } .tx.tk .tx-ic svg { width: 14px; height: 14px; }
.tx.tk { padding-block: 11px; }
@media (min-width: 700px) { .tx.tk { grid-template-columns: auto minmax(0, 1fr) auto 120px; gap: 16px; } .tk-flow { display: inline-flex; } }

.tx.tk.us .tx-amt { text-decoration: none; }
.tx.tk.us .tag { display: none; }
@media (min-width: 700px) { .tx.tk.us { grid-template-columns: auto minmax(0, 1fr) auto 130px auto; } .tx.tk.us .tag { display: inline-flex; } }

/* header: current page */
.nav > a { position: relative; }
.nav > a[aria-current="page"] { color: var(--hd-strong); background: var(--hd-nav-on-bg); box-shadow: inset 0 0 0 1px var(--hd-nav-on-ring); }
.nav > a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); box-shadow: var(--hd-nav-glow); }

/* key list: puzzle hit rows fade from the left edge */
.krow.is-hit { position: relative; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 20%, transparent), color-mix(in srgb, var(--accent) 5%, transparent) 28%, transparent 60%); }
.krow.is-hit::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.krow.is-hit:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 24%, transparent), color-mix(in srgb, var(--accent) 7%, var(--raised)) 28%, var(--raised) 60%); }

.krow.k3 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) !important; }
@media (max-width: 720px) { .krow.k3 { grid-template-columns: minmax(0, 1fr) !important; } .krow.k3 > * { grid-column: 1 !important; } }

/* puzzle list: calm rows, details on demand */
.pzl { display: grid; }
.pzr { border-bottom: 1px solid var(--line); }
.pzr[hidden] { display: none; }
.pzr:last-child { border-bottom: 0; }
.pzr-main { display: grid; grid-template-columns: auto minmax(0, 1.5fr) minmax(0, 1fr) 130px 18px; gap: 18px; align-items: center; padding: 13px clamp(16px, 2vw, 24px); cursor: pointer; outline: 0; transition: background-color .12s; }
.pzr-main:hover, .pzr-main:focus-visible, .pzr.is-open .pzr-main { background: var(--raised); }
.pzr-main > * { min-width: 0; }
.pzr .pz-n { width: 40px; height: 40px; font-size: var(--t-sm); }
.pzr.solved .pz-n { background: var(--cell-solved); border-color: transparent; color: var(--cell-solved-text); }
.pzr-id b { display: flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.st-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: none; }
.st-w { font-size: var(--t-xs); font-weight: 400; color: var(--muted); }
.pzr.open .st-dot { background: var(--warn); } .pzr.pool .st-dot { background: var(--accent); } .pzr.pool .st-w { color: var(--accent-text); font-weight: 600; } .pzr.next .st-dot { background: color-mix(in srgb, var(--accent) 60%, var(--muted)); }
.pzr-id small { display: block; margin-top: 2px; font-size: var(--t-xs); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pzr-mid small, .pzr-bal small { display: block; font-size: 11px; color: var(--muted); }
.pzr-mid span { display: block; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pzr-mid .pk { color: var(--ok); font-weight: 500; }
.pzr-bal { display: block; text-align: right; font-variant-numeric: tabular-nums; }
.pzr-bal b { font-weight: 600; white-space: nowrap; } .pzr-bal span { display: block; font-size: var(--t-sm); color: var(--text-2); white-space: nowrap; }
.pzr-chev { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.pzr.is-open .pzr-chev { transform: rotate(180deg); color: var(--text); }
.pzr-detail { padding: 4px clamp(16px, 2vw, 24px) 18px; background: var(--raised); animation: pzq-in .16s ease-out; }
.pzr-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; padding: 6px 0 14px; }
.pzr-top p { color: var(--text-2); font-size: var(--t-sm); } .pzr-top p b { color: var(--text); }
.pzr-where { flex: 1; min-width: 220px; max-width: 420px; }
.pzr-where small { display: block; font-size: var(--t-xs); color: var(--muted); }
.pzr-pos { position: relative; display: block; height: 6px; margin-top: 10px; border-radius: 3px; background: var(--panel); border: 1px solid var(--line); }
.pzr-pos i { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--raised); }
.pzr-ends { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; } .pzr-ends b { color: var(--text-2); font-weight: 600; }
.pzr-scan { position: relative; }
.pzr-scan summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--panel); font-size: var(--t-sm); font-weight: 600; }
.pzr-scan summary::-webkit-details-marker { display: none; }
.pzr-scan summary:hover, .pzr-scan[open] summary { border-color: var(--accent); }
.pzr-scan summary svg { width: 14px; height: 14px; } .pzr-scan summary svg:last-child { color: var(--muted); transition: transform .15s; } .pzr-scan[open] summary svg:last-child { transform: rotate(180deg); }
.pzr-scan > div { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 250px; padding: 6px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--overlay-shadow); }
.pzr-scan > div a { display: block; padding: 8px 10px; border-radius: var(--r-md); } .pzr-scan > div a:hover { background: var(--raised); }
.pzr-scan > div b { display: block; font-size: var(--t-sm); font-weight: 600; } .pzr-scan > div small { display: block; font-size: var(--t-xs); color: var(--muted); }
.pzl-detail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--line); overflow: hidden; }
.pzl-detail > div { padding: 10px 12px; background: var(--panel); min-width: 0; }
.pzl-detail > .full { grid-column: 1 / -1; }
.pzl-detail dt { font-size: 11px; color: var(--muted); } .pzl-detail dd { font-weight: 600; font-size: var(--t-sm); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; margin-top: 2px; } .pzl-detail dd.hex { font-weight: 500; }
@media (max-width: 899px) { .pzr-main { grid-template-columns: auto minmax(0, 1fr) auto 16px; gap: 12px; } .pzr-mid { display: none; } .pzr-bal { width: auto; } .pzl-detail { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .pzr-id small { max-width: 150px; } }

/* puzzle list: unsolved reads green, solved muted red; known public key */
.pzr.open .st-dot, .pzr.next .st-dot { background: var(--ok); } .pzr.open .st-w, .pzr.next .st-w { color: var(--ok); }
.pzr.solved .st-dot { background: var(--bad); } .pzr.solved .st-w { color: var(--bad); }
.pzr-mid .pk { color: var(--text-2); }
.pzr.open .pzr-bal b, .pzr.next .pzr-bal b, .pzr.pool .pzr-bal b { color: var(--ok); }
.pub-tag { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; height: 20px; padding: 0 7px; border-radius: 5px; background: var(--info-wash); color: var(--info); font-size: 11px; font-weight: 500; }
.pub-tag svg { width: 11px; height: 11px; }

/* puzzle list: status stripe, claimed/reward colours, key chips */
.pzr { position: relative; }
.pzr::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ok); }
.pzr.solved::before { background: var(--bad); } .pzr.pool::before { background: var(--accent); }
.pzr.solved .pzr-bal span { color: var(--bad); font-weight: 500; }
.pzr-mid .pk-chip, .pzr-mid .nf-badge { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; height: 26px; margin-top: 4px; padding: 0 9px; border-radius: 6px; font-size: var(--t-xs); }
.pzr-mid .pk-chip { background: var(--ok-wash); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 22%, transparent); }
.pzr-mid .pk-chip .hex { font-size: var(--t-xs); font-weight: 500; letter-spacing: .02em; color: inherit; }
.pzr-mid .nf-badge { background: var(--raised); color: var(--muted); border: 1px dashed var(--line-strong); font-weight: 500; }
.pzr-main:hover .nf-badge, .pzr.is-open .nf-badge { background: var(--panel); }
.pzr-mid svg { flex: none; width: 12px; height: 12px; }
.pub-row { display: flex; align-items: center; gap: 8px; margin-top: 5px; min-width: 0; font-size: 11px; }
.pub-row em { flex: none; font-style: normal; font-weight: 500; padding: 2px 6px; border-radius: 4px; background: var(--info-wash); color: var(--info); }
.pub-row .hex { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: 11px; }

/* puzzle list: copy buttons, key link, detail cards */
.cp { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; color: var(--muted); cursor: pointer; transition: background .12s, color .12s; }
.cp svg { width: 12px; height: 12px; } .cp:hover { background: var(--line); color: var(--text); } .cp.is-done { color: var(--ok); }
.pzr-id small.adr { display: flex; align-items: center; gap: 4px; overflow: visible; } .pzr-id small.adr .hex { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pub-row { gap: 6px; } .pub-row .cp { margin-left: -2px; }
.pzr-mid .pk-wrap { display: flex; align-items: center; gap: 4px; margin-top: 4px; overflow: visible; }
.pzr-mid .pk-wrap .pk-chip { margin-top: 0; min-width: 0; text-decoration: none; transition: background .12s, border-color .12s; }
.pzr-mid .pk-chip .hex { overflow: hidden; text-overflow: ellipsis; }
.pzr-mid a.pk-chip:hover { background: color-mix(in srgb, var(--ok) 18%, transparent); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.pzr-mid .cp svg { width: 12px; height: 12px; }
.pzr-detail { padding: 2px clamp(16px, 2vw, 24px) 18px; }
.pzd { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.pzd-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); padding: 14px 16px; min-width: 0; }
.pzd-card h4 { font-size: var(--t-xs); font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.pzd-kv > div { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 34px; padding: 5px 0; border-top: 1px solid var(--line); }
.pzd-kv > div:first-child { border-top: 0; }
.pzd-kv dt { font-size: var(--t-xs); color: var(--muted); }
.pzd-kv dd { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--t-sm); font-weight: 500; font-variant-numeric: tabular-nums; }
.pzd-kv dd .hex { min-width: 0; overflow-wrap: anywhere; font-size: var(--t-xs); line-height: 1.45; }
.pzd-kv:not(.wide) dd { justify-content: flex-end; text-align: right; }
.pzd-kv .c-ok { color: var(--ok); font-weight: 600; } .pzd-kv .c-bad { color: var(--bad); font-weight: 600; } .pzd-kv .muted { font-weight: 400; font-size: var(--t-xs); }
.pzd-kv .nf-badge { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 9px; border-radius: 6px; font-size: var(--t-xs); font-weight: 500; background: var(--raised); color: var(--muted); border: 1px dashed var(--line-strong); }
.pzd-kv .nf-badge svg { width: 12px; height: 12px; }
.pk-link { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; background: var(--ok-wash); border: 1px solid color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); font-weight: 600; text-decoration: none; }
.pk-link svg { flex: none; width: 12px; height: 12px; opacity: .7; transition: transform .12s; } .pk-link:hover { background: color-mix(in srgb, var(--ok) 18%, transparent); } .pk-link:hover svg { transform: translateX(2px); }
.pzd-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.pzd-foot p { font-size: var(--t-xs); color: var(--text-2); } .pzd-foot .pzr-where { max-width: none; }
.pzd-foot .pzr-pos { background: var(--raised); } .pzd-foot .pzr-pos i { box-shadow: 0 0 0 2px var(--panel); }
@media (max-width: 899px) { .pzd { grid-template-columns: 1fr; } .pzd-kv > div { grid-template-columns: 96px minmax(0, 1fr); } }

.pzd { align-items: stretch; } .pzd-card { display: flex; flex-direction: column; } .pzd-foot { margin-top: auto; } .pzd-kv.wide { margin-bottom: 8px; }
.pzd-foot .pzr-where { flex: 1; }

.pzr::before { top: 6px; bottom: 6px; border-radius: 0 3px 3px 0; }

/* puzzle rows: action line (join / snapshot / scan / public key) */
.pzr-acts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.btn-xs { height: 26px; padding: 0 10px; font-size: var(--t-xs); gap: 6px; border-radius: 6px; } .btn-xs svg { width: 12px; height: 12px; }
.pzr-acts .btn-soft { background: var(--raised); border: 1px solid var(--line-strong); color: var(--text-2); } .pzr-acts .btn-soft:hover { color: var(--text); border-color: var(--muted); }
.pzr-main:hover .pzr-acts .btn-soft, .pzr.is-open .pzr-acts .btn-soft, .pzr-main:hover .pzr-scan summary, .pzr.is-open .pzr-scan summary { background: var(--panel); }
.pzr-acts .pub-tag { margin-top: 0; height: 26px; padding: 0 9px; border-radius: 6px; }
.pzr-scan summary { height: 26px; padding: 0 8px 0 9px; gap: 6px; border-radius: 6px; font-size: var(--t-xs); font-weight: 500; color: var(--text-2); background: var(--raised); }
.pzr-scan summary svg { width: 12px; height: 12px; } .pzr-scan summary:hover, .pzr-scan[open] summary { color: var(--text); }
.pzr-scan > div { width: 286px; padding: 8px; border-radius: 12px; animation: pzq-in .14s ease-out; }
.pzr-scan > div h5 { padding: 4px 8px 8px; font-size: 11px; font-weight: 500; color: var(--muted); }
.pzr-scan > div a { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 8px; text-decoration: none; }
.pzr-scan > div a i { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--raised); border: 1px solid var(--line); color: var(--text-2); transition: background .12s, color .12s, border-color .12s; }
.pzr-scan > div a i svg { width: 16px; height: 16px; }
.pzr-scan > div a:hover i { background: var(--accent-wash); border-color: transparent; color: var(--accent-text); }
.pzr-scan > div a span { min-width: 0; } .pzr-scan > div a small { margin-top: 1px; }
.pzr.is-up .pzr-scan > div { top: auto; bottom: calc(100% + 6px); }

.pzr-scan > div h5 { margin: 0; min-height: 0; line-height: 1.3; letter-spacing: 0; }
.pzr-scan > div a small { white-space: normal; overflow: visible; line-height: 1.35; }

.pzd-kv.wide dd .hex, .pk-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.pk-link { min-width: 0; max-width: 100%; } .pk-link span { min-width: 0; }

.pzr-main > .pz-n { align-self: start; margin-top: 2px; }

/* the puzzle the pool is scanning: heartbeat on its number tile */
.pzr.pool .pz-n { position: relative; animation: pz-beat 1.6s ease-in-out infinite; }
.pzr.pool .pz-n::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); animation: pz-ring 1.6s ease-out infinite; pointer-events: none; }
@keyframes pz-beat { 0%, 36%, 100% { transform: scale(1); } 9% { transform: scale(1.1); } 18% { transform: scale(.98); } 27% { transform: scale(1.06); } }
@keyframes pz-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 60%, 100% { box-shadow: 0 0 0 10px transparent; } }

/* puzzle detail v2: range bar, stat tiles, copy fields */
.pzr-detail { padding: 6px clamp(16px, 2vw, 24px) 20px; }
.pzd2 { display: grid; gap: 14px; }
.pzd-range { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.pzd-end { min-width: 0; } .pzd-end.r { text-align: right; }
.pzd-end small, .pzd-tile small, .fld > small { display: block; font-size: 11px; color: var(--muted); }
.pzd-end b { display: block; margin-top: 2px; font-size: var(--t-sm); font-weight: 600; overflow-wrap: anywhere; }
.pzd-end span { display: block; font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pzd-bar { min-width: 0; text-align: center; }
.pzd-track { position: relative; display: block; height: 8px; border-radius: 4px; background: var(--raised); border: 1px solid var(--line); }
.pzd-bar.is-open .pzd-track { background: repeating-linear-gradient(-45deg, var(--raised) 0 6px, color-mix(in srgb, var(--ok) 14%, var(--raised)) 6px 12px); }
.pzd-track i { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--panel), 0 0 0 4px color-mix(in srgb, var(--ok) 40%, transparent); }
.pzd-cap { display: block; margin-top: 9px; font-size: var(--t-xs); color: var(--muted); } .pzd-cap b { color: var(--ok); font-weight: 600; }
.pzd-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pzd-tile { padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); min-width: 0; }
.pzd-tile b { display: inline-block; margin-top: 3px; font-size: var(--t-md, 15px); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pzd-tile b em { font-style: normal; } .pzd-tile .c-ok { color: var(--ok); } .pzd-tile .c-bad { color: var(--bad); }
.pzd-tile span { margin-left: 8px; font-size: var(--t-xs); color: var(--muted); white-space: nowrap; }
.pzd-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.fld { min-width: 0; }
.fld-box { display: flex; align-items: center; gap: 8px; height: 38px; margin-top: 5px; padding: 0 6px 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--panel); min-width: 0; }
.fld-box .hex { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-xs); font-weight: 500; }
.fld-box .cp { width: 26px; height: 26px; }
.fld.ok .fld-box { background: var(--ok-wash); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.fld.ok .fld-box a { color: var(--ok); font-weight: 600; text-decoration: none; } .fld.ok .fld-box a:hover { text-decoration: underline; } .fld.ok .cp { color: var(--ok); }
.fld.none .fld-box { border-style: dashed; background: transparent; color: var(--muted); font-size: var(--t-xs); font-weight: 500; padding-left: 12px; } .fld.none svg { width: 13px; height: 13px; }
@media (max-width: 899px) { .pzd-range { grid-template-columns: 1fr 1fr; gap: 12px; } .pzd-bar { grid-column: 1 / -1; order: 3; } .pzd-tiles { grid-template-columns: 1fr 1fr; } .pzd-fields { grid-template-columns: 1fr; } }

/* puzzle detail v3: one card, sections split by hairlines instead of separate blocks */
.pzd2 { gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); overflow: hidden; }
.pzd-range { border: 0; border-radius: 0; background: none; padding: 16px 18px; }
.pzd-tiles { gap: 0; border-top: 1px solid var(--line); }
.pzd-tile { border: 0; border-radius: 0; background: none; padding: 12px 18px; border-left: 1px solid var(--line); }
.pzd-tile:first-child { border-left: 0; }
.pzd-fields { gap: 0; border-top: 1px solid var(--line); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.fld { padding: 11px 10px 11px 18px; border-left: 1px solid var(--line); }
.fld:first-child { border-left: 0; }
.fld-box { height: 26px; margin-top: 3px; padding: 0; border: 0; border-radius: 0; background: none; }
.fld.ok .fld-box, .fld.none .fld-box { background: none; border: 0; padding: 0; }
.fld.ok { background: var(--ok-wash); }
.fld-box .hex { font-size: var(--t-sm); }
@media (max-width: 899px) { .pzd-tile:nth-child(odd) { border-left: 0; } .pzd-tile:nth-child(n+3) { border-top: 1px solid var(--line); } .fld { border-left: 0; } .fld + .fld { border-top: 1px solid var(--line); } }

/* visual puzzle hunter */
.vh-bar { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; padding: 16px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.vh-pick { flex: 1; min-width: 220px; max-width: 360px; } .vh-pick small { display: block; margin-bottom: 5px; font-size: 11px; color: var(--muted); }
.vh-btns { display: flex; flex-wrap: wrap; gap: 8px; } .vh-btns .btn svg { width: 14px; height: 14px; }
.vh-live { display: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: vh-blink 1s ease-in-out infinite; }
#auto[aria-pressed="true"] .vh-live { display: block; }
@keyframes vh-blink { 50% { opacity: .25; } }
.vh-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.vh-left { padding: 18px clamp(16px, 2vw, 24px) 20px; min-width: 0; }
.vh-stats { display: flex; gap: 0; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--r-md); }
.vh-stats > div { padding: 9px 14px; border-left: 1px solid var(--line); min-width: 0; } .vh-stats > div:first-child { border-left: 0; } .vh-stats .grow { flex: 1; }
.vh-stats small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; }
.vh-stats b { font-size: var(--t-md, 15px); font-weight: 600; } .vh-stats em { font-style: normal; font-weight: 400; color: var(--muted); font-size: var(--t-xs); }
.vh-meter { display: block; height: 4px; margin-top: 5px; border-radius: 2px; background: var(--raised); overflow: hidden; } .vh-meter i { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--accent); transition: width .2s; }
.vh-grid { max-width: none; gap: 4px; }
.vh-grid button { border-radius: 5px; font-size: 10px; transition: background .1s, transform .1s, border-color .1s; }
.vh-grid button[hidden] { display: none; }
.vh-grid button:not(:disabled):not(.fixed):hover { border-color: var(--accent); color: var(--text); }
.vh-grid button:not(:disabled):active { transform: scale(.9); }
.vh-grid button:disabled { background: none; border: 1px dashed var(--line); }
.vh-grid button.fixed { box-shadow: none; background: var(--accent); color: var(--on-accent); opacity: .55; cursor: default; }
.vh-skip { margin-top: 10px; font-size: var(--t-xs); color: var(--muted); }
.vh-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: var(--t-xs); color: var(--text-2); }
.vh-legend span { display: inline-flex; align-items: center; gap: 6px; } .vh-legend span[hidden] { display: none; }
.vh-legend i { width: 12px; height: 12px; border-radius: 3px; } .vh-legend .on { background: var(--accent); } .vh-legend .off { border: 1px solid var(--line-strong); } .vh-legend .fix { background: var(--accent); opacity: .55; } .vh-legend .out { border: 1px dashed var(--line-strong); }
.vh-out { border-left: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; }
.vh-state { display: flex; align-items: center; gap: 12px; padding: 16px clamp(16px, 2vw, 22px); border-bottom: 1px solid var(--line); }
.vh-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--raised); color: var(--muted); } .vh-ico svg { width: 18px; height: 18px; }
.vh-state b { display: block; font-weight: 600; } .vh-state small { display: block; font-size: var(--t-xs); color: var(--text-2); }
.vh-state.is-hit { background: var(--ok-wash); } .vh-state.is-hit .vh-ico { background: var(--ok); color: #fff; } .vh-state.is-hit b { color: var(--ok); }
.vh-cmp { padding: 14px clamp(16px, 2vw, 22px); border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.vh-cmp small, .vh-rows dt { display: block; font-size: 11px; color: var(--muted); } .vh-cmp small em { font-style: normal; }
.vh-line, .vh-rows dd { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 2px; }
.vh-line .hex, .vh-rows .hex { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-sm); font-weight: 500; }
.vh-cmp .hex { font-size: var(--t-base); letter-spacing: .02em; } .vh-cmp .hex b { color: var(--ok); font-weight: 700; background: var(--ok-wash); border-radius: 3px; }
.vh-rows > div { padding: 11px clamp(16px, 2vw, 22px); border-top: 1px solid var(--line); } .vh-rows > div:first-child { border-top: 0; }
.vh-about { display: grid; gap: 14px; }
.vh-intro { max-width: 76ch; } .vh-intro h2 { font-size: var(--t-xl); letter-spacing: -0.01em; } .vh-intro p { margin-top: 8px; color: var(--text-2); line-height: 1.65; }
.vh-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.vh-steps li { display: flex; gap: 12px; padding: 16px 18px; border-left: 1px solid var(--line); } .vh-steps li:first-child { border-left: 0; }
.vh-steps li > span { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-wash); color: var(--accent-text); font: 600 12px/1 var(--mono); }
.vh-steps b { font-weight: 600; } .vh-steps p { margin-top: 4px; font-size: var(--t-sm); color: var(--text-2); line-height: 1.55; }
.vh-useful { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.vh-useful h3 { font-size: var(--t-md, 15px); font-weight: 600; } .vh-useful p { margin-top: 6px; font-size: var(--t-sm); color: var(--text-2); line-height: 1.6; }
.vh-cta { padding-left: 24px; border-left: 1px solid var(--line); } .vh-cta p { margin: 0 0 12px; color: var(--text); font-weight: 500; }
@media (max-width: 999px) { .vh-body { grid-template-columns: 1fr; } .vh-out { border-left: 0; border-top: 1px solid var(--line); } .vh-steps { grid-template-columns: 1fr; } .vh-steps li { border-left: 0; border-top: 1px solid var(--line); } .vh-steps li:first-child { border-top: 0; } .vh-useful { grid-template-columns: 1fr; gap: 14px; } .vh-cta { padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); } }
@media (max-width: 520px) { .vh-grid { gap: 2px; } .vh-grid button { font-size: 8px; border-radius: 3px; } .vh-pick { max-width: none; } .vh-stats > div { padding: 8px 10px; } }

.panel.vh { margin-top: clamp(18px, 2.4vw, 28px); }

/* dropdown options with a status dot and a note */
.dd-dot { display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--muted); vertical-align: 1px; }
.dd-dot.ok { background: var(--ok); } .dd-dot.bad { background: var(--bad); } .dd-dot.warn { background: var(--accent); }
.dd-btn > span em, .dd-list li > span em { margin-left: 10px; font-style: normal; font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.dd-list li > span { flex: 1; } .dd-list li > span em { float: right; margin-right: 6px; }
/* visual hunter: share row, binary */
.vh-share { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: auto; padding: 12px clamp(16px, 2vw, 22px); border-top: 1px solid var(--line); }
.vh-share p { font-size: var(--t-xs); color: var(--muted); } .vh-share .btn svg { width: 14px; height: 14px; }
.vh-grid button { font-size: 9px; }

/* custom range scan */
.rs-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr) auto; gap: 14px 16px; padding: 18px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.rs-form .help { grid-column: 1 / -1; margin: -4px 0 0; }
.rs-stats { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.rs-stats > div { padding: 12px clamp(16px, 2vw, 24px); border-left: 1px solid var(--line); min-width: 0; } .rs-stats > div:first-child { border-left: 0; }
.rs-stats small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; } .rs-stats > div > b { font-size: var(--t-md, 15px); font-weight: 600; white-space: nowrap; }
.rs-stats .vh-state { border-bottom: 0; padding-top: 10px; padding-bottom: 10px; } .rs-stats .vh-state small { white-space: normal; overflow-wrap: anywhere; } .rs-stats .vh-ico { width: 34px; height: 34px; }
.rs-head, .rs-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1.1fr); gap: 16px; align-items: center; padding: 0 clamp(16px, 2vw, 24px); }
.rs-head { height: 36px; font-size: 11px; color: var(--muted); background: var(--raised); border-bottom: 1px solid var(--line); }
.rs-list { max-height: 560px; overflow: auto; }
.rs-row { min-height: 42px; border-bottom: 1px solid var(--line); } .rs-row:last-child { border-bottom: 0; } .rs-row:hover { background: var(--raised); }
.rs-row .idx { font-size: var(--t-xs); color: var(--muted); }
.rs-row > div { display: flex; align-items: center; gap: 4px; min-width: 0; }
.rs-row .hex { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-xs); }
.rs-row .hex b { color: var(--ok); font-weight: 700; }
.rs-row .cp { opacity: .55; } .rs-row:hover .cp { opacity: 1; }
.rs-row.is-hit { background: var(--ok-wash); box-shadow: inset 3px 0 0 var(--ok); }
.rs-more { padding: 12px clamp(16px, 2vw, 24px); }
.rs .empty[hidden] { display: none; }
@media (max-width: 999px) { .rs-form { grid-template-columns: 1fr 1fr; } .rs-form .field:nth-child(3) { grid-column: 1 / -1; } .rs-stats { grid-template-columns: 1fr 1fr; } .rs-stats > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); grid-column: 1 / -1; } .rs-stats .vh-state { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .rs-head { display: none; } .rs-row { grid-template-columns: 1fr; gap: 2px; padding-top: 10px; padding-bottom: 10px; } .rs-row > div::before { content: attr(data-m); flex: none; width: 78px; font-size: 11px; color: var(--muted); } .rs-row .idx::before { content: "#"; } }
@media (max-width: 520px) { .rs-form { grid-template-columns: 1fr; } .rs-form .field:nth-child(3) { grid-column: auto; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* focus rings on the chrome use the accent text colour: the plain accent is below 3:1 on the light surfaces (the dark theme keeps the same orange) */
.topline :focus-visible, .header :focus-visible, .bottombar :focus-visible, .drawer :focus-visible, .footer :focus-visible { outline-color: var(--hd-accent); }

/* the sign-in side card stays dark in both themes, so its logo stays white */
.auth-side .brand, .auth-side .brand .logo { color: #fff; }
