:root {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #f9fafb; --border: #e5e7eb; --border-strong: #d1d5db;
  --text: #111827; --text-2: #4b5563; --muted: #5f6673; --faint: #9ca3af;
  --accent: #3b5bdb; --accent-soft: #eef2ff; --accent-text: #3046b8;
  --pos: #0b7a53; --pos-soft: #e7f6ef; --neg: #c42f30; --neg-soft: #fdecec;
  --warn: #94600f; --warn-soft: #fdf5e6; --on-accent: #fff;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --radius: 12px; --radius-sm: 8px;
  --chart-grid: #eef0f3; --chart-text: #6b7280;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #04070f; --surface: #0c1426; --surface-2: #111c33; --border: #1b2847; --border-strong: #27395f;
  --text: #eaf0ff; --text-2: #bfcae3; --muted: #8b97b4; --faint: #6c789a;
  --accent: #4c9dff; --accent-soft: #10224a; --accent-text: #8cc4ff; --on-accent: #04101f;
  --pos: #34c38f; --pos-soft: #12291f; --neg: #f06b6b; --neg-soft: #301818; --warn: #e3a948; --warn-soft: #2e2413;
  --shadow: none; --chart-grid: #222a35; --chart-text: #8b95a3;
}}
:root[data-theme="dark"] {
  --bg: #04070f; --surface: #0c1426; --surface-2: #111c33; --border: #1b2847; --border-strong: #27395f;
  --text: #eaf0ff; --text-2: #bfcae3; --muted: #8b97b4; --faint: #6c789a;
  --accent: #4c9dff; --accent-soft: #10224a; --accent-text: #8cc4ff; --on-accent: #04101f;
  --pos: #34c38f; --pos-soft: #12291f; --neg: #f06b6b; --neg-soft: #301818; --warn: #e3a948; --warn-soft: #2e2413;
  --shadow: none; --chart-grid: #222a35; --chart-text: #8b95a3;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
.num, td.r, .kpi-value, .tnum { font-variant-numeric: tabular-nums; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.02em; margin: 0; }
h2 { font-size: 14px; font-weight: 600; margin: 0; letter-spacing: -.005em; }
h3 { font-size: 13px; font-weight: 600; margin: 0 0 8px; color: var(--text-2); }
.pos { color: var(--pos); } .neg { color: var(--neg); } .muted { color: var(--muted); } .small { font-size: 12.5px; }

/* layout */
.app { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 20px 14px; border-right: 1px solid var(--border);
  background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 20px; font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; color: #fff; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--text-2); font-weight: 500; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent-text); }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .badge { margin-left: auto; }
.sidebar-foot { margin-top: auto; padding: 10px; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.main { min-width: 0; padding: 22px 32px 60px; max-width: 1360px; width: 100%; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* pieces */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.card-body { padding: 14px 20px 18px; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1440px) { .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi-lead { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.kpi { padding: 14px 16px; }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: 22px; font-weight: 650; letter-spacing: -.02em; margin-top: 4px; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.mt { margin-top: 16px; }

.btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.07); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-danger { color: var(--neg); }
.icon-btn { width: 34px; padding: 0; justify-content: center; }

.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
.seg a { padding: 4px 11px; border-radius: 6px; color: var(--text-2); font-weight: 500; font-size: 13px; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.on { background: var(--accent-soft); color: var(--accent-text); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); display: inline-block; flex: none; }
.dot.on { background: var(--pos); box-shadow: 0 0 0 3px var(--pos-soft); }
.dot.off { background: var(--neg); }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); white-space: nowrap; }
.chip.c-intraday { background: #eef2ff; color: #3046b8; border-color: #dfe5ff; }
.chip.c-option_buy { background: #e8f7f1; color: #0b7a53; border-color: #d2efe3; }
.chip.c-option_sell { background: #fdf2e7; color: #a5570d; border-color: #f8e2cb; }
.chip.c-futures { background: #f4edfd; color: #6d3fc0; border-color: #e7dbfa; }
.chip.c-delivery { background: #eaf4fb; color: #1d6a99; border-color: #d6e9f6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip[class*="c-"] { background: var(--surface-2); border-color: var(--border); }
  :root:not([data-theme="light"]) .chip.c-intraday { color: #a9b8ff; } :root:not([data-theme="light"]) .chip.c-option_buy { color: #5fd3a5; }
  :root:not([data-theme="light"]) .chip.c-option_sell { color: #f0b36e; } :root:not([data-theme="light"]) .chip.c-futures { color: #c4a6f5; }
  :root:not([data-theme="light"]) .chip.c-delivery { color: #7cc0ea; } }
:root[data-theme="dark"] .chip[class*="c-"] { background: var(--surface-2); border-color: var(--border); }
:root[data-theme="dark"] .chip.c-intraday { color: #a9b8ff; } :root[data-theme="dark"] .chip.c-option_buy { color: #5fd3a5; }
:root[data-theme="dark"] .chip.c-option_sell { color: #f0b36e; } :root[data-theme="dark"] .chip.c-futures { color: #c4a6f5; }
:root[data-theme="dark"] .chip.c-delivery { color: #7cc0ea; }
.chip.flag { background: var(--neg-soft); color: var(--neg); border-color: transparent; }
.chip.good { background: var(--pos-soft); color: var(--pos); border-color: transparent; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; font-size: 11.5px; font-weight: 600;
  background: var(--neg-soft); color: var(--neg); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; font-weight: 500; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert-danger { background: var(--neg-soft); color: var(--neg); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-ok { background: var(--pos-soft); color: var(--pos); }
.alert-info { background: var(--accent-soft); color: var(--accent-text); }
.flash-wrap { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

/* tables */
.table-wrap { overflow-x: auto; position: relative; }   /* relative: keeps hidden labels inside the scroller */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 550; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
th.r, td.r { text-align: right; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover td { background: var(--surface-2); }
.sym { font-weight: 600; }
.sub { font-size: 12px; color: var(--muted); }

/* meters */
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.meter.warn > span { background: var(--warn); } .meter.bad > span { background: var(--neg); } .meter.good > span { background: var(--pos); }
.guard { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.guard .kpi-value { font-size: 20px; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal .short { display: none; }
.cal .wd { font-size: 11px; color: var(--muted); text-align: center; padding-bottom: 2px; }
.cal .day { min-height: 54px; border-radius: 8px; padding: 5px 7px; background: var(--surface-2); border: 1px solid transparent; font-size: 11px; color: var(--muted); display: flex; flex-direction: column; }
.cal a.day:hover { text-decoration: none; border-color: var(--border-strong); }
.cal .day b { margin-top: auto; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal .day.win { background: var(--pos-soft); } .cal .day.win b { color: var(--pos); }
.cal .day.loss { background: var(--neg-soft); } .cal .day.loss b { color: var(--neg); }
.cal .empty { background: transparent; }

/* bars list */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 1.1fr) 2fr auto; gap: 12px; align-items: center; font-size: 13px; }
.bar-track { position: relative; height: 8px; }
.bar-track::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--border-strong); }
.bar-fill { position: absolute; top: 0; height: 100%; border-radius: 3px; }
.bar-fill.pos { background: var(--pos); left: 50%; } .bar-fill.neg { background: var(--neg); right: 50%; }
.bar-val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 82px; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare > div { border-radius: 10px; padding: 14px; border: 1px solid var(--border); }
.compare .lbl { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.compare .val { font-size: 20px; font-weight: 650; margin: 2px 0; font-variant-numeric: tabular-nums; }

.score-ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--ring, var(--pos)) calc(var(--p) * 1%), var(--surface-2) 0); }
.score-ring > span { width: 50px; height: 50px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: 16px; }

/* forms */
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 550; color: var(--text-2); }
input[type=text], input[type=email], input[type=number], input[type=password], input[type=date], input[type=time], input[type=search], select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; padding: 7px 10px; min-width: 0; }
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.toggle-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.toggle-chips input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-chips label { cursor: pointer; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--border-strong); font-size: 12.5px; font-weight: 500; color: var(--text-2); user-select: none; }
.toggle-chips input:checked + label { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.toggle-chips.bad input:checked + label { background: var(--neg-soft); border-color: var(--neg); color: var(--neg); }
.toggle-chips input:focus-visible + label { outline: 2px solid var(--accent); }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.stars input { position: absolute; opacity: 0; }
.stars label { cursor: pointer; font-size: 22px; color: var(--border-strong); line-height: 1; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #f5a524; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 14px 16px; }
.filters label.f { font-size: 12px; }
.filter-checks { display: flex; flex-direction: column; gap: 6px; padding-bottom: 2px; }
.filter-end { display: flex; align-items: flex-end; gap: 16px; margin-left: auto; }
.filter-actions { display: flex; gap: 8px; }
@media (min-width: 761px) {
  .ttable .c-sym { white-space: normal; min-width: 170px; }
  .ttable .c-sym .sub { line-height: 1.35; }
  .ttable td, .ttable th { padding-left: 10px; padding-right: 10px; }
}
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; }

/* trade page */
.shot { display: block; width: 100%; border-radius: 10px; border: 1px solid var(--border); background: #fff; cursor: zoom-in; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery .item { position: relative; }
.gallery img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); cursor: zoom-in; }
.gallery form { position: absolute; top: 6px; right: 6px; }
.drop { border: 1.5px dashed var(--border-strong); border-radius: 10px; padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 9px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-weight: 550; font-variant-numeric: tabular-nums; }
.big-pnl { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.82); display: none; place-items: center; z-index: 50; padding: 24px; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state h2 { color: var(--text); margin-bottom: 6px; font-size: 16px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 26px 1fr; gap: 10px; }
.steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; font-size: 12px; display: grid; place-items: center; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; }
.chart-box { position: relative; height: 380px; }
.chart-box.sm { height: 200px; }
.log { font-size: 12.5px; max-height: 320px; overflow: auto; }
.log div { display: grid; grid-template-columns: 140px 1fr; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.demo-banner { background: var(--warn-soft); color: var(--warn); padding: 7px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 550; }

@media (max-width: 1100px) { .g-21, .g-12, .g-3 { grid-template-columns: minmax(0, 1fr); } .guard { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; padding: 10px 12px; overflow-x: auto; gap: 2px; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand { padding: 0 8px 0 0; } .brand span, .sidebar-foot, .nav a span.lbl { display: none; }
  .nav { display: flex; gap: 2px; }
  .sidebar { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
             mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }   /* fade hints that the menu scrolls */
  .sidebar.at-end { -webkit-mask-image: none; mask-image: none; }
  .nav a { flex-direction: column; gap: 3px; padding: 6px 8px; min-width: 52px; justify-content: center; }
  .nav a .lbl-s { display: block; font-size: 10.5px; font-weight: 600; line-height: 1; }
  .main { padding: 16px; }
  .cal .day { padding: 4px 5px; min-height: 46px; }
  .g-2, .compare { grid-template-columns: minmax(0, 1fr); }
  .topbar .actions { width: 100%; }
  .seg { flex-wrap: wrap; }
  .guard { grid-template-columns: 1fr 1fr; gap: 14px; }
}

/* icon sizing + polish */
svg { width: 16px; height: 16px; flex: none; }
.drop svg { width: 22px; height: 22px; margin-bottom: 4px; }
.compare .lbl svg { width: 14px; height: 14px; }
.cal .day b { white-space: nowrap; font-size: 11.5px; }
.sidebar { align-self: start; }
.bar-row { grid-template-columns: minmax(0, 1.25fr) minmax(50px, 1.5fr) auto; }

.cal-wrap { container-type: inline-size; }
@container (max-width: 560px) { .cal .full { display: none; } .cal .short { display: inline; } }

/* ---------- Auto Trading Journal web app additions ---------- */
.brand-img { width: 30px; height: 30px; border-radius: 8px; }
.demo-bar { background: linear-gradient(90deg, #0b1020, #1e2a5a); color: #fff; text-align: center; font-size: 13.5px; padding: 9px 16px; }
.demo-bar a { color: #a9b8ff; font-weight: 600; margin-left: 6px; }
.sidebar-foot { gap: 12px; }
.plan-card { display: block; padding: 12px; border-radius: 12px; background: var(--accent-soft); color: var(--text); text-decoration: none; font-size: 12.5px; }
.plan-card:hover { text-decoration: none; filter: brightness(.98); }
.plan-card span { color: var(--muted); } .plan-card .plan-cta { color: var(--accent-text); font-weight: 600; display: block; }
.plan-card.expired { background: var(--neg-soft); } .plan-card.expired .plan-cta { color: var(--neg); margin-top: 4px; }
.plan-card .meter span { background: var(--accent); }
.account { position: relative; }
.account summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px; border-radius: 10px; }
.account summary::-webkit-details-marker { display: none; }
.account summary:hover { background: var(--surface-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; } .who b { font-size: 13px; color: var(--text); }
.who span { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.account .menu { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,.18); padding: 6px; z-index: 30; }
.account .menu a, .account .menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border-radius: 8px; border: 0; background: none;
  font: 500 13px inherit; font-family: inherit; color: var(--text-2); cursor: pointer; text-decoration: none; text-align: left; }
.account .menu a:hover, .account .menu button:hover { background: var(--surface-2); color: var(--text); }
.account .menu form { margin: 0; }
.getting-started { background: linear-gradient(135deg, var(--accent-soft), var(--surface) 60%); }
.onboard { display: flex; flex-direction: column; gap: 18px; }
.ob-steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.ob-steps li { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 500; color: var(--muted); }
.ob-steps li span { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.ob-steps li.on { color: var(--accent-text); border-color: var(--accent); } .ob-steps li.on span { background: var(--accent); color: var(--on-accent); }
.ob-steps li.done span { background: var(--pos); color: #fff; }
.rule-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rule-card { display: grid; grid-template-columns: 1fr 110px; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); cursor: text; }
.rule-card .rc-t { font-weight: 600; font-size: 14px; } .rule-card .rc-d { font-size: 12.5px; color: var(--muted); grid-row: 2; }
.rule-card input { grid-row: 1 / 3; grid-column: 2; font-size: 18px; font-weight: 600; text-align: right; height: 44px; }
.choice { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; }
.choice:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.choice b { font-size: 15px; } .choice span:last-child { font-size: 13px; color: var(--muted); }
.choice-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; margin-bottom: 6px; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 260px; border: 2px dashed var(--border-strong);
  border-radius: 16px; cursor: pointer; text-align: center; padding: 24px; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dz-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; margin-bottom: 6px; }
.dz-ic svg { width: 26px; height: 26px; } .dropzone b { font-size: 17px; }
.howto { border-bottom: 1px solid var(--border); } .howto summary { cursor: pointer; padding: 10px 0; font-weight: 600; font-size: 14px; }
.howto p { margin: 0 0 12px; font-size: 13.5px; color: var(--text-2); }
.map-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.plan-status { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.plan-status.expired { border-color: var(--neg); background: var(--neg-soft); }
.plan { position: relative; } .plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan-price { font-size: 34px; font-weight: 700; letter-spacing: -.03em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.plan-price small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.danger-zone { border-color: color-mix(in srgb, var(--neg) 35%, var(--border)); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.alert-warn ul { color: inherit; }
@media (max-width: 760px) { .rule-cards { grid-template-columns: 1fr; } .account .menu { bottom: auto; top: calc(100% + 6px); left: auto; width: 220px; } .who { display: none; } }
.nav .mobile-only { display: none; }
@media (max-width: 760px) { .nav .mobile-only { display: flex; } }

/* brokers page */
.broker-grid { display: grid; gap: 12px; }
.broker-card > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; }
.broker-card > summary::-webkit-details-marker { display: none; }
.broker-mark { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 17px; flex: none;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.s-connected .broker-mark { background: var(--pos-soft); color: var(--pos); border-color: transparent; }
.s-expired .broker-mark, .s-error .broker-mark { background: var(--neg-soft); color: var(--neg); border-color: transparent; }
.broker-name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.broker-name b { font-size: 15px; }
.broker-body { padding: 0 20px 20px 74px; display: flex; flex-direction: column; gap: 14px; }
.broker-actions { gap: 8px; } .broker-actions form { margin: 0; display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.redir { word-break: break-all; }
@media (max-width: 760px) { .broker-body { padding: 0 16px 16px; } }
.imp-bar { background: #3b1d63; color: #fff; text-align: center; font-size: 13.5px; padding: 8px 16px; display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.imp-bar button { background: #fff; color: #3b1d63; border: 0; border-radius: 6px; padding: 4px 10px; font: 600 12.5px inherit; font-family: inherit; cursor: pointer; }
.announce { text-align: center; font-size: 13.5px; padding: 8px 16px; background: var(--accent-soft); color: var(--accent-text); }
.announce.warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- first-time tour ---------- */
.tour-overlay { position: fixed; inset: 0; z-index: 100; }
.tour-overlay[hidden] { display: none; }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(11, 16, 32, .58); outline: 2px solid #8fa2ff; outline-offset: 0;
  transition: top .3s ease, left .3s ease, width .3s ease, height .3s ease; pointer-events: none; }
.tour-hole[hidden] { display: block; top: 50%; left: 50%; width: 0; height: 0; outline: 0; }
.tour-card { position: fixed; z-index: 101; width: 360px; max-width: calc(100vw - 32px); background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 16px; padding: 18px 18px 16px; box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .45);
  transition: top .3s ease, left .3s ease; }
.tour-card.center { top: 50% !important; left: 50% !important; transform: translate(-50%, -50%); width: 420px !important; padding: 26px 24px 20px; }
.tour-card:focus { outline: none; }
.tour-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tour-count { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); }
.tour-skip { border: 0; background: none; color: var(--muted); font: 500 12.5px inherit; font-family: inherit; cursor: pointer; padding: 4px; }
.tour-skip:hover { color: var(--text); }
.tour-card h3 { font-size: 17px; letter-spacing: -.01em; margin: 0 0 6px; color: var(--text); }
.tour-card.center h3 { font-size: 21px; }
.tour-card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.tour-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.tour-dots { display: flex; gap: 5px; } .tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.tour-dots i.on { background: var(--accent); width: 16px; border-radius: 99px; }
.tour-actions { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.tour-actions .btn { height: 36px; }
@media (prefers-reduced-motion: reduce) { .tour-hole, .tour-card { transition: none; } }
@media (max-width: 700px) { .tour-card.center { width: calc(100vw - 32px) !important; } }

/* Screen-reader-only text */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lbl-s { display: none; }

/* Trade tables become cards on phones: symbol + P&L on top, date + rule check below */
@media (max-width: 760px) {
  .ttable thead { display: none; }
  .ttable, .ttable tbody { display: block; }
  .ttable tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 4px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .ttable td { padding: 0; border: 0; white-space: normal; background: none !important; }
  .ttable .c-sym { grid-column: 1; grid-row: 1; } .ttable .c-pnl { grid-column: 2; grid-row: 1; text-align: right; }
  .ttable .c-date { grid-column: 1; grid-row: 2; display: flex; gap: 8px; align-items: baseline; color: var(--muted); font-size: 12.5px; }
  .ttable .c-date .sub { font-size: 12px; }
  .ttable .c-rules { grid-column: 2; grid-row: 2; text-align: right; }
  .ttable .c-type, .ttable .c-side, .ttable .c-qty, .ttable .c-entry, .ttable .c-exit, .ttable .c-rev { display: none; }
  .ttable tr.link:active { background: var(--surface-2); }
}

/* Launch price + founding-member plan */
.was { color: var(--muted); font-weight: 600; font-size: .55em; text-decoration-thickness: 2px; vertical-align: .3em; margin-right: 2px; }
.founding-plan { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr); gap: 24px; align-items: center;
  border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--surface) 65%); }
.fp-cta .btn, .fp-cta form { margin-top: 0 !important; }
.plan-card .plan-offer { display: block; margin-top: 6px; font-weight: 600; color: var(--pos); }
@media (max-width: 760px) { .founding-plan { grid-template-columns: 1fr; gap: 14px; } }

/* ------------------------------------------------------------------ glass + the psychology background
   A living neural network drifts behind every app page (static/neuro.js); cards and the sidebar are
   frosted glass over it, in both themes. */
.neuro { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; display: block; }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(900px 600px at 80% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 65%),
              radial-gradient(700px 500px at 0% 100%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%); }
.card, .sidebar, .plan-card {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.35); backdrop-filter: blur(16px) saturate(1.35);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .07), 0 18px 40px -24px rgb(4 10 30 / .45);
}
.card { border-color: color-mix(in srgb, var(--accent) 12%, var(--border)); }
.sidebar { background: color-mix(in srgb, var(--surface) 60%, transparent); }
:root[data-theme="light"] .card, :root[data-theme="light"] .sidebar { box-shadow: inset 0 1px 0 rgb(255 255 255 / .9), 0 14px 32px -22px rgb(30 50 110 / .35); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .card { box-shadow: inset 0 1px 0 rgb(255 255 255 / .9), 0 14px 32px -22px rgb(30 50 110 / .35); } }

/* ------------------------------------------------------------------ the trading mind (dashboard) */
.mind { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); overflow: hidden; }
.mind-stage { position: relative; min-height: 440px; cursor: grab; touch-action: pan-y; isolation: isolate;
  background: radial-gradient(70% 70% at 50% 45%, #0d2a6b 0%, #071434 45%, #030817 100%); border-right: 1px solid var(--border); }
.mind-stage:active { cursor: grabbing; }
.mind-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mind-stage.no-gl::after { content: "Your browser can't draw the 3D view, but the regions are listed beside it."; position: absolute; inset: auto 20px 20px; color: #8fb3ff; font-size: 12.5px; }
.mind-hud { position: absolute; left: 16px; right: 16px; top: 14px; display: flex; justify-content: space-between; gap: 12px;
  font: 11.5px/1 ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace; letter-spacing: .04em; text-transform: uppercase; color: #8fb3ff; pointer-events: none; }
.mind-hud span { display: inline-flex; align-items: center; gap: 8px; }
.mind-live { width: 7px; height: 7px; border-radius: 50%; background: #6db4ff; box-shadow: 0 0 10px #6db4ff; animation: mindblink 1.8s infinite; }
@keyframes mindblink { 50% { opacity: .3; } }
.mind-hint { position: absolute; right: 16px; bottom: 12px; font: 11px ui-monospace, Menlo, monospace; color: #6f8fc9; pointer-events: none; }
.mind-label { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; margin: -12px 0 0 14px; padding: 8px 11px; border-radius: 10px;
  display: grid; gap: 2px; font-size: 12px; color: #dbe8ff; white-space: nowrap;
  background: rgb(6 14 34 / .72); border: 1px solid rgb(120 170 255 / .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 0 24px rgb(61 139 255 / .25); transition: transform .25s cubic-bezier(.2,.7,.2,1); }
.mind-label b { font-size: 13px; color: #fff; } .mind-label span { color: #9fb6e3; font: 11.5px ui-monospace, Menlo, monospace; }
.mind-label.stress { border-color: rgb(255 140 120 / .45); box-shadow: 0 0 24px rgb(255 97 112 / .25); }
.mind-side { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.mind-sum { margin: 0; }
.mind-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.mind-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 7px; align-items: center;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  cursor: default; transition: border-color .2s, background .2s, transform .2s; }
.mind-row:hover, .mind-row.on { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); }
.mind-row.stress.on, .mind-row.stress:hover { border-color: color-mix(in srgb, var(--neg) 55%, var(--border)); background: color-mix(in srgb, var(--neg) 9%, var(--surface-2)); }
.mind-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mind-dot { width: 10px; height: 10px; border-radius: 50%; background: #6cc8ff; box-shadow: 0 0 10px #6cc8ff; }
.mind-row.stress .mind-dot { background: #ff7a6b; box-shadow: 0 0 10px #ff7a6b; }
.mind-name { display: flex; flex-direction: column; min-width: 0; } .mind-name b { font-weight: 600; }
.mind-name span, .mind-val span { font: 11.5px ui-monospace, Menlo, monospace; color: var(--muted); }
.mind-val { text-align: right; display: flex; flex-direction: column; } .mind-val b { font-variant-numeric: tabular-nums; }
.mind-bar { grid-column: 2 / -1; height: 4px; border-radius: 99px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.mind-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2f6dff, #7fd6ff); }
.mind-row.stress .mind-bar i { background: linear-gradient(90deg, #ffb547, #ff5d6c); }
.mind-note { margin: auto 0 0; }
@media (max-width: 960px) { .mind { grid-template-columns: 1fr; } .mind-stage { min-height: 340px; border-right: 0; border-bottom: 1px solid var(--border); } }
@media (prefers-reduced-motion: reduce) { .mind-live { animation: none; } .mind-label { transition: none; } }

/* ------------------------------------------------------------------ connect your broker (guided setup) */
.wiz { display: flex; flex-direction: column; gap: 18px; max-width: 1180px; }
.wiz-q { font-size: 18px; letter-spacing: -.01em; margin: 6px 0 0; }
.wiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.wiz-tile { display: grid; grid-template-columns: 48px minmax(0, 1fr) 20px; align-items: center; gap: 14px; padding: 16px 18px;
  color: inherit; text-decoration: none; transition: transform .18s, border-color .18s, box-shadow .18s; cursor: pointer; }
.wiz-tile:hover { text-decoration: none; transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--accent) 60%, transparent); }
.wiz-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wiz-mark { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; font-size: 20px; color: #fff;
  background: linear-gradient(150deg, var(--bm, #4c9dff), color-mix(in srgb, var(--bm, #4c9dff) 55%, #000)); box-shadow: 0 8px 20px -10px var(--bm, #4c9dff); }
.b-zerodha { --bm: #3d7ff0; } .b-upstox { --bm: #6b4bd8; } .b-dhan { --bm: #10a37f; } .b-fyers { --bm: #2563eb; } .b-angel { --bm: #f08a24; }
.wiz-other .wiz-mark { --bm: #64748b; }
.wiz-tile-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .wiz-tile-body b { font-size: 16px; }
.wiz-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .wiz-chips .chip svg { width: 13px; height: 13px; }
.wiz-go { color: var(--muted); } .wiz-go svg { width: 18px; height: 18px; } .wiz-tile:hover .wiz-go { color: var(--accent-text); }
.wiz-other { display: block; padding: 0; } .wiz-other > summary { list-style: none; display: grid; grid-template-columns: 48px minmax(0, 1fr) 20px; align-items: center; gap: 14px; padding: 16px 18px; }
.wiz-other > summary::-webkit-details-marker { display: none; } .wiz-other[open] .wiz-go { transform: rotate(90deg); }
.wiz-other-body { padding: 0 18px 18px; } .wiz-other[open] { grid-column: 1 / -1; }
.wiz-dl { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.wiz-dl li { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); border: 1px solid var(--border); font-size: 13px; }
.wiz-dl span { color: var(--muted); font-size: 12.5px; }
.wiz-why .card b { display: flex; align-items: center; gap: 8px; } .wiz-why svg { width: 16px; height: 16px; color: var(--accent-text); }
.wiz-why .hint { margin: 6px 0 0; }
.wiz-skip { margin: 0; font-size: 13.5px; } .wiz-skip a { color: var(--muted); }
.wiz-back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); margin-bottom: 4px; } .wiz-back svg { width: 14px; height: 14px; }

.wiz-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.wiz-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.wiz-step { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; padding: 18px 20px; }
.wiz-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(150deg, var(--bm, var(--accent)), color-mix(in srgb, var(--bm, var(--accent)) 60%, #000)); box-shadow: 0 6px 16px -8px var(--bm, var(--accent)); }
.wiz-step h3 { margin: 4px 0 6px; font-size: 15.5px; color: var(--text); }
.wiz-step p { margin: 0 0 12px; color: var(--text-2); font-size: 14px; }
.wiz-step-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.fill-table { width: 100%; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-top: 4px; }
.fill-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; }
.fill-row + .fill-row { border-top: 1px solid var(--border); }
.fill-k { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.fill-v { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fill-v code { font: 500 13px/1.4 ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.fill-v code.copyable { color: var(--accent-text); } .fill-v code.plain { color: var(--text-2); font-family: inherit; }
.fill-v .hint { font-size: 12px; }
.btn.copied { border-color: var(--pos); color: var(--pos); }
.wiz-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
.wiz-form { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); box-shadow: 0 24px 50px -30px color-mix(in srgb, var(--accent) 70%, transparent); }
.wiz-form h2, .wiz-cadence h2 { font-size: 15px; } .wiz-form > .hint { margin: 4px 0 14px; }
.pw-wrap { position: relative; display: block; } .pw-wrap input { width: 100%; padding-right: 58px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--accent-text); font: 600 12px inherit; cursor: pointer; padding: 6px; }
.wiz-cta { height: 44px; justify-content: center; font-size: 14.5px; }
.wiz-login { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); } .wiz-login h3 { margin: 0; color: var(--text); }
.wiz-cadence .hint { margin: 8px 0; }
.wiz-safe b { display: flex; align-items: center; gap: 8px; } .wiz-safe svg { width: 16px; height: 16px; color: var(--pos); }
.wiz-safe ul { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); display: grid; gap: 4px; }
.wiz-done b { color: inherit; } .wiz-done a { font-weight: 600; margin-left: 4px; }
@media (max-width: 960px) { .wiz-cols { grid-template-columns: 1fr; } .wiz-side { position: static; } }
@media (max-width: 640px) {
  .wiz-grid { grid-template-columns: 1fr; } .wiz-step { grid-template-columns: 1fr; padding: 16px; } .wiz-num { width: 30px; height: 30px; }
  .fill-row { grid-template-columns: minmax(0, 1fr) auto; } .fill-k { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------------ the daily broker login popup */
.dl-pop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px;
  background: rgb(3 7 18 / .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .22s ease; }
.dl-pop.on { opacity: 1; }
.dl-card { position: relative; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-x: hidden; overflow-y: auto; padding: 26px 24px 18px; border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), 0 40px 90px -30px rgb(0 0 0 / .7), 0 0 0 1px rgb(255 255 255 / .02), 0 0 60px -20px color-mix(in srgb, var(--accent) 50%, transparent);
  transform: translateY(14px) scale(.97); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.dl-pop.on .dl-card { transform: none; }
.dl-x { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border-radius: 10px; border: 0; background: none; color: var(--muted); font-size: 22px; cursor: pointer; }
.dl-x:hover { background: var(--surface-2); color: var(--text); }
.dl-hero { position: relative; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; margin-bottom: 14px;
  background: linear-gradient(150deg, #4c9dff, #1b4fd8); box-shadow: 0 10px 30px -10px #4c9dff; }
.dl-hero svg { width: 24px; height: 24px; position: relative; }
.dl-orb { position: absolute; inset: -6px; border-radius: 20px; border: 1px solid rgb(109 180 255 / .45); animation: dlpulse 2.4s ease-out infinite; }
@keyframes dlpulse { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.dl-kicker { margin: 0; font-size: 13px; font-weight: 600; color: var(--accent-text); }
.dl-card h2 { font-size: 20px; letter-spacing: -.02em; margin: 4px 0 6px; line-height: 1.25; }
.dl-sub { margin: 0 0 16px; color: var(--text-2); font-size: 13.5px; }
.dl-list { display: grid; gap: 10px; }
.dl-row { padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface-2) 75%, transparent); }
.dl-row-top { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.dl-row .wiz-mark { width: 40px; height: 40px; border-radius: 12px; font-size: 17px; }
.dl-who { display: flex; flex-direction: column; min-width: 0; } .dl-who b { font-size: 15px; } .dl-who span { font-size: 12.5px; color: var(--muted); }
.dl-go { height: 40px; padding: 0 16px; white-space: nowrap; }
.dl-code { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-top: 12px; }
.dl-code label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 550; }
.dl-code label { min-width: 0; }
.dl-code input::placeholder { letter-spacing: 0; font-size: 13px; }
.dl-code input { width: 100%; min-width: 0; height: 40px; font-size: 16px; letter-spacing: .15em; text-align: center; }
.dl-code .btn { height: 40px; }
.dl-hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.dl-err { margin: 6px 0 0; font-size: 12.5px; color: var(--neg); }
.dl-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.dl-why { margin-top: 8px; font-size: 12.5px; color: var(--muted); } .dl-why summary { cursor: pointer; padding: 4px 0; }
.dl-why p { margin: 4px 0 0; }
html.dl-open { overflow: hidden; }
@media (max-width: 480px) { .dl-code { grid-template-columns: 1fr 1fr; } .dl-code .btn { grid-column: 1 / -1; } .dl-card { padding: 22px 16px 14px; } }
@media (prefers-reduced-motion: reduce) { .dl-pop, .dl-card { transition: none; } .dl-orb { animation: none; } }
