/* ShapedMarket. The bot draws in one ink (amber); market data is jade (up) and coral (down). */

:root {
  --bg: #131c26;
  --bg-2: #18232f;
  --bg-3: #1f2c3a;
  --line: #2a3a4b;
  --line-2: #33475b;
  --text: #e7e3da;
  --text-2: #9eafbf;
  --text-3: #6f8293;
  --long: #3dbf8f;
  --long-bg: rgba(61, 191, 143, 0.14);
  --short: #ef6a5e;
  --short-bg: rgba(239, 106, 94, 0.14);
  --ink: #f0b54a;
  --ink-bg: rgba(240, 181, 74, 0.14);
  --focus: #7cb6ff;
  --radius: 6px;
  --font: 'Archivo', system-ui, sans-serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    --bg: #eef1f4;
    --bg-2: #fbfcfd;
    --bg-3: #e4e9ee;
    --line: #d5dce4;
    --line-2: #c3ccd6;
    --text: #16202b;
    --text-2: #4f6070;
    --text-3: #7d8c9a;
    --long: #0f8a63;
    --long-bg: rgba(15, 138, 99, 0.11);
    --short: #cf3f34;
    --short-bg: rgba(207, 63, 52, 0.1);
    --ink: #b06d10;
    --ink-bg: rgba(176, 109, 16, 0.12);
    --focus: #1f6fd1;
    color-scheme: light;
  }
}

:root[data-theme='light'] {
  --bg: #eef1f4;
  --bg-2: #fbfcfd;
  --bg-3: #e4e9ee;
  --line: #d5dce4;
  --line-2: #c3ccd6;
  --text: #16202b;
  --text-2: #4f6070;
  --text-3: #7d8c9a;
  --long: #0f8a63;
  --long-bg: rgba(15, 138, 99, 0.11);
  --short: #cf3f34;
  --short-bg: rgba(207, 63, 52, 0.1);
  --ink: #b06d10;
  --ink-bg: rgba(176, 109, 16, 0.12);
  --focus: #1f6fd1;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.45 var(--font);
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.num, td, .lv b { font-variant-numeric: tabular-nums; }
.long { color: var(--long); }
.short { color: var(--short); }
.ink { color: var(--ink); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }

h1, h2, h3 { font-weight: 700; font-variation-settings: 'wdth' 115; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 34px; line-height: 1.1; }
h2 { font-size: 20px; line-height: 1.2; }
h3 { font-size: 15px; line-height: 1.3; font-variation-settings: 'wdth' 108; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  height: 52px; padding: 0 16px;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; font-variation-settings: 'wdth' 118; font-size: 16px; }
.brand svg { width: 24px; height: 24px; color: var(--text); }
.search { position: relative; flex: 0 1 420px; }
.search input {
  width: 100%; height: 34px; padding: 0 36px 0 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); outline: none;
}
.search input:focus { border-color: var(--focus); }
.search kbd {
  position: absolute; right: 9px; top: 8px; font: 600 11px/16px var(--font); color: var(--text-3);
  border: 1px solid var(--line); border-radius: 4px; padding: 0 5px;
}
.hits {
  position: absolute; left: 0; right: 0; top: 38px; margin: 0; padding: 4px; list-style: none;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); max-height: 60vh; overflow: auto;
}
.hits li { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: baseline; padding: 7px 9px; border-radius: 4px; cursor: pointer; }
.hits li[aria-selected='true'], .hits li:hover { background: var(--bg-3); }
.hits .sym { font-weight: 700; font-variation-settings: 'wdth' 90; }
.hits .nm { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hits .ex { color: var(--text-3); font-size: 12px; }
.hits .none { display: block; color: var(--text-2); cursor: default; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.conn { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.conn::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.conn.on::before { background: var(--long); }
.conn.off::before { background: var(--short); }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid transparent; background: none; border-radius: var(--radius); cursor: pointer; color: var(--text-2); }
.icon-btn:hover { background: var(--bg-3); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px;
  border: 1px solid var(--line-2); background: var(--bg-2); border-radius: var(--radius); cursor: pointer; font-size: 13px; white-space: nowrap;
}
.btn:hover { background: var(--bg-3); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #1b1305; font-weight: 600; }
.btn.small { height: 26px; padding: 0 8px; font-size: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.seg button { border: 0; background: none; height: 28px; padding: 0 11px; cursor: pointer; color: var(--text-2); font-size: 13px; font-weight: 600; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed='true'] { background: var(--bg-3); color: var(--text); }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 7px; border-radius: 11px; font-size: 12px; font-weight: 600; background: var(--bg-3); color: var(--text-2); white-space: nowrap; }
.chip.armed { background: var(--ink-bg); color: var(--ink); }
.chip.active { background: var(--long-bg); color: var(--long); }
.chip.active.s { background: var(--short-bg); color: var(--short); }
.chip.forming { background: transparent; border: 1px dashed var(--line-2); }
.chip.open::before, .chip.closed::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.open { color: var(--long); }
.toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--ink); margin: 0; }

/* grade colors: what the evidence says about a pattern */
.g-edge { --g: var(--long); }
.g-likely, .g-candidate { --g: color-mix(in srgb, var(--long) 55%, var(--ink)); }
.g-drift, .g-timing { --g: var(--ink); }
.g-none, .g-thin { --g: var(--text-3); }
.g-negative, .g-worse { --g: var(--short); }
.grade { display: inline-flex; align-items: center; gap: 6px; color: var(--g); font-weight: 600; font-size: 12.5px; }
.grade::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--g); }
/* version 2 candidate: pre-registered, judged by the forward test only */
.vtag { display: inline-block; margin-left: 4px; padding: 0 6px; border: 1px dashed var(--ink); border-radius: 9px; color: var(--ink); font-size: 11px; font-weight: 600; line-height: 17px; vertical-align: 1px; white-space: nowrap; }
.vnote { margin: 6px 0 0; font-size: 12px; color: var(--ink); }

