:root {
  color-scheme: light;
  --ink: #10231c;
  --muted: #53645d;
  --paper: #f5f2e9;
  --surface: #fffdf7;
  --line: #cbd2c9;
  --green: #185c42;
  --lime: #c9f56f;
  --orange: #ef7f4d;
  --blue: #8dd7e8;
  --control-border: #71827a;
  --focus: #b85b31;
  --radius: 1.2rem;
  --max: 76rem;
  --measure: 48rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html[data-theme="dark"] { color-scheme: dark; --control-border: #71877c; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.7; }
a { color: inherit; }
p, li { color: var(--muted); }
strong { color: var(--ink); }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -.035em; }
h1 { max-width: 14ch; margin: 0 0 1.25rem; font-size: clamp(3rem, 7vw, 6rem); }
h2 { margin: 0 0 1.4rem; font-size: clamp(2rem, 4vw, 3.35rem); scroll-margin-top: 6rem; }
h3 { margin: 2.2rem 0 .7rem; font-size: 1.5rem; scroll-margin-top: 6rem; }
h4 { margin: 1.5rem 0 .4rem; font-size: 1.05rem; }
code { padding: .15rem .35rem; border-radius: .3rem; background: #e8eae3; color: var(--ink); }
.shell { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.skip { position: fixed; top: .5rem; left: .5rem; z-index: 30; padding: .65rem 1rem; background: var(--lime); transform: translateY(-150%); }
.skip:focus { transform: none; }
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgb(203 210 201 / 75%); background: rgb(245 242 233 / 94%); backdrop-filter: blur(12px); }
.site-nav { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.logo { flex: 0 0 auto; font-size: 1.45rem; font-weight: 900; letter-spacing: -.06em; text-decoration: none; }
.logo span { color: var(--green); }
.nav-links { display: flex; align-items: center; gap: clamp(.65rem, 1.6vw, 1.3rem); }
.nav-links a { color: var(--muted); font-size: .86rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a[aria-current="page"] { color: var(--green); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .35rem; }
.theme-toggle { flex: 0 0 auto; width: auto; min-height: 2rem; padding: .3rem .65rem; border: 1px solid var(--control-border); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: .78rem; font-weight: 800; box-shadow: none; white-space: nowrap; }
.theme-toggle:hover { transform: none; border-color: var(--green); box-shadow: none; }
.page-hero { padding: clamp(5rem, 10vw, 8rem) 0 clamp(3.5rem, 7vw, 6rem); background: linear-gradient(135deg, var(--ink), #18372d); color: var(--paper); }
.page-hero p { max-width: 46rem; margin-bottom: 0; color: #c7d2cc; font-size: clamp(1.08rem, 2vw, 1.3rem); }
.page-hero strong { color: var(--paper); }
.kicker { display: inline-block; margin-bottom: 1rem !important; color: var(--lime) !important; font-size: .76rem !important; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.docs-layout { display: grid; grid-template-columns: 14rem minmax(0, var(--measure)); justify-content: space-between; gap: clamp(3rem, 8vw, 8rem); padding-block: 4rem 8rem; }
.toc { align-self: start; position: sticky; top: 6rem; }
.toc strong { display: block; margin-bottom: .7rem; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; }
.toc a { display: block; padding: .32rem 0; color: var(--muted); font-size: .88rem; text-decoration: none; }
.toc a:hover, .toc a:focus-visible { color: var(--green); }
.prose > section { padding-bottom: 4.5rem; }
.prose > section + section { padding-top: 4.5rem; border-top: 1px solid var(--line); }
.lede { font-size: 1.15rem; }
.eyebrow { display: inline-block; margin-bottom: .8rem; color: var(--green); font-size: .74rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; margin: 1.5rem 0; }
.card { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card h3, .card h4 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.numbered { counter-reset: item; }
.numbered .card { counter-increment: item; }
.numbered .card::before { display: block; margin-bottom: .55rem; color: var(--green); content: "0" counter(item); font: 850 .75rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.callout { margin: 1.5rem 0; padding: 1.15rem 1.3rem; border-left: .35rem solid var(--orange); background: #fff3e9; }
.callout.green { border-color: var(--green); background: #e9f2e8; }
.callout p:last-child { margin-bottom: 0; }
.phase { margin: 2rem 0; padding: clamp(1.3rem, 4vw, 2rem); border: 2px solid var(--ink); border-radius: var(--radius); background: var(--surface); box-shadow: 7px 7px 0 var(--green); }
.phase.blue { box-shadow-color: var(--blue); }
.phase.orange { box-shadow-color: var(--orange); }
.phase h3 { margin-top: 0; font-size: clamp(1.7rem, 3vw, 2.35rem); }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1rem 0 1.4rem; }
.meta div { padding: .85rem; border-radius: .75rem; background: #eef0e9; }
.meta small { display: block; color: var(--green); font-weight: 850; text-transform: uppercase; }
.definition, .template { margin: 1.5rem 0; padding: 1.3rem; border: 1px solid var(--line); border-radius: var(--radius); background: #f1f7ed; }
.definition h3, .definition h4, .template h3 { margin-top: 0; color: var(--green); }
.definition li::marker { color: var(--green); }
.template { background: var(--surface); }
.price { display: block; margin: .5rem 0; color: var(--green); font-size: 2rem; font-weight: 900; letter-spacing: -.04em; }
.course-meta { display: flex; flex-wrap: wrap; gap: .45rem; margin: .8rem 0; }
.course-meta span { padding: .25rem .55rem; border-radius: 999px; background: #e8eee7; color: var(--green); font-size: .75rem; font-weight: 800; }
.contact-panel { padding: clamp(1.25rem, 4vw, 2rem); border-radius: var(--radius); background: var(--ink); color: var(--paper); }
.contact-panel h2, .contact-panel strong { color: var(--paper); }
.contact-panel p { color: #c7d2cc; }
form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
label { display: grid; gap: .35rem; color: var(--paper); font-size: .85rem; font-weight: 750; }
label.full { grid-column: 1 / -1; }
input, select, textarea { width: 100%; padding: .75rem .85rem; border: 1px solid var(--control-border); border-radius: .55rem; background: var(--surface); color: var(--ink); font: inherit; }
textarea { min-height: 8rem; resize: vertical; }
button { width: fit-content; padding: .75rem 1.1rem; border: 2px solid var(--paper); border-radius: 999px; background: var(--lime); color: var(--ink); font: inherit; font-weight: 850; cursor: pointer; box-shadow: 3px 3px 0 var(--paper); }
button:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--paper); }
.form-note { grid-column: 1 / -1; margin: 0; font-size: .8rem; }
.template pre { margin: 0; overflow-x: auto; color: var(--ink); font: .86rem/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.rule-group { margin: 1.5rem 0; padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.rule-group h3 { margin-top: 0; color: var(--green); }
.rule-group li { color: var(--muted); }
.rule-group strong { color: var(--ink); }
.badges { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1rem 0; }
.badge { padding: .3rem .65rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--green); font-size: .78rem; font-weight: 800; }
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin: 2rem 0; }
.flow-step { position: relative; padding: 1.25rem; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--surface); }
.flow-step:not(:last-child)::after { position: absolute; top: 50%; left: calc(100% + .55rem); z-index: 2; width: 1.4rem; content: "→"; font-size: 1.4rem; font-weight: 900; line-height: 1; text-align: center; transform: translateY(-50%); }
.flow-step strong { display: block; margin-bottom: .3rem; }
.workflow-diagram { margin: 2rem 0; padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow-x: auto; }
.workflow-diagram figcaption { margin-bottom: 1.25rem; color: var(--ink); font-size: 1.1rem; font-weight: 850; }
pre.mermaid { margin: 0; color: var(--muted); font: .82rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
pre.mermaid.rendered { display: grid; min-width: 38rem; place-items: center; color: inherit; font: inherit; white-space: normal; }
pre.mermaid.rendered svg { width: 100%; max-width: 100%; height: auto; }
pre.mermaid.render-failed { padding: 1rem; border: 1px solid var(--orange); border-radius: .75rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .92rem; }
th, td { padding: .85rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--green); font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; }
td:first-child { color: var(--ink); font-weight: 750; }
details { margin: .75rem 0; padding: .9rem 1rem; border: 1px solid var(--control-border); border-radius: .8rem; background: var(--surface); }
summary { color: var(--ink); font-weight: 800; cursor: pointer; }
.checklist { padding: 0; list-style: none; }
.checklist li { position: relative; margin: .55rem 0; padding-left: 1.8rem; }
.checklist li::before { position: absolute; top: .2rem; left: 0; display: grid; width: 1.25rem; height: 1.25rem; place-items: center; border: 1px solid var(--green); border-radius: .25rem; color: var(--green); content: "✓"; font-size: .72rem; font-weight: 900; }
.next { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.next a { padding: 1rem; border: 1px solid var(--control-border); border-radius: 1rem; background: var(--surface); color: var(--green); font-weight: 800; text-decoration: none; }
.next a:hover { border-color: var(--green); }
.site-footer { padding: 2.5rem 0; background: var(--ink); color: var(--paper); }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a, .site-footer small { color: #bcc8c1; font-size: .8rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

html[data-theme="dark"] body { background: #0d1a16; color: #edf7f1; }
html[data-theme="dark"] p,
html[data-theme="dark"] li { color: #b8c8c0; }
html[data-theme="dark"] strong { color: #edf7f1; }
html[data-theme="dark"] .site-header { border-color: #334a40; background: rgb(13 26 22 / 94%); }
html[data-theme="dark"] .nav-links a,
html[data-theme="dark"] .toc a { color: #b8c8c0; }
html[data-theme="dark"] .nav-links a:hover,
html[data-theme="dark"] .nav-links a:focus-visible,
html[data-theme="dark"] .nav-links a[aria-current="page"],
html[data-theme="dark"] .toc a:hover,
html[data-theme="dark"] .toc a:focus-visible,
html[data-theme="dark"] .eyebrow { color: var(--lime); }
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .card,
html[data-theme="dark"] .rule-group,
html[data-theme="dark"] .flow-step,
html[data-theme="dark"] .workflow-diagram,
html[data-theme="dark"] .phase,
html[data-theme="dark"] .template,
html[data-theme="dark"] details,
html[data-theme="dark"] .next a,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea { border-color: #40584e; background: #152720; color: #edf7f1; }
html[data-theme="dark"] .meta div,
html[data-theme="dark"] .badge { border-color: #40584e; background: #1b3028; color: var(--lime); }
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] details,
html[data-theme="dark"] .next a,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea { border-color: var(--control-border); }
html[data-theme="dark"] .definition { border-color: #40584e; background: #172c23; }
html[data-theme="dark"] .workflow-diagram figcaption { color: #edf7f1; }
html[data-theme="dark"] .rule-group h3 { color: var(--lime); }
html[data-theme="dark"] .rule-group li { color: #d2dbd6; }
html[data-theme="dark"] .rule-group strong { color: #edf7f1; }
html[data-theme="dark"] .callout { border-color: var(--orange); background: #30231d; }
html[data-theme="dark"] .callout.green { border-color: var(--lime); background: #172c23; }
html[data-theme="dark"] .callout,
html[data-theme="dark"] .callout p,
html[data-theme="dark"] summary,
html[data-theme="dark"] td:first-child,
html[data-theme="dark"] code { color: #edf7f1; }
html[data-theme="dark"] code { background: #20372e; }
html[data-theme="dark"] .prose > section + section,
html[data-theme="dark"] th,
html[data-theme="dark"] td,
html[data-theme="dark"] .toc { border-color: #334a40; }
html[data-theme="dark"] .price { color: var(--lime); }
html[data-theme="dark"] .course-meta span { background: #20372e; color: var(--lime); }
html[data-theme="dark"] .site-footer { border-top: 1px solid #334a40; }

@media (max-width: 980px) {
  .site-nav { align-items: flex-start; flex-direction: column; padding-block: .85rem; }
  .nav-links { width: 100%; overflow-x: auto; padding-bottom: .25rem; }
  .site-header { position: static; }
  .docs-layout { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .toc { position: static; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); columns: 2; }
  .toc strong { column-span: all; }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 3rem); }
  .cards, .meta, .next, .flow, form { grid-template-columns: 1fr; }
  .flow { row-gap: 3rem; }
  label.full { grid-column: auto; }
  .flow-step:not(:last-child)::after { top: calc(100% + .75rem); bottom: auto; left: 50%; content: "↓"; transform: translateX(-50%); }
  .toc { columns: 1; }
  .table-scroll table { min-width: 42rem; }
  .footer-grid { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
