/* Spreadline website — same dark IBM Plex look as the desktop terminal (gui/index.html, constants.js) */
:root {
  --bg: oklch(0.12 0.004 250);
  --bg-1: oklch(0.14 0.005 250);
  --bg-2: oklch(0.17 0.005 250);
  --bg-3: oklch(0.2 0.005 250);
  --bg-4: oklch(0.24 0.006 250);
  --line: oklch(0.26 0.006 250);
  --line-2: oklch(0.32 0.006 250);
  --fg: oklch(0.92 0.004 250);
  --fg-1: oklch(0.75 0.006 250);
  --muted: oklch(0.6 0.006 250);
  --dim: oklch(0.5 0.006 250);
  --pos: oklch(0.75 0.15 155);
  --pos-fg: oklch(0.16 0.02 155);
  --pos-soft: oklch(0.75 0.15 155 / .14);
  --neg: oklch(0.72 0.17 25);
  --neg-soft: oklch(0.72 0.17 25 / .14);
  --warn: oklch(0.84 0.1 75);
  --warn-soft: oklch(0.84 0.1 75 / .14);
  --link: oklch(0.78 0.11 250);
  --link-h: oklch(0.88 0.08 250);
  --cex: oklch(0.8 0.1 250);
  --dex: oklch(0.82 0.1 300);
  --mt5: oklch(0.84 0.1 75);
  --sans: 'IBM Plex Sans', 'IBM Plex Sans Thai', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --radius: 4px;
  --max: 1120px;
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-h); text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.01em; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 36px; }
h2 { font-size: 24px; }
h3 { font-size: 17px; }
p { margin: 0 0 1em; }
code, kbd, pre, .mono { font-family: var(--mono); font-size: 13px; }
pre { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; overflow: auto; }
code { background: var(--bg-3); padding: 1px 5px; border-radius: 3px; }
pre code { background: none; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.warn { color: var(--warn); }

/* ----- layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.site-header { height: 52px; background: var(--bg-1); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; height: 100%; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 600; letter-spacing: .02em; text-decoration: none; }
.brand:hover { text-decoration: none; color: var(--fg); }
.brand .diamond { width: 12px; height: 12px; background: var(--pos); transform: rotate(45deg); flex: none; }
.brand .tag { color: var(--muted); font-weight: 400; font-size: 12px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a, .nav-right a, .nav-right button { color: var(--fg-1); font-size: 13px; padding: 6px 10px; border-radius: var(--radius); text-decoration: none; }
.nav a:hover, .nav-right a:hover { background: var(--bg-3); color: var(--fg); }
.nav a.active { color: var(--fg); background: var(--bg-3); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-2); color: var(--fg-1); border-radius: var(--radius); padding: 4px 10px; font: inherit; }
/* Tablets and phones: the page links fold into the ☰ menu. Phones also move Sign in (or Licenses) into that menu and
   give the trial button its short label, so the bar fits a 320 px screen in both languages. */
.nav .show-sm, .btn .label-short { display: none; }
@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 52px; left: 0; right: 0; margin: 0; background: var(--bg-1); border-bottom: 1px solid var(--line); flex-direction: column; padding: 8px 20px 12px; }
  .nav.open { display: flex; }
  .nav-toggle { display: inline-block; }
  .nav-right { margin-left: 0; }
}
@media (max-width: 640px) {
  .site-header .wrap { gap: 8px; }
  .brand .tag { display: none; }
  .nav { padding: 8px 16px 12px; }
  .nav .show-sm { display: block; }
  .nav-right .hide-sm { display: none; }
  .nav-right a { padding: 6px 8px; }
}
@media (max-width: 480px) {
  .btn .label-long { display: none; }
  .btn .label-short { display: inline; }
}
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 40px; color: var(--muted); font-size: 13px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer .copy { margin-left: auto; }
main { padding-top: 36px; }
.section { margin: 56px 0; }
.section-title { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.section-title .kicker { font-family: var(--mono); font-size: 12px; color: var(--pos); text-transform: uppercase; letter-spacing: .08em; }
.lead { font-size: 17px; color: var(--fg-1); max-width: 720px; }

/* ----- hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding: 28px 0 20px; }
.hero h1 { font-size: 40px; max-width: 560px; }
.hero .lead { font-size: 18px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero .facts { display: flex; flex-direction: column; gap: 8px; margin-top: 28px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.hero .facts span::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--pos); margin-right: 10px; vertical-align: 1px; }

/* ----- buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg-3); color: var(--fg); font: 500 14px var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--bg-4); color: var(--fg); text-decoration: none; }
.btn.primary { background: var(--pos); border-color: var(--pos); color: var(--pos-fg); }
.btn.primary:hover { background: oklch(0.8 0.15 155); }
.btn.danger { border-color: oklch(0.6 0.17 25); color: var(--neg); background: transparent; }
.btn.danger:hover { background: var(--neg-soft); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn.ghost { background: transparent; }
.btn[disabled], .btn.disabled { opacity: .5; cursor: default; }
form.stack { display: flex; flex-direction: column; gap: 14px; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--fg-1); }
label.field .hint { color: var(--dim); font-size: 12px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=url], select, textarea {
  height: 40px; padding: 0 12px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg-1); color: var(--fg); font: 14px var(--sans); outline: none; width: 100%;
}
textarea { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--pos); }
input.mono { font-family: var(--mono); letter-spacing: .08em; }
.check { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--fg-1); }
.check input { width: 16px; height: 16px; accent-color: var(--pos); margin: 0; }
.form-card { width: 100%; max-width: 440px; }
.form-card h1 { font-size: 24px; }
.auth { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.auth .side { color: var(--muted); font-size: 14px; }
.auth .side h1 { color: var(--fg); }
.auth .side .facts { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; font-family: var(--mono); font-size: 12px; }
.auth .side .facts span::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--pos); margin-right: 10px; vertical-align: 1px; }
.errors { margin: 0; padding: 10px 12px; list-style: none; border: 1px solid oklch(0.6 0.17 25); background: var(--neg-soft); color: var(--neg); border-radius: var(--radius); font-size: 13px; }
.flash { padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 20px; border: 1px solid var(--pos); background: var(--pos-soft); color: oklch(0.85 0.1 155); }
.flash.error { border-color: oklch(0.6 0.17 25); background: var(--neg-soft); color: var(--neg); }
.notice { padding: 12px 14px; border: 1px solid var(--line-2); background: var(--bg-2); border-radius: var(--radius); font-size: 13px; color: var(--fg-1); }
.notice.warn { border-color: oklch(0.6 0.1 75); background: var(--warn-soft); color: var(--warn); }

/* ----- cards & grids */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card h3 { margin-bottom: 6px; }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 600; margin-bottom: 12px; background: var(--bg-3); color: var(--pos); }
.card.feature { display: flex; flex-direction: column; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 3px; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; background: var(--bg-3); color: var(--fg-1); }
.pill.cex { background: oklch(0.72 0.12 250 / .16); color: var(--cex); }
.pill.dex { background: oklch(0.72 0.12 300 / .16); color: var(--dex); }
.pill.mt5 { background: oklch(0.72 0.12 75 / .16); color: var(--mt5); }
.pill.pos { background: var(--pos-soft); color: var(--pos); }
.pill.neg { background: var(--neg-soft); color: var(--neg); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.list-plain { padding-left: 18px; margin: 0 0 1em; }
.list-plain li { margin-bottom: 6px; }
.steps { counter-reset: step; display: grid; gap: 14px; }
.steps .step { display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: start; }
.steps .step::before { counter-increment: step; content: counter(step); width: 28px; height: 28px; border-radius: 50%; background: var(--bg-3); color: var(--pos); display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 600; }

/* ----- tables */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.tbl th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
table.tbl tr:hover td { background: oklch(0.15 0.005 250); }
table.tbl .num { text-align: right; font-family: var(--mono); }
/* small phones: tighter cells so a plan table fits the screen; .tbl-wrap scrolls whatever still does not */
@media (max-width: 400px) { table.tbl th, table.tbl td { padding: 8px 6px; } }

/* ----- pricing */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.plan.highlight { border-color: var(--pos); box-shadow: 0 0 0 1px var(--pos) inset; }
.plan .name { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.plan .price { font-size: 32px; font-weight: 600; letter-spacing: -.02em; }
.plan .price .per { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.plan ul { margin: 0; padding-left: 18px; color: var(--fg-1); font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.plan .cta { margin-top: auto; }
.toggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.toggle button { background: transparent; color: var(--fg-1); border: 0; padding: 7px 14px; font: 500 13px var(--sans); cursor: pointer; }
.toggle button.active { background: var(--bg-4); color: var(--fg); }
[data-interval="month"] .yearly, [data-interval="year"] .monthly { display: none; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: '+'; color: var(--muted); font-family: var(--mono); }
.faq details[open] summary::after { content: '−'; }
.faq p { margin: 10px 0 0; color: var(--fg-1); font-size: 14px; }

/* ----- screenshots: three.js images (static/shots/) drawn over CSS frames; the frames stay when WebGL is missing */
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.shot { background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; min-width: 0; }
.shot .bar { height: 26px; display: flex; flex-direction: row; justify-content: flex-start; align-items: center; gap: 8px; padding: 0 10px; background: var(--bg-1); border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.shot .bar .diamond { width: 8px; height: 8px; background: var(--pos); transform: rotate(45deg); flex: none; }
/* a narrow frame shortens "Spreadline", never the screen's name ("Quant Workspace & Bots"): even a fraction of a pixel
   of shrink would draw the name's "…" */
.shot .bar .app { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.shot .bar .name { flex: none; }
.shot .body { display: grid; grid-template-columns: 22px minmax(0, 1fr); aspect-ratio: 8 / 5; min-width: 0; }
.shot .side { background: var(--bg-1); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; padding: 8px 5px; }
.shot .side i { display: block; height: 6px; border-radius: 2px; background: var(--line-2); }
.shot .side i.on { background: var(--pos); }
.shot .stage { position: relative; min-width: 0; overflow: hidden; background: var(--bg-1); }
.shot .stage > .panes { position: absolute; inset: 0; background: var(--bg-2); }
.shot .shot-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .6s ease; }
.shot.is-3d .shot-canvas { opacity: 1; }
.shot.is-3d .stage > .panes { visibility: hidden; }
.shot .hud { position: absolute; top: 6px; left: 7px; right: 7px; display: flex; gap: 4px; pointer-events: none; }
.shot .hud .pill { font-size: 9px; line-height: 1.3; padding: 1px 4px; border-radius: 2px; }
.shot .tag3d { position: absolute; left: 0; top: 0; font: 500 9px/1.2 var(--mono); white-space: nowrap; pointer-events: none; color: var(--muted); will-change: transform; }
.shot .tag3d.cex { color: var(--cex); }
.shot .tag3d.dex { color: var(--dex); }
.shot .tag3d.boxed { padding: 1px 3px; border-radius: 2px; background: var(--bg-2); border: 1px solid var(--line); }
.shot .tag3d.pos.boxed { background: var(--pos-soft); border-color: transparent; }
.shot .tag3d.warn.boxed { background: var(--warn-soft); border-color: transparent; }
.shot .tag3d.badge { min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px; background: var(--neg); color: var(--bg); text-align: center; line-height: 14px; font-weight: 600; }
.shot .hud, .shot .tag3d { opacity: 0; transition: opacity .6s ease; }
.shot.is-3d .hud, .shot.is-3d .tag3d { opacity: 1; }
.shots-note { margin: 10px 0 0; font: 11px/1.4 var(--mono); color: var(--dim); }
@media (prefers-reduced-motion: reduce) { .shot .shot-canvas, .shot .hud, .shot .tag3d { transition: none; } }
.shot .panes { display: grid; gap: 6px; padding: 8px; }
.shot .pane { background: var(--bg-1); border: 1px solid var(--line); border-radius: 3px; position: relative; overflow: hidden; }
.shot .pane.rows { background: repeating-linear-gradient(to bottom, var(--bg-1) 0 12px, oklch(0.16 0.005 250) 12px 14px); }
.shot .pane.chart::after { content: ''; position: absolute; left: 6px; right: 6px; bottom: 6px; height: 50%; background: linear-gradient(to top, var(--pos-soft), transparent); clip-path: polygon(0 80%, 15% 60%, 30% 70%, 45% 35%, 60% 50%, 75% 20%, 90% 30%, 100% 10%, 100% 100%, 0 100%); }
.shot .pane.bars { display: block; height: auto; background: repeating-linear-gradient(to right, var(--bg-1) 0 9px, var(--line-2) 9px 12px); background-size: 100% 60%; background-repeat: no-repeat; background-position: bottom; }
.shot .pane .dot { position: absolute; top: 6px; left: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 8px var(--pos); }
.shot .pane .dot.warn { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.shot .caption { padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.shot .caption span { text-align: right; }
.shot .caption b { color: var(--fg-1); font-weight: 500; }
.shot img { display: block; width: 100%; }

/* ----- portal */
.portal { display: grid; grid-template-columns: 200px 1fr; gap: 36px; }
.portal-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 72px; }
.portal-nav a { padding: 7px 10px; border-radius: var(--radius); color: var(--fg-1); font-size: 14px; text-decoration: none; }
.portal-nav a:hover { background: var(--bg-3); color: var(--fg); }
.portal-nav a.active { background: var(--bg-3); color: var(--fg); }
.portal-nav .who { padding: 6px 10px 12px; font-size: 12px; color: var(--muted); word-break: break-all; }
.key { font-family: var(--mono); font-size: 15px; letter-spacing: .1em; background: var(--bg-3); padding: 4px 10px; border-radius: 3px; }
.license { display: flex; flex-direction: column; gap: 14px; }
.license .head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.device { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.device .meta { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.codes { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 32px; font-family: var(--mono); font-size: 15px; letter-spacing: .06em; padding: 14px 18px; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); }
/* White in every theme: phone scanners expect dark modules on a light background. The quiet zone is inside the picture. */
.qr { display: inline-block; max-width: 100%; background: #fff; border-radius: var(--radius); }
.qr svg { display: block; width: 280px; max-width: 100%; height: auto; shape-rendering: crispEdges; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.language-form { margin: 0; }
.language-form button { border: 0; background: none; cursor: pointer; }
.language-form button:hover { background: var(--bg-3); color: var(--fg); }
.lang-switch { font-family: var(--mono); font-size: 12px; }

/* ----- legal */
.doc { max-width: 760px; }
.doc h2 { margin-top: 32px; font-size: 20px; }
.doc p, .doc li { color: var(--fg-1); }
.doc-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }

@media (max-width: 900px) {
  .hero, .auth, .two { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .pricing { grid-template-columns: 1fr; }
  .portal { grid-template-columns: 1fr; }
  .portal-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .portal-nav .who { width: 100%; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .shots { grid-template-columns: 1fr; }
  h1, .hero h1 { font-size: 28px; }
  .codes { grid-template-columns: 1fr; }
}

/* ----- back office */
.admin-body { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.admin-body h1 { font-size: 28px; margin: 0; }
.admin .stat .n { font-size: 30px; font-weight: 600; line-height: 1.3; }
.admin .kicker { font-size: 12px; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter input[type=search] { flex: 1 1 240px; min-width: 0; }
.filter select { flex: 0 1 160px; }
.tbl-wrap { overflow-x: auto; }
.nowrap { white-space: nowrap; }
.pager { display: flex; align-items: center; gap: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid textarea { min-height: 84px; }
.admin details > summary { cursor: pointer; }
.admin .actions { display: flex; flex-direction: column; gap: 14px; }
.admin .actions h3 { margin: 0; }
.admin .row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.bars { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; height: 130px; }
.bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-height: 0; }
.bar i { display: block; width: 100%; max-width: 44px; min-height: 2px; background: var(--pos); border-radius: 2px 2px 0 0; }
.portal-nav a.back { margin-top: 12px; }
@media (max-width: 900px) { .portal-nav a.back { margin-top: 0; } }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }


/* email announcements (/admin/broadcasts) */
.bc-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bc-subject { font-size: 16px; font-weight: 600; margin: 6px 0 0; }
.bc-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; color: var(--fg-1); margin: 10px 0 0; }
.bc-mail img { display: block; max-width: 100%; height: auto; border-radius: 4px; margin: 12px 0 0; border: 1px solid var(--line); }
.bc-files { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.bc-files li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bc-foot { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 8px; }
.bc-results { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 6px; }
.bc-results .btn { height: auto; min-height: 30px; white-space: normal; text-align: left; }
.bc-counts { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 14px; }
.bc-counts .n { font-size: 26px; font-weight: 600; line-height: 1.2; font-family: var(--mono); }
.bc-bar { height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; margin-top: 14px; }
.bc-bar i { display: block; height: 100%; background: var(--pos); }
.bc-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
input[type=file] { font: inherit; font-size: 13px; color: var(--fg-1); max-width: 100%; }
@media (max-width: 640px) { #member-box { grid-column: auto !important; } }
.bc-missed { border-color: var(--warn, var(--line)); }
.bc-sub { font-weight: 600; margin: 14px 0 2px; }
.bc-people { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; overflow-wrap: anywhere; }
.bc-people li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bc-tabs { display: flex; flex-wrap: wrap; gap: 4px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.bc-tabs a { padding: 6px 0; margin-bottom: -1px; color: var(--fg-1); text-decoration: none; border-bottom: 2px solid transparent; }
.bc-tabs a.active { color: var(--fg); font-weight: 600; border-bottom-color: var(--pos); }

/* web-user-manual-d1: the user manual (/docs/manual), read on a phone first */
.manual { max-width: 760px; }
.manual-topic { max-width: none; }
.manual-topic > :not(.manual-steps, dialog), .manual-steps p, .manual-shot figcaption { max-width: 760px; }
.manual-topic > .lead { max-width: 720px; }
.manual .crumbs { color: var(--muted); margin: 0 0 8px; }
.manual .crumbs a { color: var(--muted); }
.manual-group { margin-top: 28px; }
.manual-toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.manual-toc a { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); color: inherit; text-decoration: none; }
.manual-toc a:hover { border-color: var(--line-2); }
.manual-toc span { color: var(--muted); font-size: 13px; }
.manual-steps { counter-reset: mstep; list-style: none; margin: 20px 0; padding: 0; display: grid; gap: 22px; }
.manual-steps > li { min-width: 0; counter-increment: mstep; position: relative; padding-left: 40px; }
.manual-steps > li::before { content: counter(mstep); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--bg-3); color: var(--pos); display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 600; }
.manual-steps p { margin: 3px 0 0; }
.manual-shot { margin: 10px 0 0; }
.manual-image { display: block; width: fit-content; max-width: 100%; cursor: zoom-in; }
.manual-preview { display: block; overflow: hidden; border-radius: 6px; background: var(--bg-1); }
.manual-preview img { display: block; max-width: 100%; height: auto; }
.manual-image-action { display: inline-block; padding: 6px 0; text-decoration: underline; }
.manual-image:focus-visible, .manual-viewer-scroll:focus-visible { outline: 2px solid var(--pos); outline-offset: -2px; }

/* Centres of the controls in the original 1600 × 1100 Venues images. The same
   coordinates frame the narrow preview and position the full-size viewer. */
.manual-image[data-picture="desk-venues"] { --focus-x: 1510px; --focus-y: 105px; --detail-height: 78px; }
.manual-image[data-picture="desk-venues-add-mt5"] { --focus-x: 1283px; --focus-y: 391px; --detail-height: 314px; }
.manual-image[data-picture="desk-venues-test"] { --focus-x: 1538px; --focus-y: 837px; --detail-height: 156px; }
.manual-image[data-picture="desk-venues-allow-trading"] { --focus-x: 1280px; --focus-y: 635px; --detail-height: 190px; }
.manual-save-preview { display: none; --focus-x: 1503px; --focus-y: 1069px; }
@media (max-width: 900px) {
  /* The MT5 form's Save button is far below the inputs, in the bottom-right of the same PNG. */
  .manual-save-preview { display: block; height: 58px; margin-top: 6px; border-radius: 6px; background-position: right bottom; background-repeat: no-repeat; }
  .manual-image[data-picture^="desk-venues"] { width: 100%; }
  .manual-image[data-picture^="desk-venues"] .manual-preview { position: relative; height: var(--detail-height); }
  .manual-image[data-picture^="desk-venues"] img {
    position: absolute; max-width: none;
    left: clamp(calc(100% - 1600px), calc(50% - var(--focus-x)), 0px);
    top: clamp(calc(100% - 1100px), calc(50% - var(--focus-y)), 0px);
  }
}

.manual-viewer { display: none; width: max-content; max-width: calc(100% - 16px); max-height: calc(100% - 16px); padding: 0; background: var(--bg-1); color: var(--fg); border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.manual-viewer[open] { display: flex; flex-direction: column; }
.manual-viewer::backdrop { background: rgb(0 0 0 / .8); }
.manual-viewer-bar { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; }
.manual-viewer-bar form { margin: 0; }
.manual-viewer-zoom { margin-left: auto; display: inline-flex; gap: 3px; }
.manual-viewer-zoom .btn { min-width: 44px; padding: 0 8px; }
.manual-viewer-zoom [aria-pressed="true"] { background: var(--pos); color: var(--pos-fg); }
.manual-viewer-bar .btn { min-height: 44px; }
.manual-viewer-scroll { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.manual-viewer-scroll img { display: block; width: auto; height: auto; max-width: none; }
html:has(.manual-viewer[open]) { overflow: hidden; }
.manual-placeholder { max-width: 420px; padding: 18px 14px; border: 1px dashed var(--line-2); border-radius: 6px; color: var(--muted); font-size: 13px; font-family: var(--mono); overflow-wrap: anywhere; }
.manual-download { margin: 16px 0 4px; }
.manual-notes { margin-top: 8px; }
.manual-notes .list-plain { margin: 6px 0 0; }
.manual-notes li { margin: 4px 0; }
.manual-pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-top: 28px; }
@media (max-width: 480px) { .manual-steps > li { padding-left: 0; } .manual-steps > li > p { min-height: 28px; padding-left: 36px; } .manual-pager .btn { flex: 1 1 100%; text-align: center; } }