/* ---------- evidence bar (a one-row forest plot) ---------- */
.ev { position: relative; height: 22px; }
.ev .axis { position: absolute; left: 0; right: 0; top: 10px; height: 1px; background: var(--line); }
.ev .zero { position: absolute; top: 3px; width: 1px; height: 15px; background: var(--text-3); }
.ev .ci { position: absolute; top: 8px; height: 5px; border-radius: 3px; background: var(--g, var(--text-2)); opacity: 0.45; }
.ev .pt { position: absolute; top: 5px; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: var(--g, var(--text)); box-shadow: 0 0 0 2px var(--bg-2); }
.ev .rnd { position: absolute; top: 5px; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; border: 2px solid var(--text-2); background: var(--bg-2); }
.ev-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.ev-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: 5px; }
.ev-legend .l-pt { background: var(--text); }
.ev-legend .l-rnd { border: 2px solid var(--text-2); }
.ev-legend .l-ci { width: 22px; height: 5px; border-radius: 3px; background: var(--text-2); opacity: 0.5; vertical-align: 1px; }

/* ---------- home ---------- */
.home { max-width: 1240px; margin: 0 auto; padding: 36px 16px 64px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(30px, 4.4vw, 50px); font-variation-settings: 'wdth' 122; font-weight: 750; max-width: 13ch; }
.hero p { color: var(--text-2); max-width: 58ch; margin: 14px 0 0; font-size: 15.5px; }
.hero .big-search input { height: 48px; font-size: 17px; padding-left: 16px; }
.hero .big-search { flex-basis: auto; }
.picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.picks button { border: 1px solid var(--line); background: var(--bg-2); border-radius: 15px; height: 28px; padding: 0 11px; cursor: pointer; font-size: 13px; font-weight: 600; font-variation-settings: 'wdth' 92; }
.picks button:hover { border-color: var(--ink); color: var(--ink); }
.picks .lbl { font-size: 12px; color: var(--text-3); align-self: center; margin-right: 4px; }
.section { padding-top: 40px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head p { margin: 6px 0 0; color: var(--text-2); max-width: 70ch; }
.forest { width: 100%; border-collapse: collapse; }
.forest th { text-align: left; font-weight: 600; font-size: 12px; color: var(--text-3); padding: 0 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.forest td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.forest td.pat { white-space: nowrap; font-weight: 600; }
.forest td.pat small { display: block; font-weight: 400; color: var(--text-3); font-size: 12px; }
.forest td.plot { width: 34%; min-width: 220px; }
.forest td.r { text-align: right; white-space: nowrap; }
.forest .scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); font-weight: 400; }
.verdict { margin: 18px 0 0; padding: 14px 16px; border-left: 3px solid var(--ink); background: var(--bg-2); max-width: 90ch; color: var(--text); }
.verdict p { margin: 0; }
.verdict p + p { margin-top: 8px; color: var(--text-2); }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; }
.board { width: 100%; border-collapse: collapse; font-variation-settings: 'wdth' 94; }
.board th { text-align: left; font-weight: 600; font-size: 12px; color: var(--text-3); padding: 0 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.board td { padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.board tbody tr { cursor: pointer; }
.board tbody tr:hover { background: var(--bg-2); }
.board td.sym b { font-variation-settings: 'wdth' 88; }
.board td.dir { width: 4px; padding: 0; }
.board td.dir::before { content: ''; display: block; width: 3px; height: 26px; border-radius: 2px; background: var(--d); }
.board tr.l { --d: var(--long); }
.board tr.s { --d: var(--short); }
.board .r { text-align: right; }
.board-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.board-tools select { height: 30px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0 8px; }
.scroll-x { overflow-x: auto; }
.empty { padding: 26px 0; color: var(--text-2); }
.board-box { max-height: 640px; overflow-y: auto; }
.board thead th { position: sticky; top: 0; background: var(--bg); z-index: 1; }
.ledger-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 4px 0 18px; }
.ledger-facts div b { display: block; font-size: 22px; font-weight: 700; font-variation-settings: 'wdth' 110; }
.ledger-facts div span { font-size: 12px; color: var(--text-2); }
.events { list-style: none; margin: 0; padding: 0; font-size: 13px; max-height: 340px; overflow: auto; }
.events li { padding: 6px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 76px 1fr; gap: 8px; }
.events time { color: var(--text-3); font-size: 12px; }
.hash { font-size: 11.5px; color: var(--text-3); word-break: break-all; }
.foot { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12.5px; max-width: 100ch; }

/* ---------- chart view ---------- */
.chartview { display: grid; grid-template-columns: minmax(0, 1fr) 388px; height: calc(100vh - 52px); }
.chart-col { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); }
.chart-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; min-height: 52px; }
.inst { display: flex; align-items: baseline; gap: 10px; min-width: 0; margin-right: auto; }
.inst .sym { font-size: 19px; font-weight: 750; font-variation-settings: 'wdth' 112; }
.inst .nm { color: var(--text-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 34ch; }
.inst .px { font-size: 17px; font-weight: 650; }
.inst .chg { font-weight: 600; }
.chart-wrap { position: relative; flex: 1 1 auto; min-height: 320px; }
#chart, #tv { position: absolute; inset: 0; }
.legend { position: absolute; left: 12px; top: 8px; z-index: 3; font-size: 12.5px; pointer-events: none; display: flex; gap: 10px; color: var(--text-2); }
.legend b { color: var(--text); font-weight: 600; }
.chart-note { position: absolute; right: 70px; top: 8px; z-index: 3; font-size: 12px; color: var(--text-3); pointer-events: none; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-2); z-index: 4; background: var(--bg); }
.drawer { border-top: 1px solid var(--line); background: var(--bg-2); }
.drawer > summary { list-style: none; cursor: pointer; padding: 9px 12px; display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 13px; }
.drawer > summary::-webkit-details-marker { display: none; }
.drawer > summary::before { content: ''; width: 0; height: 0; border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform 0.15s; }
.drawer[open] > summary::before { transform: rotate(90deg); }
.drawer .inner { max-height: 260px; overflow: auto; padding: 0 12px 10px; }
.trades { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variation-settings: 'wdth' 92; }
.trades th { text-align: left; color: var(--text-3); font-weight: 600; padding: 4px 8px; position: sticky; top: 0; background: var(--bg-2); white-space: nowrap; }
.trades td { padding: 4px 8px; border-top: 1px solid var(--line); white-space: nowrap; }
.trades tbody tr { cursor: pointer; }
.trades tbody tr:hover { background: var(--bg-3); }
.trades .r { text-align: right; }

