
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/assets/fonts/inter-latin-var.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 500; font-display: swap; src: url("/assets/fonts/barlow-semi-condensed-latin-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url("/assets/fonts/barlow-semi-condensed-latin-600.woff2") format("woff2"); }

:root {
  --bg: #141518;
  --bg-deep: #0f1012;
  --line: rgba(236, 233, 222, 0.075);
  --line-strong: rgba(236, 233, 222, 0.14);
  --line-hard: rgba(236, 233, 222, 0.24);
  --text: #ecebe4;
  --muted: #a8a59b;
  --dim: #7a776f;
  --amber: #f2b318;
  --amber-hi: #ffc535;
  --amber-text: #f7cc5c;
  --amber-soft: rgba(242, 179, 24, 0.10);
  --amber-line: rgba(242, 179, 24, 0.45);
  --ink: #1f2125;
  --paper: #efede6;
  --ok: #3fb97a;   --ok-text: #8edcb1;   --ok-soft: rgba(63, 185, 122, 0.11);  --ok-line: rgba(63, 185, 122, 0.40);
  --warn: #f07d3a; --warn-text: #ffb185; --warn-soft: rgba(240, 125, 58, 0.11); --warn-line: rgba(240, 125, 58, 0.42);
  --bad: #e5534b;  --bad-text: #ffa29b;  --bad-soft: rgba(229, 83, 75, 0.12);  --bad-line: rgba(229, 83, 75, 0.48);
  --info: #6fa8d6; --info-text: #b4d4ef; --info-soft: rgba(111, 168, 214, 0.11); --info-line: rgba(111, 168, 214, 0.42);
  --g-bar: linear-gradient(180deg, #17181b 0%, #0f1012 100%);
  --g-surface: linear-gradient(180deg, #212327 0%, #1c1e22 100%);
  --g-raised: linear-gradient(180deg, #2b2d32 0%, #232529 100%);
  --g-sunken: linear-gradient(180deg, #0e0f11 0%, #131416 100%);
  --g-amber: linear-gradient(180deg, #f9c537 0%, #f2b318 52%, #e4a60f 100%);
  --sheen: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 130ms;
  --r: 4px;
  --r-sm: 3px;
  --c: 10px;
  --sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --display: "Bahnschrift", "Barlow Semi Condensed", "DIN Alternate", "Segoe UI", sans-serif;
  --top: 56px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--text);
  background: radial-gradient(1200px 520px at 80% -8%, rgba(242, 179, 24, 0.06), rgba(242, 179, 24, 0) 62%), var(--bg);
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; min-height: 100vh;
}
::selection { background: rgba(242, 179, 24, 0.32); color: var(--paper); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
a { color: inherit; }
b, strong { font-weight: 600; color: var(--paper); }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.paper { color: var(--paper); }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--dim); }

/* ---------- frame ---------- */
.frame { min-height: 100vh; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 0 20px; background: var(--g-bar); border-bottom: 1px solid var(--line-strong);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.mark { width: 26px; height: 26px; flex: none; }
.wordmark { font-family: var(--display); font-size: 20px; letter-spacing: 0.01em; color: var(--paper); line-height: 1; }
.wordmark b { font-weight: 600; }
.wordmark span { color: var(--amber); font-weight: 600; }
.brand-tag {
  --c: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink);
  background: var(--amber); padding: 3px 8px 3px 9px; line-height: 1.3;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.top-r { display: flex; align-items: center; gap: 12px; min-width: 0; }
.top-acc { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--muted); font-size: 13px; padding: 6px 10px; border-radius: var(--r); border: 1px solid transparent; min-width: 0; }
.top-acc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.top-acc:hover { color: var(--paper); border-color: var(--line-strong); }
.top-acc .i { width: 16px; height: 16px; }

.shell { flex: 1; width: 100%; max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 228px minmax(0, 1fr); }
.side { position: sticky; top: var(--top); align-self: start; height: calc(100vh - var(--top)); display: flex; flex-direction: column; padding: 20px 14px; border-right: 1px solid var(--line); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-a { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r); text-decoration: none; color: var(--muted); font-weight: 500; border: 1px solid transparent; transition: color var(--t-fast), background-color var(--t-fast); }
.nav-a .i { width: 17px; height: 17px; }
.nav-a:hover { color: var(--paper); background: rgba(236, 233, 222, 0.04); }
.nav-a.on { color: var(--paper); background: var(--g-raised); border-color: var(--line-strong); box-shadow: var(--sheen); }
.nav-a.on::before { content: ""; position: absolute; left: -15px; top: 8px; bottom: 8px; width: 3px; background: var(--amber); }
.nav-a.on .i { color: var(--amber); }
.nav-t { flex: 1; }
.nav-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--amber); color: var(--ink); }
.nav-n-bad { background: var(--bad); color: #fff; }
.nav-n-warn { background: var(--warn); color: var(--ink); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.side-bal { --c: 8px; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; text-decoration: none; background: var(--g-sunken); border: 1px solid var(--line-strong);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c)); }
.side-bal-k { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.side-bal-v { font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--paper); }
.side-bal:hover .side-bal-v { color: var(--amber-text); }
.side-out { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: var(--dim); padding: 8px 12px; cursor: pointer; border-radius: var(--r); font-size: 13px; }
.side-out:hover { color: var(--paper); background: rgba(236, 233, 222, 0.04); }
.side-out .i { width: 16px; height: 16px; }

.main { min-width: 0; padding: 30px 36px 80px; }
.page { max-width: 1080px; display: flex; flex-direction: column; gap: 18px; }
.page-narrow { max-width: 720px; }
.page-ed { max-width: 1240px; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 30px 4px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-hard); border-top-color: var(--amber); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.foot { border-top: 1px solid var(--line); padding: 18px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--dim); font-size: 12px; }
.foot a { color: var(--muted); text-underline-offset: 2px; }
.foot a:hover { color: var(--paper); }
.foot-links { display: flex; gap: 18px; }

/* ---------- type ---------- */
.kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; color: var(--paper); letter-spacing: 0.005em; }
h1 { font-size: 30px; line-height: 1.12; }
h2 { font-size: 18px; line-height: 1.25; }
h3 { font-size: 15.5px; line-height: 1.3; }
.lead { color: var(--muted); font-size: 15px; max-width: 64ch; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 4px; }
.ph-l { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ph-l h1 { overflow-wrap: anywhere; }
.ph-r { display: flex; gap: 8px; flex-wrap: wrap; }
.fine { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--dim); line-height: 1.5; }
.fine .i { width: 15px; height: 15px; margin-top: 2px; color: var(--dim); }

