/* The website's design system (R-66): Direction C's theme and feel on every page
   of the three trees, A's tables wherever something is listed. Warm black, dark
   only (R-63). Chivo for words, Chivo Mono for figures, both served from this
   site (R-64). Colour means gain, loss or attention and nothing else; every
   control is monochrome. Space comes from a 4 px scale. The rules this
   implements are ui/07-design-language.md's. */

/* ---- type, served from the site ----------------------------------------------- */

@font-face { font-family: "Chivo"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("fonts/chivo-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Chivo"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("fonts/chivo-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Chivo Mono"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("fonts/chivo-mono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Chivo Mono"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("fonts/chivo-mono-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---- tokens ------------------------------------------------------------------- */

:root {
  color-scheme: dark;

  --bg: #121110;
  --bg-2: #1a1917;
  --bg-3: #22201d;
  --line: #2a2825;
  --line-2: #3c3935;

  --ink: #efebe4;
  --ink-2: #aba69d;
  --ink-3: #86817a;   /* 4.9:1 on --bg, 4.5:1 on --bg-2: the faintest a word may be */
  --ink-4: #4f4c47;   /* rules, ticks and dashes only, never words */

  --gain: #62d09b;
  --loss: #ff7a62;
  --attn: #f2b33d;
  --gain-wash: rgba(98, 208, 155, 0.13);
  --loss-wash: rgba(255, 122, 98, 0.13);
  --attn-wash: rgba(242, 179, 61, 0.08);

  --sans: "Chivo", system-ui, sans-serif;
  --mono: "Chivo Mono", ui-monospace, Consolas, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 40px; --s8: 56px;
  --side: 40px;
  --r: 4px;
  --bar-h: 56px;
  --strip-h: 440px;

  --fast: 130ms;
  --med: 240ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.3, 1.5, 0.5, 1);
  --ride: 800ms;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/20px var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; }
i { font-style: normal; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
::selection { background: rgba(239, 235, 228, 0.2); }
svg.i { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.6; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.gain { color: var(--gain); }
.loss { color: var(--loss); }
.flat { color: var(--ink-2); }
.dash { color: var(--ink-4); }
.sign { color: var(--ink-3); }
.attn-text { color: var(--attn); }
.dim { color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* A figure's changed digits take the direction of the change, then settle
   (the patcher marks them; see common.js). */
.d { animation: d-tint 1000ms var(--ease); }
.d.up { --tint: var(--gain); }
.d.down { --tint: var(--loss); }
@keyframes d-tint { from { color: var(--tint); } }
.p { display: inline-block; margin: 0 -0.13em; }

/* The label: small capitals over a figure or a column. */
.k, .lbl { font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.k .u, .lbl .unit { margin-left: 6px; color: var(--ink-3); font-weight: 500; letter-spacing: 0.08em; }
.k[data-tip], .lbl[data-tip], th[data-tip] { cursor: help; }
.meta { font-size: 13px; line-height: 18px; color: var(--ink-3); }
.meta .num { color: var(--ink-2); }

/* ---- the top bar ----------------------------------------------------------------- */

.bar {
  position: sticky; top: 0; z-index: 30;
  height: var(--bar-h);
  display: flex; align-items: stretch; gap: var(--s6);
  padding: 0 var(--side);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.mark { width: 18px; height: 18px; fill: var(--ink); flex: none; }
.word { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.tree { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 3px; }

/* The account tabs (user) and the tree's pages (admin, master) share one look:
   the current one in full ink with a rule under it. */
.tabsbar { display: flex; gap: var(--s5); min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabsbar a {
  position: relative; flex: none;
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700; color: var(--ink-3);
  transition: color var(--fast);
}
.tabsbar a .q { font-weight: 400; transition: color var(--fast); }
.tabsbar a:hover { color: var(--ink-2); }
.tabsbar a[aria-current] { color: var(--ink); }
.tabsbar a[aria-current] .q { color: var(--ink-2); }
.tabsbar a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
.tabsbar a.add { font-weight: 600; gap: 6px; }
.tabsbar a.add:hover { color: var(--ink); }

.nav-switch, .drawer-scrim { display: none; }

.bar-end { margin-left: auto; display: flex; align-items: center; gap: var(--s5); position: relative; }
.wallet { display: flex; align-items: baseline; gap: 7px; font-size: 13px; color: var(--ink-3); white-space: nowrap; transition: color var(--fast); }
.wallet .num { font-size: 14px; color: var(--ink); }
.wallet .num.loss { color: var(--loss); }
.wallet:hover { color: var(--ink-2); }
.clock { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.clock.attn-text { color: var(--attn); }
.bar-link { font-size: 13px; font-weight: 700; color: var(--ink-3); transition: color var(--fast); white-space: nowrap; }
.bar-link:hover { color: var(--ink); }
.who {
  width: 30px; height: 30px; display: grid; place-items: center; flex: none;
  border-radius: 50%; background: var(--bg-3);
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-2);
  transition: background-color var(--fast), color var(--fast);
}
.who:hover, .who[aria-expanded="true"] { background: var(--line-2); color: var(--ink); }

.menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 35;
  min-width: 220px; padding: 6px;
  background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
}
.menu .who-name { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu .who-name b { display: block; font-weight: 700; }
.menu .who-name span { font-size: 12px; color: var(--ink-3); }
.menu a, .menu button {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  width: 100%; padding: 9px 10px; border-radius: 3px;
  font-size: 14px; font-weight: 600; text-align: left; color: var(--ink-2);
  transition: background-color var(--fast), color var(--fast);
}
.menu a .q { color: var(--ink-3); font-weight: 400; }
.menu a:hover, .menu button:hover { background: var(--line); color: var(--ink); }
.menu a[aria-current] { color: var(--ink); }
.menu a[aria-current]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* The user's accounts: the mark opens them as a drawer from the left, on the
   website and on a phone alike. */
.nav-open { display: grid; place-items: center; width: 40px; margin-left: -11px; flex: none; }
.nav-open .mark { width: 20px; height: 20px; transition: opacity var(--fast); }
.nav-open:hover .mark, .nav-open[aria-expanded="true"] .mark { opacity: 0.7; }
.bar:has(.nav-open) .brand { margin-left: calc(var(--s1) - var(--s6)); }
.bar:has(.nav-open) .brand .mark { display: none; }
.hello { display: flex; align-items: center; gap: 0.3em; min-width: 0; flex: none; margin-left: calc(var(--s1) - var(--s6)); font-size: 15px; color: var(--ink-2); white-space: nowrap; }
.hello b { font-weight: 800; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
#accounts-menu.side-menu {
  position: fixed; inset: 0 auto 0 0; z-index: 50;
  width: min(270px, 76vw); min-width: 0; padding: 0 var(--s3) var(--s6); overflow-y: auto;
  border: 0; border-right: 1px solid var(--line-2); border-radius: 0; box-shadow: none;
  animation: drawer-in var(--med) var(--ease);
}
#accounts-menu .drawer-head { display: flex; align-items: center; gap: 10px; height: var(--bar-h); padding: 0 calc(var(--side) - var(--s3) - 1px); margin-bottom: var(--s3); border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
#accounts-menu .drawer-head .mark { width: 20px; height: 20px; }
#accounts-menu a { justify-content: flex-start; gap: 8px; min-height: 44px; padding-left: calc(var(--side) - var(--s3) - 1px); font-size: 15px; }
#accounts-menu a[aria-current]::after { margin-left: auto; }
#accounts-menu a svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.6; flex: none; }
#accounts-menu:not([hidden]) + .drawer-scrim { display: block; position: fixed; inset: 0; z-index: 49; background: rgba(0, 0, 0, 0.55); animation: scrim-in var(--med) var(--ease); }
@keyframes drawer-in { from { transform: translateX(-100%); } }
@keyframes scrim-in { from { opacity: 0; } }

/* ---- the page -------------------------------------------------------------------- */

#view { display: block; min-height: calc(100vh - var(--bar-h)); padding-bottom: var(--s8); }
.crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: var(--s4) var(--side) 0; font-size: 13px; color: var(--ink-3); }
.crumbs a { transition: color var(--fast); }
.crumbs a:hover { color: var(--ink); }
.crumbs svg { width: 8px; height: 8px; stroke: currentColor; fill: none; stroke-width: 1.6; }

.head { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; padding: var(--s4) var(--side) 0; }
.head h1 { font-size: 28px; line-height: 34px; font-weight: 800; letter-spacing: -0.015em; }
.head h1 .q { font-size: 16px; font-weight: 400; color: var(--ink-3); margin-left: 6px; letter-spacing: 0; }
.head .tools { margin-left: auto; display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }

.sec { padding: 0 var(--side); }
.sec-head { min-height: 56px; display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding-top: var(--s3); }
.sec-head h1, .sec-head h2 { font-size: 16px; line-height: 22px; font-weight: 800; letter-spacing: -0.005em; }
.sec-head .k { font-size: 11px; }
.sec-tools { margin-left: auto; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.sec + .sec { margin-top: var(--s4); }

/* ---- the console's head: one figure large, three beside it, the days as beads ---- */

.master {
  display: grid; grid-template-columns: auto auto 1fr; align-items: end; column-gap: var(--s8);
  padding: var(--s6) var(--side) var(--s6);
}
.m-main { min-width: 0; }
.m-fig { margin-top: 10px; font-size: 68px; line-height: 64px; font-weight: 300; letter-spacing: -0.045em; white-space: nowrap; }
.m-fig .p { margin: 0 -0.14em; }
.m-fig.loss, .m-fig.loss .sign { color: var(--loss); }
.m-sub { margin-top: 10px; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.m-sub .num { color: var(--ink-2); }
.m-side { display: flex; gap: var(--s6); padding-bottom: 6px; }
.m-ro { min-width: 0; }
.m-ro .v { margin-top: 6px; font-size: 22px; line-height: 26px; letter-spacing: -0.02em; white-space: nowrap; }
.m-ro .v .of { color: var(--ink-3); }
.m-ro .s { margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--ink-3); white-space: nowrap; }
.m-ro .s .attn-text { color: var(--attn); }
.m-ro a.v { display: block; transition: color var(--fast); }
.m-ro a.v:hover { color: #fff; }

.beads-wrap { justify-self: end; padding-bottom: 4px; }
.beads-wrap .k { text-align: right; }
/* Eight beads and the day under them: 8 x 9 + 7 x 3 + 16, so a full day never rises into the label. */
.beads { display: flex; gap: 7px; align-items: flex-end; height: 112px; margin-top: 10px; }
.bcol { display: flex; flex-direction: column-reverse; align-items: center; gap: 3px; width: 11px; height: 100%; justify-content: flex-start; }
.bcol .bead { width: 9px; height: 9px; border-radius: 50%; background: var(--gain); flex: none; }
.bcol .bead.loss { background: var(--loss); }
.bcol .bead.more { background: none; width: auto; height: 9px; font: 500 8px/9px var(--mono); color: var(--ink-3); }
.bcol .day { font: 500 9px/12px var(--mono); color: var(--ink-4); margin-top: 4px; flex: none; }
.bcol.today .day { color: var(--ink-2); }
.bcol .none { width: 9px; height: 1px; background: var(--line-2); flex: none; }

/* ---- attention -------------------------------------------------------------------- */

.attention { display: flex; flex-direction: column; gap: var(--s2); padding: 0 var(--side) var(--s4); }
.attention:empty { display: none; }
/* What an account holds, in the suspension dialog (R-84). */
.exposure { margin-top: var(--s3); }
.exposure + .exposure { border-top: 1px solid var(--line); padding-top: var(--s3); }
.exposure .exp-h { font-size: 13px; font-weight: 600; margin: 0 0 var(--s2); }
.exposure p { margin: var(--s2) 0 0; }

.alert {
  display: flex; align-items: center; gap: var(--s3);
  min-height: 44px; padding: 10px var(--s4);
  background: var(--attn-wash); border-radius: var(--r);
  box-shadow: inset 3px 0 0 var(--attn);
}
.alert .tri { width: 11px; height: 10px; fill: var(--attn); flex: none; }
.alert .body { min-width: 0; }
.alert b { font-weight: 700; }
.alert .what { color: var(--attn); font-weight: 600; }
.alert .why { color: var(--ink-2); }
.alert .sep { color: var(--ink-3); }
.alert .fix {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; padding: 4px 0;
}
.alert .fix svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 1.6; transition: transform var(--fast) var(--ease); }
.alert .fix:hover svg { transform: translateX(2px); }

/* ---- the rack: an account's bots as channel strips (R-66) ---------------------------- */

.rack-wrap { padding: 0 var(--side); }
.rack-head { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; padding: var(--s3) 0; }
.rack-head .sec-tools { align-self: center; }
.rack {
  display: grid; grid-template-columns: repeat(var(--cols, 12), minmax(0, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.rack.rows { --strip-h: 380px; }

.strip {
  position: relative;
  display: grid; grid-template-rows: auto 1fr auto auto auto;
  height: var(--strip-h); min-width: 0; padding: 14px 12px 16px;
  border-left: 1px solid var(--line);
  cursor: pointer;
  transition: background-color var(--fast);
  outline-offset: -2px;
}
.strip.first { border-left: 0; }
.strip.row-2 { border-top: 1px solid var(--line); }
.strip:hover, .strip.sel { background: var(--bg-2); }
.strip::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: transparent; transition: background-color var(--fast); }
.strip.halted::before { background: var(--attn); }
.strip.sel::before { background: var(--ink); }
.strip.off > :not(.s-sw) { opacity: 0.38; transition: opacity var(--med); }
.strip.fresh { animation: power 1100ms var(--ease); }
@keyframes power { from { background: var(--bg-3); } }

.s-top { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.slot { font-size: 10px; line-height: 12px; color: var(--ink-4); }
.coin { font-size: 19px; line-height: 24px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st { font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st.halted { color: var(--attn); }
.st.armed, .st.bullrun, .st.trading { color: var(--ink-2); }
.st.paused { color: var(--ink); }

/* A bot's state in words, where a table or a heading names it. */
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.state .tri { width: 9px; height: 8px; fill: var(--attn); flex: none; }
.state.halted { color: var(--attn); }
.state.waiting, .state.off { color: var(--ink-3); }
.state.armed, .state.paused { color: var(--ink); }
.head .state { font-size: 14px; margin-top: 4px; }

/* The ladder, upright. Each mark's place on the bot's own scale is a number from
   0 (bottom) to 100 (top), given as --p; orientation is the stylesheet's. */
.track { position: relative; margin: 16px 0 12px; min-height: 0; }
.track .rail { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--line-2); }
.track.idle .rail { background: repeating-linear-gradient(180deg, var(--line-2) 0 3px, transparent 3px 7px); }
.track .rung { position: absolute; left: calc(50% - 14px); width: 28px; height: 2px; margin-top: -1px; background: var(--ink-3); top: calc((100 - var(--p)) * 1%); transition: top var(--ride) var(--ease), opacity var(--med); }
.track .rung.newest { background: var(--ink-2); }
.track .rung.born { animation: born 520ms var(--spring); }
@keyframes born { from { transform: scaleX(0); } }
.track .avg { position: absolute; left: 8%; right: 8%; height: 0; border-top: 1px dashed var(--ink-3); top: calc((100 - var(--p)) * 1%); transition: top var(--ride) var(--ease); }
.track .band { position: absolute; left: calc(50% - 2px); width: 4px; top: calc((100 - var(--hi)) * 1%); height: calc((var(--hi) - var(--lo)) * 1%); transition: top var(--ride) var(--ease), height var(--ride) var(--ease), background-color var(--med); }
.track .band.gain { background: var(--gain); }
.track .band.loss { background: var(--loss); }
.track .cap { position: absolute; inset: 0; transform: translateY(calc((100 - var(--p)) * 1%)); transition: transform var(--ride) var(--ease); pointer-events: none; }
.track .cap::before { content: ""; position: absolute; top: -4px; left: calc(50% - 20px); width: 40px; height: 8px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 3px var(--bg); transition: box-shadow var(--fast); }
.strip:hover .track .cap::before, .strip.sel .track .cap::before { box-shadow: 0 0 0 3px var(--bg-2); }
.track .cap > span { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); padding: 0 4px; font: 400 11px/14px var(--mono); color: var(--ink); white-space: nowrap; background: var(--bg); border-radius: 2px; transition: background-color var(--fast); }
.strip:hover .track .cap > span, .strip.sel .track .cap > span { background: var(--bg-2); }
.track.idle .rung, .track.idle .avg, .track.idle .band { display: none; }
.track.idle .cap { transform: translateY(50%); }
.track.idle .cap::before { background: var(--ink-3); width: 20px; left: calc(50% - 10px); height: 2px; top: -1px; box-shadow: none; }
.track.idle .cap > span { color: var(--ink-3); }

.meter { display: flex; gap: 2px; height: 4px; }
.meter i { flex: 1; background: var(--line-2); border-radius: 1px; transition: background-color var(--med); }
.meter i.on { background: var(--ink-2); }
.strip.halted .meter i.on { background: var(--attn); }
.meter-legs { font-size: 11px; line-height: 4px; color: var(--ink-3); white-space: nowrap; }

.s-read { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; min-height: 76px; min-width: 0; }
.s-read .open { font-size: 17px; line-height: 22px; letter-spacing: -0.02em; white-space: nowrap; }
.s-read .pct { font-size: 11px; line-height: 14px; color: var(--ink-3); white-space: nowrap; }
.s-read .real { margin-top: 8px; display: flex; flex-direction: column; }
.s-read .real .k { font-size: 9px; line-height: 12px; letter-spacing: 0.12em; }
.s-read .real .num { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.s-read .real .num.loss { color: var(--loss); }
.s-sw { margin-top: 12px; display: flex; align-items: center; gap: 8px; }

/* A free slot: every coin the account may still add. The first says so. */
.slot-free {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  height: var(--strip-h); min-width: 0;
  border-left: 1px solid var(--line);
  color: var(--ink-4);
  transition: color var(--fast), background-color var(--fast);
}
.slot-free.first { border-left: 0; }
.slot-free.row-2 { border-top: 1px solid var(--line); }
.slot-free .num { font-size: 10px; }
.slot-free svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.4; fill: none; transition: transform var(--med) var(--spring); }
.slot-free .lbl { font-size: 12px; font-weight: 700; letter-spacing: 0.02em; text-transform: none; color: inherit; opacity: 0; transition: opacity var(--fast); text-align: center; }
.slot-free:hover:not([disabled]) { color: var(--ink-2); background: var(--bg-2); }
.slot-free:hover:not([disabled]) svg { transform: rotate(90deg); }
.slot-free:hover .lbl, .slot-free.add .lbl { opacity: 1; }
.slot-free.add { color: var(--ink-3); }
.slot-free[disabled] { cursor: default; }
.slot-free.add .lbl .n { display: block; font-weight: 400; color: var(--ink-3); margin-top: 2px; }

/* The selected strip's detail, opening under its row. */
.detail { position: relative; grid-column: 1 / -1; overflow: hidden; border-top: 1px solid var(--line); background: var(--bg-2); }
.detail .caret { position: absolute; top: 0; width: 14px; height: 7px; transform: translateX(-50%); background: var(--bg); clip-path: polygon(0 0, 100% 0, 50% 100%); transition: left var(--med) var(--ease); }
.detail-in { display: grid; grid-template-columns: 250px minmax(0, 1.4fr) minmax(0, 1fr); column-gap: var(--s7); padding: var(--s6); }
.detail h3 { font-size: 22px; line-height: 28px; font-weight: 800; }
.detail h3 span { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-left: 10px; }
.detail h3 span.halted { color: var(--attn); }
.big-track { position: relative; height: 240px; margin-top: var(--s4); }
.big-track .rail { position: absolute; top: 0; bottom: 0; left: 96px; width: 1px; background: var(--line-2); }
.big-track .rung { position: absolute; left: 82px; width: 28px; height: 2px; margin-top: -1px; background: var(--ink-3); top: calc((100 - var(--p)) * 1%); transition: top var(--ride) var(--ease); }
.big-track .rung i { position: absolute; right: 36px; top: -7px; font: 400 11px/14px var(--mono); color: var(--ink-3); white-space: nowrap; }
.big-track .avg { position: absolute; left: 70px; right: 10px; border-top: 1px dashed var(--ink-3); top: calc((100 - var(--p)) * 1%); transition: top var(--ride) var(--ease); }
.big-track .avg i { position: absolute; right: 0; top: 4px; font: 400 11px var(--mono); color: var(--ink-2); white-space: nowrap; }
.big-track .band { position: absolute; left: 94px; width: 5px; top: calc((100 - var(--hi)) * 1%); height: calc((var(--hi) - var(--lo)) * 1%); transition: top var(--ride) var(--ease), height var(--ride) var(--ease); }
.big-track .band.gain { background: var(--gain); }
.big-track .band.loss { background: var(--loss); }
.big-track .cap { position: absolute; inset: 0; transform: translateY(calc((100 - var(--p)) * 1%)); transition: transform var(--ride) var(--ease); pointer-events: none; }
.big-track .cap::before { content: ""; position: absolute; top: -5px; left: 70px; width: 52px; height: 10px; border-radius: 2px; background: var(--ink); }
.big-track .cap > span { position: absolute; top: -8px; left: 132px; font: 400 13px/16px var(--mono); white-space: nowrap; }
.big-track.idle { height: auto; min-height: 48px; color: var(--ink-3); }
.big-track.idle > * { display: none; }
.big-track.idle::after { content: attr(data-empty); }

.pos { width: 100%; margin-top: var(--s3); }
.pos th { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); text-align: right; padding-bottom: 8px; }
.pos th:first-child, .pos td:first-child { text-align: left; }
.pos td { font: 400 13px/32px var(--mono); font-variant-numeric: tabular-nums; text-align: right; border-top: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.pos td.pl { color: var(--ink); }
.pos td.pl.gain { color: var(--gain); }
.pos td.pl.loss { color: var(--loss); }
.note { margin-top: var(--s3); color: var(--ink-3); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px var(--s5); align-content: start; }
.facts dt { font-size: 10px; line-height: 20px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.facts dd { margin: 0; font-size: 14px; min-width: 0; }
.facts dd.num { font-size: 13px; }
.facts dd .unit { font: 500 11px var(--sans); color: var(--ink-3); margin-left: 4px; }
.d-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); margin-top: var(--s5); }

/* ---- the ladder, lying down: a bot's page (A's instrument, R-66) -------------------- */

.lad { position: relative; height: 20px; overflow: hidden; }
.lad .base { position: absolute; left: 0; right: 0; top: 10px; height: 1px; background: var(--line-2); }
.lad.none .base { background: repeating-linear-gradient(90deg, var(--line-2) 0 2px, transparent 2px 5px); }
.lad .rung { position: absolute; top: 5px; width: 1px; height: 11px; background: var(--ink-3); left: var(--x); transition: left var(--ride) var(--ease); }
.lad .avg { position: absolute; top: 2px; width: 1px; height: 17px; background: var(--ink-2); left: var(--x); transition: left var(--ride) var(--ease); }
.lad .span { position: absolute; top: 9px; height: 3px; opacity: 0.7; left: var(--x); width: var(--w); transition: left var(--ride) var(--ease), width var(--ride) var(--ease); }
.lad .span.gain { background: var(--gain); }
.lad .span.loss { background: var(--loss); }
.lad .needle { position: absolute; inset: 0; transform: translateX(var(--x, 50%)); transition: transform var(--ride) var(--ease); pointer-events: none; }
.lad .needle::before { content: ""; position: absolute; left: -1px; top: 1px; bottom: 1px; width: 2px; background: var(--ink); }
.lad.none .needle, .lad.none .avg, .lad.none .span { display: none; }

.big-lad { position: relative; height: 120px; }
.big-lad .base { position: absolute; left: 0; right: 0; top: 60px; height: 1px; background: var(--line-2); }
.big-lad .rung { position: absolute; top: 48px; width: 2px; margin-left: -1px; height: 25px; background: var(--ink-3); left: var(--x); transition: left var(--ride) var(--ease); }
.big-lad .rung i { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font: 500 10px/12px var(--mono); color: var(--ink-3); }
.big-lad .avg { position: absolute; top: 38px; width: 0; height: 45px; border-left: 1px dashed var(--ink-2); left: var(--x); transition: left var(--ride) var(--ease); }
.big-lad .avg i, .big-lad .needle i { position: absolute; font: 400 12px/14px var(--mono); white-space: nowrap; }
.big-lad .avg i { top: 50px; left: 0; transform: translateX(-50%); color: var(--ink-2); }
.big-lad .span { position: absolute; top: 57px; height: 7px; left: var(--x); width: var(--w); transition: left var(--ride) var(--ease), width var(--ride) var(--ease); }
.big-lad .span.gain { background: var(--gain); }
.big-lad .span.loss { background: var(--loss); }
.big-lad .needle { position: absolute; top: 0; bottom: 0; width: 0; left: var(--x, 50%); transition: left var(--ride) var(--ease); pointer-events: none; }
.big-lad .needle::before { content: ""; position: absolute; left: -5px; top: 30px; height: 60px; width: 10px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 3px var(--bg); }
.big-lad .needle i { top: 6px; left: 0; transform: translateX(-50%); color: var(--ink); font-size: 13px; }
.big-lad.none { height: 56px; display: flex; align-items: center; color: var(--ink-3); }
.big-lad.none > * { display: none; }
.big-lad.none::after { content: attr(data-empty); }

/* ---- A's tables: everything listed (R-66) ----------------------------------------------- */

.table-wrap { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.table { width: 100%; }
.table th {
  height: 36px; padding: 0 var(--s4) 0 0;
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); text-align: left; white-space: nowrap; vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
.table td { height: 44px; padding: 0 var(--s4) 0 0; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table .r { text-align: right; }
.table td.num { font-size: 13px; }
.table td.num .u { font: 500 11px var(--sans); color: var(--ink-3); margin-left: 4px; }
.table td.wrap { white-space: normal; min-width: 200px; max-width: 420px; color: var(--ink-2); padding-top: 10px; padding-bottom: 10px; line-height: 18px; }
.table td.wrap code { font: 400 12px/16px var(--mono); color: var(--ink-2); word-break: break-all; }
.table td .of { color: var(--ink-3); }
.table tbody tr { transition: background-color var(--fast); }
.table tbody tr[data-href], .table tbody tr[data-action] { cursor: pointer; }
.table tbody tr[data-href]:hover, .table tbody tr[data-action]:hover, .table tbody tr.open { background: var(--bg-2); }
.table tr.err td { color: var(--attn); }
.table tr.err td.num { color: var(--attn); }
.table tr.close td.ev { font-weight: 700; }
.table tr.fresh { animation: power 1800ms var(--ease); }
.table .strong { font-weight: 700; }
.table .coin-cell { font-weight: 800; font-size: 15px; }
.table .who-cell { font-weight: 700; }
.table tfoot td { height: 44px; font-weight: 700; border-bottom: 0; border-top: 1px solid var(--line-2); }
.table tr.halted td:first-child { box-shadow: inset 2px 0 0 var(--attn); padding-left: 10px; }
.table-empty { padding: var(--s5) 0; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.table.dense th, .table.dense td { padding-right: var(--s3); }
.table td.cond { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.more-row { display: flex; justify-content: center; padding: var(--s4) 0; }

/* A day's heading row in a list of events. */
.table tr.day td { height: 34px; padding-top: 10px; border-bottom: 1px solid var(--line); background: none; }
.table tr.day td .k { color: var(--ink-3); }
.table tr.day td.num { font-size: 12px; }

/* A sortable column: the header is a button; the sorted one is lit. */
.th-btn { display: inline-flex; align-items: center; gap: 4px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; transition: color var(--fast); }
.th-btn:hover { color: var(--ink-2); }
th[aria-sort] .th-btn { color: var(--ink); }
.th-btn .arr { width: 7px; height: 7px; stroke: currentColor; fill: none; stroke-width: 1.5; opacity: 0; transition: transform var(--fast) var(--ease), opacity var(--fast); }
th[aria-sort] .th-btn .arr { opacity: 1; }
th[aria-sort="ascending"] .th-btn .arr { transform: rotate(180deg); }
.table th.r .th-btn { flex-direction: row-reverse; }

/* A row that opens in place: a user's accounts under the user. */
.table .tog { width: 30px; padding-right: 0; }
.table .tog-btn { width: 30px; height: 36px; display: grid; place-items: center; margin-left: -8px; border-radius: 3px; transition: background-color var(--fast); }
.table .tog-btn:hover { background: var(--bg-3); }
.table td.spark-td, .table th.spark-th { width: 140px; min-width: 120px; }
.table .tog svg { width: 9px; height: 9px; stroke: var(--ink-3); fill: none; stroke-width: 1.6; transition: transform var(--med) var(--ease); display: block; }
.table tr.open .tog svg { transform: rotate(90deg); stroke: var(--ink); }
.table tr.sub td { height: 40px; background: var(--bg-2); font-size: 13px; }
.table tr.sub td:first-child { box-shadow: inset 2px 0 0 var(--line-2); }
.table tr.sub td.acc-cell { padding-left: 0; }
.table tr.sub:hover td { background: var(--bg-3); }
.table tr.sub-end td { height: 8px; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 0; }
.table tr.sub-none td { height: 40px; background: var(--bg-2); color: var(--ink-3); }

.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 3px; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); vertical-align: middle; white-space: nowrap; }
.tag.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---- charts ---------------------------------------------------------------------------- */

.days { padding: 0 var(--side); }
.chart { position: relative; height: 160px; }
.chart .plot { position: absolute; left: 0; right: 0; top: 18px; bottom: 22px; display: flex; }
.chart .axis { position: absolute; left: 0; right: 0; height: 1px; background: var(--line-2); }
.chart .col { position: relative; flex: 1; height: 100%; }
.chart .b { position: absolute; left: 50%; width: min(10px, 62%); transform: translateX(-50%); border-radius: 1px; transition: opacity var(--fast); }
.chart .b.g { background: var(--gain); }
.chart .b.l { background: var(--loss); }
.chart .b.z { height: 1px !important; width: min(4px, 40%); background: var(--ink-4); }
.chart.hover .b { opacity: 0.35; }
.chart.hover .col.on .b { opacity: 1; }
.chart .top { position: absolute; left: 0; top: 0; font: 400 10px var(--mono); color: var(--ink-3); }
.chart .ticks { position: absolute; left: 0; right: 0; bottom: 0; height: 16px; }
.chart .ticks span { position: absolute; bottom: 0; transform: translateX(-50%); font: 400 10px var(--mono); color: var(--ink-3); white-space: nowrap; }
.chart .ticks span:last-child { transform: translateX(-100%); }
.chart-empty { padding: var(--s5) 0; color: var(--ink-3); }
.chart:has(.chart-empty) { height: auto; }
.spark { display: block; width: 100%; height: 28px; overflow: visible; }
.spark .line { fill: none; stroke: var(--ink-3); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.days14 { display: block; width: 92px; height: 20px; margin-left: auto; }
.days14 .g { fill: var(--gain); }
.days14 .l { fill: var(--loss); }
.days14 .z { fill: var(--line-2); }

/* Profit over time (R-88): a small chart in a page's head, left of the sells
   calendar, and the same chart large in a dialog. A view's panes stack, one axis
   each, over one time axis; each point's column runs halfway to its neighbours, so
   the crosshair snaps, and the legend shows the figures of the point under it. A
   series keeps its colour in every view. */
.m-aside, .f-aside, .ro-aside { display: flex; align-items: flex-end; gap: var(--s7); min-width: 0; }
.m-aside { justify-self: end; }
.hist-mini { flex: 0 1 420px; min-width: 300px; display: flex; flex-direction: column; gap: 6px; }
.hist-mini + .beads-wrap { flex: none; }
.hm-bar, .hd-bar { display: flex; align-items: center; gap: var(--s2); }
.hist-view { flex: 1 1 auto; min-width: 0; height: 32px; }
.hist-view select { font-size: 12px; padding: 0 26px 0 10px; }
.hm-bar .hist-range { flex: none; padding: 2px; }
.hm-bar .hist-range button { height: 26px; padding: 0 7px; font-size: 11px; }
.hm-max { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: var(--r); color: var(--ink-3); transition: color var(--fast), border-color var(--fast); }
.hm-max:hover { color: var(--ink); border-color: var(--ink-3); }
.hm-max svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.hl { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s4); row-gap: 2px; min-height: 18px; font-size: 12px; color: var(--ink-3); }
.hl-when { font-size: 10px; line-height: 16px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.hl-i { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.hl .key { display: inline-block; width: 12px; height: 0; border-top: 2px solid var(--ink-2); transform: translateY(-3px); }
.hl-v { font-size: 13px; color: var(--ink); }
.hl-v.gain { color: var(--gain); }
.hl-v.loss { color: var(--loss); }
.key.s-gain { border-top-color: var(--gain); }
.key.s-loss { border-top-color: var(--loss); }
.key.s-open { border-top-style: dashed; }
.key.s-assets { border-top-color: var(--ink); }
.key.s-buy { border-top-color: var(--attn); }
.key.s-sell { border-top-color: var(--gain); }
.hist-body { transition: opacity var(--med); }
.hist-body.busy { opacity: 0.4; }
.hist-wait { height: 100px; }
.hist-wait .sk { display: block; width: 100%; height: 100%; }
.hist-chart { height: 100px; }
.hist-chart .plot { left: 0; right: 0; top: 4px; bottom: 16px; display: block; border-bottom: 1px solid var(--line); }
.hist-chart .ticks { height: 12px; }
.hist-chart .ticks span { font-size: 9px; }
.hist-chart .ticks span:last-child { transform: translateX(-50%); }
.hist-mini .chart-empty { padding: var(--s3) 0; font-size: 12px; }
.hist-svg { position: absolute; left: 0; width: 100%; overflow: visible; }
.hist-svg .line { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hist-svg .line.s-gain { stroke: var(--gain); }
.hist-svg .line.s-loss { stroke: var(--loss); }
.hist-svg .line.s-open { stroke-dasharray: 5 4; }
.hist-svg .line.s-assets { stroke: var(--ink); }
.hist-svg .line.s-buy { stroke: var(--attn); }
.hist-svg .line.s-sell { stroke: var(--gain); }
.hist-svg .zero { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hist-y { position: absolute; left: calc(100% + 8px); width: 68px; display: flex; flex-direction: column; justify-content: space-between; text-align: right; font: 400 10px/1 var(--mono); color: var(--ink-3); }
.hist-chart .col { position: absolute; top: 0; bottom: 0; flex: none; height: auto; cursor: crosshair; }
.hist-chart .col:focus-visible { outline: none; }
.hist-chart .col .hair { position: absolute; top: 0; bottom: 0; width: 1px; margin-left: -0.5px; background: var(--ink-3); opacity: 0; }
.hist-chart .col .dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--ink-2); box-shadow: 0 0 0 2px var(--bg); opacity: 0; }
.hist-chart .col .dot.s-gain, .hist-chart .col .dot.s-sell { background: var(--gain); }
.hist-chart .col .dot.s-loss { background: var(--loss); }
.hist-chart .col .dot.s-assets { background: var(--ink); }
.hist-chart .col .dot.s-buy { background: var(--attn); }
.hist-chart .col:hover .hair, .hist-chart .col:hover .dot, .hist-chart .col:focus .hair, .hist-chart .col:focus .dot,
.hist-chart .col:last-child .dot { opacity: 1; }
.dialog.hist-dialog { width: min(1120px, calc(100vw - 32px)); }
.hd-body { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4) var(--s5) var(--s5); }
.hd-bar .hist-view { flex: 0 1 300px; height: 36px; }
.hd-bar .hist-view select { font-size: 13px; }
.hist-range .rs { display: none; }
.hist-dialog .hl { font-size: 13px; }
.hist-dialog .hl-v { font-size: 16px; }
.hist-dialog .hist-wait { height: min(460px, 58vh); }
.hist-dialog .hist-chart { height: min(460px, 58vh); }
.hist-dialog .hist-chart .plot { right: 76px; bottom: 24px; }
.hist-dialog .hist-chart .ticks { right: 76px; height: 16px; }
.hist-dialog .hist-chart .ticks span { font-size: 10px; }
.hist-dialog .hist-chart .col .dot { width: 8px; height: 8px; box-shadow: 0 0 0 2px var(--bg-3); }
.hist-dialog .chart-empty { padding: var(--s7) 0; }
/* The head keeps the chart and the calendar on its own row on a wide screen, and
   puts them on a row of their own below the figures otherwise. */
@media (min-width: 1600px) {
  .figs:has(.f-aside) { grid-template-columns: 1.4fr 1fr 1fr 1fr auto; }
  .f-aside { padding-left: var(--s6); border-left: 1px solid var(--line); }
  .readout:has(.ro-aside) { grid-template-columns: minmax(320px, 1.9fr) repeat(var(--cells, 4), minmax(0, 1fr)) auto; }
  .ro-aside { padding-left: var(--s6); border-left: 1px solid var(--line); }
}
@media (max-width: 1599px) {
  .master:has(.hist-mini) .m-aside { grid-column: 1 / -1; justify-self: stretch; }
  .f-aside, .ro-aside { grid-column: 1 / -1; margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--line); }
  .hist-mini { flex: 1 1 420px; max-width: 680px; }
  .hist-mini + .beads-wrap { margin-left: auto; }
}
@media (max-width: 859px) {
  .m-aside, .f-aside, .ro-aside { flex-direction: column; align-items: stretch; gap: var(--s5); }
  .hist-mini { flex: none; min-width: 0; max-width: none; }
  .hm-bar .hist-view select { padding: 0 22px 0 8px; }
  .hm-bar .hist-range button { padding: 0 6px; }
  .hist-mini + .beads-wrap { margin-left: 0; }
  .f-aside { margin-top: var(--s2); padding-top: var(--s4); }
  .dialog.hist-dialog { width: calc(100vw - 16px); }
  .hd-body { padding: var(--s3) var(--s4) var(--s4); }
  .hd-bar { flex-wrap: wrap; }
  .hd-bar .hist-view { flex: 1 1 100%; }
  .hd-bar .hist-range { flex: 1; }
  .hist-dialog .hist-range .rl { display: none; }
  .hist-dialog .hist-range .rs { display: inline; }
  .hist-dialog .hist-chart, .hist-dialog .hist-wait { height: 46vh; }
  .hist-dialog .hist-chart .plot, .hist-dialog .hist-chart .ticks { right: 60px; }
  .hist-y { width: 54px; }
}
/* On the account page it is a section of its own under the Portfolio (16-Oct-2026):
   no rule above it, the chart widening as the page does, the calendar at the right. */
.acct-hist > .f-aside { margin-top: 0; padding: 0; border: 0; }
@media (min-width: 860px) {
  .acct-hist .hist-mini { flex: 1 1 420px; max-width: 760px; }
  .acct-hist .hist-mini + .beads-wrap { margin-left: auto; }
}

/* ---- buttons, links, switches ------------------------------------------------------------ */

.btn {
  height: 36px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  border-radius: var(--r);
  font-size: 14px; font-weight: 800; white-space: nowrap;
  transition: background-color var(--fast), color var(--fast), border-color var(--fast), transform var(--fast) var(--ease), opacity var(--fast);
}
.btn svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover:not([disabled]) { background: #fff; }
.btn.ghost { color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover:not([disabled]) { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); }
.btn.quiet { color: var(--ink-2); padding: 0 8px; }
.btn.quiet:hover { color: var(--ink); }
.btn.danger { background: var(--loss); color: #230c07; }
.btn.danger:hover:not([disabled]) { background: #ff8f7a; }
.btn:active:not([disabled]) { transform: scale(0.98); }
.btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.block { width: 100%; }
.btn.busy { color: transparent !important; position: relative; }
.btn.busy::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 2px solid var(--bg); border-right-color: transparent; border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.btn.ghost.busy::after { border-color: var(--ink-2); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(1turn); } }

.link {
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  text-decoration: underline; text-decoration-color: var(--ink-4); text-underline-offset: 4px;
  transition: color var(--fast), text-decoration-color var(--fast);
}
.link:hover { color: var(--ink); text-decoration-color: var(--ink-2); }
.link.danger { color: var(--loss); text-decoration-color: rgba(255, 122, 98, 0.35); }
.link[disabled] { opacity: 0.35; cursor: not-allowed; }
a.plain:hover { text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 4px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 8px 0 10px;
  border-radius: 13px; background: var(--bg-3);
  font-size: 13px; font-weight: 700;
  transition: background-color var(--fast);
}
.chip:hover { background: var(--line-2); }
.chip svg { width: 8px; height: 8px; stroke: var(--ink-2); fill: none; stroke-width: 1.6; }

.sw { position: relative; width: 30px; height: 18px; flex: none; border-radius: 9px; background: var(--line-2); transition: background-color var(--med); }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink-3); transition: transform 280ms var(--spring), background-color var(--med); }
.sw[aria-checked="true"] { background: var(--ink-3); }
.sw[aria-checked="true"]::after { transform: translateX(12px); background: var(--ink); }
.sw:hover { background: var(--ink-4); }
.sw[aria-checked="true"]:hover { background: var(--ink-2); }
.sw[disabled] { opacity: 0.4; cursor: not-allowed; }
.sw-label { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }

/* ---- forms ---------------------------------------------------------------------------------- */

.field { display: block; min-width: 0; }
.field > .lbl, .field > .k { display: block; margin-bottom: var(--s2); }
.hint { margin-top: 6px; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.err { margin-top: 6px; font-size: 12px; line-height: 16px; color: var(--loss); }
.form-err { padding: 10px 12px; font-size: 13px; color: var(--loss); background: var(--loss-wash); border-radius: var(--r); }
.box {
  display: flex; align-items: center; gap: var(--s2);
  height: 40px; padding: 0 var(--s3);
  background: var(--bg);
  border: 1px solid var(--line-2); border-radius: var(--r);
  transition: border-color var(--fast);
}
.box:focus-within { border-color: var(--ink-3); }
.box.bad, .box:has(input.bad) { border-color: var(--loss); }
.field-err { color: var(--loss); }
.box > svg { width: 13px; height: 13px; stroke: var(--ink-3); fill: none; stroke-width: 1.5; flex: none; }
.box input, .box textarea { all: unset; flex: 1; min-width: 0; height: 100%; font-size: 14px; }
.box input::placeholder { color: var(--ink-3); }
.box input.num, .box.num input { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.box .suffix { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--ink-3); }
.box .reveal { font-size: 12px; font-weight: 700; color: var(--ink-3); transition: color var(--fast); }
.box .reveal:hover { color: var(--ink); }
.box.sm { height: 34px; }
.box.tall { height: auto; padding: var(--s2) var(--s3); }
.box.tall textarea { height: 200px; font-family: var(--mono); font-size: 12px; white-space: pre; overflow: auto; }
.select { position: relative; display: flex; align-items: center; height: 36px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); transition: border-color var(--fast); }
.select:focus-within { border-color: var(--ink-3); }
.select select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; height: 100%; padding: 0 30px 0 12px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; width: 100%; }
.select select:focus { outline: none; }
.select select option { background: var(--bg-3); color: var(--ink); }
.select svg { position: absolute; right: 10px; width: 9px; height: 9px; stroke: var(--ink-3); fill: none; stroke-width: 1.6; pointer-events: none; }
.stack { display: flex; flex-direction: column; gap: var(--s5); }
.row-fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); }
.seg button {
  height: 32px; padding: 0 10px; border-radius: 3px;
  font-size: 13px; font-weight: 700; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background-color var(--fast), color var(--fast);
}
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--line-2); color: var(--ink); }
.seg button[disabled] { color: var(--ink-4); cursor: not-allowed; }
.seg button[disabled]:hover { color: var(--ink-4); }
.seg.inline { display: inline-grid; }

.filters { display: flex; align-items: flex-end; gap: var(--s3); flex-wrap: wrap; padding: 0 var(--side) var(--s4); }
.filters .field { min-width: 150px; }
.filters.mapping { padding: var(--s4) 0 0; }
.head + .filters { padding-top: var(--s4); }
.search { display: flex; align-items: center; gap: var(--s2); width: 240px; height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r); color: var(--ink-3); transition: border-color var(--fast), width var(--med) var(--ease); }
.search:focus-within { border-color: var(--ink-3); width: 280px; }
.search svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.search input { all: unset; flex: 1; min-width: 0; font-size: 14px; color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }

.picked { display: flex; align-items: baseline; gap: 10px; flex: 1; min-width: 0; }
.picked b { font-size: 15px; font-weight: 800; }
.picked .num { color: var(--ink-2); font-size: 13px; }
.x-sm { margin-left: auto; align-self: center; font-size: 12px; font-weight: 700; color: var(--ink-3); transition: color var(--fast); }
.x-sm:hover { color: var(--ink); }

.coin-list { margin-top: var(--s2); max-height: 272px; overflow-y: auto; border-top: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.coin-list li {
  display: grid; grid-template-columns: 1fr auto 56px; column-gap: var(--s3); align-items: center;
  height: 36px; padding: 0 var(--s2);
  border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background-color var(--fast);
}
.coin-list li b { font-weight: 800; }
.coin-list li .q { color: var(--ink-3); font-weight: 400; margin-left: 2px; }
.coin-list li .num { color: var(--ink-2); font-size: 12px; }
.coin-list li .tag { border: 0; font-size: 11px; letter-spacing: 0; text-transform: none; color: var(--ink-3); justify-content: flex-end; }
.coin-list li[aria-selected="true"], .coin-list li:hover { background: var(--bg-3); }
.coin-list li[aria-disabled="true"] { cursor: default; }
.coin-list li[aria-disabled="true"] b { color: var(--ink-3); }
.coin-list li[aria-disabled="true"]:hover { background: none; }
.coin-list .none { display: block; height: auto; padding: var(--s3) var(--s2); color: var(--ink-3); cursor: default; }

/* Coins picked in the add sheet: a chip each, a check in the list. */
.picks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s2); }
.coin-list li.picked { background: var(--bg-3); }
.coin-list li .tag svg { width: 12px; height: 12px; stroke: var(--ink); fill: none; stroke-width: 1.8; }

/* The period of the figures: its label opens a menu of periods and dates. */
.m-ro .k { position: relative; }
.period-btn { display: inline-flex; align-items: center; gap: 5px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink-3); transition: color var(--fast); }
.period-btn:hover, .period-btn[aria-expanded="true"] { color: var(--ink); }
.period-btn svg { width: 8px; height: 8px; stroke: currentColor; fill: none; stroke-width: 1.8; transition: transform var(--fast) var(--ease); }
.period-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.menu.period-menu { left: -10px; right: auto; top: calc(100% + 8px); min-width: 320px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink-2); }
.period-menu button[aria-checked="true"] { color: var(--ink); }
.period-menu button[aria-checked="true"]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); }
.period-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px 10px 10px; }
.period-dates label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.period-dates .box { padding: 0 8px; }
.period-dates .box input { font: 400 13px var(--mono); color-scheme: dark; }
.period-dates .btn { grid-column: 1 / -1; width: 100%; }
.menu .period-dates .btn { justify-content: center; color: var(--bg); padding: 0 12px; }

/* A log's filter, above its table. */
.filters.log-filters { padding: var(--s4) var(--side) var(--s4); }
.log-filters .field.short { min-width: 0; width: 92px; flex: none; }
.log-filters .field { min-width: 0; }
.log-filters input[type="date"] { font: 400 13px var(--mono); color-scheme: dark; }
.log-filters .csv { margin-left: auto; }
.log-filters .link { align-self: flex-end; margin-bottom: 10px; }

/* What a user pays, exchange by exchange. */
.fees-table td { vertical-align: baseline; padding-top: 14px; padding-bottom: 14px; }
.fees-table td.wrap { min-width: 0; }
.fee-act { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; color: var(--ink-2); }
.fee-acts { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.table td.big-rate { font-size: 16px; }
/* A new joiner's free days (R-90): the note above the table, the rate struck through
   with a Free stamp, the days left under it. */
.free-note { margin: 0 0 26px; padding: 12px 16px; border: 1px solid rgba(242, 179, 61, 0.35); border-left: 3px solid var(--attn); border-radius: 8px; background: rgba(242, 179, 61, 0.07); color: var(--ink); font-weight: 600; line-height: 1.45; }
.free-word { color: var(--gain); font-weight: 800; }
.fee-free { display: inline-flex; align-items: center; justify-content: flex-end; gap: 12px; }
.fee-free s { color: var(--ink-3); text-decoration-thickness: 2px; text-decoration-color: var(--loss); }
.fee-stamp { display: inline-block; padding: 3px 9px 2px; border: 2px solid var(--gain); border-radius: 5px; color: var(--gain); font: 800 13px/1.1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; transform: rotate(-8deg); }
.free-left { margin-top: 18px; color: var(--ink); line-height: 1.6; }
.free-days { font-weight: 800; }
.free-days.ok { color: var(--gain); }
.free-days.low { color: var(--attn); }
.free-days.out { color: var(--loss); }
.fee-clip { margin-top: 22px; max-width: 520px; color: var(--ink-2); }
.fee-clip .howto-frame { margin-top: var(--s3); }

/* An account's own settings, and the fee tiers' inputs. */
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5) var(--s7); padding-bottom: var(--s4); }
.settings-grid fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--s3); }
.settings-grid legend { padding: 0; margin-bottom: var(--s3); }
.table.tiers td .box { max-width: 150px; margin-left: auto; }
.table.tiers td:nth-child(2) .box { max-width: 220px; margin-left: 0; }
/* A width in percent lets the inputs give way, so the table fits a phone. */
.table.tiers td .box input { width: 100%; }

