:root {
    color-scheme: light;
    --ink: #17212b;
    --ink-soft: #52606d;
    --paper: #f5f2eb;
    --surface: #fffdf8;
    --surface-strong: #ffffff;
    --navy: #18364b;
    --navy-2: #244d65;
    --orange: #ed7a3b;
    --orange-soft: #fff0e6;
    --teal: #147d73;
    --teal-soft: #e6f4f1;
    --blue-soft: #e9f1f7;
    --line: #d9ddd9;
    --line-dark: #bdc6c5;
    --success: #1d7b50;
    --warning: #a25716;
    --danger: #a23b3b;
    --shadow: 0 18px 60px rgba(24, 54, 75, 0.09);
    --deep: #18364b;
    --deep-hover: #244d65;
    --header-bg: rgba(245, 242, 235, 0.91);
    --header-border: rgba(189, 198, 197, 0.75);
    --glow-orange: rgba(237, 122, 59, 0.10);
    --glow-teal: rgba(20, 125, 115, 0.09);
    --inline-code-bg: rgba(24, 54, 75, 0.08);
    --code-bg: #07141d;
    --code-border: #213746;
    --code-ink: #f2f9fc;
    --code-button-bg: rgba(255, 255, 255, 0.11);
    --code-button-border: rgba(255, 255, 255, 0.22);
    --code-button-ink: #e6f3f7;
    --callout-border: #f2c8ad;
    --callout-ink: #6c3818;
    --callout-strong: #4b2915;
    --danger-surface: #fff8f5;
    --danger-border: #ecd5cd;
    --status-wait-bg: #fff5d8;
    --status-check-bg: #ffe8e4;
    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 28px;
    --content: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 92px;
}

body {
    background:
        radial-gradient(circle at 8% 0%, var(--glow-orange), transparent 31rem),
        radial-gradient(circle at 94% 26%, var(--glow-teal), transparent 36rem),
        var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    margin: 0;
}

a {
    color: var(--navy-2);
}

a:hover {
    color: var(--teal);
}

button,
select {
    font: inherit;
}

[hidden] {
    display: none !important;
}

.skip-link {
    background: var(--deep);
    color: #fff;
    left: 16px;
    padding: 10px 14px;
    position: fixed;
    top: -80px;
    z-index: 100;
}

.skip-link:focus {
    top: 14px;
}

.site-header {
    backdrop-filter: blur(14px);
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    align-items: center;
    display: flex;
    gap: 22px;
    margin: 0 auto;
    max-width: var(--content);
    min-height: 70px;
    padding: 10px 24px;
}

.brand {
    align-items: center;
    color: var(--navy);
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    gap: 10px;
    letter-spacing: 0.02em;
    margin-right: auto;
    text-decoration: none;
}

.brand-mark {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(18, 52, 71, 0.14);
    border-radius: 11px;
    box-shadow: 0 4px 14px rgba(18, 52, 71, 0.08);
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
    overflow: hidden;
    width: 38px;
}

.brand-mark img {
    display: block;
    height: 31px;
    width: 31px;
}

.header-actions {
    align-items: center;
    display: flex;
    gap: 12px;
}

.language-control {
    align-items: center;
    display: flex;
    gap: 8px;
}

.language-control label {
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
}

.language-control select {
    background: var(--surface-strong);
    border: 1px solid var(--line-dark);
    border-radius: 8px;
    color: var(--ink);
    cursor: pointer;
    padding: 7px 30px 7px 10px;
}

