:root {
  color-scheme: dark;
  --bg: #07110f;
  --surface: #0b1714;
  --surface-2: #0f201b;
  --line: rgba(173, 255, 219, .16);
  --text: #eefbf5;
  --muted: #93ada2;
  --green: #72f1b8;
  --green-2: #bcffde;
  --yellow: #f0ff8f;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.6; }
a { color: inherit; }
button, input { font: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 99; padding: .7rem 1rem; background: var(--green); color: #04100c; font-weight: 800; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { position: sticky; top: 0; z-index: 20; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: .8rem max(1.25rem, calc((100vw - var(--max)) / 2)); border-bottom: 1px solid var(--line); background: rgba(7,17,15,.88); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand img { display: block; }
.brand span { display: flex; flex-direction: column; line-height: 1; }
.brand strong { font-size: 1.1rem; letter-spacing: .08em; }
.brand small { margin-top: .32rem; color: var(--muted); font-size: .62rem; letter-spacing: .2em; }
.primary-nav { display: flex; align-items: center; gap: 1.5rem; }
.primary-nav a { color: #b9cbc4; font-size: .9rem; font-weight: 650; text-decoration: none; }
.primary-nav a:hover, .primary-nav a:focus-visible { color: var(--green); }
.primary-nav .nav-cta { padding: .55rem .9rem; border: 1px solid rgba(114,241,184,.45); color: var(--green); }
.nav-toggle { display: none; border: 1px solid var(--line); background: transparent; color: var(--text); padding: .45rem .7rem; }

.hero { position: relative; isolation: isolate; min-height: 760px; display: flex; flex-direction: column; justify-content: center; align-items: center; overflow: hidden; padding: 6rem 1.25rem 4rem; text-align: center; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; z-index: -2; inset: 0; background: radial-gradient(circle at 50% 35%, rgba(45,186,125,.17), transparent 34%), linear-gradient(180deg, transparent 60%, var(--bg)); }
.hero-grid { position: absolute; z-index: -3; inset: 0; opacity: .18; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(to bottom, black, transparent 80%); transform: perspective(600px) rotateX(55deg) scale(1.6) translateY(18%); transform-origin: center bottom; }
.eyebrow, .section-kicker { color: var(--green); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: .6rem; }
.eyebrow span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.hero h1 { max-width: 900px; margin: 1.4rem 0 1.1rem; font-size: clamp(3rem, 8vw, 6.8rem); line-height: .92; letter-spacing: -.065em; }
.hero h1 em { color: transparent; font-style: normal; -webkit-text-stroke: 1px rgba(188,255,222,.62); }
.hero-copy { max-width: 660px; margin: 0 auto 2.3rem; color: #aec2b9; font-size: clamp(1.05rem, 2vw, 1.25rem); }
.search { position: relative; width: min(680px, 100%); display: flex; align-items: center; border: 1px solid rgba(114,241,184,.42); background: rgba(10,28,22,.87); box-shadow: 0 20px 70px rgba(0,0,0,.3), inset 0 0 30px rgba(114,241,184,.025); }
.search:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(114,241,184,.1); }
.search svg { width: 22px; margin-left: 1rem; fill: none; stroke: var(--green); stroke-width: 1.8; }
.search input { flex: 1; min-width: 0; padding: 1.05rem; border: 0; outline: 0; background: transparent; color: var(--text); }
.search input::placeholder { color: #728b80; }
.search kbd { margin-right: .8rem; padding: .15rem .45rem; border: 1px solid var(--line); color: var(--muted); background: #0b1814; }
.search-results { width: min(680px, 100%); max-height: 250px; overflow: auto; text-align: left; background: #0a1713; border: 1px solid var(--line); border-top: 0; }
.search-results:empty { display: none; }
.search-results a { display: block; padding: .8rem 1rem; text-decoration: none; border-top: 1px solid rgba(173,255,219,.08); }
.search-results a:hover, .search-results a:focus { background: var(--surface-2); color: var(--green); }
.search-results small { display: block; color: var(--muted); }
.hero-stats { display: flex; gap: 3rem; margin-top: 3rem; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { color: var(--green-2); font-size: 1.6rem; }
.hero-stats span { color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }

.section { max-width: var(--max); margin: 0 auto; padding: 7rem 1.25rem; }
.section-heading { max-width: 700px; margin-bottom: 3rem; }
.section-heading.horizontal { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.section-heading h2, .source-section h2 { margin: .6rem 0 0; font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -.045em; }
.section-heading > p, .section-heading.horizontal > p { color: var(--muted); }
.section-heading.horizontal > p { max-width: 330px; margin: 0; text-align: right; }
.path-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.path-card { position: relative; min-height: 330px; display: flex; flex-direction: column; padding: 2rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.path-card.featured { background: linear-gradient(145deg, rgba(114,241,184,.12), var(--surface) 55%); }
.card-index { position: absolute; top: 1.1rem; right: 1.2rem; color: #557066; font-size: .72rem; letter-spacing: .12em; }
.card-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 3.2rem; border: 1px solid rgba(114,241,184,.45); color: var(--green); font-weight: 900; box-shadow: inset 0 0 20px rgba(114,241,184,.08); }
.path-card h3 { margin: 0 0 .6rem; font-size: 1.45rem; }
.path-card p { margin: 0 0 2rem; color: var(--muted); }
.path-card a { margin-top: auto; color: var(--green); font-weight: 750; text-underline-offset: .3em; }
.topic-section { padding-top: 3rem; }
.wiki-article { padding: 3rem 0; border-top: 1px solid var(--line); }
.article-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.article-meta span { color: var(--green); }
.article-layout { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(0, 1.4fr); gap: clamp(2rem, 8vw, 8rem); margin-top: 2.5rem; }
.article-layout > h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.02; letter-spacing: -.045em; }
.article-copy { color: #b5c9c0; }
.article-copy .lead { margin-top: 0; color: var(--text); font-size: 1.2rem; }
.article-copy code { padding: .12rem .32rem; color: var(--green-2); background: var(--surface-2); }
.callout { display: grid; grid-template-columns: 140px 1fr; gap: 1rem; margin-top: 2rem; padding: 1.1rem; border-left: 2px solid var(--green); background: rgba(114,241,184,.06); }
.callout strong { color: var(--green); }
.callout.warning { border-color: var(--yellow); }
.callout.warning strong { color: var(--yellow); }
.check-list { padding: 0; list-style: none; }
.check-list li { position: relative; padding: .55rem 0 .55rem 1.8rem; border-bottom: 1px solid rgba(173,255,219,.08); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 900; }
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 2rem 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.resource-grid div { min-height: 150px; padding: 1.2rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.resource-grid strong, .resource-grid span { display: block; }
.resource-grid strong { margin-bottom: 1.5rem; color: var(--green); font-size: 1.3rem; }

.builder-section { max-width: none; padding-left: max(1.25rem, calc((100vw - var(--max)) / 2)); padding-right: max(1.25rem, calc((100vw - var(--max)) / 2)); background: #0a1512; border-block: 1px solid var(--line); }
.builder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.builder-grid article { min-height: 260px; padding: 2rem; background: var(--bg); }
.builder-grid article > span { color: var(--green); font-size: .7rem; letter-spacing: .12em; }
.builder-grid h3 { margin: 4rem 0 .7rem; font-size: 1.4rem; }
.builder-grid p { color: var(--muted); }
.external-panel { display: flex; justify-content: space-between; gap: 2rem; margin-top: 1.25rem; padding: 1.3rem 1.5rem; border: 1px solid rgba(114,241,184,.42); color: var(--green); text-decoration: none; }
.external-panel span { color: var(--text); }
.external-panel:hover { background: rgba(114,241,184,.06); }

.glossary-filter { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .85rem; }
.glossary-filter input { width: 180px; padding: .55rem .7rem; border: 1px solid var(--line); outline: 0; background: var(--surface); color: var(--text); }
.glossary-filter input:focus { border-color: var(--green); }
.glossary-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.glossary-grid > div { min-height: 150px; padding: 1.3rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.glossary-grid dt { color: var(--green-2); font-size: 1.05rem; font-weight: 850; }
.glossary-grid dd { margin: .7rem 0 0; color: var(--muted); }
.empty-state { padding: 2rem; text-align: center; color: var(--muted); border: 1px solid var(--line); }
.source-section { display: grid; grid-template-columns: .9fr 1.1fr auto; align-items: end; gap: 3rem; border-top: 1px solid var(--line); }
.source-section p { margin: 0; color: var(--muted); }
.source-section a { color: var(--green); white-space: nowrap; }
.site-footer { max-width: var(--max); display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 2rem; margin: 0 auto; padding: 3rem 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
.site-footer p { text-align: center; }
.site-footer > div { display: flex; justify-content: flex-end; gap: 1rem; }
.site-footer > div a { text-decoration: none; }
.site-footer > div a:hover { color: var(--green); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .primary-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; padding: 1rem 1.25rem 1.4rem; border-bottom: 1px solid var(--line); background: #08130f; }
  .primary-nav.open { display: flex; }
  .primary-nav a { padding: .55rem 0; }
  .primary-nav .nav-cta { padding: .65rem; text-align: center; }
  .hero { min-height: 690px; }
  .hero-stats { gap: 1.5rem; }
  .path-grid, .builder-grid, .glossary-grid { grid-template-columns: 1fr; }
  .path-card { min-height: 270px; }
  .section-heading.horizontal { align-items: start; flex-direction: column; }
  .section-heading.horizontal > p { text-align: left; }
  .article-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-grid div { min-height: auto; }
  .callout { grid-template-columns: 1fr; }
  .source-section, .site-footer { grid-template-columns: 1fr; align-items: start; }
  .site-footer p { text-align: left; }
  .site-footer > div { justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 520px) {
  .section { padding-top: 5rem; padding-bottom: 5rem; }
  .hero { align-items: stretch; text-align: left; }
  .hero h1 { font-size: 3.2rem; }
  .hero-copy { margin-left: 0; }
  .hero-stats { justify-content: space-between; gap: .6rem; }
  .hero-stats strong { font-size: 1.3rem; }
  .hero-stats span { font-size: .65rem; }
  .search kbd { display: none; }
  .article-meta { align-items: start; flex-direction: column; gap: .3rem; }
  .glossary-filter { width: 100%; align-items: stretch; flex-direction: column; }
  .glossary-filter input { width: 100%; }
  .external-panel { flex-direction: column; }
}

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