/* ---- the readout band: a bot's page ----------------------------------------------------- */

.readout {
  display: grid;
  grid-template-columns: minmax(320px, 1.9fr) repeat(var(--cells, 4), minmax(0, 1fr));
  padding: var(--s6) var(--side) var(--s5);
}
.ro { min-width: 0; padding: 0 var(--s5); border-left: 1px solid var(--line); }
.ro.ro-hero { padding: 0 var(--s7) 0 0; border-left: 0; }
.hero { margin-top: 10px; font-size: 60px; line-height: 60px; font-weight: 300; letter-spacing: -0.045em; white-space: nowrap; }
.hero.loss, .hero.loss .sign { color: var(--loss); }
.hero .p { margin: 0 -0.14em; }
.ro .spark { margin-top: 14px; }
.val { margin-top: 10px; font-size: 24px; line-height: 30px; letter-spacing: -0.02em; white-space: nowrap; }
.val .of { color: var(--ink-3); }
.sub { margin-top: 6px; font-size: 12px; line-height: 16px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub .attn { color: var(--attn); }

.bot-ladder { padding: var(--s5) var(--side) var(--s4); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bot-ladder .big-lad { max-width: 1040px; }
.bot-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); border-bottom: 1px solid var(--line); }
.bot-cols > section { padding: 0 var(--side) var(--s5); min-width: 0; }
.bot-cols > section + section { border-left: 1px solid var(--line); }
.setting { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); min-height: 60px; }
.setting .v { margin-top: 3px; font-size: 15px; }
.setting .v .unit { font: 500 11px var(--sans); color: var(--ink-3); margin-left: 4px; }
.setting form { grid-column: 1 / -1; display: flex; gap: var(--s2); align-items: flex-start; }
.setting form .box { flex: 1; height: 36px; }
.setting .seg { grid-column: 1 / -1; }
.setting .sel-row { grid-column: 1 / -1; display: flex; gap: var(--s2); }
.setting .sel-row .select { flex: 1; }
.danger-zone { display: flex; align-items: center; gap: var(--s3); padding-top: var(--s4); }

