:root {
  --bg: #ffffff;
  --surface: #f5f7fa;
  --border: #dde1e7;
  --text: #1b1f24;
  --muted: #5d6673;
  --accent: #1f5fbf;
  --accent-ink: #ffffff;
  --hero: #0f2747;
  --hero-text: #e8eef7;
  --code-bg: #f0f2f5;
  --note-bg: #fff6e0;
  --note-border: #f0c75e;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --surface: #151b23;
    --border: #2a333f;
    --text: #e6edf3;
    --muted: #9aa5b1;
    --accent: #5b9cf5;
    --accent-ink: #0d1117;
    --hero: #0a1a30;
    --hero-text: #e6edf3;
    --code-bg: #1c232d;
    --note-bg: #2b2210;
    --note-border: #7a5d18;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px; }
.hero { background: var(--hero); color: var(--hero-text); padding: 48px 0 40px; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.2; margin: .3rem 0 .8rem; }
.hero .lede { max-width: 720px; opacity: .9; margin: 0 0 1.2rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .07em; font-size: .75rem; opacity: .8; margin: 0; }
.btn { display: inline-block; background: #5b9cf5; color: #0d1117; font-weight: 650; padding: 9px 16px; border-radius: 8px; text-decoration: none; }
.toc { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.toc a { text-decoration: none; }
.prose section { padding: 28px 0 8px; }
.prose h2 { font-size: 1.35rem; margin: 0 0 .6rem; }
.prose h3 { font-size: 1.02rem; margin: 1.2rem 0 .4rem; }
.prose li + li { margin-top: .35rem; }
code { font-family: var(--mono); font-size: .88em; background: var(--code-bg); padding: 1px 5px; border-radius: 4px; }
pre { background: var(--code-bg); border-radius: 8px; padding: 14px 16px; overflow-x: auto; }
pre code { background: none; padding: 0; font-size: .82rem; line-height: 1.6; }
figure { margin: 0 0 1rem; }
figure img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: 12px; }
figcaption { color: var(--muted); font-size: .88rem; margin-top: .4rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; margin: .8rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 8px 10px; vertical-align: top; }
th { background: var(--surface); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
td { border-top: 1px solid var(--border); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px 18px 10px; }
.note { background: var(--note-bg); border: 1px solid var(--note-border); border-radius: 8px; padding: 10px 14px; font-size: .92rem; }
.footer { color: var(--muted); font-size: .88rem; padding-top: 24px; padding-bottom: 32px; border-top: 1px solid var(--border); margin-top: 24px; }

/* language bar (same look as the other DIPDAP public pages) */
.top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface);
       border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1; }
.home { color: var(--muted); text-decoration: none; font-size: 14px; }
.home:hover { color: var(--accent); }
.grow { flex: 1; }
.lang-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang-opt { font: inherit; font-size: 13px; padding: 4px 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.lang-opt.on { background: var(--accent); color: var(--accent-ink); }
.lang-block[hidden] { display: none; }
.hero-note { font-size: .85rem; opacity: .8; margin-left: 6px; }
