/* Crown Pips members app — same brand as crownpips.com: paper ground, ink type, one gold accent.
   Hand-written, no build step. Mobile-first; no inline styles anywhere (CSP style-src 'self'). */

@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque.woff2") format("woff2-variations"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono.woff2") format("woff2-variations"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Fallback"; src: local("Arial"), local("Helvetica"), local("Liberation Sans"); size-adjust: 104.8%; ascent-override: 88.7%; descent-override: 25.8%; line-gap-override: 0%; }

:root {
  color-scheme: light;
  --bg: #FAFAF7; --surface: #FFFFFF; --sunk: #F1F0EA; --ink: #14161C; --ink-2: #262933; --muted: #5A5F69;
  --line: #E4E2DA; --line-strong: #CBC8BD;
  --gold: #C9972F; --gold-ink: #8A5F12; --gold-soft: #F6EBCF; --gold-line: #E7D29C;
  --bull: #1C7F55; --bull-ink: #176B47; --bull-soft: #E3F2EA;
  --bear: #B93A33; --bear-ink: #9E2F29; --bear-soft: #F8E5E3;
  --font: "Bricolage Grotesque", "Bricolage Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --rail: 252px; --top: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: 1.25rem; font-weight: 750; }
h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration-color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-color: var(--ink); }
img, svg { display: block; max-width: 100%; }
code, kbd, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
code { font-size: .9em; background: var(--sunk); border: 1px solid var(--line); border-radius: 6px; padding: .05em .4em; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--gold-ink); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--gold-soft); color: var(--ink); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--ink); color: #fff; padding: .7em 1em; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.mt { margin-top: 20px; }
.mt-sm { margin-top: 10px; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- icons */
.ic { width: 1.15em; height: 1.15em; flex: none; }
.ic-lg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: .65em 1.2em; border-radius: 999px; border: 1.5px solid transparent; font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.1; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease); white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-2); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #D6A53C; }
.btn-line { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); padding-inline: .7em; }
.btn-ghost:hover { background: var(--sunk); }
.btn-danger { background: var(--surface); border-color: #E3B7B3; color: var(--bear-ink); }
.btn-danger:hover { background: var(--bear-soft); border-color: var(--bear); }
.btn-sm { min-height: 36px; padding: .45em .9em; font-size: .875rem; }
.btn-block { width: 100%; white-space: normal; text-align: center; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; cursor: pointer; min-height: 24px; }

/* ---------------------------------------------------------------- app shell */
.shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: var(--top); padding: 8px 16px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.08rem; letter-spacing: -.015em; text-decoration: none; min-height: 44px; white-space: nowrap; }
.brand svg { width: 30px; height: 26px; color: var(--gold); }
.brand small { font-family: var(--mono); font-size: .7rem; font-weight: 600; color: var(--gold-ink); background: var(--gold-soft); border: 1px solid var(--gold-line); padding: .15em .5em; border-radius: 999px; letter-spacing: 0; }
.menu-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font: inherit; font-weight: 650; cursor: pointer; color: var(--ink); }
.rail { display: none; }
.nav { display: flex; flex-direction: column; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; text-decoration: none; font-weight: 550; color: var(--muted); }
.nav a:hover { background: var(--sunk); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: inset 3px 0 0 var(--gold), 0 1px 0 var(--line); }
.nav .count { margin-left: auto; font-family: var(--mono); font-size: .75rem; font-weight: 700; min-width: 24px; text-align: center; padding: .1em .45em; border-radius: 999px; background: var(--ink); color: #fff; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 12px; }
.pop-nav { margin: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--ink); padding: 10px; }
.pop-nav:popover-open { inset: auto; top: calc(var(--top) + 6px); right: 12px; left: auto; position: fixed; width: min(320px, calc(100vw - 24px)); max-height: calc(100vh - var(--top) - 24px); overflow: auto; box-shadow: 0 30px 60px -30px rgba(20, 22, 28, .45); }
@media (min-width: 960px) { .pop-nav { display: none; } }
.pop-nav::backdrop { background: rgba(20, 22, 28, .2); }
.who { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
.who b { color: var(--ink); font-size: .95rem; }
.content { width: 100%; max-width: 1140px; padding: 24px 16px 40px; outline: none; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.page-head p { color: var(--muted); max-width: 62ch; margin-top: 8px; }
.crumb { font-size: .875rem; color: var(--muted); margin-bottom: 6px; }
.crumb a { color: var(--muted); }
@media (min-width: 960px) {
  .shell { grid-template-columns: var(--rail) minmax(0, 1fr); grid-template-rows: 1fr auto; }
  .topbar { display: none; }
  .rail { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 14px; border-right: 1px solid var(--line); background: var(--bg); grid-row: 1 / span 2; }
  .rail .brand { padding: 0 8px; margin-bottom: 6px; }
  .rail-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; }
  .content { padding: 36px 40px 56px; }
  .foot { grid-column: 2; }
  html { scroll-padding-top: 16px; }
}

/* ---------------------------------------------------------------- footer risk notice */
.foot { border-top: 1px solid var(--line); padding: 20px 16px 28px; color: var(--muted); font-size: .85rem; line-height: 1.55; }
.foot p { max-width: 96ch; }
.foot strong { color: var(--ink); }
.foot a { color: var(--ink); font-weight: 600; }
.foot .links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; }
.foot .links a { display: inline-flex; align-items: center; min-height: 24px; font-weight: 500; color: var(--muted); }
@media (min-width: 960px) { .foot { padding-inline: 40px; } }