.header-link,
.button {
    align-items: center;
    border-radius: 9px;
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    gap: 8px;
    justify-content: center;
    padding: 9px 14px;
    text-decoration: none;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.header-link,
.button-primary {
    background: var(--deep);
    border: 1px solid var(--deep);
    color: #fff;
}

.header-link:hover,
.button-primary:hover {
    background: var(--deep-hover);
    border-color: var(--deep-hover);
    color: #fff;
    transform: translateY(-1px);
}

.header-link-secondary {
    background: transparent;
    border: 1px solid var(--line-dark);
    color: var(--navy);
}

.header-link-secondary:hover,
.header-link-secondary:focus-visible {
    background: var(--surface-strong);
    border-color: var(--teal);
    color: var(--teal);
    transform: translateY(-1px);
}

.button-secondary {
    background: transparent;
    border: 1px solid var(--line-dark);
    color: var(--navy);
}

.button-secondary:hover {
    background: var(--surface-strong);
    color: var(--navy);
}

.hero {
    margin: 0 auto;
    max-width: var(--content);
    padding: 76px 24px 42px;
}

.hero-grid {
    align-items: center;
    display: grid;
    gap: 52px;
    grid-template-columns: minmax(0, 1.14fr) minmax(340px, 0.86fr);
}

.eyebrow {
    color: var(--teal);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.13em;
    margin: 0 0 15px;
    text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h1,
h2,
h3,
h4 {
    line-height: 1.16;
}

h1 {
    color: var(--navy);
    font-size: clamp(2.55rem, 6.4vw, 5.25rem);
    letter-spacing: -0.055em;
    margin-bottom: 22px;
    max-width: 900px;
}

h1 .accent {
    color: var(--orange);
}

.hero-copy {
    color: var(--ink-soft);
    font-size: clamp(1.06rem, 1.8vw, 1.28rem);
    max-width: 760px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-note {
    align-items: center;
    color: var(--ink-soft);
    display: flex;
    font-size: 13px;
    gap: 9px;
    margin-top: 20px;
}

.hero-note-dot {
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(29, 123, 80, 0.12);
    height: 7px;
    width: 7px;
}

.merge-card {
    background: var(--deep);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    color: #fff;
    overflow: hidden;
    padding: 28px;
    position: relative;
}

.merge-card::after {
    background: var(--orange);
    border-radius: 50%;
    content: "";
    filter: blur(2px);
    height: 150px;
    opacity: 0.16;
    position: absolute;
    right: -70px;
    top: -60px;
    width: 150px;
}

.merge-label {
    color: #a9d8d1;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.merge-title {
    color: #fff;
    font-size: 1.25rem;
    margin: 8px 0 24px;
}

.source-stack {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
}

.source-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    padding: 14px;
}

.source-chip span {
    color: #a9d8d1;
    display: block;
    font-size: 10px;
    letter-spacing: 0.09em;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.merge-arrow {
    color: #a9d8d1;
    font-size: 22px;
    line-height: 1;
    padding: 9px 0;
    text-align: center;
}

.result-chip {
    background: var(--orange);
    border-radius: 13px;
    color: #24170f;
    font-size: 14px;
    font-weight: 900;
    padding: 15px;
    text-align: center;
}

.section-nav-wrap {
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
    margin-top: 24px;
}

.section-nav {
    display: flex;
    gap: 4px;
    margin: 0 auto;
    max-width: var(--content);
    overflow-x: auto;
    padding: 9px 24px;
    scrollbar-width: thin;
}

.section-nav a {
    border-radius: 8px;
    color: var(--ink-soft);
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 800;
    padding: 8px 11px;
    text-decoration: none;
}

.section-nav a:hover,
.section-nav a:focus-visible {
    background: var(--surface-strong);
    color: var(--navy);
}

.content-section {
    margin: 0 auto;
    max-width: var(--content);
    padding: 86px 24px 0;
}

.section-heading {
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.65fr);
    margin-bottom: 38px;
}

.section-heading h2 {
    color: var(--navy);
    font-size: clamp(2rem, 4vw, 3.45rem);
    letter-spacing: -0.045em;
    margin-bottom: 0;
}

.section-heading > p {
    align-self: end;
    color: var(--ink-soft);
    margin-bottom: 3px;
}

.callout {
    background: var(--orange-soft);
    border: 1px solid var(--callout-border);
    border-left: 5px solid var(--orange);
    border-radius: var(--radius-sm);
    color: var(--callout-ink);
    margin-bottom: 28px;
    padding: 17px 19px;
}

.callout strong {
    color: var(--callout-strong);
}

.process-branches {
    display: grid;
    gap: 22px;
    grid-template-columns: 1fr 1fr;
}

.process-branch {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}

.process-branch-header {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
}

.branch-index {
    align-items: center;
    background: var(--blue-soft);
    border-radius: 12px;
    color: var(--navy);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 900;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.process-branch:nth-child(2) .branch-index {
    background: var(--teal-soft);
    color: var(--teal);
}

.process-branch h3 {
    color: var(--navy);
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.process-branch-header p {
    color: var(--ink-soft);
    font-size: 14px;
    margin: 0;
}

.step-list {
    counter-reset: process-step;
    display: grid;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.step-list li {
    counter-increment: process-step;
    display: grid;
    gap: 2px 13px;
    grid-template-columns: 28px 1fr;
    padding-bottom: 20px;
    position: relative;
}

.step-list li:not(:last-child)::after {
    background: var(--line);
    bottom: 1px;
    content: "";
    left: 13px;
    position: absolute;
    top: 29px;
    width: 1px;
}

.step-list li::before {
    align-items: center;
    background: var(--surface-strong);
    border: 1px solid var(--line-dark);
    border-radius: 50%;
    color: var(--navy);
    content: counter(process-step);
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    grid-row: 1 / span 2;
    height: 28px;
    justify-content: center;
    position: relative;
    width: 28px;
    z-index: 2;
}

.step-list strong {
    color: var(--ink);
    font-size: 14px;
}

.step-list span {
    color: var(--ink-soft);
    font-size: 13px;
}

code,
.endpoint {
    background: var(--inline-code-bg);
    border-radius: 5px;
    color: var(--navy);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.88em;
    padding: 2px 5px;
}

.decision-gate {
    align-items: center;
    background: var(--deep);
    border-radius: var(--radius);
    color: #fff;
    display: grid;
    gap: 24px;
    grid-template-columns: auto 1fr auto;
    margin-top: 22px;
    padding: 24px;
}

.gate-symbol {
    align-items: center;
    background: var(--orange);
    border-radius: 14px;
    color: #24170f;
    display: inline-flex;
    font-size: 20px;
    font-weight: 900;
    height: 48px;
    justify-content: center;
    transform: rotate(45deg);
    width: 48px;
}

.gate-symbol span {
    transform: rotate(-45deg);
}

.decision-gate h3 {
    color: #fff;
    font-size: 1.18rem;
    margin-bottom: 5px;
}

.decision-gate p {
    color: #c7d5dc;
    font-size: 14px;
    margin: 0;
}

.confidence-lights {
    display: flex;
    gap: 8px;
}

.confidence-lights span {
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    height: 16px;
    width: 16px;
}

.confidence-lights .red { background: #e96969; }
.confidence-lights .amber { background: #efb647; }
.confidence-lights .green { background: #52b886; }

.audience-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.audience-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 25px;
}

.audience-card-top {
    align-items: flex-start;
    display: flex;
    gap: 14px;
}

.audience-tag {
    background: var(--teal-soft);
    border-radius: 8px;
    color: var(--teal);
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 6px 8px;
    text-transform: uppercase;
}

.audience-card h3 {
    color: var(--navy);
    font-size: 1.3rem;
    margin: 2px 0 8px;
}

.audience-card > p,
.audience-card-top p {
    color: var(--ink-soft);
    font-size: 14px;
}

.audience-card ul,
.check-card ul,
.anti-patterns ul {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
}

.audience-card li,
.check-card li,
.anti-patterns li {
    border-top: 1px solid var(--line);
    font-size: 14px;
    padding: 10px 0 10px 22px;
    position: relative;
}

.audience-card li::before,
.check-card li::before {
    color: var(--success);
    content: "✓";
    font-weight: 900;
    left: 1px;
    position: absolute;
}

.anti-patterns li::before {
    color: var(--danger);
    content: "×";
    font-size: 18px;
    font-weight: 900;
    left: 1px;
    line-height: 1.2;
    position: absolute;
}

.scope-map {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.scope-column {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.scope-column header {
    background: var(--blue-soft);
    border-bottom: 1px solid var(--line);
    padding: 18px 20px;
}

.scope-column:nth-child(2) header { background: var(--teal-soft); }
.scope-column:nth-child(3) header { background: var(--orange-soft); }

.scope-column h3 {
    color: var(--navy);
    font-size: 1.05rem;
    margin: 0 0 4px;
}

.scope-column header p {
    color: var(--ink-soft);
    font-size: 12px;
    margin: 0;
}

.scope-column ul {
    list-style: none;
    margin: 0;
    padding: 12px 20px 18px;
}

.scope-column li {
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    padding: 10px 0;
}

.scope-column li:last-child { border-bottom: 0; }

.model-flow {
    align-items: stretch;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 22px;
}

.model-node {
    background: var(--surface-strong);
    border: 1px solid var(--line-dark);
    border-radius: 12px;
    min-height: 108px;
    padding: 15px;
    position: relative;
}

.model-node:not(:last-child)::after {
    color: var(--teal);
    content: "→";
    font-size: 18px;
    font-weight: 900;
    position: absolute;
    right: -19px;
    top: 39px;
    z-index: 2;
}

.model-node span {
    color: var(--teal);
    display: block;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.09em;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.model-node strong {
    color: var(--navy);
    display: block;
    font-size: 13px;
    line-height: 1.35;
}

.model-node small {
    color: var(--ink-soft);
    display: block;
    font-size: 11px;
    line-height: 1.4;
    margin-top: 5px;
}

.recipe-list {
    display: grid;
    gap: 14px;
}

.recipe {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.recipe summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 14px;
    grid-template-columns: auto 1fr auto;
    list-style: none;
    padding: 20px 22px;
}

.recipe summary::-webkit-details-marker { display: none; }

.recipe summary::after {
    color: var(--navy);
    content: "+";
    font-size: 22px;
    font-weight: 400;
}

.recipe[open] summary::after { content: "−"; }

.method {
    background: var(--teal-soft);
    border-radius: 7px;
    color: var(--teal);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
    font-weight: 900;
    padding: 5px 7px;
}

.method.get {
    background: var(--blue-soft);
    color: var(--navy-2);
}

.recipe-title strong {
    color: var(--navy);
    display: block;
    font-size: 15px;
}

.recipe-title span {
    color: var(--ink-soft);
    font-size: 13px;
}

.recipe-body {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
    padding: 22px;
}

.recipe-body p,
.recipe-body li {
    color: var(--ink-soft);
    font-size: 13px;
}

.recipe-body ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.code-wrap {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.code-wrap pre {
    color: var(--code-ink);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.65;
    margin: 0;
    overflow-x: auto;
    padding: 42px 18px 18px;
    white-space: pre;
}

.code-wrap pre code {
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 0;
}

.copy-button {
    background: var(--code-button-bg);
    border: 1px solid var(--code-button-border);
    border-radius: 6px;
    color: var(--code-button-ink);
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
    padding: 5px 8px;
    position: absolute;
    right: 10px;
    top: 9px;
}

.copy-button:hover,
.copy-button:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.rules-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rule-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
}

.rule-card .status-dot {
    border-radius: 50%;
    display: block;
    height: 12px;
    margin-bottom: 18px;
    width: 12px;
}

.rule-card.green .status-dot { background: #52b886; box-shadow: 0 0 0 6px rgba(82, 184, 134, 0.14); }
.rule-card.amber .status-dot { background: #efb647; box-shadow: 0 0 0 6px rgba(239, 182, 71, 0.15); }
.rule-card.red .status-dot { background: #e96969; box-shadow: 0 0 0 6px rgba(233, 105, 105, 0.13); }

.rule-card h3 {
    color: var(--navy);
    font-size: 1.1rem;
    margin-bottom: 9px;
}

.rule-card p {
    color: var(--ink-soft);
    font-size: 13px;
    margin: 0;
}

.quality-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr 1fr;
    margin-top: 22px;
}

.check-card,
.anti-patterns {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}

.anti-patterns {
    background: var(--danger-surface);
    border-color: var(--danger-border);
}

.check-card h3,
.anti-patterns h3 {
    color: var(--navy);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.check-card > p,
.anti-patterns > p {
    color: var(--ink-soft);
    font-size: 13px;
}

.operations-table-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow-x: auto;
}

.operations-table {
    border-collapse: collapse;
    min-width: 730px;
    width: 100%;
}

.operations-table th,
.operations-table td {
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
}

.operations-table th {
    background: var(--blue-soft);
    color: var(--navy);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.operations-table tr:last-child td { border-bottom: 0; }

.status-code {
    border-radius: 7px;
    display: inline-block;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
    font-weight: 900;
    min-width: 48px;
    padding: 4px 7px;
    text-align: center;
}

.status-code.ok { background: var(--teal-soft); color: var(--success); }
.status-code.wait { background: var(--status-wait-bg); color: var(--warning); }
.status-code.check { background: var(--status-check-bg); color: var(--danger); }

.final-cta {
    background: var(--deep);
    border-radius: var(--radius-lg);
    color: #fff;
    display: grid;
    gap: 25px;
    grid-template-columns: 1fr auto;
    margin: 88px auto 0;
    max-width: calc(var(--content) - 48px);
    padding: 38px;
}

.final-cta h2 {
    color: #fff;
    font-size: clamp(1.7rem, 3vw, 2.6rem);
    letter-spacing: -0.035em;
    margin-bottom: 8px;
}

.final-cta p {
    color: #c7d5dc;
    margin: 0;
    max-width: 720px;
}

.final-cta .button-primary {
    align-self: center;
    background: var(--orange);
    border-color: var(--orange);
    color: #24170f;
}

.site-footer {
    color: var(--ink-soft);
    font-size: 12px;
    margin: 0 auto;
    max-width: var(--content);
    padding: 34px 24px 44px;
}

.site-footer-inner {
    border-top: 1px solid var(--line);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding-top: 22px;
}

.site-footer a {
    font-weight: 800;
    text-decoration: none;
}

:focus-visible {
    outline: 3px solid rgba(237, 122, 59, 0.55);
    outline-offset: 3px;
}

@media screen and (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --ink: #edf4f7;
        --ink-soft: #bdcbd1;
        --paper: #0c141a;
        --surface: #111e26;
        --surface-strong: #172730;
        --navy: #e7f2f6;
        --navy-2: #9dd8e8;
        --orange: #ff9b62;
        --orange-soft: #38241a;
        --teal: #79d7cb;
        --teal-soft: #143a37;
        --blue-soft: #16313f;
        --line: #2c3d46;
        --line-dark: #435862;
        --success: #80dcae;
        --warning: #f7cd72;
        --danger: #ff9c98;
        --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
        --deep: #16364a;
        --deep-hover: #22536d;
        --header-bg: rgba(12, 20, 26, 0.92);
        --header-border: rgba(67, 88, 98, 0.76);
        --glow-orange: rgba(255, 155, 98, 0.08);
        --glow-teal: rgba(121, 215, 203, 0.07);
        --inline-code-bg: rgba(157, 216, 232, 0.12);
        --code-bg: #050d13;
        --code-border: #314957;
        --code-ink: #f4fbff;
        --code-button-bg: rgba(255, 255, 255, 0.12);
        --code-button-border: rgba(255, 255, 255, 0.24);
        --code-button-ink: #eff9fc;
        --callout-border: #70452f;
        --callout-ink: #ffd4bc;
        --callout-strong: #ffe5d5;
        --danger-surface: #2c1b1b;
        --danger-border: #5b3634;
        --status-wait-bg: #3a3019;
        --status-check-bg: #3b2222;
    }
}

@media (max-width: 900px) {
    .hero-grid,
    .section-heading,
    .recipe-body {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 52px;
    }

    .merge-card {
        max-width: 620px;
    }

    .scope-map,
    .rules-grid {
        grid-template-columns: 1fr;
    }

    .model-flow {
        grid-template-columns: 1fr;
    }

    .model-node {
        min-height: auto;
    }

    .model-node:not(:last-child)::after {
        bottom: -21px;
        content: "↓";
        left: 50%;
        right: auto;
        top: auto;
    }
}

@media (max-width: 700px) {
    .header-inner {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 8px 14px;
        padding: 10px 16px;
    }

    .brand {
        min-height: 38px;
    }

    .header-actions {
        flex: 0 0 100%;
        justify-content: space-between;
    }

    .language-control label { display: none; }

    .hero,
    .content-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero {
        padding-top: 42px;
    }

    h1 {
        font-size: clamp(2.35rem, 14vw, 3.55rem);
    }

    .section-nav {
        padding-left: 12px;
        padding-right: 12px;
    }

    .process-branches,
    .audience-grid,
    .quality-grid {
        grid-template-columns: 1fr;
    }

    .decision-gate {
        grid-template-columns: auto 1fr;
    }

    .confidence-lights {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .source-stack {
        grid-template-columns: 1fr;
    }

    .final-cta {
        border-radius: 0;
        grid-template-columns: 1fr;
        margin-top: 70px;
        max-width: none;
        padding: 30px 22px;
    }

    .site-footer-inner {
        flex-direction: column;
    }
}

@media print {
    body {
        background: #fff;
        color: #000;
        font-size: 11pt;
    }

    .site-header,
    .section-nav-wrap,
    .hero-actions,
    .copy-button,
    .final-cta,
    .site-footer {
        display: none !important;
    }

    .hero,
    .content-section {
        max-width: none;
        padding: 24px 0;
    }

    .merge-card,
    .decision-gate {
        background: #fff;
        border: 1px solid #999;
        box-shadow: none;
        color: #000;
    }

    .merge-card *,
    .decision-gate * {
        color: #000 !important;
    }

    .audience-card,
    .process-branch,
    .scope-column,
    .rule-card,
    .recipe,
    .check-card,
    .anti-patterns {
        break-inside: avoid;
    }
}
