/* =========================================================
   Design Vocabulary: app styles
   This app tries to practise what it teaches:
   OKLCH tokens, tinted neutrals, 4/8pt spacing, a modular type
   scale, layered shadows, concentric radii, focus rings,
   reduced motion, dark-mode parity.
   ========================================================= */

:root {
  /* ---- Primitive palette (OKLCH, warm-tinted neutrals, hue 70) ---- */
  --n-0:   oklch(0.995 0.003 70);
  --n-50:  oklch(0.975 0.005 70);
  --n-100: oklch(0.955 0.006 70);
  --n-150: oklch(0.93 0.007 70);
  --n-200: oklch(0.90 0.008 70);
  --n-300: oklch(0.83 0.009 70);
  --n-400: oklch(0.70 0.010 70);
  --n-500: oklch(0.58 0.010 70);
  --n-600: oklch(0.47 0.010 70);
  --n-700: oklch(0.37 0.010 70);
  --n-800: oklch(0.27 0.010 70);
  --n-900: oklch(0.20 0.008 70);
  --n-950: oklch(0.155 0.007 70);

  --accent-h: 264;

  /* ---- Semantic tokens: light ---- */
  --bg:            var(--n-50);
  --bg-sunken:     var(--n-100);
  --surface:       var(--n-0);
  --surface-2:     var(--n-50);
  --surface-hover: var(--n-100);
  --border:        oklch(0.20 0.01 70 / 0.11);
  --border-strong: oklch(0.20 0.01 70 / 0.2);
  --text:          var(--n-900);
  --text-2:        var(--n-600);
  --text-3:        var(--n-500);
  --accent:        oklch(0.52 0.2 var(--accent-h));
  --accent-hover:  oklch(0.47 0.2 var(--accent-h));
  --accent-soft:   oklch(0.95 0.035 var(--accent-h));
  --accent-ink:    oklch(0.42 0.18 var(--accent-h));
  --on-accent:     white;
  --success:       oklch(0.55 0.13 150);
  --success-soft:  oklch(0.95 0.04 150);
  --danger:        oklch(0.55 0.19 25);
  --danger-soft:   oklch(0.95 0.035 25);
  --warning:       oklch(0.70 0.14 75);
  --warning-soft:  oklch(0.96 0.05 85);
  --focus:         oklch(0.6 0.2 var(--accent-h));
  --code-bg:       oklch(0.96 0.008 var(--accent-h));
  --scrim:         oklch(0.2 0.01 70 / 0.45);

  /* ---- Type ---- */
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  /* 1.2 minor-third scale on a 16px base */
  --t-xs: 0.75rem;   /* 12 */
  --t-sm: 0.875rem;  /* 14 */
  --t-md: 1rem;      /* 16 */
  --t-lg: 1.125rem;  /* 18 */
  --t-xl: 1.375rem;  /* 22 */
  --t-2xl: 1.75rem;  /* 28 */
  --t-3xl: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  --t-4xl: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);

  /* ---- Space (4/8pt) ---- */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;

  /* ---- Radius ---- */
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 999px;

  /* ---- Elevation (layered shadows) ---- */
  --shadow-1: 0 1px 1px oklch(0.2 0.01 70 / 0.05), 0 1px 3px oklch(0.2 0.01 70 / 0.06);
  --shadow-2: 0 1px 2px oklch(0.2 0.01 70 / 0.05), 0 4px 8px oklch(0.2 0.01 70 / 0.06), 0 12px 24px -8px oklch(0.2 0.01 70 / 0.08);
  --shadow-3: 0 2px 4px oklch(0.2 0.01 70 / 0.05), 0 12px 24px oklch(0.2 0.01 70 / 0.08), 0 32px 64px -16px oklch(0.2 0.01 70 / 0.18);

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --d-fast: 120ms; --d-base: 200ms; --d-slow: 320ms;

  /* ---- Layout ---- */
  --topbar-h: 56px;
  --sidebar-w: 300px;
  --measure: 68ch;
  --content-w: 860px;

  /* ---- Z-index scale ---- */
  --z-sticky: 10; --z-topbar: 20; --z-drawer: 40; --z-palette: 60; --z-toast: 70;

  color-scheme: light;
}

