:root {
  --bg: #f4f5ef;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #fbfbf7;
  --ink: #17221c;
  --muted: #445149;
  --line: #cfd6cb;
  --brand: #18543d;
  --brand-strong: #103c2b;
  --signal: #bd7b22;
  --signal-strong: #865410;
  --focus: #0f6fd6;
  --shadow: 0 20px 50px rgba(17, 26, 19, 0.12);
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(188, 222, 199, 0.65), transparent 32%),
    radial-gradient(circle at right 15%, rgba(241, 213, 172, 0.45), transparent 28%),
    linear-gradient(180deg, #f7f8f2 0%, #eef1ea 100%);
  font-family: var(--sans);
}

a {
  color: var(--brand-strong);
}

a:focus,
button:focus,
select:focus,
input:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

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

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: #ffffff;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 4rem 1.25rem 3rem;
  background: linear-gradient(135deg, #102b21, #20563e 50%, #87632c 100%);
  color: #f6f8f1;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(75deg, rgba(255, 255, 255, 0.05), transparent 45%),
    repeating-linear-gradient(135deg, transparent, transparent 18px, rgba(255, 255, 255, 0.04) 18px, rgba(255, 255, 255, 0.04) 19px);
}

.hero-inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  font-family: var(--serif);
}

h1 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.95;
}

.lede {
  max-width: 68ch;
  font-size: 1.05rem;
  line-height: 1.7;
}

.disclaimer {
  max-width: 72ch;
  padding-left: 1rem;
  border-left: 4px solid rgba(255, 222, 168, 0.95);
}

.action-row,
.card-actions,
.footer-links,
.bullet-list,
.space-nav,
.summary-grid,
.space-grid,
.section-body {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
}

.button.primary {
  background: #fff0;
  color: #f8fbf7;
  border-color: rgba(255, 255, 255, 0.55);
}

.button.secondary {
  background: #f5f7f2;
  color: var(--brand-strong);
}

.button.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #f8fbf7;
}

.page-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 1200px;
  margin: -1.75rem auto 0;
  padding: 0 1rem 2rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sidebar,
.summary-panel,
.section-panel {
  padding: 1.25rem;
}

.space-nav,
.bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.space-nav a,
.sidebar-block a {
  display: block;
  padding: 0.7rem 0.8rem;
  border-radius: 16px;
  text-decoration: none;
}

.space-nav a[aria-current="page"] {
  background: #e8eee8;
  font-weight: 700;
}

.sidebar-block {
  display: grid;
  gap: 0.4rem;
  margin-top: 1.5rem;
}

.content {
  display: grid;
  gap: 1rem;
}

.summary-grid > article,
.space-card,
.data-card,
.interactive-card {
  flex: 1 1 220px;
  min-width: 0;
  padding: 1rem;
  border-radius: 18px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.space-card h3,
.data-card h3,
.interactive-card h3 {
  margin-top: 0;
}

.space-emoji {
  margin: 0;
  font-size: 1.6rem;
}

.section-header {
  margin-bottom: 1rem;
}

.section-body {
  align-items: stretch;
}

.interactive-region {
  display: grid;
  gap: 1rem;
  width: 100%;
}

.selector-row {
  display: grid;
  gap: 0.5rem;
}

label,
select,
input,
textarea {
  font: inherit;
}

select {
  width: 100%;
  min-height: 44px;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.tag-row,
.timeline,
.definition-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #d7ddd2;
  background: #eef4ee;
  font-size: 0.92rem;
}

.code-block {
  margin: 0;
  padding: 1rem;
  border-radius: 18px;
  background: #12251a;
  color: #d9efe0;
  font-family: var(--mono);
  overflow-x: auto;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

@media (min-width: 960px) {
  .page-shell {
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    top: 1rem;
    align-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
