:root { color-scheme: light; --bg: #fff; --text: #202522; --muted: #556159; --subtle: #607065; --border: #dce2dd; --accent: #326c4c; font-family: system-ui, sans-serif; color: var(--text); background: var(--bg); }
:root[data-theme="dark"] { color-scheme: dark; --bg: #161819; --text: #e9edeb; --muted: #b3beb8; --subtle: #a4b8aa; --border: #3b4540; --accent: #96d5ad; }
.theme-control { display: flex; justify-content: flex-end; padding-top: 24px; font-size: 14px; }
.theme-control label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.theme-control input { accent-color: var(--accent); width: 18px; height: 18px; }
:root[data-theme="dark"] .diagram img { filter: invert(1) hue-rotate(180deg); }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: var(--accent); }
a:focus-visible, .diagram:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.site-header, main, .site-footer { width: min(1280px, calc(100% - 80px)); margin-inline: auto; }
.site-header { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--border); }
.brand { font-size: 14px; font-weight: 650; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 28px; font-size: 13px; }
nav a { text-decoration: none; }
.intro { padding: 64px 0 32px; max-width: 760px; }
.eyebrow, .stack { font-family: ui-monospace, monospace; font-size: 11px; color: var(--subtle); line-height: 1.8; }
h1 { font-size: 42px; font-weight: 550; line-height: 1.15; margin: 14px 0 20px; }
.lead { font-size: 18px; line-height: 1.7; color: var(--muted); }
.stack { margin-top: 28px; }
figure { margin: 0 0 64px; }
.diagram { border: 1px solid var(--border); overflow: auto; }
.diagram img { display: block; width: 100%; min-width: 900px; height: auto; color-scheme: light; }
figcaption { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; font-size: 12px; color: var(--muted); }
.flow { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 64px; border-top: 1px solid var(--border); padding: 40px 0 56px; }
h2 { font-size: 24px; line-height: 1.3; font-weight: 550; margin: 12px 0 20px; }
ol { list-style: none; counter-reset: steps; margin: 0; padding: 0; }
li { counter-increment: steps; position: relative; padding: 0 0 28px 48px; }
li::before { content: counter(steps, decimal-leading-zero); position: absolute; left: 0; top: 3px; color: var(--accent); font: 12px ui-monospace, monospace; }
li:last-child { padding-bottom: 0; }
h3 { font-size: 17px; font-weight: 600; margin: 0 0 10px; }
li p, .operations p:not(.eyebrow) { color: var(--muted); font-size: 15px; line-height: 1.8; margin: 0; }
code { font-size: 12px; overflow-wrap: anywhere; }
.operations { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; border-top: 1px solid var(--border); padding: 40px 0 64px; }
.site-footer { display: flex; flex-wrap: wrap; gap: 24px; border-top: 1px solid var(--border); padding: 24px 0; font-size: 12px; color: var(--subtle); }
.site-footer span:first-child { margin-right: auto; }
@media (max-width: 800px) {
  .site-header, main, .site-footer { width: calc(100% - 40px); }
  .intro { padding-top: 40px; }
  h1 { font-size: 32px; }
  .lead { font-size: 16px; }
  .flow { grid-template-columns: 1fr; gap: 24px; }
  .operations { grid-template-columns: 1fr; gap: 36px; }
  figure { margin-bottom: 40px; }
}
@media (max-width: 420px) {
  .site-header { flex-wrap: wrap; padding-block: 20px; gap: 16px; }
  nav { gap: 24px; }
  h1 { font-size: 28px; }
  figcaption { flex-wrap: wrap; gap: 12px; }
  li { padding-left: 36px; }
}