/* ---- the operator's pages: a user, an account, the platform ------------------------------- */

.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: var(--s4); }
.people > section { padding: var(--s4) var(--side) var(--s5); min-width: 0; }
.people > section + section { border-left: 1px solid var(--line); }
.people .facts { grid-template-columns: 130px 1fr; margin-top: var(--s3); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s7); }
.panel-note { padding: var(--s3) 0; font-size: 13px; color: var(--ink-3); }
.cells { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cells > div { padding: var(--s4) var(--s5); border-left: 1px solid var(--line); min-width: 0; }
.cells > div:first-child { border-left: 0; padding-left: 0; }
.cells .v { margin-top: 6px; font-size: 18px; line-height: 24px; white-space: nowrap; }
.cells a.v { display: block; transition: color var(--fast); }
.cells a.v:hover { color: #fff; }
.cells .s { margin-top: 2px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* ---- commission and top-up ------------------------------------------------------------------ */

.deposit { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s6); padding: var(--s5) var(--side); border-bottom: 1px solid var(--line); align-items: start; }
.qr { display: block; width: 216px; height: 216px; padding: 8px; background: #fff; border-radius: var(--r); }
.deposit dl { display: grid; gap: var(--s4); max-width: 560px; }
.deposit dt { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.deposit dd { margin: 6px 0 0; font-size: 15px; }
.deposit dd.big-num { font-size: 26px; line-height: 32px; }
.address { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.address code { font: 400 14px/20px var(--mono); word-break: break-all; color: var(--ink); }
.credit { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--gain-wash); border-radius: var(--r); color: var(--gain); font-weight: 700; animation: fresh-credit 2400ms var(--ease); }
@keyframes fresh-credit { from { box-shadow: 0 0 0 1px var(--gain); } }

/* ---- profile -------------------------------------------------------------------------------- */

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.two > section { padding: 0 var(--side) var(--s5); min-width: 0; }
.two > section + section { border-left: 1px solid var(--line); }
.kv { display: grid; grid-template-columns: 150px 1fr; }
.kv dt, .kv dd { padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv dt { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); line-height: 20px; }
.kv dd { margin: 0; }
.narrow { max-width: 440px; }

/* ---- connecting an exchange: the first run ---------------------------------------------------- */

.connect { max-width: 580px; padding: var(--s6) var(--side) var(--s7); }
.connect-page { display: grid; grid-template-columns: minmax(0, 580px) minmax(0, 640px); align-items: start; }
/* Level with the form's first field: the page's top, the heading and the form's margin. */
.howto { padding: calc(var(--s6) + 36px + var(--s6)) var(--side) var(--s7) 0; }
.connect-page.first .howto { padding-top: calc(var(--s6) + var(--s4) + 20px + 20px + 36px + var(--s6)); }
.howto-frame { margin-top: var(--s2); aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); overflow: hidden; }
.howto-frame video { display: block; width: 100%; height: 100%; }
.howto-lbl { display: block; }
.howto-lbl b { color: var(--attn); }
.howto .hint + .howto-lbl { margin-top: var(--s6); }

.connect h1 { font-size: 30px; line-height: 36px; font-weight: 800; letter-spacing: -0.015em; }
.connect h1.after-steps { margin-top: 20px; }
/* On Exchange keys (16-Oct-2026): the active keys under a yellow heading, then a gap
   and the form, its heading as tall as the page's h1 so the videos still line up. */
.keys-h { margin-top: var(--s6); font-size: 13px; line-height: 18px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--attn); }
.keys-connect { margin-top: var(--s8); border-top: 1px solid var(--line); }
.connect h2.connect-h { font-size: 22px; line-height: 36px; font-weight: 800; letter-spacing: -0.01em; }
.connect form { margin-top: var(--s6); }
.steps { display: flex; gap: var(--s5); margin-top: var(--s4); font-size: 13px; color: var(--ink-3); }
.steps span { display: flex; align-items: center; gap: 8px; }
.steps span b { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line-2); border-radius: 50%; font: 500 11px var(--mono); }
.steps span.now { color: var(--ink); font-weight: 700; }
.steps span.now b { border-color: var(--ink); background: var(--ink); color: var(--bg); }

/* ---- signing in --------------------------------------------------------------------------------- */

.auth { min-height: 100vh; display: grid; place-items: center; padding: var(--s6) var(--s4); }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .brand { margin-bottom: var(--s7); }
.auth-card h1 { font-size: 30px; line-height: 36px; font-weight: 800; letter-spacing: -0.015em; }
.auth-card form { margin-top: var(--s5); }
/* Sign-up: the email is proved with a code, then the password fields open (Serdar, 19-Oct-2026). */
.auth-card .code-btn { min-width: 124px; height: 40px; font-variant-numeric: tabular-nums; }
.auth-card .box:has(input:disabled) { opacity: 0.45; }
.auth-card .box:has(#code:disabled) { opacity: 0.6; }
.auth-card #verified { display: flex; }
.auth-card .pw-match { color: var(--loss); font-weight: 600; }
.auth-card .pw-match.ok { color: var(--gain); }
.auth-card .field-err { font-weight: 600; }
.auth-card .avail { color: var(--loss); font-weight: 600; }
.auth-card .avail.ok { color: var(--gain); }
.auth-alt { margin-top: var(--s5); font-size: 14px; color: var(--ink-3); }
.auth-alt a { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--ink-4); text-underline-offset: 4px; }

/* ---- layers: sheet, dialog, toast, tooltip ---------------------------------------------------------- */

.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity var(--med); }
.scrim.on { opacity: 1; }
.sheet {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41;
  width: 460px; max-width: 100%;
  display: flex; flex-direction: column;
  background: var(--bg-3); border-left: 1px solid var(--line-2);
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.2, 0.9, 0.1, 1);
}
.sheet.on { transform: none; }
.sh-head { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; padding: 22px var(--s5) var(--s4); border-bottom: 1px solid var(--line); }
.sh-head h2 { font-size: 20px; line-height: 26px; font-weight: 800; }
.x { margin-left: auto; align-self: center; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-3); transition: color var(--fast), background-color var(--fast); }
.x:hover { color: var(--ink); background: var(--line); }
.x svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 1.6; }
.sh-body { flex: 1; overflow-y: auto; padding: var(--s5); display: flex; flex-direction: column; gap: 28px; }
.sh-foot { display: flex; gap: var(--s2); padding: var(--s4) var(--s5) 22px; border-top: 1px solid var(--line); }
.sh-foot .primary { flex: 1; }