/* ---- Semantic tokens: dark ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --_dark: 1; }
}
:root[data-theme="dark"] { --_dark: 1; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:            oklch(0.165 0.006 70);
    --bg-sunken:     oklch(0.14 0.006 70);
    --surface:       oklch(0.205 0.007 70);
    --surface-2:     oklch(0.23 0.007 70);
    --surface-hover: oklch(0.255 0.008 70);
    --border:        oklch(0.95 0.01 70 / 0.09);
    --border-strong: oklch(0.95 0.01 70 / 0.17);
    --text:          oklch(0.95 0.006 70);
    --text-2:        oklch(0.76 0.008 70);
    --text-3:        oklch(0.64 0.008 70);
    --accent:        oklch(0.70 0.15 var(--accent-h));
    --accent-hover:  oklch(0.76 0.13 var(--accent-h));
    --accent-soft:   oklch(0.30 0.07 var(--accent-h));
    --accent-ink:    oklch(0.82 0.1 var(--accent-h));
    --on-accent:     oklch(0.17 0.03 var(--accent-h));
    --success:       oklch(0.75 0.14 150);
    --success-soft:  oklch(0.30 0.06 150);
    --danger:        oklch(0.72 0.16 25);
    --danger-soft:   oklch(0.30 0.07 25);
    --warning:       oklch(0.80 0.13 80);
    --warning-soft:  oklch(0.32 0.06 80);
    --focus:         oklch(0.75 0.15 var(--accent-h));
    --code-bg:       oklch(0.24 0.012 var(--accent-h));
    --scrim:         oklch(0.05 0 0 / 0.6);
    --shadow-1: 0 1px 2px oklch(0 0 0 / 0.4);
    --shadow-2: 0 1px 2px oklch(0 0 0 / 0.3), 0 8px 24px -4px oklch(0 0 0 / 0.5);
    --shadow-3: 0 2px 4px oklch(0 0 0 / 0.3), 0 24px 64px -12px oklch(0 0 0 / 0.7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:            oklch(0.165 0.006 70);
  --bg-sunken:     oklch(0.14 0.006 70);
  --surface:       oklch(0.205 0.007 70);
  --surface-2:     oklch(0.23 0.007 70);
  --surface-hover: oklch(0.255 0.008 70);
  --border:        oklch(0.95 0.01 70 / 0.09);
  --border-strong: oklch(0.95 0.01 70 / 0.17);
  --text:          oklch(0.95 0.006 70);
  --text-2:        oklch(0.76 0.008 70);
  --text-3:        oklch(0.64 0.008 70);
  --accent:        oklch(0.70 0.15 var(--accent-h));
  --accent-hover:  oklch(0.76 0.13 var(--accent-h));
  --accent-soft:   oklch(0.30 0.07 var(--accent-h));
  --accent-ink:    oklch(0.82 0.1 var(--accent-h));
  --on-accent:     oklch(0.17 0.03 var(--accent-h));
  --success:       oklch(0.75 0.14 150);
  --success-soft:  oklch(0.30 0.06 150);
  --danger:        oklch(0.72 0.16 25);
  --danger-soft:   oklch(0.30 0.07 25);
  --warning:       oklch(0.80 0.13 80);
  --warning-soft:  oklch(0.32 0.06 80);
  --focus:         oklch(0.75 0.15 var(--accent-h));
  --code-bg:       oklch(0.24 0.012 var(--accent-h));
  --scrim:         oklch(0.05 0 0 / 0.6);
  --shadow-1: 0 1px 2px oklch(0 0 0 / 0.4);
  --shadow-2: 0 1px 2px oklch(0 0 0 / 0.3), 0 8px 24px -4px oklch(0 0 0 / 0.5);
  --shadow-3: 0 2px 4px oklch(0 0 0 / 0.3), 0 24px 64px -12px oklch(0 0 0 / 0.7);
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + var(--s-4)); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--t-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: oklch(0.75 0.12 var(--accent-h) / 0.35); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: fixed; left: var(--s-4); top: var(--s-2);
  z-index: 100;
  padding: var(--s-2) var(--s-4);
  background: var(--text); color: var(--bg);
  border-radius: var(--r-sm);
  font-weight: 600; text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--d-base) var(--ease-out);
}
.skip-link:focus { transform: none; }

.kbd {
  display: inline-grid; place-items: center;
  min-width: 1.6em; height: 1.6em; padding: 0 0.4em;
  font: 500 0.6875rem/1 var(--font-mono);
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =========================================================
   Top bar
   ========================================================= */
