/* Shared by every page: tokens, base, header, buttons, footer. */
:root {
  --ink: #1c1b19;
  --muted: #6b665e;
  --line: rgba(28, 27, 25, 0.10);
  --paper: #f7f4ee;
  --card: #fffdf9;
  --new: #2563c9;
  --learn: #c2410c;
  --review: #2e7d4f;
  --dusk-1: #9db0c2;
  --dusk-2: #6f8499;
  --dusk-3: #53687e;
  --dusk-4: #3d4f63;
  --radius: 20px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Newsreader", "New York", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Header */
header { padding: 20px 0; }
header .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; margin: -4px; }
nav { display: flex; gap: 22px; font-size: 15px; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--ink); }
nav a[aria-current="page"] { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-weight: 600; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 8px 20px -8px rgba(28,27,25,.5);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 12px 26px -10px rgba(28,27,25,.55); }
.btn svg { width: 18px; height: 18px; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

.btn:focus-visible { outline: 2px solid var(--new); outline-offset: 2px; }

@media (max-width: 880px) {
  nav a.hide-sm { display: none; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
