/* fst4.css — the content stylesheet of the FST4 web's hand-written and
 * generated pages. The frame around the content (top bar, vertical menu,
 * footer) is chrome.css, shared with the introduction and the Doxygen
 * reference.
 *
 * Design system: the token set established by FST4_INTRO.html (warm paper
 * background, near-black ink, blue as the primary accent among a small
 * multi-hue series palette, light/dark via prefers-color-scheme) — the same
 * family doc/fst4_doxygen.css applies to the Doxygen API reference, so every
 * corner of the site reads as one system. Self-contained: no external fonts,
 * no scripts required for rendering, no trackers.
 */

:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11,11,11,0.10);
  --s1: #2a78d6;  /* blue   — primary accent, links */
  --s2: #1baf7a;  /* aqua   — secondary series */
  --s3: #eda100;  /* yellow — tertiary series */
  --s5: #4a3aa7;  /* violet */
  --s6: #e34948;  /* red — caveats only */
  --tint-info: rgba(42,120,214,0.07);
  --tint-warn: rgba(227,73,72,0.07);
  --code-bg: #16181c;
  --code-ink: #e8e6df;
  --code-flag: #86b6ef;
  --code-cmt: #8f8d85;
  --hero-bg: linear-gradient(160deg, #101318 0%, #1a1d24 55%, #16222c 100%);
  --hero-ink: #f4f3ee;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255,255,255,0.12);
    --s1: #3987e5;
    --s2: #199e70;
    --s3: #c98500;
    --s5: #9085e9;
    --s6: #e66767;
    --tint-info: rgba(57,135,229,0.12);
    --tint-warn: rgba(230,103,103,0.12);
    --code-bg: #131417;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
  font-size: 16px;
}
.wrap { max-width: 940px; margin: 0 auto; padding: 0 20px; }

