/* DS Desk — the document desk of DSDesign Studio.
   Same "Puls koda" language as dsdesign.digital: dark editorial, gold, brutal offset shadows, mono labels. */

:root {
  --bg: #0a0a0b;
  --bg-2: #111113;
  --bg-3: #1a1a1d;
  --fg: #f4f1ea;
  --muted: #a3a097;
  --dim: #6d6a63;
  --line: rgba(244, 241, 234, .11);
  --line-2: rgba(244, 241, 234, .26);
  --shadow-c: #f4f1ea;
  --gold: #ffcc32;
  --gold-text: #ffcc32;
  --nav-bg: rgba(10, 10, 11, .82);
  --amber: #ff9f1c;
  --orange: #ff6b1a;
  --ink: #121212;
  --paper: #efe9dc;
  --ok: #3ddc84;
  --red: #ff5d5d;
  --r: 8px;
  --header: 68px;
  --f-display: "Unbounded", "Arial Black", "Trebuchet MS", sans-serif;
  --f-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f4f1ea;
  --bg-2: #fffdf7;
  --bg-3: #ebe6da;
  --fg: #121212;
  --muted: #55524b;
  --dim: #8a857a;
  --line: rgba(18, 18, 18, .1);
  --line-2: rgba(18, 18, 18, .26);
  --shadow-c: #121212;
  --gold-text: #8f6200;
  --nav-bg: rgba(244, 241, 234, .88);
  color-scheme: light;
}
html[data-theme="light"] .grid-bg { background: radial-gradient(50rem 26rem at 80% 0%, rgba(255, 159, 28, .22), transparent 65%), linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px; }
html[data-theme="light"] .sheet { box-shadow: 8px 8px 0 rgba(18, 18, 18, .18); }
html[data-theme="light"] .tool-ico { background: rgba(255, 204, 50, .22); border-color: rgba(143, 98, 0, .35); }
html[data-theme="light"] .ed-paper { background: #ddd8cc; }
html[data-theme="light"] .stage { box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; overflow-x: clip; -webkit-text-size-adjust: 100%; touch-action: pan-x pan-y; }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
  touch-action: pan-x pan-y;
}
main { flex: 1; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .6rem 1rem; background: var(--gold); color: var(--ink); font-weight: 700; text-decoration: none; border-radius: var(--r); }
.skip:focus { top: 1rem; }
.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-inline: 2.5rem; } :root { --header: 76px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 48px;
  padding: .8rem 1.25rem;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  font: 700 .95rem/1.1 var(--f-body);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s, color .18s, border-color .18s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 4px 4px 0 var(--shadow-c); }
.btn-gold:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow-c); }
.btn-gold:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--shadow-c); }
.btn-line { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn-line:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-text); }
.btn-sm { min-height: 38px; padding: .5rem .85rem; font-size: .84rem; }
.btn-lg { min-height: 56px; padding: 1rem 1.6rem; font-size: 1.02rem; }
.btn.is-busy { cursor: progress; }
.btn.is-busy::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

/* ---------- header ---------- */