.dialog {
  position: fixed; left: 50%; top: 50%; z-index: 41;
  width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 6px;
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.7);
  transform: translate(-50%, -48%) scale(0.98); opacity: 0;
  transition: transform var(--med) var(--ease), opacity var(--med);
}
.dialog.on { transform: translate(-50%, -50%); opacity: 1; }
.dialog .body { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); }
.dialog h2 { font-size: 20px; line-height: 26px; font-weight: 800; }
.dialog p { color: var(--ink-2); }
.dialog .changes { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; font: 400 12px/18px var(--mono); color: var(--ink-2); }
.dialog .changes b { color: var(--ink); font-weight: 500; }
.dialog .btns { display: flex; justify-content: flex-end; gap: var(--s2); padding: 0 var(--s5) var(--s5); }
.dialog .box { background: var(--bg-2); }
.dialog.wide { width: min(720px, calc(100vw - 32px)); }

/* An admin's correction of a bot's positions: one row a cover. */
.pos-grid { display: grid; grid-template-columns: 48px 40px repeat(3, minmax(0, 1fr)); gap: 6px var(--s2); align-items: center; max-height: 340px; overflow-y: auto; }
.pos-grid .k { white-space: nowrap; }
.pos-grid .n { font: 400 12px/1 var(--mono); color: var(--ink-3); }
.pos-grid .box { height: 32px; padding: 0 var(--s2); }
.pos-grid .box input { font-size: 13px; }
.pos-grid input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--ink); justify-self: start; }

.toast {
  position: fixed; left: 50%; bottom: var(--s5); z-index: 50;
  display: flex; align-items: center; gap: var(--s5);
  max-width: calc(100vw - 32px); min-height: 44px; padding: 0 8px 0 18px;
  background: var(--ink); color: var(--bg); border-radius: 22px;
  font-weight: 700;
  transform: translate(-50%, 16px); opacity: 0;
  transition: transform var(--med) var(--spring), opacity var(--med);
  overflow: hidden;
}
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.toast .text { padding: 10px 0; }
.toast .undo { flex: none; height: 30px; padding: 0 12px; border-radius: 15px; background: rgba(18, 17, 16, 0.1); font-weight: 800; }
.toast .undo:hover { background: rgba(18, 17, 16, 0.18); }
.toast .undo[hidden] + .time { display: block; }
.toast.bad { background: var(--loss); color: #230c07; }
.toast .time { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: rgba(18, 17, 16, 0.35); transform-origin: left; }

.tip {
  position: fixed; z-index: 60;
  padding: 6px 9px; max-width: 280px;
  background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--r);
  font-size: 12px; line-height: 16px; color: var(--ink-2);
  pointer-events: none;
  opacity: 0; transform: translate(-50%, calc(-100% - 8px));
  transition: opacity var(--fast);
}
.tip.on { opacity: 1; }
.tip .num { display: block; font-size: 13px; color: var(--ink); }

/* ---- the condition editor (R-55): every condition of a bot or a preset ------------------------------ */