.topbar {
  position: sticky; top: 0; z-index: var(--z-topbar);
  height: var(--topbar-h);
  display: flex; align-items: center; gap: var(--s-3);
  padding: 0 var(--s-4);
  padding-left: max(var(--s-4), env(safe-area-inset-left));
  padding-right: max(var(--s-4), env(safe-area-inset-right));
  background: color-mix(in oklch, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex; align-items: center; gap: var(--s-2);
  color: var(--text); text-decoration: none;
  font-weight: 600; letter-spacing: -0.01em;
  margin-right: auto;
  min-width: 0;
}
.brand-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; flex: none;
  border-radius: 9px;
  background: var(--text); color: var(--bg);
  font: 600 15px/1 var(--font-display);
  font-variation-settings: "opsz" 20, "SOFT" 50;
  letter-spacing: -0.02em;
}
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; flex: none;
  border: 0; border-radius: var(--r-md);
  background: transparent; color: var(--text-2);
  transition: background var(--d-fast), color var(--d-fast);
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); }
.icon-btn:active { transform: scale(0.96); }
.menu-btn { display: none; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

.search-trigger {
  display: flex; align-items: center; gap: var(--s-2);
  height: 38px; width: min(340px, 34vw);
  padding: 0 var(--s-2) 0 var(--s-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-3);
  font-size: var(--t-sm);
  box-shadow: var(--shadow-1);
  transition: border-color var(--d-fast), box-shadow var(--d-fast);
}
.search-trigger:hover { border-color: var(--text-3); }
.search-trigger .search-label { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.topbar-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: transparent; pointer-events: none;
}
.topbar-progress span {
  display: block; height: 100%; width: 0;
  background: var(--accent);
  transition: width var(--d-slow) var(--ease-out);
}

/* =========================================================
   Layout
   ========================================================= */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar-h));
  min-height: calc(100dvh - var(--topbar-h));
}
.sidebar {
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  height: calc(100dvh - var(--topbar-h));
  border-right: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
}
.sidebar-inner {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--s-4) var(--s-3) var(--s-16);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.main {
  min-width: 0;
  padding: var(--s-10) var(--s-8) var(--s-24);
  outline: none;
}
.scrim {
  position: fixed; inset: 0; z-index: calc(var(--z-drawer) - 1);
  background: var(--scrim);
  animation: fade-in var(--d-base) var(--ease-out);
}

@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: grid; margin-left: calc(var(--s-2) * -1); }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: var(--z-drawer);
    width: min(88vw, 340px); height: 100%;
    background: var(--surface);
    box-shadow: var(--shadow-3);
    transform: translateX(-102%);
    transition: transform var(--d-slow) var(--ease-out), visibility 0s linear var(--d-slow);
    visibility: hidden;
    border-right: 0;
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
  }
  .sidebar.open { transform: none; visibility: visible; transition: transform var(--d-slow) var(--ease-out); }
  .main { padding: var(--s-8) var(--s-4) var(--s-20); }
}
@media (max-width: 640px) {
  .search-trigger { width: 40px; padding: 0; justify-content: center; border-color: transparent; box-shadow: none; background: transparent; color: var(--text-2); }
  .search-trigger .search-label, .search-trigger .kbd { display: none; }
  .brand-name { font-size: var(--t-sm); }
}

/* =========================================================
   Sidebar TOC
   ========================================================= */
.toc-overall {
  padding: var(--s-3);
  margin-bottom: var(--s-3);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.toc-overall-top { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--t-sm); }
.toc-overall-top strong { font-weight: 600; }
.toc-overall-top span { color: var(--text-3); font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: var(--r-full); background: var(--bg-sunken); overflow: hidden; margin-top: var(--s-2); }
.bar > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width var(--d-slow) var(--ease-out); }

