/* matthiasjakisch.com: system fonts, no external resources, light and dark from the same tokens.
   Chart series in the fixed order AT-UT (s1), base mix (s2), US market (s3), validated palette (dataviz reference instance). */
:root {
  color-scheme: light;
  --surface: #fcfcfb;
  --surface-2: #f2f1ed;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --line: #d9d8d2;
  --accent: #1f5fae;
  --flag-bg: #fff4d6;
  --flag-ink: #4a3500;
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface: #1a1a19;
    --surface-2: #252523;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --line: #3d3c38;
    --accent: #8db8f0;
    --flag-bg: #3a2f12;
    --flag-ink: #f6e2a8;
    --s1: #3987e5;
    --s2: #d95926;
    --s3: #199e70;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #1a1a19;
  --surface-2: #252523;
  --ink: #f0efec;
  --ink-2: #c3c2b7;
  --line: #3d3c38;
  --accent: #8db8f0;
  --flag-bg: #3a2f12;
  --flag-ink: #f6e2a8;
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: 0.15em; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 50rem; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 12px; }
.skip:focus { left: 8px; z-index: 10; }

.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding-top: 12px; padding-bottom: 8px; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.1rem; margin-right: auto; }
.lang { font-size: 0.95rem; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 4px; }
.top nav { flex-basis: 100%; }
.top nav a { display: inline-block; padding: 8px 10px 8px 0; margin-right: 6px; color: var(--ink-2); text-decoration: none; min-height: 44px; line-height: 28px; }
.top nav a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; }

main { padding-top: 8px; padding-bottom: 32px; }
h1 { font-size: 1.75rem; line-height: 1.25; margin: 24px 0 12px; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 32px 0 8px; }
h3 { font-size: 1.05rem; margin: 20px 0 6px; }
.lead { font-size: 1.1rem; color: var(--ink); }
.note, .meta, figcaption, caption { color: var(--ink-2); font-size: 0.92rem; }
.flag { background: var(--flag-bg); color: var(--flag-ink); padding: 8px 12px; border-radius: 6px; font-weight: 600; }

.cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: var(--surface-2); border-radius: 8px; padding: 12px 16px; }
.card h3 { margin-top: 4px; }
.big { font-size: 1.9rem; font-weight: 700; margin: 4px 0; font-variant-numeric: tabular-nums; }

.facts dt, .dates dt { font-weight: 600; margin-top: 8px; }
.facts dd, .dates dd { margin: 0 0 4px; }
.dates { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; }
.dates dt { margin-top: 0; }
.more li, .downloads li, .stamps li { margin-bottom: 8px; }

.scroll { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
caption { text-align: left; padding-bottom: 4px; }
th, td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--line); }
thead th { font-weight: 600; border-bottom: 2px solid var(--line); }
tbody th { font-weight: 500; }
.files th { word-break: break-all; min-width: 10rem; }
code { font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 0.85rem; }
.hash { word-break: break-all; }
pre { background: var(--surface-2); padding: 12px; border-radius: 6px; overflow-x: auto; }

.entry { border-top: 1px solid var(--line); margin-top: 24px; }
.status { display: inline-block; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: var(--surface-2); }
.status-running::before { content: "● "; color: var(--s3); }
.status-amendment::before { content: "◆ "; color: var(--s1); }
.status-discarded::before { content: "✕ "; color: var(--ink-2); }
.status-information::before { content: "○ "; color: var(--ink-2); }
.toc ul { display: flex; flex-wrap: wrap; gap: 4px 16px; }

figure { margin: 16px 0; }
.legend { list-style: none; padding: 0; margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.92rem; }
.key { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.key.s1 { background: var(--s1); }
.key.s2 { background: var(--s2); }
.key.s3 { background: var(--s3); }
.chart { width: 100%; max-width: 640px; height: auto; display: block; }
.chart text { fill: var(--ink-2); font-size: 13px; font-family: inherit; }
.chart .label, .chart .group { fill: var(--ink); font-size: 14px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--ink-2); stroke-width: 1; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.s1 { stroke: var(--s1); }
.chart .line.s2 { stroke: var(--s2); stroke-dasharray: 6 4; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot.s1, .chart .bar.s1 { fill: var(--s1); }
.chart .dot.s2, .chart .bar.s2 { fill: var(--s2); }
.chart .bar.s3 { fill: var(--s3); }
.chart .hit { fill: transparent; }

.about { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 640px) { .about { grid-template-columns: 200px 1fr; } }
.photo { width: 160px; height: 160px; border-radius: 50%; }
.monogram circle { fill: var(--accent); }
.monogram text { fill: var(--surface); font-size: 88px; font-weight: 700; font-family: inherit; }
address { font-style: normal; }
.holding { padding-top: 64px; }

.foot { border-top: 1px solid var(--line); background: var(--surface-2); padding: 16px 0 24px; font-size: 0.92rem; }
.foot .risk { font-weight: 600; }