/* ---------------------------------------------------------------- panels and grids */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; min-width: 0; }
.panel-sunk { background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; min-width: 0; }
.panel > h2, .panel-sunk > h2, .panel-head { margin-bottom: 14px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 14px; }
.panel-head h2 { margin: 0; }
.panel p + p { margin-top: 10px; }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .grid-side { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); }
  .span-2 { grid-column: 1 / -1; }
}
@media (min-width: 1100px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 760px) and (max-width: 1099.98px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- the membership slip (overview) */
.slip { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; min-width: 0; box-shadow: 0 30px 60px -48px rgba(20, 22, 28, .5); }
.slip-top { background: var(--ink); color: #fff; padding: 20px 22px 26px; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; position: relative; overflow: hidden; }
.slip-top::after { content: ""; position: absolute; right: -40px; bottom: -70px; width: 220px; height: 190px; background: url("../img/crown-mark.svg") no-repeat center / contain; opacity: .1; pointer-events: none; }
.slip-top .label { font-size: .85rem; color: #C9CBD2; }
.slip-top .slip-plan { font-size: clamp(1.6rem, 3.5vw, 2.1rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin-top: 4px; }
.slip-top .price { font-family: var(--mono); font-size: .9rem; color: #E6C77A; margin-top: 6px; }
.perf { height: 18px; margin-top: -9px; background: radial-gradient(circle at 9px 9px, var(--bg) 7.5px, transparent 8.5px) 0 0 / 22px 18px repeat-x; position: relative; }
.slip-rows { margin: 0; padding: 4px 22px 14px; }
.slip-row { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); align-items: baseline; }
.slip-row:last-child { border-bottom: 0; }
.slip-row dt { font-size: .875rem; color: var(--muted); }
.slip-row dd { margin: 0; font-weight: 650; min-width: 0; overflow-wrap: anywhere; }
.slip-foot { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 22px 20px; }

/* ---------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; line-height: 1; padding: .42em .7em; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.badge.plain::before { display: none; }
.badge-wrap { white-space: normal; line-height: 1.3; border-radius: 10px; overflow-wrap: anywhere; }
.b-ok { background: var(--bull-soft); color: var(--bull-ink); }
.b-warn { background: var(--gold-soft); color: #6E4C0E; border-color: var(--gold-line); }
.b-bad { background: var(--bear-soft); color: var(--bear-ink); }
.b-off { background: var(--sunk); color: var(--muted); border-color: var(--line); }
.b-ink { background: var(--ink); color: #fff; }
.b-gold { background: var(--gold-soft); color: #5C3F08; border-color: var(--gold); }
.slip-top .b-off { background: #2A2D36; color: #DADCE2; border-color: #3A3D47; }
.side { font-family: var(--mono); font-size: .75rem; font-weight: 700; padding: .3em .6em; border-radius: 6px; letter-spacing: .02em; }
.side-buy { background: var(--bull-soft); color: var(--bull-ink); }
.side-sell { background: var(--bear-soft); color: var(--bear-ink); }
.tag { display: inline-block; font-size: .78rem; font-weight: 650; padding: .2em .55em; border-radius: 6px; background: var(--sunk); color: var(--muted); border: 1px solid var(--line); }

/* ---------------------------------------------------------------- quick actions */
.actions { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); list-style: none; margin: 0; padding: 0; }
@media (min-width: 520px) { .actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.action { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); text-decoration: none; min-height: 76px; height: 100%; }
a.action:hover { border-color: var(--ink); }
.action .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-ink); flex: none; }
.action b { display: block; font-size: .98rem; }
.action span { color: var(--muted); font-size: .875rem; }
.action.done .ico { background: var(--bull-soft); color: var(--bull-ink); }
.action.locked { background: var(--sunk); }
.action.locked .ico { background: var(--surface); color: var(--muted); }

/* ---------------------------------------------------------------- tables */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; font-weight: 700; color: var(--muted); background: var(--sunk); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
td a { font-weight: 650; }
.cell-sub { display: block; color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
/* Stack table rows as cards on phones */
@media (max-width: 719.98px) {
  .table-cards { border: 0; background: transparent; overflow: visible; position: relative; }
  .table-cards table, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards thead { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .table-cards thead { top: 0; left: 0; }
  .table-cards thead tr, .table-cards thead th { display: block; width: auto; }
  .table-cards tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 14px; margin-bottom: 10px; }
  .table-cards td { border-bottom: 1px dashed var(--line); padding: 9px 0; display: grid; grid-template-columns: minmax(96px, 36%) minmax(0, 1fr); gap: 10px; text-align: left; }
  .table-cards td.num { text-align: left; }
  .table-cards td::before { content: attr(data-label); font-family: var(--font); font-size: .8rem; font-weight: 650; color: var(--muted); }
  .table-cards td:last-child { border-bottom: 0; }
  .table-cards td[data-label=""]::before { content: none; }
  .table-cards td[data-label=""] { display: block; }
  .table-cards td > .cell-sub { grid-column: 2; }
  .table-cards td > .badge, .table-cards td > .side { justify-self: start; }
}

/* ---------------------------------------------------------------- calls list */
.calls { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.call { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px 16px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.call:last-child { border-bottom: 0; }
.call-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.call-head b { font-size: 1.05rem; letter-spacing: -.01em; }
.call-head time { color: var(--muted); font-size: .85rem; }
.levels { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--mono); font-size: .88rem; font-variant-numeric: tabular-nums; }
.levels span { white-space: nowrap; }
.levels i { font-style: normal; color: var(--muted); margin-right: 4px; }
@media (min-width: 760px) { .call { grid-template-columns: minmax(220px, 1fr) minmax(0, 1.6fr); align-items: center; } }

/* Teaser for members without a plan: placeholder rows only (no real data in the HTML), blurred */
.teaser { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.teaser-rows { padding: 8px 20px; filter: blur(5px); opacity: .7; user-select: none; }
.teaser-cta { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: linear-gradient(180deg, rgba(250, 250, 247, .55), rgba(250, 250, 247, .92)); }
.teaser-cta .box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; max-width: 420px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; box-shadow: 0 24px 48px -32px rgba(20, 22, 28, .5); }

/* ---------------------------------------------------------------- forms */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-weight: 650; font-size: .92rem; }
.hint { color: var(--muted); font-size: .85rem; }
.err { color: var(--bear-ink); font-size: .875rem; font-weight: 600; display: flex; gap: 6px; align-items: flex-start; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="search"], input[type="url"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line-strong); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: #A9A598; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-soft), 0 0 0 5px var(--gold-ink); }
[aria-invalid="true"] { border-color: var(--bear) !important; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 38px; }
.check { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; font-size: .95rem; }
.field label.check { font-weight: 450; font-size: .95rem; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); }
.radios { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.radios legend { font-weight: 650; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.radio { position: relative; }
.radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 650; cursor: pointer; }
.radio input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.radio input:focus-visible + span { outline: 3px solid var(--gold-ink); outline-offset: 2px; }
.form-row { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.filters { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); align-items: end; margin-bottom: 16px; }
@media (min-width: 720px) { .filters { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.inline-form { display: inline; }
.secret { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.secret output, .secret code { font-family: var(--mono); font-size: 1rem; font-weight: 600; background: var(--sunk); border: 1px dashed var(--line-strong); border-radius: 10px; padding: .55em .8em; overflow-wrap: anywhere; min-width: 0; }

/* ---------------------------------------------------------------- notices */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); margin-bottom: 14px; font-weight: 550; }
.flash.ok { border-color: #BFE0CE; background: var(--bull-soft); color: #134F36; }
.flash.error { border-color: #EBC2BE; background: var(--bear-soft); color: #7D241F; }
.flash.info { border-color: var(--gold-line); background: var(--gold-soft); color: #5C4A1E; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--gold-line); background: var(--gold-soft); color: #4D3D17; }
.notice strong { color: var(--ink); }
.notice.bad { border-color: #EBC2BE; background: var(--bear-soft); color: #6B201B; }
.notice > div > p + p { margin-top: 4px; }
.mb { margin-bottom: 20px; }
.risk { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--bear); border-radius: 14px; padding: 14px 16px; font-size: .92rem; color: #3E424B; }
.risk svg { color: var(--bear); margin-top: 2px; }
.risk strong { color: var(--ink); }

/* ---------------------------------------------------------------- plans */
.plans { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); max-width: 860px; }
@media (min-width: 680px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px 22px 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.plan.hot { background: var(--ink); color: #fff; border-color: var(--ink); }
.plan .ribbon { position: absolute; top: -12px; left: 20px; background: var(--gold); color: var(--ink); font-weight: 750; font-size: .8rem; padding: .32em .8em; border-radius: 999px; }
.plan .amount { font-size: clamp(2.4rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.plan .amount small { font-size: .95rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.plan.hot .amount small, .plan.hot .pnote, .plan.hot li { color: #C9CBD2; }
.plan .pnote { color: var(--muted); font-size: .92rem; }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; flex: 1; font-size: .94rem; }
.plan li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; color: var(--muted); }
.plan li svg { width: 16px; height: 16px; margin-top: 3px; color: var(--gold-ink); }
.plan.hot li svg { color: var(--gold); }
.plan.current { outline: 3px solid var(--gold); outline-offset: 3px; }
.plan.hot .btn-line { background: transparent; border-color: #fff; color: #fff; }

/* ---------------------------------------------------------------- KPIs + sparklines (admin) */
.kpis { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi .k { font-size: .85rem; color: var(--muted); font-weight: 600; }
.kpi .v { font-family: var(--mono); font-size: 1.6rem; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: anywhere; }
.kpi .s { font-size: .82rem; color: var(--muted); }
.kpi.key { background: var(--ink); color: #fff; border-color: var(--ink); }
.kpi.key .k, .kpi.key .s { color: #C9CBD2; }
.spark { width: 100%; height: 40px; margin-top: 6px; }
.spark polyline { fill: none; stroke: var(--gold-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark .base { stroke: var(--line); stroke-width: 1; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 48px; gap: 10px; align-items: center; font-size: .9rem; }
.bar-row meter { width: 100%; height: 12px; }
meter { -webkit-appearance: none; appearance: none; background: var(--sunk); border-radius: 6px; border: 0; }
meter::-webkit-meter-bar { background: var(--sunk); border-radius: 6px; border: 0; height: 12px; }
meter::-webkit-meter-optimum-value { background: var(--gold); border-radius: 6px; }
meter::-moz-meter-bar { background: var(--gold); border-radius: 6px; }

/* ---------------------------------------------------------------- chat + threads */
.chat { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.chat-log { display: flex; flex-direction: column; gap: 12px; padding: 18px; max-height: 520px; min-height: 160px; overflow-y: auto; background: linear-gradient(var(--bg), var(--bg)) padding-box; }
.msg { max-width: min(88%, 620px); padding: 11px 14px; border-radius: 16px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; }
.msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.error { align-self: flex-start; background: var(--bear-soft); color: #6B201B; border: 1px solid #EBC2BE; }
.msg.typing { color: var(--muted); font-style: italic; }
.msg-who { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .02em; color: var(--muted); margin-bottom: 4px; white-space: normal; }
.msg.me .msg-who { color: #C9CBD2; }
.chat-form { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.chat-form textarea { min-height: 64px; }
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.thread li { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: 14px 16px; }
.thread li.from-admin { border-left: 4px solid var(--gold); }
.thread li.from-system { background: var(--sunk); }
.thread .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.thread .meta b { color: var(--ink); }

/* ---------------------------------------------------------------- steps (setup guide) */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: flex; flex-direction: column; gap: 0; }
.steps > li { counter-increment: s; position: relative; padding: 0 0 22px 46px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: .82rem; font-weight: 700; background: var(--ink); color: #fff; }
.steps > li::after { content: ""; position: absolute; left: 14px; top: 34px; bottom: 4px; width: 2px; background: var(--line); }
.steps > li:last-child::after { display: none; }
.steps > li:last-child { padding-bottom: 0; }
.steps > li > b { display: block; margin-bottom: 4px; font-size: 1rem; }
.steps p, .steps li li { color: #3E424B; font-size: .95rem; }
.steps ul { margin: 6px 0 0; padding-left: 18px; }
.params { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 10px 0 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.params div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: .9rem; background: var(--surface); }
.params div:nth-child(odd) { background: #FCFCFA; }
.params div:last-child { border-bottom: 0; }
.params dt { color: #3E424B; min-width: 0; overflow-wrap: anywhere; }
.params dt code { font-size: .8rem; }
.params dd { margin: 0; font-family: var(--mono); font-weight: 650; text-align: right; }
@media (min-width: 900px) { .params { grid-template-columns: repeat(2, minmax(0, 1fr)); } .params div { border-right: 1px solid var(--line); } }

/* ---------------------------------------------------------------- misc */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none; font-weight: 650; font-size: .92rem; background: var(--surface); }
.tabs a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 14px; font-size: .9rem; color: var(--muted); }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty b { color: var(--ink); font-size: 1.05rem; }
.kv { display: grid; grid-template-columns: minmax(110px, 40%) minmax(0, 1fr); gap: 0; margin: 0; }
.kv dt, .kv dd { padding: 9px 0; border-bottom: 1px dashed var(--line); margin: 0; font-size: .92rem; }
.kv dt { color: var(--muted); padding-right: 10px; }
.kv dd { font-weight: 600; overflow-wrap: anywhere; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }
details.more { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
details.more > summary { cursor: pointer; padding: 12px 16px; font-weight: 650; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "+"; font-family: var(--mono); font-weight: 700; color: var(--gold-ink); }
details.more[open] > summary::after { content: "−"; }
details.more > div { padding: 0 16px 16px; }
.ai-out { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; font-size: .94rem; min-height: 48px; }
.ai-out:empty { display: none; }
pre.json { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: .8rem; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; max-height: 420px; overflow: auto; margin: 0; }
.preview-tg { max-width: 420px; background: #EAF3FB; border-radius: 16px; padding: 14px; }
.preview-tg div { background: #fff; border-radius: 14px 14px 14px 4px; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }

/* ---------------------------------------------------------------- public (auth) layout */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; }
.auth-side { display: none; }
.auth-main { display: flex; flex-direction: column; align-items: center; padding: 28px 16px 40px; outline: none; min-width: 0; }
.auth-card { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 20px; }
.auth-card .brand { align-self: flex-start; }
.auth-card h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); }
.auth-card .lede { color: var(--muted); }
.auth .foot { grid-column: 1 / -1; }
.desk { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at 30% 30%, #000 0%, transparent 70%); pointer-events: none; }
@media (min-width: 980px) {
  .auth { grid-template-columns: minmax(380px, 0.9fr) minmax(0, 1.1fr); }
  .auth-side { display: flex; position: relative; overflow: hidden; flex-direction: column; justify-content: space-between; gap: 32px; background: var(--ink); color: #fff; padding: 48px; grid-row: 1 / span 2; }
  .auth-side h2 { font-size: clamp(1.9rem, 2.6vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; max-width: 16ch; }
  .auth-side p { color: #C9CBD2; max-width: 44ch; }
  .auth-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
  .auth-side li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; color: #E3E4E8; }
  .auth-side li svg { color: var(--gold); width: 18px; height: 18px; margin-top: 3px; }
  .auth-side .brand svg { color: var(--gold); }
  .auth-side .mini-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .auth-side .mini-plans div { border: 1px solid #3A3D47; border-radius: 16px; padding: 14px; }
  .auth-side .mini-plans b { display: block; font-family: var(--mono); font-size: 1.4rem; color: #fff; }
  .auth-side .mini-plans span { color: #C9CBD2; font-size: .85rem; }
  .auth-side .mini-plans .hot { border-color: var(--gold); }
  .auth-side .mini-plans .hot { grid-column: 1 / -1; }
  .auth-card .brand.mobile-only { display: none; }
  .auth-main { justify-content: center; padding: 48px 32px; }
  .auth .foot { grid-column: 2; }
}
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.plan-pick { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--gold-line); background: var(--gold-soft); border-radius: var(--r-md); font-size: .92rem; color: #4D3D17; }
.plan-pick b { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print { .rail, .topbar, .foot .links, .btn { display: none !important; } }
button.action { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.action:hover { border-color: var(--ink); }
.action form { display: contents; }
select.select-sm { width: auto; min-height: 36px; padding-top: 4px; padding-bottom: 4px; font-size: .875rem; max-width: 100%; }
.cell-email { min-width: 0; overflow-wrap: anywhere; }
.demo-tag { display: inline-flex; align-items: center; align-self: flex-start; font-family: var(--mono); font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 999px; padding: .3em .7em; margin-left: auto; margin-right: 8px; }
.rail .demo-tag { margin: -4px 8px 4px; }

/* ---------------------------------------------------------------- polish: shared with crownpips.com */
.eyebrow { font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); font-weight: 600; display: inline-flex; align-items: center; gap: .6em; margin-bottom: 10px; }
.eyebrow::before { content: ""; width: .55em; height: .55em; border-radius: 2px; background: var(--gold); transform: rotate(45deg); flex: none; }
.row > .eyebrow { margin-bottom: 0; }
ul.stack, ul.stack-sm { list-style: none; margin: 0; padding: 0; }
h1 .ic, h2 .ic, h3 .ic { display: inline-block; vertical-align: -.14em; margin-right: .3em; color: var(--gold-ink); }
.panel, .chat, .kpi, .table-wrap { box-shadow: 0 1px 2px rgba(20, 22, 28, .04), 0 18px 40px -34px rgba(20, 22, 28, .35); }
.panel > h3, .panel h3.mt { font-size: .82rem; font-family: var(--mono); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.grid-top { align-items: start; }
.demo-tag { white-space: nowrap; }

/* membership slip: warm glow behind the crown */
.slip-top { background: radial-gradient(120% 140% at 100% 100%, rgba(201, 151, 47, .28) 0%, rgba(201, 151, 47, 0) 55%), var(--ink); }
.slip-top::after { opacity: .16; }

/* live dots + connection list (Algo) */
.dot { width: 9px; height: 9px; border-radius: 50%; background: #B9B6AB; flex: none; display: inline-block; }
.dot.on { background: var(--bull); box-shadow: 0 0 0 3px var(--bull-soft); }
.conn { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.conn li { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: #FCFCFA; }
.conn-main { display: flex; flex-direction: column; min-width: 0; }
.conn-main b { font-size: .98rem; }
.conn-main span, .conn-state span { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.conn-state { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-weight: 650; font-size: .88rem; }

/* yearly promo (members without a plan) */
.promo { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 22px 22px; border-radius: 22px; color: #fff; overflow: hidden;
  background: radial-gradient(110% 120% at 100% 0%, rgba(201, 151, 47, .32) 0%, rgba(201, 151, 47, 0) 60%), var(--ink); }
.promo .ribbon { align-self: flex-start; background: var(--gold); color: var(--ink); font-weight: 750; font-size: .78rem; padding: .3em .75em; border-radius: 999px; }
.promo h2 { color: #fff; }
.promo-price { font-size: clamp(2.2rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.promo-price small { font-size: .95rem; font-weight: 500; letter-spacing: 0; color: #C9CBD2; }
.promo-note { color: #C9CBD2; font-size: .94rem; }
.btn-ghost-light { background: transparent; color: #fff; border-color: #4A4E59; }
.btn-ghost-light:hover { border-color: #fff; }

/* AI chat */
.chat-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.chat-head form { margin: 0; }
.chat-avatar { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--ink); color: var(--gold); }
.chat-avatar svg { width: 26px; height: 22px; }
.chat-title h2 { font-size: 1.08rem; }
.chat-title p { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .84rem; margin-top: 3px; }
.chat-title .dot.on { width: 7px; height: 7px; box-shadow: 0 0 0 2px var(--bull-soft); }
@media (max-width: 520px) { .chat-head { grid-template-columns: 40px minmax(0, 1fr); } .chat-head form { grid-column: 1 / -1; } .chat-avatar { width: 40px; height: 40px; } }
.chat-log { background: radial-gradient(circle at 1px 1px, rgba(20, 22, 28, .05) 1px, transparent 0) 0 0 / 18px 18px, var(--bg); }
@media (min-width: 960px) { .chat-log { max-height: 560px; } }
.msg.bot { box-shadow: 0 1px 2px rgba(20, 22, 28, .05); }

/* ticket list (member) */
.tickets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tickets li { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: #FCFCFA; }
.tickets a { font-weight: 700; }

/* KPI key tile */
.kpi.key { background: radial-gradient(120% 140% at 100% 100%, rgba(201, 151, 47, .3) 0%, rgba(201, 151, 47, 0) 60%), var(--ink); }
.kpi .v small { font-family: var(--font); }

/* auth side: grid + warm glow + big crown */
@media (min-width: 980px) {
  .auth-side { background: radial-gradient(90% 70% at 100% 100%, rgba(201, 151, 47, .26) 0%, rgba(201, 151, 47, 0) 60%), var(--ink); }
  .auth-side::after { content: ""; position: absolute; right: -90px; bottom: -60px; width: 460px; height: 390px; background: url("../img/crown-mark.svg") no-repeat center / contain; opacity: .1; pointer-events: none; }
  .auth-side > * { position: relative; z-index: 1; }
  .auth-side .desk { position: absolute; z-index: 0; }
}
@media (max-width: 419.98px) { .menu-label { display: none; } .menu-btn { padding: 0 12px; } .topbar .demo-tag { margin-right: 4px; } }
.slip { display: flex; flex-direction: column; }
.slip-foot { margin-top: auto; }
.kv-wide { grid-template-columns: minmax(0, 1fr) fit-content(62%); }
.kv-wide dd { text-align: right; font-family: var(--mono); }
@media (min-width: 960px) { .chat-log { max-height: min(640px, calc(100vh - 250px)); min-height: 360px; } }
.slip-meter { margin: 0 22px 18px; padding: 14px 16px; border-radius: var(--r-md); background: var(--sunk); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; color: var(--muted); }
.slip-meter .mono { color: var(--ink); font-weight: 650; }
.slip-meter meter { width: 100%; height: 10px; }
.slip-meter meter::-webkit-meter-bar { height: 10px; background: #E6E4DC; }
p:not(.flash) > svg.ic { display: inline-block; vertical-align: -.15em; margin-right: .3em; color: var(--gold-ink); }
.params div { grid-template-columns: minmax(0, 1fr) auto; }
.params dd { overflow-wrap: anywhere; max-width: 11rem; }

/* ================================================================ v5: trading-algorithm software
   Accounts, live status, equity charts, the connect wizard, the algorithm library, Pro Trader, billing, admin switches. */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 14px; margin-bottom: 12px; }
.section-head h2, .section-title { font-size: 1.25rem; }
.pos { color: var(--bull-ink); }
.neg { color: var(--bear-ink); }
.small-v { font-size: 1.1rem !important; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ticks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; font-size: .94rem; color: #3E424B; }
.ticks li svg { width: 16px; height: 16px; margin-top: 3px; color: var(--gold-ink); }
.mono-area { font-family: var(--mono); font-size: .82rem; line-height: 1.45; }
.danger-zone { border-color: #EBC2BE; }
.risk-strong { border-left-width: 6px; background: #FFFBFA; }

/* ---- state pill (online / offline / waiting): always text + dot, never colour alone */
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 700; line-height: 1; padding: .45em .75em; border-radius: 999px; border: 1px solid var(--line); background: var(--sunk); color: var(--muted); white-space: nowrap; }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: #9A978C; flex: none; }
.pill-age { font-weight: 550; }
.pill-online { background: var(--bull-soft); color: var(--bull-ink); border-color: #BFE0CE; }
.pill-online .pill-dot { background: var(--bull); box-shadow: 0 0 0 0 rgba(28, 127, 85, .45); animation: ping 2.2s var(--ease) infinite; }
.pill-offline { background: var(--bear-soft); color: var(--bear-ink); border-color: #EBC2BE; }
.pill-offline .pill-dot { background: var(--bear); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(28, 127, 85, .45); } 70% { box-shadow: 0 0 0 7px rgba(28, 127, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(28, 127, 85, 0); } }

/* ---- account cards */
.acct-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .acct-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.acct-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0;
  box-shadow: 0 1px 2px rgba(20, 22, 28, .04), 0 18px 40px -34px rgba(20, 22, 28, .35); }
.acct-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
.acct-name { min-width: 0; }
.acct-name h3 { font-size: 1.08rem; }
.acct-name h3 a { text-decoration: none; }
.acct-name h3 a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.acct-name p { color: var(--muted); font-size: .85rem; margin-top: 4px; overflow-wrap: anywhere; }
.acct-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
@media (min-width: 520px) { .acct-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.acct-metrics > div { background: #FCFCFA; padding: 10px 12px; min-width: 0; }
.acct-metrics dt { font-size: .76rem; color: var(--muted); font-weight: 600; }
.acct-metrics dd { margin: 2px 0 0; font-family: var(--mono); font-weight: 650; font-size: 1.02rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.acct-metrics dd small { font-family: var(--font); font-weight: 500; color: var(--muted); font-size: .72rem; }
.acct-metrics dd.small { font-family: var(--font); font-size: .88rem; }
.acct-spark { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.spark-sm { width: 100%; height: 44px; display: block; }
.spark-sm .sl { fill: none; stroke: var(--gold-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-sm .sa { fill: var(--gold); opacity: .12; stroke: none; }
.spark-cap { font-size: .74rem; color: var(--muted); white-space: nowrap; }
.spark-empty { display: flex; align-items: center; height: 44px; font-size: .82rem; color: var(--muted); border-bottom: 1px dashed var(--line); }
.acct-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; border-top: 1px dashed var(--line); padding-top: 12px; font-size: .86rem; }
.acct-algo, .trade-state { display: inline-flex; align-items: center; gap: 6px; color: #3E424B; font-weight: 600; min-width: 0; }
.acct-algo svg { color: var(--gold-ink); }
.trade-state.on { color: var(--bull-ink); }
.trade-state.off { color: var(--muted); }

.empty-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: center; padding: 22px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface); }
@media (min-width: 760px) { .empty-card { grid-template-columns: 52px minmax(0, 1fr) auto; } }
.empty-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-ink); }
.empty-card b { font-size: 1.05rem; }

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.checklist li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .ck { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; color: transparent; }
.checklist .ck svg { width: 15px; height: 15px; }
.checklist li.done .ck { background: var(--bull); border-color: var(--bull); color: #fff; }
.checklist b { display: block; font-size: .96rem; }
.checklist span { font-size: .86rem; color: var(--muted); }

.lib-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lib-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: #FCFCFA; }
.lib-list a { text-decoration: none; display: flex; flex-direction: column; min-width: 0; }
.lib-list a:hover b { text-decoration: underline; text-decoration-color: var(--gold); }
.lib-list a span { font-size: .82rem; color: var(--muted); }

/* ---- stat tiles (account detail) */
.stats { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat .k { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat .v { font-family: var(--mono); font-size: 1.35rem; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat .s { font-size: .78rem; color: var(--muted); }
.stat:first-child { grid-column: 1 / -1; }
@media (min-width: 760px) { .stat:first-child { grid-column: auto; } }

/* ---- equity chart: single series, 2px line, 10% wash, hairline grid, hover crosshair */
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; gap: 2px; background: var(--surface); }
.seg a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; text-decoration: none; font-weight: 650; font-size: .85rem; color: var(--muted); }
.seg a[aria-current="true"] { background: var(--ink); color: #fff; }
.eq-chart { margin: 0; }
.eq-cap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 12px; }
.eq-last { font-family: var(--mono); font-size: 1.7rem; font-weight: 650; letter-spacing: -.02em; }
.eq-last small { font-family: var(--font); font-size: .85rem; color: var(--muted); font-weight: 500; }
.eq-chg { font-family: var(--mono); font-weight: 650; font-size: .92rem; }
.eq-cap .small { flex-basis: 100%; }
.eq-plot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.eq-y { display: flex; flex-direction: column; justify-content: space-between; padding: 6px 0; font-family: var(--mono); font-size: .72rem; color: var(--muted); text-align: right; height: 220px; }
.eq-area { position: relative; height: 220px; min-width: 0; touch-action: pan-y; }
.eq-area svg { width: 100%; height: 100%; display: block; overflow: visible; }
.eq-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.eq-fill { fill: var(--gold); opacity: .1; }
.eq-line { fill: none; stroke: var(--gold-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.eq-end-ring { stroke: var(--surface); stroke-width: 12; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.eq-end { stroke: var(--gold-ink); stroke-width: 8; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.eq-cross { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .45; }
.eq-tip { position: absolute; top: 4px; transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 10px; padding: 6px 10px; font-size: .8rem; line-height: 1.35; white-space: nowrap; pointer-events: none; box-shadow: 0 10px 24px -12px rgba(20, 22, 28, .6); }
.eq-tip b { font-family: var(--mono); }
.eq-x { display: flex; justify-content: space-between; gap: 10px; margin: 6px 0 0 56px; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
@media (max-width: 520px) { .eq-y, .eq-area { height: 170px; } .eq-x { margin-left: 46px; } }

/* ---- wizard */
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; counter-reset: none; }
.stepper li { position: relative; min-width: 0; }
.stepper li > a, .stepper li > span:first-child { text-decoration: none; }
.stepper li a, .stepper li { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.stepper li::before { content: ""; height: 4px; width: 100%; border-radius: 4px; background: var(--line); }
.stepper li.done::before { background: var(--bull); }
.stepper li.now::before { background: var(--gold); }
.st-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: .8rem; font-weight: 700; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--muted); }
.st-n svg { width: 14px; height: 14px; }
.stepper .done .st-n { background: var(--bull); border-color: var(--bull); color: #fff; }
.stepper .now .st-n { background: var(--ink); border-color: var(--ink); color: #fff; }
.st-l { font-size: .84rem; font-weight: 650; color: var(--muted); line-height: 1.25; }
.stepper .now .st-l { color: var(--ink); }
.stepper a { min-height: 44px; }
.stepper a:hover .st-l { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); }
@media (max-width: 640px) { .st-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } .stepper .now .st-l { position: static; width: auto; height: auto; clip-path: none; white-space: normal; grid-column: 1 / -1; } }
.step-tag { display: inline-block; font-family: var(--mono); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 999px; padding: .25em .6em; margin-right: 10px; vertical-align: .2em; }
.dl-grid { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .dl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dl-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: #FCFCFA; }
.dl-card > div { display: flex; flex-direction: column; min-width: 0; }
.dl-card > div span { font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.dl-card .btn { grid-column: 1 / -1; justify-self: start; }
.dl-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: var(--gold); }
.mini-steps { margin: 10px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; color: #3E424B; }
.mini-steps li::marker { font-family: var(--mono); font-weight: 700; color: var(--gold-ink); }
.mock-dialog { margin: 0; max-width: 460px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); overflow: hidden; box-shadow: 0 18px 40px -30px rgba(20, 22, 28, .5); }
.mock-dialog figcaption { background: var(--sunk); border-bottom: 1px solid var(--line); padding: 8px 12px; font-size: .8rem; font-weight: 650; color: var(--muted); }
.mock-dialog ul { list-style: none; margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.mock-dialog li { display: flex; align-items: center; gap: 10px; }
.mock-box { width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.mock-box.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.mock-box svg { width: 12px; height: 12px; }
.mock-url { margin-left: 28px; padding: 6px 10px; border: 1px solid var(--gold-line); background: var(--gold-soft); border-radius: 6px; overflow-wrap: anywhere; }
.live-state { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--sunk); }
.live-state b { display: block; font-size: 1.1rem; }
.live-state span { color: var(--muted); font-size: .9rem; }
.live-orb { width: 56px; height: 56px; border-radius: 50%; background: #CFCBBF; position: relative; }
.live-orb::after { content: ""; position: absolute; inset: 16px; border-radius: 50%; background: #fff; opacity: .55; }
.live-waiting .live-orb { animation: wait 1.6s ease-in-out infinite; }
@keyframes wait { 50% { opacity: .45; } }
.live-online { background: var(--bull-soft); border-color: #BFE0CE; }
.live-online .live-orb { background: var(--bull); box-shadow: 0 0 0 8px rgba(28, 127, 85, .12); }
.live-online span { color: #24553E; }
.live-offline { background: var(--bear-soft); border-color: #EBC2BE; }
.live-offline .live-orb { background: var(--bear); }
.live-offline span { color: #6B201B; }
.wiz-nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---- toggle switch (checkbox role=switch) */
.switch-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: start; }
.switch-row label { display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.switch { appearance: none; -webkit-appearance: none; width: 52px; height: 30px; border-radius: 999px; background: #C9C6BB; position: relative; cursor: pointer; margin: 0; transition: background-color .2s; border: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(20, 22, 28, .3); transition: transform .2s var(--ease); }
.switch:checked { background: var(--bull); }
.switch:checked::after { transform: translateX(22px); }
.switch:focus-visible { outline: 3px solid var(--gold-ink); outline-offset: 2px; }
.trade-switch { padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--sunk); }
.trade-switch.on { background: var(--bull-soft); border-color: #BFE0CE; }

/* ---- algorithm + risk pickers */
.algo-pick, .risk-pick { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.algo-pick legend, .risk-pick legend { font-weight: 650; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.algo-opt { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.algo-opt input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); }
.algo-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--gold); }
.algo-opt.disabled { background: var(--sunk); cursor: not-allowed; }
.algo-opt.disabled .ao-body { opacity: .75; }
.ao-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ao-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.risk-opts { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .risk-opts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.risk-opt { position: relative; }
.risk-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.risk-opt > span { display: flex; flex-direction: column; gap: 2px; padding: 12px; min-height: 64px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.risk-opt > span span { font-size: .8rem; color: var(--muted); }
.risk-opt input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.risk-opt input:checked + span span { color: #D6D8DE; }
.risk-opt input:focus-visible + span { outline: 3px solid var(--gold-ink); outline-offset: 2px; }
.custom-risk { padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: #FCFCFA; }
.risk-meter { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 650; color: #3E424B; }
.rm-bars { display: inline-flex; gap: 3px; }
.rm-bars i { width: 14px; height: 6px; border-radius: 2px; background: var(--line); }
.rm-bars i.on { background: var(--gold); }

/* ---- banners */
.banner-off, .banner-early { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: repeating-linear-gradient(135deg, #F4F3EE 0 10px, #EFEDE6 10px 20px); }
.banner-early { background: var(--gold-soft); border-color: var(--gold-line); }
.banner-off b, .banner-early b { font-size: 1.05rem; display: block; }
.banner-off p, .banner-early p { color: #3E424B; margin-top: 4px; }
.bo-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.banner-early .bo-ico { color: var(--gold-ink); border-color: var(--gold-line); }

/* ---- how it works strip */
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .how { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
div.how { display: grid; }
.how.mt { margin-top: 20px; }
.how-step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.how-step p { font-size: .88rem; color: var(--muted); margin-top: 2px; }
.how-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; background: var(--ink); color: var(--gold); }

/* ---- Pro Trader providers */
.prov-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .prov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prov-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.prov-top { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; letter-spacing: .02em; background: var(--ink); color: var(--gold); flex: none; }
.panel-head .avatar { width: 38px; height: 38px; font-size: .85rem; }
.prov-bio { color: #3E424B; font-size: .94rem; }
.prov-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
@media (min-width: 520px) { .prov-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.prov-facts div { padding: 8px 10px; border-radius: 10px; background: var(--sunk); }
.prov-facts dt { font-size: .74rem; color: var(--muted); font-weight: 600; }
.prov-facts dd { margin: 0; font-family: var(--mono); font-weight: 650; }
.follow-form { border-top: 1px dashed var(--line); padding-top: 14px; }

/* ---- billing */
.plans-3 { max-width: none; }
@media (min-width: 1100px) { .plans-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.plan.addon { background: linear-gradient(180deg, #FFFDF6, var(--surface)); border-color: var(--gold-line); }
.plan .ribbon-ink { background: var(--ink); color: #fff; }
.plan li svg[aria-hidden] { flex: none; }
.pay-opts { display: flex; flex-direction: column; gap: 8px; }
.plan .ptag { margin-top: 4px; font-weight: 650; font-size: .92rem; color: var(--gold-ink); }
.plan.hot .ptag { color: var(--gold); }
@media (max-width: 1099.98px) { .plans-3 .plan.hot { order: -1; } }
.plans.plans-wide { max-width: none; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .plan.wide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(220px, .8fr); align-items: start; column-gap: 32px; }
  .plan.wide ul { flex: none; }
}
.plan-choice { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan-choice legend { font-weight: 650; margin-bottom: 6px; padding: 0; }
.plan-opt { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.plan-opt input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--ink); }
.plan-opt b { display: block; }
.plan-opt .po-sub { grid-column: 2 / -1; font-size: .86rem; color: var(--muted); }
.plan-opt .po-price { font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.plan-opt:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.plan-opt.rec .po-sub { color: var(--gold-ink); font-weight: 600; }
.pay-method { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }

/* ---- public site layout (algorithm library when logged out) */
.site { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.site-head { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.site-nav a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 10px; text-decoration: none; font-weight: 600; color: var(--muted); }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { color: var(--ink); background: var(--sunk); }
.site-main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 16px 48px; outline: none; min-width: 0; }
.site .foot { max-width: 1180px; margin: 0 auto; width: 100%; }
@media (max-width: 520px) { .site-nav a:not(.btn) { padding: 0 8px; } .site-head .brand { font-size: 1rem; } }
@media (min-width: 960px) { .site-head { padding: 12px 40px; } .site-main { padding: 48px 40px 64px; } }
.lib-hero { max-width: 760px; }
.lib-hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
.lib-hero .lede { color: var(--muted); font-size: 1.08rem; margin-top: 12px; }
.algo-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .algo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .algo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.algo-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); min-width: 0;
  box-shadow: 0 1px 2px rgba(20, 22, 28, .04), 0 24px 48px -40px rgba(20, 22, 28, .45); transition: border-color .2s, transform .2s var(--ease); }
.algo-card:hover { border-color: var(--ink); }
.algo-card.soon { background: #FCFCFA; }
.algo-card:first-child:not(.soon) { background: radial-gradient(110% 120% at 100% 0%, rgba(201, 151, 47, .3) 0%, rgba(201, 151, 47, 0) 58%), var(--ink); color: #fff; border-color: var(--ink); }
.algo-card:first-child:not(.soon) .algo-tag, .algo-card:first-child:not(.soon) .algo-facts dt, .algo-card:first-child:not(.soon) .muted { color: #C9CBD2; }
.algo-card:first-child:not(.soon) .risk-meter, .algo-card:first-child:not(.soon) .link-arrow { color: #fff; }
.algo-card:first-child:not(.soon) .rm-bars i:not(.on) { background: #3A3D47; }
.algo-card:first-child:not(.soon) .algo-facts div { background: rgba(255, 255, 255, .06); border-color: #3A3D47; }
.algo-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.algo-card h2 { font-size: 1.4rem; letter-spacing: -.025em; }
.algo-card h2 a { text-decoration: none; }
.algo-card h2 a::after { content: ""; position: absolute; inset: 0; border-radius: 22px; }
.algo-card h2 a:focus-visible { outline: none; }
.algo-card:has(h2 a:focus-visible) { outline: 3px solid var(--gold-ink); outline-offset: 3px; }
.algo-tag { color: var(--muted); font-size: .95rem; flex: 1; }
.algo-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.algo-facts div { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); min-width: 0; }
.algo-facts dt { font-size: .72rem; color: var(--muted); font-weight: 600; }
.algo-facts dd { margin: 0; font-weight: 650; font-size: .86rem; overflow-wrap: anywhere; }
.algo-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; text-decoration: none; position: relative; z-index: 1; min-height: 32px; }
.lib-how h2 { margin-bottom: 12px; }
.facts-row { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .facts-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fact { padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fact .k { font-size: .78rem; color: var(--muted); font-weight: 600; }
.fact .v { font-weight: 700; overflow-wrap: anywhere; }
.prose h2 { font-size: 1.15rem; margin: 22px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: #3E424B; }
.prose ul { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: #3E424B; }
.prose li::marker { color: var(--gold-ink); }
.param-table td { vertical-align: top; }
.param-table td.mono { white-space: nowrap; font-weight: 650; }

/* ---- admin */
.switch-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .switch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sw-card { display: flex; flex-direction: column; gap: 12px; }
.sw-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.sw-head h2 { margin: 0; font-size: 1.1rem; }
.sw-card form { margin-top: auto; }
.prov-status { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.prov-status li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: #FCFCFA; }
.key-once { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
@media (prefers-reduced-motion: reduce) { .pill-online .pill-dot, .live-waiting .live-orb { animation: none; } }
.stats-off { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--sunk); border: 1px dashed var(--line-strong); font-size: .88rem; color: #3E424B; }
.stats-off svg { color: var(--muted); margin-top: 2px; flex: none; }
.acct-metrics .span-all { grid-column: 1 / -1; }
.acct-metrics dd svg { display: inline-block; vertical-align: -.15em; width: 1em; height: 1em; color: var(--muted); }
.share-switch { padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: #FCFCFA; }
.lib-strip { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .lib-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lib-strip a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-decoration: none; height: 100%; }
.lib-strip a:hover { border-color: var(--ink); }
.lib-strip a > span:last-child { font-size: .84rem; color: var(--muted); }
.ls-top { margin-bottom: 4px; }
td.nowrap { white-space: nowrap; }
