/* 10USDC: a private-bank statement, not a trading screen. Light by default (or by the system setting), dark on request.
   Serif figures, hairlines instead of shadows, colour only where it carries meaning (gain, loss, points, term length).
   No inline styles anywhere (strict CSP): everything visual lives in this file. */
:root {
  color-scheme: light;
  --bg: #d8ded5;            /* fir: green-tinted paper (darker, 18 Nov) */
  --surface: #e6eae3;       /* sheet */
  --sunk: #ccd3c9;          /* tracks, lanes, wells */
  --ink: #15251d;           /* fir ink */
  --ink-2: #2d4237;
  --muted: #46544b;
  --line: #bcc5ba;
  --line-strong: #99a698;
  --accent: #824700;        /* amber: active state, points, changed figures, focus */
  --accent-soft: #f6ecd9;
  --gain: #12613a;
  --gain-soft: #e1f0e6;
  --loss: #a8321f;          /* also freeze / pause / gap */
  --loss-soft: #f8e8e3;
  --btn: #1d4a37;
  --btn-ink: #eef1eb;
  --btn-hover: #27614a;
  --field: #f3f5f1;
  /* the four classes, short term to long term */
  --c0: #b5cdbf; --c1: #7ba58e; --c2: #437a5e; --c3: #15251d;
  /* charts (validated reference palette: blue, band, red) */
  --ch-blue: #2a78d6; --ch-blue-deep: #184f95; --ch-band: #b7d3f6; --ch-red: #e34948; --ch-ref: #7d7c76;
  --d0: #a8302f; --d1: #e34948; --d2: #f0a09f; --d3: #b3b2ab; --d4: #8fbcf0; --d5: #2a78d6; --d6: #184f95;
  --tl-open: #a9d3b8; --tl-locked: #dccdca; --tl-hold: #e9dab2; --tl-pay: #2d4237; --tl-ink: #15251d;
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Sitka Text", Cambria, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-card: 12px;
  --r-ctl: 7px;
  --w: 70rem;
}
/* dark: petrol. Applied by the system setting unless the member chose light, or by choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a1416; --surface: #132124; --sunk: #1d2f33; --ink: #e8eeee; --ink-2: #c4d0d1; --muted: #95a8aa;
    --line: #283c40; --line-strong: #3d565b; --accent: #f2b872; --accent-soft: #322a1c;
    --gain: #6fdba0; --gain-soft: #13302a; --loss: #ff9285; --loss-soft: #3a2220;
    --btn: #e8eeee; --btn-ink: #0a1416; --btn-hover: #ffffff; --field: #0e1a1c;
    --c0: #2f5a5c; --c1: #4f8f8c; --c2: #86c2ba; --c3: #d8efe9;
    --ch-blue: #5a9be6; --ch-blue-deep: #a5cdfa; --ch-band: #223c62; --ch-red: #f0766e; --ch-ref: #7f8795;
    --d0: #ff8f89; --d1: #e0605b; --d2: #8a4b4b; --d3: #646a74; --d4: #476a98; --d5: #5a9be6; --d6: #a5cdfa;
    --tl-open: #2f6b4b; --tl-locked: #4a3b3d; --tl-hold: #5b4c26; --tl-pay: #c4d0d1; --tl-ink: #e8eeee;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1416; --surface: #132124; --sunk: #1d2f33; --ink: #e8eeee; --ink-2: #c4d0d1; --muted: #95a8aa;
  --line: #283c40; --line-strong: #3d565b; --accent: #f2b872; --accent-soft: #322a1c;
  --gain: #6fdba0; --gain-soft: #13302a; --loss: #ff9285; --loss-soft: #3a2220;
  --btn: #e8eeee; --btn-ink: #0a1416; --btn-hover: #ffffff; --field: #0e1a1c;
  --c0: #2f5a5c; --c1: #4f8f8c; --c2: #86c2ba; --c3: #d8efe9;
  --ch-blue: #5a9be6; --ch-blue-deep: #a5cdfa; --ch-band: #223c62; --ch-red: #f0766e; --ch-ref: #7f8795;
  --d0: #ff8f89; --d1: #e0605b; --d2: #8a4b4b; --d3: #646a74; --d4: #476a98; --d5: #5a9be6; --d6: #a5cdfa;
  --tl-open: #2f6b4b; --tl-locked: #4a3b3d; --tl-hold: #5b4c26; --tl-pay: #c4d0d1; --tl-ink: #e8eeee;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: inherit; }

/* ---------------------------------------------------------------- masthead */
.bar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.bar-in { max-width: var(--w); margin: 0 auto; padding: 0 1.5rem; min-height: 3.75rem; display: flex; gap: .5rem 1rem; align-items: center; flex-wrap: wrap; }
.mark { font: 600 1.3125rem/1 var(--serif); letter-spacing: -.01em; color: var(--ink); margin-right: .75rem; }
a.mark { text-decoration: none; }
a.mark:hover { text-decoration: underline; text-underline-offset: 4px; }
.status { margin-left: auto; min-width: 0; font-size: .8125rem; color: var(--muted); display: inline-flex; align-items: center; gap: .45rem; }
.status:not(:empty)::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--gain); flex: none; }
.status.alarm { color: var(--loss); font-weight: 600; background: var(--loss-soft); padding: .25rem .65rem; border-radius: 999px; }
.status.alarm::before { background: var(--loss); }
#asof::before, #who::before { content: none; }
.navlink { font-size: .875rem; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.navlink:hover { text-decoration-color: currentColor; }

.langs { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 2px; gap: 2px; }
.lang { font: 600 .75rem/1 var(--sans); background: none; color: var(--muted); border: 0; border-radius: 5px; padding: .4rem .5rem; cursor: pointer; }
.lang:hover { color: var(--ink); }
.lang[aria-pressed="true"] { background: var(--sunk); color: var(--ink); }
.theme { display: inline-grid; place-items: center; width: 2.125rem; height: 2.125rem; padding: 0; background: none; color: var(--muted); border: 1px solid var(--line); border-radius: var(--r-ctl); cursor: pointer; }
.theme:hover { color: var(--ink); border-color: var(--line-strong); }
.theme svg { width: 16px; height: 16px; }
.theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: none; }
:root[data-theme="dark"] .theme .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun { display: none; }
  :root:not([data-theme="light"]) .theme .moon { display: block; }
}

/* the four views: text links with an ink underline on wide screens, a tab bar at the bottom on phones */
.views { display: flex; gap: .25rem; align-self: stretch; }
.views a { position: relative; display: inline-flex; align-items: center; gap: .45rem; padding: 0 .8rem; color: var(--muted); text-decoration: none; font-size: .9375rem; font-weight: 500; }
.views a:hover { color: var(--ink); }
.views a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.views a[aria-current="page"]::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: -1px; height: 2px; background: var(--accent); }
.views .vi { display: inline-flex; }
.views .vi .ic { width: 17px; height: 17px; }
.badge { min-width: 1.2rem; padding: 0 .35rem; border-radius: 999px; background: var(--accent); color: var(--surface); font-size: .6875rem; font-weight: 700; line-height: 1.2rem; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 62rem) and (min-width: 40.0625rem) {
  .views { order: 5; width: 100%; height: 2.75rem; margin: 0 -.8rem; border-top: 1px solid var(--line); }
  .bar-in { padding-top: .6rem; }
}
@media (max-width: 40rem) {
  .bar { position: static; }
  .bar-in { padding: .6rem 1rem; min-height: 0; }
  .mark { margin-right: 0; }
  .status { order: 9; width: 100%; margin-left: 0; font-size: .75rem; }
  .status:empty { display: none; }
  .langs { margin-left: auto; }
  .views { position: fixed; z-index: 30; inset: auto 0 0 0; padding: .3rem .5rem calc(.3rem + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); justify-content: space-around; }
  .views a { flex: 1; flex-direction: column; justify-content: center; gap: .15rem; padding: .4rem .25rem; font-size: .6875rem; border-radius: 10px; }
  .views a[aria-current="page"] { background: var(--sunk); }
  .views a[aria-current="page"]::after { content: none; }
  .views .vi .ic { width: 21px; height: 21px; }
  .views .badge { position: absolute; top: .15rem; left: calc(50% + .45rem); }
  body { padding-bottom: 4.75rem; }
}

/* ---------------------------------------------------------------- page, type */
.page { max-width: var(--w); margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.012em; }
h1 { font-size: 2rem; line-height: 1.15; }
h2 { font-size: 1.5rem; line-height: 1.2; margin-bottom: .9rem; }
h3 { font: 600 1.0625rem/1.3 var(--sans); margin: 2rem 0 .6rem; }
h4 { font: 600 .875rem/1.3 var(--sans); color: var(--muted); margin: 1.25rem 0 .25rem; }
section + section { margin-top: 3rem; }
.view { animation: view-in .18s ease-out; }
@keyframes view-in { from { opacity: 0; } to { opacity: 1; } }
.fine { font-size: .8125rem; line-height: 1.55; color: var(--muted); max-width: 72ch; margin: .75rem 0 0; }
.lead { max-width: 68ch; margin: 0 0 .75rem; font-size: 1.0625rem; line-height: 1.6; }
.sub { display: block; font-size: .8125rem; color: var(--muted); }
.num { text-align: right; }
.empty { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }

/* notices and action feedback (feedback stays in view while the page scrolls) */
.note { margin: 0 0 1.5rem; padding: .8rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); font-size: .9375rem; max-width: 60rem; }
.note.alarm { border-color: var(--loss); color: var(--loss); }
.msg { position: sticky; top: 4.5rem; z-index: 20; margin: 0 0 1.5rem; padding: .8rem 1rem; max-width: 44rem; background: var(--surface); border: 1px solid var(--line-strong); border-left: 3px solid var(--gain); border-radius: var(--r-ctl); font-size: .9375rem; }
.msg.error { border-left-color: var(--loss); }
.disclaimer { margin: .75rem 0 0; padding: .7rem .9rem; border-left: 2px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--r-ctl) var(--r-ctl) 0; font-size: .9375rem; max-width: 72ch; }
@media (max-width: 40rem) { .msg { top: .5rem; } }

/* ---------------------------------------------------------------- controls */
.btn { font: 600 .9375rem/1.2 var(--sans); background: var(--btn); color: var(--btn-ink); border: 1px solid var(--btn); border-radius: var(--r-ctl); padding: .7rem 1.25rem; cursor: pointer; justify-self: start; }
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-quiet:hover { background: var(--sunk); border-color: var(--line-strong); }
.btn-small { font-size: .8125rem; padding: .4rem .75rem; }
.btn-alarm { background: var(--loss); border-color: var(--loss); color: #fff; }
.btn-alarm:hover { background: #7d1d17; border-color: #7d1d17; }
:root[data-theme="dark"] .btn-alarm { color: #1b0f0f; }
#connect { font-size: .8125rem; padding: .5rem .85rem; font-variant-numeric: tabular-nums; }
#connect[disabled] { opacity: 1; cursor: default; color: var(--ink-2); background: var(--sunk); border-color: transparent; }

label { display: grid; gap: .35rem; font-size: .8125rem; font-weight: 500; color: var(--muted); }
input, select { font: 1rem var(--sans); color: var(--ink); background-color: var(--field); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); padding: .65rem .75rem; min-width: 0; }
input::placeholder { color: var(--muted); opacity: .6; }
input:hover, select:hover { border-color: var(--muted); }
input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[inputmode="decimal"] { font: 600 1.1875rem var(--serif); font-variant-numeric: tabular-nums lining-nums; }
select { appearance: none; -webkit-appearance: none; padding-right: 2.25rem; background-repeat: no-repeat; background-position: right .8rem center; background-size: 10px 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237a8494' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.help { margin: 0; font-size: .875rem; line-height: 1.55; color: var(--ink-2); max-width: 60ch; }
.panel { display: grid; gap: 1rem; max-width: 30rem; padding: 1.25rem 0 0; }
.panel.inline { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; max-width: none; padding-top: .75rem; }
.panel.inline label { min-width: 12rem; }

/* ---------------------------------------------------------------- portfolio: statement head */
.hero { display: flex; flex-wrap: wrap; gap: 2rem 3rem; align-items: flex-end; justify-content: space-between; margin-bottom: 2rem; }
.hero-main { flex: 1 1 26rem; min-width: 0; }
.hero h1 { font: 500 .9375rem/1.3 var(--sans); letter-spacing: 0; color: var(--muted); }
.total { margin: .35rem 0 0; font: 400 clamp(2.5rem, 6vw, 3.75rem)/1.05 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums lining-nums; }
.total small { font: 500 1rem var(--sans); letter-spacing: 0; color: var(--muted); margin-left: .5rem; }
.pts-total { display: block; font: 400 .875rem/1 var(--sans); letter-spacing: 0; margin-top: .6rem; }
/* how the value splits over the four classes; colour runs from short to long term */
.alloc { margin-top: 1.5rem; max-width: 40rem; }
.alloc svg { display: block; width: 100%; height: 8px; border-radius: 4px; overflow: hidden; }
.alloc .track { fill: var(--sunk); }
.c0 { fill: var(--c0); background: var(--c0); } .c1 { fill: var(--c1); background: var(--c1); }
.c2 { fill: var(--c2); background: var(--c2); } .c3 { fill: var(--c3); background: var(--c3); }
.alloc ul { list-style: none; margin: .7rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; font-size: .8125rem; color: var(--muted); }
.alloc li b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; margin-left: .3rem; }
.sw { display: inline-block; width: .625rem; height: .625rem; border-radius: 2px; margin-right: .45rem; }

/* USDC ready to collect */
.claim { flex: 1 1 19rem; max-width: 22rem; display: grid; gap: .9rem; padding: 1.25rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--gain); border-radius: var(--r-card); }
.claim > span { font-size: .875rem; color: var(--muted); }
.claim strong { display: block; margin-top: .15rem; font: 600 1.625rem/1.2 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums lining-nums; }
.claim .btn { justify-self: stretch; }

/* ---------------------------------------------------------------- portfolio: positions */
.book { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: .5rem 1.5rem 1rem; }
.ledger { width: 100%; border-collapse: collapse; }
.ledger th { text-align: left; font-weight: 500; font-size: .8125rem; color: var(--muted); padding: .9rem .5rem .7rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ledger th.num { text-align: right; }
.ledger td { padding: 1.15rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.ledger th:first-child, .ledger td:first-child { padding-left: 0; }
.ledger th:last-child, .ledger td:last-child { padding-right: 0; }
.cls { display: flex; align-items: center; font: 600 1.125rem/1.3 var(--serif); }
.cls .sw { flex: none; }
.rate, .ledger .rate { display: block; font: 600 1.375rem/1.2 var(--serif); font-variant-numeric: tabular-nums lining-nums; cursor: help; }
.val { display: block; font: 600 1.375rem/1.2 var(--serif); font-variant-numeric: tabular-nums lining-nums; }
.val.changed { color: var(--accent); }
.ledger td.r { vertical-align: middle; }
/* the notice ruler: bar length proportional to days of notice (90 days = full width), ticks every 10 days */
.ruler { display: flex; align-items: center; gap: .75rem; min-width: 12rem; cursor: help; }
.ruler-track { flex: 1; height: 7px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px calc(100% / 9)); border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.ruler .ruler-fill { display: block; height: 6px; background: var(--ink); }   /* two classes: .d2 is also a chart tone */
.ruler-fill.d2 { width: 2.22%; } .ruler-fill.d14 { width: 15.56%; } .ruler-fill.d30 { width: 33.33%; } .ruler-fill.d90 { width: 100%; }
.ruler-days { font-size: .875rem; font-variant-numeric: tabular-nums; min-width: 4.5rem; color: var(--ink-2); }

/* figures with an icon: plain text, colour only for up, down and points. The explanation is in the tooltip. */
.ic { flex: none; vertical-align: -3px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .9rem; margin-top: .4rem; }
.chips.end { justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: .3rem; color: var(--ink-2); font-size: .8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; cursor: help; }
.chip .ic { width: 14px; height: 14px; color: var(--muted); }
.chip.up { color: var(--gain); } .chip.down { color: var(--loss); } .chip.pts { color: var(--accent); }
.chip.up .ic, .chip.down .ic, .chip.pts .ic { color: inherit; }
.chip.muted { color: var(--muted); }
.sub.pts, .sub.swing { color: var(--accent); }
.spark { display: inline-block; vertical-align: middle; cursor: help; }
.spark polyline { fill: none; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.spark.up polyline { stroke: var(--gain); }
.spark.down polyline { stroke: var(--loss); }
/* remaining capacity */
meter.cap-bar { display: block; width: 8.5rem; height: 4px; margin-top: .65rem; cursor: help; -webkit-appearance: none; appearance: none; background: var(--sunk); border: 0; border-radius: 999px; }
meter.cap-bar::-webkit-meter-bar { background: var(--sunk); border: 0; border-radius: 999px; height: 4px; }
meter.cap-bar::-webkit-meter-optimum-value, meter.cap-bar::-webkit-meter-suboptimum-value { background: var(--muted); border-radius: 999px; }
meter.cap-bar::-webkit-meter-even-less-good-value { background: var(--loss); border-radius: 999px; }
meter.cap-bar::-moz-meter-bar { background: var(--muted); border-radius: 999px; }
.cap { display: block; font-size: .8125rem; color: var(--muted); margin-top: .15rem; }
.cap.full { color: var(--loss); }

details.more { padding-top: .9rem; }
details.more summary { display: inline-flex; gap: .4rem; align-items: center; cursor: pointer; color: var(--muted); font-size: .875rem; }
details.more summary:hover { color: var(--ink); }
details.more .disclaimer { margin-top: .9rem; }

@media (max-width: 46rem) {
  .book { padding: .25rem 1.1rem .9rem; }
  .claim { max-width: none; }
  .ledger thead { display: none; }
  .ledger tr { display: grid; grid-template-columns: 1fr auto; gap: .9rem 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
  .ledger td { border: 0; padding: 0; }
  .ledger td:nth-child(2) { text-align: right; }
  .ledger td:nth-child(2) .chips { justify-content: flex-end; }
  .ledger td.r { grid-column: 1; align-self: center; }
  .ledger td.num { grid-column: 2; grid-row: 2; }
  .ruler { min-width: 0; }
  .rate, .ledger .rate, .val { font-size: 1.25rem; }
}

/* ---------------------------------------------------------------- open items, bids */
.items { list-style: none; margin: 0; padding: 0 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.items li { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.items li:last-child { border-bottom: 0; }
.items .what { font-weight: 600; }
.items .when { font-size: .8125rem; color: var(--muted); }
.items .when .ic { width: 13px; height: 13px; }
.items .amt { font: 600 1.125rem var(--serif); font-variant-numeric: tabular-nums lining-nums; margin-left: auto; white-space: nowrap; }
.items .amt .ic { width: 14px; height: 14px; color: var(--muted); }
.it-ic { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; flex: none; }
.it-ic .ic { width: 17px; height: 17px; }
.it-ic.buy { background: var(--gain-soft); color: var(--gain); }
.it-ic.sell { background: var(--accent-soft); color: var(--accent); }
.item-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: flex-end; }
.offer { display: inline-flex; gap: .5rem; align-items: end; }
.offer .offer-price { width: 5.5rem; font-size: 1rem; padding: .35rem .5rem; }
@media (max-width: 40rem) { .items { padding: 0 1.1rem; } .item-actions { width: 100%; justify-content: flex-start; } }

/* ---------------------------------------------------------------- trade: one order ticket per action */
.act { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 1.5rem 1.75rem 1.75rem; }
.act h2 { margin-bottom: 1.1rem; }
.tabs { display: flex; gap: 1.5rem; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { display: inline-flex; align-items: center; gap: .45rem; flex: none; font: 500 .9375rem var(--sans); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: .7rem 0; color: var(--muted); cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.ticket { max-width: none; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 1.5rem 3.5rem; padding-top: 1.75rem; align-items: start; }
.ticket .fields { display: grid; gap: 1rem; }
.ticket .side { grid-row: 1 / span 2; grid-column: 2; display: grid; gap: 1rem; padding-left: 3.5rem; margin-left: -1.75rem; border-left: 1px solid var(--line); align-self: stretch; align-content: start; }
.ticket > .btn { grid-column: 1; justify-self: stretch; padding: .85rem 1.25rem; }
@media (max-width: 54rem) {
  .act { padding: 1.1rem 1.1rem 1.4rem; }
  .ticket { grid-template-columns: minmax(0, 1fr); }
  .ticket .side { grid-row: auto; grid-column: 1; padding-left: 0; margin-left: 0; border-left: 0; }
}
/* timeline: what happens when */
.tl-box { margin: 0; max-width: 34rem; }
.tl-box:empty { display: none; }
svg.timeline { width: 100%; height: auto; display: block; overflow: visible; }
.timeline rect.tl-open { fill: var(--tl-open); }
.timeline rect.tl-locked { fill: var(--tl-locked); }
.timeline rect.tl-hold { fill: var(--tl-hold); }
.timeline rect.tl-pay { fill: var(--tl-pay); }
.timeline .tl-seg { font: 600 10.5px var(--sans); fill: var(--tl-ink); }
.timeline .tl-seg.pay { fill: var(--surface); }
.timeline .tl-lbl { font: 600 12px var(--sans); fill: var(--ink); }
.timeline .tl-date { font: 11px var(--sans); fill: var(--muted); font-variant-numeric: tabular-nums; }
.timeline .tl-pin line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 2; }
.timeline .tl-pin circle { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.timeline .tl-pin.ponr circle { fill: var(--loss); stroke: var(--loss); }
.timeline .tl-pin.ponr .tl-lbl { fill: var(--loss); }
.timeline .tl-pin.exec circle, .timeline .tl-pin.end circle { fill: var(--ink); stroke: var(--ink); }

/* ---------------------------------------------------------------- tables */
.scroll { overflow-x: auto; }
.dtable { border-collapse: collapse; width: 100%; font-size: .875rem; margin: .5rem 0; }
.dtable th { text-align: left; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); padding: .55rem .6rem; white-space: nowrap; }
.dtable th.num { text-align: right; }
.dtable td { border-bottom: 1px solid var(--line); padding: .6rem .6rem; font-variant-numeric: tabular-nums; }
.dtable tbody tr:last-child td { border-bottom: 0; }
.dtable tr.warn td { color: var(--loss); }
.dtable th[scope="row"] { font-weight: 500; color: var(--muted); width: 14rem; }
.tbl summary { cursor: pointer; font-size: .8125rem; color: var(--muted); margin: .25rem 0; }
.tbl summary:hover { color: var(--ink); }
tr.flash td { background: var(--accent-soft); transition: background .3s; }

/* ---------------------------------------------------------------- marketplace */
.mk-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 1rem 1.25rem; margin: 0; }
.mk-card .dtable { margin: 0; font-size: .9375rem; }
.mk-card .dtable td { padding: .75rem .6rem; white-space: nowrap; }
.mk-card .dtable td:first-child { font-weight: 600; }
.mk-card .dtable .ret { font-weight: 600; white-space: nowrap; }
.mk-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: 0 3rem; align-items: start; }
.mk-cols .panel { padding-top: 0; }
.mk-cols .panel .btn { justify-self: stretch; }
@media (max-width: 54rem) { .mk-cols { grid-template-columns: minmax(0, 1fr); } .mk-card { padding: .75rem .9rem; } }
/* market map: lanes per class, x = days until payout (sqrt), bubble area = value, shaded = bids */
.mk-card .mk-map { max-width: 54rem; margin: 0 auto; }
.mk-card .mk-legend { max-width: 54rem; margin-left: auto; margin-right: auto; }
.mk-map .lane { fill: var(--sunk); fill-opacity: .55; } .mk-map .lane.alt { fill-opacity: 1; }
.mk-map .bub { fill: var(--ch-blue); fill-opacity: .82; stroke: var(--surface); stroke-width: 2; }
.mk-map .bub.mine { fill: var(--surface); fill-opacity: 1; stroke: var(--ch-blue); stroke-width: 2.5; }
.mk-map .bubble { cursor: pointer; }
.mk-map .bubble:hover .bub, .mk-map .bubble:focus .bub { fill-opacity: 1; stroke: var(--ch-blue-deep); }
.mk-map .bubble:focus { outline: none; }
.mk-map .bublbl { font: 600 9.5px var(--sans); fill: #fff; pointer-events: none; }
.mk-map .bublbl.mine { fill: var(--ch-blue-deep); }
.mk-map .bidzone { fill: var(--ch-blue); fill-opacity: .1; }
.mk-map .bidedge { stroke: var(--ch-blue); stroke-width: 1.5; stroke-dasharray: 4 3; }
.mk-map .bidlbl { fill: var(--ch-blue-deep); font-size: 10px; }
.mk-legend { display: flex; flex-wrap: wrap; gap: .3rem 1.25rem; list-style: none; padding: 0; margin: .6rem 0 0; font-size: .8125rem; color: var(--muted); }
.mk-legend i { display: inline-block; vertical-align: middle; margin-right: .4rem; }
.mk-legend .lg-bub { width: 10px; height: 10px; border-radius: 50%; background: var(--ch-blue); }
.mk-legend .lg-mine { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ch-blue); }
.mk-legend .lg-bid { width: 16px; height: 10px; background: color-mix(in srgb, var(--ch-blue) 18%, transparent); border-right: 2px dashed var(--ch-blue); }

/* ---------------------------------------------------------------- figures (intel tiles, data pages): a ruled strip, not boxes */
.tiles, .figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr)); gap: 0; margin: .5rem 0 1.5rem; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.tile, .figures div { margin: 0 -1px -1px 0; padding: 1.1rem 1.25rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.tile dt, .figures dt { display: flex; gap: .4rem; align-items: center; color: var(--muted); font-size: .8125rem; }
.tile dt .ic { width: 15px; height: 15px; }
.tile dd { margin: .35rem 0 0; font: 600 1.25rem/1.3 var(--serif); font-variant-numeric: tabular-nums lining-nums; }
.figures dd { margin: .35rem 0 0; font: 600 1.625rem/1.2 var(--serif); font-variant-numeric: tabular-nums lining-nums; }
.figures dd small { display: block; margin-top: .2rem; font: 400 .8125rem var(--sans); color: var(--muted); }
.figures .hole dd { color: var(--loss); }
.tile-h { display: block; font: 600 1.0625rem/1.3 var(--serif); }
.tile .sub { margin-top: .25rem; }

/* ---------------------------------------------------------------- charts */
.chart { width: 100%; height: auto; display: block; margin: .5rem 0; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: var(--muted); stroke-width: 1; }
.chart .ax { font: 11px var(--sans); fill: var(--muted); }
.chart .ax.lbl { fill: var(--ink); }
.chart .ax.val { fill: var(--ink); font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--c2); }
.chart .bar.critical { fill: var(--loss); }
.chart .hitbox { fill: transparent; }
.chart .hit:hover .bar, .chart .hit:focus .bar { fill: var(--c3); }
.chart .hit:hover .bar.critical, .chart .hit:focus .bar.critical { fill: var(--ch-red); }
.chart .hit:focus { outline: none; }
.chart .hit:focus .hitbox { stroke: var(--accent); stroke-width: 2; }
.scenarios h3 { margin: 2.25rem 0 .4rem; }
.sc-fan .band { fill: var(--ch-band); opacity: .7; }
.sc-fan .median { fill: none; stroke: var(--ch-blue); stroke-width: 2; stroke-linejoin: round; }
.sc-fan .dot { fill: var(--ch-blue); opacity: 0; }
.sc-fan .hit:hover .dot, .sc-fan .hit:focus .dot { opacity: 1; }
.sc-fan .ref { stroke: var(--ch-ref); stroke-width: 1; stroke-dasharray: 4 3; }
.sc-fan .end-l { fill: var(--ch-blue); font-weight: 600; }
.sc-tornado rect.pos { fill: var(--ch-blue); }
.sc-tornado rect.neg { fill: var(--ch-red); }
.sc-tornado .hit:hover rect, .sc-tornado .hit:focus rect { opacity: .85; }
.sc-tornado .base { stroke: var(--muted); stroke-width: 1; }
.sc-tornado .val.in { fill: #fff; font-weight: 600; }
/* heatmap cells carry their own text colour, so the ramp is the same in both themes */
.sc-heat .h0 { fill: #86b6ef; } .sc-heat .h1 { fill: #5598e7; } .sc-heat .h2 { fill: #3987e5; }
.sc-heat .h3 { fill: #256abf; } .sc-heat .h4 { fill: #184f95; } .sc-heat .h5 { fill: #0d366b; }
.sc-heat .cell { font: 600 12px var(--sans); fill: #0b0b0b; font-variant-numeric: tabular-nums; }
.sc-heat .cell.on-dark { fill: #fff; }
/* spaghetti paths: diverging red (price fell) .. grey .. blue (price rose) */
.sc-spag .path { fill: none; stroke-width: 1; opacity: .55; stroke-linejoin: round; }
.sc-spag .path:hover { stroke-width: 2.5; opacity: 1; }
.sc-spag .median { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.sc-spag .end-l { fill: var(--ink); font-weight: 600; }
.sc-spag .ref { stroke: var(--ch-ref); stroke-dasharray: 4 3; }
.d0 { stroke: var(--d0); background: var(--d0); } .d1 { stroke: var(--d1); background: var(--d1); } .d2 { stroke: var(--d2); background: var(--d2); }
.d3 { stroke: var(--d3); background: var(--d3); }
.d4 { stroke: var(--d4); background: var(--d4); } .d5 { stroke: var(--d5); background: var(--d5); } .d6 { stroke: var(--d6); background: var(--d6); }
.sc-pick { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0; }
.sc-pick .chip-btn { font: 500 .8125rem var(--sans); color: var(--ink-2); padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; }
.sc-pick .chip-btn:hover { background: var(--sunk); }
.sc-pick .chip-btn[aria-pressed="true"] { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.sc-key { display: flex; flex-wrap: wrap; gap: .3rem 1rem; list-style: none; padding: 0; margin: .4rem 0 0; font-size: .8125rem; color: var(--muted); }
.sc-key i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: .35rem; vertical-align: middle; }
.scenarios .chart, .intel-market .chart, .data-page .chart { max-width: 52rem; }

/* ---------------------------------------------------------------- data and operator pages */
.data-page { max-width: 52rem; }
.data-page.admin { max-width: var(--w); }
.data-page h1 { font-size: 2.125rem; margin-bottom: .75rem; }
.data-page h3 { font: 600 1.0625rem var(--sans); margin: 1.75rem 0 .5rem; }
.intel-market .intro h1 { font-size: 1.375rem; margin-bottom: .6rem; }
ul.plain { max-width: 68ch; margin: .25rem 0 0; padding-left: 1.1rem; }
ul.plain li { margin: .4rem 0; }
.ok-text { color: var(--gain); font-weight: 600; }
.alarm-text { color: var(--loss); font-weight: 600; }
.mono-addr { font-variant-numeric: tabular-nums; word-break: break-all; }
code.calldata { display: block; background: var(--field); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: .6rem; font-size: .8125rem; }

@media (max-width: 40rem) {
  .page { padding: 1.5rem 1rem 3rem; }
  h2 { font-size: 1.3125rem; }
  section + section { margin-top: 2.25rem; }
}
@media (prefers-reduced-motion: no-preference) { .ruler-fill { transition: width .6s ease-out; } }
@media (prefers-reduced-motion: reduce) { .view { animation: none; } }
/* market loading: placeholder bars with a light sweep, then a staggered reveal of bubbles, bid zones and rows */
@keyframes skel-sweep { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skel-bar { display: inline-block; height: .7rem; border-radius: 4px; vertical-align: middle;
  background: linear-gradient(90deg, var(--sunk) 25%, var(--surface) 45%, var(--sunk) 65%); background-size: 200% 100%; animation: skel-sweep 1.4s ease-in-out infinite; }
.skel-bar.w1 { width: 2.5rem; } .skel-bar.w2 { width: 3.5rem; } .skel-bar.w3 { width: 5rem; } .skel-bar.w4 { width: 9rem; } .skel-bar.w5 { width: 13rem; }
.skel-wrap { position: relative; overflow: hidden; border-radius: 6px; }
.skel-wrap::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--surface) 65%, transparent) 50%, transparent 70%); background-size: 200% 100%; animation: skel-sweep 1.6s ease-in-out infinite; }
.skel-list li { padding: .55rem 0; }
@keyframes bub-in { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
@keyframes zone-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes row-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.mk-map.reveal .bubble { transform-box: fill-box; transform-origin: center; animation: bub-in .45s cubic-bezier(.2,.8,.3,1.2) both; }
.mk-map.reveal .zone { transform-box: view-box; transform-origin: 92px 0; animation: zone-in .6s ease-out both; }
.reveal-row { animation: row-in .35s ease-out both; }
.st1 { animation-delay: 60ms !important; } .st2 { animation-delay: 120ms !important; } .st3 { animation-delay: 180ms !important; }
.st4 { animation-delay: 240ms !important; } .st5 { animation-delay: 300ms !important; } .st6 { animation-delay: 360ms !important; }
.st7 { animation-delay: 420ms !important; } .st8 { animation-delay: 480ms !important; } .st9 { animation-delay: 540ms !important; }
@media (prefers-reduced-motion: reduce) {
  .skel-bar, .skel-wrap::after { animation: none; }
  .mk-map.reveal .bubble, .mk-map.reveal .zone, .reveal-row { animation: none; }
}
/* repayments per borrower group: categorical (validated: blue, orange, green, yellow), forecast lighter, band whisker */
.sw-g0 { fill: #2a78d6; } .sw-g1 { fill: #eb6834; } .sw-g2 { fill: #1baf7a; } .sw-g3 { fill: #eda100; }
.sc-weeks rect.fc { fill-opacity: .42; }
.sc-weeks .band { stroke: var(--ink, #14213a); stroke-width: 1.3; }
.sc-weeks .hitbox, .sc-fan .hitbox { fill: transparent; }
.sc-weeks .hit:hover rect:not(.hitbox) { filter: brightness(1.08); }
.grp-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; list-style: none; padding: 0; margin: .2rem 0 .6rem; font-size: .8rem; color: var(--muted); }
.grp-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }
.grp-legend i.g0 { background: #2a78d6; } .grp-legend i.g1 { background: #eb6834; } .grp-legend i.g2 { background: #1baf7a; } .grp-legend i.g3 { background: #eda100; }
.grp-legend i.fc { background: repeating-linear-gradient(90deg, var(--muted) 0 2px, transparent 2px 4px); opacity: .6; }
.sw-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .4rem; vertical-align: -1px; }
.sw-dot.g0 { background: #2a78d6; } .sw-dot.g1 { background: #eb6834; } .sw-dot.g2 { background: #1baf7a; } .sw-dot.g3 { background: #eda100; }
td.nowrap { white-space: nowrap; }
/* repayment events over time: colour = group (same as the weekly bars), rings = liquidations */
.sc-events .ev { fill-opacity: .55; stroke: none; }
.sc-events .ev.g0 { fill: #2a78d6; } .sc-events .ev.g1 { fill: #eb6834; } .sc-events .ev.g2 { fill: #1baf7a; } .sc-events .ev.g3 { fill: #eda100; }
.sc-events .ev.liq { fill: none; stroke-width: 1.4; stroke-opacity: .85; }
.sc-events .ev.liq.g0 { stroke: #2a78d6; } .sc-events .ev.liq.g1 { stroke: #eb6834; } .sc-events .ev.liq.g2 { stroke: #1baf7a; } .sc-events .ev.liq.g3 { stroke: #eda100; }
.sc-events .ev:hover { fill-opacity: 1; stroke: var(--ink); stroke-width: 1.5; }
.sc-cum .cum { fill: none; stroke-width: 2; stroke-linejoin: round; }
.sc-cum .cum.g0 { stroke: #2a78d6; } .sc-cum .cum.g1 { stroke: #eb6834; } .sc-cum .cum.g2 { stroke: #1baf7a; } .sc-cum .cum.g3 { stroke: #eda100; }
.sc-cum .cum.total { stroke: var(--ink); stroke-width: 2.5; }
.grp-legend i.ring { background: none; border: 1.5px solid var(--muted); border-radius: 50%; }
.grp-legend i.tot { height: 3px; background: var(--ink); border-radius: 0; vertical-align: 3px; }
/* weekly repayment ranges */
.rm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr)); gap: .8rem; margin: .4rem 0 1rem; }
.rm-card { padding: .7rem .9rem; } .rm-card h4 { margin: 0 0 .3rem; font: 600 .95rem var(--sans); color: var(--ink); } .rm-card h4 .fine { font-weight: 400; margin-left: .4rem; }
.rm-card .dtable td, .rm-card .dtable th { padding: .3rem .35rem; }
tr.rm-win td { background: var(--gain-soft); }
.rm-amount { display: inline-flex; gap: .5rem; align-items: center; font-size: .85rem; color: var(--muted); margin: .2rem 0; } .rm-amount input { width: 6rem; }
/* mUSDC sellers: holder composition and sales (categorical slots from the validated palette) */
.share-bar .p0 { fill: #2a78d6; } .share-bar .p1 { fill: #eb6834; } .share-bar .p2 { fill: #1baf7a; } .share-bar .p3 { fill: #eda100; } .share-bar .p4 { fill: var(--line-strong, #b7bab2); }
.share-bar .seg-l { font: 600 11px var(--sans); fill: #fff; pointer-events: none; }
.sc-sales .sale { fill-opacity: .55; stroke: var(--surface, #fff); stroke-width: 1; } .sc-sales .sale.h0 { fill: #eb6834; } .sc-sales .sale.h1 { fill: #2a78d6; }
.sc-sales .sale:hover { fill-opacity: 1; stroke: var(--ink); }
.grp-legend i.p0 { background: #2a78d6; } .grp-legend i.p1 { background: #eb6834; } .grp-legend i.p2 { background: #1baf7a; } .grp-legend i.p3 { background: #eda100; } .grp-legend i.p4 { background: var(--line-strong, #b7bab2); }
.grp-legend i.h0 { background: #eb6834; border-radius: 50%; } .grp-legend i.h1 { background: #2a78d6; border-radius: 50%; }
.has-note { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }

/* PROTOTYPE target price (branch target-price); reuses .kf card look */
.kf { margin: 1.2rem 0 1.6rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r-card, 12px); background: var(--surface); }
.tp-ticket > .fields, .tp-ticket > .side, .tp-ticket > button[type="submit"] { display: none; }
.tp-ticket { display: block; max-width: none; }
.tp-gone { display: none !important; }
/* prototype bar: variant switch and simulation, clearly apart from the product */
.tp-proto { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0 0 1.5rem; padding: .6rem .8rem; border: 1px dashed var(--line-strong); border-radius: var(--r-ctl); font-size: .8125rem; }
.tp-proto-act { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.tp-proto .fine { margin: 0; } .tp-proto-note { flex: 1 1 100%; }
.tp-seg { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.tp-seg button { font: 500 .8125rem var(--sans); padding: .35rem .7rem; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.tp-seg button[aria-pressed="true"] { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
/* the model in one sentence */
.tp-model { margin-bottom: 1.5rem; }
.tp-model h3, .tp-model h2 { font: 600 1.625rem/1.2 var(--serif); letter-spacing: -.012em; margin: 0 0 .4rem; }
.tp-model p { margin: 0; max-width: 46rem; font-size: 1.0625rem; color: var(--ink-2); }
.tp-model-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2.5rem; }
.tp-model-row > label { flex: 0 1 16rem; }
.tp-bestp { font: 600 1.125rem var(--serif); color: var(--ink); }
.tp-best { margin: 0; text-align: right; } .tp-best dt { font-size: .8125rem; color: var(--muted); } .tp-best dd { margin: 0; font: 600 1.75rem/1.2 var(--serif); } .tp-best .fine { display: block; margin: 0; }
/* two columns: controls and what they mean */
.tp-cols { display: flex; flex-wrap: wrap; gap: 2rem 3rem; align-items: flex-start; }
.tp-col { flex: 1 1 19rem; min-width: 0; display: grid; gap: 1.1rem; align-content: start; }
.tp-col.wide { flex: 1.5 1 26rem; }
.tp-cols.book .tp-col.wide { flex: 999 1 30rem; } .tp-cols.book .tp-col { flex: 1 1 20rem; }
.tp-col .fine, .tp-box .fine { margin: 0; }
.tp-price > span:first-child { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.tp-price b { font: 600 1.75rem/1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.tp-price input[type="range"] { accent-color: var(--btn); padding: 0; border: 0; background: none; height: 1.75rem; width: 100%; }
.tp-ends { display: flex; justify-content: space-between; gap: 1rem; font-size: .75rem; font-weight: 400; }
.tp-rows { margin: 0; border-top: 1px solid var(--line); }
.tp-rows div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.tp-rows div:last-child { border-bottom: 0; }
.tp-rows dt { color: var(--muted); font-size: .9375rem; } .tp-rows dd { margin: 0; font: 600 1.0625rem var(--serif); font-variant-numeric: tabular-nums; text-align: right; }
.tp-gain, .tp-rows dd.tp-gain { color: var(--gain); font-weight: 600; }
.tp-go { justify-self: stretch; padding: .85rem 1.25rem; }
.tp-msg { margin: 1rem 0 0; font-weight: 600; color: var(--gain); } .tp-msg:empty { display: none; }
.tp-tiles { margin: .25rem 0 0; }
.tp-tip { margin: 0; font-size: .9375rem; color: var(--ink-2); }
/* A: fill-chance curve */
.tp-curve-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; }
.tp-curve-h h4 { margin: 0; font: 600 1.0625rem var(--sans); color: var(--ink); } .tp-curve-h .grp-legend { margin: 0; }
.tp-curve { margin: 0; }
.tp-curve .tp-c3 { fill: none; stroke: var(--ch-blue); stroke-width: 2.5; stroke-linejoin: round; }
.tp-curve .tp-c7 { fill: none; stroke: var(--c0); stroke-width: 2.5; stroke-linejoin: round; }
.tp-curve .tp-d3 { fill: var(--ch-blue); stroke: var(--surface); stroke-width: 2; } .tp-curve .tp-d7 { fill: var(--c0); stroke: var(--surface); stroke-width: 2; }
.tp-curve .tp-you { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; } .tp-curve .tp-you-l { fill: var(--ink); font-weight: 600; font-size: 12px; }
.tp-curve .tp-rival { stroke: var(--line-strong); stroke-width: 2; }
.grp-legend i.tp-l3 { background: var(--ch-blue); height: 3px; vertical-align: 3px; } .grp-legend i.tp-l7 { background: var(--c0); height: 3px; vertical-align: 3px; }
/* B: three offers */
.tp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.tp-card { display: flex; flex-direction: column; gap: 1rem; padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg); }
.tp-card.main { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tp-card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; } .tp-card-h b { font: 600 1.375rem var(--serif); }
.tp-card .fine { margin: 0; display: block; }
.tp-big { display: block; font: 400 2.75rem/1.05 var(--serif); letter-spacing: -.02em; color: var(--gain); font-variant-numeric: tabular-nums; }
.tp-odds { display: grid; gap: .45rem; font-size: .875rem; } .tp-odds > span:first-child { display: flex; justify-content: space-between; }
.tp-card .btn { margin-top: auto; justify-self: stretch; padding: .8rem 1rem; }
.tp-own { margin-top: 1.25rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.tp-own summary { cursor: pointer; font-weight: 600; font-size: .9375rem; } .tp-own .tp-col { max-width: 24rem; margin-top: 1rem; }
/* C and marketplace: the bid ladder */
.tp-ladder2 { font-variant-numeric: tabular-nums; }
.tp-lrow { display: grid; grid-template-columns: 4rem minmax(0, 1fr) 4.5rem 4rem; gap: .75rem; align-items: center; width: 100%; padding: .5rem .6rem; margin: 0; border: 0; border-radius: var(--r-ctl); background: none; color: var(--ink); font: inherit; text-align: left; }
button.tp-lrow { cursor: pointer; } button.tp-lrow:hover { background: var(--sunk); }
.tp-lrow.head { font-size: .8125rem; color: var(--muted); border-bottom: 1px solid var(--line); border-radius: 0; padding-bottom: .6rem; margin-bottom: .25rem; }
.tp-lrow.own { background: var(--accent-soft); } .tp-lrow.preview { background: none; box-shadow: inset 0 0 0 1px var(--accent); }
.tp-lp { font: 600 1rem var(--serif); } .tp-lg { color: var(--muted); } .tp-lrow.own .tp-lg { color: var(--gain); font-weight: 600; }
.tp-lbar { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.tp-lbar .tp-bar { flex: 1; height: 14px; border-radius: 2px; background: none; } .tp-lbar .tp-bar i { border-radius: 2px; }
.tp-lbar.k-y .tp-bar, .tp-lbar.k-p .tp-bar { flex: 0 0 25%; }
.tp-lnote { font-size: .8125rem; font-weight: 600; color: var(--accent); min-width: 0; }
.tp-lbar.k-m .tp-bar i { background: var(--c2); } .tp-lbar.k-r .tp-bar i { background: var(--line-strong); } .tp-lbar.k-y .tp-bar i, .tp-lbar.k-p .tp-bar i { background: var(--accent); }
.grp-legend i.tp-ly { background: var(--accent); } .grp-legend i.tp-lm { background: var(--c2); } .grp-legend i.tp-lr { background: var(--line-strong); }
.tp-ladder2 .grp-legend { margin: .9rem 0 0; padding-top: .8rem; border-top: 1px solid var(--line); }
/* marketplace: want in (bids) beside want out (offers) */
.tp-mk2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem 3rem; align-items: start; }
@media (max-width: 1100px) { .tp-mk2 { grid-template-columns: minmax(0, 1fr); } }
.tp-side { min-width: 0; } .tp-mk2 > .tp-side { margin: 0; }
.tp-side-h { margin-bottom: 1rem; }
.tp-side-h h3 { font: 600 1.375rem/1.2 var(--serif); margin: 0 0 .3rem; }
.tp-side-h > .fine { margin: 0 0 .7rem; min-height: 2.6em; }
.tp-bestline { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; margin: 0; padding: .55rem .75rem; background: var(--sunk); border-radius: var(--r-ctl); font-size: .875rem; color: var(--ink-2); }
.tp-bestline b { font: 600 1.375rem/1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.tp-bestline .fine { margin: 0; }
.tp-orow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 6.5rem; gap: .6rem; align-items: center; padding: .45rem .6rem; border-radius: var(--r-ctl); }
.tp-orow.head { font-size: .8125rem; color: var(--muted); border-bottom: 1px solid var(--line); border-radius: 0; padding-bottom: .6rem; margin-bottom: .25rem; }
.tp-orow.own { background: var(--accent-soft); }
.tp-orow .tp-lbar .tp-bar { flex: 0 0 45%; }
.tp-orow.open { background: var(--sunk); border-radius: var(--r-ctl) var(--r-ctl) 0 0; }
.tp-confirm { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .7rem .8rem .8rem; margin-bottom: .35rem; background: var(--sunk); border-radius: 0 0 var(--r-ctl) var(--r-ctl); font-size: .875rem; }
.tp-confirm p { margin: 0; flex: 1 1 18rem; color: var(--ink-2); }
.tp-confirm span { display: inline-flex; gap: .5rem; }
.tp-bestmine { flex: 1 1 100%; font-size: .8125rem; color: var(--muted); }
.tp-getnote { margin: .5rem 0 0; max-width: 34rem; }
.tp-oact { display: flex; justify-content: flex-end; }
.tp-lbar.k-q .tp-bar i { background: var(--c0); } .tp-lbar.k-x .tp-bar i { background: var(--line-strong); }
.grp-legend i.tp-lq { background: var(--c0); }
.tp-out-empty { padding: 1rem 0; }
.tp-list { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.tp-list h4 { margin: 0 0 .75rem; font: 600 1.0625rem var(--sans); }
.tp-list-f { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1rem; margin-bottom: .6rem; }
.tp-list-f label { display: grid; gap: .3rem; font-size: .8125rem; min-width: 0; }
.tp-list-f select { max-width: 22rem; } .tp-list-f input { width: 7rem; }
.tp-box { display: grid; gap: 1rem; padding: 1.25rem 1.4rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg); }
.tp-box h4 { margin: 0; font: 600 1.0625rem var(--sans); color: var(--ink); }
.tp-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
/* positions: one card per bid, with the track bid -> filled -> sold or repaid */
.tp-h1 { margin: 0 0 1rem; font-size: 1.75rem; }
.tp-poslist { display: grid; gap: .5rem; }
.tp-postools { display: flex; justify-content: flex-end; gap: .5rem; margin: 1.25rem 0 .6rem; }
/* one card per position; every card uses the same columns, so the tracks line up */
.tp-pos { border: 1px solid var(--line); border-radius: var(--r-card, 12px); background: var(--surface); transition: background-color .12s, border-color .12s; }
.tp-pos:hover { background: var(--sunk); border-color: var(--line-strong); }
.tp-pos.open { border-color: var(--line-strong); }
.tp-pos-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(19rem, 1.35fr) 9.5rem 1.25rem; gap: 1rem 1.75rem; align-items: center; width: 100%; padding: .85rem 1rem; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: inherit; }
.tp-pos-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tp-pos-main { display: grid; gap: .1rem; min-width: 0; } .tp-pos-main b { font: 600 1.125rem var(--serif); font-variant-numeric: tabular-nums; } .tp-pos-main .fine { margin: 0; }
.tp-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; font-size: .75rem; color: var(--muted); }
.tp-track span { display: grid; gap: .35rem; } .tp-track i { height: 6px; border-radius: 3px; background: var(--sunk); }
.tp-pos:hover .tp-track i { background: var(--line); }
.tp-track .on i, .tp-pos:hover .tp-track .on i { background: var(--ink); } .tp-track .now { color: var(--ink); font-weight: 600; }
.tp-pos-st { font-size: .875rem; text-align: right; font-variant-numeric: tabular-nums; }
.tp-badge { display: inline-block; padding: .15rem .5rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .75rem; }
.tp-chev { width: .55rem; height: .55rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); justify-self: center; margin-top: -.25rem; transition: transform .15s; }
.tp-pos.open .tp-chev { transform: rotate(-135deg); margin-top: .2rem; }
.tp-pos-more { display: grid; gap: .7rem; padding: 0 1rem 1rem; }
.tp-pos-more > .fine { margin: 0; }
.tp-pos-act { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; } .tp-pos-act .fine { margin: 0; }
.tp-pos-btns { display: inline-flex; gap: .5rem; }
/* four-step track: the active step is wide with its text and a progress bar, done and coming steps stay narrow */
.tp-track4 { display: flex; gap: .3rem; min-width: 0; font-size: .75rem; color: var(--muted); }
.tp-track4 .seg { flex: 1 1 0; min-width: 0; display: grid; gap: .3rem; transition: flex-grow .35s ease; }
.tp-track4 .seg.cur { flex-grow: 4.5; color: var(--ink); }
.tp-track4 .seg-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-track4 .seg-l b { font-weight: 600; }
.tp-track4 .tp-bar { position: relative; height: 5px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.tp-pos:hover .tp-track4 .tp-bar { background: var(--line); }
.tp-track4 .tp-bar i { background: var(--muted); border-radius: 3px; transition: width .5s ease; }
.tp-track4 .seg.cur .tp-bar { height: 7px; }
.tp-track4 .seg.cur .tp-bar i { background: var(--accent); }
.tp-pos.due .tp-track4 .seg.cur .tp-bar i { background: var(--gain); }   /* past the term and still earning: calm green, the state to aim for */
.tp-track4 .seg.run .tp-bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0, rgba(255, 255, 255, .28) 50%, transparent 100%); transform: translateX(-100%); animation: tp-sheen 2.6s ease-in-out infinite; }
.tp-track4 .seg.wait .tp-bar i { width: 28% !important; background: var(--muted); animation: tp-slide 2.2s ease-in-out infinite alternate; }
@keyframes tp-sheen { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
@keyframes tp-slide { from { margin-left: 0; } to { margin-left: 72%; } }
@media (prefers-reduced-motion: reduce) { .tp-track4 .seg, .tp-track4 .tp-bar i { transition: none; } .tp-track4 .seg.run .tp-bar::after, .tp-track4 .seg.wait .tp-bar i { animation: none; } }
@media (max-width: 760px) {
  .tp-pos-row { grid-template-columns: minmax(0, 1fr) auto 1.25rem; }
  .tp-pos-row .tp-track4 { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) { .tp-pos, .tp-chev { transition: none; } }
.tp-box .tp-pos { gap: .8rem; } .tp-box .tp-track, .tp-box .tp-pos-main, .tp-box .tp-pos-act { flex-basis: 100%; }
.tp-empty { display: grid; gap: .5rem; justify-items: start; padding: .5rem 0; } .tp-empty b { font: 600 1.25rem var(--serif); } .tp-empty p { margin: 0 0 .5rem; color: var(--muted); max-width: 34rem; }
.tp-bar { display: block; height: 8px; border-radius: 4px; background: var(--sunk); overflow: hidden; } .tp-bar i { display: block; height: 100%; background: var(--ch-blue); }
.tp-bar i.w0 { width: 0%; }
.tp-bar i.w1 { width: 5%; }
.tp-bar i.w2 { width: 10%; }
.tp-bar i.w3 { width: 15%; }
.tp-bar i.w4 { width: 20%; }
.tp-bar i.w5 { width: 25%; }
.tp-bar i.w6 { width: 30%; }
.tp-bar i.w7 { width: 35%; }
.tp-bar i.w8 { width: 40%; }
.tp-bar i.w9 { width: 45%; }
.tp-bar i.w10 { width: 50%; }
.tp-bar i.w11 { width: 55%; }
.tp-bar i.w12 { width: 60%; }
.tp-bar i.w13 { width: 65%; }
.tp-bar i.w14 { width: 70%; }
.tp-bar i.w15 { width: 75%; }
.tp-bar i.w16 { width: 80%; }
.tp-bar i.w17 { width: 85%; }
.tp-bar i.w18 { width: 90%; }
.tp-bar i.w19 { width: 95%; }
.tp-bar i.w20 { width: 100%; }

/* the trade view holds only the buy flow in this prototype: no single-tab bar, no second heading */
#v-handel .tabs, #act-h { display: none; }
.tp-ticket { padding-top: 0; }
.tp-box .tp-rows dt { font-size: .875rem; } .tp-box .tp-rows dd { font-size: 1rem; white-space: nowrap; }
/* return and duration as the inputs */
.tp-field { display: grid; gap: .4rem; font-size: .8125rem; font-weight: 500; color: var(--muted); }
.tp-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 2rem; margin-bottom: 1.25rem; } .tp-inline > label { flex: 0 1 16rem; }
.tp-real { margin-top: .9rem; padding: .8rem .9rem; border-radius: var(--r-ctl); background: var(--sunk); }
.tp-real .fine { margin: 0 0 .6rem; }
.tp-real dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin: 0; }
.tp-real dt { font-size: .75rem; color: var(--muted); } .tp-real dd { margin: 0; font: 600 1.0625rem var(--serif); font-variant-numeric: tabular-nums; }
.tp-real .on dd { color: var(--accent); } .tp-real .on dt { color: var(--ink); font-weight: 600; }
.tp-big small { font: 500 1rem var(--sans); letter-spacing: 0; color: var(--muted); }
.tp-lrow { grid-template-columns: 5.5rem minmax(0, 1fr) 4.5rem 4rem; }
/* end of the term: three ways, keep running is the default */
.tp-end { flex: 1 1 100%; display: grid; gap: .8rem; padding: 1rem 1.1rem; border: 1px solid var(--line-strong); border-radius: var(--r-card); background: var(--sunk); }   /* past the term: a calm well in the page's own tones, not a warning */
.tp-end p { margin: 0; } .tp-end small { color: var(--muted); font-size: .8125rem; }
.tp-end-line { font: 600 1.125rem var(--serif); font-variant-numeric: tabular-nums; }
.tp-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.tp-opts li { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .5rem 1rem; align-items: center; font-size: .9375rem; }
.tp-opts li .btn { justify-self: stretch; }
.tp-opts li.on { padding-top: .6rem; border-top: 1px solid var(--line-strong); }
.tp-std { display: grid; } .tp-std b { font-size: .9375rem; }
.tp-reinvest { display: flex; align-items: center; gap: .7rem; font-size: .9375rem; }
.tp-switch { flex: none; width: 2.5rem; height: 1.5rem; padding: 2px; border: 0; border-radius: 999px; background: var(--line-strong); cursor: pointer; }
.tp-switch i { display: block; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--surface); transition: transform .15s; }
.tp-switch[aria-checked="true"] { background: var(--gain); } .tp-switch[aria-checked="true"] i { transform: translateX(1rem); }
@media (max-width: 40rem) { .tp-opts li { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .tp-switch i { transition: none; } }
/* order book columns: term, APY, volume, USDC (ordered by price, which is not shown) */
.tp-lrow { grid-template-columns: 5rem 4.5rem minmax(0, 1fr) 4.5rem; }
.tp-lnote.quiet { color: var(--muted); font-weight: 400; }
.tp-colsw { display: inline-flex; align-items: center; gap: .3rem; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; white-space: nowrap; }
.tp-colsw:hover { color: var(--accent); }
.tp-lrow { grid-template-columns: 5rem 5.5rem minmax(0, 1fr) 4.5rem; }
/* A: two equal columns; the bid list sits under the fill chance */
.tp-cols.half > .tp-col { flex: 1 1 22rem; }
.tp-sub { display: grid; gap: .5rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.tp-sub h4 { margin: 0; font: 600 1.0625rem var(--sans); color: var(--ink); } .tp-sub .fine { margin: 0; }
/* compact bid ladder */
.tp-ladder2 { font-size: .875rem; }
.tp-lrow { grid-template-columns: 3rem 4.75rem minmax(0, 1fr) 4rem; gap: .6rem; padding: .2rem .5rem; }
.tp-lrow.head { padding-bottom: .35rem; margin-bottom: .15rem; font-size: .75rem; }
.tp-lp { font-size: .9375rem; }
.tp-lbar .tp-bar { height: 8px; }
.tp-lbar.k-y .tp-bar, .tp-lbar.k-p .tp-bar { flex: 0 0 15%; }
.tp-lnote { font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-ladder2 .grp-legend { margin-top: .5rem; padding-top: .5rem; font-size: .75rem; }
.tp-sub { gap: .35rem; }
/* A, layout: settings in one row, the result as a strip with the button, then fill chance and bids side by side */
.tp-set { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) auto; gap: 1rem 2.5rem; align-items: start; }
.tp-result { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.5rem; margin: 1.5rem 0 2.25rem; padding: 1.1rem 1.4rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg); }
.tp-result > [data-o="sum"] { flex: 3 1 30rem; min-width: 0; }
.tp-result .tp-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 2rem; border: 0; }
.tp-result .tp-rows div { display: grid; gap: .15rem; padding: 0; border: 0; justify-content: start; }
.tp-result .tp-rows dt { font-size: .8125rem; } .tp-result .tp-rows dd { text-align: left; font-size: 1.25rem; }
.tp-result-go { flex: 1 1 17rem; display: grid; gap: .5rem; } .tp-result-go .fine { margin: 0; }
.tp-cols.half > .tp-col > [data-o] { display: grid; gap: .75rem; } .tp-cols.half .tp-tip, .tp-cols.half .fine { margin: 0; }
@media (max-width: 54rem) { .tp-set { grid-template-columns: minmax(0, 1fr); } .tp-result .tp-rows { grid-template-columns: minmax(0, 1fr); } }
.tp-result .tp-rows dd { white-space: nowrap; font-size: 1.125rem; } .tp-result .tp-rows { gap: .75rem 1.5rem; align-items: end; }
/* (i) beside the bid button: the conditions show on hover and on focus */
.tp-result-go { display: flex; align-items: center; gap: .6rem; } .tp-result-go .tp-go { flex: 1; }
.tp-info { position: relative; flex: none; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: var(--muted); cursor: help; }
.tp-info:hover, .tp-info:focus-visible { color: var(--ink); background: var(--sunk); }
.tp-infobox { position: absolute; z-index: 5; right: 0; bottom: calc(100% + .5rem); width: 17rem; padding: .7rem .85rem; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font-size: .8125rem; line-height: 1.5; text-align: left; visibility: hidden; opacity: 0; transition: opacity .12s; }
.tp-info:hover .tp-infobox, .tp-info:focus .tp-infobox { visibility: visible; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .tp-infobox { transition: none; } }
/* the prototype controls sit at the foot of each view */
.tp-proto { margin: 2.5rem 0 0; }
.tp-lrow.p100 { grid-template-columns: 7.5rem minmax(0, 1fr) 4.25rem 4.75rem 4rem; }   /* APY @ days | size bar | claim | bid USDC | discount */
.tp-end-offer { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .4rem 0 .2rem; font-size: .9375rem; }
.tp-end-state { font-size: .875rem; color: var(--ink-2); }
.tp-opts a.btn { text-decoration: none; text-align: center; }
/* indicator: this position grows right now (stacked chevrons, light running upwards) */
/* the indicator sits in its own column left of amount and summary line */
.tp-pos-row .tp-pos-main { grid-template-columns: 12px minmax(0, 1fr); column-gap: .6rem; }
.tp-pos-main > .tp-grow, .tp-pos-main > .tp-grow-slot { grid-row: 1 / span 2; align-self: center; }
.tp-grow { display: inline-flex; color: var(--gain); filter: drop-shadow(0 0 2px color-mix(in srgb, var(--gain) 70%, transparent)); }
.tp-grow path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: .3; animation: tp-grow 1.6s ease-in-out infinite; }
.tp-grow .c2 { animation-delay: .25s; } .tp-grow .c3 { animation-delay: .5s; }
@keyframes tp-grow { 0%, 100% { opacity: .3; } 35% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tp-grow path { animation: none; opacity: .9; } }
.tp-grow-slot { display: inline-block; width: 12px; height: 18px; }
/* end of term: three choices that exclude each other, the active one clearly marked */
.tp-choose { margin: .3rem 0 0; font-weight: 600; font-size: .9375rem; } .tp-choose .fine { font-weight: 400; margin-left: .4rem; }
.tp-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.tp-choice { display: grid; grid-template-columns: 1.1rem minmax(0, 1fr); gap: .65rem; align-items: start; padding: .8rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .12s, background-color .12s; }
.tp-choice:hover { border-color: var(--ink-2); }
.tp-choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tp-choice.on { border: 2px solid var(--accent); padding: calc(.8rem - 1px) calc(.9rem - 1px); background: var(--accent-soft); cursor: default; }
.tp-radio { width: 1.1rem; height: 1.1rem; margin-top: .1rem; border: 2px solid var(--line-strong); border-radius: 50%; box-sizing: border-box; }
.tp-choice.on .tp-radio { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 45%, transparent 50%); }
.tp-choice-t { display: grid; gap: .3rem; } .tp-choice-t b { font-weight: 600; } .tp-choice-t .fine { margin: 0; font-size: .8125rem; line-height: 1.4; }
.tp-end .tp-active, .tp-active { justify-self: start; padding: .05rem .45rem; border-radius: 999px; background: var(--accent); color: var(--surface); font-size: .6875rem; font-weight: 700; }
.tp-end-offer { justify-content: space-between; } .tp-end-offer a.btn { text-decoration: none; }
@media (max-width: 760px) { .tp-choices { grid-template-columns: minmax(0, 1fr); } }
.tp-model-list { margin: .2rem 0 0; padding-left: 1.2rem; max-width: 46rem; font-size: 1.0625rem; color: var(--ink-2); display: grid; gap: .25rem; }
.tp-model-list li::marker { color: var(--muted); }
.tp-choice.off { opacity: .5; cursor: not-allowed; }
.tp-choice.off:hover { border-color: var(--line-strong); }
.tp-hl { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
/* portfolio groups: active positions, below open bids and closed positions side by side */
.tp-group { margin: 0 0 1.75rem; }
.tp-group-h { margin: 1.5rem 0 .6rem; font: 600 1.0625rem var(--sans); color: var(--ink-2); }
.tp-group-empty { margin: 0; padding: .9rem 1rem; border: 1px dashed var(--line); border-radius: var(--r-card, 12px); }
.tp-pos-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 1.5rem; align-items: start; }
@media (max-width: 900px) { .tp-pos-cols { grid-template-columns: minmax(0, 1fr); } }
.tp-narrow .tp-pos-row { grid-template-columns: minmax(0, 1fr) auto 1.25rem; }
.tp-narrow .tp-pos-row .tp-track4 { grid-column: 1 / -1; grid-row: 2; }
.tp-closed .tp-pos { opacity: .85; }
.tp-pid { font: 500 .6875rem var(--sans); color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: .05rem .4rem; margin-left: .35rem; vertical-align: .15rem; font-variant-numeric: tabular-nums; }
.tp-endres { margin: 0; font-weight: 600; font-size: .875rem; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }   /* closed positions: final result line */
/* marketplace: cumulative stacked bar of the bid sizes */
.tp-stack { flex: 1 1 auto; width: 100%; height: 9px; border-radius: 2px; background: var(--sunk); overflow: hidden; }
.tp-stack .cum { fill: color-mix(in srgb, var(--c2) 16%, transparent); }   /* the bids above: clearly dimmed */
.tp-stack .own.k-m { fill: var(--c2); } .tp-stack .own.k-y, .tp-stack .own.k-p { fill: var(--accent); } .tp-stack .own.k-r { fill: var(--muted); }
.tp-lrow.p100 .tp-lbar { gap: .5rem; }
/* marketplace: estimated fill from the public market, a separator after each step (1, 3, 7, 30 days) */
.tp-lsep { display: flex; align-items: center; gap: .6rem; margin: .15rem 0; padding: .1rem .6rem; font-size: .75rem; color: var(--muted); }
.tp-lsep::before, .tp-lsep::after { content: ""; height: 1px; background: var(--line-strong); }
.tp-lsep::before { width: .8rem; } .tp-lsep::after { flex: 1; }
/* marketplace: own offer box with the minimum-bid slider, and its preview in the bid list */
.tp-sellbox { margin-top: 1.75rem; padding: 1rem 1.1rem 1.1rem; border: 1px solid var(--line-strong); border-radius: var(--r-card, 12px); background: var(--sunk); display: grid; gap: .8rem; }
.tp-sellbox h4 { margin: 0; font: 600 1.0625rem var(--sans); }
.tp-sellbox label { display: grid; gap: .35rem; font-size: .8125rem; }
.tp-sb-min b { font: 600 1.5rem var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; margin: 0 .2rem; }
.tp-sb-min input[type="range"] { width: 100%; accent-color: var(--ch-blue); }
.tp-sb-sum { margin: 0; min-height: 2.6em; } .tp-sellbox .btn { justify-self: start; }
.tp-lrow.match { background: color-mix(in srgb, var(--ch-blue) 16%, transparent); }
.tp-lrow.match .tp-lnote { color: var(--ch-blue); }
.tp-stack .own.k-v { fill: var(--accent); }
.tp-direct { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem .8rem; margin: -1.4rem 0 2rem; font-size: .875rem; color: var(--ink-2); } .tp-direct a.btn { text-decoration: none; }
.tp-out + .tp-bestline { margin-top: 1rem; } .tp-list-empty { margin: 0; padding: .8rem .6rem; }
.tp-mk2 > .tp-side { border: 1px solid var(--line-strong); border-radius: var(--r-card, 12px); padding: 1rem 1.1rem 1.2rem; } .tp-side .tp-sellbox { margin-top: 1.25rem; }   /* one frame per group: bids with the own offer, offers with getting in */
.tp-cl { display: grid; gap: .15rem; font-size: .8125rem; line-height: 1.4; color: var(--ink-2); } .tp-cl > span::before { content: "· "; color: var(--muted); } .tp-tip { cursor: help; color: var(--muted); border-bottom: 1px dotted currentColor; } .tp-tip:hover, .tp-tip:focus-visible { color: var(--ink); }
.tp-tip { position: relative; } .tp-tip-box { display: none; position: absolute; z-index: 30; bottom: calc(100% + .4rem); left: 50%; transform: translateX(-50%); width: min(18rem, 70vw); padding: .55rem .7rem; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: .75rem; line-height: 1.45; text-align: left; white-space: normal; box-shadow: 0 6px 18px rgb(0 0 0 / .25); cursor: auto; } .tp-tip:hover .tp-tip-box, .tp-tip:focus .tp-tip-box, .tp-tip.open .tp-tip-box { display: block; }
.tp-dlg { max-width: min(30rem, 92vw); padding: 1.2rem 1.3rem 1.1rem; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); } .tp-dlg::backdrop { background: rgb(0 0 0 / .45); } .tp-dlg h3 { margin: 0 0 .6rem; font-size: 1.05rem; } .tp-dlg p { margin: 0 0 1rem; line-height: 1.5; color: var(--ink-2); } .tp-dlg-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.tp-lsep { margin: .35rem 0 .8rem; } .tp-lsep span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }   /* sections: room below each separator, always one line */
.tp-outnote { display: block; padding-left: 1.9rem; list-style: disc; font-size: .8125rem; line-height: 1.55; color: var(--ink-2); } .tp-outnote li { margin: .1rem 0; }   /* out side: what buying here means */
.tp-outnote b { font: inherit; font-weight: 600; color: var(--ink); }
.tp-lrow.match { background: color-mix(in srgb, var(--ch-blue) 34%, transparent); box-shadow: inset 3px 0 0 var(--ch-blue); } .tp-lrow.match > * { color: var(--ink); font-weight: 600; }   /* bids the offer would go to: clearly marked */
.tp-orow.virt { background: color-mix(in srgb, var(--ch-blue) 34%, transparent); box-shadow: inset 3px 0 0 var(--ch-blue); font-weight: 600; } .tp-vtag { font-size: .75rem; color: var(--ink); }
.tp-sb-best { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin: .2rem 0 .4rem; } .tp-sb-best .fine { margin: 0; }
.tp-ptsrow { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: .7rem 0 0; font-size: .8125rem; color: var(--ink-2); } .tp-ptsicon { display: inline-flex; color: var(--accent); }   /* points below the three choices */
.tp-mk2 > .tp-col-r { align-self: stretch; display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; } .tp-col-r > .tp-side { border: 1px solid var(--line-strong); border-radius: var(--r-card, 12px); padding: 1rem 1.1rem 1.2rem; }
.tp-sell-sticky { position: sticky; top: 4.75rem; } .tp-sell-sticky .tp-sellbox { margin-top: 0; box-shadow: 0 8px 24px rgb(0 0 0 / .18); }   /* offer box: beside the bids while scrolling */
@media (max-width: 1100px) { .tp-sell-sticky { position: static; } }
.tp-stack .own.k-p { fill: var(--accent); }   /* your planned bid in the trade page's list */
.tp-lrow.p100 .tp-lnote { display: none; }   /* compact list: the note is the row's tooltip; colours as in the legend */
.tp-hist { margin: 0 0 1.25rem; } .tp-hist-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; margin-bottom: .4rem; } .tp-hist-head b { font: 600 1.25rem/1.1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; } .tp-hist-head .fine { margin: 0; }
.tp-hist-key { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem .5rem; font-size: .75rem; color: var(--muted); } .tp-hist-key i { display: inline-block; width: 14px; height: 0; border-top: 2px solid var(--accent); } .tp-hist-key i.face { border-top: 1.5px dashed var(--muted); margin-left: .4rem; }
.tp-hist-plot { position: relative; height: 96px; } .tp-hist-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tp-hist-area { fill: color-mix(in srgb, var(--accent) 16%, transparent); stroke: none; } .tp-hist-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; } .tp-hist-gap { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.tp-hist-face { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; } .tp-hist-base { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tp-hist-x { stroke: var(--ink-2); stroke-width: 1; vector-effect: non-scaling-stroke; } .tp-hist-tip { position: absolute; top: -.2rem; display: grid; gap: .1rem; padding: .35rem .55rem; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; font-size: .75rem; color: var(--ink-2); pointer-events: none; white-space: nowrap; box-shadow: 0 4px 12px rgb(0 0 0 / .2); }
.tp-hist-tip[hidden] { display: none; } .tp-hist-tip b { color: var(--ink); } .tp-hist-axis { display: flex; justify-content: space-between; font-size: .6875rem; color: var(--muted); margin-top: .2rem; }   /* portfolio value chart */
.tp-loss { color: var(--loss); }