/* ---------- side panel ---------- */
.panel { overflow-y: auto; background: var(--bg-2); }
.pblock { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.pblock > h3 { display: flex; align-items: center; justify-content: space-between; gap: 4px 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pblock > h3 .act { font-weight: 400; font-variation-settings: 'wdth' 100; }
.sig { position: relative; padding: 11px 12px 12px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); cursor: pointer; }
.sig + .sig { margin-top: 9px; }
.sig::before { content: ''; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 4px; border-radius: var(--radius) 0 0 var(--radius); background: var(--d); }
.sig.l { --d: var(--long); }
.sig.s { --d: var(--short); }
.sig.n { --d: var(--ink); }
.sig.sel { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.sig .hd { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.sig .nm { font-weight: 700; font-variation-settings: 'wdth' 106; }
.sig .sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.lv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0 8px; }
.lv div { display: flex; flex-direction: column; }
.lv span { font-size: 11.5px; color: var(--text-3); }
.lv b { font-size: 15px; font-weight: 650; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; margin: 0; }
.facts dt { color: var(--text-2); }
.facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.sig .evidence { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); }
.sig .evidence .row { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.sig .size { margin-top: 9px; padding: 8px 10px; background: var(--bg-2); border-radius: 4px; font-size: 13px; }
.sig .size b { font-size: 14px; }
.warn { margin: 8px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--text-2); }
.warn li { padding-left: 16px; position: relative; }
.warn li + li { margin-top: 3px; }
.warn li::before { content: '!'; position: absolute; left: 2px; top: 0; font-weight: 800; color: var(--short); }
.sig .acts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.none-yet { color: var(--text-2); font-size: 13.5px; }
.none-yet p { margin: 0 0 6px; }
.field { display: grid; grid-template-columns: 1fr 120px; align-items: center; gap: 8px; font-size: 13px; }
.field + .field { margin-top: 7px; }
.field input, .field select { height: 30px; width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0 8px; text-align: right; font-variant-numeric: tabular-nums; }
.mc { margin-top: 12px; font-size: 13px; }
.mc table { width: 100%; border-collapse: collapse; }
.mc td { padding: 3px 0; }
.mc td + td { text-align: right; font-variant-numeric: tabular-nums; }
.mini-forest td { padding: 6px 0; vertical-align: middle; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.mini-forest { width: 100%; border-collapse: collapse; }
.mini-forest td.plot { width: 46%; padding: 6px 8px; }
.mini-forest td.r { text-align: right; white-space: nowrap; }
.note { font-size: 12px; color: var(--text-3); margin: 8px 0 0; }
.tabs { display: inline-flex; gap: 2px; }

/* ---------- top bar: watchlist link and the bell ---------- */
.top-nav { display: flex; gap: 4px; }
.navlink { text-decoration: none; color: var(--text-2); font-weight: 600; font-size: 13.5px; padding: 6px 10px; border-radius: var(--radius); }
.navlink:hover { color: var(--text); background: var(--bg-3); }
.navlink[aria-current='true'] { color: var(--text); background: var(--bg-3); }
.bell { position: relative; }
.bell .badge { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--ink); color: #1b1305; font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; }
.inbox {
  position: absolute; right: 12px; top: 48px; z-index: 30; width: min(420px, calc(100vw - 24px)); max-height: min(70vh, 640px);
  display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
.ib-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ib-head span { display: flex; gap: 6px; }
.ib-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.ib-list li { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px 10px 18px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.ib-list li::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 2px 2px 0; background: var(--d, var(--line-2)); }
.ib-list li.l { --d: var(--long); }
.ib-list li.s { --d: var(--short); }
.ib-list li.n { --d: var(--ink); }
.ib-list li.k-watch { --d: var(--line-2); }
.ib-list li:hover, .ib-list li:focus-visible { background: var(--bg-3); }
.ib-list li b { font-weight: 600; }
.ib-list li.unread b { font-weight: 750; }
.ib-list li.unread .ib-kind::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--ink); vertical-align: 1px; }
.ib-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); }
.ib-body { color: var(--text-2); }
.ib-empty { padding: 18px 14px; margin: 0; color: var(--text-2); font-size: 13.5px; }
.ib-foot { display: block; padding: 10px 14px; font-size: 12.5px; color: var(--text-2); text-decoration: none; border-top: 1px solid var(--line); }
.ib-foot:hover { color: var(--text); }
.toast a { text-decoration: none; color: inherit; display: block; }