.toc-links { display: grid; gap: 2px; margin-bottom: var(--s-4); }
.toc-link {
  display: flex; align-items: center; gap: var(--s-3);
  min-height: 36px; padding: 0 var(--s-3);
  border-radius: var(--r-md);
  color: var(--text-2); text-decoration: none; font-size: var(--t-sm); font-weight: 500;
}
.toc-link:hover { background: var(--surface-hover); color: var(--text); }
.toc-link[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.toc-link svg { flex: none; color: var(--text-3); }
.toc-link .count { margin-left: auto; font-size: var(--t-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }

.toc-heading {
  margin: var(--s-4) var(--s-3) var(--s-2);
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3);
}
.toc-section { margin-bottom: 2px; }
.toc-section > summary {
  list-style: none;
  display: flex; align-items: center; gap: var(--s-2);
  min-height: 38px; padding: 0 var(--s-2) 0 var(--s-3);
  border-radius: var(--r-md);
  cursor: pointer; user-select: none;
  font-size: var(--t-sm); font-weight: 600; color: var(--text);
}
.toc-section > summary::-webkit-details-marker { display: none; }
.toc-section > summary:hover { background: var(--surface-hover); }
.toc-section .chev { flex: none; color: var(--text-3); transition: transform var(--d-base) var(--ease-out); }
.toc-section[open] .chev { transform: rotate(90deg); }
.toc-section .num { flex: none; width: 1.5em; font: 500 var(--t-xs)/1 var(--font-mono); color: var(--text-3); }
.toc-section .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ring { flex: none; }
.ring circle { fill: none; stroke-width: 3; }
.ring .track { stroke: var(--bg-sunken); }
.ring .fill { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset var(--d-slow) var(--ease-out); }
.ring.complete .fill { stroke: var(--success); }

.toc-topics { list-style: none; margin: 2px 0 var(--s-2); padding: 0 0 0 var(--s-6); display: grid; gap: 1px; position: relative; }
.toc-topics::before { content: ""; position: absolute; left: 19px; top: 4px; bottom: 4px; width: 1px; background: var(--border); }
.toc-topic a {
  display: flex; align-items: center; gap: var(--s-2);
  min-height: 32px; padding: 4px var(--s-2) 4px var(--s-3);
  border-radius: var(--r-sm);
  color: var(--text-2); text-decoration: none; font-size: 0.8125rem; line-height: 1.3;
}
.toc-topic a:hover { background: var(--surface-hover); color: var(--text); }
.toc-topic a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.toc-topic .dot {
  flex: none; width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: grid; place-items: center;
  background: var(--bg);
}
.toc-topic.done .dot { background: var(--success); border-color: var(--success); }
.toc-topic.done .dot::after { content: ""; width: 6px; height: 3px; border: 1.5px solid var(--surface); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(0.5px, -0.5px); }
.toc-topic.done a { color: var(--text-3); }
.toc-topic.done a[aria-current="page"] { color: var(--accent-ink); }

/* =========================================================
   Generic UI
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 40px; padding: 0 var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: var(--t-sm); font-weight: 600; line-height: 1;
  text-decoration: none; white-space: nowrap;
  transition: background var(--d-fast), border-color var(--d-fast), color var(--d-fast), transform var(--d-fast) var(--ease-out), box-shadow var(--d-fast);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.18), var(--shadow-1); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-1); }
.btn-secondary:hover { background: var(--surface-hover); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.btn-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in oklch, var(--success) 30%, transparent); }
.btn-lg { min-height: 48px; padding: 0 var(--s-6); font-size: var(--t-md); border-radius: var(--r-lg); }
.btn-sm { min-height: 32px; padding: 0 var(--s-3); font-size: var(--t-xs); border-radius: var(--r-sm); }

.overline {
  display: block;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3);
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border-radius: var(--r-full);
  font-size: var(--t-xs); font-weight: 500;
  background: var(--bg-sunken); color: var(--text-2);
}
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill.success { background: var(--success-soft); color: var(--success); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-1);
}

/* =========================================================
   Home
   ========================================================= */
.home { max-width: 1120px; margin: 0 auto; }
.hero { padding: var(--s-8) 0 var(--s-12); max-width: 760px; }
.hero h1 {
  margin: var(--s-3) 0 var(--s-4);
  font-family: var(--font-display);
  font-size: var(--t-4xl);
  font-weight: 560;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; font-weight: 420; color: var(--accent-ink); }
.hero p { margin: 0; font-size: var(--t-lg); color: var(--text-2); max-width: 58ch; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-8); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); margin-bottom: var(--s-12); }
.stat { padding: var(--s-5); }
.stat .v { font: 600 var(--t-2xl)/1 var(--font-sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .l { margin-top: var(--s-2); font-size: var(--t-sm); color: var(--text-2); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.home-h2 {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4);
  margin: 0 0 var(--s-4);
}
.home-h2 h2 { margin: 0; font-family: var(--font-display); font-weight: 560; font-size: var(--t-2xl); letter-spacing: -0.02em; font-variation-settings: "opsz" 60; }
.home-h2 p { margin: 0; color: var(--text-2); font-size: var(--t-sm); }

.paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); margin-bottom: var(--s-16); }
.path-card { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-6); text-decoration: none; color: inherit; transition: transform var(--d-base) var(--ease-out), box-shadow var(--d-base); }
.path-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.path-card h3 { margin: 0; font-size: var(--t-lg); letter-spacing: -0.01em; }
.path-card p { margin: 0; color: var(--text-2); font-size: var(--t-sm); flex: 1; }
.path-card .meta { display: flex; gap: var(--s-2); align-items: center; font-size: var(--t-xs); color: var(--text-3); }
.path-card .icon { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
@media (max-width: 860px) { .paths { grid-template-columns: 1fr; } }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s-4); }
.bento-card {
  grid-column: span 2;
  display: flex; flex-direction: column;
  padding: var(--s-5);
  text-decoration: none; color: inherit;
  position: relative; overflow: hidden;
  transition: transform var(--d-base) var(--ease-out), box-shadow var(--d-base), border-color var(--d-base);
  min-height: 190px;
}
.bento-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.bento-card.wide { grid-column: span 3; }
.bento-card .num { font: 500 var(--t-xs)/1 var(--font-mono); color: var(--text-3); }
.bento-card h3 { margin: var(--s-3) 0 var(--s-2); font-family: var(--font-display); font-weight: 560; font-size: var(--t-xl); letter-spacing: -0.015em; font-variation-settings: "opsz" 40; line-height: 1.15; }
.bento-card p { margin: 0 0 var(--s-4); font-size: var(--t-sm); color: var(--text-2); flex: 1; max-width: 46ch; }
.bento-card .foot { display: flex; align-items: center; gap: var(--s-3); font-size: var(--t-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.bento-card .foot .bar { flex: 1; margin: 0; height: 4px; }
.bento-card .glyph { position: absolute; right: -8px; top: -14px; font: 400 104px/1 var(--font-display); font-variation-settings: "opsz" 144, "SOFT" 100; color: var(--bg-sunken); pointer-events: none; z-index: 0; letter-spacing: -0.04em; }
.bento-card > *:not(.glyph) { position: relative; z-index: 1; }
@media (max-width: 1100px) { .bento-card, .bento-card.wide { grid-column: span 3; } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; } .bento-card, .bento-card.wide { grid-column: auto; min-height: 0; } }

.continue-card { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); margin-bottom: var(--s-12); text-decoration: none; color: inherit; }
.continue-card:hover { border-color: var(--border-strong); }
.continue-card .t { flex: 1; min-width: 0; }
.continue-card .t strong { display: block; font-size: var(--t-lg); }
.continue-card .t span { font-size: var(--t-sm); color: var(--text-2); }