.editor { padding: 0 var(--side); }
.ce-index { position: sticky; top: var(--bar-h); z-index: 10; display: flex; gap: var(--s4); flex-wrap: wrap; padding: var(--s3) 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.ce-index a { font-size: 13px; font-weight: 700; color: var(--ink-3); transition: color var(--fast); }
.ce-index a:hover { color: var(--ink); }
.ce-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s7); }
.ce-section { padding: var(--s5) 0 var(--s4); border-bottom: 1px solid var(--line); min-width: 0; scroll-margin-top: calc(var(--bar-h) + 56px); }
.ce-section h3, .ce-covers > h3 { font-size: 15px; line-height: 20px; font-weight: 800; }
.ce-summary { display: flex; flex-wrap: wrap; gap: 4px var(--s4); margin-top: var(--s2); font-size: 12px; color: var(--ink-3); }
.ce-summary b { font: 400 12px var(--mono); color: var(--ink-2); }
.ce-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s3) var(--s4); margin-top: var(--s3); }
.cf { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cf-name { font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-input { display: flex; align-items: center; height: 34px; padding: 0 10px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); transition: border-color var(--fast); }
.cf-input:focus-within { border-color: var(--ink-3); }
.cf-input input { all: unset; flex: 1; min-width: 0; font: 400 13px var(--mono); font-variant-numeric: tabular-nums; }
.cf-input i { font-size: 11px; font-weight: 700; color: var(--ink-3); margin-left: 6px; }
.cf select { height: 34px; padding: 0 10px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); color: var(--ink); font-size: 13px; font-weight: 600; }
.cf-live { font: 400 11px/14px var(--mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf.cf-bool { flex-direction: row; align-items: center; gap: 10px; min-height: 34px; flex-wrap: wrap; }
.cf.cf-bool input { width: 16px; height: 16px; accent-color: var(--ink); }
.cf.cf-bool .cf-name { font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--ink-2); }
.cf.cf-bool .cf-live { flex-basis: 100%; }
.cf.altered .cf-input, .cf.altered select { border-color: var(--ink); box-shadow: inset 2px 0 0 var(--ink); }
.cf.altered .cf-name { color: var(--ink); }
.cf input:disabled { opacity: 0.5; }
.ce-covers { padding: var(--s5) 0; scroll-margin-top: calc(var(--bar-h) + 56px); }
.ce-cover { margin-top: var(--s4); border-top: 1px solid var(--line); padding-top: var(--s4); }
.ce-cover > header { display: flex; align-items: center; gap: var(--s3); }
.ce-cover h4 { font-size: 15px; font-weight: 800; }
.ce-idx { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--bg-3); font: 500 11px var(--mono); color: var(--ink-2); }
.ce-cover.is-open .ce-idx { background: var(--ink); color: var(--bg); }
.ce-state { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.ce-state.on { color: var(--ink); }
.ce-position { display: flex; flex-wrap: wrap; gap: 4px var(--s4); margin-top: var(--s2); font-size: 12px; color: var(--ink-3); }
.ce-position b { font: 400 12px var(--mono); color: var(--ink-2); }
.ce-cover-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s7); }
.ce-half h5 { margin-top: var(--s3); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.editor-bar {
  position: sticky; bottom: 0; z-index: 12;
  display: flex; align-items: center; gap: var(--s3);
  margin-top: var(--s4); padding: var(--s3) 0;
  background: var(--bg); border-top: 1px solid var(--line);
}
.editor-bar .count { margin-right: auto; font-size: 13px; font-weight: 700; color: var(--ink); }
.editor-bar .count:empty::before { content: "No changes"; font-weight: 400; color: var(--ink-3); }

/* ---- loading, empty, missing ---------------------------------------------------------------------------- */

.sk { display: inline-block; height: 0.8em; border-radius: 2px; background: var(--bg-3); vertical-align: middle; animation: sk 1400ms ease-in-out infinite; }
@keyframes sk { 50% { opacity: 0.5; } }
.empty { padding: var(--s7) var(--side); color: var(--ink-3); }
.empty .empty-btn { display: flex; width: fit-content; margin-top: var(--s4); }
.empty-rack { display: flex; align-items: center; gap: var(--s4); min-height: 120px; padding: var(--s5) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-3); }

/* Spacing that would otherwise be inline: the site's policy refuses inline styles. */
.spacer { height: var(--s7); }
.gap-top { margin-top: var(--s4); }
.mb { margin-bottom: var(--s3); }
.span-all { grid-column: 1 / -1; }
.foot {
  display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap;
  margin-top: var(--s6); padding: var(--s4) var(--side) 0;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-3);
}
.foot .grow { flex: 1; }

/* ---- the user's main page (14-Oct-2026): problems, the first steps, four figures,
   recent trades, and on an account its coins; the rest sits behind the drawer ---- */

.nav-open { position: relative; }
.nav-open.dot::after { content: ""; position: absolute; top: calc(50% - 13px); right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--loss); box-shadow: 0 0 0 2px var(--bg); }
#accounts-menu .dsec-h {
  display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: 44px;
  padding: 0 var(--s3) 0 calc(var(--side) - var(--s3) - 1px); border-radius: 3px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
}
#accounts-menu .dsec-h:hover, #accounts-menu .dsec.open .dsec-h { color: var(--ink); background: none; }
#accounts-menu .dsec-h .chev { margin-left: auto; width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 1.6; transition: transform var(--fast) var(--ease); }
/* Closed: the arrow points right; open: down (16-Oct-2026). Accounts is a plain
   heading, always open. */
#accounts-menu .dsec-h .chev { transform: rotate(-90deg); }
#accounts-menu .dsec.open .dsec-h .chev { transform: none; }
#accounts-menu .dsec-h.fixed { cursor: default; }
#accounts-menu .dsec-h .badge { margin-left: 2px; }
#accounts-menu .dsec.here .dsec-h, #accounts-menu .dsec.here a[aria-current] { color: var(--attn); }
#accounts-menu .dsec.here a[aria-current] .q { color: var(--attn); opacity: 0.75; }
#accounts-menu .dsec.here a[aria-current]::after { background: var(--attn); }
#accounts-menu .dsec + .dsec { border-top: 1px solid var(--line); }
#accounts-menu .dsec-b { padding-bottom: var(--s2); }
#accounts-menu .dsec-b a { padding-left: calc(var(--side) - var(--s3) - 1px + var(--s3)); }
/* The welcome card closes the drawer, after a gap: the page's card, sized for it. */
/* The card spans the drawer less its own padding on every screen, and its lines
   break without leaving one word alone (16-Oct-2026, the drawer 10 % narrower). */
#accounts-menu .guide { margin: 72px 0 var(--s3); padding: 14px 12px 12px; }
#accounts-menu .guide :is(h2, p, .s, .s span) { text-wrap: pretty; }
#accounts-menu .guide h2 { font-size: 16px; line-height: 21px; }
#accounts-menu .guide > p { font-size: 13px; line-height: 18px; }
#accounts-menu .guide .gsteps { margin-top: 12px; padding: 0; }
#accounts-menu .guide .gstep { flex-wrap: wrap; align-items: flex-start; gap: 10px; padding: 10px; }
#accounts-menu .guide .gstep > i { width: 22px; height: 22px; margin-top: 1px; }
#accounts-menu .guide .gstep .s { flex: 1 1 calc(100% - 40px); font-size: 14px; line-height: 19px; }
#accounts-menu .guide .gstep .s span { margin-top: 2px; font-size: 12px; line-height: 16px; }
#accounts-menu .guide .gstep .btn { display: inline-flex; justify-content: center; width: auto; min-height: 0; height: 32px; margin-left: 32px; padding: 0 16px; color: var(--bg); background: var(--ink); }
#accounts-menu .guide .gstep .btn:hover { color: var(--bg); background: #fff; }
#accounts-menu .badge { width: 8px; height: 8px; border-radius: 50%; background: var(--loss); flex: none; }
#accounts-menu a .badge { margin-left: auto; }