#nav-root {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--header); }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; flex: none; }
.brand img { height: 36px; width: auto; }
.brand-word { font: 700 1.08rem/1 var(--f-display); letter-spacing: -.02em; }
.brand-word b { color: var(--gold-text); font-weight: inherit; }
.brand-tag { display: none; padding: .2rem .45rem; border: 1px solid var(--line-2); border-radius: 4px; font: 600 .62rem/1 var(--f-mono); letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
@media (min-width: 520px) { .brand-tag { display: inline-block; } }
@media (min-width: 1024px) { .brand img { height: 42px; } .brand-word { font-size: 1.2rem; } }

.nav-links { display: none; align-items: center; gap: 1.6rem; }
.nav-link { font: 500 .78rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-decoration: none; padding: .55rem 0; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.nav-link b { color: var(--gold-text); font-weight: 500; font-size: .66rem; margin-right: .35rem; }
.nav-link:hover { color: var(--fg); }
.nav-link.is-on { color: var(--fg); border-bottom-color: var(--gold); }
@media (min-width: 960px) { .nav-links { display: flex; } }

.nav-tools { display: flex; align-items: center; gap: .5rem; }
.lang { display: inline-flex; border: 1.5px solid var(--line-2); border-radius: var(--r); padding: 2px; }
.lang-btn { min-width: 36px; height: 32px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font: 700 .72rem/1 var(--f-mono); cursor: pointer; }
.lang-btn.is-on { background: var(--gold); color: var(--ink); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1.5px solid var(--line-2); border-radius: var(--r); background: transparent; color: var(--fg); cursor: pointer; }
.icon-btn:hover { border-color: var(--gold); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-home { display: none; min-height: 40px; padding: .55rem .9rem; font-size: .82rem; box-shadow: 3px 3px 0 var(--shadow-c); }
@media (min-width: 640px) { .nav-home { display: inline-flex; } }

/* ---------- hero ---------- */

.hero { position: relative; overflow: hidden; isolation: isolate; padding-block: 3.2rem 2.5rem; }
@media (min-width: 1024px) { .hero { padding-block: 5rem 3.5rem; } }
.grid-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(50rem 26rem at 80% 0%, rgba(255, 159, 28, .16), transparent 65%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 85% at 55% 25%, #000 35%, transparent 80%);
  mask-image: radial-gradient(ellipse 90% 85% at 55% 25%, #000 35%, transparent 80%);
}
.hero-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: center; }
.hero-main > *, .stage-wrap > *, .opts > *, .privacy > * { min-width: 0; }
@media (min-width: 1024px) { .hero-main { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 4rem; } }
.status { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .8rem; border: 1.5px solid var(--line-2); border-radius: 999px; font: 500 .72rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: ping 1.8s ease-out infinite; }
.hero h1 { margin: 1.3rem 0 1.1rem; font: 800 clamp(2rem, 1.1rem + 4.6vw, 5rem)/1.02 var(--f-display); letter-spacing: -.045em; text-wrap: balance; overflow-wrap: break-word; }
.hero h1 span { display: block; color: var(--gold-text); }
.hero-lead { max-width: 36rem; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }

.search { position: relative; margin-top: 1.8rem; max-width: 36rem; }
.search input {
  width: 100%;
  min-width: 0;
  font-size: 16px;
  min-height: 58px;
  padding: 1rem 1rem 1rem 3.1rem;
  border: 2px solid var(--line-2);
  border-radius: 12px;
  background: var(--bg-2);
  font: 500 1rem/1.2 var(--f-mono);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search input:focus { border-color: var(--gold); box-shadow: 5px 5px 0 var(--gold); }
.search input::placeholder { color: var(--dim); }
.search > span { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); font: 700 1rem/1 var(--f-mono); color: var(--gold-text); pointer-events: none; }

.cat-chips { display: flex; gap: .45rem; margin-top: 1rem; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-bottom: 2px; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips a { flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: .45rem .75rem; border: 1.5px solid var(--line-2); border-radius: 999px; font: 600 .74rem/1 var(--f-mono); text-decoration: none; color: var(--fg); white-space: nowrap; }
.cat-chips a b { color: var(--gold-text); font-weight: 600; font-size: .66rem; }
.cat-chips a:hover { border-color: var(--gold); }
@media (min-width: 960px) { .cat-chips { display: none; } }
.hero-stats { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.6rem; font: 500 .78rem/1.4 var(--f-mono); color: var(--muted); }
.hero-stats b { color: var(--fg); font-size: .95rem; margin-right: .3rem; }

/* the desk: stacked document sheets with the pulse running through a line of text */
.desk-art { position: relative; height: 250px; max-width: 460px; justify-self: center; width: 100%; }
@media (min-width: 640px) { .desk-art { height: 340px; } }
@media (min-width: 1024px) { .desk-art { height: 400px; } }
.sheet {
  position: absolute;
  width: 62%;
  aspect-ratio: 1 / 1.3;
  padding: 1.1rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .45);
  font: 600 .66rem/1 var(--f-mono);
  transition: transform .5s var(--ease);
}
.sheet::after { content: ""; position: absolute; right: -2px; top: -2px; width: 26px; height: 26px; background: linear-gradient(225deg, var(--bg) 50%, #d6cdb8 50%); border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); border-bottom-left-radius: 6px; }
.sheet i { display: block; height: 6px; margin-top: .55rem; border-radius: 3px; background: rgba(18, 18, 18, .16); }
.sheet i:nth-of-type(2n) { width: 78%; }
.sheet i:nth-of-type(3n) { width: 56%; }
.sheet-tag { display: inline-block; padding: .25rem .4rem; border-radius: 4px; background: var(--ink); color: #ffcc32; letter-spacing: .06em; }
.sheet-1 { left: 4%; top: 12%; transform: rotate(-9deg); }
.sheet-2 { left: 20%; top: 4%; transform: rotate(4deg); }
.sheet-3 { left: 34%; top: 16%; transform: rotate(-2deg); background: #fffdf7; }
.desk-art:hover .sheet-1 { transform: rotate(-14deg) translate(-12px, 6px); }
.desk-art:hover .sheet-2 { transform: rotate(7deg) translate(4px, -10px); }
.sheet-3 .sheet-tag { background: var(--gold); color: var(--ink); }

/* ---------- sections & tool cards ---------- */

.sec { padding-block: 3.5rem; }
@media (min-width: 1024px) { .sec { padding-block: 4.5rem; } }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2rem; }
.sec-kicker { display: flex; align-items: center; gap: .6rem; font: 600 .74rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--gold-text); }
.sec-kicker b { padding: .25rem .45rem; background: var(--gold); color: var(--ink); border-radius: 4px; }
.sec-head h2 { margin-top: .8rem; font: 800 clamp(1.7rem, 1.1rem + 2.4vw, 2.9rem)/1.05 var(--f-display); letter-spacing: -.04em; }
.sec-head p { max-width: 30rem; color: var(--muted); }

.tools { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.tool {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  min-height: 178px;
  padding: 1.15rem 1.15rem 1.2rem;
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
  background: var(--bg-2);
  text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s, background .2s;
}
.tool:hover { transform: translate(-3px, -3px); border-color: var(--gold); box-shadow: 6px 6px 0 var(--gold); background: var(--bg-3); }
.tool-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.tool-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 204, 50, .1); border: 1.5px solid rgba(255, 204, 50, .35); color: var(--gold-text); }
.tool-ico svg { width: 22px; height: 22px; }
.tool-ext { font: 600 .66rem/1 var(--f-mono); letter-spacing: .06em; color: var(--muted); padding: .3rem .45rem; border: 1px solid var(--line-2); border-radius: 4px; }
.tool h3 { font: 700 1.05rem/1.2 var(--f-display); letter-spacing: -.02em; }
.tool p { font-size: .9rem; line-height: 1.5; color: var(--muted); }
.tool-new { position: absolute; top: -9px; right: 14px; padding: .2rem .45rem; border-radius: 4px; background: var(--gold); color: var(--ink); font: 700 .6rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.empty-search { padding: 2rem; border: 1.5px dashed var(--line-2); border-radius: 12px; text-align: center; color: var(--muted); font-family: var(--f-mono); }

.privacy { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 900px) { .privacy { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.term { background: #0d0d0f; border: 1.5px solid var(--line-2); border-radius: 12px; box-shadow: 8px 8px 0 var(--gold); font: 500 .82rem/1.65 var(--f-mono); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: .4rem; padding: .6rem .8rem; border-bottom: 1px solid rgba(255, 255, 255, .1); color: #8b877d; font-size: .7rem; }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.term-bar i:nth-child(2) { background: var(--gold); }
.term-bar i:nth-child(3) { background: var(--ok); }
.term-bar span { margin-left: auto; }
.term pre { margin: 0; padding: 1rem; white-space: pre-wrap; color: #e9e5dc; }
.term pre b { color: #ffcc32; font-weight: 600; }
.term pre em { color: var(--ok); font-style: normal; }
.term pre s { color: #8b877d; text-decoration: none; }

/* ---------- tool page ---------- */

.page-head { position: relative; overflow: hidden; isolation: isolate; padding-block: 2.2rem 1.6rem; border-bottom: 1px solid var(--line); }
.crumb { font: 500 .76rem/1.4 var(--f-mono); color: var(--muted); }
.crumb a { color: var(--gold-text); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.page-head h1 { margin: .9rem 0 .5rem; font: 800 clamp(1.8rem, 1.2rem + 2.8vw, 3.2rem)/1.05 var(--f-display); letter-spacing: -.04em; }
.page-head p { max-width: 42rem; color: var(--muted); }
.page-head .tool-ext { display: inline-block; margin-left: .6rem; vertical-align: middle; }

.work { padding-block: 2rem 4rem; }
.panel { border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--bg-2); padding: 1.2rem; }
@media (min-width: 768px) { .panel { padding: 1.6rem; } }
.panel + .panel { margin-top: 1rem; }
.panel-title { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; font: 600 .74rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--gold-text); }
.panel-title b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--ink); font-size: .7rem; }

.drop {
  position: relative;
  display: grid;
  place-items: center;
  gap: .8rem;
  min-height: 220px;
  padding: 2rem 1rem;
  border: 2px dashed var(--line-2);
  border-radius: 14px;
  background:
    linear-gradient(rgba(255, 204, 50, .04) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(255, 204, 50, .04) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, transform .2s var(--ease);
}
.drop:hover, .drop.is-over { border-color: var(--gold); }
.drop.is-over { transform: scale(1.01); background-color: rgba(255, 204, 50, .05); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-ico { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 14px; background: var(--gold); color: var(--ink); box-shadow: 4px 4px 0 var(--shadow-c); }
.drop-ico svg { width: 28px; height: 28px; }
.drop strong { font: 700 1.1rem/1.3 var(--f-display); letter-spacing: -.02em; }
.drop small { font: 500 .76rem/1.5 var(--f-mono); color: var(--muted); }
.drop.is-compact { min-height: 0; padding: 1rem; grid-template-columns: auto 1fr; text-align: left; justify-items: start; }
.drop.is-compact .drop-ico { width: 40px; height: 40px; box-shadow: none; }
.drop.is-compact .drop-ico svg { width: 20px; height: 20px; }
.drop.is-compact strong { font-size: .92rem; }

.files { display: grid; gap: .5rem; margin-top: 1rem; }
.file {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .8rem;
  padding: .65rem .7rem;
  border: 1.5px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg);
}
.file.is-drag { opacity: .4; }
.file.is-target { border-color: var(--gold); }
.file-badge { width: 40px; height: 48px; display: grid; place-items: center; border-radius: 6px; background: var(--paper); color: var(--ink); font: 700 .6rem/1 var(--f-mono); text-transform: uppercase; overflow: hidden; }
.file-badge img, .file-badge canvas { width: 100%; height: 100%; object-fit: cover; }
.file-name { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font: 500 .72rem/1.3 var(--f-mono); color: var(--muted); }
.file-acts { display: flex; gap: .3rem; }
.mini {
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0 .5rem;
  border: 1.5px solid var(--line-2);
  border-radius: 7px;
  background: transparent;
  color: var(--fg);
  font: 600 .74rem/1 var(--f-mono);
  cursor: pointer;
}
.mini:hover { border-color: var(--gold); color: var(--gold-text); }
.mini svg { width: 15px; height: 15px; }
.mini.is-on { background: var(--gold); color: var(--ink); border-color: var(--gold); }

.opts { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.opt { display: grid; gap: .45rem; }
.opt.wide { grid-column: 1 / -1; }
.opt > span { font: 600 .7rem/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.opt small { font-size: .78rem; color: var(--dim); }
.opt input[type="text"], .opt input[type="number"], .opt input[type="password"], .opt input[type="date"], .opt input[type="email"], .opt select, .opt textarea {
  width: 100%;
  min-height: 46px;
  padding: .7rem .8rem;
  border: 1.5px solid var(--line-2);
  border-radius: var(--r);
  background: var(--bg);
  outline: none;
  transition: border-color .2s;
}
.opt textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.opt input:focus, .opt select:focus, .opt textarea:focus { border-color: var(--gold); }
.opt input[type="color"] { width: 100%; height: 46px; padding: 4px; border: 1.5px solid var(--line-2); border-radius: var(--r); background: var(--bg); }
.opt input[type="range"] { width: 100%; accent-color: var(--gold); }
.seg { display: flex; flex-wrap: wrap; gap: .35rem; }
.seg button { min-height: 40px; padding: .5rem .8rem; border: 1.5px solid var(--line-2); border-radius: 7px; background: transparent; font: 600 .8rem/1 var(--f-mono); cursor: pointer; }
.seg button:hover { border-color: var(--gold); }
.seg button.is-on { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.check { display: flex; align-items: center; gap: .6rem; cursor: pointer; font-size: .92rem; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: 1.3rem; }
.note { font: 500 .76rem/1.5 var(--f-mono); color: var(--muted); }
.note.is-err { color: var(--red); }

.result { display: grid; gap: 1rem; align-items: center; padding: 1.2rem; border: 2px solid var(--gold); border-radius: 14px; background: rgba(255, 204, 50, .06); box-shadow: 6px 6px 0 var(--gold); }
@media (min-width: 720px) { .result { grid-template-columns: auto 1fr auto; } }
.result-ico { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--ok); color: var(--ink); }
.result-ico svg { width: 26px; height: 26px; }
.result h3 { font: 700 1.1rem/1.3 var(--f-display); letter-spacing: -.02em; }
.result p { font: 500 .8rem/1.5 var(--f-mono); color: var(--muted); }
.result-acts { display: flex; flex-wrap: wrap; gap: .6rem; }

.progress { height: 10px; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; margin-top: 1rem; }
.progress span { display: block; height: 100%; width: 0; background: repeating-linear-gradient(-45deg, var(--gold) 0 8px, var(--amber) 8px 16px); transition: width .25s var(--ease); }

/* page thumbnails (organize, split, sign…) */
.pages { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); margin-top: 1rem; }
@media (min-width: 768px) { .pages { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
.pg { position: relative; display: grid; gap: .45rem; padding: .5rem; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--bg); cursor: grab; user-select: none; transition: border-color .15s, opacity .15s, transform .15s; }
.pg.is-drag { opacity: .35; }
.pg.is-target { border-color: var(--gold); transform: scale(1.03); }
.pg.is-off { opacity: .35; }
.pg.is-off .pg-sheet::after { content: "✕"; position: absolute; inset: 0; display: grid; place-items: center; font: 800 2.4rem/1 var(--f-display); color: var(--red); }
.pg.is-picked { border-color: var(--gold); box-shadow: 4px 4px 0 var(--gold); }
.pg-sheet { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1.35; background: #fff; border-radius: 4px; overflow: hidden; }
.pg-sheet canvas { max-width: 100%; max-height: 100%; transition: transform .25s var(--ease); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.pg-foot { display: flex; align-items: center; justify-content: space-between; gap: .3rem; font: 600 .72rem/1 var(--f-mono); color: var(--muted); }
.pg-foot .mini { min-width: 28px; height: 28px; padding: 0 .3rem; }

/* placement stage for signatures, text and stamps */
.stage-wrap { display: grid; gap: 1rem; }
@media (min-width: 980px) { .stage-wrap { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.stage-nav { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-bottom: .8rem; font: 600 .8rem/1 var(--f-mono); }
.stage { position: relative; margin-inline: auto; width: fit-content; max-width: 100%; background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); touch-action: none; }
.stage canvas { max-width: 100%; height: auto; }
.stamp { position: absolute; border: 1.5px dashed var(--gold); cursor: move; touch-action: none; }
.stamp img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.stamp span { display: block; white-space: nowrap; pointer-events: none; line-height: 1.1; font-family: "DejaVu", Arial, sans-serif; }
.stamp.is-picked { border-style: solid; box-shadow: 0 0 0 3px rgba(255, 204, 50, .35); }
.stamp-x { position: absolute; top: -12px; right: -12px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--red); color: #fff; font: 700 .8rem/1 var(--f-mono); cursor: pointer; }
.stamp-r { position: absolute; right: -10px; bottom: -10px; width: 20px; height: 20px; border-radius: 4px; background: var(--gold); border: 2px solid var(--ink); cursor: nwse-resize; touch-action: none; }
@media (pointer: coarse) { .stamp-r { width: 28px; height: 28px; right: -14px; bottom: -14px; } }
.size-bar { position: sticky; top: calc(var(--header) + 6px); z-index: 6; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .45rem .6rem; width: fit-content; max-width: 100%; margin: 0 auto .8rem; padding: .5rem .7rem; border: 2px solid var(--gold); border-radius: 12px; background: var(--bg-2); box-shadow: 4px 4px 0 var(--gold); font: 600 .8rem/1 var(--f-mono); }
.size-bar strong { color: var(--gold-text); max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.size-bar input[type="range"] { width: min(42vw, 180px); accent-color: var(--gold); }
.size-bar .mini { font-size: 1rem; }
.size-val { min-width: 3.2em; text-align: center; }
.sig-pad { width: 100%; height: 180px; border: 1.5px solid var(--line-2); border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }

/* text output, tables, preview frames */
.out { width: 100%; min-height: 260px; padding: 1rem; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--bg); color: var(--fg); font: 400 .92rem/1.6 var(--f-mono); resize: vertical; }
.table-wrap { overflow: auto; max-height: 520px; border: 1.5px solid var(--line-2); border-radius: 10px; }
.table-wrap table { border-collapse: collapse; font-size: .85rem; min-width: 100%; }
.table-wrap th, .table-wrap td { padding: .45rem .7rem; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: left; white-space: nowrap; }
.table-wrap th { position: sticky; top: 0; background: var(--bg-3); font: 600 .72rem/1.2 var(--f-mono); color: var(--gold-text); }
.tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .8rem; }
.doc-frame { width: 100%; min-height: 520px; border: 1.5px solid var(--line-2); border-radius: 10px; background: #fff; }
.thumbs { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin-top: 1rem; }
.thumbs figure { margin: 0; display: grid; gap: .35rem; padding: .45rem; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--bg); }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: contain; background: repeating-conic-gradient(#222 0 25%, #2c2c2c 0 50%) 0 0 / 16px 16px; border-radius: 6px; }
.thumbs figcaption { font: 500 .68rem/1.3 var(--f-mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* OCR */
.ocr-stage { cursor: crosshair; user-select: none; }
.ocr-crop { position: absolute; border: 2px solid var(--gold); background: rgba(255, 204, 50, .12); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35); pointer-events: none; }
.ocr-summary { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.ocr-conf { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; font: 800 1.05rem/1 var(--f-display); color: var(--ink); }
.ocr-conf.is-good { background: var(--ok); }
.ocr-conf.is-mid { background: var(--gold); }
.ocr-conf.is-low { background: var(--red); color: #fff; }
.ocr-weak { margin-bottom: 1rem; padding: .8rem 1rem; border: 1.5px dashed var(--line-2); border-radius: 10px; }
.ocr-weak summary { cursor: pointer; font: 600 .82rem/1.4 var(--f-mono); color: var(--gold-text); }
.ocr-weak .seg { margin-top: .6rem; }
.ocr-weak .seg button { min-height: 32px; font-size: .78rem; }

/* rich text editor */
.ed-bar { position: sticky; top: var(--header); z-index: 5; display: flex; flex-wrap: wrap; gap: .3rem; padding: .5rem; border: 1.5px solid var(--line-2); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--bg-3); }
.ed-bar select { min-height: 34px; padding: 0 .5rem; border: 1.5px solid var(--line-2); border-radius: 7px; background: var(--bg); font: 600 .74rem/1 var(--f-mono); }
.ed-sep { width: 1px; margin: 0 .2rem; background: var(--line-2); }
.ed-paper { padding: 1.2rem .6rem; border: 1.5px solid var(--line-2); border-radius: 0 0 12px 12px; background: #2a2a2e; overflow-x: auto; }
.ed-page {
  width: min(100%, 794px);
  min-height: 1000px;
  margin-inline: auto;
  padding: clamp(1.2rem, 5vw, 72px);
  background: #fff;
  color: #111;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
  font: 400 15px/1.6 "Manrope", Arial, sans-serif;
  outline: none;
  overflow-wrap: anywhere;
}
.ed-page h1 { font-size: 2em; line-height: 1.2; margin: .4em 0; }
.ed-page h2 { font-size: 1.5em; line-height: 1.25; margin: .5em 0; }
.ed-page h3 { font-size: 1.2em; margin: .6em 0; }
.ed-page p { margin: 0 0 .7em; }
.ed-page ul { list-style: disc; padding-left: 1.6em; margin: 0 0 .7em; }
.ed-page ol { list-style: decimal; padding-left: 1.6em; margin: 0 0 .7em; }
.ed-page table { border-collapse: collapse; width: 100%; margin: .6em 0; }
.ed-page td, .ed-page th { border: 1px solid #999; padding: .4em .6em; }
.ed-page a { color: #0b57d0; }
.ed-page blockquote { margin: .6em 0; padding-left: 1em; border-left: 3px solid #ccc; color: #444; }
.ed-page hr { border: 0; border-top: 1px solid #bbb; margin: 1.2em 0; }

/* invoice */
.inv-items { display: grid; gap: .5rem; }
.inv-row { display: grid; gap: .5rem; grid-template-columns: 1fr 70px 100px 34px; align-items: center; }
.inv-row input { min-height: 42px; padding: .55rem .6rem; border: 1.5px solid var(--line-2); border-radius: 7px; background: var(--bg); outline: none; width: 100%; }
.inv-row input:focus { border-color: var(--gold); }
.inv-total { display: grid; gap: .3rem; justify-items: end; margin-top: 1rem; font: 600 .9rem/1.4 var(--f-mono); }
.inv-total b { font: 800 1.5rem/1.2 var(--f-display); color: var(--gold-text); }
.qr-box { display: grid; place-items: center; padding: .8rem; background: #fff; border-radius: 10px; width: fit-content; }

/* ---------- footer ---------- */

.foot { margin-top: auto; border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.6rem; font: 500 .76rem/1.5 var(--f-mono); color: var(--muted); }
.foot a { color: var(--fg); text-decoration: none; }
.foot a:hover { color: var(--gold-text); }
.foot-links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }

.toast { position: fixed; left: 50%; bottom: 1.2rem; z-index: 90; transform: translateX(-50%); max-width: calc(100% - 2rem); padding: .8rem 1.1rem; border: 2px solid var(--ink); border-radius: var(--r); background: var(--gold); color: var(--ink); box-shadow: 4px 4px 0 var(--shadow-c); font: 600 .86rem/1.4 var(--f-body); animation: toast-in .3s var(--ease); }
.toast.is-err { background: var(--red); color: #fff; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .55); } 80%, 100% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); } }
@keyframes trace { 0% { stroke-dashoffset: 900; opacity: 1; } 70% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes glyph { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
.reveal { animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

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

@media print {
  #nav-root, .foot, .page-head, .actions, .ed-bar { display: none !important; }
}
/* ======================= DS Biro additions ======================= */

.hero-biro { padding-block: 3rem 1.5rem; }
@media (min-width: 1024px) { .hero-biro { padding-block: 4.5rem 2rem; } }
.hero-biro h1 { max-width: 16ch; }
.dash { padding-top: 1rem; }

.setup { display: grid; gap: 1rem; align-items: center; margin-bottom: 1.4rem; padding: 1.3rem 1.4rem; border: 2px solid var(--ink); border-radius: 14px; background: var(--gold); color: var(--ink); }
@media (min-width: 760px) { .setup { grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.4rem; } }
.setup-no { font: 800 1.6rem/1 var(--f-display); }
.setup h2 { font: 800 1.15rem/1.2 var(--f-display); letter-spacing: -.02em; }
.setup p { font-weight: 600; margin-top: .25rem; }
.btn-ink { background: var(--ink); color: #ffcc32; border-color: var(--ink); box-shadow: 4px 4px 0 rgba(18, 18, 18, .28); }
.btn-ink:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(18, 18, 18, .28); }

.stats { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); margin: 1rem 0; }
@media (max-width: 420px) { .stat { padding: .8rem .85rem; } .stat-value { font-size: 1.05rem; } }
.stat { display: grid; gap: .3rem; padding: 1rem 1.1rem; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--bg-2); text-decoration: none; transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s; }
a.stat:hover { transform: translate(-2px, -2px); border-color: var(--gold); box-shadow: 5px 5px 0 var(--gold); }
.stat-label { font: 600 .68rem/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.stat-value { font: 800 clamp(1.25rem, 1rem + 1vw, 1.7rem)/1.1 var(--f-display); letter-spacing: -.03em; white-space: nowrap; }
.stat-sub { font: 500 .74rem/1.3 var(--f-mono); color: var(--muted); }

.quick { margin-top: 1.4rem; padding: 1.2rem; border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--bg-2); }
.quick-row { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); margin-top: .9rem; }
@media (max-width: 420px) { .quick-btn { min-height: 48px; padding: .6rem .7rem; font-size: .84rem; } }
.quick-btn { display: flex; align-items: center; gap: .6rem; min-height: 54px; padding: .8rem 1rem; border: 2px solid var(--ink); border-radius: 10px; background: var(--gold); color: var(--ink); font: 700 .92rem/1.2 var(--f-body); text-decoration: none; box-shadow: 3px 3px 0 var(--shadow-c); transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.quick-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--shadow-c); }
.quick-btn svg { width: 20px; height: 20px; flex: none; }
.recent { margin-top: 1.2rem; display: grid; gap: .3rem; }
.recent-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .3rem; font: 600 .78rem/1 var(--f-mono); }
.recent-head a { color: var(--gold-text); text-decoration: none; }
.recent-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .55rem .7rem; border-radius: 8px; text-decoration: none; font-size: .9rem; }
.recent-row:hover { background: var(--bg-3); }
.recent-no { font: 600 .82rem/1 var(--f-mono); }
.recent-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.recent-sum { font: 700 .88rem/1 var(--f-mono); }
.recent-st { display: none; }
@media (min-width: 640px) { .recent-row { grid-template-columns: auto auto minmax(0, 1fr) auto auto; } .recent-st { display: inline; font: 600 .7rem/1 var(--f-mono); } .recent-st.is-paid { color: var(--ok); } .recent-st.is-open { color: var(--gold-text); } }
.nag { display: block; margin-top: 1rem; padding: .7rem .9rem; border: 1.5px dashed var(--gold); border-radius: 10px; font: 600 .82rem/1.4 var(--f-mono); color: var(--gold-text); text-decoration: none; }

.doc-type { display: inline-grid; place-items: center; min-width: 38px; padding: .22rem .4rem; border-radius: 5px; font: 700 .62rem/1 var(--f-mono); letter-spacing: .06em; background: var(--gold); color: var(--ink); }
.doc-type.t-pro { background: #6ea8fe; }
.doc-type.t-quote { background: var(--ok); }
.doc-type.t-note { background: #c9c3b5; }
.doc-status { padding: .3rem .55rem; border-radius: 999px; border: 1.5px solid currentColor; background: transparent; font: 600 .7rem/1 var(--f-mono); cursor: pointer; white-space: nowrap; }
.doc-status.is-paid { color: var(--ok); }
.doc-status.is-open { color: var(--gold-text); }
.doc-status.is-late { color: var(--red); }
.dl-date { font: 600 .82rem/1 var(--f-mono); }
.dl-date.is-late { color: var(--red); }
.dl-date.is-soon { color: var(--gold-text); }

/* lists: a real table on wide screens, stacked cards on phones */
.crud-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.crud-tools input, .crud-tools select { min-height: 42px; padding: .55rem .75rem; border: 1.5px solid var(--line-2); border-radius: var(--r); background: var(--bg); outline: none; max-width: 100%; }
.crud-tools input[type="search"] { flex: 1 1 200px; }
.crud-tools input:focus, .crud-tools select:focus { border-color: var(--gold); }
.crud-scroll { overflow-x: auto; }
.crud-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.crud-table th { padding: .55rem .6rem; border-bottom: 2px solid var(--line-2); font: 600 .66rem/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: left; white-space: nowrap; }
.crud-table td { padding: .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.crud-table td.num, .crud-table th.num { text-align: right; font-family: var(--f-mono); white-space: nowrap; }
.crud-table td.strong { font-weight: 700; }
.crud-table tr.is-total td { border-top: 2px solid var(--gold); border-bottom: 0; }
.crud-acts { white-space: nowrap; text-align: right; }
.crud-acts .mini { margin-left: .2rem; }
@media (max-width: 720px) {
  .crud-table, .crud-table tbody, .crud-table tr, .crud-table td { display: block; width: 100%; }
  .crud-table tr:first-child:has(th) { display: none; }
  .crud-table tr { margin-bottom: .7rem; padding: .7rem .8rem; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--bg); }
  .crud-table td { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border: 0; text-align: right; }
  .crud-table td::before { content: attr(data-label); font: 600 .66rem/1.6 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: left; }
  .crud-table td:not([data-label])::before { content: none; }
  .crud-table td.crud-acts { justify-content: flex-end; flex-wrap: wrap; padding-top: .6rem; border-top: 1px solid var(--line); margin-top: .3rem; }
}

/* document item rows */
.doc-items { display: grid; gap: .45rem; margin: .8rem 0; }
.doc-row { display: grid; gap: .4rem; align-items: center; grid-template-columns: minmax(0, 1fr) 64px 86px 96px 62px 100px 34px; }
.doc-row.has-vat { grid-template-columns: minmax(0, 1fr) 64px 86px 96px 62px 70px 100px 34px; }
.doc-row.no-price { grid-template-columns: minmax(0, 1fr) 80px 100px 34px; }
.doc-row input, .doc-row select { width: 100%; min-height: 42px; padding: .5rem .55rem; border: 1.5px solid var(--line-2); border-radius: 7px; background: var(--bg); outline: none; font-size: .9rem; }
.doc-row input:focus, .doc-row select:focus { border-color: var(--gold); }
.doc-head span { font: 600 .64rem/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.doc-sum { font: 700 .86rem/1 var(--f-mono); text-align: right; white-space: nowrap; }
@media (max-width: 860px) {
  .doc-head { display: none; }
  .doc-row, .doc-row.has-vat, .doc-row.no-price { grid-template-columns: repeat(6, minmax(0, 1fr)); padding: .7rem; border: 1.5px solid var(--line-2); border-radius: 12px; }
  .doc-row > :first-child { grid-column: 1 / -1; }
  .doc-row > :nth-child(2), .doc-row > :nth-child(3), .doc-row > :nth-child(4), .doc-row > :nth-child(5) { grid-column: span 3; }
  .doc-row.has-vat > :nth-child(6) { grid-column: span 2; }
  .doc-row .doc-sum { grid-column: span 3; text-align: left; font-size: 1rem; }
  .doc-row.has-vat .doc-sum { grid-column: span 3; }
  .doc-row > .mini { grid-column: -2 / -1; justify-self: end; }
}
.inv-total small { max-width: 32rem; text-align: right; font: 500 .74rem/1.4 var(--f-mono); color: var(--muted); }
.logo-box { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; margin-top: 1rem; }
.logo-box img { max-height: 70px; max-width: 200px; padding: .4rem; border-radius: 8px; background: #fff; }

/* calculators */
.calc-out { display: grid; margin-top: 1.2rem; border: 1.5px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.calc-out:empty { display: none; }
.calc-out > .note { padding: 1rem; }
.calc-row { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); font-size: .92rem; }
.calc-row:last-child { border-bottom: 0; }
.calc-row span { color: var(--muted); }
.calc-row strong { font-family: var(--f-mono); white-space: nowrap; text-align: right; }
.calc-row.is-total { background: var(--gold); color: var(--ink); }
.calc-row.is-total span { color: var(--ink); font-weight: 700; }
.calc-row.is-total strong { font: 800 1.15rem/1.2 var(--f-display); }
@media (max-width: 480px) { .calc-row { flex-wrap: wrap; } .calc-row strong { white-space: normal; } }

.limit-bar { margin: 1rem 0; }
.limit-track { height: 14px; border: 1.5px solid var(--line-2); border-radius: 999px; overflow: hidden; margin-top: .4rem; }
.limit-track span { display: block; height: 100%; background: var(--ok); }
.limit-track span.is-amber { background: var(--gold); }
.limit-track span.is-red { background: var(--red); }
.chart-bars { display: flex; align-items: end; gap: 3px; height: 120px; margin: 1rem 0; padding: .6rem; border: 1.5px solid var(--line-2); border-radius: 12px; }
.chart-bar { flex: 1; min-width: 3px; background: var(--line-2); border-radius: 3px 3px 0 0; }
.chart-bar.is-on { background: var(--gold); }

/* phones: amounts stay on one line */
@media (max-width: 420px) { .stat { padding: .8rem .85rem; } .stat .stat-value { font-size: 1rem; letter-spacing: -.02em; } }
