/* Lumivex public record. Tokens: mist, slate, teal (Lumivex), brass (the market). */
:root {
  --mist: #f3f5f7;
  --surface: #ffffff;
  --slate: #121a24;
  --quiet: #566373;
  --hair: #d8dee5;
  --teal: #0e7490;
  --teal-wash: rgba(14, 116, 144, 0.08);
  --brass: #a07a2c;
  --gain: #1c7c54;
  --loss: #b4233a;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --measure: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --mist: #0c141c;
    --surface: #111b25;
    --slate: #e4eaf0;
    --quiet: #93a1b0;
    --hair: #223140;
    --teal: #4cc3d9;
    --teal-wash: rgba(76, 195, 217, 0.1);
    --brass: #cfa757;
    --gain: #4fc58b;
    --loss: #f07083;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--slate);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 6px 10px; z-index: 10; }

.top, main, .foot { max-width: var(--measure); margin: 0 auto; padding: 0 24px; }
.top { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 500 21px/1 var(--serif); letter-spacing: -0.01em; }
.mark svg { width: 26px; height: 26px; }
.mark path { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.top nav { display: flex; gap: 28px; font-size: 14.5px; }
.top nav a { text-decoration: none; color: var(--quiet); }
.top nav a:hover { color: var(--slate); }

/* The opening */
.hero { padding: 56px 0 28px; max-width: 820px; }
h1 {
  font: 400 clamp(40px, 7vw, 76px)/1.02 var(--serif);
  letter-spacing: -0.025em;
  margin: 0 0 22px;
  font-variation-settings: "opsz" 72;
}
.lede { font-size: 18.5px; line-height: 1.6; color: var(--quiet); max-width: 62ch; margin: 0 0 18px; }
.status { font-size: 14px; color: var(--quiet); margin: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.status .paper { color: var(--slate); font-weight: 600; }
.status .fresh::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gain); margin-right: 7px; vertical-align: 1px; }

/* The memorable thing: the record itself */
.chart-block { margin: 18px 0 8px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.series { display: flex; gap: 22px; font-size: 14px; color: var(--quiet); }
.key::before { content: ""; display: inline-block; width: 22px; height: 0; border-top: 2.5px solid; vertical-align: middle; margin-right: 8px; }
.key.lumivex::before { border-color: var(--teal); }
.key.market::before { border-color: var(--brass); border-top-width: 1.5px; }
.range { display: inline-flex; gap: 4px; }
.range button {
  font: 500 13.5px var(--sans); color: var(--quiet); background: none; border: 1px solid transparent;
  padding: 5px 11px; border-radius: 999px; cursor: pointer;
}
.range button[aria-pressed="true"] { color: var(--slate); border-color: var(--hair); background: var(--surface); }
.chart { position: relative; }
#curve { width: 100%; height: clamp(260px, 42vw, 420px); display: block; overflow: visible; }
#curve .grid { stroke: var(--hair); stroke-width: 1; }
#curve .label { fill: var(--quiet); font: 12px var(--sans); }
#curve .market { fill: none; stroke: var(--brass); stroke-width: 1.6; }
#curve .lumivex { fill: none; stroke: var(--teal); stroke-width: 2.6; stroke-linejoin: round; }
#curve .wash { fill: var(--teal-wash); }
#curve .end { font: 500 14px var(--sans); }
#curve .end.lumivex-end { fill: var(--teal); }
#curve .end.market-end { fill: var(--brass); }
#curve .cross { stroke: var(--quiet); stroke-dasharray: 2 3; }
.drawn { animation: draw 1.6s cubic-bezier(.3,.7,.2,1) both; }
@keyframes draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .drawn { animation: none; } html { scroll-behavior: auto; } }
.tip {
  position: absolute; top: 0; pointer-events: none; background: var(--surface); border: 1px solid var(--hair);
  border-radius: 8px; padding: 8px 11px; font-size: 13px; line-height: 1.45; white-space: nowrap;
  box-shadow: 0 6px 24px rgba(10, 20, 30, 0.08);
}
.tip b { font-weight: 600; }
.drawdown { width: 100%; height: 58px; display: block; margin-top: 4px; }
.drawdown .band { fill: var(--loss); opacity: 0.16; }
.drawdown .floor { stroke: var(--loss); stroke-dasharray: 3 4; opacity: 0.55; }
.drawdown .label { fill: var(--quiet); font: 11.5px var(--sans); }
.axis-note { font-size: 13px; color: var(--quiet); margin: 6px 0 0; }

.figures { display: grid; grid-template-columns: repeat(6, 1fr); gap: 28px 24px; margin: 40px 0 0; padding: 28px 0 0; border-top: 1px solid var(--hair); }
.figures div { min-width: 0; }
.figures dt { font-size: 13.5px; color: var(--quiet); margin-bottom: 6px; }
.figures dd { margin: 0; font: 400 36px/1.05 var(--serif); letter-spacing: -0.02em; font-variant-numeric: tabular-nums lining-nums; }
.figures .limit { display: block; font-size: 12.5px; color: var(--quiet); margin-top: 6px; }
.up { color: var(--gain); }
.down { color: var(--loss); }

/* The ledgers */
.block { margin-top: 84px; }
h2 { font: 400 32px/1.15 var(--serif); letter-spacing: -0.015em; margin: 0 0 8px; }
.note { color: var(--quiet); margin: 0 0 20px; max-width: 66ch; font-size: 15px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 500; font-size: 13px; color: var(--quiet); padding: 0 14px 10px 0; border-bottom: 1px solid var(--slate); white-space: nowrap; }
td { padding: 13px 14px 13px 0; border-bottom: 1px solid var(--hair); white-space: nowrap; }
th.n, td.n { text-align: right; padding-right: 0; padding-left: 14px; }
td.sym { font-weight: 600; letter-spacing: 0.01em; }
tr.day td { padding: 22px 0 8px; border-bottom: 0; font: 500 15px var(--serif); color: var(--quiet); }
.side-sell { color: var(--quiet); }
.empty td { color: var(--quiet); white-space: normal; }
.more { margin-top: 18px; font: 500 14px var(--sans); color: var(--slate); background: var(--surface); border: 1px solid var(--hair); border-radius: 999px; padding: 8px 16px; cursor: pointer; }

.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--slate); }
.ledger li { display: grid; grid-template-columns: 9.5rem 1fr 10.5rem; gap: 6px 24px; padding: 18px 0; border-bottom: 1px solid var(--hair); align-items: baseline; }
.ledger .verdict { font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.ledger .verdict::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid currentColor; }
.ledger .v-pass { color: var(--gain); }
.ledger .v-pass::before { background: currentColor; }
.ledger .v-fail { color: var(--loss); }
.ledger .v-fail::before { border-radius: 2px; background: currentColor; transform: rotate(45deg) scale(.8); }
.ledger .v-pending, .ledger .v-insufficient { color: var(--quiet); }
.ledger .idea b { font-weight: 600; display: block; }
.ledger .idea span { color: var(--quiet); font-size: 14.5px; }
.ledger .when { color: var(--quiet); font-size: 13.5px; text-align: right; }
.earlier { color: var(--quiet); font-size: 14.5px; margin: 18px 0 0; }

