:root {
  --forest: #173f24;
  --forest-deep: #0d2d18;
  --gold: #c49356;
  --cream: #fff9f1;
  --paper: #fffdf9;
  --ink: #15251a;
  --muted: #647168;
  --line: rgba(23, 63, 36, 0.16);
  --orange: #ef572f;
  --shadow: 0 24px 70px rgba(13, 45, 24, 0.13);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 4%, rgba(196, 147, 86, 0.16), transparent 25rem),
    var(--paper);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.68;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image: radial-gradient(rgba(21, 37, 26, 0.28) 0.55px, transparent 0.55px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
}

a { color: inherit; }
a:hover { color: var(--forest); }
:focus-visible { outline: 3px solid rgba(196, 147, 86, 0.9); outline-offset: 4px; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 20; padding: 0.7rem 1rem; background: #fff; }
.skip-link:focus { top: 1rem; }

.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.86);
  backdrop-filter: blur(18px) saturate(150%);
}
.nav-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 760; letter-spacing: -0.03em; }
.brand-mark { width: 31px; height: 31px; color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 0.9rem; font-weight: 650; }
.nav-links a { text-decoration: none; }

.hero { padding: 92px 0 52px; }
.eyebrow { color: var(--forest); font-size: 0.78rem; font-weight: 760; letter-spacing: 0.12em; text-transform: uppercase; }
h1 { max-width: 880px; margin: 0.55rem 0 1.25rem; font-size: clamp(3rem, 8vw, 6.8rem); line-height: 0.94; letter-spacing: -0.07em; text-wrap: balance; }
.hero p { max-width: 680px; margin: 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); text-wrap: pretty; }
.meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.meta span { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 0.84rem; }

.layout { display: grid; grid-template-columns: minmax(180px, 0.32fr) minmax(0, 1fr); gap: clamp(36px, 7vw, 96px); padding: 36px 0 100px; }
.toc { position: sticky; top: 108px; align-self: start; display: grid; gap: 8px; }
.toc a { padding: 8px 0; color: var(--muted); font-size: 0.9rem; text-decoration: none; border-bottom: 1px solid var(--line); }
.content { min-width: 0; }
.content section { padding: 32px 0; border-top: 1px solid var(--line); scroll-margin-top: 100px; }
.content section:first-child { border-top: 0; padding-top: 0; }
h2 { margin: 0 0 14px; font-size: clamp(1.55rem, 3vw, 2.3rem); line-height: 1.12; letter-spacing: -0.04em; }
h3 { margin: 28px 0 8px; font-size: 1.05rem; }
p, li { text-wrap: pretty; }
.content p, .content li { color: #3f4c43; }
.content ul { padding-left: 1.2rem; }
.notice { padding: 18px 20px; border-left: 3px solid var(--gold); background: rgba(196, 147, 86, 0.1); border-radius: 0 12px 12px 0; }
.notice.kindling { border-color: var(--orange); background: rgba(239, 87, 47, 0.08); }
.data-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.92rem; }
.data-table th, .data-table td { padding: 14px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--forest); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; }

.support-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.support-card { display: flex; flex-direction: column; min-height: 210px; padding: 24px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.support-card small { color: var(--muted); }
.support-card h2 { margin-top: 24px; }
.support-card a { margin-top: auto; font-weight: 720; }
.app-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr); align-items: center; gap: 56px; }
.kindling-tile { min-height: 420px; padding: 38px; border-radius: 38px; color: #f7f0e6; background: #111820; box-shadow: 0 32px 90px rgba(17, 24, 32, 0.28); transform: rotate(2deg); }
.kindling-paper { height: 100%; min-height: 344px; padding: 38px; color: #111820; background: #f7f0e6; border-radius: 28% 20% 25% 18% / 18% 24% 20% 28%; display: grid; align-content: center; gap: 18px; }
.spark { color: var(--orange); font-size: 3rem; line-height: 1; }
.lesson-line { height: 12px; border-radius: 99px; background: #111820; }
.lesson-line.short { width: 68%; }
.arrow-line { display: flex; align-items: center; gap: 16px; font-weight: 800; font-size: 2rem; }
.arrow-line::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: currentColor; }

.footer { border-top: 1px solid var(--line); padding: 32px 0 46px; color: var(--muted); font-size: 0.86rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.footer-links { display: flex; gap: 18px; }

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 1120px); }
  .nav-links a:not(:last-child) { display: none; }
  .hero { padding-top: 64px; }
  .layout, .app-hero { grid-template-columns: 1fr; }
  .toc { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .support-grid { grid-template-columns: 1fr; }
  .kindling-tile { min-height: 330px; padding: 24px; transform: none; }
  .kindling-paper { min-height: 280px; padding: 28px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
