/*
VOICE: a precise, quiet workbench; the tools are the stars.
IDEA: a well-organised toolbox drawer, each tool in its own labelled slot, colour-coded by category.
PICTURE: the live search and the grid of ready tools are the first screen; tools open mid-use with sample input.
COLOUR and TYPE: ink-black ground, one electric blue accent, 12 category hues used only as small markers. Space Grotesk titles, Inter body, JetBrains Mono for code.
LAYOUT: sticky top bar with search; category rail on wide screens, chip row on phones; content max 1240px.
*/
:root {
  color-scheme: dark;
  --bg: light-dark(#f6f7f9, #000000);
  --bg2: light-dark(#ffffff, #0c0c0f);
  --bg3: light-dark(#eef0f4, #17171c);
  --line: light-dark(#dfe3ea, #24242b);
  --ink: light-dark(#0e1320, #f1f1f4);
  --mute: light-dark(#5a6477, #93939e);
  --accent: #4d7cff;
  --accent-ink: light-dark(#2350d8, #8eacff);
  --on-accent: #ffffff;
  --ok: light-dark(#0f8a4f, #43d18a);
  --bad: light-dark(#c8283a, #ff6b7a);
  --warn: light-dark(#a86400, #ffbf47);
  --r: 12px;
  --f-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@supports not (color: light-dark(#000, #fff)) {
  :root { --bg: #000000; --bg2: #0c0c0f; --bg3: #17171c; --line: #24242b; --ink: #f1f1f4; --mute: #93939e; --accent-ink: #8eacff; --ok: #43d18a; --bad: #ff6b7a; --warn: #ffbf47; }
}
* { box-sizing: border-box; min-width: 0; }
html { scroll-padding-top: 80px; }
html { background: var(--bg); }
body { margin: 0; background: transparent; color: var(--ink); font: 16px/1.55 var(--f-body); overflow-x: clip; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.1; margin: 0 0 .4em; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 700; }
h2 { font-size: 24px; font-weight: 600; }
h3 { font-size: 17px; font-weight: 600; margin-top: 1.2em; }
a { color: var(--accent-ink); }
code, kbd, .mono, pre, textarea.mono { font-family: var(--f-mono); }
code { overflow-wrap: anywhere; }
small { color: var(--mute); }
.muted { color: var(--mute); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--bg2); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 12px max(2vw, 16px); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 19px var(--f-head); letter-spacing: .02em; flex: none; }
.search { flex: 1; max-width: 620px; display: flex; align-items: center; gap: 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; color: var(--mute); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.search input { flex: 1; border: 0; background: transparent; color: var(--ink); font: 16px var(--f-body); padding: 11px 0; outline: none; }
.search kbd { border: 1px solid var(--line); border-radius: 6px; padding: 0 7px; font-size: 13px; }
.net { font: inherit; background: none; border: 1px solid transparent; border-radius: 999px; padding: 6px 10px; cursor: pointer; min-height: 36px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); white-space: nowrap; margin-left: auto; }
.net:hover, .net[aria-expanded="true"] { border-color: var(--line); color: var(--ink); }
.net.off i { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 20%, transparent); }
.netpop { position: absolute; top: calc(100% + 6px); right: max(2vw, 16px); width: min(360px, calc(100vw - 32px)); background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: 0 12px 40px rgb(0 0 0 / .35); font-size: 14px; z-index: 30; }
.netpop b { font: 600 16px var(--f-head); }
.netpop p { margin: 8px 0 0; }
.net i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }

/* Shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); max-width: 1480px; margin: 0 auto; }
.side { position: sticky; top: 65px; align-self: start; height: calc(100vh - 65px); overflow-y: auto; padding: 20px 12px 40px 16px; border-right: 1px solid var(--line); }
.side a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15px; min-height: 40px; }
.side a:hover { background: var(--bg3); }
.side a[aria-current="page"] { background: var(--bg3); font-weight: 600; }
.side a .n { margin-left: auto; font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; }
.side .lbl { font-size: 13px; color: var(--mute); padding: 16px 10px 6px; }
.dot { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--c, var(--accent)); }
main { padding: clamp(20px, 3vw, 40px) max(3vw, 16px) 80px; outline: none; max-width: 1240px; width: 100%; }
.loading { padding: 40px; color: var(--mute); }

/* Home */
.hero { display: grid; gap: 18px; padding: 8px 0 28px; }
.hero p { font-size: 18px; color: var(--mute); max-width: 62ch; margin: 0; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 4px 0 0; font-size: 15px; color: var(--mute); }
.stats b { color: var(--ink); font: 600 22px var(--f-head); margin-right: 6px; font-variant-numeric: tabular-nums; }
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 6px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg2); }
.flow div { padding: 14px 16px; border-right: 1px solid var(--line); font-size: 14px; color: var(--mute); }
.flow div:last-child { border-right: 0; }
.flow b { display: block; color: var(--ink); font: 600 16px var(--f-head); }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 36px 0 14px; flex-wrap: wrap; }
.sec-h h2 { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink); border-radius: 999px; padding: 6px 12px; font-size: 14px; text-decoration: none; min-height: 36px; cursor: pointer; font-family: inherit; }
.chip:hover, .chip[aria-pressed="true"] { border-color: var(--accent); }
.chip .n { color: var(--mute); font-size: 13px; }
.mchips { display: none; }

/* Category cards */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cat { display: grid; gap: 6px; padding: 16px; border-radius: var(--r); background: var(--bg2); border: 1px solid var(--line); text-decoration: none; color: var(--ink); position: relative; overflow: hidden; }
.cat:hover { border-color: var(--c); }
.cat b { font: 600 18px var(--f-head); display: flex; align-items: center; gap: 10px; }
.cat span { font-size: 14px; color: var(--mute); }
.cat .bar { height: 4px; border-radius: 4px; background: var(--bg3); overflow: hidden; margin-top: 6px; }
.cat .bar i { display: block; height: 100%; background: var(--c); }

/* Tool cards */
.grid-t { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.card { position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 6px; padding: 14px 14px 12px; border-radius: var(--r); background: var(--bg2); border: 1px solid var(--line); color: var(--ink); text-decoration: none; min-height: 132px; }
.card:hover { border-color: color-mix(in srgb, var(--c) 70%, var(--line)); transform: translateY(-1px); }
.card h3 { margin: 0; font-size: 16px; display: flex; gap: 8px; align-items: center; padding-right: 28px; }
.card p { margin: 0; font-size: 14px; color: var(--mute); line-height: 1.45; }
.card .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--mute); }
.card.planned { opacity: .72; }
.card.planned:hover { opacity: 1; }
.star { position: absolute; top: 8px; right: 6px; border: 0; background: none; color: var(--mute); cursor: pointer; font-size: 18px; width: 36px; height: 36px; border-radius: 8px; }
.star:hover { background: var(--bg3); }
.star[aria-pressed="true"] { color: var(--warn); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12.5px; background: var(--bg3); color: var(--mute); white-space: nowrap; }
.pill.ready { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pill.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pill.bad { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.pill.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pill.tech { font-family: var(--f-mono); font-size: 11.5px; }
.empty { padding: 40px 0; color: var(--mute); }

/* Tool page */
.crumbs { font-size: 14px; color: var(--mute); margin-bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--mute); }
.thead { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
.thead h1 { font-size: clamp(28px, 3.6vw, 40px); margin: 0 0 6px; }
.thead p { margin: 0; color: var(--mute); font-size: 17px; max-width: 70ch; }
.thead .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tool { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: clamp(14px, 2vw, 22px); display: grid; gap: 14px; }
.planned-box { display: grid; gap: 10px; }
.planned-box p { margin: 0; max-width: 70ch; }

/* Controls */
.btn { font: 500 14px var(--f-body); color: var(--ink); background: var(--bg3); border: 1px solid var(--line); border-radius: 9px; padding: 8px 14px; cursor: pointer; min-height: 40px; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.ctrls { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; }
.fld { display: grid; gap: 5px; font-size: 13.5px; color: var(--mute); }
.fld.wide { width: 100%; }
.fld.chk { display: flex; align-items: center; gap: 8px; color: var(--ink); min-height: 40px; cursor: pointer; }
.fld.chk input { width: 18px; height: 18px; accent-color: var(--accent); }
input, select, textarea { font: 16px var(--f-body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; min-height: 42px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
textarea { width: 100%; resize: vertical; line-height: 1.5; font-family: var(--f-mono); font-size: 14.5px; }
.row { display: flex; gap: 8px; align-items: center; }
.row input { flex: 1; }
.io { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.io.one { grid-template-columns: minmax(0, 1fr); }
.pane { display: grid; grid-template-rows: auto 1fr; gap: 6px; }
.pane textarea { min-height: 300px; }
.pane-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 500; }
.pane-a { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.stats { font-size: 13px; color: var(--mute); font-weight: 400; }
.err { color: var(--bad); margin: 0; min-height: 1em; font-size: 14px; }
.status { margin: 0; font-size: 14px; color: var(--mute); }
.status.ok { color: var(--ok); }
.status.bad { color: var(--bad); }
textarea.solo { min-height: 140px; }
.bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.meter { font-size: 14px; color: var(--mute); }

/* Results */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; }
.tile b { font: 600 clamp(20px, 2.6vw, 28px)/1.15 var(--f-head); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile span { font-size: 13px; color: var(--mute); }
.genlist { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.genlist li, .hrow { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; }
.genlist code, .hrow code { flex: 1; font-size: 14px; word-break: break-all; }
.hname { font-size: 13px; color: var(--mute); min-width: 92px; }
.hashes { display: grid; gap: 6px; }
.hrow.match { border-color: var(--ok); }
.kv { width: 100%; border-collapse: collapse; font-size: 14px; }
.kv th { text-align: left; color: var(--mute); font-weight: 500; padding: 7px 12px 7px 0; vertical-align: top; width: 30%; }
.kv td { padding: 7px 0; border-top: 1px solid var(--line); word-break: break-all; }
.kv tr:first-child td { border-top: 0; }
.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.grid th, .grid td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.grid th { color: var(--mute); font-weight: 500; }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 12px; overflow-x: auto; font-size: 13.5px; margin: 0; white-space: pre-wrap; word-break: break-word; }
.scroll { overflow-x: auto; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.jwt-h { color: #ff6b8b; }
.jwt-p { color: var(--accent-ink); }
.now { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.now > div:first-child { display: grid; }
.big { font: 600 clamp(28px, 4vw, 40px) var(--f-mono); font-variant-numeric: tabular-nums; }
.nowbtns { display: flex; gap: 6px; flex-wrap: wrap; }
.drop { display: grid; justify-items: center; gap: 6px; padding: 28px; border: 2px dashed var(--line); border-radius: 12px; cursor: pointer; text-align: center; color: var(--mute); }
.drop span { color: var(--ink); font-weight: 500; }
.drop.over, .drop:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.rx { display: flex; align-items: center; gap: 6px; font-size: 20px; color: var(--mute); }
.rx #pat { flex: 1; font-family: var(--f-mono); }
.hl { white-space: pre-wrap; word-break: break-word; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 12px; font-size: 14px; max-height: 260px; overflow: auto; }
mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.grp { font-size: 12px; color: var(--accent-ink); }
.dt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dt td { padding: 2px 8px; white-space: pre-wrap; word-break: break-word; vertical-align: top; }
.dt .ln { width: 1%; color: var(--mute); text-align: right; user-select: none; font-family: var(--f-mono); font-size: 12px; }
.dt .sign { width: 1%; color: var(--mute); }
.dt .add, .dt tr.add td { background: color-mix(in srgb, var(--ok) 13%, transparent); }
.dt .del, .dt tr.del td { background: color-mix(in srgb, var(--bad) 13%, transparent); }
.dt .empty { background: var(--bg3); }
.dt.split td.mono { width: 49%; }
ins { background: color-mix(in srgb, var(--ok) 35%, transparent); text-decoration: none; border-radius: 3px; }
del { background: color-mix(in srgb, var(--bad) 35%, transparent); text-decoration: line-through; border-radius: 3px; }
.diff { border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.jtree { font: 13.5px/1.6 var(--f-mono); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 10px; min-height: 300px; max-height: 520px; overflow: auto; }
.jtree ul { list-style: none; margin: 0; padding-left: 18px; border-left: 1px dashed var(--line); }
.jtree summary { cursor: pointer; }
.jtree .k { color: var(--accent-ink); }
.jtree .s { color: var(--ok); }
.jtree .number { color: var(--warn); }
.jtree .boolean, .jtree .n { color: #ff6b8b; }
.jtree .t { color: var(--mute); }
.fancy { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.fx { display: grid; text-align: left; gap: 2px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-size: 18px; min-height: 64px; }
.fx:hover { border-color: var(--accent); }
.bases { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .card:hover { transform: none; } }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .mchips { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; margin: 0 0 18px; scrollbar-width: none; }
  .mchips .chip { flex: none; }
}
@media (max-width: 680px) {
  .io, .cols { grid-template-columns: minmax(0, 1fr); }
  .pane textarea { min-height: 180px; }
  .net #netlabel { display: none; }
  .search kbd { display: none; }
  .brand span { display: none; }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow div { border-right: 0; border-bottom: 1px solid var(--line); }
  .kv th { width: 40%; }
}

/* Round 2 tools */
.keybox { display: grid; place-items: center; min-height: 140px; border: 2px dashed var(--line); border-radius: 12px; font: 600 clamp(28px, 5vw, 48px) var(--f-head); cursor: pointer; text-align: center; padding: 12px; }
.keybox:focus { border-color: var(--accent); outline: none; }
.feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.cron-say { font: 600 clamp(20px, 2.6vw, 26px)/1.3 var(--f-head); margin: 0 0 12px; }
.chmod td, .chmod th { text-align: center; }
.chmod input { width: 22px; height: 22px; accent-color: var(--accent); }
.result { display: grid; gap: 10px; }
.md-preview { background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 16px 20px; overflow: auto; min-height: 300px; max-height: 640px; line-height: 1.6; }
.md-preview img { max-width: 100%; }
.md-preview pre { white-space: pre; }
.md-preview table { border-collapse: collapse; }
.md-preview td, .md-preview th { border: 1px solid var(--line); padding: 4px 8px; }
.md-preview blockquote { margin: 0; padding-left: 14px; border-left: 3px solid var(--line); color: var(--mute); }
.redacted { background: var(--ink); color: var(--ink); border-radius: 2px; }
.uni td { font-size: 14px; }
.uni .ch { font-size: 22px; text-align: center; }
.posts { display: grid; gap: 8px; }
.post { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; }
.post small { display: flex; justify-content: space-between; margin-top: 6px; }

/* Support / sponsors */
.coffee { display: inline-flex; align-items: center; gap: 8px; background: #ffdd00; color: #0d0c22; border-radius: 10px; padding: 10px 16px; font: 600 15px var(--f-body); text-decoration: none; min-height: 44px; white-space: nowrap; border: 1px solid #e6c700; }
.coffee:hover { background: #ffe433; }
.coffee.sm { padding: 6px 12px; min-height: 38px; font-size: 14px; }
.coffee.lg { padding: 14px 22px; font-size: 17px; min-height: 52px; }
.side-coffee { margin: 22px 6px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 8px; }
.side-coffee p { margin: 0; font-size: 13px; color: var(--mute); }
.side .side-coffee a.coffee { justify-content: center; min-height: 38px; color: #0d0c22; }
.side .side-coffee a.coffee:hover { background: #ffe433; }
.support { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 8px 0 12px; }
.support-hero p { color: var(--mute); font-size: 18px; max-width: 60ch; }
.support-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.setup-note { font-size: 14px !important; border: 1px dashed var(--warn); border-radius: 10px; padding: 10px 12px; color: var(--ink) !important; }
.cup-art svg { width: 100%; max-width: 260px; display: block; margin: 0 auto; color: var(--ink); }
.sponsors { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.sponsor { display: grid; gap: 6px; align-content: start; padding: 16px; border-radius: var(--r); background: var(--bg2); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.sponsor span { color: var(--mute); font-size: 14px; }
.sponsor.open { border-style: dashed; }
.sponsor .btn { justify-self: start; text-decoration: none; margin-top: 6px; }
.sponsor .ini { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--bg3); font: 600 18px var(--f-head); color: var(--ink); }
.help-list { color: var(--mute); padding-left: 20px; }
.foot { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--mute); }
.foot > div:first-child { display: grid; gap: 2px; }
.foot b { color: var(--ink); font-family: var(--f-head); }
.foot-a { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.foot-a a:not(.coffee) { color: var(--mute); }
@media (max-width: 680px) { .support { grid-template-columns: minmax(0, 1fr); } .cup-art { display: none; } }

/* ---- PDF workbench ---- */
.pdfw { display: grid; gap: 16px; }
.pdf-files, .pdf-opts, .pdf-grid-wrap, .pdf-result { display: grid; gap: 10px; }
.pdf-opts:empty, .pdf-grid-wrap:empty, .pdf-result:empty { display: none; }
.pdf-hint { margin: 0; font-size: 14px; }
.pdf-flist, .flist { display: grid; gap: 6px; }
.pdf-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.pdf-file[draggable="true"] { cursor: grab; }
.pdf-file small { color: var(--mute); white-space: nowrap; }
.pdf-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: color-mix(in srgb, #ff5a5f 16%, transparent); color: #ff7a7e; font: 600 11px var(--f-mono); }
.pdf-fn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.pdf-fa { display: flex; gap: 2px; }
.thumb { flex: none; display: grid; place-items: center; width: 56px; height: 56px; background: var(--bg3); border-radius: 6px; overflow: hidden; }
.thumb canvas { max-width: 100%; max-height: 100%; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.pg { display: grid; gap: 6px; padding: 8px; background: var(--bg); border: 2px solid var(--line); border-radius: 10px; transition: border-color .15s, opacity .15s; }
.pgrid.select .pg, .pgrid.rotate .pg { cursor: pointer; }
.pgrid.select .pg:not(.sel) { opacity: .55; }
.pg.sel { border-color: var(--accent); opacity: 1; }
.pg.drag { opacity: .4; border-style: dashed; }
.pgrid.order .pg, .pgrid.organize .pg { cursor: grab; }
.pgc { display: grid; place-items: center; aspect-ratio: 1 / 1.3; background: var(--bg3); border-radius: 6px; overflow: hidden; }
.pgc canvas { max-width: 100%; max-height: 100%; box-shadow: 0 1px 4px rgb(0 0 0 / .3); background: #fff; transition: transform .2s; }
.pgl { display: flex; justify-content: space-between; align-items: center; gap: 4px; font: 500 13px var(--f-mono); color: var(--mute); }
.pgl .btn { padding: 2px 6px; min-height: 26px; }
.pgrid.res { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.res-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.res-head > div:first-child { display: grid; gap: 2px; }
.res-head small { color: var(--mute); }
.dl-note { font-size: 13px; margin: 0; }
.viewer-bar { align-items: center; }
.viewer-bar .fld { flex: 1; min-width: 160px; }
.viewer { display: grid; gap: 16px; justify-items: center; max-height: 75vh; overflow: auto; padding: 16px; background: var(--bg3); border-radius: 10px; }
.vpage { display: grid; gap: 4px; justify-items: center; }
.vpage canvas { background: #fff; box-shadow: 0 2px 10px rgb(0 0 0 / .35); max-width: 100%; }
.vpage small { color: var(--mute); font-family: var(--f-mono); }

/* ---- PDF editor, crop, presentation, compare ---- */
.pdf-panel:empty { display: none; }
.ed { display: grid; gap: 10px; }
.ed-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; position: sticky; top: 72px; z-index: 5; }
.ed-sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
.ed-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mute); }
.ed-opt input[type=number] { width: 64px; min-height: 34px; }
.ed-opt input[type=color] { width: 40px; height: 34px; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); }
.ed-hint { margin: 0; font-size: 14px; }
.ed-nav { align-items: center; }
.ed-stage { overflow: auto; background: var(--bg3); border-radius: 10px; padding: 16px; display: grid; justify-items: center; max-height: 80vh; outline: none; }
.ed-stage:focus-visible { outline: 2px solid var(--accent); }
.ed-wrap { position: relative; box-shadow: 0 2px 14px rgb(0 0 0 / .35); background: #fff; touch-action: none; }
.ed-wrap > canvas { display: block; }
.ed-wrap.deleted::after { content: "This page will be deleted"; position: absolute; inset: 0; display: grid; place-items: center; background: rgb(200 40 58 / .25); color: #7f1020; font: 600 22px var(--f-head); pointer-events: none; }
.ed-svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; user-select: none; }
.ed-svg.tool-select { cursor: default; }
.ed-svg:not(.tool-select) { cursor: crosshair; }
.ed-svg.tool-text, .ed-svg.tool-note { cursor: text; }
.ed-svg .obj { cursor: move; }
.ed-svg:not(.tool-select) .obj { cursor: inherit; }
.ed-svg .selbox { fill: none; stroke: #4d7cff; stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.ed-svg .hd { fill: #fff; stroke: #4d7cff; stroke-width: 1.5; cursor: nwse-resize; vector-effect: non-scaling-stroke; }
.ed-svg.crop .shade { fill: rgb(11 14 20 / .45); }
.ed-svg.crop .cropbox { fill: none; stroke: #4d7cff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.ed-svg.crop .hd { cursor: grab; }
.ed-input { position: absolute; z-index: 3; min-width: 180px; padding: 4px 6px; border: 2px solid #4d7cff; border-radius: 4px; background: #fff; color: #111; font: 14px Helvetica, Arial, sans-serif; resize: both; transform: translateY(-60%); }
.ed-forms { padding: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.ed-forms h3 { margin-top: 0; }
.ed-search { padding: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.sigpad-back { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgb(0 0 0 / .55); padding: 16px; }
.sigpad { width: min(640px, 100%); display: grid; gap: 12px; padding: 18px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 60px rgb(0 0 0 / .5); }
.sigc { width: 100%; aspect-ratio: 10 / 3; background: #fff; border-radius: 8px; border: 1px dashed #9aa3b2; touch-action: none; cursor: crosshair; }
.sig-fonts { display: grid; gap: 8px; }
.sig-font { text-align: left; padding: 10px 14px; font-size: 34px; line-height: 1.2; background: #fff; color: #14213d; border: 2px solid transparent; border-radius: 8px; cursor: pointer; }
.sig-font.on { border-color: var(--accent); }
.sig-up img { max-width: 100%; max-height: 140px; background: #fff; border-radius: 8px; }
.present { display: grid; gap: 10px; }
.pres-stage { position: relative; display: grid; place-items: center; background: #05070b; border-radius: 10px; min-height: 300px; padding: 12px; cursor: pointer; outline: none; }
.pres-stage:fullscreen { padding: 0; border-radius: 0; }
.pres-stage:focus-visible { outline: 2px solid var(--accent); }
.pres-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgb(255 255 255 / .1); }
.pres-bar span { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.pres-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.pres-strip button { flex: none; display: grid; gap: 2px; justify-items: center; padding: 4px; background: var(--bg); border: 2px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--mute); }
.pres-strip button[aria-current="true"] { border-color: var(--accent); color: var(--ink); }
.pres-strip canvas { width: 110px; height: auto; background: #fff; }
.cmp { display: grid; gap: 12px; }
.cmp h3 { margin: 0; }
.cmp-bars { display: flex; gap: 4px; align-items: flex-end; height: 90px; overflow-x: auto; padding: 4px 0; }
.cmp-bar { flex: none; width: 28px; height: 100%; display: grid; grid-template-rows: 1fr auto; align-items: end; justify-items: center; background: none; border: 0; cursor: pointer; color: var(--mute); padding: 0; }
.cmp-bar span { width: 18px; background: var(--line); border-radius: 3px 3px 0 0; }
.cmp-bar span.chg { background: var(--bad); }
.cmp-bar small { font: 11px var(--f-mono); }
.cmp-view { display: grid; gap: 12px; justify-items: center; background: var(--bg3); padding: 12px; border-radius: 10px; }
.cmp-view.side { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.cmp-view figure { margin: 0; display: grid; gap: 6px; justify-items: center; }
.cmp-view canvas { max-width: 100%; height: auto; background: #fff; box-shadow: 0 2px 10px rgb(0 0 0 / .3); }
.cmp-view figcaption { font-size: 13px; color: var(--mute); text-align: center; overflow-wrap: anywhere; }
.cmp-view .ovl { position: relative; display: inline-block; }
.cmp-view .ovl canvas.top { position: absolute; left: 0; top: 0; }
.cmp-words del { color: var(--bad); } .cmp-words ins { color: var(--ok); text-decoration: none; }
.bars { display: grid; gap: 8px; }
.barrow { display: grid; grid-template-columns: minmax(0, 200px) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.barrow .bt { height: 12px; background: var(--bg3); border-radius: 6px; overflow: hidden; }
.barrow .bt span { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.barrow .bv { color: var(--mute); font-size: 13px; white-space: nowrap; }
.html-prev { max-height: 320px; overflow: auto; padding: 12px 16px; background: #fff; color: #1f2328; border-radius: 8px; }
.html-prev section { border-bottom: 1px solid #ddd; }
@media (max-width: 600px) { .barrow { grid-template-columns: 1fr auto; } .barrow .bt { grid-column: 1 / -1; grid-row: 2; } .ed-tools { top: 60px; } }

/* ---------- image workbench ---------- */
.imgw { display: grid; gap: 16px; }
.img-hint { margin: 0 0 4px; }
.img-opts .ctrls output { font: 12px var(--f-mono, monospace); color: var(--mute); min-width: 2.5em; display: inline-block; }
.img-opts .fld:has(input[type=range]) { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px; }
.img-opts .fld:has(input[type=range]) > span { grid-column: 1 / -1; }
.pdf-file.cur { border-color: var(--accent); }
.linkish { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; padding: 0; }
.linkish:hover { text-decoration: underline; }
.img-stagewrap { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.img-stage { flex: 1 1 420px; display: flex; justify-content: center; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; min-height: 200px;
  background: repeating-conic-gradient(#8881 0 25%, transparent 0 50%) 0 0 / 20px 20px, var(--bg); }
.img-frame { position: relative; line-height: 0; max-width: 100%; overflow: hidden; }
.img-frame canvas { max-width: 100%; max-height: 70vh; height: auto; display: block; }
.img-side { flex: 0 1 260px; display: grid; gap: 6px; }
.img-side canvas { max-width: 100%; max-height: 260px; border-radius: 8px; background: repeating-conic-gradient(#8881 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.img-ov { position: absolute; inset: 0; touch-action: none; }
.img-ov:not(.crop):not(.regions):not(.point):not(.pick) { pointer-events: none; }
.img-ov.regions, .img-ov.crop { cursor: crosshair; }
.img-ov.point, .img-ov.pick { cursor: copy; }
.crop-box { position: absolute; outline: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.5); cursor: move; }
.crop-box::before, .crop-box::after { content: ""; position: absolute; inset: 33.33% 0; border-block: 1px solid rgba(255,255,255,.45); pointer-events: none; }
.crop-box::after { inset: 0 33.33%; border-block: 0; border-inline: 1px solid rgba(255,255,255,.45); }
.crop-box i { position: absolute; width: 16px; height: 16px; background: #fff; border-radius: 3px; z-index: 1; }
.crop-box i[data-h=nw] { left: -8px; top: -8px; cursor: nwse-resize; } .crop-box i[data-h=ne] { right: -8px; top: -8px; cursor: nesw-resize; }
.crop-box i[data-h=sw] { left: -8px; bottom: -8px; cursor: nesw-resize; } .crop-box i[data-h=se] { right: -8px; bottom: -8px; cursor: nwse-resize; }
.reg { position: absolute; outline: 2px dashed #fff; box-shadow: 0 0 0 1px #000; }
.reg-x { position: absolute; right: 2px; top: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #ef4444; color: #fff; font-size: 12px; line-height: 22px; padding: 0; cursor: pointer; }
.reg-clear { position: absolute; left: 8px; bottom: 8px; line-height: normal; }
.pt { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px #000, inset 0 0 0 2px #000; pointer-events: none; }
.img-save { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2, transparent); }
.img-save .fld { margin: 0; }
.img-save #est .good { color: var(--ok); } .img-save #est .worse { color: var(--bad); }
#cmp.on { border-color: var(--accent); }
.img-thumbs .thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.img-thumbs figure { margin: 0; display: grid; gap: 4px; justify-items: center; max-width: 170px; }
.img-thumbs figure canvas { border: 1px solid var(--line); border-radius: 6px; background: repeating-conic-gradient(#8881 0 25%, transparent 0 50%) 0 0 / 12px 12px; }
.img-thumbs figcaption { font-size: 12px; color: var(--mute); word-break: break-all; text-align: center; }
.img-node .img-viewer { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; outline: none; }
.img-node .img-viewer .bar { padding: 8px; border-bottom: 1px solid var(--line); }
.img-viewer .vstage { height: 65vh; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: grab; background: repeating-conic-gradient(#8881 0 25%, transparent 0 50%) 0 0 / 20px 20px; }
.img-viewer .vstage canvas { transform-origin: center; max-width: none; }
.img-viewer:fullscreen { background: var(--bg); } .img-viewer:fullscreen .vstage { height: calc(100vh - 60px); }
.img-cmp { position: relative; display: grid; line-height: 0; max-width: 100%; }
.img-cmp canvas { grid-area: 1 / 1; width: 100%; height: auto; max-height: 70vh; object-fit: contain; }
.img-cmp.slider::after { content: ""; position: absolute; top: 0; bottom: 34px; left: var(--x, 50%); width: 2px; background: #fff; box-shadow: 0 0 0 1px #0006; pointer-events: none; }
.img-cmp input[type=range] { grid-area: 2 / 1; width: 100%; margin-top: 10px; }
.img-cmp.blink canvas:last-of-type { transition: opacity .1s; }
.img-gifprev { display: grid; gap: 6px; justify-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.img-gifprev img { max-width: 100%; max-height: 60vh; }
.img-warn { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); margin-bottom: 12px; }
.ok-note { color: var(--ok); }
.kv.grid { width: 100%; } .kv.grid th { text-align: left; }
.img-info { overflow-x: auto; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches .sw { border: 0; border-radius: 10px; padding: 16px 14px 10px; min-width: 110px; display: grid; gap: 2px; text-align: left; cursor: pointer; font: inherit; }
.swatches .sw small { opacity: .75; }
textarea.ascii { font-size: 9px; line-height: 1; white-space: pre; overflow: auto; }
.ascii-html { overflow: auto; max-height: 70vh; border-radius: 10px; }
.cam { position: relative; max-width: 720px; }
.cam video { width: 100%; border-radius: 12px; background: #000; transform: scaleX(-1); }
.cam-count { position: absolute; inset: 0; display: grid; place-items: center; font: 700 96px var(--f-head, sans-serif); color: #fff; text-shadow: 0 2px 12px #000; }
.cam-box { display: grid; gap: 10px; }
.imgw [hidden] { display: none !important; }

/* ---------- data workbench ---------- */
.dataw { display: grid; gap: 16px; }
.dataw .pane textarea { min-height: 0; font: 13px/1.5 var(--f-mono, monospace); }
.dataw textarea.nowrap, .dataw #out.nowrap { white-space: pre; overflow-x: auto; }
.d-opts { display: grid; gap: 10px; }
.d-opts .wide textarea { width: 100%; font: 13px/1.5 var(--f-mono, monospace); }
.chips-f { border: 0; padding: 0; margin: 0; } .chips-f legend { font-size: 13px; color: var(--mute); padding: 0; margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; background: var(--bg2); }
.chip:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.chip input { margin: 0; }
.d-res { display: grid; gap: 14px; min-width: 0; }
.d-res h3 { margin: 6px 0 0; font-size: 15px; }
.dtable-wrap { overflow: auto; max-height: 460px; border: 1px solid var(--line); border-radius: 10px; }
.dtable { border-collapse: collapse; font-size: 13px; width: max-content; min-width: 100%; }
.dtable th { position: sticky; top: 0; background: var(--bg3); text-align: left; font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dtable td { padding: 5px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.dtable td.num { text-align: right; font-variant-numeric: tabular-nums; }
.dtable td.empty { background: color-mix(in srgb, var(--warn) 14%, transparent); }
.dtable .rn { color: var(--mute); text-align: right; font-size: 12px; }
.dtable tr.mark td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.dprof { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.dcol { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; background: var(--bg2); min-width: 0; }
.dcol-h { display: flex; justify-content: space-between; gap: 8px; align-items: center; } .dcol-h b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbar { height: 6px; border-radius: 3px; background: var(--bg3); overflow: hidden; } .dbar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.dbar.miss { min-width: 120px; } .dbar.miss i { background: var(--warn); }
.warnc { color: var(--warn); }
.spark rect { fill: var(--accent); opacity: .85; }
table.mini { font-size: 12px; border-collapse: collapse; } table.mini td { padding: 1px 8px 1px 0; } table.mini td:nth-child(odd) { color: var(--mute); }
.topv { list-style: none; margin: 0; padding: 0; font-size: 13px; } .topv li { display: flex; justify-content: space-between; gap: 8px; } .topv small { font-variant-numeric: tabular-nums; }
.chart-box { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg2); line-height: 0; }
.chart-box canvas { display: block; height: auto; }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font: 12px/1.4 var(--f-body); padding: 5px 9px; border-radius: 6px; white-space: nowrap; z-index: 2; }
.boxplot { width: 100%; max-width: 640px; height: auto; } .boxplot line { stroke: var(--mute); stroke-width: 2; } .boxplot rect { fill: color-mix(in srgb, var(--accent) 22%, transparent); stroke: var(--accent); stroke-width: 2; } .boxplot .med { stroke: var(--accent); stroke-width: 3; } .boxplot circle { fill: var(--warn); } .boxplot text { fill: var(--mute); font-size: 12px; }
.jdiff, .vlist, .dups { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 14px; }
.jdiff li, .vlist li { padding: 6px 10px; border-radius: 8px; border-left: 3px solid var(--line); background: var(--bg2); word-break: break-word; }
.jdiff li.add { border-color: var(--ok); } .jdiff li.remove { border-color: var(--bad); } .jdiff li.replace { border-color: var(--warn); }
.jdiff .ov { color: var(--bad); text-decoration: line-through; } .jdiff .nv { color: var(--ok); }
.vlist li.error { border-color: var(--bad); } .vlist li.warn { border-color: var(--warn); } .vlist li.info { border-color: var(--accent); }
.vlist b { margin-right: 6px; }
.steps { display: grid; gap: 4px; padding-left: 20px; }
.lead { font-size: 16px; }
details.types summary { cursor: pointer; color: var(--accent-ink); font-size: 14px; }
.d-res.chart-after .d-html { order: -1; }

/* ---------- calculators (js/tools/calc.js) ---------- */
.calcw { display: grid; gap: 14px; }
.c-form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.c-form .fld:not(.chk):not(.wide) { min-width: 150px; flex: 0 1 200px; }
.c-form .fld.wide textarea { width: 100%; font: 14px/1.5 var(--f-mono); }
.c-form [hidden] { display: none !important; }
.c-affix { display: flex; align-items: stretch; }
.c-affix > input { flex: 1; min-width: 0; }
.c-sym, .c-suf { display: grid; place-items: center; padding: 0 10px; background: var(--bg3); border: 1px solid var(--line); color: var(--mute); font-size: 14px; }
.c-sym { border-radius: 8px 0 0 8px; border-right: 0; }
.c-suf { border-radius: 0 8px 8px 0; border-left: 0; }
.c-affix:not(.suf) > .c-sym + input { border-radius: 0 8px 8px 0; }
.c-affix.suf > input { border-radius: 8px 0 0 8px; }
.c-addzone .c-affix { gap: 6px; }
.c-ccy { flex: 0 1 230px !important; }
.c-bar { gap: 8px; }
.c-res { display: grid; gap: 14px; transition: opacity .15s; }
.c-res.stale { opacity: .45; }
.c-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.c-main { font: 600 clamp(28px, 4.4vw, 44px)/1.1 var(--f-head); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.c-main.long { font-size: clamp(18px, 2.4vw, 24px); line-height: 1.35; font-weight: 500; }
.c-sub { color: var(--mute); margin-top: 6px; font-size: 14.5px; }
.calcw .tile b { font-size: clamp(16px, 2vw, 21px); }
.c-rows .c-cp { width: 1%; padding-left: 8px; }
.c-rows td { word-break: normal; overflow-wrap: anywhere; font-family: var(--f-mono); font-size: 13.5px; }
.c-th { margin-right: auto; font-weight: 600; }
.c-tablewrap .dtable-wrap { max-height: 420px; }
.c-note { margin: 0; font-size: 13.5px; }
.c-chart { min-height: 260px; }
.scale { position: relative; display: grid; grid-template-columns: 3.5fr 6.5fr 5fr 10fr; height: 34px; border-radius: 8px; overflow: hidden; font-size: 12px; }
.scale span { display: grid; place-items: center; color: #111; }
.scale span:nth-of-type(1) { background: #9cc7ff; } .scale span:nth-of-type(2) { background: #8fdcab; } .scale span:nth-of-type(3) { background: #ffd27a; } .scale span:nth-of-type(4) { background: #ff9e9e; }
.scale i { position: absolute; top: -3px; bottom: -3px; width: 3px; background: var(--ink); border-radius: 2px; transform: translateX(-1px); box-shadow: 0 0 0 2px var(--bg2); }
.golden { display: flex; height: 56px; gap: 2px; }
.golden i { display: grid; place-items: center; font: 500 13px var(--f-mono); font-style: normal; border-radius: 6px; background: var(--accent); color: var(--on-accent); }
.golden i + i { background: var(--bg3); color: var(--ink); }
.clocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.clock { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 3px; }
.clock.mine { border-color: var(--accent); }
.clock-h { display: flex; justify-content: space-between; }
.clock-t { font: 600 26px var(--f-mono); font-variant-numeric: tabular-nums; }
.clock small { color: var(--mute); font-size: 12.5px; }
.tzgrid { overflow-x: auto; display: grid; gap: 3px; }
.tzrow { display: grid; grid-template-columns: 130px repeat(24, minmax(26px, 1fr)); gap: 2px; font-size: 12px; }
.tzrow span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 6px; color: var(--ink); align-self: center; }
.tzrow i { font-style: normal; text-align: center; padding: 5px 0; border-radius: 4px; font-variant-numeric: tabular-nums; }
.tzrow i.night { background: var(--bg3); color: var(--mute); }
.tzrow i.awake { background: light-dark(#e3ebff, #1d2a48); }
.tzrow i.work { background: light-dark(#bfe9cf, #174a31); }
.tzrow i.now { outline: 2px solid var(--accent); outline-offset: -2px; font-weight: 700; }
.tzhead i { color: var(--mute); padding: 0; }
.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cd div { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; text-align: center; padding: 14px 6px; display: grid; }
.cd b { font: 600 clamp(28px, 5vw, 48px) var(--f-mono); font-variant-numeric: tabular-nums; }
.cd span { color: var(--mute); font-size: 13px; }
.swatches .sw { border: 0; border-radius: 10px; padding: 26px 12px 10px; min-width: 130px; display: grid; gap: 2px; text-align: left; cursor: pointer; font: inherit; }
.swatches .sw b { font: 600 15px var(--f-mono); } .swatches .sw small { font-size: 11.5px; opacity: .85; font-family: var(--f-mono); }
.namelist { columns: 3 200px; margin: 0; padding-left: 1.6em; } .namelist li { padding: 2px 0; }
.teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.team { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; } .team ul { margin: 6px 0 0; padding-left: 1.2em; }
.dice { display: flex; flex-wrap: wrap; gap: 8px; }
.die, .coin { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); font: 600 24px var(--f-head); }
.die { font-size: 30px; } .dice .die:not(:empty) { line-height: 1; }
.coin { border-radius: 50%; } .coin.h { background: light-dark(#ffe9a8, #4a3a10); } .coin.t { background: light-dark(#dfe6f2, #2a3346); }
pre.bigint { white-space: pre-wrap; word-break: break-all; font: 13px/1.5 var(--f-mono); background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; max-height: 300px; overflow: auto; margin: 6px 0 0; }

/* ---------- live tools (js/tools/live.js) ---------- */
.livew { display: grid; gap: 16px; max-width: 760px; margin: 0 auto; width: 100%; }
.center { justify-content: center; text-align: center; }
.big-clock { font: 600 clamp(48px, 9vw, 92px)/1 var(--f-mono); font-variant-numeric: tabular-nums; text-align: center; letter-spacing: -0.02em; }
.big-clock small { font-size: .3em; color: var(--mute); letter-spacing: 0; }
.btn.stop { background: var(--bad); border-color: var(--bad); color: #fff; }
.livew .dtable tr.best td { color: var(--ok); } .livew .dtable tr.worst td { color: var(--bad); }
.ring-wrap { position: relative; width: min(340px, 80vw); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.ring-wrap .big-clock { position: absolute; font-size: clamp(40px, 7vw, 64px); }
.ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring-bg { stroke: var(--bg3); } .ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.livew.done .big-clock { color: var(--bad); animation: blink 1s steps(2) 4; }
@keyframes blink { 50% { opacity: .3; } }
.pomo-lbl { position: absolute; top: 66%; color: var(--mute); font-size: 15px; }
.pomo[data-phase="short"] .ring-fg, .pomo[data-phase="long"] .ring-fg { stroke: var(--ok); }
.presets .btn { min-width: 64px; }
.livew input[type=range] { width: 100%; padding: 0; min-height: 28px; accent-color: var(--accent); }
.noise-viz { width: 100%; height: 120px; color: var(--accent); background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; }
.beats { display: flex; justify-content: center; gap: 12px; }
.beats i { width: 22px; height: 22px; border-radius: 50%; background: var(--bg3); border: 1px solid var(--line); transition: background .05s; }
.beats i:first-child { width: 28px; height: 28px; }
.beats i.on { background: var(--accent); border-color: var(--accent); }
.sciw { display: grid; grid-template-columns: minmax(300px, 460px) 1fr; gap: 18px; align-items: start; }
.sci-screen { grid-column: 1; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px 12px; display: grid; gap: 2px; }
.sci-mode { font: 600 11px var(--f-mono); color: var(--mute); }
.sci-in { border: 0 !important; box-shadow: none !important; background: transparent; font: 500 22px var(--f-mono); text-align: right; padding: 4px 0; min-height: 0; width: 100%; }
.sci-out { font: 600 30px var(--f-mono); text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.sci-out.err-t { color: var(--bad); font-size: 16px; font-weight: 500; }
.sci-keys { grid-column: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.sk { min-height: 46px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink); font: 500 15px var(--f-body); cursor: pointer; padding: 0 2px; }
.sk:hover { border-color: var(--accent); } .sk:active { transform: translateY(1px); }
.sk.num { background: var(--bg3); font-size: 18px; font-weight: 600; }
.sk.op { color: var(--accent-ink); font-size: 20px; }
.sk.eq { grid-column: span 2; background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-size: 20px; }
.sk.ac { color: var(--bad); } .sk.on { background: var(--accent); color: var(--on-accent); }
.sci-side { grid-column: 2; grid-row: 1 / span 2; display: grid; gap: 8px; }
.sci-hist { margin: 0; padding-left: 1.4em; max-height: 360px; overflow: auto; font: 14px var(--f-mono); display: grid; gap: 4px; }
@media (max-width: 760px) { .sciw { grid-template-columns: 1fr; } .sci-side { grid-column: 1; grid-row: auto; } }

/* ---------- QR codes and barcodes (js/tools/codes.js) ---------- */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.qrw { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr); gap: 22px; align-items: start; }
.qr-form { display: grid; gap: 14px; min-width: 0; }
.qr-fields .fld:not(.wide):not(.chk) { flex: 1 1 200px; }
.qr-fields input:not([type=checkbox]), .qr-fields select { width: 100%; }
.qr-style summary, .qrw details summary, .bcw details summary { cursor: pointer; color: var(--mute); font-size: 14px; margin-bottom: 8px; }
input[type=color] { padding: 3px; width: 64px; height: 42px; cursor: pointer; }
.qr-out { display: grid; gap: 10px; position: sticky; top: 80px; }
.qr-prev { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; place-items: center; }
.qr-prev svg { width: 100%; max-width: 340px; height: auto; border-radius: 6px; }
.qr-payload { white-space: pre-wrap; word-break: break-all; font: 13px/1.5 var(--f-mono); background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 6px 0; max-height: 220px; overflow: auto; }
.bcw { display: grid; gap: 12px; }
.fld.grow { flex: 1 1 320px; } .fld.grow input { width: 100%; font-family: var(--f-mono); }
.bc-prev { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; place-items: center; overflow-x: auto; }
.bc-prev svg { max-width: 100%; height: auto; }
.scanw { display: grid; gap: 12px; }
.scan-view { position: relative; max-width: 520px; border-radius: var(--r); overflow: hidden; background: #000; }
.scan-view video { width: 100%; display: block; }
.scan-frame { position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.85); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); pointer-events: none; }
.scan-view #stopcam { position: absolute; right: 10px; bottom: 10px; }
.scan-shot { max-width: 260px; max-height: 260px; border-radius: 8px; border: 1px solid var(--line); }
.scan-res { display: grid; gap: 10px; }
.scan-item { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 8px; }
@media (max-width: 860px) { .qrw { grid-template-columns: 1fr; } .qr-out { position: static; } }
.bcw [hidden], .qrw [hidden] { display: none !important; }

/* ---------- business documents (js/tools/docs.js) ---------- */
.docw { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.doc-ed { display: grid; gap: 12px; min-width: 0; }
.doc-sec { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px 14px; margin: 0; min-width: 0; }
.doc-sec legend { padding: 0 6px; font-weight: 600; font-size: 14px; }
.doc-sec .fld:not(.wide) { flex: 1 1 150px; } .doc-sec .fld input:not([type=checkbox]):not([type=color]), .doc-sec .fld select { width: 100%; }
.doc-sec textarea { font-family: var(--f-body); font-size: 14px; }
.small { font-size: 12.5px; margin: 0 0 8px; }
.doc-items { display: grid; gap: 4px; margin-bottom: 8px; overflow-x: auto; }
.doc-row { display: grid; gap: 4px; align-items: center; min-width: 440px; }
.doc-row.head span { font-size: 12px; color: var(--mute); padding: 0 4px; }
.doc-row input { min-height: 36px; padding: 6px 8px; font-size: 14px; width: 100%; min-width: 0; }
.doc-row .r, .doc-row output { text-align: right; } .doc-row output { font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; }
.doc-x { min-height: 32px; padding: 0; font-size: 18px; }
.c-suf-sel { border-radius: 0 8px 8px 0; min-height: 42px; padding: 0 6px; margin-left: -1px; }
.doc-side { position: sticky; top: 76px; display: grid; gap: 10px; min-width: 0; }
.doc-paperwrap { overflow: auto; max-height: calc(100vh - 170px); border-radius: 10px; background: var(--bg3); padding: 14px; }
.doc-paper { --acc: #2f5bd3; position: relative; background: #fff; color: #1a1f29; width: 100%; max-width: 794px; margin: 0 auto; aspect-ratio: 210 / 297; padding: 6% 7%; box-sizing: border-box; font: 12.5px/1.45 "Inter", Arial, sans-serif; box-shadow: 0 2px 12px rgba(0,0,0,.18); border-top: 6px solid var(--acc); display: flex; flex-direction: column; gap: 18px; }
.doc-paper.letter { aspect-ratio: 8.5 / 11; }
.dp-head { display: flex; justify-content: space-between; gap: 20px; }
.dp-brand { display: grid; gap: 8px; color: #5a6170; font-size: 11.5px; } .dp-brand b { color: #1a1f29; font-size: 14px; }
.dp-brand img { max-width: 150px; max-height: 56px; object-fit: contain; }
.dp-title { text-align: right; } .dp-title h1 { margin: 0; font: 700 26px/1.1 "Inter", Arial, sans-serif; color: var(--acc); text-transform: uppercase; letter-spacing: .02em; }
.dp-title p { margin: 2px 0; font-size: 11.5px; } .dp-title p span { color: #6b7280; margin-right: 6px; } .dp-no { font-weight: 700; font-size: 13px !important; }
.dp-stamp { position: absolute; right: 12%; top: 26%; transform: rotate(12deg); border: 3px solid #0f8a4f; color: #0f8a4f; font: 800 30px "Inter", Arial, sans-serif; padding: 2px 14px; border-radius: 8px; opacity: .6; letter-spacing: .1em; }
.dp-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; font-size: 12px; }
.dp-paper h4, .doc-paper h4 { margin: 0 0 4px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; }
.dp-items { width: 100%; border-collapse: collapse; font-size: 12px; }
.dp-items th { background: color-mix(in srgb, var(--acc) 10%, #fff); text-align: left; padding: 7px 6px; font-weight: 600; }
.dp-items td { padding: 7px 6px; border-bottom: 1px solid #e3e6eb; vertical-align: top; }
.doc-paper .r { text-align: right; font-variant-numeric: tabular-nums; }
.dp-totals { margin-left: auto; width: 50%; border-collapse: collapse; font-size: 12.5px; }
.dp-totals td { padding: 5px 8px; } .dp-totals td:first-child { color: #5a6170; }
.dp-totals tr.grand td { background: var(--acc); color: #fff; font-weight: 700; font-size: 14px; }
.dp-sum { margin: 0; }
.dp-note p { margin: 0; font-size: 11.5px; color: #3a404c; }
.dp-sign { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; margin-top: auto; padding-top: 30px; }
.dp-sign div { border-top: 1px solid #8a909c; padding-top: 4px; font-size: 10.5px; color: #6b7280; }
@media (max-width: 1100px) { .docw { grid-template-columns: 1fr; } .doc-side { position: static; } .doc-paperwrap { max-height: none; } }
@media print { .doc-paper { aspect-ratio: auto; min-height: 100vh; } }
.doc-sec .c-affix select { width: auto; flex: 0 0 auto; } .doc-sec .c-affix input { border-radius: 8px 0 0 8px; }
.css-pat-prev { height: 160px; border-radius: 10px; border: 1px solid var(--line); }

/* ---------- design generators (js/lib/design-defs.js via calc.js) ---------- */
.c-range { display: flex; align-items: center; gap: 8px; min-height: 42px; }
.c-range input { flex: 1; min-width: 90px; padding: 0; min-height: 0; accent-color: var(--accent); }
.c-range output { font: 13px var(--f-mono); color: var(--ink); min-width: 3ch; text-align: right; }
.c-form input[type=color] { width: 100%; min-width: 64px; }
.c-code pre { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; font: 13.5px/1.55 var(--f-mono); background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; max-height: 420px; overflow: auto; }
.d-stage { border: 1px solid var(--line); border-radius: var(--r); min-height: 280px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; padding: 32px; overflow: hidden; color: #111; }
.d-stage.checker { background: repeating-conic-gradient(light-dark(#eef0f4, #1a2030) 0 25%, light-dark(#ffffff, #121722) 0 50%) 0 0 / 22px 22px; }
.d-fill { width: 100%; min-height: 260px; border-radius: 12px; align-self: stretch; }
.d-card { width: 240px; height: 150px; display: grid; place-items: center; font: 600 16px var(--f-body); color: #334155; }
.d-big { border-radius: var(--r); padding: 34px 20px; font: 600 28px var(--f-head); text-align: center; }
.d-scale { display: grid; grid-template-columns: repeat(11, 1fr); border-radius: 10px; overflow: hidden; }
.d-scale button { border: 0; padding: 30px 4px 8px; display: grid; gap: 2px; cursor: pointer; font: inherit; text-align: left; min-width: 0; }
.d-scale b { font-size: 13px; } .d-scale small { font: 10.5px var(--f-mono); overflow: hidden; text-overflow: ellipsis; }
.d-types { display: grid; gap: 10px; overflow-x: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.d-types div { display: grid; gap: 2px; } .d-types small { color: var(--mute); font: 12px var(--f-mono); } .d-types span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.d-article { max-width: 640px; text-align: left; }
.d-space { display: grid; gap: 6px; } .d-space div { display: grid; grid-template-columns: 50px auto 1fr; align-items: center; gap: 10px; }
.d-space small { color: var(--mute); font: 12px var(--f-mono); } .d-space i { display: block; height: 14px; background: var(--accent); border-radius: 3px; } .d-space span { font: 12.5px var(--f-mono); color: var(--mute); }
.d-glass { width: 300px; height: 180px; display: grid; align-content: end; gap: 2px; padding: 20px; color: #fff; font-family: var(--f-body); }
.d-glass span { opacity: .85; font-size: 14px; }
.d-contrast { padding: 26px 28px; max-width: 620px; }
.d-clampdemo { display: grid; gap: 6px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }

/* ---------- Design extras: SVG, fonts, code image ---------- */
.dxw { display: grid; gap: 16px; }
.dx-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .dx-split { grid-template-columns: 1fr; } }
.dx-prev { min-height: 220px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--bg2); overflow: hidden; }
.dx-prev.big { min-height: 380px; }
.dx-prev img { max-width: 100%; max-height: 520px; }
.dx-prev.checker { background-color: #fff; background-image: linear-gradient(45deg, #e6e6e6 25%, transparent 25%, transparent 75%, #e6e6e6 75%), linear-gradient(45deg, #e6e6e6 25%, transparent 25%, transparent 75%, #e6e6e6 75%); background-size: 20px 20px; background-position: 0 0, 10px 10px; }
.dx-cmp { display: flex; flex-wrap: wrap; gap: 8px; }
.dx-chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; color: var(--mute); background: var(--bg2); }
.dx-chip b { color: var(--ink); font-weight: 600; }
.fp { display: grid; gap: 18px; border: 1px solid var(--line); border-radius: 12px; padding: 24px; background: #fff; color: #111; overflow: hidden; }
.fp.dark { background: #0f131b; color: #eef1f6; }
.fp-big { font-size: 64px; line-height: 1.1; word-break: break-word; }
.fp-water { display: grid; gap: 6px; }
.fp-water div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-para { max-width: 68ch; line-height: 1.6; }
.fp-glyphs { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; font-size: 26px; text-align: center; }
.fp-glyphs span { border: 1px solid rgb(127 127 127 / .2); border-radius: 6px; padding: 4px 0; }
.ci { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .ci { grid-template-columns: 1fr; } }
.ci-form { display: grid; gap: 12px; }
.ci-form textarea { min-height: 220px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; }
.ci-out { display: grid; gap: 12px; }
.ci-prev { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--bg2); overflow: auto; }
.ci-prev canvas { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.fp header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.fp header .muted { flex: 1; color: #6b7280; }
.fp.dark header .muted { color: #9aa4b6; }
.fp header .btn { color: inherit; border-color: rgb(127 127 127 / .45); background: transparent; }

/* ---------- Developer extras ---------- */
.rx-list { display: grid; gap: 12px; }
.rx-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--bg2); display: grid; gap: 8px; }
.rx-card header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rx-pat { display: block; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; overflow-x: auto; white-space: pre; color: var(--accent-ink); }
.rx-line { display: flex; gap: 8px; font-size: 13px; } .rx-line.ok span { color: var(--ok); } .rx-line.no span { color: var(--bad); } .rx-line.no code { opacity: .7; }
.rx-hl { white-space: pre-wrap; font-size: 13px; padding: 8px 10px; background: var(--bg); border-radius: 8px; } .rx-hl mark { background: color-mix(in srgb, var(--accent-ink) 35%, transparent); color: inherit; border-radius: 3px; }
.small { font-size: 13px; } .grow { flex: 1; } .okc { color: var(--ok); }
.chip-t { display: inline-flex; } .chip-t input { position: absolute; opacity: 0; pointer-events: none; }
.chip-t span { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--mute); background: var(--bg2); }
.chip-t input:checked + span { border-color: var(--accent-ink); color: var(--ink); background: color-mix(in srgb, var(--accent-ink) 16%, transparent); }
.chip-t input:focus-visible + span { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.http-row { display: flex; gap: 8px; } .http-row select { width: auto; } .http-row input { flex: 1; min-width: 0; }
.sm-sel { padding: 2px 6px; font-size: 12px; margin-left: 6px; width: auto; }
.tile.good b { color: var(--ok); } .tile.badt b { color: var(--bad); }
#res pre.c-code { max-height: 480px; overflow: auto; }
.hx-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
@media (max-width: 960px) { .hx-wrap { grid-template-columns: 1fr; } }
.hx-view { font-size: 13px; line-height: 1.55; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; overflow-x: auto; }
.hx-row { display: flex; gap: 16px; white-space: pre; }
.hx-row .off { color: var(--mute); } .hx-row .hx { display: flex; gap: 0; } .hx-row .hx i { width: 8px; }
.hx-row .b { width: 2.6ch; text-align: left; cursor: pointer; } .hx-row .a { cursor: pointer; } .hx-row .asc { color: var(--mute); }
.hx-row .sel { background: var(--accent-ink); color: #0b0e14; border-radius: 3px; } .hx-row .hit { background: color-mix(in srgb, var(--warn) 45%, transparent); border-radius: 3px; }
.hx-insp { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--bg2); font-size: 13px; } .hx-insp .kv th { width: 45%; }
.fi-flags { border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent); border-radius: 10px; padding: 4px 14px; margin-bottom: 12px; }
/* keys */
.key-out textarea { min-height: 0; font-size: 12px; }
.hint-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: var(--bg2); font-size: 14px; } .hint-box ol { margin: 6px 0; padding-left: 20px; }
.jwt-out { word-break: break-all; padding: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; min-height: 90px; }
.jwt-out .jh { color: #ff7a90; } .jwt-out .jp { color: #c792ea; } .jwt-out .js { color: #4fc1ff; }
.totp-card { justify-items: center; text-align: center; border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: var(--bg2); }
.totp-code { font-size: 48px; letter-spacing: .08em; font-weight: 600; }
.totp-bar { width: 220px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; } .totp-bar i { display: block; height: 100%; background: var(--ok); transition: width 1s linear; } .totp-bar i.low { background: var(--bad); }
.totp-qr svg { border-radius: 8px; }
.pp-list { display: grid; gap: 8px; } .pp-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--bg2); }
.pp-row code { flex: 1; font-size: 17px; word-break: break-all; }
/* playgrounds */
.play { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 960px) { .play { grid-template-columns: 1fr; } }
.play-ed, .play-right { display: grid; gap: 10px; align-content: start; }
.play-code { min-height: 420px; font-size: 13px; line-height: 1.5; tab-size: 2; white-space: pre; overflow: auto; }
.play-prev { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.play-prev iframe { width: 100%; height: 420px; border: 0; display: block; background: #fff; }
.play-con { border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); padding: 8px 12px; }
.play-js .play-log { min-height: 420px; max-height: 600px; }
.play-log { font-size: 12.5px; min-height: 80px; max-height: 200px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.play-log > div { padding: 3px 0; border-bottom: 1px solid var(--line); }
.pl-warn { color: var(--warn); } .pl-error { color: var(--bad); } .pl-info { color: var(--accent-ink); } .pl-muted { color: var(--mute); }
.fld.chk.sm { font-size: 13px; }

/* ---------- Media ---------- */
.aud, .vid, .rec { display: grid; gap: 14px; }
.aud-wave { position: relative; }
.aud-wave canvas, #rwave { width: 100%; display: block; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); touch-action: none; }
.aud-wave canvas { height: 140px; cursor: crosshair; } #rwave { height: 90px; }
.aud-selinfo { margin-top: 4px; }
.aud-res { display: grid; gap: 10px; } .aud-res audio { width: 100%; }
.aud-img { border: 1px solid var(--line); border-radius: 12px; overflow: auto; background: repeating-conic-gradient(#d9d9d9 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.aud-canvas { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.aud-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; counter-reset: n; }
.aud-list li { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: var(--bg2); counter-increment: n; }
.aud-list li::before { content: counter(n); color: var(--mute); font-size: 13px; width: 1.4em; }
.dtmf-pad { display: grid; grid-template-columns: repeat(4, 64px); gap: 8px; } .dtmf-pad .btn { height: 52px; font-size: 20px; font-family: "JetBrains Mono", monospace; }
.vid-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .vid-grid { grid-template-columns: 1fr; } }
.vid-stage { position: relative; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.vid-stage video { width: 100%; max-height: 520px; display: block; background: #000; }
.vid-ov { position: absolute; inset: 0; pointer-events: none; }
.vid-side { display: grid; gap: 12px; align-content: start; }
.vid-prog { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; } .vid-prog i { display: block; height: 100%; width: 0; background: var(--accent-ink); transition: width .25s; }
.vid-res { display: grid; gap: 10px; } .vid-out { width: 100%; max-height: 560px; border-radius: 12px; background: #000; }
.vid-out-img { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }
.rec-stage { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #000; min-height: 120px; display: grid; place-items: center; }
.rec-voice .rec-stage { background: var(--bg2); }
.rec-stage video { width: 100%; max-height: 540px; display: block; } .rec-stage video.mirror { transform: scaleX(-1); }
.rec-stage canvas { width: 100%; height: 120px; display: block; }
.rec-badge { position: absolute; top: 12px; left: 12px; display: flex; gap: 8px; align-items: center; background: rgb(0 0 0 / .65); color: #fff; padding: 4px 10px; border-radius: 99px; font: 600 14px "JetBrains Mono", monospace; }
.rec-badge i { width: 10px; height: 10px; border-radius: 50%; background: #ff4d5e; animation: recblink 1s infinite; }
@keyframes recblink { 50% { opacity: .3; } } @media (prefers-reduced-motion: reduce) { .rec-badge i { animation: none; } }
.rec-count { position: absolute; inset: 0; display: grid; place-items: center; font: 700 96px "Space Grotesk", sans-serif; color: #fff; background: rgb(0 0 0 / .4); }
.rec-takes { display: grid; gap: 12px; } .rec-take { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--bg2); display: grid; gap: 8px; }
.rec-take video { width: 100%; max-height: 360px; border-radius: 8px; background: #000; } .rec-take audio { width: 100%; }

/* ---------- File tools ---------- */
.filew { display: grid; gap: 14px; }
.fpick { display: grid; justify-items: center; gap: 8px; text-align: center; }
.fpick .bar { justify-content: center; }
.arch-body { display: grid; gap: 12px; }
.arch-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .arch-split { grid-template-columns: 1fr; } }
.arch-list { border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); max-height: 520px; overflow: auto; padding: 6px; }
.arch-dir > b { display: block; font-size: 13px; color: var(--mute); padding: 8px 8px 4px; font-weight: 500; }
.arch-row { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.arch-row:hover { background: color-mix(in srgb, var(--accent-ink) 8%, transparent); } .arch-row.on { background: color-mix(in srgb, var(--accent-ink) 16%, transparent); }
.arch-date { width: 140px; text-align: right; }
.arch-prev { border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); padding: 12px; min-height: 200px; overflow: auto; max-height: 520px; }
.arch-prev img { max-width: 100%; border-radius: 8px; background: repeating-conic-gradient(#d9d9d9 0 25%, #fff 0 50%) 0 0 / 14px 14px; }
.arch-prev pre { white-space: pre-wrap; font-size: 12.5px; margin: 0; }
.file-table { max-height: 460px; overflow: auto; }
.rowwarn td { background: color-mix(in srgb, var(--warn) 9%, transparent); }
.sz { display: grid; gap: 16px; } .sz h3 { font-size: 15px; margin: 4px 0 8px; }
.sz-row { display: grid; grid-template-columns: minmax(120px, 1.3fr) minmax(80px, 2fr) 80px 120px; gap: 10px; align-items: center; font-size: 13px; padding: 3px 0; }
.sz-k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sz-v { text-align: right; font-variant-numeric: tabular-nums; }
.sz-bar { height: 10px; background: var(--line); border-radius: 4px; overflow: hidden; display: block; } .sz-bar i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.sz-bar.inline { display: inline-block; width: 120px; vertical-align: middle; }
.sz-stack { display: flex; height: 18px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--bg2); } .sz-stack i { min-width: 2px; }
.sz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--mute); } .sz-legend i, .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.dup { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--bg2); } .dup ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.cmp-hex { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; overflow-x: auto; white-space: nowrap; } .cmp-hex .hit { background: var(--warn); color: #000; border-radius: 3px; }
.arch-row input[type=checkbox] { width: auto; height: auto; margin: 0; flex: none; } .arch-row { min-height: 0; line-height: 1.3; }

/* Home hero (js/hero.js) */
.hh { position: relative; isolation: isolate; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 22px; background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--bg2) 72%, transparent) 55%); backdrop-filter: blur(2px); --mx: 50%; --my: 0%; }
.hh::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%); pointer-events: none; }
.hh::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; background: linear-gradient(transparent 60%, color-mix(in srgb, var(--bg2) 70%, transparent)); }
.hh-fx { position: absolute; inset: 0; border-radius: inherit; width: 100%; height: 100%; z-index: -2; pointer-events: none; }
.hh-in { display: grid; gap: 18px; justify-items: start; padding: clamp(26px, 5vw, 56px) clamp(20px, 4.5vw, 52px) clamp(24px, 4vw, 40px); }
.hh-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font: 500 13px var(--f-mono, "JetBrains Mono", monospace); color: var(--ink); background: color-mix(in srgb, var(--bg) 60%, transparent); border: 1px solid color-mix(in srgb, var(--ok, #43d18a) 40%, var(--line)); animation: hh-rise .6s both; }
.hh-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok, #43d18a); box-shadow: 0 0 0 0 var(--ok, #43d18a); animation: hh-pulse 2.2s infinite; }
.hh h1 { margin: 0; font-size: clamp(34px, 5.4vw, 64px); letter-spacing: -0.025em; line-height: 1.04; animation: hh-rise .7s .06s both; }
.hh-rot { display: inline-block; background: linear-gradient(90deg, #8eacff, #d36bff 45%, #ff6fae 70%, #ffa63d); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: hh-sheen 8s linear infinite; }
.hh-word { display: inline-block; transition: transform .26s ease, opacity .26s ease, filter .26s ease; }
.hh-word.out { transform: translateY(.35em); opacity: 0; filter: blur(4px); }
.hh-sub { margin: 0; max-width: 60ch; font-size: clamp(16px, 1.6vw, 19px); color: var(--mute); animation: hh-rise .7s .12s both; }
.hh-search { position: relative; z-index: 6; width: min(640px, 100%); display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 16px; color: var(--mute); background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--line); box-shadow: 0 10px 40px rgb(0 0 0 / .25); backdrop-filter: blur(8px); transition: border-color .2s, box-shadow .2s; animation: hh-rise .7s .18s both; }
.hh-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent), 0 10px 40px rgb(0 0 0 / .3); }
.hh-search input:focus-visible { outline: none; }
.hh-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 17px var(--f-body); padding: 10px 0; outline: none; }
.hh-search button { border: 0; border-radius: 11px; padding: 10px 18px; font: 600 15px var(--f-head); color: var(--on-accent, #fff); background: var(--accent); cursor: pointer; transition: transform .15s, filter .15s; }
.hh-search button:hover { filter: brightness(1.12); transform: translateY(-1px); }
.hh-res { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 5; margin: 0; padding: 6px; list-style: none; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); box-shadow: 0 16px 48px rgb(0 0 0 / .4); }
.hh-res a { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 14.5px; }
.hh-res a span:last-child { color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hh-res [aria-selected="true"] a, .hh-res a:hover { background: var(--bg3); }
.hh-stats { display: flex; flex-wrap: wrap; gap: 8px 30px; font-size: 15px; color: var(--mute); animation: hh-rise .7s .24s both; }
.hh-stats b { margin-right: 6px; color: var(--ink); font: 700 26px var(--f-head); font-variant-numeric: tabular-nums; }
.hh-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hh-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; min-height: 38px; border-radius: 999px; font-size: 14px; color: var(--ink); text-decoration: none; background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid var(--line); transition: transform .18s ease, border-color .18s, box-shadow .18s, background .18s; animation: hh-rise .5s calc(.28s + var(--i) * 35ms) both; }
.hh-chip small { color: var(--mute); font: 500 12px var(--f-mono, monospace); }
.hh-chip .dot { transition: transform .25s; }
.hh-chip:hover, .hh-chip:focus-visible { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 70%, var(--line)); background: color-mix(in srgb, var(--c) 12%, var(--bg2)); box-shadow: 0 6px 22px color-mix(in srgb, var(--c) 28%, transparent); }
.hh-chip:hover .dot { transform: rotate(45deg) scale(1.2); }
@keyframes hh-rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes hh-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok, #43d18a) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
@keyframes hh-sheen { to { background-position: 200% 0; } }
@media (max-width: 680px) { .hh-search button { display: none; } .hh-res a { grid-template-columns: auto 1fr; } .hh-res a span:last-child { display: none; } }
@media (prefers-reduced-motion: reduce) { .hh *, .hh::before { animation: none !important; } .hh-chip:hover { transform: none; } }

/* Batch 2: logo, visitor counter, X link, drop-to-suggest, add-your-company */
.brand .logo { overflow: visible; transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.brand .logo rect { transform-origin: 16px 16px; animation: lk-glow 4s ease-in-out infinite; }
.brand .logo-l { stroke-dasharray: 30; animation: lk-draw 1.1s .1s ease-out both; }
.brand .logo-dot { transform-origin: 21px 11px; animation: lk-pop .5s 1s cubic-bezier(.3,1.8,.5,1) both, lk-blink 4s 2s ease-in-out infinite; }
.brand:hover .logo { transform: rotate(-8deg) scale(1.08); }
@keyframes lk-draw { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }
@keyframes lk-pop { from { transform: scale(0); } }
@keyframes lk-blink { 0%, 86%, 100% { transform: scale(1); } 92% { transform: scale(1.5); } }
@keyframes lk-glow { 0%, 100% { filter: drop-shadow(0 0 0 transparent); } 50% { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 70%, transparent)); } }
.visits { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font: 500 13px var(--f-mono); color: var(--mute); white-space: nowrap; }
.visits b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.visits i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: hh-pulse 2.4s infinite; --ok: var(--accent); }
.xlink { display: inline-flex; align-items: center; gap: 7px; flex: none; color: var(--ink); text-decoration: none; font-size: 14px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; transition: border-color .2s, background .2s; }
.xlink:hover { border-color: var(--ink); background: var(--bg3); }
.top .xlink { margin-left: auto; }
.sg { margin: 0 0 18px; }
.sg-drop { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--accent) 5%, var(--bg2)); cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.sg-drop:hover, .sg-drop:focus-visible, .sg-drop.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--bg2)); }
.sg-drop.on { transform: scale(1.01); }
.sg-drop > span:nth-of-type(2) { flex: 1; display: grid; gap: 2px; }
.sg-drop b { font: 600 17px var(--f-head); }
.sg-drop small { color: var(--mute); font-size: 14px; }
.sg-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; flex: none; color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.sg-drop:hover .sg-ic, .sg-drop.on .sg-ic { animation: sg-bob .9s ease-in-out infinite; }
@keyframes sg-bob { 50% { transform: translateY(-4px); } }
.sg-btn { flex: none; padding: 9px 16px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font: 600 14px var(--f-head); }
.sg-h h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sg-note { color: var(--mute); font-size: 14px; margin: 10px 0 0; }
.sponsor.add-co { text-decoration: none; color: var(--ink); border-style: dashed; transition: border-color .2s, transform .2s, box-shadow .2s; }
.sponsor.add-co:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 28px color-mix(in srgb, var(--accent) 22%, transparent); }
.sponsor.add-co .ini { font-size: 22px; }
@media (max-width: 680px) { .sg-btn, .xlink span, .visits { display: none; } .sg-drop { padding: 14px; } }
@media (prefers-reduced-motion: reduce) { .brand .logo *, .visits i, .sg-ic { animation: none !important; } .brand:hover .logo, .sponsor.add-co:hover, .sg-drop.on { transform: none; } }
.top .xlink + .net { margin-left: 0; }
.sponsor.add-co .btn { color: var(--ink); justify-self: start; margin-top: 6px; }
.visits[hidden] { display: none; }

/* MicroSlats wave background (js/slats.js) */
.bgfx { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .65; }
.bgfx canvas { display: block; width: 100%; height: 100%; }
.bgfx::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 20%, rgb(0 0 0 / .55), rgb(0 0 0 / .2) 70%); }
.side { background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(6px); }
@media print { .bgfx { display: none; } }
/* Footer X card */
.xcard { display: inline-flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.foot-a a.xcard { color: var(--ink); }
.xcard-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #fff; color: #000; flex: none; }
.xcard-ic svg { width: 20px; height: 20px; }
.xcard-t { display: grid; line-height: 1.25; }
.xcard-t b { font: 600 15px var(--f-head); }
.xcard-t small { color: var(--mute); font-size: 12.5px; }
.xcard-go { margin-left: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; color: #000; font: 600 13px var(--f-head); }
.xcard:hover { border-color: #fff; transform: translateY(-2px); box-shadow: 0 8px 26px rgb(255 255 255 / .08); }
@media (prefers-reduced-motion: reduce) { .xcard:hover { transform: none; } }

/* v1.3 extras (js/tools/extras.js) */
.tt, .kt, .dp, .sr, .fc, .kb, .ht, .tts, .wc, .ps { display: grid; gap: 14px; }
.tt-clock { margin-left: auto; font: 700 32px var(--f-head); font-variant-numeric: tabular-nums; color: var(--accent-ink); }
.tt-text { font: 20px/1.7 var(--f-mono); padding: 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--mute); user-select: none; }
.tt-text .ok { color: var(--ink); } .tt-text .no { color: var(--bad); background: color-mix(in srgb, var(--bad) 18%, transparent); border-radius: 3px; }
.tt-text .cur { border-left: 2px solid var(--accent); animation: hh-pulse 1s infinite; }
.tt-in { font: 18px/1.5 var(--f-mono); }
.kt-kb { display: grid; gap: 6px; padding: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
.kt-row { display: flex; gap: 6px; min-width: 760px; }
.kt-k { display: grid; place-items: center; min-height: 44px; padding: 0 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg3); font: 500 13px var(--f-mono); color: var(--mute); transition: background .12s, transform .08s; }
.kt-k.hit { background: color-mix(in srgb, var(--ok) 28%, var(--bg3)); color: var(--ink); border-color: color-mix(in srgb, var(--ok) 60%, var(--line)); }
.kt-k.now { transform: translateY(2px); background: var(--accent); color: #fff; }
.dp-sw { display: flex; flex-wrap: wrap; gap: 8px; }
.dp-c { width: 92px; height: 60px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; display: flex; align-items: flex-end; padding: 6px; }
.dp-c span { font-size: 11px; background: rgb(0 0 0 / .55); color: #fff; padding: 1px 6px; border-radius: 6px; }
.dp-full { position: fixed; inset: 0; z-index: 1000; cursor: pointer; }
.dp-full span { position: absolute; bottom: 14px; right: 16px; font: 12px var(--f-mono); color: #888; mix-blend-mode: difference; opacity: .7; }
.sr-cv { width: 100%; height: 110px; border-radius: 8px; cursor: crosshair; display: block; }
.sr-cal { display: grid; gap: 10px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; }
.sr-card { border: 2px solid var(--accent); border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.fc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; }
.fc-play { display: grid; gap: 12px; }
.fc-card { perspective: 900px; min-height: 200px; cursor: pointer; }
.fc-in { position: relative; height: 100%; min-height: 200px; transition: transform .5s; transform-style: preserve-3d; }
.fc-card.on .fc-in { transform: rotateY(180deg); }
.fc-f, .fc-b { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; border-radius: 16px; font: 600 24px var(--f-head); backface-visibility: hidden; border: 1px solid var(--line); background: var(--bg3); }
.fc-b { transform: rotateY(180deg); background: color-mix(in srgb, var(--accent) 22%, var(--bg3)); }
.kb-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kb-col { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 10px; align-content: start; min-height: 260px; }
.kb-col h3 { font-size: 16px; margin: 0; display: flex; gap: 8px; align-items: center; }
.kb-list { display: grid; gap: 8px; }
.kb-card { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: var(--bg3); border: 1px solid var(--line); cursor: grab; }
.kb-x { border: 0; background: none; color: var(--mute); font-size: 18px; cursor: pointer; padding: 0 4px; }
.kb-x:hover { color: var(--bad); }
.kb-add { display: flex; gap: 6px; } .kb-add input { flex: 1; min-width: 0; }
.ht-wrap { overflow-x: auto; }
.ht-t { border-collapse: collapse; width: 100%; font-size: 14px; }
.ht-t th, .ht-t td { padding: 6px 4px; text-align: center; border-bottom: 1px solid var(--line); }
.ht-t td:first-child, .ht-t th:first-child { text-align: left; min-width: 160px; }
.ht-t th small { display: block; color: var(--mute); font-weight: 400; }
.ht-c { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg3); cursor: pointer; }
.ht-c.on { background: var(--ok); border-color: var(--ok); }
.wc-cv { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.ps-meter { height: 10px; border-radius: 10px; background: var(--bg3); overflow: hidden; } .ps-meter i { display: block; height: 100%; width: 0; transition: width .3s, background .3s; }
@media (max-width: 760px) { .fc-grid, .kb-cols { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .fc-in { transition: none; } .tt-text .cur { animation: none; } }

/* Home two-column top: hero + drop box left, sponsor rail right */
.home-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; margin-bottom: 22px; }
.home-l { display: grid; gap: 18px; min-width: 0; }
.home-l .hh, .home-l .sg { margin: 0; }
@media (min-width: 1360px) { .home-top { grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr); } .home-l .hh h1 { font-size: clamp(36px, 3.4vw, 60px); } }
.hh-act { display: flex; flex-wrap: wrap; gap: 10px; animation: hh-rise .7s .15s both; }
.hh-act .btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 18px; font: 600 15px var(--f-head); text-decoration: none; border-radius: 12px; }
.hh-contact { background: transparent; border: 1px solid var(--ink); color: var(--ink); transition: background .2s, color .2s; }
.hh-contact:hover { background: var(--ink); color: var(--bg); }
.sp-h { margin: 4px 0 10px; font: 500 12px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.sp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.sp-card { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg2) 85%, transparent); color: var(--ink); text-decoration: none; min-height: 76px; transition: transform .18s, border-color .18s, box-shadow .18s; }
.sp-card:hover { transform: translate(-2px, -2px); border-color: var(--ink); box-shadow: 4px 4px 0 color-mix(in srgb, var(--accent) 70%, transparent); }
.sp-card.open { border-style: dashed; }
.sp-card img, .sp-ini { width: 44px; height: 44px; border-radius: 10px; }
.sp-ini { display: grid; place-items: center; border: 1px dashed var(--mute); font: 500 20px var(--f-head); color: var(--ink); }
.sp-t { display: grid; gap: 2px; min-width: 0; } .sp-t b { font: 600 15px var(--f-head); } .sp-t small { color: var(--mute); font-size: 13px; line-height: 1.3; }
.sp-go { color: var(--mute); transition: transform .18s, color .18s; } .sp-card:hover .sp-go { transform: translateX(3px); color: var(--ink); }
.sp-dm { display: flex; align-items: center; gap: 18px; padding: 22px; border-radius: 16px; text-decoration: none; color: #000; background: linear-gradient(135deg, #f1f1f4, #c9c9d2); transition: transform .2s, box-shadow .2s; }
.sp-dm:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--accent); }
.sp-dm-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #000; color: #fff; flex: none; } .sp-dm-ic svg { width: 28px; height: 28px; }
.sp-dm small { display: block; font: 500 11px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; opacity: .6; }
.sp-dm b { display: block; font: 700 clamp(26px, 3vw, 38px)/1.05 var(--f-head); letter-spacing: -.02em; }
.sp-dm-u { font: 500 14px var(--f-mono); }
@media (max-width: 520px) { .sp-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .sp-card:hover, .sp-dm:hover { transform: none; } }
.sp-grid.empty { min-height: 120px; margin-bottom: 8px; }
.sp-dm-av { position: relative; flex: none; width: 72px; height: 72px; }
.sp-dm-av img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid #000; display: block; }
.sp-dm-av i { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #000; color: #fff; border: 2px solid #e6e6ea; }
.sp-dm-av i svg { width: 14px; height: 14px; }
