/* Shared styles for the static pages (SEO landing page, blog). The home page
   is the Flutter app; these pages are plain HTML so search engines can read
   them. Colors follow lib/components/app_palette.dart. */
:root {
  --bg: #ffffff;
  --surface: #f5f8fc;
  --text: #0d1b2a;
  --muted: #4a5a6a;
  --border: #dde5ee;
  --accent: #0b5fd0;
  --accent-soft: #e6f0fd;
  --highlight: #ffb020;
  --cta: #1e96ff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1420;
    --surface: #122030;
    --text: #e8eef5;
    --muted: #a3b3c2;
    --border: #22344a;
    --accent: #5bb2ff;
    --accent-soft: #15304d;
  }
}
/* Manual override via the header toggle (see pages.js), independent of
   the OS setting either way. */
:root[data-theme="dark"] {
  --bg: #0b1420;
  --surface: #122030;
  --text: #e8eef5;
  --muted: #a3b3c2;
  --border: #22344a;
  --accent: #5bb2ff;
  --accent-soft: #15304d;
}
:root[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f5f8fc;
  --text: #0d1b2a;
  --muted: #4a5a6a;
  --border: #dde5ee;
  --accent: #0b5fd0;
  --accent-soft: #e6f0fd;
}

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: transparent; color: var(--text); cursor: pointer;
  font-size: 18px; line-height: 1;
}
.theme-toggle:hover { background: var(--surface); }
@font-face {
  font-family: "Brand Sans";
  src: url("/assets/assets/fonts/brand_sans_regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Brand Sans";
  src: url("/assets/assets/fonts/brand_sans_bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 "Brand Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }

.bar {
  position: sticky; top: 0; z-index: 1;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.bar .wrap { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; }
.brand svg { width: 32px; height: 32px; flex: none; }
.bar nav { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; }
.bar nav a { color: var(--muted); text-decoration: none; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--accent); }
/* Phones: the brand stays on one line and the links move to a row below,
   instead of both wrapping into a cramped two-line header. */
@media (max-width: 600px) {
  .bar .wrap { flex-wrap: wrap; row-gap: 6px; padding-top: 10px; padding-bottom: 8px; }
  .brand { white-space: nowrap; font-size: 16px; }
  .brand svg { width: 28px; height: 28px; }
  .bar nav { margin-left: 0; width: 100%; gap: 20px; font-size: 14px; }
  h2 { scroll-margin-top: 100px; }
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
main { padding: 48px 0 64px; }
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
}
h1 { font-size: clamp(30px, 6vw, 44px); line-height: 1.2; margin: 16px 0; }
h2 { font-size: clamp(24px, 4.5vw, 30px); line-height: 1.3; margin: 48px 0 12px; scroll-margin-top: 72px; }
h3 { font-size: 19px; margin: 24px 0 6px; }
.lead { font-size: 19px; color: var(--muted); }
.meta { font-size: 14px; color: var(--muted); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 20px 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.card h3 { margin-top: 0; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.offer { border: 1.5px solid var(--accent); border-radius: 16px; padding: 28px; background: var(--surface); margin: 20px 0; }
.price { font-size: clamp(32px, 7vw, 44px); font-weight: 700; color: var(--accent); line-height: 1.2; }
.checks { list-style: none; padding: 0; }
.checks li { padding-left: 28px; position: relative; margin: 8px 0; }
.checks li::before { content: "✓"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }

.btn {
  display: inline-block; padding: 14px 26px; border-radius: 4px;
  background: var(--cta); color: #fff; font-weight: 700; text-decoration: none;
}
.btn:hover { background: var(--accent); }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }

details { border-bottom: 1px solid var(--border); padding: 12px 0; }
summary { cursor: pointer; font-weight: 700; }

.posts { list-style: none; padding: 0; }
.posts li { border-bottom: 1px solid var(--border); padding: 20px 0; }
.posts h2 { margin: 4px 0 8px; font-size: 22px; }
.posts h2 a { color: var(--text); text-decoration: none; }
.posts h2 a:hover { color: var(--accent); }

/* Blog index: archive grouped by year, newest year first. */
.archive-year {
  margin: 40px 0 16px; font-size: 13px; font-weight: 700;
  color: var(--muted); letter-spacing: 1.2px; text-transform: uppercase;
}
.archive-year:first-of-type { margin-top: 24px; }

/* Blog post: table of contents built from the post's own <h2>s, as a
   sticky left sidebar next to the article on wide screens. On narrow
   screens the grid collapses to one column and the TOC sits above the
   article instead (post-article.wrap widens to fit both). */
.post-article.wrap { max-width: 1120px; }
.post-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 760px) {
  .post-layout { grid-template-columns: 1fr; gap: 0; }
}
.toc {
  position: sticky; top: 88px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 20px; margin: 24px 0 32px;
}
@media (max-width: 760px) {
  .toc { position: static; }
}
.toc p { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 4px 0; font-size: 15px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

footer { border-top: 1px solid var(--border); padding: 24px 0 40px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* Legal pages: readable lists, and visible gaps still to fill in. */
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
mark.todo { background: #FFF3C4; color: #7A4B00; padding: 0 4px; border-radius: 3px; }

/* ── Investor pages: technical & security due diligence ─────────────────────
   The hero shows an excerpt of a report's first page. It stays a light
   "sheet" in dark mode too, because it stands for a printed document. */
.dd .wrap, .dd.wrap { max-width: 1040px; }
.dd-hero { display: grid; gap: 40px; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); }
.dd-hero .lead { max-width: 34em; }
@media (max-width: 860px) { .dd-hero { grid-template-columns: 1fr; gap: 28px; } }

.sheet {
  --ink: #1c2733; --ink-soft: #55616d; --rule: #e3e7ec; --paper: #ffffff;
  --crit: #b42318; --warn: #b54708; --good: #067647;
  position: relative; margin-top: 8px;
  background: var(--paper); color: var(--ink);
  border: 1px solid #cfd6de; border-radius: 6px;
  padding: 22px 22px 18px; font-size: 14px; line-height: 1.5;
  box-shadow: 8px 8px 0 -1px var(--surface), 8px 8px 0 0 var(--border);
}
.sheet .tag {
  position: absolute; top: -11px; right: 16px;
  background: var(--highlight); color: #3a2600;
  font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 3px;
}
.sheet .doc { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-size: 12px; border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
.sheet h2 { font-size: 17px; margin: 12px 0 10px; color: var(--ink); scroll-margin-top: 0; }
.findings { list-style: none; margin: 0; padding: 0; }
.findings li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.findings li:last-child { border-bottom: 0; }
.sheet .doc span:last-child { white-space: nowrap; }
@media (max-width: 520px) {
  .sheet { padding: 18px 16px 14px; box-shadow: none; }
  .findings li { grid-template-columns: 1fr; gap: 2px; }
}
.level { font-size: 12px; font-weight: 700; display: flex; align-items: baseline; gap: 6px; }
.level::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; transform: translateY(-1px); }
.level.crit { color: var(--crit); } .level.warn { color: var(--warn); } .level.good { color: var(--good); }
.verdict { margin-top: 12px; padding: 10px 12px; border-left: 3px solid var(--warn); background: #fff8ed; color: var(--ink); }
.verdict strong { color: var(--warn); }

.checks-list { display: grid; gap: 8px 40px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 20px 0; }
.checks-list h3 { margin: 0 0 6px; font-size: 18px; }
.checks-list ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 16px; }
.checks-list li { margin: 4px 0; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 20px 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 18px 56px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--accent);
  color: var(--accent); font-weight: 700; display: grid; place-items: center;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 42px; bottom: 4px; width: 1.5px; background: var(--border); }
.steps strong { display: block; }
.steps span { color: var(--muted); font-size: 16px; }

.split { display: grid; gap: 24px 40px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.prices { margin: 0; }
.prices div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.prices dt { margin: 0; } .prices dd { margin: 0; font-weight: 700; color: var(--accent); text-align: right; white-space: nowrap; }
.rules li { margin: 8px 0; }
.who { display: flex; gap: 20px; align-items: flex-start; }

a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* Sample report: a document meant to be read on screen or printed to PDF. */
.report { max-width: 760px; }
.report table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0 20px; }
.report th, .report td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.report th { font-size: 14px; color: var(--muted); }
.report .level { white-space: nowrap; }
.report .crit { color: #b42318; } .report .warn { color: #b54708; } .report .good { color: #067647; }
@media (prefers-color-scheme: dark) { .report .crit { color: #fda29b; } .report .warn { color: #fec84b; } .report .good { color: #75e0a7; } }
.report .notice { border: 1px dashed var(--border); padding: 10px 14px; border-radius: 6px; font-size: 14px; color: var(--muted); }
@media print {
  .bar, footer, .no-print { display: none; }
  body { font-size: 11pt; line-height: 1.5; color: #000; background: #fff; }
  main { padding: 0; }
  .report h2 { break-after: avoid; margin-top: 24pt; }
  .report table, .report .sheet { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}