/* =========================================================
   Section page
   ========================================================= */
.page { max-width: var(--content-w); margin: 0 auto; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--t-sm); color: var(--text-3); margin-bottom: var(--s-6); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs .sep { color: var(--text-3); }

.page-title {
  margin: var(--s-2) 0 var(--s-3);
  font-family: var(--font-display);
  font-weight: 560;
  font-size: var(--t-3xl);
  font-variation-settings: "opsz" 120, "SOFT" 20;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.page-lede { margin: 0 0 var(--s-8); font-size: var(--t-lg); color: var(--text-2); max-width: var(--measure); text-wrap: pretty; }

.topic-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.topic-row {
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  text-decoration: none; color: inherit;
  transition: border-color var(--d-fast), transform var(--d-base) var(--ease-out);
}
.topic-row:hover { border-color: var(--border-strong); transform: translateX(2px); }
.topic-row .idx { flex: none; width: 2.5em; font: 500 var(--t-xs)/1 var(--font-mono); color: var(--text-3); }
.topic-row .txt { flex: 1; min-width: 0; }
.topic-row .txt strong { display: block; font-weight: 600; }
.topic-row .txt span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--t-sm); color: var(--text-2); }
.topic-row .state { flex: none; }

/* =========================================================
   Topic page
   ========================================================= */
.topic-head { margin-bottom: var(--s-8); }
.topic-meta { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.aka { margin: 0 0 var(--s-5); font-size: var(--t-sm); color: var(--text-3); }
.aka em { color: var(--text-2); font-style: normal; }
.tldr {
  position: relative;
  margin: 0;
  padding: var(--s-5) var(--s-6);
  border-radius: var(--r-lg);
  background: var(--accent-soft);
  color: var(--text);
  font-size: var(--t-lg);
  line-height: 1.55;
  text-wrap: pretty;
}
.tldr::before { content: "In one line"; display: block; margin-bottom: var(--s-1); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); }

.block { margin: var(--s-12) 0 0; }
.block > h2 {
  display: flex; align-items: center; gap: var(--s-3);
  margin: 0 0 var(--s-4);
  font-size: var(--t-xl); font-weight: 650; letter-spacing: -0.015em;
}
.block > h2 .n {
  display: grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--bg-sunken); color: var(--text-2);
  font: 600 var(--t-xs)/1 var(--font-mono);
}

