:root {
  --bg: #f4f0e8;
  --bg-strong: #eae3d6;
  --surface: rgba(255, 252, 247, 0.84);
  --surface-solid: #fffaf3;
  --line: rgba(71, 58, 43, 0.16);
  --line-strong: rgba(71, 58, 43, 0.28);
  --text: #32291f;
  --muted: #6e6256;
  --brand: #7c6856;
  --brand-soft: #bca98f;
  --accent: #8ea3a8;
  --shadow: 0 18px 45px rgba(44, 34, 21, 0.1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Inter", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 12%, rgba(210, 187, 157, 0.2), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(158, 176, 180, 0.16), transparent 36%),
    linear-gradient(180deg, #f9f6f0 0%, var(--bg) 45%, #efe7da 100%);
  line-height: 1.68;
  min-height: 100vh;
}

main { padding-bottom: 3rem; }
p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }
a:hover { color: #20170f; }

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  color: #fff;
  background: #31261d;
  z-index: 999;
}

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.35;
}

.orb-a { width: 30rem; height: 30rem; background: #b98f63; left: -8rem; top: -8rem; }
.orb-b { width: 35rem; height: 35rem; background: #9fb8bf; right: -14rem; top: -10rem; }
.orb-c { width: 30rem; height: 30rem; background: #ccb08f; left: 35%; bottom: -12rem; }

.grid {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(74, 61, 45, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 61, 45, 0.12) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,.45) 22%, rgba(0,0,0,.9));
}

.topbar,
main,
.footer {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0.7rem;
  z-index: 20;
  margin-top: 0.7rem;
  padding: 0.7rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 251, 245, 0.75);
  border: 1px solid rgba(95, 78, 58, 0.2);
  border-radius: 999px;
  backdrop-filter: blur(7px);
  box-shadow: 0 10px 28px rgba(56, 43, 28, 0.08);
}

.brand {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  gap: 0.9rem;
  color: var(--muted);
  font-size: 0.95rem;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", "Georgia", serif;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero { padding: 5.4rem 0 2.8rem; }
.eyebrow,
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: #7f796e;
  margin-bottom: 0.7rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 4.1rem);
  max-width: 14ch;
  margin: 0 0 1.1rem;
}

.lede,
.content-hero p,
.content-section p,
.list,
.link-card p,
.breadcrumbs,
.section-copy {
  color: var(--muted);
}

.lede { max-width: 63ch; font-size: 1.07rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 0.66rem 1.08rem;
  font-weight: 600;
  border: 1px solid var(--line-strong);
}

.btn-primary {
  background: #3a2f22;
  color: #f8f3e9;
  border-color: #3a2f22;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.42);
}

.panel,
.content-section,
.link-card,
.mode-card,
.guide-toc {
  border-radius: 1.2rem;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel,
.content-section,
.mode-card,
.guide-toc {
  padding: 1.3rem;
}

.signals {
  margin: 1.4rem 0 2.7rem;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1rem;
}

.signals ul { margin: 0; padding-left: 1.1rem; }
.signals li { margin-bottom: 0.62rem; }

.mode-lab {
  margin: 1.2rem 0 2.8rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.mode-tabs {
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0,1fr));
}

.mode-tab {
  border-radius: 0.8rem;
  padding: 0.66rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.58);
  cursor: pointer;
  color: var(--text);
}

.mode-tab.is-on {
  background: #ece1d3;
  border-color: #9e866f;
}

.mode-card h3 { margin-top: 0; font-size: 1.5rem; }
.mode-grid { display: grid; gap: 0.5rem; }
.mode-grid h4 { margin: 0 0 0.2rem; }

.feature-stack { margin: 2rem 0 2.8rem; }
.stack-grid,
.link-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(3, minmax(0,1fr));
}

.stack-grid h3,
.link-card h3 { margin: 0 0 0.4rem; }
.stack-grid p { color: var(--muted); }

.page-main {
  padding: 1.9rem 0 2.8rem;
}

.breadcrumbs { font-size: 0.92rem; margin-bottom: 1.1rem; }
.content-hero { margin-bottom: 1rem; }
.content-hero h1, .content-hero p { max-width: 70ch; }

.content-section.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1rem;
}

.section-title { margin-top: 0; }
.list { margin: 0; padding-left: 1.2rem; }
.list li { margin-bottom: 0.5rem; }
.link-card { padding: 1rem; background: var(--surface-solid); }

.footer {
  margin-bottom: 1.6rem;
  padding: 1.1rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(253, 247, 238, 0.7);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
  color: var(--muted);
}

.footer div { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.sr-only { position: absolute; left: -9999px; }

@media (max-width: 920px) {
  .topbar {
    border-radius: 1rem;
    top: 0;
    margin-top: 0;
    width: 100%;
  }

  .topbar,
  main,
  .footer {
    width: min(1120px, 95vw);
  }

  .signals,
  .mode-lab,
  .content-section.split,
  .stack-grid,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}
