/* Tokens and chrome shared by every page: the Innovate design system, one measure. */
:root {
  color-scheme: light;
  --font-text: "SF Pro Text", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #dfe6f0;
  --surface: #f8fbfd;
  --surface-2: #eef3f8;
  --line: #c3cede;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #7b8496;
  --accent: #2a78d6;
  --accent-soft: rgba(42, 120, 214, 0.12);
  --inset: 22px;
  --pad: 18px;
}
/* one switch, light by default, remembered per browser */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e131b;
  --surface: #161e28;
  --surface-2: #1d2733;
  --line: rgba(255, 255, 255, 0.13);
  --ink: #eef2f8;
  --ink-2: #c2ccd9;
  --muted: #8b97a8;
  --accent: #6aa8f0;
  --accent-soft: rgba(106, 168, 240, 0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

#topnav {
  position: fixed;
  inset: 0 0 auto 0;
  height: 56px;
  z-index: 5;
  background: rgba(7, 10, 14, 0.94);
  backdrop-filter: saturate(1.8) blur(20px);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
}
#topnav ul {
  height: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 calc(var(--inset) - 8px);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 20px;
}
#topnav a {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 8px;
  font-size: 15px;
  letter-spacing: -0.15px;
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.2s ease;
}
#topnav a:hover, #topnav a.current { color: #fff; }
#topnav a.current { position: relative; }
#topnav a.current::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: #4a92e8;
}
#topnav .brand { font-weight: 600; letter-spacing: 0.02em; }
#topnav .right, #topnav .mode { margin-left: auto; }
#topnav .mode button {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  padding: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 8px;
}
#topnav .mode button:hover { background: rgba(255, 255, 255, 0.10); color: #fff; }
#topnav .mode svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
#topnav .mode .sun { display: none; }
:root[data-theme="dark"] #topnav .mode .sun { display: block; }
:root[data-theme="dark"] #topnav .mode .moon { display: none; }
@media (max-width: 700px) {
  #topnav ul { gap: 8px; padding: 0 10px; }
  #topnav a { font-size: 14px; padding: 0 6px; }
  #topnav .brand .ln { display: none; }
  #topnav .nav-book { display: none; }
}

.box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
a.box { transition: border-color 0.2s ease, transform 0.2s ease; }
a.box:hover { border-color: var(--accent); transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { a.box:hover { transform: none; } }
.box h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.arrow { margin-left: auto; color: var(--muted); font-weight: 400; }

/* routed pages: one measure, one title */
.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 92px var(--inset) 72px;
}
.page h1 {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 44px);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.025em;
}