.banners { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5) var(--side) 0; }
.banner { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 14px; border: 1px solid rgba(255, 122, 98, 0.45); background: var(--loss-wash); border-radius: var(--r); }
.banner.attn { border-color: rgba(242, 179, 61, 0.45); background: var(--attn-wash); }
.banner .ic { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--loss); color: #1b0d09; font-size: 13px; font-weight: 800; }
.banner.attn .ic { background: var(--attn); color: #1b1408; }
.banner .t { flex: 1; min-width: 0; line-height: 19px; }
.banner .t b { display: block; font-weight: 700; }
.banner .t span { font-size: 13px; color: var(--ink-2); }

.guide { margin: var(--s5) var(--side) 0; padding: 18px 18px var(--s4); border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg-2); }
.guide h2 { font-size: 18px; line-height: 24px; font-weight: 800; }
.guide > p { margin-top: var(--s1); color: var(--ink-2); }
.guide .gsteps { margin-top: 14px; display: grid; gap: var(--s2); }
.guide .gstep { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s3); border-radius: var(--r); background: var(--bg-3); }
.guide .gstep > i { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line-2); font: 700 12px var(--mono); color: var(--ink-3); }
.guide .gstep > i svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.guide .gstep.done > i { background: var(--gain); border-color: var(--gain); color: #0b1a12; }
.guide .gstep.now { box-shadow: inset 0 0 0 1.5px var(--attn); }
.guide .gstep.now > i { border-color: var(--attn); color: var(--attn); }
.guide .gstep .s { flex: 1; min-width: 0; font-weight: 700; }
.guide .gstep .s span { display: block; font-size: 12.5px; line-height: 17px; font-weight: 400; color: var(--ink-3); }
.guide .gstep.done .s { color: var(--ink-3); }
.guide .progress { margin-top: var(--s3); height: 4px; border-radius: 2px; background: var(--line); }
.guide .progress b { display: block; height: 100%; border-radius: 2px; background: var(--gain); }

.figs { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; margin: 0 var(--side); padding: var(--s6) 0 var(--s5); border-bottom: 1px solid var(--line); }
.fg { min-width: 0; padding-right: 20px; }
.fg + .fg { padding-left: 20px; border-left: 1px solid var(--line); }
.fg .k { position: relative; }
.fg .v { margin-top: var(--s2); font-size: 28px; line-height: 34px; font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; }
.fg.big .v { font-size: 46px; line-height: 50px; font-weight: 300; letter-spacing: -0.04em; }
.fg .v small { margin-left: 6px; font: 400 13px var(--sans); letter-spacing: 0; color: var(--ink-3); }
.fg .v.flat { color: var(--ink); }
.fg .m { margin-top: 6px; font-size: 13px; line-height: 17px; color: var(--ink-3); }
.fg .m .num { color: var(--ink-2); }

.pill { display: inline-block; min-width: 42px; padding: 4px 6px; border-radius: 3px; text-align: center; font: 800 10.5px/1 var(--sans); letter-spacing: 0.08em; }
.pill.buy { color: var(--ink-2); background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.pill.sell { color: var(--gain); background: var(--gain-wash); box-shadow: inset 0 0 0 1px rgba(98, 208, 155, 0.35); }
/* Trade history: Sell filled green, Buy filled yellow (Serdar, 14-Oct-2026) */
.pill.solid.sell { color: #08140e; background: var(--gain); box-shadow: none; }
.pill.solid.buy { color: #1d1504; background: var(--attn); box-shadow: none; }
/* a day row heads each day, as Recent trades does: the date in yellow over the empty cells and the
   day's profit after fees, a yellow line under it across every column, a small blank gap before the
   next day (Serdar, 15-Oct-2026) */
table.history tr.dayrow td { height: 38px; vertical-align: bottom; padding-bottom: 6px; background: none; font-weight: 700; border-top: 0; border-bottom: 1px solid var(--attn); }
table.history tr.dayrow:not(:first-child) td { height: 64px; }
table.history tr.dayrow td.dd { position: relative; }
table.history tr.dayrow td.dd span { position: absolute; left: 0; bottom: 6px; white-space: nowrap; font-size: 13px; color: var(--attn); }
table.history tr.dayrow { cursor: default; }
table.history td.tm { color: var(--ink); } /* the time in full ink, as in Recent trades */
.trades-empty { padding: var(--s4) 0; color: var(--ink-3); border-top: 1px solid var(--line); }
.tlist .tday { display: flex; justify-content: space-between; align-items: baseline; padding: var(--s4) 0 6px; }
.tlist .tday .num { font-size: 13px; }
.trow { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.trow[data-href] { cursor: pointer; }
.trow .l { flex: 1; min-width: 0; }
.trow .a { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.trow .a .ltm { font-family: var(--sans); font-size: var(--l1, 13px); color: var(--ink); white-space: nowrap; }
.trow .a .qp { min-width: 0; font-size: var(--l1, 13px); color: var(--ink-2); white-space: nowrap; }
/* A monospaced figure's separators narrower than a digit; the × of quantity×price
   tucked in on both sides (16-Oct-2026). */
.num .ns { display: inline-block; margin: 0 -0.18em; }
.trow .a .qp .mul { margin: 0 0.04em; color: var(--ink-3); }
.trow .b .u { font-family: var(--sans); font-size: 11px; }
.trow .b .nw { white-space: nowrap; }
.trow .b .cost { color: var(--attn); }
/* A trade's second line fits one row on a phone (16-Oct-2026): the words in the text
   face, the figures still tabular, a touch smaller on a narrow phone; only amounts in
   the thousands on the narrowest phones wrap, between its phrases. */
.trow .b { margin-top: 3px; font-family: var(--sans); font-size: min(12.5px, 3.3vw); color: var(--ink-3); overflow-wrap: anywhere; }
.trow .r { text-align: right; flex: none; }
.trow .r .p { font-size: 15px; line-height: 20px; font-weight: 600; }
.trow .r .s { font-size: 12px; color: var(--ink-3); }

/* Your coins, then Recent trades under it, a clear gap between the two tables (Serdar, 15-Oct-2026). */
.acct-body > .sec + .sec { margin-top: var(--s8); }
/* Recent trades: the day's date in yellow, the time (UTC) in full ink, Show more last. */
.trades .dt { font-size: 13px; font-weight: 700; color: var(--attn); }
/* Each day: its date, then a yellow line under it across every column; a small blank gap before the next day (Serdar, 15-Oct-2026). */
.table.trades-table tr.day td { height: 38px; vertical-align: bottom; padding-bottom: 6px; border-bottom: 1px solid var(--attn); }
.table.trades-table tr.day:not(:first-child) td { height: 64px; }
.tlist .tday { border-bottom: 1px solid var(--attn); }
.tlist .tday:not(:first-child) { margin-top: var(--s5); }
.trades-table td.tm, .tlist .tm { color: var(--ink); }
.tmore { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.tmore .drill { margin-left: 6px; }
.chead, .crow { display: grid; grid-template-columns: 76px minmax(0, 1fr) 96px 104px 34px; align-items: center; gap: 10px; }
.chead { padding: 6px 0; border-bottom: 1px solid var(--line); }
.crow { min-height: 52px; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; transition: background-color var(--fast); }
.crow:hover { background: var(--bg-2); }
.crow.halted { box-shadow: inset 2px 0 0 var(--attn); padding-left: 10px; }
.crow.fresh { animation: power 1800ms var(--ease); }
.crow .coin-cell { font-weight: 800; font-size: 15px; }
.crow .r, .chead .r { text-align: right; }
.crow .num { font-size: 13px; }
.crow .pl small { display: block; font-size: 11.5px; }
.crow .sw { justify-self: end; }
.coins .sec-head .meta, .coins .sec-head .meta .num { font-size: 15px; font-weight: 800; color: var(--ink); }
/* Manage coins: Add coins and the account's switch-all, the Coins page's first table (Serdar, 15-Oct-2026) */
.all-coins { margin-bottom: var(--s4); border-bottom: 1px solid var(--line); }
.all-coins-row { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; padding: var(--s2) 0 var(--s3); }
.all-coins-row + .all-coins-row { border-top: 1px dashed var(--line); padding-top: var(--s3); }
.all-coins { padding-bottom: var(--s1); }
.all-coins-row .btn { min-width: 132px; justify-content: center; }
.all-coins-row p { flex: 1 1 260px; margin: 0; font-size: 13px; color: var(--ink-2); }
/* Your coins in groups: a header drills down to its coins; all closed on opening. */
.cgroups { border-bottom: 1px solid var(--line); }
.cgrp { border-top: 1px solid var(--line); }
/* A small gap before each group, easier on the eye (Serdar, 15-Oct-2026); a wider one before Scanning market (named Waiting its turn until 16-Oct-2026). */
.cgrp + .cgrp { margin-top: 28px; }
.cgrp.gap { margin-top: 44px; }
/* The figure columns sit right after the names, the rest of the row stays empty (Serdar, 7-Nov-2026: no wide gap in the middle; the name column was 1fr until then, pushing the figures to the right edge). A coin row's indent is on its name cell, so its columns line up with its group's. */
.cgroups { --pf-name: 250px; }
.cgcols, .cgh, .cgtotal { display: grid; grid-template-columns: minmax(0, var(--pf-name)) 72px 120px 110px; align-items: center; gap: 10px; }
.cgtotal { min-height: 52px; border-top: 2px solid var(--ink-3); font-weight: 800; }
.cgtotal .name { padding-left: 17px; font-size: 15px; }
.cgtotal .cnt { justify-self: center; font-size: 15px; }
.cgtotal .sum { text-align: right; font-size: 14px; }
.cgcols { padding: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--ink); } /* column headings and group names bold, slightly bigger, white (Serdar, 15-Oct-2026) */
.cgcols span:nth-child(2) { text-align: center; }
.cgcols span:nth-child(3) { text-align: right; }
.cgcols span:nth-child(4) { text-align: center; }
/* Last trade time: bold white on a group and the Total, the coins like the # of Assets figures, white when under 5 minutes. */
.lt { text-align: center; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.lt.grp { font-weight: 700; color: var(--ink); }
.lt.recent { color: var(--ink); }
/* An open group's coins carry their own times, so the group's own shows only while
   it is closed (Serdar, 16-Oct-2026). */
.cgh[aria-expanded="true"] .lt { visibility: hidden; }
.cgh { width: 100%; min-height: 52px; text-align: left; transition: background-color var(--fast); }
.cgh .gname { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cgh .cnt { justify-self: center; }
.cgh:hover { background: var(--bg-2); }
.cgh .cdot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--ink-4); }
/* Invested's dot is green while a coin in it is locked to sell, neutral otherwise
   (16-Oct-2026). */
.cdot.lit-sell { background: var(--gain); box-shadow: 0 0 0 3px var(--gain-wash); }
.cdot.lit-buy { background: var(--loss); box-shadow: 0 0 0 3px var(--loss-wash); }
.cdot.wait { background: var(--ink-3); }
.cgh .name { font-size: 16px; font-weight: 800; white-space: nowrap; color: var(--ink); }
/* The drill sign right after the name (Serdar, 7-Nov-2026; a column of its own at the right until then). */
.name > .drill, .cname > .drill { margin-left: 8px; vertical-align: middle; }
.cname { display: block; }
.cgh .cnt { min-width: 30px; height: 26px; padding: 0 9px; border-radius: 13px; background: var(--bg-3); font-size: 15px; font-weight: 700; line-height: 26px; text-align: center; color: var(--ink-1); }
.cgh .sum { text-align: right; font-size: 13px; }
.cgh .sum.flat { color: var(--ink-3); }
.drill { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--bg-3); color: var(--ink); font-size: 11.5px; font-weight: 700; line-height: 1; transition: background-color var(--fast); }
.cgh:hover .drill, .cgb .crow:hover .drill { background: var(--line-2); }
.cgh.land .cnt { animation: cg-land 650ms var(--ease); }
@keyframes cg-land { 30% { transform: scale(1.35); background: var(--attn); color: #1b1408; } }
.cgb { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 240ms var(--ease); }
.cgrp.open .cgb { grid-template-rows: 1fr; }
.cgb > div { overflow: hidden; min-height: 0; }
/* A group's coins sit further right than its name, and a coin's buys further right again, so each level reads as part of the one above (Serdar, 15-Oct-2026). */
.cgb .crow { border-bottom: 0; border-top: 1px solid var(--line); }
.cg-empty { padding: var(--s3) 0 var(--s3) 34px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
.crow.incoming { visibility: hidden; }
.crow.arrive { animation: cg-arrive 1800ms var(--ease); }
@keyframes cg-arrive { from { background: rgba(242, 179, 61, 0.24); } }

/* A coin's float between groups: the profit flight's chip, with the coin and the time. */
.flyer {
  position: fixed; z-index: 60; pointer-events: none;
  display: flex; align-items: center; gap: 7px;
  padding: 4px 8px; border-radius: 3px;
  background: var(--ink); color: var(--bg); white-space: nowrap;
  font: 800 13px/16px var(--sans);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.7);
  will-change: transform, opacity;
}
.flyer .tm { padding: 1px 5px; border-radius: 3px; background: var(--attn); color: #1b1408; font-size: 12px; font-weight: 600; }
.cstate { display: inline-flex; align-items: baseline; gap: 7px; min-width: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.cstate > i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--ink-3); align-self: center; }
.cstate.hold > i { background: var(--gain); }
.cstate.look > i { background: var(--attn); }
.cstate.stop { color: var(--attn); }
.cstate.stop > i { background: var(--loss); }
.cstate.off, .cstate.idle { color: var(--ink-3); }
.cstate .more { font-weight: 400; color: var(--ink-3); }
.head .cstate { font-size: 14px; margin-top: 4px; }

.lead { margin: var(--s3) 0 var(--s2); color: var(--ink-2); max-width: 640px; }
.key-acts { display: inline-flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.keys-table td:last-child { white-space: normal; padding-top: var(--s2); padding-bottom: var(--s2); }
.perf-pick { margin-left: auto; }
.perf-beads .beads-wrap { justify-self: start; }
.perf-beads .beads-wrap > .k { display: none; }
.help-videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); padding: var(--s4) var(--side) 0; }
.help-videos h2 { font-size: 16px; font-weight: 800; }
.help-videos .howto { padding: 0; }
.table.words td.wrap { max-width: 640px; }
.tabbar { display: none; }

/* ---- widths ------------------------------------------------------------------------------------------------ */

@media (max-width: 1279px) {
  :root { --side: 24px; }
  .master { grid-template-columns: auto 1fr; row-gap: var(--s5); column-gap: var(--s7); }
  .m-aside { grid-column: 1 / -1; justify-self: start; }
  .beads-wrap .k { text-align: left; }
  .m-fig { font-size: 60px; line-height: 58px; }
  .s-read .open { font-size: 15px; }
  .track .cap > span { font-size: 10px; }
  .readout { grid-template-columns: minmax(280px, 1.6fr) repeat(var(--cells, 4), minmax(0, 1fr)); }
  .hero { font-size: 50px; line-height: 52px; }
  .val { font-size: 21px; line-height: 28px; }
  .detail-in { grid-template-columns: 220px minmax(0, 1fr); row-gap: var(--s5); }
  .detail-in > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 1099px) {
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .table.tiers th, .table.tiers td { padding-right: var(--s2); }
  .bot-cols, .two, .people { grid-template-columns: minmax(0, 1fr); }
  .bot-cols > section + section, .two > section + section, .people > section + section { border-left: 0; border-top: 1px solid var(--line); }
  .ce-sections, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .connect-page { grid-template-columns: minmax(0, 580px); }
  .howto, .connect-page.first .howto { padding: 0 var(--side) var(--s7); }
  .cells { --n: 3 !important; }
  .cells > div:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
  .cells > div:nth-child(n + 4) { border-top: 1px solid var(--line); }
}

/* On a phone the ladder lies down in each strip: the price moves left and right. */
@media (max-width: 859px) {
  :root { --side: 16px; --bar-h: 52px; }
  body { font-size: 15px; line-height: 21px; }

  .bar { gap: var(--s3); }
  .word, .tabsbar, .bar .tree, .bar-link.wide { display: none; }
  .nav-switch { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 15px; font-weight: 700; }
  .nav-switch svg { width: 10px; height: 10px; stroke: var(--ink-3); fill: none; stroke-width: 1.6; flex: none; }
  .nav-switch > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hello { flex: 0 1 auto; margin-left: 0; }
  .wallet { display: none; } /* the balance lives in the Wallet tab on a phone (Serdar, 30-Oct-2026) */
  .menu.side-menu { left: var(--side); right: auto; top: calc(var(--bar-h) - 4px); }

  .bar:has(.nav-open) .brand { display: none; }
  #accounts-menu a { min-height: 46px; font-size: 16px; }

  .head h1 { font-size: 24px; line-height: 30px; }
  .head .tools { width: 100%; margin-left: 0; }

  .master { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: var(--s5) var(--side); row-gap: var(--s5); column-gap: var(--s3); }
  .m-main { grid-column: 1 / -1; }
  .m-fig { font-size: 46px; line-height: 48px; }
  .m-side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
  .m-ro .v { font-size: 17px; line-height: 22px; }
  .m-aside { grid-column: 1 / -1; justify-self: stretch; }
  .beads-wrap { width: 100%; }
  .beads { justify-content: space-between; height: auto; min-height: 48px; gap: 0; }
  .bcol { gap: 2px; }
  .bcol .bead { width: 7px; height: 7px; }


  .d-only { display: none !important; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    display: grid; grid-template-columns: repeat(4, 1fr);
    height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--bg); border-top: 1px solid var(--line);
  }
  .tabbar :is(a, .off) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--ink-3); }
  .tabbar :is(a, .off) svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; }
  .tabbar a[aria-current] { color: var(--ink); }
  #view { padding-bottom: calc(var(--s8) + 60px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }

  .banners { padding-top: var(--s4); }
  .banner { flex-wrap: wrap; }
  .banner .t { flex: 1 1 200px; }
  .banner .btn { margin-left: 34px; }
  .guide { margin-top: var(--s4); padding: var(--s4); }
  .guide .gstep { flex-wrap: wrap; }
  .guide .gstep .btn { margin-left: 36px; }
  .figs { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; padding: var(--s5) 0 18px; }
  .fg { padding-right: 10px; }
  .fg + .fg { padding-left: 10px; }
  .fg.big { grid-column: 1 / -1; padding-right: 0; }
  .fg.big + .fg { padding-left: 0; border-left: 0; }
  .fg .k { font-size: 10px; line-height: 13px; }
  .fg .v { font-size: 19px; line-height: 24px; }
  .fg.big .v { font-size: 42px; line-height: 46px; }
  .fg .m { font-size: 12px; line-height: 15px; }
  .crow { grid-template-columns: 62px minmax(0, 1fr) 84px 34px; }
  .lt { font-size: 12px; white-space: normal; line-height: 1.25; }
  .crow .px { display: none; }
  .help-videos { grid-template-columns: minmax(0, 1fr); }
  .perf-pick { margin-left: 0; width: 100%; }
  .attention { padding: 0 var(--side) var(--s4); }
  .alert { align-items: flex-start; flex-wrap: wrap; row-gap: 2px; }
  .alert .tri { margin-top: 5px; }
  .alert .body { flex: 1 1 200px; }
  .alert .fix { margin-left: 23px; }

  .rack { display: block; max-width: none !important; }
  .strip {
    display: grid; height: auto; min-height: 84px;
    grid-template-columns: 84px minmax(0, 1fr) 92px;
    grid-template-rows: auto auto;
    column-gap: var(--s3); row-gap: 8px;
    padding: 14px 0;
    border-left: 0; border-top: 1px solid var(--line);
    align-items: center;
  }
  .strip.first:first-child { border-top: 0; }
  .strip::before { left: calc(-1 * var(--side)); right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .s-top { grid-row: 1 / 3; }
  .slot { display: none; }
  .coin { font-size: 17px; }
  .track { grid-column: 2; grid-row: 1; height: 28px; margin: 0; }
  .track .rail { top: 50%; bottom: auto; left: 0; right: 0; width: auto; height: 1px; }
  .track.idle .rail { background: repeating-linear-gradient(90deg, var(--line-2) 0 3px, transparent 3px 7px); }
  .track .rung { top: calc(50% - 8px); left: calc(var(--p) * 1%); width: 2px; height: 16px; margin: 0 0 0 -1px; transition: left var(--ride) var(--ease), opacity var(--med); }
  @keyframes born { from { transform: scaleY(0); } }
  .track .avg { top: 2px; bottom: 2px; left: calc(var(--p) * 1%); right: auto; height: auto; border-top: 0; border-left: 1px dashed var(--ink-3); transition: left var(--ride) var(--ease); }
  .track .band { top: calc(50% - 2px); height: 4px; left: calc(var(--lo) * 1%); width: calc((var(--hi) - var(--lo)) * 1%); transition: left var(--ride) var(--ease), width var(--ride) var(--ease), background-color var(--med); }
  .track .cap { transform: translateX(calc(var(--p) * 1%)); }
  .track .cap::before { top: calc(50% - 11px); left: -3px; width: 6px; height: 22px; }
  .track .cap > span { display: none; }
  .track.idle .cap { transform: translateX(50%); }
  .track.idle .cap::before { top: calc(50% - 6px); left: -1px; width: 2px; height: 12px; }
  .meter { grid-column: 2; grid-row: 2; height: 3px; }
  .meter-legs { line-height: 12px; }
  .s-read { grid-column: 3; grid-row: 1 / 3; margin: 0; min-height: 0; align-items: flex-end; text-align: right; }
  .s-read .real { display: none; }
  .s-sw { display: none; }
  .slot-free { width: 100%; height: 60px; flex-direction: row; border-left: 0; border-top: 1px solid var(--line); color: var(--ink-2); }
  .slot-free .lbl { opacity: 1; }
  .slot-free .lbl .n { display: inline; margin-left: 6px; }
  .slot-free .num { display: none; }
  .slot-free:not(.add) { display: none; }
  .detail { margin: 0 calc(-1 * var(--side)); }
  .detail-in { grid-template-columns: minmax(0, 1fr); padding: var(--s5) var(--side); row-gap: var(--s5); }
  .detail-in > :last-child { grid-column: auto; }
  .detail .caret { display: none; }
  .big-track { height: 200px; }

  .readout { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: var(--s5) var(--side) var(--s4); row-gap: 20px; }
  .ro { padding: 0 var(--s3); }
  .ro.ro-hero { grid-column: 1 / -1; padding: 0; }
  .ro:nth-child(2) { padding-left: 0; border-left: 0; }
  .ro.ro-extra { display: none; }
  .hero { font-size: 44px; line-height: 48px; margin-top: 8px; }
  .val { font-size: 18px; line-height: 24px; margin-top: 6px; }
  .sub { font-size: 11px; }
  .big-lad { height: 110px; }

  .sec-head { min-height: 52px; }
  .search { width: 100%; }
  .search:focus-within { width: 100%; }
  .filters .field { min-width: 0; flex: 1 1 100%; }
  .filters .seg.inline { display: grid; }
  .log-filters .seg { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .log-filters .field.when { flex: 1 1 40%; order: 1; }
  .log-filters .field.short, .log-filters .link, .log-filters .csv { order: 2; }
  .m-ro .s { white-space: normal; }

  .table th.opt, .table td.opt { display: none; }
  .table td { height: 48px; }
  .deposit { grid-template-columns: minmax(0, 1fr); }
  .qr { width: 200px; height: 200px; }
  .kv { grid-template-columns: 110px 1fr; }
  .row-fields { grid-template-columns: minmax(0, 1fr); }
  .cells { --n: 2 !important; }
  .cells > div { padding: var(--s3) var(--s3); }
  .cells > div:nth-child(3n + 1) { border-left: 1px solid var(--line); padding-left: var(--s3); }
  .cells > div:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
  .cells > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .people .facts { grid-template-columns: 110px 1fr; }
  .ce-cover-body { grid-template-columns: minmax(0, 1fr); }
  .ce-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

  .sheet { top: auto; left: 0; width: auto; height: min(92vh, 720px); border-left: 0; border-top: 1px solid var(--line-2); border-radius: 10px 10px 0 0; transform: translateY(100%); }
  .toast { left: var(--side); right: var(--side); transform: translateY(16px); justify-content: space-between; }
  .toast.on { transform: none; }
}

@media (min-width: 860px) {
  .m-only { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* Your coins as a table: a coin row under the group columns, then its buys (Serdar, 14-Oct-2026) */
.cgb .crow { display: grid; grid-template-columns: minmax(0, var(--pf-name)) 72px 120px 110px; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 0; text-align: left; border-top: 1px solid var(--line); }
.cgb .crow .coin-cell { display: flex; flex-direction: column; padding-left: 34px; font-weight: 800; font-size: 15px; }
.cgb .crow .coin-cell small { font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.cgb .crow .qty { text-align: center; font-size: 13px; color: var(--ink-2); }
.cgb .crow .cval { text-align: right; font-size: 13px; }
.cwrap.open > .crow { background: var(--bg-2); }
.cgb .crow.rest .coin-cell { font-weight: 700; color: var(--ink-2); }
.cwrap.crest.open > .crow.rest { background: none; }
.cwrap.crest .rest-list .coin-cell { padding-left: 46px; }
.cwrap.crest .rest-list .locks { left: 16px; }
.cdet { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 220ms var(--ease); }
.cwrap.open > .cdet { grid-template-rows: 1fr; }
.cdet > div { overflow: hidden; min-height: 0; }
.lots { margin: 0 0 0 56px; }
.lot { display: grid; grid-template-columns: minmax(0, 150px) 72px 96px 84px 76px; gap: 10px; align-items: center; min-height: 36px; font-size: 13px; border-top: 1px dashed var(--line); }
.lot.lhead { white-space: nowrap; min-height: 30px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); border-top: 0; }
.lot .r { text-align: right; }
/* The buys' Total: no line across the row; each figure under a dashed line in its own cell. Then a gap before the next coin. */
.lot.ltotal { border-top: 0; font-weight: 700; color: var(--ink); }
.lot.ltotal > span { align-self: stretch; display: flex; align-items: center; border-top: 1px dashed var(--ink-3); margin-top: 6px; }
.lot.ltotal > span.r { justify-content: flex-end; }
.lot.ltotal > span:first-child { justify-self: start; min-width: 64px; }
/* A coin locked to sell (16-Oct-2026): a green padlock in a green ring at the row's
   left, in the space before the coin's name and before a buy's time; thick on the
   coin's row for a SellAll, thin for its last buy, always thin on a buy's row. */
.lockm { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--gain); color: var(--gain); cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.lockm.thick { border-width: 3px; }
.lockm.buy { border-color: var(--loss); color: var(--loss); }
.lockm svg { width: 12px; height: 12px; }
.cgb .crow { position: relative; }
.locks { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); display: flex; gap: 3px; }
.cgb .crow.two-locks .coin-cell { padding-left: 60px; }
.cwrap.crest .rest-list .crow.two-locks .coin-cell { padding-left: 72px; }
.lot.fresh { animation: cg-arrive 1800ms var(--ease); }
/* A coin sold buy by buy: each buy fades as its profit flies, then the line goes. */
.lot.gone { opacity: 0.2; transition: opacity 400ms var(--ease); }
.cwrap.leaving { animation: line-leave 550ms var(--ease) forwards; }
@keyframes line-leave { to { opacity: 0; transform: translateX(-12px); } }
.cgh .cdot.flash { animation: dot-flash 1200ms var(--ease); }
@keyframes dot-flash { 0% { transform: scale(1); } 30% { transform: scale(2.2); } 100% { transform: scale(1); } }
.lot { position: relative; }
.lockm.on-buy { position: absolute; left: -30px; top: 50%; width: 18px; height: 18px; margin-top: -9px; }
.lockm.on-buy svg { width: 10px; height: 10px; }
.lockm.pop { animation: lock-pop 900ms var(--ease); }
@keyframes lock-pop { 0% { transform: scale(1.9); opacity: 0; } 45% { transform: scale(0.92); opacity: 1; } 70% { transform: scale(1.06); box-shadow: 0 0 0 6px color-mix(in srgb, var(--gain) 25%, transparent); } 100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; } }
.lock-tip { position: fixed; z-index: 60; max-width: 260px; padding: 7px 10px; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--r); font-size: 12.5px; line-height: 17px; color: var(--ink); pointer-events: none; opacity: 0; transition: opacity var(--fast); }
.lock-tip.on { opacity: 1; }
.cwrap.open > .cdet > div { padding-bottom: var(--s5); }
.cdet .cg-empty { margin-left: 56px; }
/* Buying on a dip: the coin and its ticking price; a coin holding nothing has nothing to open */
.cgb .crow.plain { cursor: default; }
.cgb .crow .coin-cell.look-cell { display: grid; grid-template-columns: minmax(64px, max-content) 96px; column-gap: 8px; align-items: center; }
.cgb .crow.plain:hover { background: none; }
.cgb .tickpx { justify-self: end; padding: 3px 8px; border-radius: 6px; background: var(--bg-2); text-align: right; font-size: 13px; }
.cgb .crow.tickhead { min-height: 30px; padding-top: 4px; padding-bottom: 0; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.cgb .crow.tickhead .look-cell { font-size: 11.5px; font-weight: 600; }
.cgb .crow.tickhead .look-cell span:last-child { text-align: right; white-space: nowrap; }
@media (max-width: 640px) {
  /* A name too long for a phone row breaks into two even lines ("Locked / to sell"). */
  .cgh .name { white-space: normal; line-height: 1.2; text-wrap: balance; }
  .cgb .crow .coin-cell.look-cell { grid-template-columns: minmax(48px, max-content) 84px; }
  .cgcols, .cgh, .cgtotal, .cgb .crow { grid-template-columns: minmax(0, 1fr) 46px 64px 72px; gap: 6px; }
  .cgb .crow .coin-cell { padding-left: 32px; }
  .cwrap.crest .rest-list .coin-cell { padding-left: 44px; }
  .cgb .crow.two-locks .coin-cell { padding-left: 58px; }
  .cwrap.crest .rest-list .crow.two-locks .coin-cell { padding-left: 70px; }
  .cg-empty { padding-left: 28px; }
  .lots, .cdet .cg-empty { margin-left: 36px; }
  .lot { grid-template-columns: minmax(0, 1fr) 52px 76px 54px 52px; gap: 4px; font-size: 11.5px; }
  .lot.lhead { white-space: normal; line-height: 1.2; font-size: 10.5px; padding: 4px 0; }
}

/* User Profile: WhatsApp and Telegram, each saved by a code sent to it — coming soon (Serdar, 14-Oct-2026) */
.channel-row { display: flex; gap: var(--s2); align-items: stretch; }
.channel-row .box { flex: 1 1 auto; min-width: 0; }
.channel-row .btn { flex: none; }
.channel input:disabled { cursor: not-allowed; }
/* The example number in grey, a shape to follow (Serdar, 19-Oct-2026). */
.channel input::placeholder { color: var(--ink-3); opacity: 1; }
.channel-lead { margin-top: 0; }
.trades-to { margin: 22px 0 44px; max-width: 520px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); }
.trades-to .hint { margin-bottom: 0; }
.trades-to-row { display: flex; gap: 22px; flex-wrap: wrap; padding: 4px 0; }
.trades-to-opt { cursor: default; }
.trades-to-opt input { appearance: none; width: 18px; height: 18px; margin: 0; border: 1.5px solid var(--ink-3, #6b665e); border-radius: 4px; background: transparent; display: grid; place-items: center; cursor: default; }
.trades-to-opt input:checked { background: var(--gain); border-color: var(--gain); }
.trades-to-opt input:checked::after { content: ''; width: 5px; height: 10px; margin-top: -2px; border: solid var(--bg); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
/* The heading white; the ticked channel white, the other grey (Serdar, 19-Oct-2026). */
.trades-to > .lbl { color: var(--ink); }
.trades-to-opt span { color: var(--ink-3); }
.trades-to-opt input:checked + span { color: var(--ink); font-weight: 600; }
.narrow-kv { max-width: 640px; }
.kv dd.kv-act { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
/* A white box, white words (Serdar, 19-Oct-2026; yellow until then). */
.advise { margin: var(--s3) 0 44px; padding: var(--s3) var(--s4); border: 1px solid var(--ink); border-radius: var(--r); background: transparent; color: var(--ink); font-size: 14px; line-height: 20px; max-width: 560px; }
.advise .advise-head { color: var(--ink); }
.advise p + p { margin-top: var(--s2); }
/* A clear gap between a how-to video and the next channel (Serdar, 19-Oct-2026). */
.howto-block + .channel { margin-top: 28px; }
.advise b { font-size: 17px; font-weight: 800; letter-spacing: 0.01em; color: var(--attn); } /* only the word Telegram yellow (Serdar, 19-Oct-2026) */
.soon.rec { background: var(--gain-wash); color: var(--gain); }
.soon { display: inline-block; margin-left: 6px; padding: 2px 6px; border-radius: 3px; background: var(--attn-wash); color: var(--attn);
  font: 700 10px/1.3 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; vertical-align: 1px; }

/* Replay (Serdar, 15-Oct-2026): the Portfolio heading's button and menu, the 3-2-1 countdown,
   a sell's profit flying into Profit taken and its touch, and the soft flash of a coin settling in its group. */
.coins .sec-head .replay-wrap { position: relative; margin-left: auto; }
.replay-menu { min-width: 210px; }
.replay-btn.on, .replay-btn.on[disabled] { opacity: 1; cursor: default; color: var(--attn); box-shadow: inset 0 0 0 1px var(--attn); }
.rp-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--attn); }
.flyer.profit { background: var(--gain); color: #0b1a12; font-size: 15px; padding: 5px 10px; }
.flyer.profit.loss { background: var(--loss); color: #1f0b09; }
.flyer.profit b { font-weight: 800; }
.touch-ring { position: fixed; z-index: 61; width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--gain); pointer-events: none; }
.touch-ring.loss { border-color: var(--loss); }
.settle-ring { position: fixed; z-index: 61; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--attn); background: rgba(242, 179, 61, 0.10); pointer-events: none; }
.countdown { position: fixed; left: 50%; top: 50%; z-index: 70; transform: translate(-50%, -50%); pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 12px; }
.countdown .cd-k { padding: 3px 10px; border-radius: 3px; background: rgba(18, 17, 16, 0.6); color: var(--attn); font-size: 18px; font-weight: 800; letter-spacing: 0.02em; }
.countdown .cd-ring { display: grid; place-items: center; width: 150px; height: 150px; border-radius: 50%;
  border: 7px solid var(--attn); background: rgba(18, 17, 16, 0.55); box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.8); }
.countdown b { font-size: 68px; line-height: 1; font-weight: 700; color: rgba(255, 255, 255, 0.92); }

/* Asset pools (R-89): a pool's coins to tick, by class */
.coin-grid-h { margin: 10px 0 4px; font-size: 12px; font-weight: 700; color: var(--ink-2); display: flex; gap: 8px; align-items: baseline; }
.coin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px 12px; }
.coin-grid .check { font-size: 13px; }
.pool-coins { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool-actions { white-space: nowrap; }
.pool-actions .link + .link { margin-left: 10px; }

/* Trading > Asset Pool (R-89) */
.pool-account { margin-top: 14px; }
.pool-account .field { margin: 0; max-width: 250px; }
/* Several accounts, none chosen: a warm, slow pulse on the Account box (Serdar, 17-Oct-2026). */
.select.pool-ask, .box.pool-ask, .pool-size.pool-ask, .trades-to.pool-ask { border-color: var(--attn); animation: pool-ask 2.6s ease-in-out infinite; }
.select.pool-ask select { color: var(--ink-2); }
.box.pool-ask input::placeholder { color: var(--ink-2); opacity: 1; }
.pool-entry .lbl { display: block; margin-bottom: 6px; }
.pool-size { position: relative; display: flex; align-items: center; gap: 4px; min-width: 250px; max-width: 100%; height: 36px; padding: 0 30px 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); color: var(--ink); font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; transition: border-color var(--fast); }
.pool-size:hover:not([disabled]) { border-color: var(--ink-3); }
.pool-size[disabled] { cursor: not-allowed; color: var(--ink-3); }
.pool-size svg { position: absolute; right: 10px; width: 9px; height: 9px; stroke: var(--ink-3); fill: none; stroke-width: 1.6; transform: rotate(-90deg); }
.pool-size-ask { color: var(--ink-2); font-weight: 500; }
.pop-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pf { flex: none; display: grid; grid-template-columns: auto auto; column-gap: 14px; row-gap: 2px; align-items: baseline;
  font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; line-height: 1.5;
  border: 1px solid var(--line-2); border-radius: 4px; padding: 7px 10px; }
.pf .pk { color: var(--ink-3); }
.pf .pv { text-align: right; color: var(--ink-2); white-space: nowrap; }
.pf .pv i { font-style: normal; color: var(--attn); font-size: 13px; font-weight: 700; font-family: var(--mono); }
.pf .pline { grid-column: 1 / -1; border-top: 1px dashed var(--ink-3); margin: 3px 0 1px; }
.pf .pt { color: var(--ink-2); }
.pool-slide .lbl { display: flex; justify-content: space-between; align-items: baseline; }
.pool-slide-v { font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--attn); }
.pool-slide input[type=range] { display: block; width: 100%; margin: 10px 0 3px; accent-color: var(--attn); height: 22px; cursor: grab; touch-action: pan-y; }
.pool-slide input[type=range]:active { cursor: grabbing; }
.pool-slide input[type=range]:disabled { cursor: not-allowed; opacity: 0.6; }
.pool-slide-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink); }
.pool-slide .hint { margin-top: 15px; }
.pool-slide + .pool-slide { margin-top: 24px; }
.pool-slide .hint { color: var(--ink); }
/* A link inside a hint: blue, so it reads as something to tap (Serdar, 17-Oct-2026). */
.clip-link { display: inline; padding: 0; border: 0; background: none; font: inherit; color: #6fb3ff; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.clip-link:hover { color: #9ccaff; }
.hint-line { white-space: nowrap; }
/* An explainer clip in a small window over the popup that opened it. */
.clip-pop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity var(--fast); }
.clip-pop.on { opacity: 1; }
.clip-card { width: min(480px, 100%); border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-2); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); overflow: hidden; }
.clip-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 14px; font-size: 14px; }
.clip-frame { aspect-ratio: 16 / 9; background: var(--bg); border-top: 1px solid var(--line); }
.clip-frame video { display: block; width: 100%; height: 100%; }
.clip-soon { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--ink-3); font-size: 13px; }
.clip-play { width: 0; height: 0; border-style: solid; border-width: 14px 0 14px 24px; border-color: transparent transparent transparent var(--ink-3); }
.pool-size[disabled] .pool-size-ask { color: var(--ink-3); }
.pool-start { margin: 14px 0 0; font-size: 13px; color: var(--ink-2); }
/* Thicker since 19-Oct-2026 (Serdar): an inner 1px ring doubles the border without
   moving the layout, and the glow reaches further. */
