/* MERRI design tokens — mirrored from design/merri-home.html */
:root {
  --bg: #121311;
  --bg-alt: #161714;
  --surface: #1A1B18;
  --surface-2: #22231F;
  --border: #2A2B27;
  --border-soft: #23241F;
  --line: #262722;
  --rule: #34352F;
  --rule-strong: #3A3B36;
  --accent: #C8E86B;
  --gain: #7FB77E;
  --risk: #E07A5F;
  --text: #EDEBE4;
  --text-2: #B9B7AF;
  --text-3: #8C8A82;
  --on-accent: #121311;

  --font-head: 'Onest', sans-serif;
  --font-body: 'Golos Text', 'Segoe UI', system-ui, sans-serif;
  --font-accent: 'Cormorant Garamond', Georgia, serif;
  --font-mono: 'Martian Mono', monospace;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(64px, 9vw, 128px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
}
a { color: var(--text); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[x-cloak] { display: none !important; }
img, svg { display: block; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; }

@keyframes merriPulse {
  0% { box-shadow: 0 0 0 0 rgba(200, 232, 107, .45); }
  70% { box-shadow: 0 0 0 8px rgba(200, 232, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 232, 107, 0); }
}
.m-live { animation: merriPulse 2.2s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .m-live { animation: none; } }

/* ---------- Layout ---------- */
/* Page containers are content-box like the design: 1240px of content plus the gutter. */
.wrap, .site-header, .site-footer__inner, .hero, .cta-wrap, .app { box-sizing: content-box; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { border-top: 1px solid var(--border-soft); }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section__inner { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; flex-wrap: wrap; }

/* ---------- Typography ---------- */
.font-head { font-family: var(--font-head); }
.mono { font-family: var(--font-mono); }
.panel .mono, .panel .kv__val { overflow-wrap: anywhere; }
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.text-accent { color: var(--accent); }
.text-gain { color: var(--gain); }
.text-risk { color: var(--risk); }
.accent-word {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 500;
  font-size: 1.12em;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--text-3);
}
.eyebrow::before { content: ""; display: block; width: 40px; height: 1px; background: var(--rule-strong); }
.label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--text-3);
}
.h1 {
  max-width: 13ch;
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(46px, 6.6vw, 100px); line-height: 0.98; letter-spacing: -0.045em;
}
.h2 {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(34px, 4.4vw, 60px); line-height: 1.02; letter-spacing: -0.04em;
}
.h2--cta { font-size: clamp(32px, 4vw, 56px); line-height: 1.04; max-width: 15ch; }
.h3 { font-family: var(--font-head); font-weight: 600; font-size: 22px; letter-spacing: -0.02em; }
.h3--lg { font-size: 24px; }
.h-page {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(32px, 3.6vw, 48px); line-height: 1.04; letter-spacing: -0.04em;
}
.lead { max-width: 34em; font-size: clamp(17px, 1.4vw, 19px); color: var(--text-2); }
.body-sm { font-size: 15px; }
.body-md { font-size: 16px; }

/* ---------- Header / footer ---------- */
.site-header {
  max-width: 1240px; margin: 0 auto; padding: 24px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--text); }
.brand__name { font-family: var(--font-head); font-weight: 600; font-size: 22px; letter-spacing: -0.03em; }
.nav { display: flex; align-items: center; gap: 8px 28px; flex-wrap: wrap; }
.nav__link {
  color: var(--text-2); text-decoration: none; font-size: 15px;
  min-height: 44px; display: inline-flex; align-items: center;
}
.nav__link.is-active { color: var(--text); }
.nav__wallet {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 12px; color: var(--text-2); text-decoration: none; background: none; cursor: pointer;
}
.site-footer { border-top: 1px solid var(--border-soft); }
.site-footer__inner {
  max-width: 1240px; margin: 0 auto; padding: 32px var(--gutter) 48px;
  display: flex; flex-wrap: wrap; gap: 20px 48px; justify-content: space-between; align-items: flex-start;
}
.site-footer__brand { font-family: var(--font-head); font-weight: 600; font-size: 18px; letter-spacing: -0.03em; }
.site-footer__note { flex: 1 1 360px; max-width: 46em; font-size: 14px; color: var(--text-3); }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 14px; }
.site-footer__nav a { color: var(--text-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; border: 0; cursor: pointer; font-family: var(--font-body);
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { color: var(--on-accent); }
.btn--sm { min-height: 44px; padding: 0 20px; border-radius: var(--radius); font-weight: 600; font-size: 15px; }
.btn--lg {
  min-height: 56px; padding: 0 28px; border-radius: var(--radius-md);
  font-family: var(--font-head); font-weight: 600; font-size: 17px;
}
.btn--outline {
  min-height: 48px; padding: 0 22px; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: none; color: var(--text); font-weight: 500;
}
.btn--ghost {
  min-height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px;
  background: none; color: var(--text-2); font-size: 14px;
}
.btn--danger { border-color: rgba(224, 122, 95, .5); color: var(--risk); }
.link-arrow {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--text); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--rule-strong);
}

