@font-face { font-family: "Hanken Grotesk"; src: url("assets/fonts/HankenGrotesk.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Sora"; src: url("fonts/Sora.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root, body.frontier-guides {
  --paper: #fbfaf6; --card: #fffefb; --ink: #1f1f1f; --muted: #6b665d; --faint: #9a948a;
  --line: #e6e1d6; --rule: #bdb6a8; --accent: #1d4e74; --accent-wash: #e8eef3;
  --on-accent: #fff; --soft: #efebe3; --refline: #8f897e; --labelink: #4a463f; --chip: #f1ede5;
  --band-bg: var(--paper); --band-ink: var(--ink); --band-sub: #3d3a35; --band-link: #4a463f;
  --front: #7f796e; --other: #cbc5b9; --start: #a39d92;
  --pw: clamp(380px, 36vw, 520px); --navh: 56px;
  --tasks-width: min(1180px, 100vw - 40px);
  --reading-nav-width: clamp(168px, 16vw, 218px);
  --reading-column-gap: clamp(24px, 3vw, 44px);
  --reading-nav-padding: 4px 6px 4px 4px;
  --reading-text-width: 100ch;
  --reading-body-size: 15px;
  --reading-body-leading: 1.7;
  --reading-chapter-size: 20px;
  --reading-subheading-size: 16px;
  --display: "Sora", "Hanken Grotesk", system-ui, sans-serif;   /* titles and the name, as in the release film; text stays Hanken Grotesk */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}
/* dark theme: the reader's choice or the system's (set on <html> before the first paint) */
:root[data-theme="dark"] {
  --paper: #0f1821; --card: #131f2a; --ink: #e9ecee; --muted: #9ba6b0; --faint: #6c7883;
  --line: #233140; --rule: #3b4a58; --accent: #8cbbe0; --accent-wash: #1a2a38; --on-accent: #0f1821;
  --soft: #1f2c39; --refline: #8d99a4; --labelink: #c3cbd2; --chip: #1f2c39;
  --front: #a7b3be; --other: #46586a; --start: #7d8b98;
  --band-bg: linear-gradient(180deg, #0e1f30, #112840); --band-ink: #eef1f3; --band-sub: #c3ccd4; --band-link: #b9c3cc;
  color-scheme: dark;
}
/* the bar of links stays pinned to the top of the screen, over both views and while they change places */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: var(--navh); display: flex; align-items: center;
  color: var(--band-ink); transition: background-color 0.2s, border-color 0.2s; border-bottom: 1px solid transparent; }
.topbar.scrolled { background: color-mix(in srgb, var(--paper) 96%, transparent); border-bottom-color: var(--line); }   /* no blur: it costs every frame of a scroll */
.topbar nav { display: flex; justify-content: space-between; align-items: center; }
:is(.topbar nav, .global-footer .mark) { font-size: 14px; }
.topbar nav a { text-decoration: none; }
:is(.topbar, .global-footer) .mark { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; }
.global-footer .mark { color: var(--band-ink); line-height: 1.65; }
:is(.topbar, .global-footer) .mark:has(img) { display: inline-flex; align-items: center; gap: 6px; }
:is(.topbar, .global-footer) .mark img { flex: none; }
.topbar .links { display: flex; align-items: baseline; gap: 22px; }
.topbar .links a { color: var(--band-link); padding-bottom: 2px; }
.topbar .links a:hover, .topbar .links a[aria-current] { color: var(--band-ink); border-bottom: 1px solid var(--band-ink); }

.topbar .col { width: var(--tasks-width); margin-inline: auto; }
.topbar .mark, .topbar .links a { white-space: nowrap; }
@media (max-width: 640px) {
  :root, body.frontier-guides { --navh: 50px; }
  .topbar { height: 50px; }
  :is(.topbar nav, .global-footer .mark) { font-size: 13px; }
  :is(.topbar, .global-footer) .mark img { width: 20px; height: 20px; }
  .topbar .links { gap: clamp(8px, 3vw, 12px); }
}
@media (max-width: 360px) {
  :is(.topbar nav, .global-footer .mark) { font-size: 12px; }
  .topbar .links { gap: 5px; }
}
