@layer reset, tokens, base, layout, components, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
  img, svg { display: block; max-width: 100%; }
  button, input { font: inherit; }
}

@layer tokens {
  :root {
    color-scheme: light;
    --green: #58cc02;
    --green-dark: #46a302;
    --green-soft: #e7f8d8;
    --blue: #1cb0f6;
    --blue-dark: #168cc4;
    --blue-soft: #ddf4ff;
    --yellow: #ffc800;
    --yellow-dark: #d7a900;
    --yellow-soft: #fff6cc;
    --purple: #ce82ff;
    --purple-dark: #a568cc;
    --purple-soft: #f3e4ff;
    --red: #ff4b4b;
    --red-dark: #d63d3d;
    --ink: #3c3c3c;
    --muted: #777;
    --line: #e5e5e5;
    --surface: #fff;
    --canvas: #f7f7f7;
    --code: #202833;
    --radius-sm: 14px;
    --radius-md: 22px;
    --radius-lg: 32px;
    --shadow-green: 0 5px 0 var(--green-dark);
    --shadow-blue: 0 5px 0 var(--blue-dark);
    --shadow-neutral: 0 5px 0 #d7d7d7;
    --ease-out: cubic-bezier(.23, 1, .32, 1);
    --content: 1120px;
  }
}

@layer base {
  body {
    min-width: 320px;
    background: var(--canvas);
    color: var(--ink);
    font-family: ui-rounded, "Arial Rounded MT Bold", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
  }
  a { color: var(--blue-dark); text-decoration-thickness: 2px; text-underline-offset: 3px; }
  a:hover { color: var(--blue); }
  button, a { -webkit-tap-highlight-color: transparent; }
  :focus-visible { outline: 4px solid rgba(28, 176, 246, .35); outline-offset: 4px; }
  h1, h2, h3, h4 { line-height: 1.16; letter-spacing: -.025em; }
  h1 { font-size: clamp(2.4rem, 7vw, 5.5rem); }
  h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
  h3 { font-size: clamp(1.25rem, 2.5vw, 1.65rem); }
  p + p { margin-top: .8rem; }
  code, pre, .mono {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    letter-spacing: -.02em;
  }
  code:not(pre code) { padding: .16em .42em; border-radius: 7px; background: #ececec; font-size: .9em; }
}

@layer layout {
  .site-header {
    position: sticky;
    z-index: 20;
    top: 0;
    border-bottom: 2px solid var(--line);
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(14px);
  }
  .header-inner, .page, .footer-inner {
    width: min(calc(100% - 32px), var(--content));
    margin-inline: auto;
  }
  .header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
  .brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 900; }
  .brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 3px solid var(--green-dark); border-radius: 14px; background: var(--green); color: #fff; box-shadow: 0 3px 0 var(--green-dark); }
  .site-nav { display: flex; align-items: center; gap: 8px; }
  .site-nav a { padding: 8px 12px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 850; }
  .site-nav a[aria-current="page"] { background: var(--green-soft); color: var(--green-dark); }
  .page { padding-block: 54px 96px; }
  .hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); align-items: center; gap: clamp(32px, 7vw, 84px); min-height: 560px; }
  .hero-copy { max-width: 720px; }
  .hero h1 strong { color: var(--green-dark); }
  .hero-lede { max-width: 670px; margin-top: 24px; color: #5c5c5c; font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 650; }
  .hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
  .section { padding-top: 86px; scroll-margin-top: 92px; }
  .section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
  .section-heading p { max-width: 590px; color: var(--muted); }
  .two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .lesson-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 42px; align-items: start; }
  .lesson-toc { position: sticky; top: 96px; }
  .lesson-content { min-width: 0; }
  .lesson-content > section { padding-top: 62px; scroll-margin-top: 88px; }
  .lesson-content > section:first-child { padding-top: 0; }
  .site-footer { border-top: 2px solid var(--line); background: #fff; }
  .footer-inner { display: flex; justify-content: space-between; gap: 24px; padding-block: 28px; color: var(--muted); font-size: 14px; }
}