/* ---------- watch button on the chart ---------- */
.watch-btn svg { width: 15px; height: 15px; }
.watch-btn[aria-pressed='true'] { color: var(--ink); border-color: var(--ink); }
.btn.danger { color: var(--short); }
.btn.danger:hover { background: var(--short-bg); }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ---------- watchlist page ---------- */
.watchview { max-width: 1240px; margin: 0 auto; padding: 32px 16px 64px; }
.wl-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.wl-top h1 { font-size: clamp(28px, 3.6vw, 40px); font-variation-settings: 'wdth' 120; }
.wl-top p { color: var(--text-2); max-width: 64ch; margin: 10px 0 0; }
.wl-push { padding: 14px 16px; background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--ink); border-radius: var(--radius); font-size: 13.5px; }
.wl-push p { margin: 0 0 8px; }
.wl-push p.faint { margin: 10px 0 0; font-size: 12.5px; }
.wl-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.wl-add { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 28px 0 18px; }
.wl-add .search { flex: 1 1 360px; max-width: 520px; }
.wl-add .search input { height: 40px; font-size: 15px; }
.wl-addtfs { display: flex; gap: 8px; align-items: center; }
.wl-list { display: grid; gap: 10px; }
.wl-empty { padding: 28px 0; color: var(--text-2); }
.wl-empty p { margin: 0 0 6px; }
.wl-item { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.wl-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
.wl-sym { font-size: 18px; font-weight: 750; font-variation-settings: 'wdth' 110; text-decoration: none; }
.wl-sym:hover { color: var(--ink); }
.wl-nm { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34ch; }
.wl-px { font-weight: 600; }
.wl-flags { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.wl-bell { color: var(--text-3); }
.wl-bell.on { color: var(--ink); }
.wl-rows { border-top: 1px solid var(--line); }
.wl-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 9px 14px; }
.wl-row + .wl-row { border-top: 1px dashed var(--line); }
.wl-tf { font-weight: 700; text-decoration: none; color: var(--text-2); padding-top: 2px; }
.wl-tf:hover { color: var(--text); }
.wl-sigs { display: grid; gap: 4px; font-size: 13.5px; }
.wl-when { font-size: 12px; white-space: nowrap; padding-top: 3px; }
.wl-sig { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 4px 8px 4px 12px; border-radius: 4px; text-decoration: none; }
.wl-sig::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 2px; background: var(--d); }
.wl-sig.l { --d: var(--long); }
.wl-sig.s { --d: var(--short); }
.wl-sig:hover { background: var(--bg-3); }
.wl-sig b { font-weight: 650; }
.wl-edit { border-top: 1px solid var(--line); padding: 12px 14px 14px; display: grid; gap: 12px; }
.wl-edit fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.wl-edit legend { font-weight: 650; font-size: 13px; margin-bottom: 6px; padding: 0; width: 100%; }
.wl-edit .toggle { color: var(--text); }
.wl-edit .note { width: 100%; margin: 2px 0 0; }
.wl-hours { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.wl-hours input { height: 30px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0 6px; }
.wl-days { display: inline-flex; gap: 3px; }
.day input { position: absolute; opacity: 0; pointer-events: none; }
.day span { display: inline-grid; place-items: center; width: 30px; height: 28px; border: 1px solid var(--line-2); border-radius: 4px; font-size: 12px; font-weight: 600; color: var(--text-3); cursor: pointer; }
.day input:checked + span { background: var(--ink-bg); border-color: var(--ink); color: var(--ink); }
.day input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }

@media (max-width: 900px) {
  .wl-top { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .wl-row { grid-template-columns: 44px minmax(0, 1fr); }
  .wl-when { grid-column: 2; padding-top: 0; }
}
@media (max-width: 640px) {
  .navlink { padding: 6px; font-size: 13px; }
  .wl-nm { display: none; }
}

/* ---------- sign-in page ---------- */
.login { min-height: 100vh; display: grid; place-content: center; gap: 24px; padding: 16px; }
.login .brand { font-size: 20px; }
.login .brand svg { width: 28px; height: 28px; }
.login form { display: grid; gap: 10px; width: min(340px, calc(100vw - 32px)); }
.login label { font-size: 13px; color: var(--text-2); }
.login input { height: 42px; padding: 0 12px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius); outline: none; }
.login input:focus { border-color: var(--focus); }
.login .btn { height: 40px; justify-content: center; font-size: 14px; }
.login .err { margin: 0; color: var(--short); font-size: 13px; }

/* ---------- dialog, toasts ---------- */
.dlg { border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); color: var(--text); max-width: 640px; width: calc(100% - 32px); padding: 0; }
.dlg::backdrop { background: rgba(5, 10, 16, 0.55); }
.dlg .dh { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dlg .db { padding: 14px 18px 18px; max-height: 70vh; overflow: auto; }
.dlg ol, .dlg ul { padding-left: 20px; margin: 6px 0 12px; }
.dlg li + li { margin-top: 5px; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--bg-3); border: 1px solid var(--line-2); border-left: 3px solid var(--ink); border-radius: var(--radius); padding: 10px 14px; max-width: 360px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3); font-size: 13.5px; animation: toast-in 0.2s ease-out; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- small screens ---------- */
@media (max-width: 1080px) {
  .hero, .cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 900px) {
  .chartview { display: block; height: auto; }
  .chart-col { border-right: 0; }
  .chart-wrap { height: 62vh; flex: none; }
  .panel { overflow: visible; }
  .inst .nm { display: none; }
}
@media (max-width: 640px) {
  .top { gap: 10px; }
  .brand span { display: none; }
  .search kbd, .conn { display: none; }
  .home { padding-top: 24px; }
  .forest td.plot { min-width: 150px; }
  .forest .hide-s, .board .hide-s { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