@keyframes pool-ask {
  0%, 100% { box-shadow: inset 0 0 0 1px var(--attn), 0 0 0 0 rgba(242, 179, 61, 0); background: var(--bg); }
  50% { box-shadow: inset 0 0 0 1px var(--attn), 0 0 0 10px rgba(242, 179, 61, 0.3), 0 0 34px rgba(242, 179, 61, 0.38); background: var(--attn-wash); }
}
@media (prefers-reduced-motion: reduce) { .select.pool-ask, .box.pool-ask, .pool-size.pool-ask, .trades-to.pool-ask { animation: none; box-shadow: inset 0 0 0 1px var(--attn), 0 0 0 4px rgba(242, 179, 61, 0.24); } }
.pool-blank input:disabled, .pool-blank select:disabled { color: var(--ink-3); }
.pool-entry { margin: 12px 0 4px; }
.pool-entry .field { margin: 0; }
.pool-lbl { display: block; margin: 12px 0 6px; }
.pool-name-row { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.pool-select { flex: 0 1 260px; min-width: 180px; }
.pool-plus { font-size: 14px; color: var(--ink-2); }
.pool-add { position: relative; margin-bottom: 12px; }
.pool-add-btn .num { color: var(--ink-3); font-weight: 600; margin-left: 4px; }
.pool-add-btn svg { width: 9px; height: 9px; }
.pool-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: min(320px, calc(100vw - 32px)); padding: 10px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-2); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.pool-menu[hidden] { display: none; }
.pool-pick-list { max-height: 300px; overflow-y: auto; margin-top: 8px; display: grid; gap: 2px; }
.pool-pick-item { padding: 5px 4px; border-radius: 4px; }
.pool-pick-item:hover:not(.off) { background: var(--bg-3); }
.pool-pick-item.off { opacity: 0.45; cursor: not-allowed; }
.pool-pick-item[hidden] { display: none; }
.pool-pick-note { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.pool-pick-none { margin: 6px 4px; font-size: 13px; color: var(--ink-3); }
.pool-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 10px; }
.pool-pick .btn { flex: none; }
.btn.primary.pool-save-btn.dirty { background: var(--attn); color: #1d1404; }
.btn.primary.pool-save-btn.dirty:hover { background: #ffc65c; }
.pool-lock { margin: 8px 0 0; font-size: 13px; }
.pool-lock[hidden] { display: none; }
.pool-wait { margin: 0 0 16px; font-size: 13px; color: var(--ink-3); text-wrap: pretty; }
.pool-cap { margin: 0 0 6px; font-size: 13px; color: var(--ink-3); }
.pool-cap b { color: var(--ink); font-size: 14px; }
.pool-tbl { width: 100%; max-width: 520px; }
.pool-tbl .pool-n { width: 36px; color: var(--ink-3); }
.pool-q { color: var(--ink-3); font-weight: 400; }
.pool-tbl .tag { margin-left: 6px; }
.pool-coins-tbl { margin-bottom: 18px; }
.pool-coins-tbl[hidden] { display: none; }
/* Trading strategy: the form on the left, the two explainer clips on the right
   (Serdar, 5-Nov-2026); on a phone each clip follows the thing it explains. */
.pool-sec { display: flex; flex-direction: column; }
.pool-side { display: contents; }
.pool-clip { max-width: none; margin: 0; }
.pool-clip p { margin: 0; font-size: 14px; color: var(--ink-2); }
.pool-clip .howto-frame { margin-top: 10px; }
/* Phone: each clip sits under the thing it explains - the trading-size clip under
   Trading size, the pool clip under the Pool rows (Serdar, 5-Nov-2026). */
.pool-sec > .pool-start { order: 1; }
.pool-sec > .pool-entry { order: 2; }
.pool-clip-size { order: 3; margin: 14px 0 26px; }
.pool-sec > .pool-form { order: 4; }
.pool-clip-pool { order: 5; margin: 18px 0 20px; }
.pool-sec > .pool-wait { order: 6; }
.pool-sec > .pool-coins-tbl { order: 7; }
@media (min-width: 860px) {
  .pool-sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 520px); column-gap: 48px; align-items: start;
    grid-template-rows: auto auto auto 1fr auto; grid-template-areas: "start start" "size size" "pool side" "wait side" "tbl tbl"; }
  .pool-sec > .pool-start { grid-area: start; }
  .pool-sec > .pool-entry { grid-area: size; }
  .pool-sec > .pool-form { grid-area: pool; }
  .pool-sec > .pool-wait { grid-area: wait; }
  .pool-sec > .pool-coins-tbl { grid-area: tbl; }
  .pool-side { grid-area: side; display: grid; gap: 26px; margin-top: 12px; }
  /* Laptop: the pool clip beside the Pool rows, the trading-size clip under it beside the 24-hour text
     (the phone `order` above would otherwise swap them inside this column). */
  .pool-clip-pool { order: 1; margin: 0; }
  .pool-clip-size { order: 2; margin: 0; }
}

