:root {
  --bg: #f2f1ea;
  --paper: #faf9f4;
  --ink: #10201a;
  --muted: #65726c;
  --line: #ced4ce;
  --green: #16e08f;
  --deep: #07130f;
  --deep-2: #0d2119;
  --orange: #ff8a4c;
  --mono: "DM Mono", monospace;
  --sans: "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: var(--sans); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.progress-bar { position: fixed; z-index: 100; top: 0; left: 0; height: 3px; width: 0; background: var(--green); }

.site-header {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  min-height: 70px; padding: 0 4vw; color: #d9e4dd; background: rgba(7,19,15,.94); border-bottom: 1px solid #234035;
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 500; letter-spacing: -.05em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: var(--deep); background: var(--green); border-radius: 4px; font-size: 13px; }
.brand-dot { color: var(--green); }
.top-nav { display: flex; gap: 32px; color: #9fb1a8; font-size: 13px; }
.top-nav a:hover { color: var(--green); }
.header-cta { padding: 10px 14px; border: 1px solid #426052; border-radius: 3px; color: #dce8e1; font-size: 12px; font-weight: 700; }
.header-cta span { color: var(--green); }

.hero { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; min-height: 680px; overflow: hidden; color: white; background: var(--deep); border-bottom: 1px solid #1c352a; }
.hero-grid { position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(#163126 1px,transparent 1px),linear-gradient(90deg,#163126 1px,transparent 1px); background-size: 55px 55px; mask-image: linear-gradient(90deg,#000,transparent 90%); }
.hero-copy { position: relative; z-index: 1; align-self: center; padding: 8vw 4vw 7vw 8vw; }
.eyebrow, .section-index { display: flex; align-items: center; gap: 10px; color: #168b5f; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow { color: var(--green); }
.eyebrow span { width: 22px; height: 1px; background: var(--green); }
.hero h1 { max-width: 720px; margin: 20px 0 24px; font-size: clamp(50px,6vw,86px); line-height: 1.08; letter-spacing: -.075em; }
.hero h1 span { color: var(--green); }
.hero-copy > p { max-width: 630px; margin: 0; color: #a9bbb2; font-size: 17px; line-height: 1.85; }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 25px; min-height: 48px; padding: 0 20px; border: 1px solid transparent; border-radius: 3px; font-size: 13px; font-weight: 700; }
.button.primary { color: var(--deep); background: var(--green); }
.button.primary:hover { background: #46efa9; transform: translateY(-1px); }
.button.ghost { color: #d4e2da; border-color: #355347; }
.button.ghost:hover { border-color: var(--green); }
.hero-metrics { display: flex; gap: 40px; margin-top: 55px; padding-top: 25px; border-top: 1px solid #203a2f; }
.hero-metrics div { display: grid; gap: 3px; }
.hero-metrics strong { font-family: var(--mono); color: white; font-size: 20px; }
.hero-metrics span { color: #6e887c; font-size: 11px; }

.terminal-card { position: relative; z-index: 1; align-self: center; width: min(86%,580px); margin: 40px auto; background: #091811; border: 1px solid #315142; border-radius: 7px; box-shadow: 0 35px 100px rgba(0,0,0,.42); transform: rotate(1deg); }
.terminal-top { display: flex; align-items: center; height: 42px; padding: 0 14px; color: #7f978b; border-bottom: 1px solid #213a2f; font: 10px var(--mono); }
.terminal-dots { display: flex; gap: 6px; margin-right: auto; }
.terminal-dots i { width: 7px; height: 7px; background: #3a5348; border-radius: 50%; }
.terminal-top b { margin-left: auto; padding: 3px 7px; color: var(--green); background: #103622; border-radius: 10px; font-size: 8px; }
.terminal-body { padding: 28px; color: #d1ddd6; font: 12px/1.8 var(--mono); }
.terminal-body p { margin: 0 0 20px; }
.muted { color: #61796d; }
.green, .file-line span { color: var(--green); }
.terminal-question { color: white; }
.thinking { margin: 24px 0; color: #90a89c; }
.thinking i { display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: var(--orange); border-radius: 50%; box-shadow: 0 0 12px var(--orange); }
.file-line { margin: 8px 0; color: #8fa79b; }
.terminal-result { display: flex; align-items: center; gap: 12px; margin: 24px 0; padding: 12px; color: #bcd0c5; background: #0c281b; border-left: 2px solid var(--green); }
.terminal-result span { padding: 2px 6px; color: var(--deep); background: var(--green); font-size: 9px; font-weight: 700; }
.cursor-line { margin-bottom: 0 !important; }
.cursor-line i { display: inline-block; width: 7px; height: 14px; margin-left: 8px; vertical-align: middle; background: var(--green); animation: blink 1s infinite; }
.terminal-label { position: absolute; right: -15px; bottom: -23px; padding: 11px 14px; color: var(--deep); background: var(--green); font: 10px var(--mono); font-weight: 600; transform: rotate(-2deg); }
@keyframes blink { 50% { opacity: 0; } }

.trust-strip { display: flex; justify-content: center; gap: 26px; padding: 15px 4vw; color: #7f998c; background: #0b1c15; font: 9px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.trust-strip span:nth-child(even) { color: var(--green); }
.section { padding: 100px max(4vw,calc((100vw - 1280px)/2)); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 42px; }
.section h2, .deep-dive h2 { margin: 10px 0 8px; font-size: clamp(35px,4vw,58px); line-height: 1.15; letter-spacing: -.06em; }
.section-heading p, .split-section > div > p, .safety-title p { margin: 0; color: var(--muted); line-height: 1.7; }
.search-box { display: flex; align-items: center; min-width: 250px; padding: 10px 14px; background: var(--paper); border: 1px solid var(--line); }
.search-box span { margin-right: 8px; color: #748078; font-size: 18px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 12px; }

.lesson-grid { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.lesson { display: flex; flex-direction: column; min-height: 310px; padding: 25px; background: var(--paper); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: .2s ease; }
.lesson:hover { position: relative; z-index: 2; transform: translateY(-4px); box-shadow: 0 15px 35px rgba(29,51,42,.1); }
.lesson.featured { grid-row: span 2; min-height: 620px; color: #d9e6de; background: var(--deep-2); }
.lesson-top { display: flex; align-items: center; gap: 9px; color: #759084; font: 9px var(--mono); }
.lesson-top span { color: var(--green); }
.lesson-top b { padding: 3px 6px; color: #0b5034; background: #cbeedc; border-radius: 2px; }
.lesson-top i { margin-left: auto; font-style: normal; }
.lesson h3 { margin: 32px 0 12px; font-size: 24px; line-height: 1.35; letter-spacing: -.04em; }
.lesson p { margin: 0; color: #718078; font-size: 13px; line-height: 1.8; }
.lesson.featured p { color: #91a89c; }
.lesson a { margin-top: auto; padding-top: 25px; color: #15714f; border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.lesson.featured a { color: var(--green); border-color: #2c493d; }
.lesson a span { float: right; }
.lesson-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.lesson-tags span { padding: 4px 7px; color: #50675c; background: #e4e8e2; font: 9px var(--mono); }
.lesson-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 35px 0 25px; padding: 13px; color: var(--green); background: #08140f; border: 1px solid #284738; font: 10px var(--mono); }
.copy-btn { padding: 5px 8px; color: #aabbb1; background: transparent; border: 1px solid #3b574a; border-radius: 2px; font: 9px var(--mono); }
.lesson ul { margin: 0; padding: 0; list-style: none; color: #9cb0a5; font-size: 12px; line-height: 2.2; }
.lesson li::before { content: "✓"; margin-right: 8px; color: var(--green); }
.lesson.hidden { display: none; }
.empty-state { display: none; margin: 30px 0 0; color: var(--muted); }
.empty-state.visible { display: block; }

.deep-dive { display: grid; grid-template-columns: .35fr .65fr; color: #d8e6de; background: var(--deep); }
.deep-sidebar { padding: 100px 5vw 100px max(4vw,calc((100vw - 1280px)/2)); border-right: 1px solid #203b2f; }
.deep-sidebar h2 { margin-top: 18px; font-size: 42px; }
.deep-sidebar p { color: #789286; line-height: 1.75; }
.deep-sidebar nav { display: grid; gap: 3px; margin-top: 45px; }
.deep-sidebar nav a { padding: 12px 15px; color: #789286; border-left: 1px solid #365346; font-size: 12px; }
.deep-sidebar nav a.active { color: var(--green); background: #0d251a; border-color: var(--green); }
.article-body { padding: 100px max(4vw,calc((100vw - 1280px)/2)) 100px 6vw; }
.chapter-label { padding: 5px 8px; color: var(--green); background: #123522; font: 9px var(--mono); }
.article-body .lead { max-width: 780px; color: #a8bcb1; font-size: 16px; line-height: 1.8; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 35px; }
.compare { padding: 20px; border: 1px solid #29473a; }
.compare span { font: 9px var(--mono); text-transform: uppercase; }
.compare p { min-height: 72px; line-height: 1.7; }
.compare small { color: #718d7f; font-size: 11px; line-height: 1.6; }
.compare.bad span { color: var(--orange); }
.compare.good { background: #0b2418; border-color: #22794e; }
.compare.good span { color: var(--green); }
.principles { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 40px; background: #284438; border: 1px solid #284438; }
.principles div { padding: 24px; background: var(--deep); }
.principles strong { color: var(--green); font: 10px var(--mono); }
.principles h3 { margin: 18px 0 8px; font-size: 16px; }
.principles p { color: #789286; font-size: 11px; line-height: 1.7; }

.curriculum-section { background: #eef1eb; }
.curriculum-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.curriculum-card { display: flex; flex-direction: column; min-height: 260px; padding: 24px; background: var(--paper); border: 1px solid var(--line); }
.curriculum-card span { color: #0d7550; font: 9px var(--mono); letter-spacing: .08em; }
.curriculum-card h3 { margin: 34px 0 10px; font-size: 20px; letter-spacing: -.04em; }
.curriculum-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.curriculum-card b { margin-top: auto; padding-top: 18px; color: #123c2b; font-size: 12px; line-height: 1.6; }
.practice-panel { display: grid; grid-template-columns: .8fr 1.2fr; gap: 24px; margin-top: 28px; padding: 30px; color: #d9e6de; background: var(--deep); border: 1px solid #29483a; }
.practice-panel h3 { margin: 18px 0 10px; font-size: 26px; letter-spacing: -.04em; }
.practice-panel p { color: #8aa093; font-size: 13px; line-height: 1.8; }
.practice-panel pre { margin: 0; padding: 24px; overflow-x: auto; background: #08140f; border: 1px solid #29483a; color: #b9cec2; font: 11px/2 var(--mono); }

.dark-section { color: #d9e6de; background: #0d2119; }
.dark-section .section-index { color: var(--green); }
.dark-section .section-heading p { color: #819a8e; }
.workflow { display: grid; grid-template-columns: repeat(5,1fr); border-top: 1px solid #335044; border-left: 1px solid #335044; }
.workflow article { min-height: 295px; padding: 23px; border-right: 1px solid #335044; border-bottom: 1px solid #335044; }
.workflow article > span { color: var(--green); font: 10px var(--mono); }
.workflow article div { margin-top: 75px; }
.workflow b { color: #638174; font: 8px var(--mono); letter-spacing: .1em; }
.workflow h3 { margin: 8px 0; font-size: 17px; }
.workflow p { color: #789286; font-size: 11px; line-height: 1.7; }

.prompt-section { background: #dfe4dd; }
.prompt-builder { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.prompt-builder form { display: grid; gap: 13px; }
.prompt-builder label { display: grid; gap: 7px; color: #4f655a; font-size: 11px; font-weight: 700; }
.prompt-builder input, .prompt-builder textarea { width: 100%; padding: 14px; color: var(--ink); background: var(--paper); border: 1px solid #bac5bd; border-radius: 2px; outline-color: #168b5f; font-size: 12px; }
.prompt-builder textarea { min-height: 90px; resize: vertical; }
.prompt-builder .button { justify-self: start; margin-top: 8px; border: 0; }
.prompt-output { min-height: 430px; color: #b9cec2; background: var(--deep); border: 1px solid #315044; }
.output-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #2d493c; font: 9px var(--mono); text-transform: uppercase; }
.output-top span { color: var(--green); }
.output-top button { color: #a7bdb2; background: transparent; border: 0; font: 9px var(--mono); }
.prompt-output pre { margin: 0; padding: 25px; white-space: pre-wrap; font: 12px/2 var(--mono); }

.split-section { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 7vw; }
.check-list { display: grid; gap: 13px; margin: 32px 0; padding: 0; list-style: none; color: #51665b; font-size: 13px; }
.check-list li::before { content: "✓"; display: inline-grid; place-items: center; width: 19px; height: 19px; margin-right: 10px; color: var(--deep); background: var(--green); border-radius: 50%; font-size: 10px; font-weight: 800; }
.text-link { color: #11764f; font-size: 12px; font-weight: 700; }
.code-window { background: var(--deep); border: 1px solid #345246; box-shadow: 18px 18px 0 #c9d0c9; }
.code-window > div { display: flex; align-items: center; justify-content: space-between; padding: 11px 15px; color: #779084; border-bottom: 1px solid #2e493d; font: 9px var(--mono); }
.code-window pre { margin: 0; padding: 28px; overflow-x: auto; color: #a3b8ad; font: 11px/2 var(--mono); }
.code-window em, .code-window span { color: var(--green); font-style: normal; }
.code-window b { color: #fff; }

.safety-section { color: #dce9e2; background: var(--deep); }
.safety-section .section-index { color: var(--orange); }
.safety-title { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 40px; }
.safety-title p { max-width: 450px; color: #849d90; }
.safety-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: #385145; border: 1px solid #385145; }
.safety-grid article { min-height: 245px; padding: 24px; background: var(--deep); }
.safety-grid span { color: var(--orange); font: 10px var(--mono); }
.safety-grid h3 { margin-top: 50px; font-size: 16px; }
.safety-grid p { color: #80988b; font-size: 11px; line-height: 1.75; }

.extensions-section { background: var(--paper); }
.extension-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.extension-grid article { padding: 24px; border: 1px solid var(--line); }
.extension-grid span { color: #0d7550; font: 9px var(--mono); }
.extension-grid h3 { margin: 45px 0 10px; }
.extension-grid p { color: var(--muted); font-size: 11px; line-height: 1.7; }

.faq-section h2 { margin-bottom: 38px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; justify-content: space-between; padding: 22px 0; cursor: pointer; font-size: 14px; font-weight: 700; list-style: none; }
.faq-list summary span { color: #18855b; font: 18px var(--mono); }
.faq-list p { max-width: 800px; margin-top: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }

.final-cta { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 70px max(4vw,calc((100vw - 1280px)/2)); color: #dce9e2; background: #0d2119; border-top: 1px solid #284438; }
.final-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.final-cta h2 { margin: 12px 0 8px; font-size: clamp(32px,4vw,55px); letter-spacing: -.06em; }
.final-cta p { color: #829b8f; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 26px 4vw; color: #799186; background: var(--deep); border-top: 1px solid #294337; font-size: 10px; }
footer .brand { color: #dce9e2; }
footer div { display: flex; gap: 18px; }
footer a:hover { color: var(--green); }
.toast { position: fixed; z-index: 99; right: 22px; bottom: 22px; padding: 10px 16px; color: var(--deep); background: var(--green); border-radius: 3px; opacity: 0; transform: translateY(10px); transition: .2s; font-size: 11px; font-weight: 700; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }

.site-page { min-height: 70vh; background: var(--bg); }
.page-hero { padding: 95px max(4vw,calc((100vw - 1180px)/2)) 55px; color: #dce9e2; background: var(--deep); }
.page-hero h1 { max-width: 900px; margin: 15px 0 12px; font-size: clamp(42px,6vw,78px); line-height: 1.08; letter-spacing: -.075em; }
.page-hero p { max-width: 760px; margin: 0; color: #94aaa0; line-height: 1.8; }
.article-card-grid, .resource-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; padding: 70px max(4vw,calc((100vw - 1180px)/2)); }
.article-card-grid article, .resource-grid article { display: flex; flex-direction: column; min-height: 260px; padding: 25px; background: var(--paper); border: 1px solid var(--line); }
.article-card-grid span, .resource-grid span { color: #0d7550; font: 9px var(--mono); letter-spacing: .08em; }
.article-card-grid h2, .resource-grid h2 { margin: 38px 0 10px; font-size: 23px; letter-spacing: -.04em; }
.article-card-grid p, .resource-grid p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.article-card-grid a, .resource-grid a { margin-top: auto; padding-top: 18px; color: #0d7550; border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.article-layout { display: grid; grid-template-columns: minmax(0,780px) 280px; gap: 56px; padding: 85px max(4vw,calc((100vw - 1180px)/2)); background: var(--paper); }
.article-main h1 { margin: 14px 0 18px; font-size: clamp(38px,5vw,64px); line-height: 1.15; letter-spacing: -.06em; }
.article-main .lead { color: #53665d; font-size: 17px; line-height: 1.9; }
.article-main h2 { margin: 46px 0 14px; font-size: 26px; letter-spacing: -.035em; }
.article-main p, .article-main li { color: #53665d; font-size: 14px; line-height: 1.9; }
.article-main pre, .tool-output pre { overflow-x: auto; padding: 22px; color: #b9cec2; background: var(--deep); border: 1px solid #29483a; font: 12px/1.9 var(--mono); }
.article-callout { margin: 36px 0; padding: 18px 20px; color: #103222; background: #c9efdc; border-left: 4px solid #15b878; font-size: 13px; line-height: 1.8; }
.article-aside { position: sticky; top: 95px; align-self: start; display: grid; gap: 10px; }
.article-aside a { padding: 14px; color: #0d7550; background: #eef1eb; border: 1px solid var(--line); font-size: 12px; font-weight: 700; line-height: 1.6; }
.generator-panel { display: grid; grid-template-columns: .9fr 1.1fr; gap: 20px; padding: 70px max(4vw,calc((100vw - 1180px)/2)); }
.generator-panel form { display: grid; gap: 13px; }
.generator-panel label { display: grid; gap: 7px; color: #4f655a; font-size: 12px; font-weight: 700; }
.generator-panel input, .generator-panel textarea { width: 100%; padding: 14px; background: var(--paper); border: 1px solid #bac5bd; outline-color: #168b5f; font-size: 12px; }
.generator-panel textarea { min-height: 92px; resize: vertical; }
.tool-output { min-height: 560px; background: var(--deep); border: 1px solid #29483a; }
.tool-output pre { min-height: 505px; margin: 0; border: 0; white-space: pre-wrap; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; padding-bottom: 50px; }
  .hero-copy { padding: 90px 7vw 30px; }
  .terminal-card { width: min(86%,650px); }
  .lesson-grid { grid-template-columns: repeat(2,1fr); }
  .deep-dive { grid-template-columns: 1fr; }
  .deep-sidebar { padding: 70px 7vw 30px; border-right: 0; }
  .deep-sidebar nav { grid-template-columns: repeat(5,1fr); }
  .article-body { padding: 55px 7vw 75px; }
  .curriculum-grid { grid-template-columns: repeat(2,1fr); }
  .practice-panel { grid-template-columns: 1fr; }
  .workflow { grid-template-columns: repeat(3,1fr); }
  .safety-grid, .extension-grid { grid-template-columns: repeat(2,1fr); }
  .article-card-grid, .resource-grid { grid-template-columns: repeat(2,1fr); }
  .article-layout, .generator-panel { grid-template-columns: 1fr; }
  .article-aside { position: static; }
}

@media (max-width: 720px) {
  .site-header { min-height: 60px; padding: 0 18px; }
  .top-nav, .header-cta { display: none; }
  .hero-copy { padding: 70px 22px 20px; }
  .hero h1 { font-size: 48px; }
  .hero-copy > p { font-size: 14px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-metrics { gap: 25px; }
  .terminal-card { width: calc(100% - 36px); transform: none; }
  .terminal-body { padding: 18px; font-size: 9px; }
  .terminal-label { right: 5px; }
  .trust-strip { justify-content: start; overflow-x: auto; white-space: nowrap; }
  .section { padding: 70px 20px; }
  .section-heading, .safety-title, .final-cta { align-items: start; flex-direction: column; }
  .search-box { width: 100%; }
  .lesson-grid, .compare-grid, .principles, .curriculum-grid, .prompt-builder, .split-section { grid-template-columns: 1fr; }
  .lesson.featured { grid-row: auto; min-height: 560px; }
  .deep-sidebar { padding: 60px 20px 25px; }
  .deep-sidebar nav { grid-template-columns: 1fr 1fr; }
  .article-body { padding: 40px 20px 65px; }
  .workflow, .safety-grid, .extension-grid { grid-template-columns: 1fr; }
  .article-card-grid, .resource-grid { grid-template-columns: 1fr; padding: 45px 20px; }
  .article-layout, .generator-panel, .page-hero { padding-left: 20px; padding-right: 20px; }
  .workflow article { min-height: 220px; }
  .workflow article div { margin-top: 45px; }
  .code-window { margin-top: 20px; box-shadow: 8px 8px 0 #c9d0c9; }
  footer { align-items: start; flex-direction: column; }
}
