:root {
  --bg: #0f1011;
  --bg2: #141517;
  --surface: #17181a;
  --surface2: #1d1e21;
  --line: rgba(255, 255, 255, .075);
  --line2: rgba(255, 255, 255, .13);
  --text: #f3f3f2;
  --muted: #8d9095;
  --faint: #5b5e63;
  --up: #2fcf7c;
  --up-bg: rgba(47, 207, 124, .1);
  --down: #f2454f;
  --down-bg: rgba(242, 69, 79, .1);
  --r: 18px;
  --r-s: 11px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  /* tokens the shared chart reads */
  --c-up: var(--up);
  --c-down: var(--down);
  --text-muted: #7c7f85;
  --font-mono: var(--mono);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -200px, #1a1b1e 0%, transparent 70%),
    var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ── header ─────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(15, 16, 17, .72); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none;
  font-weight: 600; letter-spacing: -.01em; font-size: 15px; }
.brand span { white-space: nowrap; }
.brand svg rect { fill: var(--text); }
.brand svg rect:nth-child(1) { opacity: .35; }
.brand svg rect:nth-child(2) { opacity: .65; }
.top-r { display: flex; align-items: center; gap: 14px; }
.sync { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted);
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.sync[data-state="ok"] i { background: var(--text); box-shadow: 0 0 0 0 rgba(255,255,255,.5); animation: pulse 2s infinite; }
.sync[data-state="bad"] { color: var(--down); border-color: rgba(242,69,79,.35); }
.sync[data-state="bad"] i { background: var(--down); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.45); } 70% { box-shadow: 0 0 0 7px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.clock { font-size: 14px; color: var(--text); min-width: 68px; text-align: right; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; transition: border-color .2s, background .2s; }
.icon-btn:hover { border-color: var(--line2); background: rgba(255,255,255,.03); }
.icon-btn svg { fill: var(--text); stroke: none; }
.icon-btn svg .w { fill: none; stroke: var(--text); stroke-width: 1.7; stroke-linecap: round; }
.icon-btn .off { display: none; }
.icon-btn[aria-pressed="false"] .on { display: none; }
.icon-btn[aria-pressed="false"] .off { display: block; }
.icon-btn[aria-pressed="false"] svg { fill: var(--muted); }
.icon-btn[aria-pressed="false"] svg .w { stroke: var(--muted); }

/* ── layout ─────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; padding-top: 40px; padding-bottom: calc(32px + env(safe-area-inset-bottom)); align-items: start; }
.stage-col { display: flex; justify-content: center; }
.stage { position: relative; width: 100%; max-width: 580px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); padding: 32px;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 30px 80px -40px rgba(0,0,0,.8);
  transition: height .45s var(--ease); overflow: hidden; }
.view { animation: viewIn .5s var(--ease) both; }
.view.leaving { animation: viewOut .22s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes viewOut { to { opacity: 0; transform: translateY(-6px); } }

.eyebrow { margin: 0 0 14px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 500; }
h1 { margin: 0 0 10px; font-size: 34px; line-height: 1.1; letter-spacing: -.025em; font-weight: 600; }
h2 { margin: 0; font-size: 22px; letter-spacing: -.015em; font-weight: 600; }
h3 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -.005em; }
.lead { margin: 0 0 26px; color: var(--muted); font-size: 15px; max-width: 46ch; }
.lead.center { margin-left: auto; margin-right: auto; }
.micro { margin: 12px 0 0; font-size: 12.5px; color: var(--faint); text-align: center; }

/* segmented control */
.field { margin-bottom: 20px; }
.field-l { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.seg { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 4px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 12px; }
.seg button { border: 0; background: transparent; padding: 9px 0; border-radius: 8px; font-size: 14px;
  color: var(--muted); font-family: var(--mono); transition: background .2s, color .2s; }
.seg button:hover { color: var(--text); }
.seg button[aria-checked="true"] { background: var(--text); color: #0f1011; font-weight: 600; }

/* rows */
.rows { margin: 0 0 24px; padding: 0; }
.rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0;
  border-bottom: 1px solid var(--line); }
.rows > div:last-child { border-bottom: 0; }
.rows dt { color: var(--muted); font-size: 14px; }
.rows dd { margin: 0; font-weight: 500; font-size: 14px; text-align: right; }
.hint { color: var(--faint); font-size: 12px; margin-left: 6px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px;
  border: 1px solid transparent; padding: 12px 18px; font-weight: 500; font-size: 15px;
  transition: transform .15s var(--ease), background .2s, border-color .2s, opacity .2s; }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--text); color: #0f1011; }
.btn.primary:hover { background: #fff; }
.btn.primary:disabled { opacity: .35; cursor: default; }
.btn.big { width: 100%; padding: 17px; font-size: 16px; font-weight: 600; border-radius: 14px; }
.btn.ghost { width: 100%; background: transparent; border-color: var(--line2); color: var(--text); }
.btn.ghost:hover { background: rgba(255,255,255,.04); }
.btn.chip { padding: 7px 12px; font-size: 13px; border-color: var(--line2); background: transparent; border-radius: 9px; }
.btn.chip:hover { background: rgba(255,255,255,.05); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.link { border: 0; background: none; color: var(--faint); font-size: 13px; padding: 0; }
.link:hover { color: var(--text); }

/* progress bars */
.bar { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; margin-bottom: 22px; }
.bar i { display: block; height: 100%; width: 0; background: var(--text); border-radius: 3px; }
.bar.thin { height: 2px; margin: 10px 0 22px; }

/* ── scan ───────────────────────────────────────────── */
.v-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.v-title { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.scan-ico { fill: none; stroke: var(--text); stroke-width: 1.7; stroke-linecap: round; }
.scan-ico .beam { animation: beam 1.6s ease-in-out infinite; }
@keyframes beam { 0%, 100% { transform: translateY(-5px); opacity: .25; } 50% { transform: translateY(5px); opacity: 1; } }
.reel { position: relative; height: 168px; overflow: hidden; margin: 4px 0 18px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%); }
.reel-track { position: absolute; z-index: 1; left: 0; right: 0; top: 0; transition: transform .36s var(--ease); will-change: transform; }
.reel-focus { position: absolute; left: 0; right: 0; top: 56px; height: 56px; border-radius: 12px;
  background: var(--surface2); border: 1px solid var(--line2); z-index: 0; pointer-events: none; }
.rr { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 56px; align-items: center;
  gap: 14px; height: 56px; padding: 0 16px; color: var(--faint); transition: color .35s; }
.rr.on { color: var(--text); }
.rr .nm { font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr .py { text-align: right; font-family: var(--mono); font-size: 14px; }
.rr.dead .nm::after { content: " · нет котировок"; color: var(--faint); font-size: 12px; font-weight: 400; }
.glyph { display: inline-flex; align-items: center; gap: 3px; height: 24px; }
.glyph b { width: 6px; border-radius: 1.5px; background: currentColor; opacity: .35; transition: transform .3s var(--ease), background .3s; }
.glyph b.u { height: 11px; transform: translateY(-4px); }
.glyph b.d { height: 11px; transform: translateY(4px); }
.glyph b.z { height: 2px; }
.glyph b.f { opacity: .18; }
.rr.on .glyph b.u { background: var(--up); opacity: 1; }
.rr.on .glyph b.d { background: var(--down); opacity: 1; }
.rr.on .glyph b.f { opacity: .35; }
.rr.hit { color: var(--text); }
.scan-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; font-size: 13px; }
.scan-meta { display: grid; gap: 2px; }
.close-in { display: grid; justify-items: end; gap: 2px; white-space: nowrap; }
.close-in .mono { font-size: 15px; }

/* ── prep ───────────────────────────────────────────── */
.prep-top { text-align: center; display: grid; justify-items: center; gap: 6px; margin-top: 6px; }
.bell { fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round;
  transform-origin: 50% 10%; animation: ring 1s var(--ease) 2; margin-bottom: 4px; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-11deg); } 60% { transform: rotate(7deg); } 80% { transform: rotate(-4deg); } }
.count { text-align: center; font-size: 84px; line-height: 1; font-weight: 500; letter-spacing: -.04em; margin: 22px 0 18px; }
.count.tick { animation: tickPop .35s var(--ease); }
@keyframes tickPop { from { transform: scale(1.06); opacity: .6; } to { transform: none; opacity: 1; } }
.pair-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pair-name { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }

/* chart */
.chart { margin: 0 0 18px; height: 168px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); position: relative; overflow: hidden; }
.chart .schema { position: absolute; inset: 0; }
.chart .schema svg { display: block; width: 100%; height: 100%; }
/* live broker chart (js/chart.js, shared with Tradzio Pro / CoreSignals / ZEUS) */
.chart { transition: height .35s var(--ease); }
.chart.live { height: 280px; }
.chart.live .schema { display: none; }
.live-box { position: absolute; inset: 0; }
.chart .schema text { font-family: var(--font); font-size: 11px; fill: var(--faint); }
.chart .schema .grid-l { stroke: rgba(255,255,255,.045); stroke-width: 1; }
.chart .schema .zone { fill: rgba(255,255,255,.035); }
.chart .schema .entry-v { stroke: var(--muted); stroke-dasharray: 3 4; stroke-width: 1; }
.chart .schema .entry-h { stroke-dasharray: 3 4; stroke-width: 1; }
.chart .schema .path { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.chart .schema .dot { stroke: var(--bg2); stroke-width: 2; }

/* ── signal ─────────────────────────────────────────── */
.dir { display: grid; justify-items: center; gap: 4px; padding: 26px 16px 24px; border-radius: 14px; margin: 2px 0 20px;
  animation: dirIn .6s var(--ease) both; }
@keyframes dirIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.dir svg { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.dir[data-dir="1"] { background: var(--up-bg); color: var(--up); }
.dir[data-dir="1"] svg { stroke: var(--up); }
.dir[data-dir="-1"] { background: var(--down-bg); color: var(--down); }
.dir[data-dir="-1"] svg { stroke: var(--down); transform: scaleY(-1); }
.dir-t { font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.dir-s { color: var(--text); font-size: 14px; opacity: .85; }
.exp-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; margin-bottom: 8px; }
.exp-line .mono { font-size: 22px; font-weight: 500; }
.result { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--line2); margin-bottom: 18px; animation: viewIn .5s var(--ease) both; }
.result b { font-size: 16px; white-space: nowrap; }
.result span { text-align: right; }
.result.win b { color: var(--up); }
.result.loss b { color: var(--down); }
.result span { font-size: 13px; color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }

/* ── cancel ─────────────────────────────────────────── */
[data-view="cancel"] { text-align: center; }
[data-view="cancel"] .eyebrow { text-align: left; }
.cancel-ico { display: grid; place-items: center; margin: 14px 0 12px; }
.cancel-ico svg { fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; }
[data-view="cancel"] h2 { margin-bottom: 8px; }
[data-view="cancel"] .lead { margin-bottom: 6px; }
[data-view="cancel"] .btn-row { margin-top: 24px; }

/* ── side ───────────────────────────────────────────── */
.side { display: grid; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.panel-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.hist-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.hist-sum div { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.hist-sum b { display: block; font-family: var(--mono); font-size: 16px; font-weight: 500; }
.hist-sum span { font-size: 11.5px; color: var(--muted); }
.hist { list-style: none; margin: 0; padding: 0; max-height: 440px; overflow: auto; scrollbar-width: thin; }
.hist li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 10px 0;
  border-top: 1px solid var(--line); animation: viewIn .45s var(--ease) both; }
.hist li:first-child { border-top: 0; }
.hist .ar { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; }
.hist .ar svg { width: 13px; height: 13px; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hist .ar.u { background: var(--up-bg); } .hist .ar.u svg { stroke: var(--up); }
.hist .ar.d { background: var(--down-bg); } .hist .ar.d svg { stroke: var(--down); transform: rotate(180deg); }
.hist .ar.x { background: rgba(255,255,255,.05); } .hist .ar.x svg { stroke: var(--faint); }
.hist .h1 { font-size: 14px; font-weight: 500; }
.hist .h2 { font-size: 12px; color: var(--faint); font-family: var(--mono); }
.hist .st { font-size: 12.5px; text-align: right; white-space: nowrap; }
.hist .st.win { color: var(--up); } .hist .st.loss { color: var(--down); } .hist .st.wait, .hist .st.off { color: var(--faint); }
.empty { margin: 0; color: var(--faint); font-size: 13px; }
.how h3 { margin-bottom: 10px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding-left: 30px; font-size: 13px; color: var(--muted); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 6px;
  border: 1px solid var(--line2); display: grid; place-items: center; font: 500 11px var(--mono); color: var(--text); }
.steps b { color: var(--text); font-weight: 500; }

.foot { display: flex; justify-content: space-between; gap: 24px; padding-top: 8px; padding-bottom: 40px; font-size: 12px; color: var(--faint); }
.foot p { margin: 0; max-width: 70ch; }
.foot a { color: var(--muted); white-space: nowrap; text-decoration: none; border-bottom: 1px solid var(--line2); align-self: flex-start; }
.foot a:hover { color: var(--text); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--text); color: #0f1011;
  padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; z-index: 20; animation: viewIn .3s var(--ease) both;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); }

/* ── responsive ─────────────────────────────────────── */
@media (max-width: 980px) {
  .grid { grid-template-columns: 1fr; padding-top: 24px; }
  .side { max-width: 580px; width: 100%; margin: 0 auto; }
  .foot { flex-direction: column; max-width: 628px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 14px; }
  .top-in { height: 56px; }
  .sync span { display: none; }
  .sync { padding: 8px; }
  .top-r { gap: 8px; }
  .stage { padding: 22px 18px; border-radius: 16px; }
  h1 { font-size: 28px; }
  .count { font-size: 72px; margin: 18px 0 14px; }
  .dir-t { font-size: 28px; }
  .rr { padding: 0 12px; gap: 10px; grid-template-columns: 1fr auto 46px; }
  .seg button { font-size: 13px; padding: 8px 0; }
  .chart { height: 150px; }
  .lens { padding: 12px 12px 10px; }
  .lens-cv { height: 124px; }
  .lens-pair { font-size: 16px; }
  .cands { flex-direction: column; align-items: flex-start; gap: 6px; }
  .verdict { font-size: 12.5px; }
  .chart.live { height: 236px; }
  .panel { padding: 16px; }
  .btn-row { grid-template-columns: 1fr; }
}
/* ── scan v2: lens + candidates (02.12) ─────────────── */
.lens { position: relative; margin: 6px 0 12px; padding: 14px 16px 12px; border: 1px solid var(--line2); border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0) 60%), var(--bg2); overflow: hidden; }
.lens::before { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(400px 120px at 70% 0%, rgba(255,255,255,.05), transparent 70%); }
.lens-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.lens-pair { font-weight: 600; font-size: 18px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lens-pair.in { animation: lensIn .45s var(--ease) both; }
@keyframes lensIn { from { opacity: 0; transform: translateY(8px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.lens-meta { font-size: 13px; color: var(--muted); white-space: nowrap; }
.lens-cv { display: block; width: 100%; height: 150px; }
.lens-f { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.pips { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pips li { display: grid; place-items: center; width: 30px; height: 26px; border-radius: 8px; border: 1px solid var(--line2);
  font: 500 11px/1 var(--mono); color: var(--faint); position: relative; transition: background .25s, border-color .25s, color .25s, transform .25s var(--ease); }
.pips li i { display: none; }
.pips li.on { transform: translateY(-1px); color: var(--text); }
.pips li.on span { display: none; }
.pips li.on i { display: block; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; }
.pips li.u { border-color: rgba(47,207,124,.5); background: var(--up-bg); }
.pips li.u i { border-bottom: 7px solid var(--up); }
.pips li.d { border-color: rgba(242,69,79,.5); background: var(--down-bg); }
.pips li.d i { border-top: 7px solid var(--down); }
.pips li.z i { width: 9px; height: 2px; border: 0; background: var(--muted); border-radius: 1px; }
.verdict { font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.verdict[data-k="wait"] { color: var(--faint); }
.verdict[data-k="wait"]::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 7px; vertical-align: -1px;
  border-radius: 50%; border: 1.5px solid var(--line2); border-top-color: var(--muted); animation: auSpin .8s linear infinite; }
.verdict[data-k="low"], .verdict[data-k="none"] { color: var(--faint); animation: viewIn .3s var(--ease) both; }
.verdict[data-k="near"] { color: var(--muted); animation: viewIn .3s var(--ease) both; }
.verdict[data-k="hot"] { color: var(--text); font-weight: 500; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line2);
  background: rgba(255,255,255,.05); animation: hotIn .45s var(--ease) both; }
@keyframes hotIn { 0% { opacity: 0; transform: scale(.92); } 60% { transform: scale(1.03); } 100% { opacity: 1; transform: none; } }

.rr.hot .nm::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 8px; vertical-align: 2px;
  background: var(--text); box-shadow: 0 0 0 0 rgba(255,255,255,.5); animation: pulse 1.6s infinite; }

.cands { display: flex; align-items: center; gap: 12px; min-height: 30px; margin: 0 0 16px; font-size: 13px; }
.cands-l { color: var(--muted); white-space: nowrap; }
.cands-row { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.cands-none { color: var(--faint); }
.cand { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line2);
  font-size: 12.5px; white-space: nowrap; transition: border-color .3s, background .3s; }
.cand.u { border-color: rgba(47,207,124,.35); }
.cand.d { border-color: rgba(242,69,79,.35); }
.cand.new { animation: hotIn .45s var(--ease) both; }
.cand.more { color: var(--muted); }
#scanChecked { color: var(--text); }

/* last seconds before the candle closes with candidates on the board */
.stage.tense .close-in .mono { color: var(--text); animation: tense .5s ease-in-out infinite alternate; }
.stage.tense #closeBar { background: var(--text); box-shadow: 0 0 12px rgba(255,255,255,.6); }
.stage.tense .cand.u { background: var(--up-bg); border-color: rgba(47,207,124,.7); }
.stage.tense .cand.d { background: var(--down-bg); border-color: rgba(242,69,79,.7); }
@keyframes tense { from { opacity: 1; transform: scale(1); } to { opacity: .55; transform: scale(1.06); } }

/* ── account / sign-in (02.12) ──────────────────────── */
.acct { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 12px; border-radius: 10px;
  border: 1px solid var(--line2); background: var(--text); color: #0f1011; font-size: 13.5px; font-weight: 600;
  transition: background .2s, border-color .2s, color .2s; white-space: nowrap; }
.acct svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.acct:hover { background: #fff; }
.acct.in { background: transparent; color: var(--text); font-family: var(--mono); font-weight: 500; font-size: 13px; }
.acct.in:hover { background: rgba(255,255,255,.04); }
.gate { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.link.u { color: var(--text); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line2); }

html.au-lock { overflow: hidden; }
.au { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px;
  background: rgba(8, 9, 10, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: auFade .25s ease both; }
@keyframes auFade { from { opacity: 0; } to { opacity: 1; } }
.au-card { position: relative; width: 100%; max-width: 440px; max-height: calc(100dvh - 40px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r); padding: 30px 28px 24px;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.9); animation: viewIn .4s var(--ease) both; }
.au-card [data-av] { animation: viewIn .35s var(--ease) both; }
.au-card h2 { margin-bottom: 10px; padding-right: 28px; }
.au-card .lead { margin-bottom: 20px; font-size: 14.5px; }
.au-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: 9px; background: transparent; }
.au-x svg { fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.au-x:hover { background: rgba(255,255,255,.05); }
.au-x:hover svg { stroke: var(--text); }
.au-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 84px; margin-bottom: 18px; }
.au-steps i { height: 3px; border-radius: 3px; background: var(--line2); transition: background .3s; }
.au-steps i.on { background: var(--text); }
.au-list { margin: 0 0 22px; padding: 0; list-style: none; counter-reset: s; }
.au-list li { counter-increment: s; position: relative; padding: 0 0 12px 34px; font-size: 14px; color: var(--muted); }
.au-list li b { color: var(--text); font-weight: 500; }
.au-list li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line2); display: grid; place-items: center; font: 500 12px/1 var(--mono); color: var(--text); }
a.btn { text-decoration: none; }
a.btn.off { opacity: .35; pointer-events: none; }
.au-f { display: block; margin-bottom: 14px; }
.au-f span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.au-f input { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2);
  background: var(--bg2); color: var(--text); font: 400 15px var(--font); outline: none; transition: border-color .2s, box-shadow .2s; }
.au-f input.mono { font-family: var(--mono); letter-spacing: .2em; font-size: 17px; }
.au-f input::placeholder { color: var(--faint); letter-spacing: normal; }
.au-f input:focus { border-color: rgba(255,255,255,.35); box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.au-err { margin: 0 0 14px; padding: 11px 13px; border-radius: 11px; font-size: 13.5px; line-height: 1.45;
  color: #ffb3b7; background: var(--down-bg); border: 1px solid rgba(242,69,79,.3); }
.au-alt { margin: 16px 0 0; text-align: center; font-size: 13.5px; color: var(--muted); }
.au-alt a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line2); }
.au-rows { margin-bottom: 20px; }
.au-rows dd { overflow-wrap: anywhere; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(15,16,17,.25); border-top-color: #0f1011; animation: auSpin .7s linear infinite; }
@keyframes auSpin { to { transform: rotate(360deg); } }
.au-steps { grid-template-columns: 1fr 1fr 1fr; width: 120px; }
.au-card .lead b { color: var(--text); font-weight: 600; }
.dep-box { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.dep-box > div { padding: 12px 14px; border: 1px solid var(--line2); border-radius: 12px; background: var(--bg2); }
.dep-box span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.dep-box b { font-size: 18px; font-weight: 600; }
.dep-bar { margin-bottom: 20px; }
.dep-bar i { background: var(--up); transition: width .6s var(--ease); }
.dep-check { margin-top: 10px; }
.btn.ghost.busy::after { border-color: rgba(255,255,255,.2); border-top-color: var(--text); }
#auAccess { color: var(--up); }
#auAccess.off { color: var(--muted); }
@media (max-width: 560px) {
  .acct { height: 36px; padding: 0 11px; font-size: 13px; }
  .acct.in { width: 36px; padding: 0; justify-content: center; }
  .acct:not(.in) svg { display: none; }
  .brand { gap: 8px; font-size: 14px; }
  .brand svg { width: 24px; height: 17px; }
  .clock { min-width: 0; font-size: 13px; }
  .acct.in span { display: none; }
  .au { place-items: end center; padding: 0; }
  .au-card { max-width: none; border-radius: 20px 20px 0 0; padding: 26px 18px calc(20px + env(safe-area-inset-bottom));
    max-height: 92dvh; border-bottom: 0; }
}

@media (max-width: 375px) {
  .brand { font-size: 13px; gap: 7px; }
  .top-r { gap: 6px; }
  .acct { padding: 0 10px; }
}
@media (max-width: 340px) {
  .clock { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