.prose { max-width: var(--measure); font-size: 1.0625rem; line-height: 1.7; text-wrap: pretty; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.3em; }
.prose li { margin: 0.35em 0; }
.prose li::marker { color: var(--text-3); }
.prose strong { font-weight: 650; }
.prose h3 { margin: 1.6em 0 0.5em; font-size: var(--t-lg); letter-spacing: -0.01em; }
.prose code, .inline-code {
  font-family: var(--font-mono); font-size: 0.86em;
  padding: 0.12em 0.38em; border-radius: 5px;
  background: var(--code-bg); color: var(--accent-ink);
}
.prose blockquote { margin: 1.2em 0; padding: 0.2em 0 0.2em 1em; border-left: 3px solid var(--accent); color: var(--text-2); }
.prose .callout { margin: 1.2em 0; padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); font-size: var(--t-md); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); margin: 1em 0; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.prose th { font-weight: 600; color: var(--text-2); }

/* Demo frame (container for an interactive illustration) */
.demo-frame {
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.demo-frame > .demo-cap {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-3) var(--s-5);
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: var(--t-sm); color: var(--text-2);
}
.demo-frame > .demo-cap svg { flex: none; margin-top: 3px; color: var(--accent); }
.demo-error { padding: var(--s-6); color: var(--danger); font-size: var(--t-sm); }

.examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s-3); list-style: none; padding: 0; margin: 0; }
.examples li { padding: var(--s-4) var(--s-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); font-size: var(--t-sm); line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.examples li strong { color: var(--text); font-weight: 600; }

.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.dodont > div { padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.dodont h3 { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-3); font-size: var(--t-sm); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.dodont .do h3 { color: var(--success); }
.dodont .dont h3 { color: var(--danger); }
.dodont .do { border-top: 3px solid var(--success); }
.dodont .dont { border-top: 3px solid var(--danger); }
.dodont ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-3); }
.dodont li { position: relative; padding-left: var(--s-6); font-size: var(--t-sm); line-height: 1.55; text-wrap: pretty; }
.dodont li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.dodont .do li::before { content: "✓"; color: var(--success); }
.dodont .dont li::before { content: "✕"; color: var(--danger); }
@media (max-width: 720px) { .dodont { grid-template-columns: 1fr; } }

.code-block {
  position: relative;
  margin: 0;
  border-radius: var(--r-lg);
  background: oklch(0.2 0.015 var(--accent-h));
  color: oklch(0.92 0.01 var(--accent-h));
  overflow: hidden;
}
.code-block pre { margin: 0; padding: var(--s-5); overflow-x: auto; font: 400 0.8125rem/1.65 var(--font-mono); tab-size: 2; }
.code-block .lang { position: absolute; top: var(--s-2); right: var(--s-3); font: 500 0.6875rem/1 var(--font-mono); color: oklch(0.7 0.02 var(--accent-h)); text-transform: uppercase; letter-spacing: 0.08em; }
.code-block .c-com { color: oklch(0.65 0.03 var(--accent-h)); font-style: italic; }
.code-block .c-prop { color: oklch(0.82 0.1 230); }
.code-block .c-val { color: oklch(0.85 0.12 80); }
.code-block .c-sel { color: oklch(0.82 0.13 330); }

.prompt-card { padding: var(--s-5) var(--s-6); border-radius: var(--r-lg); background: var(--surface); border: 1px dashed var(--border-strong); }
.prompt-card .prompt-text { margin: 0 0 var(--s-4); font: 400 var(--t-sm)/1.7 var(--font-mono); color: var(--text); white-space: pre-wrap; text-wrap: pretty; }
.prompt-card .actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.quiz { padding: var(--s-6); border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--border); }
.quiz .q { margin: 0 0 var(--s-4); font-weight: 600; font-size: var(--t-lg); line-height: 1.45; text-wrap: pretty; }
.quiz-options { display: grid; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.quiz-opt {
  display: flex; align-items: flex-start; gap: var(--s-3);
  width: 100%; min-height: 48px; padding: var(--s-3) var(--s-4);
  text-align: left; line-height: 1.45;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md);
  transition: border-color var(--d-fast), background var(--d-fast);
}
.quiz-opt:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.quiz-opt .letter { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--bg-sunken); font: 600 var(--t-xs)/1 var(--font-mono); color: var(--text-2); }
.quiz-opt:disabled { cursor: default; }
.quiz-opt.correct { border-color: var(--success); background: var(--success-soft); }
.quiz-opt.correct .letter { background: var(--success); color: var(--surface); }
.quiz-opt.wrong { border-color: var(--danger); background: var(--danger-soft); }
.quiz-opt.wrong .letter { background: var(--danger); color: var(--surface); }
.quiz-why { margin: var(--s-4) 0 0; padding: var(--s-4); border-radius: var(--r-md); background: var(--bg-sunken); font-size: var(--t-sm); line-height: 1.6; animation: rise var(--d-slow) var(--ease-out); }
.quiz-why strong { display: block; margin-bottom: 2px; }

