/* XDS Global: tokens, base, header, footer, buttons, forms, dialogs, accessibility modes. */
:root {
  --ink: #14213d; --ink-2: #44506b; --ink-3: #5b6782; --paper: #fffdf8; --card: #fff; --line: #e6e1d2;
  --brand: #2f5bff; --brand-dark: #2447d8; --brand-soft: #e9eeff; --sun: #ffc83d;
  --ok: #157a42; --ok-soft: #e3f6ea; --no: #b4410b; --no-soft: #fdeadf;
  --radius: 18px; --shadow: 0 8px 24px rgba(20, 33, 61, 0.08);
  --b-prek: #ff8a3d; --b-k2: #25b26b; --b-35: #2b8cff; --b-68: #8a5cf6; --b-912: #e8456b;
  --bd-prek: #b34f08; --bd-k2: #12743a; --bd-35: #1b5fd0; --bd-68: #6a3dd0; --bd-912: #bf2459;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 106.25%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.t-lg { font-size: 120%; } html.t-xl { font-size: 135%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.6 var(--font); }
html.spacing body { letter-spacing: 0.04em; word-spacing: 0.14em; line-height: 1.85; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0 0 0.8rem; }
a { color: var(--brand-dark); }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid #1b3fd9; outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 200; padding: 0.7rem 1.1rem; border-radius: 0 0 12px 0; background: #fff; font-weight: 700; }
.skip-link:focus { left: 0; }
.boot-note { padding: 3rem 1rem; text-align: center; color: var(--ink-2); }
.muted { color: var(--ink-2); } .dim { color: var(--ink-3); } .center { text-align: center; }
.fine { font-size: 0.82rem; color: var(--ink-3); margin: 0.4rem 0 0; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 1rem; padding: 0.65rem clamp(1rem, 3vw, 2rem); background: rgba(255, 253, 248, 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); font-size: 1.2rem; font-weight: 800; text-decoration: none; }
.brand b { color: var(--brand); }
.site-nav { display: flex; gap: 0.2rem; margin-left: auto; }
.site-nav a { padding: 0.45rem 0.85rem; border-radius: 999px; color: var(--ink-2); font-weight: 700; font-size: 0.95rem; text-decoration: none; }
.site-nav a:hover, .site-nav a.cur { background: var(--brand-soft); color: var(--brand-dark); }
.site-tools { display: flex; align-items: center; gap: 0.5rem; }
.star-badge { padding: 0.2rem 0.7rem; border-radius: 999px; background: #fff3cf; color: #7a5200; font-weight: 800; font-size: 0.88rem; }
.site-tools .menu-btn { display: none; }
@media (max-width: 900px) {
  .site-tools .menu-btn { display: inline-flex; }
  .site-tools { margin-left: auto; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; margin: 0; padding: 0.6rem 1rem 1rem; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
}
@media (max-width: 560px) { .site-tools .btn:not(.btn-primary):not(.menu-btn) { display: none; } }

/* footer */
.site-footer { margin-top: 3rem; padding: 2.2rem clamp(1rem, 3vw, 2rem) 2rem; background: #f4f1e6; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; max-width: 1160px; margin: 0 auto 1.4rem; }
.foot-grid strong { display: block; margin-bottom: 0.4rem; }
.foot-grid a:not(.brand) { display: block; padding: 0.15rem 0; color: var(--ink-2); text-decoration: none; }
.foot-grid a:not(.brand):hover { text-decoration: underline; }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr; gap: 1.2rem; } }

/* buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.6rem; padding: 0.5rem 1.1rem; border: 2px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: 700 0.95rem var(--font); text-decoration: none; cursor: pointer; transition: transform 0.12s, box-shadow 0.12s, background 0.12s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(20, 33, 61, 0.12); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-lg { min-height: 3.1rem; padding: 0.65rem 1.5rem; font-size: 1.05rem; }
.btn-sm { min-height: 2.15rem; padding: 0.3rem 0.85rem; font-size: 0.86rem; }
.btn-icon { width: 2.4rem; min-height: 2.4rem; padding: 0; }
.btn-ghost, .btn-quiet { border-color: transparent; background: transparent; box-shadow: none; }
.btn-quiet { color: var(--no); text-decoration: underline; }
.input { width: 100%; min-height: 2.8rem; padding: 0.5rem 0.9rem; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: 600 1rem var(--font); }
.input:focus { border-color: var(--brand); outline: 3px solid rgba(47, 91, 255, 0.25); outline-offset: 0; }
.name-form { display: grid; gap: 0.5rem; }
.name-form label { font-weight: 800; font-size: 0.9rem; margin-top: 0.3rem; }
.name-form .btn { margin-top: 0.6rem; }
.field { display: grid; gap: 0.5rem; }

/* dialogs and switches */
dialog.xds-dialog { width: min(30rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 0; border-radius: 22px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(20, 33, 61, 0.35); }
dialog.xds-dialog::backdrop { background: rgba(20, 33, 61, 0.5); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.3rem 0.4rem; }
.dlg-head h2 { margin: 0; font-size: 1.3rem; }
.dlg-body { display: grid; gap: 1rem; padding: 0.6rem 1.3rem 1.4rem; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 0.9rem; border: 2px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; }
.switch-row small { display: block; color: var(--ink-3); font-size: 0.82rem; }
.switch-row input { width: 1.4rem; height: 1.4rem; accent-color: var(--brand); flex: none; }
.seg-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.seg { padding: 0.45rem 1rem; border: 2px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: 700 0.92rem var(--font); cursor: pointer; }
.seg.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }

/* accessibility modes */
html.hc { --ink: #000; --ink-2: #111; --ink-3: #222; --paper: #fff; --line: #000; --brand: #0030d0; --brand-dark: #001f99; --brand-soft: #e6ecff; }
html.hc .card, html.hc .btn, html.hc .input, html.hc .choice { border-width: 3px; border-color: #000; }
html.calm *, html.calm *::before, html.calm *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
