:root {
  color-scheme: light;
  --base: #eff1f5;
  --mantle: #e6e9ef;
  --surface: #dce0e8;
  --text: #4c4f69;
  --subtext: #6c6f85;
  --overlay: #8c8fa1;
  --accent: #8839ef;
  --accent-dim: rgba(136, 57, 239, 0.18);
  --accent-text: #6400c8;
  --hairline: rgba(76, 79, 105, 0.10);
  --serif-stack: Charter, "Iowan Old Style", Georgia, serif;
  --sans-stack: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --base: #1e1e2e;
    --mantle: #181825;
    --surface: #313244;
    --text: #cdd6f4;
    --subtext: #a6adc8;
    --overlay: #7f849c;
    --accent: #cba6f7;
    --accent-dim: rgba(203, 166, 247, 0.22);
    --accent-text: #f5c2e7;
    --hairline: rgba(205, 214, 244, 0.08);
  }
}

* { box-sizing: border-box; }

html {
  background: var(--base);
  color: var(--text);
  font-family: var(--sans-stack);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.page-header-inner,
main,
.page-footer-inner {
  width: min(100% - 48px, 720px);
  margin: 0 auto;
}

.page-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.wordmark {
  font-family: var(--serif-stack);
  font-style: italic;
  font-weight: 600;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.wordmark:hover { text-decoration: none; opacity: 0.8; }

.open-reader { color: var(--subtext); font-size: 14px; }
.open-reader:hover { color: var(--text); }

main {
  flex: 1;
  padding: 64px 0 80px;
}

h1, h2 {
  color: var(--text);
  font-family: var(--serif-stack);
  font-weight: 500;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

h2 {
  margin: 56px 0 16px;
  font-size: 24px;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

p { margin: 0 0 16px; }
article ul { padding-left: 22px; }
article li { padding-left: 4px; margin: 6px 0; }

article strong { color: var(--text); font-weight: 600; }

.lede {
  max-width: 560px;
  color: var(--subtext);
  font-size: 18px;
}

.muted { color: var(--overlay); font-size: 14px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--surface);
  color: var(--subtext);
  font-size: 15px;
}

.button:hover {
  text-decoration: none;
  background: var(--surface);
  color: var(--text);
}

.button.primary {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--surface);
  color: var(--accent-text);
}

.button.primary:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.features li { margin: 0; padding: 0; color: var(--subtext); font-size: 15px; }
.features strong { display: block; margin-bottom: 2px; }

.page-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding: 20px 0 32px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
}

.page-footer a { color: var(--overlay); }
.page-footer a:hover,
.page-footer a[aria-current="page"] { color: var(--subtext); }
.page-footer a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 560px) {
  .page-header-inner,
  main,
  .page-footer-inner { width: calc(100% - 32px); }
  main { padding: 40px 0 56px; }
  h2 { margin-top: 44px; }
  .lede { font-size: 17px; }
  .features { grid-template-columns: 1fr; gap: 18px; }
}
