*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --blue-dark: #c46200;
    --blue-mid: #F07D00;
    --blue-light: #fef3e2;
    --blue-accent: #d97000;
    --gray-50: #f7fafc;
    --gray-100: #edf2f7;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-500: #718096;
    --gray-600: #4a5568;
    --gray-700: #2d3748;
    --gray-800: #1a202c;
    --white: #ffffff;
    --green: #38a169;
    --orange: #dd6b20;
    --red: #e53e3e;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6; color: var(--gray-700); background: var(--white);
}

/* ── Skip link ── */
.skip-link { position: absolute; top: -100%; left: 1rem; background: var(--blue-mid); color: var(--white); padding: 0.5rem 1rem; border-radius: 0 0 6px 6px; z-index: 200; font-size: 0.85rem; text-decoration: none; }
.skip-link:focus { top: 0; }

/* ── Nav ── */
nav { position: sticky; top: 0; z-index: 100; background: var(--blue-dark); box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.nav-inner { position: relative; display: flex; align-items: center; justify-content: center; gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav-brand { color: var(--white); font-weight: 700; font-size: 0.85rem; white-space: nowrap; padding: 0.75rem 0.75rem; text-decoration: none; }
nav a:not(.nav-brand) { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.75rem; padding: 0.75rem 0.55rem; white-space: nowrap; transition: color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease; border-radius: 4px; position: relative; will-change: color, background, box-shadow; }
nav a:not(.nav-brand):hover { color: #ffffff; background: rgba(255,255,255,0.1); }
.theme-toggle { position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%); background: none; border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.7); font-size: 1rem; cursor: pointer; padding: 0.3rem 0.5rem; border-radius: 4px; transition: color 0.2s, border-color 0.2s; line-height: 1; z-index: 2; }
.theme-toggle:hover { color: #ffffff; border-color: rgba(255,255,255,0.5); }
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.4rem; cursor: pointer; padding: 0.5rem; margin-left: 0; }

/* ── Back to top ── */
.back-to-top {
    position: fixed; bottom: 2rem; left: 1.5rem; z-index: 101;
    width: 2.5rem; height: 2.5rem; border-radius: 50%;
    background: var(--blue-mid); color: var(--white);
    border: none; cursor: pointer; font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    opacity: 0; transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s, background 0.3s;
    pointer-events: none;
}
.back-to-top.is-shown { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--blue-dark); }

