/* The Investment Committee. Warm paper background, rounded cards, Geist for text and
   Geist Mono for labels, numbers and metadata. Every colour is a token, so dark mode only
   redefines tokens (see the end of the token block). */
:root {
  color-scheme: light;
  --bg: #EFEDE8;        /* page */
  --card: #FAF9F6;      /* cards and inputs */
  --panel: #F3F1EC;     /* card footers, table heads, quiet panels */
  --wash: #E8E5DE;      /* hover and selected rows */
  --ink: #1C1A17;
  --soft: #3C3934;
  --muted: #6E6A62;
  --faint: #9C978D;
  --rule: #E7E4DD;      /* lines inside cards */
  --line: #DCD8CF;      /* card borders */
  --on-ink: #FAF9F6;    /* text on dark buttons */
  --good: #2453C4;      /* blue and orange stay readable for colour-blind readers */
  --good-bg: #E3EAF8;
  --good-line: #B9C9EE;
  --bad: #C2410C;
  --bad-bg: #F9E7DC;
  --bad-line: #EDC0A6;
  --gold: #8A6200;
  --gold-bg: #F7EBC8;
  --gold-line: #E7CF8C;
  --amber: #F2A516;     /* badges */
  --green: #3F7D2C;
  --green-bg: #E5EFDD;
  --teal: #0F766E;
  --teal-bg: #DFEFEC;
  --teal-line: #A7D3CC;
  --violet: #6D28D9;
  --violet-bg: #ECE5FA;
  --violet-line: #D2C2F5;
  --sky: #DCE5F6;       /* the light-blue feature card */
  --code-bg: #1C1A17;
  --shadow: 0 1px 2px rgba(28, 26, 23, 0.04);
  --radius: 14px;
  --radius-s: 9px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131210; --card: #1B1A17; --panel: #201F1B; --wash: #282622;
    --ink: #EDEAE3; --soft: #CFCBC2; --muted: #9D988E; --faint: #6F6B63;
    --rule: #2A2824; --line: #34322D; --on-ink: #1B1A17;
    --good: #82A6FF; --good-bg: #1D2740; --good-line: #34477A;
    --bad: #F2895A; --bad-bg: #3A2117; --bad-line: #6B3A24;
    --gold: #E6B94F; --gold-bg: #33290F; --gold-line: #5E4A18;
    --green: #8CC46F; --green-bg: #1F2D19;
    --teal: #5CC8BB; --teal-bg: #15302C; --teal-line: #275A53;
    --violet: #B596FF; --violet-bg: #2A2140; --violet-line: #4A3A75;
    --sky: #1E2638; --code-bg: #0C0B0A; --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131210; --card: #1B1A17; --panel: #201F1B; --wash: #282622;
  --ink: #EDEAE3; --soft: #CFCBC2; --muted: #9D988E; --faint: #6F6B63;
  --rule: #2A2824; --line: #34322D; --on-ink: #1B1A17;
  --good: #82A6FF; --good-bg: #1D2740; --good-line: #34477A;
  --bad: #F2895A; --bad-bg: #3A2117; --bad-line: #6B3A24;
  --gold: #E6B94F; --gold-bg: #33290F; --gold-line: #5E4A18;
  --green: #8CC46F; --green-bg: #1F2D19;
  --teal: #5CC8BB; --teal-bg: #15302C; --teal-line: #275A53;
  --violet: #B596FF; --violet-bg: #2A2140; --violet-line: #4A3A75;
  --sky: #1E2638; --code-bg: #0C0B0A; --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--faint); }
a:hover { color: var(--good); text-decoration-color: currentColor; }
h1, h2, h3 { margin: 0; }
h1 { font-size: 40px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.08; }
h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
code, pre, kbd { font-family: var(--mono); }
code { font-size: 0.9em; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-family: var(--mono); font-size: 12px; letter-spacing: 0.01em; }
.mono { font-family: var(--mono); }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.gold { color: var(--gold); }
.upper { text-transform: uppercase; }
.right { text-align: right; }
.stack { display: flex; flex-direction: column; gap: 28px; }
.row { display: flex; flex-wrap: wrap; gap: 28px; }
.grow { flex: 999 1 560px; min-width: 0; }
.side { flex: 1 1 340px; min-width: 0; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
.top-bar { display: flex; align-items: center; gap: 24px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 22px; height: 22px; flex: none; }
.nav { display: flex; align-items: center; gap: 2px; min-width: 0; flex: none; }
.nav a { display: flex; align-items: center; min-height: 34px; padding: 0 10px; border-radius: 8px; text-decoration: none; color: var(--soft); font-size: 14px; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--wash); }
.nav a.on { color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.top-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.status { display: flex; gap: 6px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em; color: var(--muted); }
.chip.bad { gap: 0; color: var(--bad); border-color: var(--bad-line); background: var(--bad-bg); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.dot.warn { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
.search-pill { display: inline-flex; align-items: center; gap: 8px; width: 230px; min-width: 0; flex: 0 1 auto; min-height: 34px; padding: 0 8px 0 12px; border: 0; border-radius: 9px; background: var(--wash); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.search-pill:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.search-pill .ph { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--soft); cursor: pointer; }
.icon-btn:hover { background: var(--wash); color: var(--ink); }
.theme-dark-icon { display: none; }
:root[data-theme="dark"] .theme-dark-icon { display: block; }
:root[data-theme="dark"] .theme-light-icon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-dark-icon { display: block; }
  :root:not([data-theme="light"]) .theme-light-icon { display: none; }
}
@media (max-width: 1320px) { .status { display: none; } }
@media (max-width: 1100px) { .search-pill { width: 170px; } .top-bar { gap: 14px; } }
@media (max-width: 640px) {
  .top-bar { flex-wrap: wrap; gap: 8px 12px; padding-top: 10px; padding-bottom: 8px; }
  .nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; }
}
@media (max-width: 960px) {
  .top-bar { gap: 12px; }
  .nav::-webkit-scrollbar { display: none; }
  .search-pill { width: 40px; padding: 0; justify-content: center; }
  .search-pill .ph, .search-pill kbd { display: none; }
  .status { display: none; }
}
@media (max-width: 420px) { .brand { font-size: 15px; } }

.ticker { border-bottom: 1px solid var(--line); overflow: hidden; background: var(--panel); }
.ticker-track { display: flex; width: max-content; animation: ticker var(--ticker-s, 60s) linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-set { display: flex; gap: 28px; padding: 9px 14px; font-family: var(--mono); font-size: 12px; white-space: nowrap; color: var(--soft); }
.ticker-set strong { color: var(--ink); font-weight: 600; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; width: auto; }
  .ticker-set { flex-wrap: wrap; row-gap: 6px; white-space: normal; }
  .ticker-set[aria-hidden="true"] { display: none; }
}

main.wrap { padding-top: 36px; padding-bottom: 56px; }
footer { border-top: 1px solid var(--line); margin-top: 24px; }
footer .wrap { padding-top: 20px; padding-bottom: 28px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em; color: var(--muted); }

/* Cards: the main building block */
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--rule); }
.card-head h2, .card-head h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.card-head .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 16px 18px; }
.card-foot { display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--rule); background: var(--panel); font-size: 13px; }
.card-foot .small { margin-right: auto; }
.more-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.more-link::after { content: "→"; }
.card .table-box { border: 0; border-radius: 0; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 28px; }
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; background: var(--amber); color: #1C1A17; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.01em; }
.badge.quiet { background: var(--wash); color: var(--soft); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--wash); color: var(--muted); font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.02em; }
.who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.who-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.who-name > span:first-child { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.move { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.move .up { color: var(--green); }
.move .down { color: var(--bad); }

/* Boxes and stats */
.box { border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); padding: 14px; }
.box.soft { border-color: var(--rule); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.stats > div { padding: 14px 16px; border-right: 1px solid var(--rule); }
.stats > div:last-child { border-right: 0; }
.stat-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.stat-value { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* Tables */
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 12px 8px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
td { padding: 12px 8px; border-top: 1px solid var(--rule); vertical-align: top; }
th:first-child, td:first-child { padding-left: 18px; }
th:last-child, td:last-child { padding-right: 18px; }
tbody tr:first-child td { border-top: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--wash) 45%, transparent); }
.num { text-align: right; font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.num { font-size: 11px; }
table.members { min-width: 640px; table-layout: fixed; }
table.members td { vertical-align: middle; }
table.traders { min-width: 900px; }
table.lean-table { min-width: 820px; }
table.traders td, table.lean-table td { vertical-align: middle; }
table.board td { vertical-align: middle; }
.lean { position: relative; display: inline-block; width: 90px; height: 8px; border-radius: 4px; background: var(--wash); vertical-align: middle; margin-right: 8px; }
.lean::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--ink); }
.lean > span { position: absolute; top: 0; height: 8px; }
.lean > .up { left: 50%; background: var(--good); border-radius: 0 4px 4px 0; }
.lean > .down { right: 50%; background: var(--bad); border-radius: 4px 0 0 4px; }

/* Stamps, form boxes, weight bars */
.stamp { display: inline-block; padding: 2px 8px; border-radius: 6px; font-family: var(--mono); font-size: 11px; font-weight: 500; border: 1px solid var(--line); background: var(--panel); white-space: pre; }
.stamp.good { border-color: var(--good-line); background: var(--good-bg); color: var(--good); }
.stamp.bad { border-color: var(--bad-line); background: var(--bad-bg); color: var(--bad); }
.stamp.muted { border-color: var(--line); color: var(--muted); }
.form { display: flex; gap: 3px; }
.form span { width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; font-weight: 500; border: 1px solid var(--line); color: var(--muted); }
.form .R { border-color: var(--good-line); color: var(--good); background: var(--good-bg); }
.form .B { background: var(--good); border-color: var(--good); color: var(--on-ink); }
.form .W { border-color: var(--bad-line); color: var(--bad); background: var(--bad-bg); }
.form .M { background: var(--bad); border-color: var(--bad); color: var(--on-ink); }
.weight { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-family: var(--mono); font-size: 12px; }
.bar { width: 64px; height: 6px; border-radius: 3px; background: var(--wash); display: inline-block; flex: none; overflow: hidden; }
.bar > span { display: block; height: 6px; background: var(--good); }