.link { color: var(--text); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--accent); }

/* ---------- Audit report ---------- */
.audit-card { font-family: var(--font-mono); font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.audit-card__first { color: var(--text); }
.evidence-refs { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.shot { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.shot img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.shot figcaption { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.list-plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.list-plain li { font-size: 15px; overflow-wrap: anywhere; }

/* ---------- Home: hero ---------- */
.hero {
  max-width: 1240px; margin: 0 auto;
  padding: clamp(40px, 6vw, 88px) var(--gutter) clamp(72px, 9vw, 128px);
  display: flex; flex-wrap: wrap; gap: 56px clamp(40px, 5vw, 80px); align-items: flex-end;
}
.hero__main { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.hero__aside { flex: 1 1 360px; min-width: 0; max-width: 460px; display: flex; flex-direction: column; gap: 12px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px;
}
.card--flat { background: none; }
.card--accent { border-color: var(--accent); }
.card__stack { display: flex; flex-direction: column; gap: 22px; }
.report__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.report__symbol { font-family: var(--font-head); font-weight: 600; font-size: 30px; line-height: 1.1; letter-spacing: -0.03em; }
.report__addr { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }

.score { position: relative; flex: none; width: 84px; height: 84px; }
.score__value {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.score__num { font-family: var(--font-head); font-weight: 600; font-size: 26px; letter-spacing: -0.03em; }
.score__max { margin-top: 4px; font-family: var(--font-mono); font-size: 10px; color: var(--text-3); }

.checklist { display: flex; flex-direction: column; }
.checklist__item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.checklist__icon { flex: none; }
.checklist__name { flex: 1 1 auto; font-size: 15px; }
.checklist__value { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }
.checklist__value--risk { color: var(--risk); }
.checklist__value--gain { color: var(--gain); }

.inset { background: var(--surface-2); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.inset__row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }

.verdict { display: flex; align-items: center; gap: 12px; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.dot--gain { background: var(--gain); }
.dot--risk { background: var(--risk); }
.dot--muted { background: var(--text-3); }

.ticker {
  align-self: flex-end; width: min(100%, 400px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px 18px; display: flex; flex-direction: column; gap: 10px;
}
.ticker__line { display: flex; gap: 14px; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.ticker__time { flex: none; width: 44px; font-family: var(--font-mono); font-size: 11px; line-height: 1.9; color: var(--text-3); }
.ticker__time--now { color: var(--accent); }

/* ---------- Home: stages ---------- */
.section-head { display: flex; flex-wrap: wrap; gap: 24px 64px; justify-content: space-between; align-items: flex-end; }
.section-head .h2 { flex: 1 1 520px; max-width: 14ch; }
.section-head p { flex: 1 1 320px; max-width: 30em; color: var(--text-2); }
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 56px 32px; }
.stage { position: relative; border-top: 1px solid var(--rule); padding-top: 36px; display: flex; flex-direction: column; gap: 14px; }
.stage::before {
  content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
}
.stage__num { font-family: var(--font-accent); font-style: italic; font-weight: 500; font-size: 60px; line-height: 0.8; color: var(--accent); }
.stage__text { font-size: 16px; color: var(--text-2); }
.stage__out { margin-top: auto; padding-top: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }

/* ---------- Home: start steps ---------- */
.split { display: flex; flex-wrap: wrap; gap: 56px clamp(40px, 6vw, 96px); align-items: flex-start; }
.split__side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.split__side--wide { flex-basis: 360px; }
.split__main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; }
.split__main--gap { gap: 16px; }
.h2--narrow { max-width: 10ch; }
.side-note { max-width: 26em; color: var(--text-2); }
.big-figure {
  margin-top: 16px; padding-top: 28px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px;
}
.big-figure__num { font-family: var(--font-head); font-weight: 600; font-size: 60px; line-height: 1; letter-spacing: -0.045em; color: var(--accent); }
.big-figure__text { flex: 1 1 180px; max-width: 20em; font-size: 15px; color: var(--text-2); }
.steps__item { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px 16px; padding: 28px 0; border-top: 1px solid var(--border); }
.steps__item:last-child { padding-bottom: 0; }
.steps__num { padding-top: 7px; font-family: var(--font-mono); font-size: 13px; color: var(--text-3); }
.steps__body { display: flex; flex-direction: column; gap: 8px; }
.steps__body p { font-size: 16px; color: var(--text-2); }
.ip-chip {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 12px; padding: 10px 14px;
  border: 1px dashed var(--rule-strong); border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 13px; color: var(--text-2);
}
.ip-chip__value { color: var(--text); }
.steps__body .ip-chip { font-size: 13px; color: var(--text-2); }

/* ---------- Home: pricing ---------- */
.tier {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px;
  padding: 28px clamp(20px, 3vw, 32px); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.tier--accent { background: var(--surface); border-color: var(--accent); }
.tier__name { flex: 1 1 220px; display: flex; flex-direction: column; gap: 4px; }
.tier__title { font-family: var(--font-head); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.tier__rate { font-family: var(--font-head); font-weight: 600; font-size: clamp(52px, 5.4vw, 76px); line-height: 1; letter-spacing: -0.05em; }
.tier__unit { flex: 0 1 140px; font-size: 15px; color: var(--text-2); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px 32px; padding-top: 20px; }
.fact { display: flex; flex-direction: column; gap: 8px; }
.fact p:last-child { font-size: 15px; color: var(--text-2); }

.cta-wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter) clamp(64px, 9vw, 120px); }
.cta {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: clamp(32px, 5vw, 72px); display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: flex-end; justify-content: space-between;
}
.cta__text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.cta__text p { max-width: 34em; color: var(--text-2); }

/* ---------- App pages (dashboard / agent) ---------- */
.app { max-width: 1240px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) var(--gutter) clamp(64px, 8vw, 112px); display: flex; flex-direction: column; gap: 28px; }
.app__head { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: flex-end; }
.app__head p { max-width: 36em; color: var(--text-2); }
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 960px) { .grid--main { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.panel--flat { background: none; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel__title { font-family: var(--font-head); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.panel__hint { font-size: 14px; color: var(--text-3); }
.stat { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stat__value { font-family: var(--font-mono); font-size: 22px; letter-spacing: -0.02em; color: var(--text); overflow-wrap: anywhere; }
.stat__value--lg { font-family: var(--font-head); font-weight: 600; font-size: 40px; letter-spacing: -0.04em; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px 24px; }
.kv { display: flex; flex-direction: column; }
.kv__row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.kv__row:first-child { border-top: 0; padding-top: 0; }
.kv__key { color: var(--text-2); }
.kv__val { font-family: var(--font-mono); font-size: 13px; text-align: right; overflow-wrap: anywhere; }

.notice {
  display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px;
  border: 1px solid var(--rule-strong); border-radius: var(--radius-md); background: var(--surface);
}
.notice__body { flex: 1 1 auto; font-size: 15px; color: var(--text-2); }
.notice__body strong { color: var(--text); font-weight: 600; }
.notice--risk { border-color: rgba(224, 122, 95, .45); }
.notice--accent { border-color: rgba(200, 232, 107, .45); }
.icon-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border: 1px solid var(--border); border-radius: 10px; background: none; color: var(--text-2); cursor: pointer;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 14px; color: var(--text-2); }
.input, .textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg); color: var(--text); font-family: var(--font-mono); font-size: 13px;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus { outline: none; border-color: var(--accent); }
.form-error { font-size: 14px; color: var(--risk); }
.form-ok { font-size: 14px; color: var(--gain); }

.codebox {
  position: relative; padding: 14px 16px; border: 1px dashed var(--rule-strong); border-radius: 12px;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.6; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere;
}
.copy-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.range { width: 100%; accent-color: var(--accent); }
.range-scale { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }

.badge {
  display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 999px; font-family: var(--font-mono); font-size: 11px; color: var(--text-2);
}
.badge--accent { border-color: rgba(200, 232, 107, .5); color: var(--accent); }
.badge--gain { border-color: rgba(127, 183, 126, .5); color: var(--gain); }
.badge--risk { border-color: rgba(224, 122, 95, .5); color: var(--risk); }

.checks { display: flex; flex-direction: column; }
.checks__item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.checks__item:first-child { border-top: 0; }
.checks__name { font-size: 15px; }
.checks__detail { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); text-align: right; }
.checks__detail--fail { color: var(--risk); }
.checks__detail--ok { color: var(--gain); }

.tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius); align-self: flex-start; flex-wrap: wrap; }
.tab {
  min-height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: none;
  color: var(--text-2); font-size: 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
}
.tab.is-active, .tab[aria-selected="true"] { background: var(--surface-2); color: var(--text); }

.feed { display: flex; flex-direction: column; max-height: 640px; overflow-y: auto; }
.feed__item { display: grid; grid-template-columns: 64px 92px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
.feed__item:first-child { border-top: 0; }
.feed__time { font-family: var(--font-mono); font-size: 11px; line-height: 1.9; color: var(--text-3); }
.feed__type { font-family: var(--font-mono); font-size: 11px; line-height: 1.9; color: var(--text-2); }
.feed__type--bought, .feed__type--sold { color: var(--accent); }
.feed__type--rejected, .feed__type--warning { color: var(--risk); }
.feed__type--audit { color: var(--gain); }
.feed__msg { color: var(--text-2); overflow-wrap: anywhere; }
.feed__msg strong { color: var(--text); font-weight: 600; }
@media (max-width: 560px) { .feed__item { grid-template-columns: 52px minmax(0, 1fr); } .feed__type { display: none; } }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-family: var(--font-mono); font-weight: 400; font-size: 11px; letter-spacing: .04em; color: var(--text-3); padding: 0 12px 10px 0; }
.table td { padding: 12px 12px 12px 0; border-top: 1px solid var(--line); white-space: nowrap; }
.table td.num { font-family: var(--font-mono); font-size: 13px; }
.empty { padding: 28px 0; color: var(--text-3); font-size: 15px; }

.chart { width: 100%; height: auto; overflow: visible; }
.chart-wrap { position: relative; min-width: 560px; }
.chart text { font-size: 11px; }
.chart-tip {
  position: absolute; top: 4px; transform: translateX(-50%); pointer-events: none; white-space: nowrap;
  display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface-2); font-size: 12px; color: var(--text-2);
}
.chart-tip strong { font-family: var(--font-mono); font-weight: 500; font-size: 13px; color: var(--text); }
.chart .chart__end { fill: var(--text); font-size: 11px; }
.pnl-arrow { display: inline-block; width: 0; height: 0; margin-right: 8px; vertical-align: middle;
  border-left: 6px solid transparent; border-right: 6px solid transparent; }
.pnl-arrow--up { border-bottom: 9px solid var(--gain); }
.pnl-arrow--down { border-top: 9px solid var(--risk); }
.chart text { font-family: var(--font-mono); font-size: 10px; fill: var(--text-3); }
.pnl-scale { display: flex; flex-direction: column; gap: 8px; }
.pnl-scale__bar { position: relative; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pnl-scale__fill { position: absolute; top: 0; bottom: 0; }
.pnl-scale__fill--gain { background: var(--gain); }
.pnl-scale__fill--risk { background: var(--risk); }
.pnl-scale__mid { position: absolute; top: -3px; bottom: -3px; left: 50%; width: 1px; background: var(--rule-strong); }
.pnl-scale__labels { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }

.status { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 13px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 11, 9, .72); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal ol { display: flex; flex-direction: column; gap: 10px; counter-reset: s; }
.modal ol li { counter-increment: s; display: grid; grid-template-columns: 28px minmax(0, 1fr); font-size: 15px; color: var(--text-2); }
.modal ol li::before { content: counter(s, decimal-leading-zero); font-family: var(--font-mono); font-size: 12px; color: var(--text-3); padding-top: 3px; }

.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