/* ---------- buttons ---------- */
.btn {
  --c: 7px; position: relative; height: 36px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-strong); background: var(--g-raised); box-shadow: var(--sheen); color: var(--text); border-radius: var(--r-sm);
  font-family: var(--sans); font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; cursor: pointer; flex-shrink: 0;
  transition: border-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), transform 70ms var(--ease-out);
}
.btn .i { width: 16px; height: 16px; }
.btn .i-end { transition: transform 200ms var(--ease-out); }
.btn:hover:not(:disabled) .i-end { transform: translateX(3px); }
.btn:hover:not(:disabled) { border-color: var(--line-hard); box-shadow: var(--sheen), inset 0 0 0 99px rgba(255, 255, 255, 0.045); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.is-busy { cursor: progress; opacity: 0.75; }
.btn.is-busy::after { content: ""; width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
.btn.is-busy .i-end { display: none; }
.btn-solid { background: var(--g-amber); border-color: transparent; color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c)); }
.btn-solid:hover:not(:disabled) { border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 0 0 99px rgba(255, 255, 255, 0.12); }
.btn-solid:disabled { opacity: 0.4; }
.btn-line { background: rgba(236, 233, 222, 0.02); border-color: var(--line-hard); box-shadow: none; }
.btn-line:hover:not(:disabled) { border-color: var(--amber-line); color: var(--paper); box-shadow: inset 0 0 0 99px rgba(242, 179, 24, 0.07); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { color: var(--paper); border-color: var(--line); background: rgba(236, 233, 222, 0.05); box-shadow: none; }
.btn-danger { background: linear-gradient(180deg, #ec6159, #d9473f); border-color: #d9473f; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.btn-danger:hover:not(:disabled) { border-color: #e5534b; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 99px rgba(255, 255, 255, 0.1); }
.btn-sm { height: 31px; padding: 0 11px; font-size: 12.5px; gap: 6px; }
.btn-sm .i { width: 14px; height: 14px; }
.btn-lg { --c: 9px; height: 46px; padding: 0 22px; font-size: 14.5px; gap: 10px; }
.btn-wide { width: 100%; }
.btn-del { color: var(--bad-text); }
.btn-del:hover:not(:disabled) { color: var(--bad-text); border-color: var(--bad-line); background: var(--bad-soft); }

/* ---------- surfaces ---------- */
.card { background: var(--g-surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--sheen); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--g-surface); border: 1px solid var(--line-strong); border-radius: var(--r); text-decoration: none; min-width: 0; box-shadow: var(--sheen); }
a.tile { transition: border-color var(--t-fast); }
a.tile:hover { border-color: var(--line-hard); }
.tile-k { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--muted); }
.tile-k .i { width: 15px; height: 15px; color: var(--amber); }
.tile-v { font-family: var(--display); font-size: 28px; font-weight: 600; color: var(--paper); line-height: 1.15; overflow-wrap: anywhere; }
.tile-s { font-size: 12px; color: var(--dim); }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 26px 12px; color: var(--muted); }
.empty-ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(236, 233, 222, 0.04); border: 1px solid var(--line-strong); color: var(--dim); }
.rows { display: flex; flex-direction: column; }
.rows li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 2px; text-decoration: none; min-width: 0; }
.row:hover .row-t > span:first-child, .row:hover .row-t { color: var(--paper); }
.row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; color: var(--text); font-weight: 500; }
.row-t span, .row-t { white-space: nowrap; text-overflow: ellipsis; }
.row-t small { color: var(--dim); font-size: 12px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; }

/* chips, badges */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 8px; border-radius: 3px; font-size: 11.5px; font-weight: 600; white-space: nowrap; border: 1px solid; flex: none; }
.chip .i { width: 12px; height: 12px; stroke-width: 2.4; }
.chip-ok { color: var(--ok-text); border-color: var(--ok-line); background: var(--ok-soft); }
.chip-warn { color: var(--warn-text); border-color: var(--warn-line); background: var(--warn-soft); }
.chip-bad { color: var(--bad-text); border-color: var(--bad-line); background: var(--bad-soft); }
.chip-info { color: var(--info-text); border-color: var(--info-line); background: var(--info-soft); }
.chip-amber { color: var(--amber-text); border-color: var(--amber-line); background: var(--amber-soft); }
.chip-mute { color: var(--muted); border-color: var(--line-hard); background: rgba(236, 233, 222, 0.03); }
.fmt { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; flex: none; }
.fmt .i { width: 13px; height: 13px; }