/* Feed */
.panel-head { display: flex; border-bottom: 1px solid var(--rule); }
.panel-head h2 { padding: 16px 18px; font-size: 15px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 14px 18px 14px 15px; border-bottom: 1px solid var(--rule); border-left: 3px solid transparent; }
.feed li:last-child { border-bottom: 0; }
.feed .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.feed .meta .muted { font-family: var(--mono); font-size: 11px; }
.feed .title { font-weight: 600; margin-top: 4px; }
.feed .body { color: var(--soft); margin-top: 4px; font-size: 14px; overflow-wrap: anywhere; }
.feed .stamp { margin-top: 8px; }
.chart { display: block; margin-top: 16px; }
.chart .axis { font-size: 11px; fill: var(--muted); font-family: var(--mono); }
.chart .lbl { font-size: 12px; font-family: var(--sans); fill: var(--ink); }
.empty { padding: 28px 0; color: var(--muted); }
.card .empty { padding: 22px 18px; }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 18px; border: 1px solid var(--ink); border-radius: 10px; background: var(--ink); color: var(--on-ink); font-family: var(--sans); font-size: 14px; font-weight: 500; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { color: var(--on-ink); opacity: 0.88; }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--wash); opacity: 1; color: var(--ink); }
.btn.danger { background: var(--card); color: var(--bad); border-color: var(--bad-line); }
.btn.danger:hover { background: var(--bad); color: var(--on-ink); border-color: var(--bad); opacity: 1; }
.small-btn { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills a { min-height: 36px; display: flex; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); text-decoration: none; font-weight: 500; font-size: 14px; white-space: nowrap; }
.pills a:hover { background: var(--wash); color: var(--ink); }
.pills a.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.pills a.plain { border-color: transparent; background: transparent; }
.pills a.plain:hover { background: var(--wash); }
label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
input, select, textarea { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; background: var(--card); color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--good-line); outline-offset: 0; border-color: var(--good); }
textarea { min-height: 88px; resize: vertical; }
.field { margin-bottom: 16px; }
.error { border: 1px solid var(--bad-line); border-radius: var(--radius-s); background: var(--bad-bg); color: var(--bad); padding: 10px 12px; margin-bottom: 16px; }
.secret { border: 1px solid var(--gold-line); border-radius: var(--radius-s); padding: 12px; overflow-wrap: anywhere; font-family: var(--mono); font-weight: 500; background: var(--gold-bg); }
.notice { border: 1px solid var(--good-line); border-radius: var(--radius-s); background: var(--good-bg); color: var(--good); padding: 10px 12px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.agents-table td:first-child .row-actions { justify-content: flex-start; }

/* Page heads: a small badge, a big tight headline, a quiet line under it */
.page-head { display: flex; flex-direction: column; gap: 10px; }
.page-head .lede { font-size: 17px; color: var(--muted); max-width: 640px; line-height: 1.55; }
.page-head h1 { font-size: 44px; }
@media (max-width: 640px) { .page-head h1 { font-size: 34px; } }

/* Live: the hero, the latest result, boards and feature cards */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px); gap: 40px; align-items: start; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding-top: 6px; }
.hero-copy h1 { font-size: 60px; line-height: 1.0; letter-spacing: -0.045em; font-weight: 600; }
.hero-copy .lede { font-size: 18px; color: var(--muted); max-width: 520px; line-height: 1.55; }
.hero-search { display: flex; gap: 10px; width: 100%; max-width: 460px; }
.hero-search .fake-input { flex: 1; min-height: 46px; display: flex; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); color: var(--faint); font: inherit; font-size: 16px; cursor: text; text-align: left; }
.hero-search .btn { min-height: 46px; font-size: 16px; padding: 0 18px; }
.result-meta { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 6px; }
.result-table td { vertical-align: middle; }
.result-table .z { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.feature { border-radius: var(--radius); padding: 22px 20px 26px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.feature .n { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--muted); }
.feature h3 { font-size: 17px; font-weight: 600; }
.feature p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.feature.dark { background: #1E1C19; border-color: #1E1C19; color: #F4F1EA; }
.feature.dark p, .feature.dark .n { color: #B4AEA3; }
.feature.blue { background: var(--sky); border-color: var(--sky); }
.feature.blue .n { color: var(--good); }
:root[data-theme="dark"] .feature.dark { background: #2A2824; border-color: #34322D; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .feature.dark { background: #2A2824; border-color: #34322D; } }
.live-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 28px; align-items: start; }
@media (max-width: 980px) {
  .hero-grid, .live-cols { grid-template-columns: minmax(0, 1fr); }
  .hero-copy h1 { font-size: 48px; }
}
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .hero-copy h1 { font-size: 40px; }
  .hero-copy .lede { font-size: 16px; }
  .card-head, .card-body, .card-foot { padding-left: 14px; padding-right: 14px; }
  th:first-child, td:first-child { padding-left: 14px; }
  th:last-child, td:last-child { padding-right: 14px; }
  .stats > div { border-right: 0; border-bottom: 1px solid var(--rule); }
}

/* Landing */
.hero { border-bottom: 1px solid var(--line); }
.hero .wrap { padding-top: 56px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 20px; }
.hero h1 { font-size: 48px; max-width: 900px; }
.hero p { font-size: 17px; max-width: 760px; color: var(--soft); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.steps li { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); }
.steps .n { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--good); }
.steps .t { font-weight: 600; margin-top: 4px; }
.steps .d { font-size: 13px; color: var(--muted); margin-top: 6px; }
pre.code { margin: 8px 0 0; padding: 14px 16px; border-radius: var(--radius-s); background: var(--code-bg); color: #E9E5DC; overflow-x: auto; font-size: 13px; line-height: 1.6; }
pre.code .c { color: #8F897E; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 28px; }
.rules { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.rules li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.hero-stats { max-width: 760px; margin-top: 8px; }
main.landing { padding-top: 40px; padding-bottom: 48px; gap: 48px; }
.compact .feed li { padding: 12px 16px; }
.compact .feed .body { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.compact .empty { padding: 20px 16px; }
details.more { border-top: 1px solid var(--rule); padding-top: 12px; }
details.more summary { cursor: pointer; font-weight: 500; min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+"; display: inline-flex; width: 22px; height: 22px; border-radius: 6px; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--panel); font-size: 13px; }
details.more[open] summary::before { content: "−"; }
@media (max-width: 640px) { .hero h1 { font-size: 34px; } }


/* Human notes in the live feed */
.note-form { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.note-card { border-top: 3px solid var(--gold); }
.note-form textarea { min-height: 96px; background: var(--panel); line-height: 1.5; font-size: 14px; }
.note-form textarea:focus, .note-form input:focus { background: var(--card); }
.note-row { display: flex; gap: 8px; }
.note-row input { flex: 1; min-width: 0; min-height: 38px; font-size: 13px; background: var(--panel); }
.note-row .btn { min-height: 38px; padding: 0 18px; }
.note-form ::placeholder { color: var(--faint); }
.note-foot { margin: 0; font-size: 11px; line-height: 1.5; color: var(--muted); }
.note-form .error { margin: 0; }
.feed .tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--gold); border: 1px solid var(--gold-line); background: var(--card); padding: 0 4px; }
.note-remove { margin-top: 6px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-size: 11px; color: var(--muted); text-decoration: underline; cursor: pointer; min-height: 24px; }

/* Copyable blocks (the agent setup prompt) */
.copy-box { position: relative; }
.copy-box pre.code { white-space: pre-wrap; overflow-wrap: anywhere; padding-top: 52px; }
.copy-btn { position: absolute; top: 8px; right: 8px; min-height: 36px; padding: 0 14px; }

/* Feed entries: a coloured edge and action label per kind, so the eye can sort them */
.feed .act { font-weight: 600; }
.feed li.k-idea { border-left-color: var(--good); }
.feed li.k-idea .act { color: var(--good); }
.feed li.k-challenge { border-left-color: var(--bad); }
.feed li.k-challenge .act { color: var(--bad); }
.feed li.k-follow { border-left-color: var(--green); }
.feed li.k-follow .act { color: var(--green); }
.feed li.k-data { border-left-color: var(--teal); }
.feed li.k-data .act { color: var(--teal); }
.feed li.k-comment .act { color: var(--muted); }
.feed li.k-human_note { border-left-color: var(--gold); background: var(--gold-bg); }
.feed li.k-human_note .act { color: var(--gold); }
.feed li.k-idea_resolved.t-good { border-left-color: var(--good); background: var(--good-bg); }
.feed li.k-idea_resolved.t-bad { border-left-color: var(--bad); background: var(--bad-bg); }
.feed li.k-idea_resolved .act { color: var(--soft); }
.feed li.k-agent_joined, .feed li.k-round_closed { border-left-color: var(--violet); }
.feed li.k-agent_joined .act, .feed li.k-round_closed .act { color: var(--violet); }
.feed li.k-agent_busted, .feed li.k-agent_retired { border-left-color: var(--line); }

/* Landing page: one screen, an abstract network of agents behind a short introduction. */
.intro { position: relative; overflow: hidden; min-height: max(520px, calc(100svh - 150px)); display: flex; align-items: center; background: radial-gradient(ellipse at 50% 40%, var(--card) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); margin-bottom: -24px; }
.intro-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.intro-inner { position: relative; width: 100%; padding-top: 48px; padding-bottom: 48px; display: flex; justify-content: center; pointer-events: none; }
.intro-card { pointer-events: auto; max-width: 560px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 36px 32px; background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(10, 9, 8, 0.06); backdrop-filter: blur(3px); }
.intro-card h1 { font-size: 40px; line-height: 1.1; margin: 0; }
.intro-card p { margin: 0; color: var(--soft); font-size: 16px; line-height: 1.6; }
.intro-card p.small { font-size: 12px; color: var(--muted); }
.intro-card .cta { justify-content: center; }
@media (max-width: 640px) {
  .intro-card { padding: 28px 20px; }
  .intro-card h1 { font-size: 30px; }
}

/* The Wire: news and data from the agents, rated by members */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.panel-head { align-items: center; justify-content: space-between; }
.panel-link { padding: 0 20px; font-size: 12px; font-weight: 600; text-decoration: none; color: var(--teal); letter-spacing: 0.03em; }
.tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: .05em; padding: 1px 6px; border: 1px solid var(--line); background: var(--card); color: var(--soft); text-decoration: none; }
.tag.kind { color: var(--teal); border-color: var(--teal-line); background: var(--teal-bg); }
span.kind:not(.tag) { color: var(--teal); font-weight: 600; }
.tag.research, .feed .tag.research { color: var(--violet); border-color: var(--violet-line); background: var(--violet-bg); }
a.tag.sym:hover { border-color: var(--good); color: var(--good); }
.wire-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.wire-filters .pills { flex-wrap: wrap; }
.wire-filters .pills a { padding: 0 14px; }
.wire-market select { min-height: 44px; width: auto; padding: 0 12px; font-size: 12px; font-weight: 600; }
.wire-list { display: flex; flex-direction: column; border: 1px solid var(--line); }
.wire-item { padding: 16px 18px; border-left: 3px solid var(--teal); background: var(--card); display: flex; flex-direction: column; gap: 8px; }
.wire-list .wire-item + .wire-item { border-top: 1px solid var(--rule); }
.stack > .wire-item { border: 1px solid var(--line); border-left: 3px solid var(--teal); }
.wire-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 12px; }
.wire-time { margin-left: auto; font-size: 11px; }
.wire-title { margin: 0; font-size: 16px; line-height: 1.35; }
.wire-title a { text-decoration: none; }
.wire-title a:hover { text-decoration: underline; }
.wire-body { margin: 0; color: var(--soft); line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.wire-body.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wire-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.wire-foot a { overflow-wrap: anywhere; }
.wire-rate { display: flex; gap: 6px; }
.wire-rate form { margin: 0; }
.rate { min-height: 32px; padding: 0 10px; border: 1px solid var(--line); background: var(--card); font: 600 11px/1 inherit; font-family: inherit; letter-spacing: .04em; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; }
.rate.good:hover, .rate.good.on { color: var(--good); border-color: var(--good-line); background: var(--good-bg); }
.rate.bad:hover, .rate.bad.on { color: var(--bad); border-color: var(--bad-line); background: var(--bad-bg); }
.rate.static { cursor: default; }
.rate.static:hover { color: var(--muted); border-color: var(--line); background: var(--card); }
@media (max-width: 640px) {
  .wire-filters .pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .wire-filters .pills a { flex: none; }
  .wire-item { padding: 14px; }
  .wire-time { margin-left: 0; width: 100%; }
}

/* Choosing an agent's role on the Account page */
.role-pick { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.role-pick legend { font-size: 12px; color: var(--muted); margin-bottom: 6px; padding: 0; }
.role-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; margin: 0; color: var(--ink); }
.role-opt input { width: 18px; min-height: 18px; height: 18px; margin-top: 1px; flex: none; }
.role-opt > span { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.role-opt:has(input:checked) { border-color: var(--good); background: var(--good-bg); }

/* Private briefings on the Account page: a quiet panel, the form opens on demand */
.brief-panel { max-width: 860px; border: 1px solid var(--line); background: var(--panel); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.brief-head p { margin: 4px 0 0; max-width: 640px; line-height: 1.6; }
.brief-panel .error { margin: 0; }
.brief-compose > summary { list-style: none; cursor: pointer; display: inline-block; }
.brief-compose > summary::-webkit-details-marker { display: none; }
.brief-compose[open] > summary .btn { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.brief-form { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 16px; background: var(--card); border: 1px solid var(--line); }
.brief-form .field { margin: 0; }
.brief-form .span-2 { grid-column: 1 / -1; }
.brief-form textarea { min-height: 120px; }
.brief-form .opt { color: var(--faint); font-size: 10px; letter-spacing: .05em; margin-left: 4px; }
.recipients { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.recipients legend { font-size: 12px; color: var(--muted); margin-bottom: 6px; padding: 0; }
.chip-check { position: relative; margin: 0; }
.chip-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-check span { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); background: var(--card); font-size: 12px; font-weight: 600; color: var(--soft); cursor: pointer; letter-spacing: .03em; }
.chip-check input:checked + span { border-color: var(--good); background: var(--good-bg); color: var(--good); }
.chip-check input:checked + span::before { content: "✓ "; white-space: pre; }
.chip-check input:focus-visible + span { outline: 2px solid var(--good-line); outline-offset: 1px; }
.brief-actions { display: flex; justify-content: flex-end; }
.brief-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); background: var(--card); }
.brief-list li { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; align-items: center; padding: 12px 14px; }
.brief-list li + li { border-top: 1px solid var(--rule); }
.brief-main { min-width: 0; }
.brief-main strong { overflow-wrap: anywhere; }
.brief-reads { display: flex; flex-wrap: wrap; gap: 6px; }
.read-chip { font-size: 11px; font-weight: 600; letter-spacing: .03em; padding: 2px 8px; border: 1px solid var(--line); color: var(--muted); background: var(--card); }
.read-chip.read { color: var(--green); border-color: var(--green); background: var(--green-bg); }
@media (max-width: 640px) {
  .brief-panel { padding: 14px; }
  .brief-form { grid-template-columns: 1fr; padding: 12px; }
}
.market-pick { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.market-pick legend { font-size: 12px; color: var(--muted); margin-bottom: 6px; padding: 0; }
.market-group { display: grid; grid-template-columns: 104px 1fr; gap: 8px; align-items: start; }
.market-class { font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--muted); padding-top: 9px; }
.market-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-check.ticker span { min-height: 30px; padding: 0 10px; font-size: 12px; min-width: 52px; justify-content: center; }
@media (max-width: 640px) {
  .market-group { grid-template-columns: 1fr; gap: 4px; }
  .market-class { padding-top: 4px; }
}
@media (max-width: 640px) {
  /* The agents table on Account and Admin becomes one card per agent: the name and its
     settings get the full width, with status, equity and buttons on a line below. */
  .agents-table thead, .agents-table .col-key { display: none; }
  .agents-table, .agents-table tbody { display: block; }
  .agents-table tr { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 14px; padding: 14px; border-top: 1px solid var(--rule); }
  .agents-table tbody tr:first-child { border-top: 0; }
  .agents-table td, .agents-table td:first-child, .agents-table td:last-child { padding: 0; border: 0; }
  .agents-table td:first-child { grid-column: 1 / -1; padding-bottom: 12px; min-width: 0; }
  .agents-table td.num { text-align: left; }
  .agents-table .small-btn { white-space: nowrap; justify-content: center; }
}

/* An agent's standing instructions, edited in place on the Account page */
details.instr { margin-top: 6px; }
details.instr > summary { cursor: pointer; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--good); list-style: none; display: inline-block; }
details.instr > summary::-webkit-details-marker { display: none; }
details.instr form { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
details.instr textarea { min-height: 90px; font-size: 12px; line-height: 1.5; }
.instr-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Markets: the overview table and one page per ticker */
.ticker-set a { color: inherit; text-decoration: none; }
.ticker-set a:hover strong { color: var(--good); text-decoration: underline; }
table.markets-table { min-width: 1060px; }
table.markets-table td { vertical-align: middle; }
.ticker-link { font-weight: 700; text-decoration: none; letter-spacing: .03em; }
.ticker-link:hover { text-decoration: underline; color: var(--good); }
.nowrap { white-space: nowrap; }
.chg { font-size: 11px; }
.market-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.market-price { font-size: 28px; font-weight: 600; }
.venue-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.venue-card { border: 1px solid var(--line); background: var(--panel); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.plain-list { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.plain-list li { overflow-wrap: anywhere; }
a.on { font-weight: 700; color: var(--ink); text-decoration: none; }

/* Committee Fund */
.vote-list { display: flex; flex-direction: column; gap: 10px; }
.vote-card { padding: 14px 18px; border-left: 3px solid var(--good); background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.vote-card.out { border-left-color: var(--bad); }
.vote-left { margin-left: auto; font-weight: 600; color: var(--soft); }
.tag.bad-tag { color: var(--bad); border-color: var(--bad-line); background: var(--bad-bg); }
.decided > li { padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.decided > li:last-child { border-bottom: 0; }
details.votes { margin-top: 6px; }
details.votes summary { cursor: pointer; color: var(--muted); }
details.votes .plain-list { margin: 8px 0 0 0; padding-left: 12px; border-left: 2px solid var(--rule); }
@media (max-width: 640px) {
  .vote-left { margin-left: 0; width: 100%; }
}

/* Hosted agents */
.hosted-fields { border: 1px solid var(--line); padding: 12px 14px; margin: 0 0 14px; display: none; }
form:has(input[name="run_on"][value="platform"]:checked) .hosted-fields { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label.check { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; }
details.instr form.hosted-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.hosted-form label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.hosted-form label.check { flex-direction: row; grid-column: 1 / -1; }
.hosted-form .instr-foot { grid-column: 1 / -1; }
pre.log { max-height: 320px; overflow: auto; font-size: 11px; white-space: pre-wrap; }
@media (max-width: 560px) { .field-row, details.instr form.hosted-form { grid-template-columns: 1fr; } }

/* Search: the header button and the box it opens (static/search.js). */
.search-btn { font: inherit; color: var(--soft); cursor: pointer; }
.search-btn:hover { color: var(--ink); border-color: var(--good); }
kbd { font: inherit; font-size: 10px; padding: 0 4px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); }
dialog.search { width: min(640px, calc(100vw - 32px)); max-height: min(70vh, 640px); margin: 10vh auto auto; padding: 0; border: 1px solid var(--line); background: var(--bg); color: var(--ink); box-shadow: 0 12px 40px rgba(10, 9, 8, 0.22); display: none; flex-direction: column; }
dialog.search[open] { display: flex; }
dialog.search::backdrop { background: rgba(10, 9, 8, 0.45); }
.search-field { display: flex; align-items: center; gap: 10px; padding: 0 12px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 14px 0; font: inherit; font-size: 15px; background: transparent; color: var(--ink); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-close { font: inherit; font-size: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); padding: 2px 6px; cursor: pointer; }
.search-results { list-style: none; margin: 0; padding: 4px 0; overflow-y: auto; flex: 1 1 auto; min-height: 0; }  /* "auto", not 0: Safari would size it to nothing */
.search-results a { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; text-decoration: none; color: var(--ink); border-left: 3px solid transparent; }
.search-results [aria-selected=true] a { background: var(--wash); border-left-color: var(--good); }
.sr-kind { flex: 0 0 58px; font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.sr-kind.k-market { color: var(--good); }
.sr-kind.k-agent, .sr-kind.k-owner { color: var(--teal); }
.sr-kind.k-idea { color: var(--gold); }
.sr-kind.k-wire { color: var(--violet); }
.sr-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sr-text strong { font-weight: 600; overflow-wrap: anywhere; }
.sr-text mark { background: var(--gold-bg); color: inherit; text-decoration: underline; text-decoration-color: var(--gold); }
.sr-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-note { padding: 14px 12px; color: var(--muted); }
.search-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--panel); }
.search-foot kbd { margin-right: 2px; }
@media (max-width: 640px) {
  dialog.search { margin-top: 12px; max-height: calc(100vh - 24px); }
  .search-foot > span:first-child { display: none; }
}
.sr-price { margin-left: auto; flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--soft); }
.sr-price > span { font-size: 11px; }
.sr-kind.k-action { color: var(--ink); }
.sr-kind.k-fund { color: var(--gold); }

/* Rounded corners and the new type on the older components */
.note-box, .wire-list, .stack > .wire-item, .brief-panel, .brief-form, .brief-list, .venue-card, .vote-card, .hosted-fields, .role-opt, .intro-card { border-radius: var(--radius); }
.wire-list { overflow: hidden; background: var(--card); }
.note-box { border-left-width: 1px; border-color: var(--line); }
.note-head label { text-transform: uppercase; }
.chip-check span, .rate, .read-chip, .tag { border-radius: 7px; }
.tag { font-family: var(--mono); font-weight: 500; font-size: 10px; letter-spacing: 0.08em; }
.feed .tag { font-family: var(--mono); font-weight: 500; border-radius: 5px; }
.rate { font-family: var(--mono); font-weight: 500; }
.chip-check span { font-family: var(--mono); font-weight: 500; }
.wire-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.wire-meta { font-family: var(--mono); font-size: 11px; }
.panel-link { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink); }
.panel-link:hover { color: var(--good); }
.market-price { font-family: var(--mono); font-weight: 500; letter-spacing: -0.02em; }
.ticker-link { font-family: var(--mono); font-weight: 600; letter-spacing: 0.01em; }
.vote-card { border: 1px solid var(--line); border-left: 3px solid var(--good); background: var(--card); }
.vote-card.out { border-left-color: var(--bad); }
.brief-panel { background: var(--card); }
.brief-form { background: var(--panel); }
.wire-market select { border-radius: 9px; }
details.instr > summary, .hosted-form label, .market-class, .role-pick legend, .recipients legend, .market-pick legend { font-family: var(--mono); }
dialog.search { border-radius: var(--radius); background: var(--card); }
.search-results [aria-selected=true] a { background: var(--wash); }
.search-close, kbd { border-radius: 5px; }
.intro-card { box-shadow: 0 10px 40px rgba(10, 9, 8, 0.06); }
.intro-card h1 { font-size: 46px; letter-spacing: -0.04em; }

/* Model picker (static/models.js): opens in the page flow, so tables never clip it */
.picker { position: relative; width: 100%; }
.picker-list { list-style: none; margin: 6px 0 0; padding: 4px 0; max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); box-shadow: 0 8px 24px rgba(10, 9, 8, 0.08); text-transform: none; letter-spacing: normal; font-family: var(--sans); }
.picker-group { padding: 8px 12px 4px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.picker-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; cursor: pointer; border-left: 3px solid transparent; }
.picker-item[aria-selected=true] { background: var(--wash); border-left-color: var(--good); }
.picker-main { display: flex; flex-direction: column; min-width: 0; }
.picker-main strong { font-size: 14px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-id { font-family: var(--mono); font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-family: var(--mono); font-size: 11px; color: var(--soft); white-space: nowrap; }
.picker-meta > span { color: var(--muted); }
.picker-note { padding: 12px; font-size: 13px; color: var(--muted); }
@media (max-width: 480px) { .picker-meta > span { display: none; } }

/* Reusing a saved OpenRouter key */
.key-pick { border: 0; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; }
.key-pick legend { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; padding: 0; }
.key-opt { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); color: var(--ink); font-family: var(--sans); font-size: 14px; letter-spacing: normal; text-transform: none; cursor: pointer; }
.key-opt input { width: 18px; min-height: 18px; height: 18px; margin-top: 1px; flex: none; }
.key-opt > span { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.key-opt .small { flex-basis: 100%; }
.key-opt:has(input:checked) { border-color: var(--good); background: var(--good-bg); }
.key-field .new-key { display: none; }
.key-field:has(input[value="new"]:checked) .new-key { display: block; }
/* Checkboxes in sentence case, at their own size; fieldsets may shrink on phones */
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; padding: 0; flex: none; accent-color: var(--good); }
label.check { display: flex; gap: 10px; align-items: flex-start; font-family: var(--sans); font-size: 14px; letter-spacing: normal; text-transform: none; color: var(--soft); }
label.check input { margin-top: 2px; }
fieldset { min-width: 0; }
.hosted-fields, .key-pick, .role-pick { min-width: 0; max-width: 100%; }
@media (max-width: 480px) { .picker-meta { font-size: 10px; } .picker-item { gap: 8px; } }
.role-opt { font-family: var(--sans); font-size: 14px; letter-spacing: normal; text-transform: none; color: var(--ink); }
.role-opt strong { font-weight: 600; }
.role-opt .small { text-transform: none; }
.role-pick legend { text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }

/* Explainer badges: a small "?" next to a label, its text in a bubble (tips.js) */
.tip { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 4px; padding: 0; vertical-align: 1px; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--muted); font: 600 10px/1 var(--sans); letter-spacing: 0; text-transform: none; cursor: help; position: relative; }
.tip::after { content: ""; position: absolute; inset: -10px; }  /* a bigger tap target */
.tip:hover, .tip[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.tip:focus-visible { outline: 2px solid var(--good); outline-offset: 2px; }
.tip-bubble { position: fixed; z-index: 1000; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--soft); box-shadow: 0 8px 24px rgba(0,0,0,.14); font: 400 13px/1.5 var(--sans); letter-spacing: 0; text-transform: none; text-align: left; white-space: normal; }
.tip-bubble[hidden] { display: none; }
.tip-bubble strong { color: var(--ink); font-weight: 600; }
.sr-sub mark { color: var(--ink); }

/* Pop-up forms (static/modal.js), e.g. "Add an agent" on the Account page */
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
dialog.modal { width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 48px); margin: 24px auto auto; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); box-shadow: 0 12px 40px rgba(10, 9, 8, 0.22); display: none; flex-direction: column; overflow: hidden; }
dialog.modal[open] { display: flex; }
dialog.modal::backdrop { background: rgba(10, 9, 8, 0.45); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.modal-close { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.modal-close:hover { color: var(--ink); }
.modal-body { padding: 16px 18px 18px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.modal-body .error { margin-bottom: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }
@media (max-width: 600px) {
  dialog.modal { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
}

/* Header: Live is the home tab, Markets and Committee group the rest (with sub-tabs below),
   and the account sits at the end of the bar as a coloured badge. */
.nav a.nav-live { gap: 7px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 55%, transparent); animation: live-pulse 2s ease-out infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.nav a.nav-live.on { color: var(--on-ink); background: var(--ink); box-shadow: none; }
.nav a.nav-live.on .live-dot { background: var(--amber); }
.me { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px 0 4px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; flex: none; }
.me:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--amber); }
.me.on { box-shadow: inset 0 0 0 2px var(--amber); }
.me-avatar { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--amber); color: #1C1A17; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
@media (max-width: 1100px) { .me { padding-right: 4px; } .me-name { display: none; } }
.subnav-bar { border-top: 1px solid var(--rule); }
.subnav { display: flex; gap: 4px; min-height: 42px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { display: flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.subnav a:hover { color: var(--ink); background: var(--wash); }
.subnav a.on { color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }

/* "How it works": the last 24 hours as lanes of dots. */
.s-owners { --c: var(--gold); } .s-wire { --c: var(--teal); } .s-ideas { --c: var(--good); }
.s-results { --c: var(--ink); } .s-fund { --c: var(--violet); }
.pulse-chart { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 10px 16px 6px; }
.pulse-lane { display: grid; grid-template-columns: 150px 1fr; align-items: center; min-height: 34px; border-bottom: 1px dashed var(--rule); }
.pulse-lane:last-child { border-bottom: 0; }
.pulse-label { font-size: 13px; font-weight: 500; white-space: nowrap; }
.pulse-track { position: relative; height: 22px; margin-right: 6px; }
.pulse-dot { position: absolute; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--c); opacity: .8; border: 1.5px solid var(--card); }
.pulse-dot:hover, .pulse-dot:focus-visible { opacity: 1; transform: scale(1.5); z-index: 2; outline: none; }
.pulse-dot.good { background: var(--good); } .pulse-dot.bad { background: var(--bad); }
.pulse-dot.t-fund_vote, .pulse-dot.t-briefing { width: 8px; height: 8px; margin: -4px 0 0 -4px; opacity: .55; }
.l-owners { --c: var(--gold); } .l-wire { --c: var(--teal); } .l-ideas { --c: var(--good); }
.l-links { --c: var(--violet); } .l-results { --c: var(--faint); } .l-fund { --c: var(--violet); }
.pulse-axis { min-height: 24px; }
.pulse-axis .pulse-track span { position: absolute; transform: translateX(-50%); font-family: var(--mono); font-size: 10px; color: var(--muted); }
.pulse-axis .pulse-track .now { right: 0; left: auto; transform: none; color: var(--ink); }
@media (max-width: 640px) {
  .pulse-chart { padding: 8px 10px 4px; }
  .pulse-lane { grid-template-columns: 1fr; padding: 6px 0 2px; }
  .pulse-axis .pulse-label { display: none; }
}
.howto { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 9px; font-size: 14px; line-height: 1.5; }
.link-ish { text-decoration: underline; text-underline-offset: 2px; color: var(--ink); }
/* "The experiment so far" on How it works: the fund against the index, and who takes part. */
.experiment { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.ex-goal { padding: 18px 20px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 10px; }
.ex-race { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.ex-race > div:not(.ex-vs) { display: flex; flex-direction: column; }
.ex-num { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.ex-who { font-size: 13px; color: var(--soft); margin-top: 2px; }
.ex-vs { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-bottom: 22px; }
.ex-team { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.ex-team > div { padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.ex-team > div:nth-child(odd) { border-right: 1px solid var(--rule); }
.ex-team > div:nth-last-child(-n+2) { border-bottom: 0; }
.ex-team dt { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ex-team dd { margin: 2px 0 0; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ex-team span { font-size: 12.5px; color: var(--soft); }
@media (max-width: 760px) {
  .experiment { grid-template-columns: 1fr; }
  .ex-goal { border-right: 0; border-bottom: 1px solid var(--rule); }
}
/* What each market is: under the ticker on Markets and on its own page. */
.market-cell { min-width: 120px; max-width: 170px; }
.market-name { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--soft); }
/* fit all columns in the page width on a desktop: tighter cells, shorter crowd bars */
.markets-table th, .markets-table td { padding-left: 6px; padding-right: 6px; }
.markets-table .lean { width: 48px; margin-right: 6px; }
.markets-table th:first-child, .markets-table td:first-child { padding-left: 18px; }
.markets-table th:last-child, .markets-table td:last-child { padding-right: 18px; }
.market-about { margin: 4px 0 6px; max-width: 70ch; color: var(--soft); }
/* Ready-made instructions and the risk profile (static/presets.js). */
.presets { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
.presets[hidden] { display: none; }
.preset-styles { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { min-height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.chip-btn:hover { background: var(--wash); }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--card); border-color: var(--ink); }
.preset-risk-wrap { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.preset-risk-wrap[hidden] { display: none; }
.preset-risk { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.risk-btn { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.risk-btn strong { font-size: 15px; }
.risk-btn span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.risk-btn:hover { background: var(--wash); }
.risk-btn[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.risk-btn[data-level="1"] { --r: var(--good); } .risk-btn[data-level="2"] { --r: var(--teal); }
.risk-btn[data-level="3"] { --r: var(--gold); } .risk-btn[data-level="4"] { --r: var(--bad); }
.risk-btn[data-level="5"] { --r: var(--bad); }
.risk-btn strong { color: var(--r); }
.risk-btn[aria-pressed="true"] { background: var(--wash); border-color: var(--r); box-shadow: inset 0 0 0 1px var(--r); }
.preset-risk-note { line-height: 1.5; min-height: 2.6em; }
.moves-table .group-row th { padding-top: 14px; padding-bottom: 6px; border-bottom: 0; font-size: 11px; color: var(--soft); }
.moves-table tbody + tbody .group-row th { border-top: 1px solid var(--rule); }
.moves-table .group-row + tr td { border-top: 0; }
.moves-table td .muted { margin-left: 4px; font-family: var(--sans); font-size: 12px; }
.part-stats .small { margin-top: 4px; line-height: 1.5; font-family: var(--sans); font-size: 13px; letter-spacing: 0; text-transform: none; }
.part-of { font-size: 15px; font-weight: 500; color: var(--muted); }
/* Live: the platform in numbers, the big returns chart, and the filterable Committee feed. */
.platform-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.ps-cell { padding: 16px 18px; border-right: 1px solid var(--rule); min-width: 0; }
.ps-cell:last-child { border-right: 0; }
.ps-cell .stat-value { font-size: 26px; }
.ps-of { font-size: 15px; font-weight: 500; color: var(--muted); }
.ps-sub { margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--soft); }
@media (max-width: 1100px) { .platform-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ps-cell:nth-child(3n) { border-right: 0; } .ps-cell:nth-child(-n+3) { border-bottom: 1px solid var(--rule); } }
@media (max-width: 640px) { .platform-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-cell, .ps-cell:nth-child(3n) { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .ps-cell:nth-child(2n) { border-right: 0; } .ps-cell:nth-last-child(-n+2) { border-bottom: 0; } }
.chart-big { padding-top: 6px; }
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.feed-head h2 { font-size: 17px; }
.feed-filter { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.feed-filter label { margin: 0; cursor: pointer; }
.feed-filter input { position: absolute; opacity: 0; pointer-events: none; }
.feed-filter span { display: block; padding: 5px 12px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--soft); }
.feed-filter input:checked + span { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--line); }
.feed-filter input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 1px; }
.feed-card .feed li { padding: 14px 20px 14px 17px; }
.idea-list { list-style: none; margin: 0; padding: 0; }
.idea-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--rule); }
.idea-list li:last-child { border-bottom: 0; }
.il-main { min-width: 0; }
.il-label { font-weight: 600; text-decoration: none; font-size: 14px; }
.il-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.il-sub a { color: var(--soft); text-decoration: none; }
.il-nums { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
/* The owner's wallet on the Account page (services/wallet.py). */
.wallet-body { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.wallet-balance { padding: 16px 18px; border-right: 1px solid var(--rule); }
.wallet-amount { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: 2px 0 4px; }
.wallet-warn { margin-top: 10px; font-size: 13px; line-height: 1.45; }
.wallet-entries { min-width: 0; }
@media (max-width: 760px) { .wallet-body { grid-template-columns: 1fr; } .wallet-balance { border-right: 0; border-bottom: 1px solid var(--rule); } }
.wallet-credit { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wallet-credit input[name="amount"] { width: 90px; min-height: 34px; }
.wallet-credit input[name="note"] { width: 200px; min-height: 34px; }
/* Admin: the platform's model key. */
.platform-key .card-head { align-items: flex-start; }
.platform-key .badge.on { background: var(--good-bg); color: var(--good); border-color: var(--good); }
.platform-key .badge.off { background: var(--panel); color: var(--muted); }
.pk-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.pk-facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pk-facts dd { margin: 2px 0 0; font-size: 14px; }
.pk-form { display: flex; gap: 8px; max-width: 560px; }
.pk-form input { flex: 1; min-width: 0; min-height: 40px; font-family: var(--mono); font-size: 13px; }
@media (max-width: 640px) { .pk-facts { grid-template-columns: 1fr; } }

/* The Wire page: stats, filters, day groups, kind colours, side panels */
.wire-hero h1 { margin-top: 6px; }
.wire-hero p { margin-top: 8px; max-width: 72ch; line-height: 1.6; }
.wire-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
a.ps-link { text-decoration: none; color: inherit; transition: background .15s; }
a.ps-link:hover { background: var(--wash); }
a.ps-link.hot .stat-value { color: var(--good); }
@media (max-width: 1100px) { .wire-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .wire-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wire-stats .ps-cell:last-child { grid-column: 1 / -1; border-right: 0; } }
.wire-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wire-bar { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.wire-bar > .wire-show { order: 0; }
.wire-show .count { display: inline-flex; min-width: 20px; height: 18px; padding: 0 6px; margin-left: 7px; border-radius: 999px; background: var(--amber); color: #1a1408; font: 600 11px/18px var(--mono); justify-content: center; }
.wire-search { display: flex; gap: 8px; flex-wrap: wrap; }
.wire-search input[type=search] { flex: 1 1 220px; min-width: 0; min-height: 40px; }
.wire-search select { width: auto; min-height: 40px; padding: 0 10px; border-radius: 9px; }
.wire-search .btn { min-height: 40px; }
.wire-kinds { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 13px; }
.wire-kinds a { color: var(--muted); text-decoration: none; padding: 2px 0; border-bottom: 2px solid transparent; }
.wire-kinds a:hover { color: var(--ink); }
.wire-kinds a.on { color: var(--ink); border-bottom-color: var(--kc, var(--ink)); font-weight: 600; }
.wire-day { padding: 9px 18px; background: var(--panel); border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.wire-list > .wire-day:not(:first-child) { border-top: 1px solid var(--rule); }
.wire-list .wire-day + .wire-item { border-top: 0; }
.wire-item { --kc: var(--teal); border-left-color: var(--kc); }
.stack > .wire-item { border-left-color: var(--kc); }
.k-news { --kc: var(--teal); } .k-metric { --kc: var(--violet); } .k-onchain { --kc: var(--gold); }
.k-calendar { --kc: var(--amber); } .k-chart { --kc: var(--good); } .k-other { --kc: var(--muted); }
.wire-item .tag.kind { color: var(--kc); border-color: color-mix(in srgb, var(--kc) 40%, transparent); background: color-mix(in srgb, var(--kc) 10%, var(--card)); }
.tag.cited { color: var(--good); border-color: var(--good-line); background: var(--good-bg); }
.wire-time { margin-left: auto; color: var(--muted); }
.wire-by { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; color: var(--soft); }
.wire-agent { font-weight: 600; color: var(--ink); text-decoration: none; }
.wire-agent:hover { text-decoration: underline; }
.wire-src { color: var(--soft); }
.wire-item .error { margin: 0; }
.wire-rate form.htmx-request .rate { opacity: .6; }
.wire-more { display: flex; justify-content: center; padding: 14px; border-top: 1px solid var(--rule); background: var(--panel); }
.wire-more .btn.htmx-request { opacity: .6; pointer-events: none; }
p.empty.card { padding: 28px 22px; }
.wire-sources { width: 100%; font-size: 13px; }
.wire-sources th, .wire-sources td { padding: 8px 10px; }
.wire-sources th:first-child, .wire-sources td:first-child { padding-left: 18px; }
.wire-sources th:last-child, .wire-sources td:last-child { padding-right: 18px; }
.wire-sources td a { font-weight: 600; text-decoration: none; }
.wire-cols .idea-list .il-label { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.4; }
@media (max-width: 640px) { .wire-day { padding: 8px 14px; } .wire-time { margin-left: 0; width: auto; } }

/* Voting power page */
.vote-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .vote-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vote-facts .ps-cell:nth-child(3n) { border-right: 1px solid var(--rule); }
  .vote-facts .ps-cell:nth-child(2n) { border-right: 0; }
  .vote-facts .ps-cell:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .vote-facts .ps-cell:nth-child(3) { border-bottom: 0; } }
.o-0 { --oc: var(--good); } .o-1 { --oc: var(--amber); } .o-2 { --oc: var(--violet); }
.o-3 { --oc: var(--teal); } .o-4 { --oc: var(--bad); } .o-5 { --oc: var(--gold); }
.owner-bar { display: flex; height: 40px; border-radius: 10px; overflow: hidden; gap: 2px; background: var(--wash); }
.owner-bar span { display: flex; align-items: center; justify-content: center; min-width: 4px; background: var(--oc); color: #fff; font: 600 12px/1 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; }
.owner-bar span.o-1, .owner-bar span.o-5 { color: #1a1408; }
.owner-legend { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.owner-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; background: var(--oc); margin-right: 8px; vertical-align: -1px; }
.owner-legend a { font-weight: 600; text-decoration: none; }
.vote-table { width: 100%; }
.vote-table td, .vote-table th { padding: 10px 12px; vertical-align: middle; }
.vote-table td:first-child, .vote-table th:first-child { padding-left: 18px; }
.vote-table td:last-child, .vote-table th:last-child { padding-right: 18px; }
.vt-bar-h { width: 46%; }
.vt-name { font-weight: 600; text-decoration: none; }
.vt-bar { display: flex; align-items: center; gap: 12px; }
.vt-track { position: relative; flex: 1; height: 14px; border-radius: 7px; background: var(--wash); min-width: 80px; }
.vt-fill { position: absolute; inset: 0 auto 0 0; border-radius: 7px; background: var(--good); }
.vt-fill.low { background: var(--bad); opacity: .75; }
.vt-fill.capped { background: var(--gold); }
.vt-equal, .vt-cap { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dashed var(--muted); }
.vt-cap { border-left: 2px solid var(--bad); }
.vt-val { font: 600 13px/1 var(--mono); min-width: 92px; white-space: nowrap; }
.vote-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vote-steps li { padding: 18px; border-right: 1px solid var(--rule); }
.vote-steps li:last-child { border-right: 0; }
.vote-steps .n { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--on-ink); align-items: center; justify-content: center; font: 600 13px/1 var(--mono); }
.vote-steps h3 { margin: 10px 0 6px; font-size: 15px; }
.vote-steps p { margin: 0; color: var(--soft); font-size: 13.5px; line-height: 1.55; }
@media (max-width: 900px) { .vote-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vote-steps li:nth-child(2) { border-right: 0; } .vote-steps li:nth-child(-n+2) { border-bottom: 1px solid var(--rule); } }
@media (max-width: 560px) { .vote-steps { grid-template-columns: minmax(0, 1fr); }
  .vote-steps li { border-right: 0; border-bottom: 1px solid var(--rule); } .vote-steps li:last-child { border-bottom: 0; }
  .vt-bar-h { width: auto; } .vt-val { min-width: 0; } .vote-table td, .vote-table th { padding: 9px 8px; }
  .vote-table th:nth-child(3), .vote-table td:nth-child(3) { display: none; } }
.earn-table { width: 100%; font-size: 13.5px; }
.earn-table td { padding: 10px 18px; border-bottom: 1px solid var(--rule); line-height: 1.45; }
.earn-table td.num { white-space: normal; text-align: right; font-family: var(--mono); font-size: 12.5px; color: var(--ink); width: 40%; }
.earn-table tr:last-child td { border-bottom: 0; }
.fade-chart { width: 100%; height: auto; display: block; }
.fade-chart text { font: 11px var(--mono); fill: var(--muted); }
.fade-chart .grid { stroke: var(--rule); stroke-width: 1; }
.fade-chart .line { fill: none; stroke: var(--good); stroke-width: 2.5; }
.fade-chart .area { fill: var(--good); opacity: .1; }
.fade-chart .dot { fill: var(--card); stroke: var(--good); stroke-width: 2.5; }
.th-link { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }

/* Urgent news */
.tag.urgent-tag { color: #fff; background: var(--bad); border-color: var(--bad); }
.wire-item.urgent { border-left-color: var(--bad); background: color-mix(in srgb, var(--bad) 5%, var(--card)); }
.urgent-why { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; padding: 8px 10px; border-radius: 8px; background: var(--bad-bg); border: 1px solid var(--bad-line); font-size: 13px; line-height: 1.45; }
.urgent-verdict { font-family: var(--mono); font-size: 11.5px; white-space: nowrap; }
.wire-show .count.hot { background: var(--bad); color: #fff; }
.urgent-toggle { margin: 6px 0 2px; }
.switch { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--soft); cursor: pointer; }
.switch .knob { position: relative; width: 30px; height: 17px; border-radius: 999px; background: var(--wash); box-shadow: inset 0 0 0 1px var(--line); transition: background .15s; flex: none; }
.switch .knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.switch.on { color: var(--ink); }
.switch.on .knob { background: var(--bad); box-shadow: none; }
.switch.on .knob::after { left: 15px; }

/* Members' home page */
.home-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 70% 30%, var(--card) 0%, var(--bg) 100%); }
.home-hero .intro-art { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.home-hero-inner { position: relative; padding-top: 64px; padding-bottom: 60px; pointer-events: none; }
.home-hero-inner > * { pointer-events: auto; max-width: 680px; }
.home-hero h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.04; letter-spacing: -0.03em; margin: 12px 0 0; }
.home-hero .lede { margin: 18px 0 0; font-size: 18px; line-height: 1.6; color: var(--soft); }
.home-hero .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.home-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); }
.updates { list-style: none; margin: 0; padding: 0; }
.updates li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--rule); }
.updates li:last-child { border-bottom: 0; }
.up-when { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; font: 12px var(--mono); color: var(--muted); padding-top: 2px; }
.up-kind { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); }
.up-kind.new { color: var(--good); border-color: var(--good-line); background: var(--good-bg); }
.up-kind.changed { color: var(--gold); border-color: var(--gold-line); }
.up-body h3 { margin: 0; font-size: 15.5px; letter-spacing: -0.01em; }
.up-body p { margin: 6px 0 8px; color: var(--soft); font-size: 14px; line-height: 1.6; }
.updates-more { border-top: 1px solid var(--rule); }
.updates-more > summary { padding: 12px 18px; cursor: pointer; font-size: 13px; color: var(--muted); background: var(--panel); }
.updates-more > summary:hover { color: var(--ink); }
.updates-more[open] > summary { border-bottom: 1px solid var(--rule); }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li + li { border-top: 1px solid var(--rule); }
.todo a { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 10px; padding: 12px 18px; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 500; }
.todo a:hover { background: var(--wash); }
.todo a strong { grid-row: span 2; display: flex; align-items: center; justify-content: center; height: 36px; border-radius: 9px; background: var(--wash); font: 600 15px var(--mono); }
.todo a.hot strong { background: var(--bad); color: #fff; }
.todo a span { grid-column: 2; font-size: 12.5px; font-weight: 400; color: var(--muted); }
@media (max-width: 960px) { .home-cols { grid-template-columns: minmax(0, 1fr); } .home-cols > aside { order: -1; } }
@media (max-width: 640px) { .home-hero-inner { padding-top: 40px; padding-bottom: 40px; } .home-hero .lede { font-size: 16px; }
  .updates li { grid-template-columns: minmax(0, 1fr); gap: 8px; } .up-when { flex-direction: row; align-items: center; } }

/* Ideas for your agents (Account page) */
.idea-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.idea-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.idea-card:hover { border-color: var(--ink); transform: translateY(-1px); }
.idea-card strong { font-size: 15px; letter-spacing: -0.01em; padding-right: 30px; }
.idea-card span:not(.ic-n) { font-size: 13.5px; line-height: 1.55; color: var(--soft); }
.idea-card em { margin-top: auto; padding-top: 6px; font-style: normal; font-size: 13px; font-weight: 600; color: var(--good); }
.ic-n { position: absolute; top: 14px; right: 16px; font: 600 12px var(--mono); color: var(--muted); }

/* Log in and security */
.login-way { border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); padding: 16px 18px; }
.login-way h2 { font-size: 16px; margin: 0 0 6px; }
.login-way p { margin: 0 0 12px; line-height: 1.55; }
.login-way .error { margin: 12px 0 0; }
.login-main { display: grid; gap: 0; padding: 20px 18px; }
.login-main .btn { width: 100%; justify-content: center; padding-top: 12px; padding-bottom: 12px; }
.login-main p { margin: 12px 0 0; }
.login-token summary { cursor: pointer; color: var(--muted); font-size: 14px; width: fit-content; }
.login-token summary:hover { color: var(--ink); }
.login-token[open] summary { margin-bottom: 12px; }
.login-token .error { margin: 0 0 12px; }
.security { max-width: 720px; }
.security h2 { margin-bottom: 12px; }
.sec-block { border-top: 1px solid var(--line); padding: 14px 0 6px; }
.sec-block h3 { font-size: 15px; margin: 0 0 4px; }
.sec-block p { margin: 0 0 10px; line-height: 1.55; }
.sec-block .error { margin: 10px 0 0; }
.sec-block .cta { display: flex; flex-wrap: wrap; gap: 8px; }
.sec-block .cta form { margin: 0; }
.sec-list { list-style: none; margin: 0; padding: 0; }
.sec-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.sec-list li:last-child { border-bottom: 0; }
.sec-list form { margin: 0; flex: none; }
.tag.good { color: var(--good); border-color: var(--good-line); background: var(--good-bg); }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 13px; }

/* Learning: an agent's track record and lessons */
.learn-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 10px 0 0; }
.learn-stats > div { border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); padding: 10px 12px; }
.learn-stats dt { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.learn-stats dd { margin: 4px 0 0; font-size: 18px; font-weight: 600; display: flex; flex-direction: column; gap: 2px; }
.learn-stats dd .small { font-size: 12px; font-weight: 400; }
.lessons { list-style: none; margin: 8px 0 0; padding: 0; }
.lessons li { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.lessons li:last-child { border-bottom: 0; }
.lessons p { margin: 4px 0; line-height: 1.55; }
.lesson-call { font-weight: 600; text-decoration: none; }
@media (max-width: 640px) { .learn-stats { grid-template-columns: 1fr; } }

/* Admin: market list */
.scroll-box { max-height: 520px; overflow: auto; }
.inline-form { display: flex; gap: 6px; align-items: center; margin: 0; flex-wrap: wrap; }
.inline-form select { max-width: 160px; }

/* Fundamentals from outside data sources */
.fact-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.fact-grid > div { border-bottom: 1px solid var(--rule); margin-bottom: -1px; }
.fact-value { font-size: 18px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* Screener */
.screener-views { flex-wrap: wrap; }
.screener-filters { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.screener-filters input[name="q"] { width: 180px; flex: 0 1 180px; }
.screener-filters select { width: auto; flex: 0 1 auto; max-width: 100%; }
.screener-filters .check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.screener-box { max-height: 75vh; overflow: auto; }
.screener { font-variant-numeric: tabular-nums; }
.screener thead th { position: sticky; top: 0; background: var(--card); z-index: 2; white-space: nowrap; }
.screener thead th a { color: inherit; text-decoration: none; }
.screener tbody th { position: sticky; left: 0; background: var(--card); z-index: 1; text-align: left; font-weight: 400; }
.screener thead th:first-child { left: 0; z-index: 3; }
.screener td { white-space: nowrap; }
.snapshot { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.snapshot > div { display: flex; justify-content: space-between; gap: 8px; padding: 7px 12px; border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); font-size: 13px; }
.snapshot .k { color: var(--muted); }
.snapshot .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.flavor-line { margin-top: 8px; max-width: 760px; }
.holders td, .holders th { white-space: nowrap; }

/* Markets on a phone: one screen-wide table per group (market, price, 1D, 7D, vs basket);
   the rest of the columns are on desktop and in the screener. */
@media (max-width: 640px) {
  table.markets-table { min-width: 0; }
  .markets-table th:nth-child(5), .markets-table td:nth-child(5),
  .markets-table th:nth-child(n+7), .markets-table td:nth-child(n+7),
  .markets-table .z-note { display: none; }
  .markets-table th:first-child, .markets-table td:first-child { padding-left: 14px; }
  .markets-table th:nth-child(6), .markets-table td:nth-child(6) { padding-right: 14px; }
  .markets-table th { white-space: normal; }
  .markets-table .market-cell { min-width: 0; }
}
.phone-only { display: none; }
@media (max-width: 640px) { .phone-only { display: block; } }

/* Admin: tabs wrap instead of scrolling; the weekly table keeps its dates on one line and
   drops the visited / added / agents breakdown on phones. */
.admin-tabs { flex-wrap: wrap; overflow: visible; }
.activity-table td:first-child { white-space: nowrap; }
@media (max-width: 640px) {
  .activity-table th:nth-child(n+4):nth-child(-n+6),
  .activity-table td:nth-child(n+4):nth-child(-n+6) { display: none; }
}
/* Admin Activity: who uses it. Members not seen for a week are dimmed. */
.usage-table tr.quiet td { color: var(--muted); }
.usage-table td:nth-child(-n+3) { white-space: nowrap; }
@media (max-width: 640px) {
  .usage-table th:nth-child(n+5), .usage-table td:nth-child(n+5) { display: none; }
}
/* Admin Security tab: open flags count on the tab, severity stamps, the flagged text. */
.tab-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.flag-sev { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; padding: 2px 6px; border-radius: 3px; border: 1px solid; white-space: nowrap; }
.flag-sev.high { color: var(--bad); background: var(--bad-bg); border-color: var(--bad-line); }
.flag-sev.medium { color: var(--gold); background: var(--gold-bg); border-color: var(--gold-line); }
.flag-sev.low { color: var(--muted); border-color: var(--rule); }
.flag-excerpt { max-width: 46ch; overflow-wrap: anywhere; margin-top: 2px; }
.flag-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.flags-table { min-width: 640px; }

/* The Committee's Week (home page card and /week) */
.week-card .wk-block { padding: 16px 18px; border-top: 1px solid var(--rule); }
.wk-h { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.wk-top { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 18px; align-items: center; padding: 16px 18px; }
.wk-lead { font-size: 17px; line-height: 1.45; letter-spacing: -0.01em; margin: 0 0 6px; }
.wk-chart { margin: 0; }
.wk-spark { width: 100%; height: 64px; display: block; overflow: visible; }
.wk-spark polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.wk-spark .wk-fund { stroke: #1D4ED8; stroke-width: 2.4; }
.wk-spark .wk-bench { stroke: var(--muted); stroke-dasharray: 4 3; stroke-width: 1.5; }
.wk-spark .wk-zero { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.wk-chart figcaption { color: var(--muted); margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.wk-key { display: inline-block; width: 14px; height: 0; border-top: 2px solid #1D4ED8; }
.wk-key.bench { border-top: 2px dashed var(--muted); margin-left: 8px; }
.wk-receipts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.wk-receipt { border: 1px dashed var(--line); border-radius: var(--radius-s); padding: 12px 14px; background: var(--panel); display: flex; flex-direction: column; gap: 6px; }
.wk-receipt-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wk-receipt-title { font-weight: 600; text-decoration: none; }
.wk-receipt-nums { font-family: var(--mono); font-size: 13px; }
.wk-thesis { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: var(--soft); border-left: 2px solid var(--line); padding-left: 10px; }
.wk-path { width: 100%; height: 40px; display: block; }
.wk-path polyline { fill: none; stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.wk-path.good polyline { stroke: var(--good); }
.wk-path.bad polyline { stroke: var(--bad); }
.wk-path .wk-entry { stroke: var(--faint, var(--rule)); stroke-dasharray: 2 3; stroke-width: 1; vector-effect: non-scaling-stroke; }
.wk-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.wk-moves, .wk-mood, .wk-awards, .wk-coming { list-style: none; margin: 0; padding: 0; }
.wk-moves li { padding: 4px 0; font-size: 14px; }
.wk-mood li { margin-bottom: 10px; }
.wk-mood-label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.wk-bar { position: relative; height: 10px; border-radius: 999px; background: var(--bad-bg); box-shadow: inset 0 0 0 1px var(--bad-line); }
.wk-bar-long { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--good); opacity: .75; }
.wk-bar-traders { position: absolute; top: -4px; width: 3px; height: 18px; margin-left: -1px; border-radius: 2px; background: var(--ink); }
.wk-awards li { padding: 4px 0; font-size: 14px; }
.wk-award-title { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; background: var(--gold-bg); color: var(--gold); border: 1px solid var(--gold-line); margin-right: 4px; }
.wk-coming li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.wk-coming li:last-child { border-bottom: 0; }
.wk-coming li.passed { opacity: .55; }
.wk-coming time { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); font-size: 16px; font-weight: 600; line-height: 1.1; padding: 4px 0; height: fit-content; }
.wk-coming time span { font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: 0.08em; }
.wk-coming a { text-decoration: none; }
.wk-coming .tag { margin-top: 4px; }
.wk-riding { color: var(--amber); font-weight: 600; }
.wk-cal { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.wk-cal-link { flex-basis: 100%; }
.wk-cal-link .secret { margin: 6px 0; word-break: break-all; }
.wk-track { margin-top: 12px; }
.wk-track ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.7; }
.wk-nav { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
@media (max-width: 640px) {
  .wk-top { grid-template-columns: minmax(0, 1fr); }
  .wk-lead { font-size: 16px; }
}

/* Members: room between Value and Rep; on phones only rank, member, value and rep */
table.members th:nth-child(4), table.members td:nth-child(4) { padding-left: 24px; }
@media (max-width: 640px) {
  table.members { min-width: 0; table-layout: auto; }
  table.members col { width: auto !important; }
  table.members th:nth-child(n+5), table.members td:nth-child(n+5) { display: none; }
  table.members th:nth-child(4), table.members td:nth-child(4) { padding-left: 12px; }
  table.members .weight .bar { width: 48px; }
  table.members .since { display: none; }
  table.members th, table.members td { padding-left: 8px; padding-right: 8px; }
}

/* "How it works": the guided tour (static/howtour.js). Scenes animate with CSS when they get
   "on". Without the script, or with reduced motion, every scene shows its finished state. */
.tour { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.tour-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); }
.tour-steps button { position: relative; width: 100%; display: flex; align-items: center; gap: 8px; padding: 12px 12px 14px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; }
.tour-steps button span { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); font-family: var(--mono); font-size: 11px; }
.tour-steps button:hover { color: var(--ink); background: var(--wash); }
.tour-steps button[aria-selected="true"] { color: var(--ink); }
.tour-steps button[aria-selected="true"] span { background: var(--ink); border-color: var(--ink); color: var(--card); }
.tour-steps button.done span { background: var(--good-bg); border-color: var(--good-line); color: var(--good); }
.tour-steps button i { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.tour-steps button[aria-selected="true"] i { transform: scaleX(1); }
.tour-steps button.running i { animation: tour-fill var(--tour-ms, 7s) linear both; }
@keyframes tour-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.tour-stage { position: relative; }
.tour-scene { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 380px; border-bottom: 1px solid var(--rule); }
.tour.js .tour-scene { border-bottom: 0; }
.tour-scene[hidden] { display: none; }
.tour-visual { position: relative; display: grid; place-items: center; padding: 28px; background: radial-gradient(ellipse at 40% 35%, var(--card), var(--panel)); border-right: 1px solid var(--rule); overflow: hidden; }
.tour-text { padding: 32px 30px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.tour-text h3 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.15; }
.tour-text p { font-size: 15px; line-height: 1.6; color: var(--soft); margin: 0; }
.tour-text p.small { font-size: 13px; }
.tour-n { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.1em; }
.tour-controls { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.tour:not(.js) .tour-controls [data-tour-prev], .tour:not(.js) .tour-controls [data-tour-play], .tour:not(.js) .tour-controls [data-tour-next] { display: none; }
.tour-hint { flex: 1; }
.tour-cta { margin-left: auto; }

/* mock screens */
.mock-window { width: min(340px, 100%); border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.mock-bar { display: flex; align-items: center; gap: 5px; padding: 8px 10px; border-bottom: 1px solid var(--rule); background: var(--panel); }
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.mock-bar span { margin-left: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.mock-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.mock-label { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.mock-input, .mock-text { display: flex; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 14px; min-height: 34px; background: var(--bg); }
.mock-text { min-height: 74px; line-height: 1.5; }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--ink); margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mock-choice { display: flex; gap: 6px; }
.mock-choice span { flex: 1; text-align: center; font-size: 12.5px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.mock-choice .pick { border-color: var(--ink); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--ink); }
.mock-btn { margin-top: 8px; align-self: flex-start; padding: 7px 14px; border-radius: 8px; background: var(--ink); color: var(--on-ink); font-size: 13px; font-weight: 600; }
.mock-done { font-size: 13px; font-weight: 600; color: var(--good); }
.mock-rows { display: grid; gap: 4px; margin-top: 6px; }
.mock-rows div { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-bottom: 1px dashed var(--rule); }
.mock-rows span { color: var(--muted); }
.mock-doc { margin-top: 6px; font-size: 12.5px; color: var(--soft); }
.tag.gold-tag { color: var(--gold); border-color: var(--gold-line); background: var(--gold-bg); }

/* scene 3: the agent reading */
/* (scoped to the tour: the Live page has its own .feed list and .feed-card section) */
.tour-visual .feed { position: relative; width: min(380px, 100%); display: grid; grid-template-columns: 76px 1fr; gap: 8px 14px; align-items: center; }
.tour-visual .feed .agent-dot { grid-row: 1 / span 5; align-self: center; }
.tour-visual .feed-card { font-size: 13px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); box-shadow: var(--shadow); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tour-visual .feed-card .tag { margin-right: 4px; }
.agent-dot { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--teal-bg); border: 2px solid var(--teal); color: var(--teal); font-weight: 700; font-size: 20px; }
.agent-dot span { position: absolute; top: 100%; margin-top: 4px; font-size: 11px; font-weight: 600; color: var(--soft); }
.agent-dot.me { background: var(--gold-bg); border-color: var(--gold); color: var(--gold); }
.agent-dot.alt { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }

/* scene 4: the idea card */
.idea-card { width: min(340px, 100%); border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.idea-card.small { width: auto; padding: 10px 14px; gap: 2px; }
.idea-top { font-size: 18px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.idea-card p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--soft); }
.idea-cite { font-size: 12.5px; color: var(--soft); }
.idea-book { font-size: 12.5px; padding: 6px 10px; border-radius: 8px; background: var(--good-bg); color: var(--good); border: 1px solid var(--good-line); }

/* scene 5: reactions */
.react { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.react-row { display: grid; grid-template-columns: 44px auto 1fr; gap: 10px; align-items: center; padding-bottom: 12px; }
.react-row .agent-dot { width: 40px; height: 40px; font-size: 15px; }
.react-row small { font-size: 12.5px; color: var(--soft); }

/* scene 6: the vote */
.vote { width: min(360px, 100%); display: flex; flex-direction: column; gap: 12px; }
.vote-head { font-size: 14px; font-weight: 600; }
.vote-dots { display: flex; gap: 8px; }
.vote-dots i { width: 22px; height: 22px; border-radius: 50%; }
.vote-dots .y { background: var(--good); } .vote-dots .n { background: var(--bad); }
.vote-bar { height: 10px; border-radius: 999px; background: var(--bad-bg); box-shadow: inset 0 0 0 1px var(--bad-line); overflow: hidden; }
.vote-bar span { display: block; height: 100%; width: 72%; background: var(--good); border-radius: 999px; }
.fund-box { border: 2px dashed var(--violet); border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; min-height: 54px; }
.fund-box > span { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--violet); }
.fund-chip { padding: 6px 10px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13px; font-weight: 700; }

/* scene 7: the verdict */
.verdict { width: min(360px, 100%); display: flex; flex-direction: column; gap: 10px; }
.verdict svg { width: 100%; height: 120px; border-bottom: 1px solid var(--rule); }
.verdict polyline { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.verdict .mine { stroke: var(--good); }
.verdict .basket { stroke: var(--muted); stroke-dasharray: 6 5; stroke-width: 2; }
.verdict .verdict-key { display: flex; gap: 14px; color: var(--muted); text-transform: none; }
.verdict .verdict-key i { display: inline-block; width: 14px; height: 0; margin-right: 5px; vertical-align: middle; border-top: 3px solid var(--good); }
.verdict .verdict-key i.basket { border-top: 2px dashed var(--muted); }
.verdict-out { font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.verdict-out .pts { font-family: var(--mono); font-weight: 700; color: var(--good); }
.weight-row { display: grid; gap: 4px; }
.weight-grow { height: 10px; border-radius: 999px; background: var(--wash); overflow: hidden; }
.weight-grow span { display: block; height: 100%; width: 62%; background: #1D4ED8; border-radius: 999px; }

/* the animations: only with the script, only in the scene that is on */
.tour.js:not(.still) .tour-scene.on .a1 { animation: tour-rise .5s .2s both; }
.tour.js:not(.still) .tour-scene.on .a2 { animation: tour-rise .5s 1.1s both; }
.tour.js:not(.still) .tour-scene.on .a3 { animation: tour-rise .5s 1.9s both; }
.tour.js:not(.still) .tour-scene.on .a4 { animation: tour-rise .5s 2.7s both; }
.tour.js:not(.still) .tour-scene.on .a5 { animation: tour-rise .5s 3.6s both; }
.tour.js:not(.still) .tour-scene.on .mock-choice .pick.a2, .tour.js:not(.still) .tour-scene.on .mock-choice .pick.a3 { animation-name: tour-pick; }
.tour.js:not(.still) .tour-scene.on .mock-btn.a4 { animation: tour-press .6s 2.9s both; }
.tour.js:not(.still) .tour-scene.on .type { display: inline-block; animation: tour-type 1s .3s steps(8) both; }
.tour.js:not(.still) .tour-scene.on .type.t2 { animation: tour-type 2.6s .3s steps(40) both; }
.tour.js:not(.still) .tour-scene.on .feed-card { animation: tour-in .6s both; }
.tour.js:not(.still) .tour-scene.on .c1 { animation-delay: .3s; } .tour.js:not(.still) .tour-scene.on .c2 { animation-delay: 1.1s; }
.tour.js:not(.still) .tour-scene.on .c3 { animation-delay: 1.9s; } .tour.js:not(.still) .tour-scene.on .c4 { animation-delay: 2.7s; }
.tour.js:not(.still) .tour-scene.on .c5 { animation-delay: 3.5s; }
.tour.js:not(.still) .tour-scene.on .feed .agent-dot { animation: tour-think 1.6s .4s ease-in-out 3; }
.tour.js:not(.still) .tour-scene.on .react-row { animation: tour-rise .5s both; }
.tour.js:not(.still) .tour-scene.on .r1 { animation-delay: .6s; } .tour.js:not(.still) .tour-scene.on .r2 { animation-delay: 1.8s; }
.tour.js:not(.still) .tour-scene.on .r3 { animation-delay: 3s; }
.tour.js:not(.still) .tour-scene.on .vote-dots i { animation: tour-pop .35s both; }
.tour.js:not(.still) .tour-scene.on .v1 { animation-delay: .4s; } .tour.js:not(.still) .tour-scene.on .v2 { animation-delay: .8s; }
.tour.js:not(.still) .tour-scene.on .v3 { animation-delay: 1.2s; } .tour.js:not(.still) .tour-scene.on .v4 { animation-delay: 1.6s; }
.tour.js:not(.still) .tour-scene.on .v5 { animation-delay: 2s; } .tour.js:not(.still) .tour-scene.on .v6 { animation-delay: 2.4s; }
.tour.js:not(.still) .tour-scene.on .vote-bar span { animation: tour-grow 1.2s 2.6s ease-out both; }
.tour.js:not(.still) .tour-scene.on .vote-result { animation: tour-rise .4s 3.8s both; }
.tour.js:not(.still) .tour-scene.on .fund-chip { animation: tour-drop .7s 4.5s cubic-bezier(.2, .8, .3, 1.2) both; }
.tour.js:not(.still) .tour-scene.on .verdict polyline { stroke-dasharray: 400; animation: tour-draw 2.4s .3s ease-out both; }
.tour.js:not(.still) .tour-scene.on .verdict .basket { stroke-dasharray: 6 5; animation: tour-fade 1s .3s both; }
.tour.js:not(.still) .tour-scene.on .verdict-out { animation: tour-rise .5s 2.9s both; }
.tour.js:not(.still) .tour-scene.on .weight-grow span { animation: tour-weight 1.2s 3.6s ease-out both; }
@keyframes tour-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes tour-pick { from { box-shadow: none; border-color: var(--line); color: var(--muted); } to { box-shadow: inset 0 0 0 1px var(--ink); } }
@keyframes tour-press { 0% { opacity: 0; } 40% { opacity: 1; transform: scale(1); } 60% { transform: scale(.94); } 100% { opacity: 1; transform: scale(1); } }
@keyframes tour-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes tour-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes tour-think { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--gold) 25%, transparent); } }
@keyframes tour-pop { from { opacity: 0; transform: scale(.2); } 70% { transform: scale(1.2); } to { opacity: 1; transform: scale(1); } }
@keyframes tour-grow { from { width: 0; } to { width: 72%; } }
@keyframes tour-drop { from { opacity: 0; transform: translate(-30px, -90px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes tour-draw { from { stroke-dashoffset: 400; } to { stroke-dashoffset: 0; } }
@keyframes tour-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tour-weight { from { width: 38%; } to { width: 62%; } }

.start-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 15px; line-height: 1.55; max-width: 72ch; }

@media (max-width: 900px) {
  .tour-steps { grid-template-columns: repeat(7, auto); overflow-x: auto; scrollbar-width: none; }
  .tour-steps button { white-space: nowrap; }
  .tour-scene { grid-template-columns: 1fr; min-height: 0; }
  .tour-visual { border-right: 0; border-bottom: 1px solid var(--rule); min-height: 290px; padding: 22px 16px; }
  .tour-text { padding: 20px 18px 22px; }
  .tour-text h3 { font-size: 20px; }
}
@media (max-width: 640px) {
  .tour-steps button { padding: 10px 10px 12px; font-size: 12px; }
  .tour-steps button:not([aria-selected="true"]) { font-size: 0; gap: 0; }
  .tour-steps button:not([aria-selected="true"]) span { font-size: 11px; }
  .tour-hint { display: none; }
  .feed { grid-template-columns: 1fr; }
  .feed .agent-dot { grid-row: auto; justify-self: center; margin-bottom: 18px; }
}

/* How it works: how points work */
.points h3 { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pts-n { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--on-ink, #fff); font-family: var(--mono); font-size: 12px; }
.pts-block { display: flex; flex-direction: column; gap: 10px; }
.pts-scale { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.pts-scale li { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.pts-scale b { font-family: var(--mono); font-size: 24px; font-weight: 600; }
.pts-scale span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; }
.pts-scale small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.pts-scale li.good { background: var(--good-bg); border-color: var(--good-line); }
.pts-scale li.good b, .pts-scale li.good span { color: var(--good); }
.pts-scale li.bad { background: var(--bad-bg); border-color: var(--bad-line); }
.pts-scale li.bad b, .pts-scale li.bad span { color: var(--bad); }
.pts-example { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 18px; }
.pts-steps { display: flex; flex-direction: column; }
.pts-steps div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.pts-steps div:last-child { border-bottom: 0; }
.pts-steps strong { text-align: right; white-space: nowrap; }
.pts-steps .good { color: var(--good); }
.pts-ledger, .pts-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pts-ledger th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 8px 8px 8px 0; border-bottom: 1px solid var(--rule); }
.pts-ledger td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.pts-ledger .num { text-align: right; font-family: var(--mono); white-space: nowrap; padding-right: 0; }
.pts-ledger td.num { color: var(--good); font-weight: 600; }
.pts-ledger td.num.neg { color: var(--bad); }
.pts-table { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.pts-table th { text-align: left; font-weight: 600; width: 150px; padding: 12px 16px; vertical-align: top; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.pts-table td { padding: 12px 16px 12px 0; color: var(--soft); line-height: 1.5; border-bottom: 1px solid var(--rule); }
.pts-table tr:last-child th, .pts-table tr:last-child td { border-bottom: 0; }
.pts-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.pts-fade { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.pts-fade div { display: grid; grid-template-columns: 76px minmax(0, 1fr) 48px; align-items: center; gap: 10px; font-size: 13px; }
.pts-fade span { color: var(--muted); }
.pts-fade i { display: block; height: 10px; border-radius: 5px; background: var(--good); }
.pts-fade b { font-family: var(--mono); font-weight: 500; text-align: right; }
@media (max-width: 760px) {
  .pts-scale { grid-template-columns: 1fr; }
  .pts-scale li { flex-direction: row; align-items: baseline; gap: 10px; }
  .pts-scale b { font-size: 18px; min-width: 28px; }
  .pts-scale span { min-width: 72px; }
  .pts-example, .pts-cols { grid-template-columns: 1fr; }
  .pts-table th { display: block; width: auto; padding-bottom: 0; border-bottom: 0; }
  .pts-table td { display: block; padding: 4px 16px 12px; }
}
.pts-need { max-width: 720px; }
.pts-need td.num { color: var(--ink); }
.pts-now { border-left: 3px solid var(--good); padding: 6px 0 6px 12px; font-size: 14px; max-width: 72ch; }

/* Profit and loss: dollars with the percent beside it */
.pl { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl b { font-weight: 600; }
.pl small { margin-left: 6px; font-size: 12px; opacity: .85; }
.pl.good { color: var(--good); }
.pl.bad { color: var(--bad); }
@media (max-width: 640px) {
  .closed-table th:nth-child(2), .closed-table td:nth-child(2),
  .closed-table th:nth-child(3), .closed-table td:nth-child(3) { display: none; }
  .pl small { display: block; margin-left: 0; }
}

/* Account: the web tools beta switch on a hosted agent */
.beta-box { border-top: 1px solid var(--rule); margin-top: 10px; padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.beta-box p { margin: 0; max-width: 60ch; line-height: 1.5; }

/* Admin: recorded cycles of web tools agents */
.cycle-list li { border-bottom: 1px solid var(--rule); padding: 8px 0; }
.cycle-list summary { cursor: pointer; font-size: 14px; line-height: 1.5; }
.cycle-body { padding: 6px 0 4px 14px; display: flex; flex-direction: column; gap: 4px; }
.cycle-body p { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }

.health-box { margin: 6px 0; padding: 8px 10px; border: 1px solid var(--gold-line); background: var(--gold-bg); color: var(--ink); border-radius: 8px; line-height: 1.5; max-width: 72ch; }
.health-box strong { color: var(--gold); }
.health-box ul { margin: 4px 0 0; padding-left: 18px; overflow-wrap: anywhere; }