.related { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.related a {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 var(--s-3);
  border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--text); text-decoration: none; font-size: var(--t-sm); font-weight: 500;
}
.related a:hover { border-color: var(--accent); color: var(--accent-ink); }
.related a.done::before { content: "✓"; color: var(--success); font-weight: 700; }

.finish {
  margin-top: var(--s-16);
  padding: var(--s-6);
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid; gap: var(--s-5);
}
.finish-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); }
.finish-top p { margin: 0; color: var(--text-2); font-size: var(--t-sm); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.pager a {
  display: flex; flex-direction: column; gap: 2px;
  padding: var(--s-4); border-radius: var(--r-lg);
  border: 1px solid var(--border-strong); text-decoration: none; color: var(--text);
  min-width: 0;
}
.pager a:hover { border-color: var(--accent); }
.pager a span { font-size: var(--t-xs); color: var(--text-3); }
.pager a strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pager .next { text-align: right; grid-column: 2; }
@media (max-width: 520px) { .pager { grid-template-columns: 1fr; } .pager .next { grid-column: auto; } }

.mark-btn[aria-pressed="true"] { background: var(--success); color: var(--surface); border-color: var(--success); }

/* =========================================================
   Palette (command palette search)
   ========================================================= */
.palette { position: fixed; inset: 0; z-index: var(--z-palette); display: grid; justify-items: center; align-items: start; padding: 12vh var(--s-4) var(--s-4); background: var(--scrim); animation: fade-in var(--d-fast) var(--ease-out); }
.palette[hidden] { display: none; }
.palette-box { width: min(620px, 100%); max-height: 70vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-xl); box-shadow: var(--shadow-3); overflow: hidden; animation: pop var(--d-base) var(--ease-out); }
.palette-input-wrap { display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-4); border-bottom: 1px solid var(--border); color: var(--text-3); }
.palette-input-wrap input { flex: 1; height: 56px; border: 0; outline: none; background: transparent; font-size: var(--t-lg); color: var(--text); min-width: 0; }
.palette-list { list-style: none; margin: 0; padding: var(--s-2); overflow-y: auto; overscroll-behavior: contain; }
.palette-list li { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); border-radius: var(--r-md); cursor: pointer; }
.palette-list li[aria-selected="true"] { background: var(--accent-soft); }
.palette-list .p-t { flex: 1; min-width: 0; }
.palette-list .p-t strong { display: block; font-weight: 600; font-size: var(--t-md); }
.palette-list .p-t span { display: block; font-size: var(--t-xs); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-list .p-s { flex: none; font-size: var(--t-xs); color: var(--text-3); }
.palette-list mark { background: oklch(0.85 0.14 90 / 0.5); color: inherit; border-radius: 2px; }
.palette-list .empty { justify-content: center; color: var(--text-3); padding: var(--s-8); cursor: default; }
.palette-foot { display: flex; gap: var(--s-4); padding: var(--s-2) var(--s-4); border-top: 1px solid var(--border); font-size: var(--t-xs); color: var(--text-3); }
.palette-foot span { display: flex; align-items: center; gap: 4px; }
@media (max-width: 640px) { .palette { padding-top: var(--s-4); } .palette-box { max-height: 85vh; } .palette-foot { display: none; } }

/* =========================================================
   Toasts
   ========================================================= */
.toast-region { position: fixed; z-index: var(--z-toast); left: 50%; bottom: max(var(--s-6), env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: var(--s-2); justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--text); color: var(--bg); font-size: var(--t-sm); font-weight: 500; box-shadow: var(--shadow-3); pointer-events: auto; animation: toast-in var(--d-slow) var(--ease-out); }
.toast button { border: 0; background: transparent; color: var(--accent-soft); font-weight: 700; padding: 4px 6px; border-radius: 4px; }
.toast.out { animation: toast-out var(--d-base) var(--ease-in-out) forwards; }

/* =========================================================
   Cheatsheet / kit / flashcards
   ========================================================= */
.tools-bar { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-bottom: var(--s-6); }
.input {
  height: 40px; padding: 0 var(--s-3);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--text); font-size: var(--t-sm);
  min-width: 0;
}
.input:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.cheat-section { margin-bottom: var(--s-10); }
.cheat-section h2 { font-family: var(--font-display); font-weight: 560; font-size: var(--t-xl); margin: 0 0 var(--s-3); letter-spacing: -0.01em; }
.cheat { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.cheat li { display: grid; grid-template-columns: minmax(150px, 220px) 1fr auto; gap: var(--s-4); align-items: start; padding: var(--s-3) 0; border-bottom: 1px solid var(--border); font-size: var(--t-sm); }
.cheat li a { font-weight: 600; color: var(--text); text-decoration: none; }
.cheat li a:hover { color: var(--accent-ink); text-decoration: underline; }
.cheat li p { margin: 0; color: var(--text-2); line-height: 1.55; }
.cheat .done-mark { color: var(--success); font-weight: 700; }
@media (max-width: 640px) { .cheat li { grid-template-columns: 1fr auto; } .cheat li p { grid-column: 1 / -1; grid-row: 2; } }

.kit-list { display: grid; gap: var(--s-3); margin-bottom: var(--s-6); }
.kit-item { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); }
.kit-item .t { flex: 1; min-width: 0; }
.kit-item strong { display: block; margin-bottom: 4px; }
.kit-item p { margin: 0; font: 400 var(--t-sm)/1.6 var(--font-mono); color: var(--text-2); white-space: pre-wrap; }
.kit-output { width: 100%; min-height: 220px; padding: var(--s-4); border: 1px solid var(--border-strong); border-radius: var(--r-lg); background: var(--surface); font: 400 var(--t-sm)/1.65 var(--font-mono); resize: vertical; }