/* ---------- landing hero (a band at the top of the content column) ---------- */
main.landing { padding-top: 0; }
.hero { background: var(--hero-bg); color: var(--hero-ink); padding: 34px 0 36px; margin-bottom: 10px; }
.hero .eyebrow {
  font-size: 12px; letter-spacing: 2.4px; text-transform: uppercase;
  color: #9aa5b1; margin-bottom: 10px;
}
.hero h1 { font-size: 34px; line-height: 1.2; margin: 0 0 14px; font-weight: 700; max-width: 720px; }
.hero p { color: #c7cdd4; margin: 0 0 10px; font-size: 17px; max-width: 720px; }

/* ---------- landing hero: two columns, badges, buttons ---------- */
.hero .wrap.cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr); gap: 34px; align-items: center; }
.hero .cols h1 { font-size: 36px; text-wrap: balance; }
.hero .lede { font-size: 17px; }
.hero .lede2 { font-size: 15.5px; color: #aeb6bf; }
.hero .art svg { width: 100%; height: auto; display: block; }
.hero .badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 18px; padding: 0; list-style: none; }
.hero .badges li { font-size: 12.5px; color: #dfe4ea; border: 1px solid rgba(255,255,255,0.22); border-radius: 999px; padding: 4px 11px; margin: 0; }
.hero .badges sup { font-size: 0.72em; line-height: 0; position: relative; top: -0.45em; vertical-align: baseline; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 0; }
.hero .btn { display: inline-block; padding: 9px 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.4); color: #f4f3ee; text-decoration: none; font-weight: 600; font-size: 15px; }
.hero .btn:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.hero .btn.primary { background: var(--s1); border-color: var(--s1); color: #fff; }
.hero .btn.primary:hover { filter: brightness(1.1); }
@media (max-width: 760px) {
  .hero .wrap.cols { grid-template-columns: 1fr; gap: 20px; }
  .hero .art { max-width: 400px; }
  .hero .cols h1 { font-size: 32px; }
}
/* ---------- landing: audience cards, start list ---------- */
.card.audience { border-top: 3px solid var(--s5); }
.card.audience h3 { color: var(--s5); }
ul.start { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 12px 0 0; }
ul.start li { border-left: 3px solid var(--s1); padding: 2px 0 2px 12px; font-size: 15px; color: var(--ink-2); margin: 0; }
ul.start li a { font-weight: 700; }
/* ---------- content ---------- */
main { padding: 30px 0 40px; }
h2 { font-size: 24px; margin: 2em 0 0.6em; line-height: 1.25; }
main > .wrap > h2:first-child, section > h2:first-child { margin-top: 0.6em; }
h3 { font-size: 18.5px; margin: 1.6em 0 0.5em; }
h4 { font-size: 16px; margin: 1.3em 0 0.4em; }
p { margin: 0.6em 0; }
a { color: var(--s1); }
a:hover { text-decoration-thickness: 2px; }
ul, ol { padding-left: 26px; }
li { margin: 0.3em 0; }
hr { border: 0; border-top: 1px solid var(--grid); margin: 2em 0; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 18px; margin: 14px 0;
}
.card h3 { margin-top: 0.2em; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 16px 0; }
.card-grid .card { margin: 0; }
.card.cta {
  border-left: 4px solid var(--s1); background: var(--tint-info);
}
.card.cta .go { font-weight: 700; }

/* ---------- callouts ---------- */
.callout {
  border-left: 4px solid var(--s1); background: var(--tint-info);
  border-radius: 0 8px 8px 0; padding: 10px 16px; margin: 14px 0;
}
.callout.warn { border-left-color: var(--s6); background: var(--tint-warn); }
.callout p { margin: 0.4em 0; }

/* ---------- code ---------- */
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--grid); padding: 1px 5px; border-radius: 4px;
}
pre.cmd {
  background: var(--code-bg); color: var(--code-ink);
  padding: 12px 16px; border-radius: 8px; overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px; line-height: 1.5;
}
pre.cmd .f { color: var(--code-flag); }
pre.cmd .c { color: var(--code-cmt); font-style: italic; }
pre.cmd code { background: none; padding: 0; font-size: inherit; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; margin: 14px 0; }
table.data { border-collapse: collapse; width: 100%; font-size: 14.5px; }
table.data th {
  text-align: left; background: var(--surface); border-bottom: 2px solid var(--axis);
  padding: 7px 10px; white-space: nowrap;
}
table.data td { border-bottom: 1px solid var(--grid); padding: 7px 10px; vertical-align: top; }

/* ---------- news ---------- */
ul.news { list-style: none; padding: 0; margin: 10px 0; }
ul.news li {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px; margin: 10px 0;
}
ul.news .date {
  display: inline-block; font-weight: 700; font-size: 13px;
  color: var(--s1); margin-right: 8px; white-space: nowrap;
}

/* ---------- testimonials ---------- */
.voices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 16px 0; }
.voices blockquote {
  margin: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; font-style: italic; color: var(--ink-2);
  font-size: 14.5px;
}
.voices blockquote footer { margin-top: 8px; font-style: normal; color: var(--muted); font-size: 13px; }

/* ---------- demo browser ---------- */
details.demo {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; margin: 8px 0; padding: 0;
}
details.demo > summary {
  cursor: pointer; padding: 10px 14px; font-weight: 600; list-style-position: inside;
}
details.demo > summary .tag {
  font-weight: 400; color: var(--muted); font-size: 13.5px; margin-left: 6px;
}
details.demo[open] > summary { border-bottom: 1px solid var(--grid); }
details.demo .body { padding: 4px 16px 14px; }
details.demo .desc { color: var(--ink-2); font-size: 14.5px; }

/* ---------- references ---------- */
ol.refs { padding-left: 30px; }
ol.refs li { margin: 0.7em 0; }
ol.refs .note { display: block; color: var(--muted); font-size: 13.5px; font-style: italic; }

/* ---------- print ---------- */
@media print {
  .hero { background: none; color: black; }
  .hero p, .hero .eyebrow { color: black; }
  pre.cmd { white-space: pre-wrap; }
  .card, details.demo { break-inside: avoid; }
  details.demo:not([open]) > .body { display: block; }
}