/* notes, status */
.note { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: var(--r); border: 1px solid; border-left-width: 3px; }
.note > .i { width: 18px; height: 18px; margin-top: 1px; }
.note-in { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.note-in .btn { align-self: flex-start; margin-top: 6px; }
.note-t { font-weight: 600; color: var(--paper); }
.note-x { color: var(--muted); font-size: 13px; }
.note-bad { border-color: var(--bad-line); background: var(--bad-soft); } .note-bad > .i { color: var(--bad-text); }
.note-warn { border-color: var(--warn-line); background: var(--warn-soft); } .note-warn > .i { color: var(--warn-text); }
.note-info { border-color: var(--info-line); background: var(--info-soft); } .note-info > .i { color: var(--info-text); }
.note-ok { border-color: var(--ok-line); background: var(--ok-soft); } .note-ok > .i { color: var(--ok-text); }
.status { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r); background: var(--g-surface); border: 1px solid var(--line-strong); border-left: 4px solid var(--tone, var(--line-hard)); }
.status > .i { width: 20px; height: 20px; color: var(--tone-text, var(--muted)); margin-top: 1px; }
.status-b { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.status-t { font-weight: 600; color: var(--paper); font-size: 14.5px; }
.status-x { color: var(--muted); font-size: 13px; }
.status-reason { margin-top: 8px; padding: 10px 12px; background: rgba(0, 0, 0, 0.22); border-radius: var(--r-sm); color: var(--text); font-size: 13px; overflow-wrap: anywhere; }
.status-ok { --tone: var(--ok); --tone-text: var(--ok-text); }
.status-warn { --tone: var(--warn); --tone-text: var(--warn-text); }
.status-bad { --tone: var(--bad); --tone-text: var(--bad-text); }
.status-info { --tone: var(--info); --tone-text: var(--info-text); }
.status-amber { --tone: var(--amber); --tone-text: var(--amber-text); }
.status-mute { --tone: var(--line-hard); }
.status-wait > .spin { width: 20px; height: 20px; margin-top: 1px; }

/* ---------- forms ---------- */
.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.f-label { font-size: 13px; font-weight: 600; color: var(--text); }
.f-opt { margin-left: 6px; font-weight: 400; color: var(--dim); font-size: 12px; }
.f-count { font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.f-count.over { color: var(--bad-text); font-weight: 600; }
.f-hint { font-size: 12px; color: var(--dim); line-height: 1.45; }
.f-err { font-size: 12.5px; color: var(--bad-text); font-weight: 500; }
.in {
  width: 100%; height: 40px; padding: 0 12px; background: var(--g-sunken); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  color: var(--paper); font-size: 14px; transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.in::placeholder { color: #5d5b55; }
.in:hover { border-color: var(--line-hard); }
.in:focus { border-color: var(--amber-line); box-shadow: 0 0 0 3px rgba(242, 179, 24, 0.12); }
.in:disabled { opacity: 0.45; }
.has-err .in, .in[aria-invalid="true"] { border-color: var(--bad-line); }
.in-lg { height: 48px; font-size: 16px; }
.in-area { height: auto; min-height: 64px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.in-code { font-family: var(--display); font-size: 26px; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }
.in-sel { width: auto; min-width: 200px; max-width: 100%; height: 36px; appearance: none; padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%), var(--g-sunken);
  background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px, 0 0; background-size: 5px 5px, 5px 5px, 100% 100%; background-repeat: no-repeat; }
.in-num { width: 110px; text-align: center; font-family: var(--display); font-size: 18px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.in-num::-webkit-outer-spin-button, .in-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.in-date { width: auto; height: 34px; color-scheme: dark; }
.form-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--g-sunken); border: 1px solid var(--line-strong); border-radius: var(--r); flex: none; }
.seg button { border: 0; background: none; color: var(--muted); padding: 6px 12px; border-radius: var(--r-sm); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--paper); }
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: var(--g-raised); color: var(--paper); box-shadow: var(--sheen), 0 0 0 1px var(--line-hard); }
.seg-lang button { padding: 5px 10px; font-size: 12px; letter-spacing: 0.04em; }
.seg-wide { display: flex; }
.seg-wide button { flex: 1; padding: 9px 12px; font-size: 13px; }
.seg-wide button[aria-checked="true"] { box-shadow: var(--sheen), 0 0 0 1px var(--amber-line); color: var(--amber-text); }
.seg-sm button { padding: 4px 9px; font-size: 11.5px; }

/* option cards (radio) */
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opt { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--r); background: rgba(236, 233, 222, 0.02); cursor: pointer; transition: border-color var(--t-fast), background-color var(--t-fast); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:hover { border-color: var(--line-hard); }
.opt:has(input:checked) { border-color: var(--amber); background: var(--amber-soft); box-shadow: inset 0 0 0 1px var(--amber-line); }
.opt:has(input:focus-visible) { outline: 2px solid var(--amber); outline-offset: 2px; }
.opt:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.opt-ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--g-raised); border: 1px solid var(--line-strong); color: var(--muted); }
.opt:has(input:checked) .opt-ic { color: var(--ink); background: var(--g-amber); border-color: transparent; }
.opt-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.opt-t b { font-size: 14px; }
.opt-t small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }

.radio { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 500; flex-wrap: wrap; }
.radio input[type="radio"] { width: 17px; height: 17px; accent-color: var(--amber); }

/* switch */
.sw { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; padding: 4px 0; }
.sw-in { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw-ui { position: relative; width: 38px; height: 22px; flex: none; border-radius: 11px; background: var(--g-sunken); border: 1px solid var(--line-hard); transition: background-color var(--t-fast); margin-top: 1px; }
.sw-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform 160ms var(--ease-out), background-color var(--t-fast); }
.sw-in:checked + .sw-ui { background: var(--amber); border-color: var(--amber); }
.sw-in:checked + .sw-ui::after { transform: translateX(16px); background: var(--ink); }
.sw-in:focus-visible + .sw-ui { outline: 2px solid var(--amber); outline-offset: 2px; }
.sw-t { display: flex; flex-direction: column; gap: 2px; }
.sw-t small { color: var(--muted); font-size: 12.5px; }
.sw-sm .sw-t b { font-size: 13px; }