/* ── Reading Progress ── */
.reading-progress { position: fixed; bottom: 0; left: 0; width: 0%; height: 3px; background: linear-gradient(90deg, var(--blue-mid), #ffb347); z-index: 101; transition: width 0.15s linear; pointer-events: none; }
.reading-pct { position: fixed; bottom: 12px; right: 16px; z-index: 101; font-size: 0.7rem; font-weight: 700; color: var(--blue-mid); background: var(--white); border: 1px solid var(--gray-200); border-radius: 12px; padding: 0.15rem 0.5rem; opacity: 0; transition: opacity 0.3s; pointer-events: none; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.reading-pct.is-shown { opacity: 1; }

/* ── Hero ── */
.hero { background: linear-gradient(135deg, var(--blue-dark) 0%, #d97000 50%, var(--blue-mid) 100%); color: var(--white); padding: 5rem 1.5rem 4rem; text-align: center; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; max-width: 900px; margin: 0 auto 1rem; line-height: 1.2; }
.hero .subtitle { font-size: clamp(1rem, 2vw, 1.25rem); opacity: 0.9; max-width: 700px; margin: 0 auto 1.5rem; }
.hero .meta { font-size: 0.9rem; opacity: 0.7; }
.hero .meta span { display: inline-block; margin: 0 0.75rem; }

/* ── Sections ── */
section { padding: 4rem 1.5rem; }
section:nth-child(even) { background: var(--gray-50); }
.container { max-width: 1100px; margin: 0 auto; }
.section-label { text-transform: uppercase; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; color: var(--blue-accent); margin-bottom: 0.5rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--blue-dark); margin-bottom: 1.5rem; line-height: 1.25; }
h3 { font-size: 1.15rem; color: var(--blue-dark); margin-bottom: 0.75rem; margin-top: 2rem; }
h4 { font-size: 1rem; color: var(--gray-700); margin-bottom: 0.5rem; margin-top: 1.5rem; }
p { margin-bottom: 1rem; max-width: 75ch; }
ul, ol { margin: 0 0 1rem 1.5rem; max-width: 75ch; }
li { margin-bottom: 0.35rem; }
li strong { color: var(--blue-dark); }
code { background: var(--gray-100); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.88em; }
pre { background: var(--gray-800); color: #e2e8f0; padding: 1.25rem; border-radius: 8px; overflow-x: auto; font-size: 0.85rem; margin-bottom: 1rem; }
hr.section-divider { border: none; border-top: 1px solid var(--gray-200); margin: 2.5rem 0; }

/* ── Cards ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.card-grid--compact { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.card-grid--wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card-grid--2x2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--white); border: 1px solid var(--gray-200); border-radius: 10px; padding: 1.75rem; border-top: 4px solid var(--blue-mid); transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease-out; }
.card:hover { transform: scale(1.03); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.card h3 { font-size: 1rem; margin-top: 0; margin-bottom: 0.5rem; }
.card p { font-size: 0.9rem; color: var(--gray-600); margin-bottom: 0; }
.card--link { text-decoration: none; color: inherit; transition: transform 0.2s, box-shadow 0.2s; }
.card--link:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.card-link-label { display: inline-block; margin-top: 0.75rem; font-size: 0.72rem; font-weight: 600; color: var(--blue-accent); text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Stat Cards ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.stat-card { background: var(--white); border-radius: 12px; padding: 2.5rem 2rem; text-align: center; box-shadow: 0 4px 16px rgba(0,0,0,0.06); border: 1px solid var(--gray-200); transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease-out; }
.stat-card:hover { transform: scale(1.03) translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,0.12); }
.stat-number { font-size: 3.5rem; font-weight: 800; color: var(--blue-mid); line-height: 1; margin-bottom: 0.5rem; }
.stat-number--sm { font-size: 2.5rem; }
.stat-label { font-size: 1rem; font-weight: 600; color: var(--gray-700); margin-bottom: 0.35rem; }
.stat-source { font-size: 0.8rem; color: var(--gray-500); }

/* ── Tables ── */
.table-wrap { margin: 1.5rem 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
.table-wrap .data-table { margin: 0; }
.data-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.88rem; background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.data-table thead { background: var(--blue-dark); color: var(--white); }
.data-table th { padding: 0.85rem 1rem; text-align: left; font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.data-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--gray-100); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--blue-light); }
.data-table--wide th:first-child, .data-table--wide td:first-child { position: sticky; left: 0; z-index: 1; background: var(--white); box-shadow: 2px 0 4px rgba(0,0,0,0.06); }
.data-table--wide thead th:first-child { background: var(--blue-dark); z-index: 2; box-shadow: 2px 0 4px rgba(0,0,0,0.1); }
.data-table--wide tbody tr:hover td:first-child { background: var(--blue-light); }
.td-label { width: 140px; }

/* ── Infographics ── */
.infographic { margin: 2rem 0; }
.infographic img { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); border: 1px solid var(--gray-200); }
.infographic figcaption { margin-top: 0.75rem; font-size: 0.85rem; color: var(--gray-500); text-align: center; font-style: italic; }

/* ── Video Demo ── */
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2rem; margin: 2rem 0; }
.demo-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.06); border: 1px solid var(--gray-200); }
.demo-card video { width: 100%; display: block; background: #000; }
.demo-card-body { padding: 1.25rem 1.5rem; }
.demo-card-body h3 { margin-top: 0; margin-bottom: 0.25rem; }
.demo-card-body p { font-size: 0.88rem; color: var(--gray-600); margin-bottom: 0; }
.demo-badge { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.2rem 0.6rem; border-radius: 4px; margin-bottom: 0.5rem; }
.badge-claude { background: #fef3c7; color: #92400e; }
.badge-copilot { background: #e0e7ff; color: #3730a3; }
.badge-cowork { background: #ccfbf1; color: #115e59; }
.badge-excel { background: #d1fae5; color: #065f46; }
.badge-chrome { background: #fce7f3; color: #9d174d; }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; }
.video-iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* ── YouTube facade ── */
.yt-facade { position: absolute; top: 0; left: 0; width: 100%; height: 100%; cursor: pointer; background: #000; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.8; transition: opacity 0.3s; }
.yt-facade:hover img { opacity: 1; }
.yt-facade-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 4rem; height: 4rem; border-radius: 50%;
    background: rgba(255,0,0,0.85); color: #fff; border: none;
    font-size: 1.5rem; cursor: pointer; transition: background 0.2s, transform 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.yt-facade:hover .yt-facade-play { background: #ff0000; transform: translate(-50%, -50%) scale(1.1); }

/* ── PDF Embeds ── */
.pdf-embed { background: var(--white); border: 1px solid var(--gray-200); border-radius: 12px; overflow: hidden; margin: 2rem 0; box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.pdf-embed-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); flex-wrap: wrap; gap: 0.75rem; }
.pdf-embed-header h3 { margin: 0; font-size: 1rem; }
.pdf-embed-header .pdf-desc { font-size: 0.82rem; color: var(--gray-500); flex-basis: 100%; margin: -0.25rem 0 0; }
.pdf-download-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.9rem; background: var(--blue-mid); color: var(--white); text-decoration: none; border-radius: 6px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; transition: background 0.2s; }
.pdf-download-btn:hover { background: var(--blue-dark); }
.pdf-embed iframe { width: 100%; height: 600px; border: none; display: block; }

/* ── Steps ── */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.step-card { background: var(--white); border-radius: 12px; padding: 2rem; border: 1px solid var(--gray-200); position: relative; padding-top: 2.5rem; }
.step-number { position: absolute; top: -0.75rem; left: 1.5rem; width: 2.25rem; height: 2.25rem; background: var(--blue-mid); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.95rem; }
.step-card h3 { font-size: 1.05rem; margin-top: 0; margin-bottom: 0.5rem; }
.step-card p { font-size: 0.88rem; color: var(--gray-600); margin-bottom: 0; }

/* ── Callout ── */
.callout { background: var(--blue-light); border-left: 4px solid var(--blue-mid); border-radius: 0 8px 8px 0; padding: 1.25rem 1.5rem; margin: 1.5rem 0; font-size: 0.92rem; color: var(--blue-dark); }
.callout p { margin-bottom: 0; }
.callout-warn { background: #fffbeb; border-left-color: var(--orange); color: #92400e; }
.callout--flush { margin: 0; }

/* ── Pull-quote ── */
.pull-quote { position: relative; margin: 2rem 0; padding: 2rem 2rem 2rem 2.5rem; background: var(--gray-50); border-left: 5px solid var(--blue-mid); border-radius: 0 12px 12px 0; }
.pull-quote::before { content: '\201C'; position: absolute; top: 0.1rem; left: 0.6rem; font-size: 4rem; line-height: 1; color: var(--blue-mid); opacity: 0.4; font-family: Georgia, serif; }
.pull-quote blockquote { font-size: 1.15rem; font-style: italic; line-height: 1.6; color: var(--gray-700); margin: 0 0 0.75rem; }
.pull-quote cite { display: block; font-size: 0.85rem; font-style: normal; color: var(--gray-500); font-weight: 600; }
.myth-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: 10px; padding: 1.5rem; margin: 1rem 0; }
.myth-card .myth-label { display: inline-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.2rem 0.6rem; border-radius: 4px; margin-bottom: 0.75rem; }
.myth-card .myth-label.false { background: #fee2e2; color: #991b1b; }
.myth-card .myth-label.correction { background: #dcfce7; color: #166534; }
.myth-card h4 { margin: 0 0 0.5rem; font-size: 1rem; }
.myth-card p { font-size: 0.92rem; margin-bottom: 0; color: var(--gray-600); }

/* ── Phases / Timeline ── */
.phase { background: var(--white); border: 1px solid var(--gray-200); border-radius: 12px; padding: 2rem; margin: 1.5rem 0; border-left: 5px solid var(--blue-mid); }
.phase h4 { margin-top: 0; font-size: 1.1rem; color: var(--blue-dark); }
details.phase { cursor: default; }
details.phase summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.5rem; }
details.phase summary::-webkit-details-marker { display: none; }
details.phase summary::after { content: '\25B6'; font-size: 0.7rem; color: var(--blue-mid); transition: transform 0.3s; margin-left: auto; }
details[open].phase summary::after { transform: rotate(90deg); }
details.phase summary h4 { margin: 0; pointer-events: none; }

/* ── Collapsible sub-sections ── */
details.collapsible { margin: 1.5rem 0; }
details.collapsible summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.5rem; }
details.collapsible summary::-webkit-details-marker { display: none; }
details.collapsible summary::after { content: '\25B6'; font-size: 0.65rem; color: var(--blue-mid); transition: transform 0.3s; margin-left: auto; }
details[open].collapsible summary::after { transform: rotate(90deg); }
details.collapsible summary h3, details.collapsible summary h4 { margin: 0; pointer-events: none; }
.collapsible-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s ease; }
details[open] > .collapsible-body { grid-template-rows: 1fr; }
details[open].is-closing > .collapsible-body { grid-template-rows: 0fr; }
.collapsible-inner { overflow: hidden; }

/* ── Anchor links ── */
.anchor-link { margin-left: 0.4rem; color: var(--gray-300); text-decoration: none; font-size: 0.85em; font-weight: 400; opacity: 0; transition: opacity 0.2s; }
h3:hover .anchor-link, .anchor-link:focus { opacity: 1; color: var(--blue-mid); }

/* ── Toggle all bar ── */
.toggle-all-bar { display: inline-flex; gap: 0; margin-bottom: 0.75rem; border-radius: 6px; overflow: hidden; border: 1px solid var(--gray-200); }
.toggle-all-btn { background: var(--white); border: none; border-right: 1px solid var(--gray-200); color: var(--gray-500); font-size: 0.72rem; font-weight: 600; padding: 0.35rem 0.85rem; cursor: pointer; transition: color 0.2s, background 0.2s; display: inline-flex; align-items: center; gap: 0.3rem; }
.toggle-all-btn:last-child { border-right: none; }
.toggle-all-btn:hover { color: var(--blue-mid); background: var(--blue-light); }
.toggle-all-btn::before { font-size: 0.6rem; }
.toggle-all-btn:first-child::before { content: '\25BC'; }
.toggle-all-btn:last-child::before { content: '\25B2'; }

/* ── Timeline ── */
.timeline {
    display: flex; align-items: flex-start; justify-content: space-between;
    position: relative; margin: 2.5rem 0 2rem; padding: 0 2rem;
}
.timeline::before {
    content: ''; position: absolute; top: 1.25rem; left: 2rem; right: 2rem;
    height: 3px; background: var(--gray-200); z-index: 0;
}
.timeline::after {
    content: ''; position: absolute; top: 1.25rem; left: 2rem;
    width: calc(var(--tl-progress, 0) * (100% - 4rem)); height: 3px; background: var(--blue-mid); z-index: 1;
    transition: width 0.6s ease-out;
}
.timeline-step { text-align: center; position: relative; z-index: 2; flex: 1; }
.timeline-dot {
    width: 2.5rem; height: 2.5rem; border-radius: 50%;
    background: var(--white); border: 3px solid var(--gray-200);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem; color: var(--gray-500);
    margin: 0 auto 0.5rem; transition: border-color 0.5s, color 0.5s, background 0.5s;
}
.timeline-dot.is-active {
    border-color: var(--blue-mid); color: var(--white); background: var(--blue-mid);
}
.timeline-label { font-weight: 700; font-size: 0.95rem; color: var(--gray-700); }
.timeline-period { font-size: 0.8rem; color: var(--gray-500); margin-top: 0.15rem; }

/* ── Utilities ── */
.mt-xs { margin-top: 0.75rem; }
.mt-sm { margin-top: 1.5rem; }
.mt-md { margin-top: 2.5rem; }
.mb-sm { margin-bottom: 0.75rem; }
.mb-0 { margin-bottom: 0; }
.list--flush { margin-top: 0.5rem; margin-bottom: 0; }
.sources { font-size: 0.82rem; color: var(--gray-500); margin-top: 2rem; }

/* ── C-Level Brief ── */
.c-level-brief { background: linear-gradient(135deg, var(--blue-light) 0%, var(--gray-50) 100%); border-top: 4px solid var(--blue-mid); border-bottom: 4px solid var(--blue-mid); }

/* ── Footer ── */
footer { background: var(--blue-dark); color: rgba(255,255,255,0.6); text-align: center; padding: 2rem 1.5rem; font-size: 0.85rem; }
footer p { max-width: 520px; margin-left: auto; margin-right: auto; }
footer strong { color: rgba(255,255,255,0.85); }

/* ── Responsive ── */
@media (max-width: 860px) {
    .demo-grid { grid-template-columns: 1fr; }
    .nav-toggle { position: absolute; left: 0.5rem; top: 0; height: 2.75rem; z-index: 2; display: flex; align-items: center; }
    .theme-toggle { top: 0; height: auto; transform: none; margin-top: calc((2.75rem - 1.6rem) / 2); }
    .nav-brand { height: 2.75rem; display: flex; align-items: center; }
    .nav-inner { flex-wrap: wrap; min-height: 2.75rem; position: relative; }
    .nav-inner a:not(.nav-brand) { display: none; }
    .nav-inner.nav-open { padding-top: 2.75rem; padding-bottom: 0.5rem; }
    .nav-inner.nav-open a:not(.nav-brand) { display: block; width: 100%; padding: 0.6rem 0.75rem; font-size: 0.85rem; }
}
@media (max-width: 600px) {
    section { padding: 2.5rem 1rem; }
    .hero { padding: 3.5rem 1rem 3rem; }
    .stat-number { font-size: 2.8rem; }
    .nav-brand { display: none; }
    .card-grid--2x2 { grid-template-columns: 1fr; }
    .pdf-embed iframe { display: none; }
    .pdf-embed-header { border-bottom: none; }
    .pdf-embed-header .pdf-download-btn { font-size: 0.88rem; padding: 0.6rem 1.2rem; }
    .data-table { min-width: 500px; }
    .data-table th, .data-table td { font-size: 0.78rem; padding: 0.55rem 0.65rem; }
    .data-table td:first-child, .data-table th:first-child { min-width: 100px; }
    .data-table--wide { min-width: 700px; }
    .data-table--wide th, .data-table--wide td { white-space: normal; min-width: 90px; }
    .timeline { flex-direction: column; align-items: stretch; gap: 0; padding: 0; margin: 2rem 0 1.5rem; }
    .timeline::before { top: 0; bottom: 0; left: calc(1.15rem - 1.5px); right: auto; width: 3px; height: 100%; }
    .timeline::after { top: 0; left: calc(1.15rem - 1.5px); width: 3px; height: calc(var(--tl-progress, 0) * 100%); right: auto; transition: height 0.6s ease-out; }
    .timeline-step { display: grid; grid-template-columns: 2.3rem 1fr; gap: 0 0.75rem; align-items: center; padding: 0.6rem 0; text-align: left; }
    .timeline-dot { grid-row: 1 / 3; width: 2.3rem; height: 2.3rem; margin: 0; font-size: 0.9rem; }
    .timeline-label { grid-column: 2; font-size: 0.9rem; line-height: 1.2; }
    .timeline-period { grid-column: 2; font-size: 0.75rem; margin-top: 0; }
}

/* ── Dark Mode (auto) ── */
@media (prefers-color-scheme: dark) {
    :root:not(.light) {
        --blue-dark: #f0a050;
        --blue-mid: #F07D00;
        --blue-light: #2a1a08;
        --blue-accent: #f0a050;
        --gray-50: #1a1a2e;
        --gray-100: #222236;
        --gray-200: #2d2d44;
        --gray-300: #3d3d56;
        --gray-500: #9a9ab0;
        --gray-600: #b0b0c4;
        --gray-700: #d4d4e0;
        --gray-800: #eeeef4;
        --white: #12121e;
        --green: #48d080;
        --orange: #f0a050;
        --red: #f06060;
    }

    html:not(.light) body { color-scheme: dark; }

    html:not(.light) nav { background: #1a1008; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
    html:not(.light) .nav-brand { color: #ffffff !important; }
    html:not(.light) .nav-toggle { color: #ffffff; }
    html:not(.light) nav a:not(.nav-brand) { color: rgba(255,255,255,0.8); }
    html:not(.light) nav a:not(.nav-brand):hover { color: #ffffff; }

    html:not(.light) .hero { background: linear-gradient(135deg, #4a2800 0%, #6b3500 50%, #3a1d00 100%); color: #ffffff; }
    html:not(.light) .hero .subtitle { opacity: 0.95; }
    html:not(.light) .hero .meta { opacity: 0.8; }
    html:not(.light) .hero .meta span { color: #ffffff; }

    html:not(.light) .data-table { box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
    html:not(.light) .data-table thead { background: #1a1008; color: #ffffff; }
    html:not(.light) .data-table th { color: #ffffff; }
    html:not(.light) .data-table--wide thead th:first-child { background: #1a1008; color: #ffffff; }
    html:not(.light) .data-table--wide td:first-child { background: var(--white); }
    html:not(.light) .data-table--wide tbody tr:hover td:first-child { background: var(--blue-light); }

    html:not(.light) .stat-card { box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
    html:not(.light) .stat-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

    html:not(.light) .card--link:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.3); }

    html:not(.light) pre { background: #0a0a14; }
    html:not(.light) code { background: var(--gray-100); }

    html:not(.light) .pdf-embed-header { background: var(--gray-100); }

    html:not(.light) footer { background: #0a0a14; }

    html:not(.light) img, html:not(.light) video { opacity: 0.9; }

    html:not(.light) .badge-claude { background: #3a2a08; color: #f0c870; }
    html:not(.light) .badge-copilot { background: #1a1a3a; color: #8888e0; }
    html:not(.light) .badge-cowork { background: #082a2a; color: #5eead4; }
    html:not(.light) .badge-excel { background: #082a18; color: #60d0a0; }
    html:not(.light) .badge-chrome { background: #2a0820; color: #f0a0d0; }

    html:not(.light) .callout-warn { background: #2a2008; border-left-color: var(--orange); color: #f0c870; }
}

/* ── Dark Mode (manual toggle) ── */
html.dark {
    color-scheme: dark;
    --blue-dark: #f0a050; --blue-mid: #F07D00; --blue-light: #2a1a08; --blue-accent: #f0a050;
    --gray-50: #1a1a2e; --gray-100: #222236; --gray-200: #2d2d44; --gray-300: #3d3d56;
    --gray-500: #9a9ab0; --gray-600: #b0b0c4; --gray-700: #d4d4e0; --gray-800: #eeeef4;
    --white: #12121e; --green: #48d080; --orange: #f0a050; --red: #f06060;
}
html.dark nav { background: #1a1008; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
html.dark .nav-brand { color: #ffffff !important; }
html.dark .nav-toggle { color: #ffffff; }
html.dark nav a:not(.nav-brand) { color: rgba(255,255,255,0.8); }
html.dark nav a:not(.nav-brand):hover { color: #ffffff; }
html.dark .hero { background: linear-gradient(135deg, #4a2800 0%, #6b3500 50%, #3a1d00 100%); color: #ffffff; }
html.dark .hero .subtitle { opacity: 0.95; }
html.dark .hero .meta { opacity: 0.8; }
html.dark .hero .meta span { color: #ffffff; }
html.dark .data-table { box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
html.dark .data-table thead { background: #1a1008; color: #ffffff; }
html.dark .data-table th { color: #ffffff; }
html.dark .data-table--wide thead th:first-child { background: #1a1008; color: #ffffff; }
html.dark .data-table--wide td:first-child { background: var(--white); }
html.dark .data-table--wide tbody tr:hover td:first-child { background: var(--blue-light); }
html.dark .stat-card { box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
html.dark .stat-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
html.dark .card--link:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
html.dark pre { background: #0a0a14; }
html.dark code { background: var(--gray-100); }
html.dark .pdf-embed-header { background: var(--gray-100); }
html.dark footer { background: #0a0a14; }
html.dark img, html.dark video { opacity: 0.9; }
html.dark .badge-claude { background: #3a2a08; color: #f0c870; }
html.dark .badge-copilot { background: #1a1a3a; color: #8888e0; }
html.dark .badge-cowork { background: #082a2a; color: #5eead4; }
html.dark .badge-excel { background: #082a18; color: #60d0a0; }
html.dark .badge-chrome { background: #2a0820; color: #f0a0d0; }
html.dark .callout-warn { background: #2a2008; border-left-color: var(--orange); color: #f0c870; }
html.dark .pull-quote { background: #1a1008; }
html.dark .pull-quote blockquote { color: #e2c8a0; }
html.dark .myth-card { background: #1a1008; border-color: #3a2a08; }
html.dark .myth-card p { color: #c8b090; }

/* Force light when html.light (override system dark preference) */
html.light { color-scheme: light; }

/* ── Animations ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

/* Hero entrance */
.hero h1 { animation: fadeInUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero .subtitle { animation: fadeInUp 0.9s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero .meta { animation: fadeIn 1s 0.5s ease-out both; }

/* Scroll reveal base */
.reveal {
    opacity: 0;
    transform: translateY(48px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal.is-exiting {
    opacity: 0;
    transform: translateY(-32px);
}

/* Staggered children (cards, stats, steps) */
.reveal .card,
.reveal .stat-card,
.reveal .step-card,
.reveal .demo-card,
.reveal .phase,
.reveal .pdf-embed,
.reveal .infographic,
.reveal .callout {
    opacity: 0;
    transform: translateY(32px) scale(0.96);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible .card,
.reveal.is-visible .stat-card,
.reveal.is-visible .step-card,
.reveal.is-visible .demo-card,
.reveal.is-visible .phase,
.reveal.is-visible .pdf-embed,
.reveal.is-visible .infographic,
.reveal.is-visible .callout {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.reveal.is-visible .card:hover { transform: scale(1.03); }
.reveal.is-visible .stat-card:hover { transform: scale(1.03) translateY(-3px); }
.reveal.is-visible .card:nth-child(1), .reveal.is-visible .stat-card:nth-child(1), .reveal.is-visible .step-card:nth-child(1), .reveal.is-visible .demo-card:nth-child(1) { transition-delay: 0.05s; }
.reveal.is-visible .card:nth-child(2), .reveal.is-visible .stat-card:nth-child(2), .reveal.is-visible .step-card:nth-child(2), .reveal.is-visible .demo-card:nth-child(2) { transition-delay: 0.12s; }
.reveal.is-visible .card:nth-child(3), .reveal.is-visible .stat-card:nth-child(3), .reveal.is-visible .step-card:nth-child(3), .reveal.is-visible .demo-card:nth-child(3) { transition-delay: 0.2s; }
.reveal.is-visible .card:nth-child(4), .reveal.is-visible .stat-card:nth-child(4), .reveal.is-visible .step-card:nth-child(4), .reveal.is-visible .demo-card:nth-child(4) { transition-delay: 0.28s; }
.reveal.is-visible .card:nth-child(5), .reveal.is-visible .stat-card:nth-child(5), .reveal.is-visible .step-card:nth-child(5), .reveal.is-visible .demo-card:nth-child(5) { transition-delay: 0.36s; }
.reveal.is-visible .card:nth-child(6), .reveal.is-visible .stat-card:nth-child(6), .reveal.is-visible .step-card:nth-child(6), .reveal.is-visible .demo-card:nth-child(6) { transition-delay: 0.44s; }

/* Exit state for children */
.reveal.is-exiting .card,
.reveal.is-exiting .stat-card,
.reveal.is-exiting .step-card,
.reveal.is-exiting .demo-card,
.reveal.is-exiting .phase,
.reveal.is-exiting .pdf-embed,
.reveal.is-exiting .infographic,
.reveal.is-exiting .callout {
    opacity: 0;
    transform: translateY(-24px) scale(0.96);
    transition-delay: 0s;
}

/* Stat number scale-in */
.reveal .stat-number {
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.6s ease-out, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal.is-visible .stat-number { opacity: 1; transform: scale(1); transition-delay: 0.2s; }
.reveal.is-exiting .stat-number { opacity: 0; transform: scale(0.6); transition-delay: 0s; }

/* Nav active link */
nav a.nav-active:not(.nav-brand) { color: #ffffff; background: rgba(255,255,255,0.15); box-shadow: inset 0 -2px 0 var(--blue-mid); }

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .hero h1, .hero .subtitle, .hero .meta { animation: none; }
    .reveal, .reveal.is-exiting { opacity: 1; transform: none; transition: none; }
    .reveal .card, .reveal .stat-card, .reveal .step-card, .reveal .demo-card,
    .reveal .phase, .reveal .pdf-embed, .reveal .infographic, .reveal .callout,
    .reveal .stat-number,
    .reveal.is-exiting .card, .reveal.is-exiting .stat-card, .reveal.is-exiting .step-card,
    .reveal.is-exiting .demo-card, .reveal.is-exiting .phase, .reveal.is-exiting .pdf-embed,
    .reveal.is-exiting .infographic, .reveal.is-exiting .callout, .reveal.is-exiting .stat-number {
        opacity: 1; transform: none; transition: none;
    }
    .timeline::after { transition: none; }
    .timeline-dot { transition: none; }
    .collapsible-body { transition: none; }
}

/* ── Print ── */
@media print {
    nav, .skip-link, .pdf-embed iframe, .demo-grid iframe, .video-wrapper, .reading-progress, .reading-pct, .back-to-top, .toggle-all-bar, .anchor-link { display: none; }
    section { padding: 1.5rem 0; break-inside: avoid; }
    .hero { padding: 2rem 0; background: none; color: var(--gray-800); }
    .card, .stat-card, .step-card, .phase { box-shadow: none; border: 1px solid var(--gray-300); }
    .timeline { --tl-progress: 1; }
    .timeline-dot { border-color: var(--gray-500); color: var(--gray-700); background: var(--gray-300); }
    details.collapsible summary::after, details.phase summary::after { display: none; }
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.75em; color: var(--gray-500); word-break: break-all; }
}
