/* Investor portal. Layout: a statement, not a marketing page — one column of
   ruled sections on a cool paper ground, figures right-aligned in tabular numerals. */
:root {
  --bg: #f2f5f7;
  --surface: #ffffff;
  --ink: #16212b;
  --muted: #556371;
  --line: #d7dee5;
  --accent: #14506b;
  --accent-ink: #ffffff;
  --accent-soft: #e2edf2;
  --good: #1c6f47;
  --good-soft: #e1f1e8;
  --attn: #8a5600;
  --attn-soft: #fbefd6;
  --crit: #a8261f;
  --crit-soft: #fbe6e4;
  --series-1: #2a78d6;
  --series-ref: #6f7d8b;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f151b; --surface: #172029; --ink: #e7edf2; --muted: #9ba8b5; --line: #2b3742;
    --accent: #74b9d6; --accent-ink: #0b1419; --accent-soft: #1b323d;
    --good: #63c596; --good-soft: #173326; --attn: #e3ad55; --attn-soft: #3a2c10;
    --crit: #f18b83; --crit-soft: #3d1a17; --series-1: #3987e5; --series-ref: #8a97a5;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f151b; --surface: #172029; --ink: #e7edf2; --muted: #9ba8b5; --line: #2b3742;
  --accent: #74b9d6; --accent-ink: #0b1419; --accent-soft: #1b323d;
  --good: #63c596; --good-soft: #173326; --attn: #e3ad55; --attn-soft: #3a2c10;
  --crit: #f18b83; --crit-soft: #3d1a17; --series-1: #3987e5; --series-ref: #8a97a5;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; font-weight: 650; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0; }

.wrap {
  max-width: 1080px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
main.wrap { padding-block: 28px 56px; display: flex; flex-direction: column; gap: 28px; min-height: 60vh; }
.narrow { max-width: 620px; width: 100%; margin-inline: auto; display: flex; flex-direction: column; gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 0.95em; }
.prose { max-width: 66ch; display: flex; flex-direction: column; gap: 12px; }
.prose ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }

/* Header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 650; }
.brand small { display: block; font-weight: 400; font-size: 0.8rem; color: var(--muted); }
.brand-mark { width: 30px; height: 30px; flex: none; border: 2px solid var(--accent); background:
  linear-gradient(var(--accent), var(--accent)) 6px 100% / 6px 60% no-repeat,
  linear-gradient(var(--accent), var(--accent)) 16px 100% / 6px 85% no-repeat; }
.who { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; color: var(--muted); }
.tabs { display: flex; gap: 4px; overflow-x: auto; }
.tabs a { padding: 10px 12px; color: var(--muted); text-decoration: none; font-size: 0.95rem; white-space: nowrap; border-bottom: 3px solid transparent; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }

/* Footer */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; }
.foot .wrap { padding-block: 20px 28px; display: flex; flex-direction: column; gap: 8px; }
.foot p { max-width: 90ch; }

/* Sections */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.eyebrow { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* Figures */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border: 1px solid var(--line); border-radius: 6px; background: var(--surface); overflow: hidden; }
.figure { padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.figure b { font-size: 1.6rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.figure span { font-size: 0.8rem; color: var(--muted); }
.up { color: var(--good); }
.down { color: var(--crit); }

/* Tables */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tfoot td { font-weight: 650; border-top: 2px solid var(--ink); border-bottom: 0; }
th.num { text-align: right; }
td:first-child, th:first-child { padding-left: 0; }
td:last-child, th:last-child { padding-right: 0; }
.empty { color: var(--muted); padding: 8px 0; }

/* Definition rows */
.facts { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 8px 16px; margin: 0; }
.facts dt { color: var(--muted); font-size: 0.875rem; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; gap: 2px 0; } .facts dd { margin-bottom: 8px; } }

/* Pills, notices */
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.pill-good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.pill-attn { background: var(--attn-soft); color: var(--attn); border-color: transparent; }
.pill-info { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pill-crit { background: var(--crit-soft); color: var(--crit); border-color: transparent; }
.notice { padding: 12px 16px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); }
.notice-ok { background: var(--good-soft); border-color: transparent; }
.notice-error { background: var(--crit-soft); border-color: transparent; }
.notice-info { background: var(--accent-soft); border-color: transparent; }
.notice-warn { background: var(--attn-soft); border-color: transparent; }
.callout { border: 1px solid var(--line); border-left: 4px solid var(--attn); background: var(--surface); padding: 14px 16px; border-radius: 4px; display: flex; flex-direction: column; gap: 6px; }

/* Forms */
form.stack { gap: 18px; }
label { font-weight: 600; font-size: 0.93rem; display: block; margin-bottom: 4px; }
.hint { font-size: 0.83rem; color: var(--muted); font-weight: 400; display: block; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=file], select, textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 4px;
}
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
textarea { min-height: 96px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
legend { font-weight: 650; padding: 0; margin-bottom: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 0; }
.check input { margin-top: 5px; flex: none; width: 16px; height: 16px; accent-color: var(--accent); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.inline > div { flex: 1 1 140px; min-width: 0; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn { display: inline-block; padding: 10px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 4px; }
.btn:hover { filter: brightness(1.12); }
.btn-quiet { background: transparent; color: var(--accent); border-color: var(--line); padding: 6px 12px; font-size: 0.9rem; }
.btn-quiet:hover { border-color: var(--accent); filter: none; }
.btn-danger { background: transparent; color: var(--crit); border-color: var(--crit); padding: 6px 12px; font-size: 0.9rem; }

/* Public landing */
.lede { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); counter-reset: step; overflow: hidden; }
.steps li { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; counter-increment: step; }
.steps li::before { content: "Step " counter(step); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 700; }

/* Offering cards */
.offer { display: flex; flex-direction: column; gap: 10px; }
.offer h3 a { color: var(--ink); text-decoration: none; }
.offer h3 a:hover { text-decoration: underline; }

/* Wire block */
.wire { border: 1px solid var(--line); border-radius: 4px; padding: 16px; background: var(--bg); font-family: var(--mono); font-size: 0.92rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.refcode { font-family: var(--mono); font-weight: 700; letter-spacing: 0.06em; padding: 2px 8px; border: 1px dashed var(--muted); border-radius: 4px; }

/* Chart */
.chart { width: 100%; height: auto; display: block; }
.chart-scroll { overflow-x: auto; }
.chart-scroll .chart { min-width: 520px; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-tick { fill: var(--muted); font: 12px var(--sans); font-variant-numeric: tabular-nums; }
.ch-ref { stroke: var(--series-ref); stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; }
.ch-val { stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.ch-label { fill: var(--muted); font: 12px var(--sans); }
.ch-num { fill: var(--ink); font: 600 13px var(--sans); font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.83rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 18px; height: 0; border-top: 2px solid var(--series-1); }
.legend i.ref { border-top: 2px dashed var(--series-ref); }

@media (max-width: 600px) {
  h1 { font-size: 1.45rem; }
  .panel { padding: 16px; }
  .figure b { font-size: 1.35rem; }
}

.brand-logo { height: 46px; width: auto; }