/* User Profile: the email's verified tick (Serdar, 19-Oct-2026). */
.with-tick { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-width: 0; }
.email-ok, .email-no { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; }
.email-ok { color: var(--gain); }
.email-ok svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.email-no { color: var(--ink-3); font-weight: 500; }
.pw-mask { letter-spacing: 0.12em; }
.sec + .ex-sec { margin-top: 44px; } /* a clear gap before Exchanges (Serdar, 19-Oct-2026) */
.email-no.key-refused { color: var(--attn); font-weight: 600; }
#connect-h { scroll-margin-top: 84px; } /* clear of the top bar when jumped to */
.ex-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ex-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 36px; }
.ex-name { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); line-height: 20px; }
.ex-key { margin-top: 6px; }
.wallet-bal { font-weight: 600; }
/* Fees under the commission statements, after a clear gap (Serdar, 19-Oct-2026). */
.fees-merged { margin-top: 56px; }
/* The Commission wallet's Top up: at the right edge, level with the balance
   figure and as tall as it, starting at the number, not at the label (Serdar,
   19-Oct-2026). --fig-h is the figure's line height. */
.master:has(.topup-big) { --fig-h: 64px; grid-template-columns: auto auto 1fr; }
.master:has(.topup-big) .m-aside { grid-column: auto; justify-self: end; align-self: end; align-items: flex-end; }
/* A rectangle as tall as the figure, wide enough for "Top up" on one line, with
   a white glow pulsing round it (Serdar, 19-Oct-2026: the square was too small). */
.topup-big { height: var(--fig-h); min-width: 132px; padding: 0 24px; white-space: nowrap; font-size: 18px; font-weight: 800; animation: topup-glow 2.2s ease-in-out infinite; }
@keyframes topup-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 235, 228, 0); }
  50% { box-shadow: 0 0 0 5px rgba(239, 235, 228, 0.28), 0 0 22px rgba(239, 235, 228, 0.45); }
}
.topup-big.low { background: var(--attn); color: #1b1408; animation-name: topup-glow-low; }
.topup-big.low:hover:not([disabled]) { background: #ffc451; }
@keyframes topup-glow-low {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242, 179, 61, 0); }
  50% { box-shadow: 0 0 0 6px rgba(242, 179, 61, 0.3), 0 0 26px rgba(242, 179, 61, 0.45); }
}
@media (prefers-reduced-motion: reduce) { .topup-big { animation: none; box-shadow: 0 0 0 3px rgba(239, 235, 228, 0.25); } .topup-big.low { box-shadow: 0 0 0 3px rgba(242, 179, 61, 0.3); } }
@media (max-width: 1279px) {
  .master:has(.topup-big) { --fig-h: 58px; grid-template-columns: auto 1fr auto; }
  .master:has(.topup-big) .m-aside { grid-column: 3; grid-row: 1; }
}
@media (max-width: 859px) {
  .master:has(.topup-big) { --fig-h: 48px; grid-template-columns: minmax(0, 1fr) auto; }
  .master:has(.topup-big) .m-main { grid-column: 1; grid-row: 1; }
  .master:has(.topup-big) .m-aside { grid-column: 2; grid-row: 1; flex-direction: row; }
  .master:has(.topup-big) .m-side { grid-column: 1 / -1; grid-row: 2; }
  .topup-big { min-width: 108px; padding: 0 16px; font-size: 16px; }
}
.stmt-more { margin: 12px 0 0; display: flex; justify-content: flex-end; }

/* A new user, no exchange yet (Serdar, 19-Oct-2026): everything greyed but Profile,
   which flashes yellow in the menu, as does the menu button. */
.nav-open.ask { align-self: center; height: 38px; border-radius: var(--r); animation: pool-ask 2.6s ease-in-out infinite; }
.nav-open.ask .mark { fill: var(--attn); }
#accounts-menu .dsec.off .dsec-h { color: var(--ink-4); cursor: not-allowed; }
#accounts-menu .dsec.ask { margin: 6px 8px; border-radius: var(--r); animation: pool-ask 2.6s ease-in-out infinite; }
#accounts-menu .dsec.ask .dsec-h, #accounts-menu .dsec.ask a { color: var(--attn); }
#accounts-menu .dsec.ask + .dsec { border-top: 0; }
@media (prefers-reduced-motion: reduce) { .nav-open.ask, #accounts-menu .dsec.ask { animation: none; box-shadow: inset 0 0 0 1px var(--attn), 0 0 0 4px rgba(242, 179, 61, 0.24); } }
/* Home's start (Serdar, 19-Oct-2026): the heading, the line, the steps, the video. */
.fresh-start { max-width: 760px; margin-top: var(--s6); }
.fresh-start h2 { font-size: 24px; line-height: 30px; font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }
.fresh-sub { margin-top: 6px; font-size: 15px; color: var(--attn); font-weight: 600; }
.fresh-steps { margin: var(--s5) 0 0; padding: 0; list-style: none; display: grid; gap: 36px; font-size: 16px; font-weight: 700; color: var(--ink); }
.fresh-steps li { display: grid; gap: 10px; }
.fresh-step-h { display: flex; align-items: center; gap: 10px; }
.fresh-step-h > b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--attn); color: var(--attn); font-size: 12px; }
/* User Profile's steps: each not yet done flashes yellow. */
.step-box { border-radius: var(--r); }
.step-box.step-ask { margin: 10px 0; padding: 4px 14px 2px; border: 1px solid var(--attn); animation: pool-ask 2.6s ease-in-out infinite; }
.step-box.step-ask .ex-item:last-child { border-bottom: 0; }
.step-tag { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--attn); }
.step-tag.done { color: var(--ink-3); }
.step-skip { display: flex; justify-content: flex-end; padding: 6px 0 10px; }
/* Choose how you get notified (the start's third step). */
.notify-page { max-width: 640px; }
.notify-opts { display: grid; gap: 12px; margin-top: var(--s4); }
.notify-opt { padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r); }
.notify-opt.is-soon { opacity: 0.6; }
.notify-opt.is-on { border-color: rgba(98, 208, 155, 0.5); }
.notify-opt-h { display: flex; align-items: center; gap: 8px; }
.notify-opt .channel .field { margin: 0; }
.channel-addr { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-size: 14px; align-self: center; }
.notify-end { margin-top: var(--s4); }
/* The referral offer: informs only (referral.js). The rates read at a glance. */
.ref-offer { margin: 4px 0 10px; padding: 10px 12px; border: 1px solid rgba(98, 208, 155, 0.35); border-radius: var(--r); background: rgba(98, 208, 155, 0.07); font-size: 13px; }
.ref-offer.done { display: flex; align-items: center; gap: 12px; border-color: var(--line-2); background: transparent; }
.ref-main { display: flex; gap: 12px; align-items: center; }
.ref-off { flex: none; align-self: flex-start; margin-top: 1px; padding: 2px 8px; border-radius: 3px; background: var(--gain); color: #10140f; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.ref-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ref-body b { color: var(--ink); font-size: 14px; }
.ref-meta { color: var(--ink-3); font-size: 12px; }
.ref-body .link { align-self: flex-start; margin-top: 2px; font-size: 12px; }
.ref-rates { flex: none; display: flex; align-items: baseline; gap: 8px; margin-left: auto; font-weight: 800; }
.ref-rates s { color: var(--ink-3); font-size: 18px; text-decoration-thickness: 2px; }
.ref-rates span { color: var(--ink-3); }
.ref-rates b { color: var(--gain); font-size: 24px; line-height: 1; }
.ref-tip { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid rgba(98, 208, 155, 0.2); color: var(--ink-2); font-size: 12px; line-height: 1.5; }
.ref-tip-h { margin-right: 8px; color: var(--attn); font-weight: 700; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.ref-tip b { color: var(--ink); }
.fresh-ref { display: grid; gap: 10px; font-size: 14px; font-weight: 400; }
.fresh-ref > p { margin: 0; color: var(--ink-2); }
.fresh-links { display: flex; flex-wrap: wrap; gap: 10px; }
.fresh-ref .ref-offer { margin: 0; }
.howto-soon { display: grid; place-items: center; color: var(--ink-3); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; }
@media (prefers-reduced-motion: reduce) { .step-box.step-ask { animation: none; box-shadow: inset 0 0 0 1px var(--attn), 0 0 0 4px rgba(242, 179, 61, 0.24); } }
body.fresh .tabsbar, body.fresh .wallet, body.fresh .hello { opacity: 0.35; pointer-events: none; }
body.fresh .tabbar .off { opacity: 0.35; cursor: not-allowed; }
.fresh-page { opacity: 0.3; filter: grayscale(1); pointer-events: none; user-select: none; }
.auth-offers { margin-top: 18px; }

/* A user's exchange balances (master, 2026-10-24): the total now beside its days as
   one neutral line, a level rather than a result; the changes are signed. */
.bal-head { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s5); align-items: end; margin-top: var(--s3); }
.bal-total { margin-top: var(--s1); font-size: 28px; line-height: 34px; font-weight: 600; }
.bal-trend { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 120px auto; column-gap: var(--s2); }
.bal-trend svg { grid-column: 2; grid-row: 1; width: 100%; height: 120px; overflow: visible; }
.bal-scale { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--ink-3); text-align: right; }
.bal-ticks { grid-column: 2; display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); }
.bal-line { fill: none; stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.bal-pt { fill: transparent; }
.bal-pt:hover { fill: var(--ink-4); }
.bal-last { fill: var(--ink); }
.bal-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); margin-top: var(--s5); }
.bal-two h3, .bal-h3 { font-size: 13px; font-weight: 800; }
@media (max-width: 859px) {
  .bal-head, .bal-two { grid-template-columns: minmax(0, 1fr); }
}

/* ---- footer on every page, and the legal pages (Serdar, 30-Oct-2026) ---------------------------- */
.site-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; padding: var(--s5) var(--side) var(--s7); border-top: 1px solid var(--line); font-size: 12px; line-height: 16px; color: var(--ink-3); }
.site-foot a { color: var(--ink-3); text-decoration: underline; text-decoration-color: var(--ink-4); text-underline-offset: 3px; }
.site-foot a:hover { color: var(--ink); }
.auth .site-foot { align-self: end; border-top: 0; }
.risk-hint { margin: 0 0 2px; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.legal { max-width: 720px; margin: 0 auto; padding: var(--s7) var(--side) var(--s8); }
.legal h1 { margin-bottom: var(--s3); font-size: 30px; line-height: 36px; font-weight: 800; letter-spacing: -0.015em; }
.legal .draft { display: inline-block; margin-bottom: var(--s5); padding: 2px 8px; border-radius: 3px; background: var(--attn-wash); color: var(--attn); font-size: 12px; font-weight: 700; }
.legal h2 { margin: var(--s5) 0 var(--s2); font-size: 16px; line-height: 22px; font-weight: 800; }
.legal p { margin: 0 0 12px; color: var(--ink-2); line-height: 23px; }
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 859px) { .site-foot { padding-bottom: calc(var(--bar-h) + var(--s6)); } }

/* ---- UX round 2 (3-Nov-2026) ------------------------------------------------- */
/* The engine line: is anything actually running behind a quiet dashboard. */
.engine { display: flex; align-items: center; gap: 8px; margin: var(--s4) var(--side) 0; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.engine .num { color: var(--ink-2); }
.edot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; }
.engine.on .edot { background: var(--gain); box-shadow: 0 0 0 3px rgba(84, 214, 160, 0.18); animation: engine-pulse 2.4s ease-in-out infinite; }
.engine.late .edot { background: var(--attn); }
.engine.off .edot { background: var(--loss); }
.engine.off { color: var(--loss); }
.engine.wait .edot { background: var(--attn); animation: engine-pulse 1.6s ease-in-out infinite; }
@keyframes engine-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .engine .edot { animation: none; } }

/* A step still open once the person has traded: framed, not flashing. */
.step-box.step-ask.quiet { animation: none; border-color: var(--line-2); }
.step-box.step-ask.quiet .step-tag { color: var(--ink-3); }

/* The password meter: four bars under the field. */
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.pw-meter i { height: 4px; border-radius: 2px; background: var(--line-2); transition: background-color var(--fast); }
.pw-meter[data-level="1"] i:nth-child(-n+1) { background: var(--loss); }
.pw-meter[data-level="2"] i:nth-child(-n+2) { background: var(--attn); }
.pw-meter[data-level="3"] i:nth-child(-n+3) { background: var(--gain); }
.pw-meter[data-level="4"] i { background: var(--gain); }

/* The deposit page's warning. */
.deposit-warn { color: var(--ink-2); max-width: 44em; }

/* Sorting Trade history within the rows loaded. */
.sort-note { padding: 8px var(--side) 0; }

/* Tap targets on a phone: 44 px for a coin's on/off switch and the footer links. */
@media (max-width: 859px) {
  .sw::before { content: ""; position: absolute; inset: -13px -7px; }
  .site-foot a { display: inline-block; padding: 10px 4px; }
  .site-foot { gap: 0 4px; }
}
.auth-card .lead { margin-top: var(--s3); }
.auth-actions { margin-top: var(--s5); }