.empty-state { text-align: center; padding: var(--s-16) var(--s-6); border: 1px dashed var(--border-strong); border-radius: var(--r-xl); }
.empty-state h3 { margin: var(--s-4) 0 var(--s-2); font-size: var(--t-lg); }
.empty-state p { margin: 0 auto var(--s-5); color: var(--text-2); max-width: 44ch; font-size: var(--t-sm); }
.empty-state .ill { display: grid; place-items: center; margin: 0 auto; width: 64px; height: 64px; border-radius: var(--r-lg); background: var(--accent-soft); color: var(--accent-ink); }

.flash-wrap { max-width: 640px; margin: 0 auto; }
.flash-filter { display: inline-flex; padding: 3px; border-radius: var(--r-md); background: var(--bg-sunken); gap: 2px; margin-bottom: var(--s-6); flex-wrap: wrap; }
.flash-filter button { border: 0; background: transparent; min-height: 34px; padding: 0 var(--s-3); border-radius: 7px; font-size: var(--t-sm); font-weight: 500; color: var(--text-2); }
.flash-filter button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.flashcard {
  position: relative;
  min-height: 300px;
  perspective: 1400px;
  cursor: pointer;
  margin-bottom: var(--s-5);
}
.flashcard-inner { position: absolute; inset: 0; transition: transform 500ms var(--ease-out); transform-style: preserve-3d; }
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flash-face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: var(--s-3); padding: var(--s-8); backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-2); }
.flash-face.back { transform: rotateY(180deg); }
.flash-face h2 { margin: 0; font-family: var(--font-display); font-size: var(--t-3xl); font-weight: 560; letter-spacing: -0.025em; font-variation-settings: "opsz" 100; line-height: 1.1; text-wrap: balance; }
.flash-face p { margin: 0; font-size: var(--t-lg); line-height: 1.55; text-wrap: pretty; max-width: 46ch; }
.flash-face .hint { font-size: var(--t-xs); color: var(--text-3); }
.flash-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.flash-count { text-align: center; margin-top: var(--s-4); font-size: var(--t-sm); color: var(--text-3); font-variant-numeric: tabular-nums; }

.settings-row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; justify-content: space-between; padding: var(--s-5); }
.settings-row h3 { margin: 0 0 2px; font-size: var(--t-md); }
.settings-row p { margin: 0; font-size: var(--t-sm); color: var(--text-2); }

/* =========================================================
   Motion
   ========================================================= */
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }
.view-enter { animation: rise var(--d-slow) var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .topbar, .sidebar, .finish, .quiz, .prompt-card .actions { display: none !important; }
  .layout { display: block; }
}

/* Programmatic focus target after route change: no visible ring needed on headings */
h1[tabindex="-1"]:focus { outline: none; }
.prompt-card .prompt-text { overflow-wrap: anywhere; }
.prose kbd { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 0.4em; font: 500 0.75rem/1 var(--font-mono); background: var(--surface); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; }
.btn { max-width: 100%; }
.btn.wrap { white-space: normal; text-align: center; line-height: 1.3; padding-block: 8px; }
