:root {
  color-scheme: light dark;
  --background: #f6f7f2;
  --surface: #fff;
  --ink: #182820;
  --muted: #495c52;
  --line: #cbd5cb;
  --accent: #156045;
  --accent-ink: #fff;
  --tint: #e8f1e8;
  --focus: #855300;
  --header-offset: 6rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #121b17;
    --surface: #1b2922;
    --ink: #eff5ee;
    --muted: #b6c8bc;
    --line: #3c5345;
    --accent: #a3e2ba;
    --accent-ink: #14291e;
    --tint: #22382c;
    --focus: #ffcf82;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: var(--header-offset); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--ink);
  font: 1rem/1.6 system-ui, sans-serif;
}

.container { width: min(100% - 2rem, 68rem); margin-inline: auto; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.14em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 1rem;
  z-index: 2;
  padding: 0.5rem 0.8rem;
  background: var(--surface);
  transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

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

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem 1rem;
  padding-block: 0.75rem;
}

.wordmark {
  justify-self: start;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.header-inner nav, .jump-links, .actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.header-inner nav a {
  padding: 0.45rem 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.header-inner nav a:hover, .header-inner nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
}

.header-inner .actions { justify-content: flex-end; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}

.button:hover { text-decoration: underline; }
.secondary { color: var(--ink); background: var(--surface); }
.primary { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

main { flex: 1; padding-block-end: clamp(3rem, 7vw, 6rem); }

h1, h2, h3 { line-height: 1.12; margin: 0; }
h1, h2 { letter-spacing: -0.045em; }
h1 { font-size: clamp(2.4rem, 5.9vw, 4.5rem); }
h2 { font-size: clamp(1.65rem, 4vw, 2.3rem); }
h3 { font-size: 1.2rem; }

p { margin: 0.75rem 0 0; }
.lede { max-width: 42rem; color: var(--muted); font-size: clamp(1.05rem, 1.8vw, 1.25rem); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding-block: clamp(3rem, 9vw, 7rem);
}

.hero h1 { max-width: 13ch; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero .lede { max-width: 34rem; margin-top: 1.25rem; }
.hero .actions { margin-top: 1.5rem; }

.project-example {
  margin: 0;
  padding: clamp(1rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--tint);
}

.project-example figcaption {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.project-example figcaption span {
  display: block;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.project-example ul { padding: 0; margin: 0; list-style: none; }
.project-example li {
  display: grid;
  grid-template-columns: 1.25rem 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: var(--surface);
  overflow-wrap: anywhere;
}

.project-example li + li { margin-top: 0.45rem; }
.file-detail { color: var(--muted); font-size: 0.875rem; }
.file-icon {
  justify-self: center;
  width: 0.85rem;
  height: 1.05rem;
  border: 1px solid var(--accent);
  border-radius: 0.2rem;
  background: var(--tint);
}

.folder-icon { width: 1.1rem; height: 0.8rem; }

.page-intro { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 4vw, 3rem); }
.section { border-top: 1px solid var(--line); padding-block-start: clamp(1.4rem, 3.5vw, 2.5rem); }
.section + .section { margin-top: clamp(2.5rem, 6vw, 4rem); }
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
}

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.section .grid { margin-top: 1.25rem; }
.card {
  padding: clamp(1.15rem, 3.2vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--surface);
}

.card p, .guide-section p, .plan-note { color: var(--muted); }
.card p + a { display: inline-block; margin-top: 0.75rem; }

.steps, .roadmap ul, .guide-section ol { padding-inline-start: 1.4rem; }
li + li { margin-top: 0.45rem; }
.steps { max-width: 44rem; }

.plan-grid { max-width: 52rem; }
.plan-card.featured { background: var(--tint); border-color: var(--accent); }
.plan-card .capacity {
  color: var(--ink);
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  font-weight: 750;
  letter-spacing: -0.06em;
  line-height: 1.1;
}

.plan-card .price { color: var(--ink); font-weight: 650; }
.plan-card .actions, .plan-note { margin-top: 1.25rem; }

.jump-links { gap: 0.75rem 1.25rem; margin-top: 1.25rem; }
.guide { max-width: 50rem; }
.guide-section { padding-block: 1.6rem; border-top: 1px solid var(--line); }
.guide-section li + li { margin-top: 0.7rem; }

pre {
  margin: 0.7rem 0;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: var(--tint);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

code { font: 0.9em/1.55 ui-monospace, monospace; }

.site-footer { border-top: 1px solid var(--line); padding-block: 1.2rem; }
.site-footer a { color: var(--muted); }

@media (max-width: 47rem) {
  :root { --header-offset: 8rem; }
  .header-inner { grid-template-columns: 1fr auto; }
  .header-inner nav { grid-column: 1 / -1; grid-row: 2; gap: 0.25rem; }
  .hero { grid-template-columns: 1fr; }
}

@media (max-width: 36rem) {
  .grid { grid-template-columns: 1fr; }
}
