:root {
  --bg: #ffeaae;
  --text: #ff4100;
  --max: 980px;
  --pad: 22px;
  --line: rgba(255, 65, 0, 0.35);
  --font: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  --w-body: 400;
  --w-ui: 500;
  --w-display: 600;
}

@font-face {
  font-family: "Roboto Mono";
  src: url("fonts/RobotoMono-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Mono";
  src: url("fonts/RobotoMono-Italic-VariableFont_wght.ttf") format("truetype");
  font-style: italic;
  font-weight: 100 700;
  font-display: swap;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0903;
  }
}

html[data-theme="light"] {
  --bg: #ffeaae;
}

html[data-theme="dark"] {
  --bg: #0a0903;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: var(--w-body);
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.16em;
}

header a:hover {
  text-decoration: none;
}

main a {
  text-decoration: underline;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

header {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 18px;
  font-weight: var(--w-ui);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.nav-right a,
.brand {
  padding: 6px 0;
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 28px;
}

.subnav a {
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  line-height: 1;
  text-decoration: none;
}

.subnav a:hover {
  background: rgba(255, 65, 0, 0.08);
  text-decoration: none;
}

.toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: var(--w-ui);
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
}

.toggle:hover {
  background: rgba(255, 65, 0, 0.08);
}

.toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.brand {
  white-space: nowrap;
}

main {
  padding: 56px 0 96px;
}

h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  font-weight: var(--w-display);
}

p {
  margin: 0 0 14px;
  max-width: 70ch;
}

section {
  padding-top: 28px;
  margin-top: 56px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 96px;
}

section:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

h2 {
  font-size: 16px;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
  font-weight: var(--w-ui);
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.tiles {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
}

.tile {
  margin: 0;
}

.cover {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 65, 0, 0.06);
}

.caption {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.35;
}

.caption strong {
  display: block;
  font-weight: var(--w-ui);
}

.pdf {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 65, 0, 0.04);
}

.pdf iframe {
  width: 100%;
  height: min(78vh, 980px);
  border: 0;
  display: block;
  background: transparent;
}

.muted {
  opacity: 0.82;
}