.foot { margin-top: 100px; padding-top: 24px; padding-bottom: 48px; border-top: 1px solid var(--hair); color: var(--quiet); font-size: 13px; }
.foot p { max-width: 80ch; margin: 0 0 10px; }

@media (max-width: 900px) {
  .figures { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .top, main, .foot { padding: 0 16px; }
  .top nav { gap: 18px; }
  .hero { padding-top: 32px; }
  .lede { font-size: 17px; }
  .figures { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .figures dd { font-size: 30px; }
  .block { margin-top: 64px; }
  .ledger li { grid-template-columns: 1fr auto; }
  .ledger .idea { grid-column: 1 / -1; grid-row: 2; }
  .ledger .when { text-align: right; }
  td, th { padding-right: 12px; }
}
.note-inline { color: var(--quiet); font-size: 14px; white-space: normal; }
#strategies td:first-child { white-space: normal; min-width: 14rem; }

/* Live today figure: one number, eased between updates; never reloads the page */
.live { display: flex; align-items: flex-end; gap: 28px; flex-wrap: wrap; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--hair); }
.live-main { display: flex; flex-direction: column; gap: 4px; }
.live-label { font-size: 13.5px; color: var(--quiet); display: inline-flex; align-items: center; gap: 8px; }
.live-label.open::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gain); animation: beat 2s ease-out infinite; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(28,124,84,.45); } 70% { box-shadow: 0 0 0 9px rgba(28,124,84,0); } 100% { box-shadow: 0 0 0 0 rgba(28,124,84,0); } }
@media (prefers-reduced-motion: reduce) { .live-label.open::before { animation: none; } }
.live-num { font: 400 52px/1 var(--serif); letter-spacing: -0.02em; font-variant-numeric: tabular-nums lining-nums; min-width: 4.2ch; }
.live-side { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--quiet); padding-bottom: 6px; }
.live-side b { font-weight: 600; color: var(--slate); font-variant-numeric: tabular-nums; }
.live-time { font-size: 12.5px; }