@layer components {
  .eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--green-dark); font-size: 13px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
  .eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 2px 0 var(--green-dark); }
  .button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 20px;
    border: 2px solid transparent;
    border-radius: 16px;
    background: var(--green);
    color: #fff;
    box-shadow: var(--shadow-green);
    text-decoration: none;
    font-size: 15px;
    font-weight: 950;
    cursor: pointer;
    transition: transform 130ms var(--ease-out), box-shadow 130ms var(--ease-out), background-color 160ms ease;
  }
  .button:hover { color: #fff; background: #61d80b; }
  .button:active { transform: translateY(3px) scale(.98); box-shadow: 0 2px 0 var(--green-dark); }
  .button.secondary { background: #fff; color: var(--blue-dark); border-color: var(--blue); box-shadow: var(--shadow-blue); }
  .button.secondary:hover { background: var(--blue-soft); color: var(--blue-dark); }
  .button.secondary:active { box-shadow: 0 2px 0 var(--blue-dark); }
  .button.ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-neutral); }
  .button.ghost:active { box-shadow: 0 2px 0 #d7d7d7; }
  .button.small { min-height: 38px; padding: 6px 13px; border-radius: 12px; font-size: 13px; box-shadow: 0 3px 0 var(--green-dark); }
  .hero-board { position: relative; min-height: 400px; display: grid; place-items: center; }
  .remote-mascot { position: relative; width: min(330px, 90%); aspect-ratio: .72; padding: 34px 28px; border: 7px solid #303b47; border-radius: 70px; background: #fff; box-shadow: 0 18px 0 #d7d7d7; transform: rotate(4deg); }
  .remote-mascot::before, .remote-mascot::after { content: ""; position: absolute; top: 48px; width: 26px; height: 26px; border: 6px solid #303b47; border-radius: 50%; background: var(--yellow); }
  .remote-mascot::before { left: 74px; } .remote-mascot::after { right: 74px; }
  .remote-smile { position: absolute; top: 86px; left: 50%; width: 82px; height: 42px; border-bottom: 7px solid #303b47; border-radius: 0 0 50% 50%; transform: translateX(-50%); }
  .remote-keys { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 132px; }
  .remote-key { display: grid; min-height: 72px; place-items: center; border: 5px solid currentColor; border-radius: 22px; box-shadow: 0 7px 0 currentColor; background: #fff; color: var(--blue-dark); font-size: 14px; font-weight: 950; }
  .remote-key.voice { grid-column: 1 / -1; color: var(--yellow-dark); }
  .remote-key.enter { color: var(--green-dark); }
  .remote-key.device { color: var(--purple-dark); }
  .spark { position: absolute; width: 22px; height: 22px; border-radius: 6px; background: var(--yellow); transform: rotate(24deg); }
  .spark.one { top: 30px; right: 12px; } .spark.two { bottom: 64px; left: 0; background: var(--blue); transform: rotate(-18deg); }
  .status-strip { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; margin-top: 30px; padding: 18px 20px; border: 2px solid var(--line); border-radius: var(--radius-md); background: #fff; }
  .progress-track { height: 16px; overflow: hidden; border-radius: 99px; background: #e7e7e7; }
  .progress-fill { width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width 700ms var(--ease-out); }
  .xp { color: var(--yellow-dark); font-size: 14px; font-weight: 950; white-space: nowrap; }
  .card { border: 2px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 4px 0 #dedede; }
  .card-body { padding: 24px; }
  .card h3 + p { margin-top: 10px; }
  .card p { color: #666; }
  .fact-card { padding: 24px; }
  .fact-number { color: var(--green-dark); font-size: 2.6rem; font-weight: 1000; line-height: 1; }
  .fact-label { margin-top: 8px; color: var(--muted); font-size: 14px; font-weight: 800; }
  .roadmap-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
  .filter-button { padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 14px; font-weight: 900; cursor: pointer; transition: transform 130ms var(--ease-out), background-color 160ms ease, border-color 160ms ease; }
  .filter-button:active { transform: scale(.97); }
  .filter-button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); }
  .roadmap { position: relative; display: grid; gap: 24px; padding-left: 76px; }
  .roadmap::before { content: ""; position: absolute; top: 38px; bottom: 38px; left: 31px; width: 12px; border-radius: 99px; background: repeating-linear-gradient(to bottom, #d7d7d7 0 20px, transparent 20px 31px); }
  .stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; padding: 24px; border: 3px solid var(--line); border-radius: var(--radius-md); background: #fff; box-shadow: 0 5px 0 #dedede; transition: transform 180ms var(--ease-out), opacity 180ms ease; }
  .stage::before { content: attr(data-step); position: absolute; top: 22px; left: -76px; width: 64px; height: 64px; display: grid; place-items: center; border: 5px solid #cfcfcf; border-radius: 50%; background: #fff; color: #999; box-shadow: 0 5px 0 #cfcfcf; font-size: 20px; font-weight: 1000; }
  .stage[data-state="done"] { border-color: #a9e575; }
  .stage[data-state="done"]::before { content: "✓"; border-color: var(--green-dark); background: var(--green); color: #fff; box-shadow: 0 5px 0 var(--green-dark); }
  .stage[data-state="active"] { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 5px 0 var(--blue-dark); }
  .stage[data-state="active"]::before { border-color: var(--blue-dark); background: var(--blue); color: #fff; box-shadow: 0 5px 0 var(--blue-dark); }
  .stage.is-hidden { display: none; }
  .stage-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
  .stage p { margin-top: 8px; color: #666; }
  .stage-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
  .pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #eee; color: #666; font-size: 12px; font-weight: 900; }
  .pill.done { background: var(--green-soft); color: var(--green-dark); }
  .pill.active { background: #fff; color: var(--blue-dark); }
  .pill.code { background: #e7edf4; color: #34495e; }
  .stage-action { align-self: center; }
  .callout { padding: 20px 22px; border: 2px solid var(--blue); border-left-width: 8px; border-radius: var(--radius-md); background: var(--blue-soft); }
  .callout strong { display: block; color: var(--blue-dark); }
  .callout.warning { border-color: var(--yellow-dark); background: var(--yellow-soft); }
  .callout.warning strong { color: #957500; }
  .callout.success { border-color: var(--green-dark); background: var(--green-soft); }
  .callout.success strong { color: var(--green-dark); }
  .toc-card { padding: 16px; border: 2px solid var(--line); border-radius: 20px; background: #fff; }
  .toc-card strong { display: block; padding: 5px 8px 10px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
  .toc-card a { display: block; padding: 8px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 800; }
  .toc-card a:hover, .toc-card a.is-current { background: var(--green-soft); color: var(--green-dark); }
  .lesson-hero { padding: 34px; border: 3px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: 0 7px 0 #dedede; }
  .lesson-hero h1 { max-width: 800px; margin-top: 12px; font-size: clamp(2.1rem, 6vw, 4.4rem); }
  .lesson-hero p { max-width: 760px; margin-top: 18px; color: var(--muted); font-size: 1.1rem; }
  .commit-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 7px 12px; border-radius: 11px; background: var(--code); color: #d7f7be; font-family: ui-monospace, monospace; font-size: 13px; font-weight: 800; }
  .lesson-content h2 { margin-bottom: 18px; }
  .lesson-content h3 { margin-top: 28px; margin-bottom: 12px; }
  .prose-list { padding-left: 1.35em; }
  .prose-list li + li { margin-top: .45rem; }
  .code-card { overflow: hidden; margin-top: 18px; border: 2px solid #111820; border-radius: 20px; background: var(--code); color: #edf7ff; box-shadow: 0 5px 0 #111820; }
  .code-head { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 12px 8px 18px; border-bottom: 1px solid #3b4654; color: #aab7c4; font-size: 13px; font-weight: 800; }
  .copy-button { border: 1px solid #596675; border-radius: 9px; background: #303b47; color: #fff; padding: 5px 9px; cursor: pointer; transition: background-color 150ms ease, transform 120ms var(--ease-out); }
  .copy-button:hover { background: #3d4a58; }
  .copy-button:active { transform: scale(.96); }
  pre { overflow: auto; padding: 20px; font-size: 14px; line-height: 1.65; tab-size: 2; }
  .token-add { color: #9fe870; } .token-remove { color: #ff8b8b; } .token-key { color: #8bd7ff; } .token-note { color: #ffd85e; }
  .tabs { margin-top: 22px; }
  .tab-list { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 10px; }
  .tab { flex: none; padding: 8px 13px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--muted); font-weight: 900; cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease, transform 120ms var(--ease-out); }
  .tab:active { transform: scale(.97); }
  .tab[aria-selected="true"] { border-color: var(--purple); background: var(--purple-soft); color: var(--purple-dark); }
  .tab-panel { padding: 22px; border: 2px solid var(--line); border-radius: 18px; background: #fff; }
  .tab-panel[hidden] { display: none; }
  .term { border: 0; border-bottom: 2px dotted var(--blue); background: transparent; color: var(--blue-dark); font-weight: 900; cursor: help; }
  dialog { width: min(560px, calc(100% - 32px)); border: 0; border-radius: 26px; padding: 0; box-shadow: 0 18px 0 rgba(32, 40, 51, .18); }
  dialog::backdrop { background: rgba(32, 40, 51, .62); backdrop-filter: blur(4px); }
  .dialog-body { padding: 28px; }
  .dialog-top { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
  .dialog-close { width: 40px; height: 40px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--muted); font-weight: 900; cursor: pointer; }
  .dialog-body p { margin-top: 12px; color: #666; }
  html.lightbox-open { overflow: hidden; }
  .image-lightbox {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .image-lightbox::backdrop { background: transparent; backdrop-filter: none; }
  .image-lightbox__shade { position: absolute; inset: 0; background: rgba(13, 17, 21, .94); }
  .image-lightbox__stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; }
  .image-lightbox__motion { position: relative; flex: none; will-change: transform; }
  .image-lightbox__image { width: 100%; height: 100%; display: block; max-width: none; max-height: none; object-fit: contain; user-select: none; -webkit-user-drag: none; cursor: zoom-in; will-change: transform; }
  .image-lightbox.is-zoomed .image-lightbox__image { cursor: grab; }
  .image-lightbox.is-dragging .image-lightbox__image { cursor: grabbing; }
  .figure-card { margin-top: 20px; overflow: hidden; border: 2px solid var(--line); border-radius: var(--radius-md); background: #fff; }
  .figure-media { min-height: 260px; display: grid; place-items: center; padding: 20px; background: #f1f5f7; }
  .figure-media img { max-height: 520px; object-fit: contain; border-radius: 12px; }
  .figure-card figcaption { padding: 14px 18px; color: var(--muted); font-size: 13px; }
  .image-button { width: 100%; border: 0; background: transparent; cursor: zoom-in; }
  .quiz { margin-top: 24px; padding: 24px; border: 3px solid var(--purple); border-radius: var(--radius-md); background: var(--purple-soft); box-shadow: 0 5px 0 var(--purple-dark); }
  .quiz-options { display: grid; gap: 10px; margin-top: 18px; }
  .quiz-option { padding: 12px 15px; border: 2px solid #d5b5e9; border-radius: 14px; background: #fff; color: var(--ink); text-align: left; font-weight: 800; cursor: pointer; transition: transform 120ms var(--ease-out), border-color 150ms ease, background-color 150ms ease; }
  .quiz-option:active { transform: scale(.985); }
  .quiz-option.correct { border-color: var(--green); background: var(--green-soft); }
  .quiz-option.wrong { border-color: var(--red); background: #ffe0e0; }
  .quiz-feedback { min-height: 30px; margin-top: 14px; font-weight: 900; }
  .checklist { display: grid; gap: 10px; margin-top: 18px; }
  .check-item { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border: 2px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; }
  .check-item input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--green); }
  .check-item:has(input:checked) { border-color: #a9e575; background: var(--green-soft); }
  .glossary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .glossary-card { padding: 16px; border: 2px solid var(--line); border-radius: 16px; background: #fff; }
  .glossary-card strong { color: var(--blue-dark); }
  .glossary-card p { margin-top: 5px; color: var(--muted); font-size: 14px; }
  .summary-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
  .flow-node { padding: 10px 14px; border: 2px solid var(--line); border-radius: 13px; background: #fff; font-weight: 900; }
  .flow-arrow { color: var(--green-dark); font-weight: 1000; }
  .source-note { margin-top: 14px; color: var(--muted); font-size: 13px; }
  .design-lesson-hero { background: linear-gradient(145deg, #fff 55%, #edf2f5); }
  .design-layout-card { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr); align-items: center; gap: 36px; padding: 30px; border: 2px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: 0 5px 0 #dedede; }
  .design-remote { position: relative; width: 178px; height: 386px; margin-inline: auto; padding: 34px 28px; border: 5px solid #303b47; border-radius: 60px; background: linear-gradient(100deg, #e7ebed, #fff 47%, #d7dcdf); box-shadow: inset -10px 0 18px rgba(32, 40, 51, .09), 0 16px 0 #d7d7d7; }
  .design-light { position: absolute; top: 18px; left: 50%; width: 34px; height: 4px; border-radius: 99px; background: #b7c2c9; transform: translateX(-50%); }
  .design-key { position: absolute; left: 50%; display: grid; place-items: center; border: 2px solid #71808c; background: #f9fbfc; color: #34404a; font-size: 12px; font-weight: 950; transform: translateX(-50%); box-shadow: 0 3px 0 #9ba6ad; }
  .design-voice { top: 45px; width: 110px; height: 66px; border-radius: 30px; background: #fff; }
  .design-up, .design-down { width: 78px; height: 42px; border-radius: 21px; }
  .design-up { top: 136px; }
  .design-enter { top: 197px; width: 116px; height: 68px; border-color: var(--green-dark); border-radius: 30px; background: var(--green-soft); color: var(--green-dark); box-shadow: 0 3px 0 var(--green-dark); }
  .design-down { top: 289px; }
  .design-device { position: absolute; top: 212px; right: -9px; width: 13px; height: 55px; overflow: hidden; border: 2px solid var(--purple-dark); border-radius: 8px; background: var(--purple-soft); color: transparent; }
  .layer-stack { display: grid; justify-items: center; gap: 10px; }
  .layer-piece { width: min(100%, 620px); display: flex; justify-content: space-between; gap: 24px; padding: 18px 22px; border: 2px solid; border-radius: 16px; box-shadow: 0 4px 0 currentColor; }
  .layer-piece span { color: #5f6870; font-size: 14px; text-align: right; }
  .layer-piece.metal { border-color: #7f8b93; background: #edf2f5; color: #46535c; }
  .layer-piece.controls { border-color: var(--green-dark); background: var(--green-soft); color: var(--green-dark); }
  .layer-piece.electronics { border-color: var(--purple-dark); background: var(--purple-soft); color: var(--purple-dark); }
  .layer-piece.radio { border-color: var(--blue-dark); background: var(--blue-soft); color: var(--blue-dark); }
  .layer-arrow { color: #9aa2a8; font-weight: 1000; }
  .design-sheet { min-height: 520px; background: #e9eef1; }
  .design-sheet img { width: min(100%, 760px); max-height: none; border: 1px solid #cad1d6; border-radius: 4px; background: #fff; box-shadow: 0 10px 28px rgba(32, 40, 51, .12); }
  .back-top { position: fixed; right: 22px; bottom: 22px; z-index: 10; width: 46px; height: 46px; display: grid; place-items: center; border: 2px solid var(--blue-dark); border-radius: 15px; background: var(--blue); color: #fff; box-shadow: 0 4px 0 var(--blue-dark); font-weight: 950; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity 180ms ease, transform 180ms var(--ease-out); }
  .back-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .back-top:active { transform: translateY(3px) scale(.98); box-shadow: 0 1px 0 var(--blue-dark); }
}

@layer utilities {
  .muted { color: var(--muted); }
  .mt-16 { margin-top: 16px; }
  .mt-24 { margin-top: 24px; }
  .mt-32 { margin-top: 32px; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
}

@media (hover: hover) and (pointer: fine) {
  .stage:hover, .card:hover { transform: translateY(-3px); }
  .remote-mascot:hover { transform: rotate(1deg) translateY(-4px); }
  .remote-mascot { transition: transform 240ms var(--ease-out); }
}

@media (max-width: 860px) {
  .site-nav a:not([aria-current="page"]) { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-board { min-height: 440px; }
  .three-col { grid-template-columns: 1fr; }
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-toc { position: static; }
  .design-layout-card { grid-template-columns: 1fr; }
  .toc-card { display: flex; overflow-x: auto; gap: 4px; }
  .toc-card strong { display: none; }
  .toc-card a { flex: none; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .page { padding-top: 32px; }
  .brand span:last-child { display: none; }
  .hero-board { min-height: 370px; }
  .remote-mascot { width: 250px; border-radius: 54px; padding: 26px 22px; }
  .remote-keys { margin-top: 120px; gap: 13px; }
  .remote-key { min-height: 54px; border-width: 4px; border-radius: 16px; box-shadow: 0 5px 0 currentColor; font-size: 12px; }
  .two-col, .glossary-grid { grid-template-columns: 1fr; }
  .section { padding-top: 66px; }
  .section-heading { align-items: start; flex-direction: column; }
  .roadmap { padding-left: 58px; }
  .roadmap::before { left: 23px; width: 8px; }
  .stage { grid-template-columns: 1fr; padding: 19px; }
  .stage::before { left: -58px; width: 48px; height: 48px; border-width: 4px; font-size: 16px; }
  .stage-action { justify-self: start; }
  .lesson-hero { padding: 24px; }
  .design-layout-card { padding: 22px 16px; }
  .layer-piece { align-items: flex-start; flex-direction: column; gap: 5px; }
  .layer-piece span { text-align: left; }
  .design-sheet { min-height: 320px; padding: 10px; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