/* ---------- sign in ---------- */
.frame-login .top { position: static; }
.login { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 56px 28px 64px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 460px); gap: 56px; align-items: center; }
.login-side { display: flex; flex-direction: column; gap: 14px; }
.login-h { font-size: 46px; line-height: 1.04; max-width: 14ch; }
.login-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.login-steps li { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(236, 233, 222, 0.02); }
.ls-n { font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--amber); padding-top: 1px; }
.login-steps b { font-size: 14px; }
.login-steps p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.login-card { --c: 14px; position: relative; background: linear-gradient(180deg, #2a2c31 0%, #212327 100%); border: 1px solid var(--line-hard); border-top: 3px solid var(--amber); border-radius: var(--r); padding: 30px 30px 26px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45); }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form h2 { font-size: 24px; }
.login-small { font-size: 12px; color: var(--dim); text-align: center; }
.login-row { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.dev { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed var(--amber-line); border-radius: var(--r-sm); background: var(--amber-soft); color: var(--amber-text); font-size: 13px; }
.dev .i { width: 15px; height: 15px; }
.dev b { font-family: var(--display); font-size: 17px; letter-spacing: 0.14em; color: var(--paper); }

/* email step */
.card-email { border-color: var(--amber-line); background: linear-gradient(180deg, rgba(242, 179, 24, 0.07), rgba(242, 179, 24, 0.015)), var(--g-surface); }
.ce-head { display: flex; gap: 14px; align-items: flex-start; }
.ce-head h2 { font-size: 17px; margin-bottom: 3px; }
.ce-ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; background: var(--g-amber); color: var(--ink); clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); }
.ef-form { display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
.ef-row { display: flex; gap: 8px; flex-wrap: wrap; }
.card-email.compact { padding: 16px; gap: 12px; }
.card-email.compact .ce-head h2 { font-size: 15px; }
.card-email.compact .ce-ic { width: 32px; height: 32px; }

/* ---------- overview ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: s; }
.step { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: rgba(236, 233, 222, 0.015); }
.step-n { width: 28px; height: 28px; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 14px; border-radius: 50%; border: 1px solid var(--line-hard); color: var(--muted); }
.step-n .i { width: 15px; height: 15px; stroke-width: 2.6; }
.step-b { display: flex; flex-direction: column; gap: 4px; }
.step-b p { color: var(--muted); font-size: 12.5px; }
.step-b .btn, .step-b .chip { align-self: flex-start; margin-top: 6px; }
.step-done .step-n { background: var(--ok); border-color: var(--ok); color: var(--ink); }
.step-done h3 { color: var(--muted); }
.step-now { border-color: var(--amber-line); background: var(--amber-soft); }
.step-now .step-n { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.step-wait .step-n { border-color: var(--info-line); color: var(--info-text); }
.step-todo { opacity: 0.62; }

/* ---------- ads list ---------- */
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.ac { display: flex; flex-direction: column; background: var(--g-surface); border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; box-shadow: var(--sheen); min-width: 0; }
.ac-pv { display: block; padding: 16px; background: linear-gradient(180deg, #17181b 0%, #131416 100%); border-bottom: 1px solid var(--line); text-decoration: none; }
.ac-pv:hover .mini { border-color: var(--line-hard); }
.ac-b { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.ac-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ac-t { font-size: 16px; overflow-wrap: anywhere; }
.ac-meta { font-size: 12px; color: var(--dim); }
.ac-reason { font-size: 12.5px; color: var(--bad-text); background: var(--bad-soft); border-radius: var(--r-sm); padding: 8px 10px; overflow-wrap: anywhere; }
.ac-reason b { color: var(--bad-text); }
.ac-note { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.ac-note .i { width: 14px; height: 14px; }
.ac-act { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.mini { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--line-hard); border-left: 4px solid var(--amber); border-radius: var(--r); background: linear-gradient(180deg, #2a2c31 0%, #232529 100%); min-width: 0; font-size: 13px; transition: border-color var(--t-fast); }
.mini-logo { width: 34px; height: 34px; border-radius: 7px; object-fit: contain; flex: none; }
.mini-t { flex: 1; min-width: 0; }
.mini-t p { display: flex; align-items: center; gap: 7px; min-width: 0; }
.mini-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-b { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block !important; }
.mini-btn { flex: none; font-size: 11.5px; font-weight: 600; color: var(--amber-text); border: 1px solid var(--amber-line); background: var(--amber-soft); border-radius: 3px; padding: 4px 8px; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-hero-empty { padding: 0; overflow: hidden; }
.he { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; }
.he-t { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding: 32px; }
.he-t h2 { font-size: 24px; }
.he-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.he-pv { padding: 28px; background: repeating-linear-gradient(-45deg, rgba(242, 179, 24, 0.05) 0 12px, transparent 12px 24px), var(--bg-deep); border-left: 1px solid var(--line); height: 100%; display: flex; align-items: center; }
.he-pv .pv-win { width: 100%; }

/* ---------- editor ---------- */
.ed { display: grid; grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.18fr); gap: 24px; align-items: start; }
.ed-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ed-form { display: flex; flex-direction: column; gap: 14px; }
.ed-sec { background: var(--g-surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--sheen); }
.ed-sec-h { display: flex; gap: 12px; align-items: flex-start; }
.ed-sec-h h2 { font-size: 16.5px; }
.ed-sec-h p { margin-top: 2px; }
.ed-n { width: 24px; height: 24px; flex: none; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--ink); background: var(--amber); clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px); margin-top: 1px; }
.ed-texts { display: flex; flex-direction: column; gap: 14px; }
.ed-lang { border: 0; display: flex; flex-direction: column; gap: 12px; }
.ed-lang + .ed-lang { padding-top: 14px; border-top: 1px dashed var(--line-hard); }
.ed-lang legend { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); margin-bottom: 10px; }
.ed-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 12px 14px; margin: 0 -2px; background: rgba(20, 21, 24, 0.92); backdrop-filter: blur(6px); border: 1px solid var(--line-strong); border-radius: var(--r); flex-wrap: wrap; }
.ed-bar .sp { flex: 1; }
.ed-err:empty { display: none; }
.ed-pv { position: sticky; top: calc(var(--top) + 20px); min-width: 0; }
.ed-pv-in { display: flex; flex-direction: column; gap: 12px; }
.ed-pv-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.pv-stage { padding: 18px; border-radius: var(--r); border: 1px solid var(--line); background: repeating-linear-gradient(-45deg, rgba(242, 179, 24, 0.045) 0 12px, transparent 12px 24px), var(--bg-deep); }
.pv-how { font-size: 12.5px; color: var(--dim); flex: 1; }
.pv-foot { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.pv-stage .pv-win { margin: 0 auto; }
.dlg.dlg-wide { width: min(860px, 100%); max-height: calc(100vh - 40px); overflow: auto; }
.pv-real-box { overflow-x: auto; margin: 0 -4px 18px; padding: 4px; }
.pv-win.pv-real { width: 790px; max-width: none; flex: none; }

/* uploads */
.up { border: 1px dashed var(--line-hard); border-radius: var(--r); background: rgba(0, 0, 0, 0.16); transition: border-color var(--t-fast), background-color var(--t-fast); }
.up.drag { border-color: var(--amber); background: var(--amber-soft); }
.up.has-err { border-color: var(--bad-line); }
.up .f-err { padding: 0 14px 12px; }
.up-in { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.up-drop { display: flex; align-items: center; gap: 14px; padding: 14px; cursor: pointer; }
.up-drop:hover .up-ic, .up-drop:focus-within .up-ic { color: var(--amber); border-color: var(--amber-line); }
.up-drop:focus-within { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: var(--r); }
.up-ic { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--g-raised); color: var(--muted); }
.up-drop-t { display: flex; flex-direction: column; gap: 2px; }
.up-drop-t b { color: var(--amber-text); }
.up-drop-t small { color: var(--dim); font-size: 12px; }
.up-has { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.up-th { width: 48px; height: 48px; flex: none; object-fit: contain; border-radius: 8px; background: repeating-conic-gradient(#2a2c31 0 25%, #222428 0 50%) 0 0 / 12px 12px; }
.up-th-v { display: grid; place-items: center; color: var(--amber); background: var(--g-raised); border: 1px solid var(--line-strong); }
.up-has-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.up-ok { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--paper); overflow: hidden; }
.up-ok span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-ok .i { width: 15px; height: 15px; color: var(--ok); stroke-width: 2.6; }
.up-acts { display: flex; gap: 4px; flex: none; }
.up-acts label.btn { cursor: pointer; }
.up-acts label.btn:focus-within { outline: 2px solid var(--amber); outline-offset: 2px; }
.up-busy { display: flex; align-items: center; gap: 14px; padding: 16px 14px; }
.up-busy-t { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; color: var(--muted); font-size: 13px; }
.up-bar, .meter { width: 100%; height: 6px; display: block; border-radius: 3px; overflow: hidden; }
.up-track, .m-bg, .sb-bg { fill: rgba(236, 233, 222, 0.08); }
.up-fill, .m-fg, .sb-fg { fill: var(--amber); }

/* ---------- the preview: the openhop app, as it draws ads ---------- */
.pv-win { --line-strong: rgba(236, 233, 222, 0.14); width: 100%; border-radius: 8px; overflow: hidden; border: 1px solid rgba(236, 233, 222, 0.2);
  background: linear-gradient(180deg, #17181b 0%, #131416 100%); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); font-size: 13px; color: #ecebe4; user-select: none; }
.pv-bar { height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 0 0 12px; background: linear-gradient(180deg, #17181b 0%, #0f1012 100%); border-bottom: 1px solid rgba(236, 233, 222, 0.075); }
.pv-mark { width: 15px; height: 15px; }
.pv-name { font-family: var(--display); font-weight: 400; font-size: 14px; color: var(--paper); }
.pv-name b { font-weight: 600; }
.pv-ver { font-size: 10px; color: #a8a59b; border: 1px solid rgba(236, 233, 222, 0.14); border-radius: 3px; padding: 0 5px; line-height: 16px; }
.pv-pill { display: inline-flex; align-items: center; gap: 7px; height: 20px; padding: 0 9px; border: 1px solid rgba(63, 185, 122, 0.4); background: rgba(63, 185, 122, 0.1); border-radius: 3px; }
.pv-pill-dot { width: 7px; height: 7px; background: #3fb97a; border-radius: 1px; }
.pv-pill .sk { width: 50px; height: 6px; background: rgba(142, 220, 177, 0.35); }
.pv-tabs { display: inline-flex; gap: 10px; align-items: center; height: 20px; padding: 0 9px; border: 1px solid rgba(236, 233, 222, 0.1); border-radius: 3px; margin-left: 6px; }
.pv-tabs .sk { width: 34px; height: 6px; }
.pv-tabs .sk:first-child { background: rgba(242, 179, 24, 0.5); }
.pv-sp { flex: 1; }
.pv-wb { position: relative; width: 38px; height: 32px; }
.pv-wb::before { content: ""; position: absolute; left: 14px; top: 15px; width: 10px; height: 1px; background: #a8a59b; }
.pv-wb-max::before { top: 11px; height: 8px; width: 8px; left: 15px; background: none; border: 1px solid #a8a59b; }
.pv-wb-x::before, .pv-wb-x::after { content: ""; position: absolute; left: 14px; top: 15px; width: 11px; height: 1px; background: #a8a59b; transform: rotate(45deg); border: 0; }
.pv-wb-x::after { transform: rotate(-45deg); }
.pv-app { position: relative; padding: 18px 36px; display: flex; flex-direction: column; gap: 12px; min-height: 280px; }
.pv-app-pop { display: grid; grid-template-columns: minmax(0, 1fr); padding: 0; min-height: 330px; }
.pv-app-pop > .pv-skel { grid-area: 1 / 1; padding: 18px 36px; }
.pv-app-pop > .pv-dim { grid-area: 1 / 1; position: relative; inset: auto; padding: 30px 24px; }
.pv-mini .pv-app { min-height: 0; }
.pv-mini .pv-skel { display: none; }
.pv-win .notice-list { display: flex; flex-direction: column; gap: 8px; }
.pv-win .nb { --nb: var(--amber); display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; border: 1px solid rgba(236, 233, 222, 0.24);
  border-left: 4px solid var(--nb); border-radius: 4px; background: linear-gradient(180deg, #2a2c31 0%, #232529 100%); position: relative; overflow: hidden; min-width: 0; }
.pv-win .nb-text { flex: 1; min-width: 0; }
.pv-win .nb-title { font-weight: 600; color: var(--paper); display: flex; align-items: center; gap: 8px; min-width: 0; }
.pv-win .ad-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-win .nb-body { color: #a8a59b; font-size: 12.5px; margin-top: 2px; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-win .nb-x { color: #a8a59b; font-size: 18px; line-height: 1; padding: 4px 6px; border-radius: 4px; }
.pv-win .ad-logo { width: 40px; height: 40px; flex: none; border-radius: 8px; object-fit: contain; }
.pv-win .ad-chip, .ad-chip { display: inline-block; flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--amber-text); border: 1px solid var(--amber-line); background: var(--amber-soft); padding: 1px 6px; border-radius: 3px; line-height: 1.45; }
.pv-win .ad-own { color: #a8a59b; font-size: 11px; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.pv-win .ad-own-row { display: flex; justify-content: flex-end; margin-top: -3px; padding-right: 4px; }
.pv-win .btn { --c: 7px; height: 30px; padding: 0 11px; font-size: 12px; gap: 6px; border-radius: 3px; cursor: default; display: inline-flex; align-items: center; flex: none; max-width: 40%;
  border: 1px solid rgba(236, 233, 222, 0.14); background: linear-gradient(180deg, #2b2d32 0%, #232529 100%); color: #ecebe4; font-weight: 600; white-space: nowrap; }
.pv-win .btn > span { overflow: hidden; text-overflow: ellipsis; }
.pv-win .btn .i { width: 14px; height: 14px; }
.pv-win .btn-primary { background: linear-gradient(180deg, rgba(242, 179, 24, 0.17), rgba(242, 179, 24, 0.06)); border-color: var(--amber-line); color: var(--amber-text); }
.pv-win .btn-solid { background: var(--g-amber); border-color: transparent; color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c)); }
.pv-win .btn-ghost { background: transparent; border-color: transparent; color: #a8a59b; }
.pv-win .pv-ph { color: #6c6a64 !important; font-style: italic; font-weight: 400; }
.pv-win .btn .pv-ph { color: inherit !important; opacity: 0.7; }
.pv-dim { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 16px; background: rgba(8, 9, 10, 0.62); }
.pv-win .modal { width: min(480px, 100%); background: linear-gradient(180deg, #2c2e33 0%, #222428 100%); border: 1px solid rgba(236, 233, 222, 0.24); border-top: 3px solid var(--amber);
  border-radius: 4px; padding: 20px 22px 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
.pv-win .modal.has-video { width: min(580px, 100%); }
.pv-win .ad-pop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pv-win .notice-main { display: flex; gap: 14px; align-items: flex-start; }
.pv-win .notice-main .ad-logo { width: 52px; height: 52px; border-radius: 10px; }
.pv-win .notice-text { flex: 1; min-width: 0; }
.pv-win .modal h3 { font-family: var(--display); font-size: 19px; font-weight: 600; color: var(--paper); margin-bottom: 4px; overflow-wrap: anywhere; }
.pv-win .modal p { font-size: 13px; color: #a8a59b; line-height: 1.55; margin-bottom: 18px; white-space: pre-line; overflow-wrap: anywhere; }
.pv-win .modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.pv-win .modal-actions .ad-never { margin-right: auto; padding-left: 0; }
.pv-win .modal-actions .btn { max-width: none; }
.pv-win .modal-actions .btn-solid { min-width: 0; flex-shrink: 1; }
.pv-win .ad-media { position: relative; margin: 0 0 16px; border-radius: 6px; overflow: hidden; background: #111214; aspect-ratio: 16 / 9; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.pv-win .ad-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.pv-win .ad-sound { position: absolute; right: 10px; bottom: 10px; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 6px; background: rgba(20, 21, 24, 0.72); color: var(--paper); }
.pv-win .ad-sound .i { width: 16px; height: 16px; }
.pv-other { opacity: 0.55; }
.pv-other-logo { width: 40px; height: 40px; border-radius: 8px; background: rgba(236, 233, 222, 0.09); flex: none; }
.pv-skel { display: flex; flex-direction: column; gap: 10px; }
.pv-sk-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid rgba(236, 233, 222, 0.075); border-radius: 4px; background: linear-gradient(180deg, #222428 0%, #1c1e22 100%); }
.pv-sk-card:first-child { flex-direction: row; align-items: center; gap: 10px; }
.pv-sk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pv-sk-tall { min-height: 92px; }
.pv-dot { width: 9px; height: 9px; border-radius: 50%; background: #3fb97a; box-shadow: 0 0 0 3px rgba(63, 185, 122, 0.18); flex: none; }
.sk { display: block; height: 8px; border-radius: 4px; background: rgba(236, 233, 222, 0.08); }
.sk-30 { width: 30%; } .sk-40 { width: 40%; } .sk-50 { width: 50%; } .sk-60 { width: 60%; } .sk-70 { width: 70%; } .sk-80 { width: 80%; } .sk-90 { width: 90%; }
.sk-r { margin-left: auto; }
.sk-btn { width: 64px; height: 30px; border-radius: 3px; flex: none; }
.nb-title .sk { flex: 1; max-width: 140px; }
.nb-text > .sk { margin-top: 7px; }

/* ---------- buy ---------- */
.buy { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.buy-steps { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.buy-step { gap: 16px; }
.buy-step > div:not(.ed-sec-h) { display: flex; flex-direction: column; gap: 20px; }
.buy-step .f { gap: 8px; }
.pick-ads { display: flex; flex-direction: column; gap: 8px; }
.pick-ad { position: relative; display: block; cursor: pointer; border-radius: var(--r); }
.pick-ad input { position: absolute; opacity: 0; pointer-events: none; }
.pick-ad-b { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line-strong); border-radius: var(--r); transition: border-color var(--t-fast), background-color var(--t-fast); }
.pick-ad:hover .pick-ad-b { border-color: var(--line-hard); }
.pick-ad:has(input:checked) .pick-ad-b { border-color: var(--amber); background: var(--amber-soft); box-shadow: inset 0 0 0 1px var(--amber-line); }
.pick-ad:has(input:focus-visible) { outline: 2px solid var(--amber); outline-offset: 2px; }
.pick-ad-m { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 0 2px; }
.opt-off { cursor: not-allowed; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.q { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line-strong); background: rgba(236, 233, 222, 0.03); color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.q:hover { color: var(--paper); border-color: var(--line-hard); }
.q[aria-pressed="true"] { color: var(--ink); background: var(--amber); border-color: var(--amber); }
.stp { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stp-b { width: 40px; height: 40px; padding: 0; }
.stp-u { color: var(--muted); font-size: 13px; min-width: 44px; }
.when { display: flex; flex-direction: column; gap: 10px; }
.extras { display: flex; flex-direction: column; gap: 8px; }
.ex { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r); cursor: pointer; transition: border-color var(--t-fast), background-color var(--t-fast); }
.ex input { position: absolute; opacity: 0; pointer-events: none; }
.ex:hover { border-color: var(--line-hard); }
.ex:has(input:checked) { border-color: var(--amber-line); background: var(--amber-soft); }
.ex:has(input:focus-visible) { outline: 2px solid var(--amber); outline-offset: 2px; }
.ex-off { opacity: 0.5; cursor: not-allowed; }
.ex-box { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 3px; border: 1px solid var(--line-hard); background: var(--g-sunken); color: transparent; margin-top: 1px; }
.ex-box .i { width: 14px; height: 14px; stroke-width: 3; }
.ex:has(input:checked) .ex-box { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.ex-t { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ex-t small { color: var(--muted); font-size: 12.5px; }
.ex-p { flex: none; font-family: var(--display); font-weight: 600; color: var(--amber-text); font-size: 14px; white-space: nowrap; }
.ex-p.neg { color: var(--ok-text); }

.buy-sum { position: sticky; top: calc(var(--top) + 20px); min-width: 0; transition: opacity var(--t-fast); }
.buy-sum.is-loading { opacity: 0.72; }
.sum { gap: 14px; border-top: 3px solid var(--amber); }
.sum-h { display: flex; flex-direction: column; gap: 4px; }
.sum-ad { font-family: var(--display); font-size: 18px; font-weight: 600; color: var(--paper); overflow-wrap: anywhere; }
.sum-l { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sl { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.sl dt { color: var(--muted); }
.sl dd { color: var(--paper); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.sl-sub { font-size: 12.5px; }
.sl-sub dt, .sl-sub dd { color: var(--dim); font-weight: 500; }
.sl-bal dd { color: var(--ok-text); }
.sum-k { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.demand { display: flex; flex-direction: column; gap: 6px; }
.demand-t { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.coins { display: flex; flex-direction: column; gap: 6px; margin-top: -6px; }
.coin { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r); cursor: pointer; }
.coin input { width: 16px; height: 16px; accent-color: var(--amber); flex: none; }
.coin:has(input:checked) { border-color: var(--amber-line); background: var(--amber-soft); }
.coin-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.coin-t b { font-size: 13.5px; }
.coin-t small { color: var(--muted); font-size: 12px; }
.coin-p { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--paper); font-variant-numeric: tabular-nums; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 4px; }
.sum-total span { font-weight: 600; }
.sum-total b { font-family: var(--display); font-size: 30px; color: var(--paper); font-variant-numeric: tabular-nums; }
.sum-err:empty { display: none; }

/* ---------- orders ---------- */
.ord-list { display: flex; flex-direction: column; gap: 8px; }
.ord { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto 18px; align-items: center; gap: 16px; padding: 14px 18px; background: var(--g-surface); border: 1px solid var(--line-strong); border-radius: var(--r); text-decoration: none; box-shadow: var(--sheen); transition: border-color var(--t-fast); }
.ord:hover { border-color: var(--line-hard); }
.ord:hover .ord-go { color: var(--amber); transform: translateX(2px); }
.ord-a { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ord-id { font-size: 11px; color: var(--dim); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.ord-b { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ord-t { font-weight: 600; color: var(--paper); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-x { font-size: 12.5px; color: var(--muted); }
.ord-c { text-align: right; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.ord-c b { font-family: var(--display); font-size: 17px; font-variant-numeric: tabular-nums; }
.ord-pay { font-size: 12px; font-weight: 600; color: var(--warn-text); }
.ord-go { color: var(--dim); transition: transform var(--t-fast), color var(--t-fast); }
.ord-acts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.prog { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.prog-t { font-size: 12px; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 20px; }
.fact { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fact dt { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.fact dd { color: var(--paper); font-weight: 500; overflow-wrap: anywhere; }
.fact a { color: var(--amber-text); text-underline-offset: 2px; }
.hours { display: flex; flex-direction: column; gap: 12px; }
.hours-sum { color: var(--muted); font-size: 13px; }
.hours-sum b { font-family: var(--display); font-size: 18px; }
.hd { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: start; padding-top: 10px; border-top: 1px solid var(--line); }
.hd-d { font-weight: 600; color: var(--text); padding-top: 4px; text-transform: capitalize; font-size: 13px; }
.hd-h { display: flex; flex-wrap: wrap; gap: 6px; }
.hh { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 3px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; border: 1px solid var(--line-hard); color: var(--text); background: rgba(236, 233, 222, 0.03); }
.hh .i { width: 12px; height: 12px; stroke-width: 2.6; }
.hh-past { color: var(--dim); border-color: var(--line); }
.hh-now { color: var(--ink); background: var(--amber); border-color: var(--amber); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- stats ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stats-body { display: flex; flex-direction: column; gap: 18px; }
.chb { display: flex; flex-direction: column; gap: 8px; }
.chb + .chb { margin-top: 10px; }
.chb-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.chb-k { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; }
.chb-k::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--amber); }
.chb-k.ch-c::before { background: var(--paper); }
.chb-max { font-size: 12px; color: var(--dim); }
.chb-plot { height: 130px; padding: 0 0 1px; border-bottom: 1px solid var(--line-hard); }
.chart { width: 100%; height: 100%; display: block; }
.ch-grid { stroke: rgba(236, 233, 222, 0.06); stroke-width: 1; }
.ch-v .ch-bar { fill: var(--amber); }
.ch-c .ch-bar { fill: #d9d6cc; }
.ch-bar:hover { fill: var(--amber-hi); }
.ch-c .ch-bar:hover { fill: #fff; }
.ch-zero { fill: rgba(236, 233, 222, 0.12); }
.chb-x { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--dim); }
.split { display: flex; flex-direction: column; gap: 10px; }
.split li { display: flex; flex-direction: column; gap: 5px; }
.split-t { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.split-k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split-v { color: var(--dim); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.split-bar { width: 100%; height: 4px; display: block; border-radius: 2px; overflow: hidden; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th:first-child { text-align: left; white-space: normal; }
.tbl thead th { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.tbl tbody th { font-weight: 500; color: var(--paper); }

/* ---------- balance ---------- */
.bal-hero { --c: 16px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center; padding: 26px 30px; background: linear-gradient(180deg, #2a2c31 0%, #212327 100%); border: 1px solid var(--line-hard); border-left: 4px solid var(--amber); border-radius: var(--r); }
.bal-k { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
.bal-v { font-family: var(--display); font-size: 48px; font-weight: 600; color: var(--paper); line-height: 1.1; font-variant-numeric: tabular-nums; }
.bal-x { display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 13px; align-items: flex-start; }
.bal-x .btn { margin-top: 4px; }
.ledger { display: flex; flex-direction: column; }
.lg { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.lg + .lg { border-top: 1px solid var(--line); }
.lg-ic { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; flex: none; }
.lg-ic .i { width: 15px; height: 15px; }
.lg-ic.pos { background: var(--ok-soft); color: var(--ok-text); }
.lg-ic.neg { background: rgba(236, 233, 222, 0.05); color: var(--muted); }
.lg-b { flex: 1; min-width: 0; }
.lg-t { font-weight: 500; color: var(--paper); }
.lg-s { font-size: 12px; color: var(--dim); }
.lg-s a { color: var(--muted); }
.lg-v { font-family: var(--display); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-v.pos { color: var(--ok-text); }
.acc-email { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.acc-email .i { color: var(--amber); }

/* ---------- dialogs, toasts ---------- */
.dlg-bg { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(8, 9, 10, 0.66); animation: fadeIn 160ms var(--ease-out); }
.dlg-bg.out { opacity: 0; transition: opacity 150ms; }
.dlg { width: min(440px, 100%); background: linear-gradient(180deg, #2c2e33 0%, #222428 100%); border: 1px solid var(--line-hard); border-top: 3px solid var(--amber); border-radius: var(--r); padding: 22px 22px 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); animation: rise 260ms var(--ease-out); }
.dlg-danger { border-top-color: var(--bad); }
.dlg h2 { font-size: 19px; margin-bottom: 8px; }
.dlg p { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; background: #2c2e33; border: 1px solid var(--line-hard); border-left: 3px solid var(--ok); border-radius: var(--r); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5); color: var(--paper); font-weight: 500; animation: rise 240ms var(--ease-out); transition: opacity 250ms, transform 250ms; }
.toast .i { color: var(--ok-text); }
.toast-bad { border-left-color: var(--bad); }
.toast-bad .i { color: var(--bad-text); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- narrower screens ---------- */
@media (max-width: 1180px) {
  .ed { grid-template-columns: minmax(0, 1fr); }
  .ed-pv { position: static; order: -1; }
  .buy { grid-template-columns: minmax(0, 1fr); }
  .buy-sum { position: static; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
  :root { --top: 52px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: var(--top); z-index: 20; height: auto; padding: 0; border-right: 0; border-bottom: 1px solid var(--line-strong); background: rgba(17, 18, 20, 0.96); backdrop-filter: blur(8px); }
  .nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 6px 10px; gap: 4px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-a { flex: none; padding: 7px 11px; font-size: 13px; gap: 7px; }
  .nav-a.on::before { left: 10px; right: 10px; top: auto; bottom: -7px; width: auto; height: 2px; }
  .side-foot { display: none; }
  .main { padding: 22px 16px 70px; }
  .top { padding: 0 14px; }
  .top-acc span { display: none; }
  .login { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 28px 16px 40px; }
  .login-h { font-size: 34px; }
  .login-side { order: 2; }
  .cols-2 { grid-template-columns: minmax(0, 1fr); }
  .he { grid-template-columns: minmax(0, 1fr); }
  .he-pv { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 620px) {
  h1 { font-size: 25px; }
  .lead { font-size: 14px; }
  .brand-tag { display: none; }
  .wordmark { font-size: 18px; }
  .card { padding: 16px; }
  .ed-sec { padding: 16px; }
  .tiles, .tiles-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tiles-3 > :last-child { grid-column: 1 / -1; }
  .tile { padding: 12px 14px; }
  .tile-v { font-size: 22px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .opts { grid-template-columns: minmax(0, 1fr); }
  .login-steps { grid-template-columns: minmax(0, 1fr); }
  .login-card { padding: 22px 18px; }
  .ad-grid { grid-template-columns: minmax(0, 1fr); }
  .ord { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px 14px; }
  .ord-a { flex-direction: row; align-items: center; grid-column: 1 / -1; justify-content: space-between; width: 100%; }
  .ord-go { display: none; }
  .hd { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .bal-hero { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 20px; }
  .bal-v { font-size: 38px; }
  .pv-stage { padding: 10px; }
  .pv-app { padding: 12px 14px; }
  .pv-app-pop { padding: 0; }
  .pv-win .nb { gap: 10px; padding: 9px 10px 9px 12px; }
  .pv-win .ad-logo { width: 34px; height: 34px; }
  .pv-win .nb-x { display: none; }
  .pv-win .modal { padding: 16px 16px 14px; }
  .pv-win .modal-actions { flex-wrap: wrap; }
  .pv-sk-row { grid-template-columns: 1fr; }
  .pv-sk-row > :last-child { display: none; }
  .ed-bar { margin: 0; }
  .ed-bar .sp { display: none; }
  .ed-bar .btn { flex: 1 1 auto; }
  .stp .in-num { width: 90px; }
  .foot { padding: 16px; flex-direction: column; }
  .in-sel { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
