:root {
  --paper: #f2eee5;
  --surface: #fffdf7;
  --ink: #171914;
  --muted: #697069;
  --line: #c8cdc5;
  --green: #008b72;
  --lime: #b5ff2d;
  --coral: #ff6855;
  --blue: #6d73f5;
  --yellow: #ffd86d;
  --soft: #e4e8e0;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: radial-gradient(circle at 8% 2%, #6d73f516, transparent 30rem), var(--paper); font-family: "Helvetica Neue", Arial, "Noto Sans JP", sans-serif; }
button, a { font: inherit; }
button { padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; color: inherit; background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 800; }
button:hover { border-color: var(--ink); }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #175cff; outline-offset: 4px; }
code, pre { font-family: var(--mono); }
.page { width: min(1740px, calc(100% - 48px)); margin: auto; padding: 34px 0 50px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 12px 18px 28px; }
.eyebrow, .label, .section-heading p, .inspector header p, .result-explanation > p, .culprits > p, .fix-code > p { margin: 0 0 9px; color: var(--green); font: 900 11px/1.4 var(--mono); letter-spacing: .12em; }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow i { width: 18px; height: 18px; border: 2px solid var(--blue); border-radius: 5px; box-shadow: 5px 5px 0 var(--lime); }
h1 { margin: 0; font-size: clamp(30px, 4.2vw, 72px); line-height: 1.08; letter-spacing: 0; white-space: nowrap; }
.lead { margin: 18px 0 0; color: var(--muted); font-size: clamp(16px, 1.55vw, 24px); font-weight: 750; }
.lead strong { color: var(--ink); }
.hero-actions { display: flex; flex-shrink: 0; gap: 8px; }
.hero-actions button { min-height: 48px; }
.dark { color: white; background: var(--ink); }

.lab, .guide, .standards { overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); box-shadow: 0 15px 45px #17191408; }
.section-heading { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.number { display: grid; flex: 0 0 auto; place-items: center; width: 50px; height: 50px; border-radius: 15px; color: white; background: var(--coral); font: 900 12px var(--mono); }
.number.blue { background: var(--blue); }
.number.green { background: var(--green); }
.number.yellow { color: var(--ink); background: var(--yellow); }
.section-heading h2 { margin: 0; font-size: clamp(21px, 2.05vw, 32px); line-height: 1.2; }
.section-heading p { margin-bottom: 3px; }
.heading-badges { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.heading-badges span, .heading-badges b { padding: 9px 12px; border-radius: 30px; white-space: nowrap; font: 900 10px var(--mono); }
.heading-badges span { background: var(--soft); }
.heading-badges b { color: white; background: var(--coral); }
.heading-badges b.pass { color: var(--ink); background: var(--lime); }
.heading-badges b.contained { color: var(--ink); background: var(--yellow); }
.lab-grid { display: grid; grid-template-columns: 260px minmax(570px, 1fr) 310px; min-height: 870px; }

.controls { border-right: 1px solid var(--line); background: #f7f4ec; }
.controls section { padding: 21px 19px; border-bottom: 1px solid var(--line); }
.controls section:last-child { border-bottom: 0; }
.controls h3 { margin: 0 0 15px; font-size: 17px; }
.scenario-list { display: grid; gap: 8px; }
.scenario-list button { display: flex; align-items: center; gap: 11px; padding: 11px 10px; text-align: left; }
.scenario-list b { display: grid; flex: 0 0 auto; place-items: center; width: 30px; height: 32px; border-radius: 9px; background: var(--soft); font: 800 11px var(--mono); }
.scenario-list span { font-size: 13px; }
.scenario-list small { display: block; margin-top: 4px; font-size: 10px; line-height: 1.4; }
.scenario-list button[aria-pressed="true"] { border-color: var(--ink); color: white; background: var(--ink); }
.scenario-list button[aria-pressed="true"] b { color: var(--ink); background: var(--lime); }
.zoom-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.zoom-list button { padding: 9px 5px; }
.zoom-list b, .zoom-list small { display: block; }
.zoom-list b { font: 900 11px var(--mono); }
.zoom-list small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.zoom-list button[aria-pressed="true"] { border-color: var(--blue); color: white; background: var(--blue); }
.zoom-list button[aria-pressed="true"] small { color: white; }
.zoom-equation { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin: 13px 0 0; color: var(--muted); font: 800 10px var(--mono); }
.zoom-equation strong { color: var(--blue); }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--soft); }
.mode-switch button { padding: 9px; border: 0; background: transparent; }
.mode-switch button[aria-pressed="true"] { color: white; background: var(--blue); box-shadow: 0 2px 8px #17191418; }
.overlay-toggle { display: flex; align-items: center; gap: 9px; margin-top: 17px; cursor: pointer; font-size: 11px; }
.overlay-toggle input { position: absolute; opacity: 0; }
.overlay-toggle span { width: 35px; height: 20px; padding: 2px; border-radius: 20px; background: #b9beb6; transition: background .15s; }
.overlay-toggle span::after { display: block; width: 16px; height: 16px; border-radius: 50%; background: white; content: ""; transition: translate .15s; }
.overlay-toggle input:checked + span { background: var(--blue); }
.overlay-toggle input:checked + span::after { translate: 15px 0; }
.overlay-toggle input:focus-visible + span { outline: 3px solid #175cff; outline-offset: 3px; }
.quick-check ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.quick-check li { position: relative; padding-left: 22px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.quick-check li::before { position: absolute; top: 1px; left: 0; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; color: var(--ink); background: var(--lime); font: 900 9px var(--mono); content: "✓"; }

.workspace { display: flex; min-width: 0; flex-direction: column; gap: 11px; padding: 18px; background: var(--soft); }
.instruction { display: flex; align-items: center; gap: 12px; padding: 2px 3px 7px; }
.instruction > span { color: var(--blue); font-size: 28px; font-weight: 900; }
.instruction p { margin: 0; font-size: 12px; font-weight: 750; line-height: 1.55; }
.instruction b { margin-left: auto; padding: 7px 10px; border-radius: 7px; color: white; background: var(--blue); white-space: nowrap; font: 800 10px var(--mono); }
.browser { display: flex; flex: 1; flex-direction: column; overflow: hidden; border: 1px solid #b8bfb5; border-radius: 18px; background: var(--surface); }
.browser-bar { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px; border-bottom: 1px solid #b8bfb5; color: #58615b; background: #d6dcd2; font: 800 10px var(--mono); }
.dots { color: var(--coral); letter-spacing: 2px; }
.native { margin-left: auto; padding: 6px; border-radius: 6px; color: white; background: var(--ink); font-size: 9px; }
.preview-stage { position: relative; display: grid; flex: 1; min-height: 610px; place-items: center; align-content: center; padding: 24px 18px 54px; overflow: hidden; background-color: #faf7f0; background-image: linear-gradient(#17191408 1px, transparent 1px), linear-gradient(90deg, #17191408 1px, transparent 1px); background-size: 28px 28px; }
.viewport-window { position: relative; overflow: hidden; border: 3px solid var(--blue); border-radius: 13px; background: white; box-shadow: 9px 9px 0 #17191413; transition: width .2s, height .2s; }
.preview-stage.has-overflow .viewport-window { border-color: var(--coral); }
.preview-stage.has-overflow .viewport-window::after { position: absolute; top: 0; right: 0; bottom: 0; z-index: 5; width: 30px; background: linear-gradient(90deg, transparent, #ff68558c); pointer-events: none; content: ""; }
.sim-viewport { height: 640px; overflow: auto; container: reflow-preview / inline-size; transform-origin: top left; color: var(--ink); background: #fffdf7; scrollbar-width: thin; }
.scene { min-height: 100%; }
.viewport-ruler { position: absolute; right: 18px; bottom: 17px; left: 18px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; color: var(--muted); font: 900 10px var(--mono); }
.viewport-ruler b { display: flex; align-items: center; gap: 8px; color: var(--blue); }
.viewport-ruler b::before, .viewport-ruler b::after { height: 1px; flex: 1; background: currentColor; content: ""; }

/* Simulated websites */
.site-demo { min-height: 100%; background: #fffdf7; }
.demo-site-head { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 24px; padding: 0 30px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.demo-site-head > b { font: 900 14px var(--mono); }
.demo-site-head nav { display: flex; gap: 22px; font-size: 11px; font-weight: 800; }
.demo-site-head button { padding: 9px 14px; border: 2px solid var(--ink); border-radius: 24px; color: white; background: var(--ink); font-size: 10px; }
.demo-main { padding: 26px 30px 42px; }
.demo-kicker { margin: 0 0 8px; color: var(--green); font: 900 10px var(--mono); letter-spacing: .1em; }
.demo-main h3 { margin: 0; font-size: 37px; line-height: 1.05; }
.demo-sub { margin: 10px 0 24px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.overflow-source { transition: outline .15s, background .15s; }
.show-overlay.has-overflow .mode-broken .overflow-source { outline: 4px solid var(--coral); outline-offset: 2px; background-image: linear-gradient(#ff68550c, #ff68550c); }
.show-overlay.has-overflow .mode-broken .overflow-source::selection { background: var(--coral); }

.dashboard-layout { display: grid; gap: 18px; }
.mode-broken .dashboard-layout { width: 970px; grid-template-columns: 240px 712px; }
.dashboard-nav { padding: 20px; border: 2px solid var(--ink); border-radius: 16px; color: white; background: #20231e; }
.dashboard-nav b { font-size: 17px; }
.dashboard-nav ul { display: grid; gap: 9px; margin: 20px 0 0; padding: 0; list-style: none; }
.dashboard-nav li { padding: 10px; border-radius: 8px; background: #ffffff12; font-size: 11px; }
.dashboard-content { min-width: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-grid article { min-height: 105px; padding: 17px; border: 2px solid var(--ink); border-radius: 14px; background: var(--surface); }
.stat-grid article:nth-child(2) { background: var(--lime); }
.stat-grid article:nth-child(3) { background: var(--blue); }
.stat-grid small { font: 900 9px var(--mono); }
.stat-grid strong { display: block; margin-top: 16px; font-size: 25px; }
.chart-card { min-height: 230px; margin-top: 13px; padding: 20px; border: 2px solid var(--ink); border-radius: 14px; background: #f1eee5; }
.chart-bars { display: flex; height: 145px; align-items: flex-end; gap: 12px; margin-top: 20px; }
.chart-bars i { flex: 1; border: 2px solid var(--ink); border-bottom: 0; background: var(--coral); }
.chart-bars i:nth-child(2) { height: 70%; }.chart-bars i:nth-child(3) { height: 95%; }.chart-bars i:nth-child(4) { height: 55%; }.chart-bars i:nth-child(5) { height: 82%; }

.checkout-shell { display: grid; gap: 20px; }
.mode-broken .checkout-shell { width: 780px; grid-template-columns: 500px 260px; }
.checkout-form, .order-card { border: 2px solid var(--ink); border-radius: 16px; }
.checkout-form { padding: 22px; }
.order-card { padding: 20px; background: var(--yellow); }
.checkout-form h4, .order-card h4 { margin: 0 0 16px; font-size: 19px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-grid label { color: var(--muted); font-size: 9px; font-weight: 800; }
.form-grid input { width: 100%; min-height: 42px; margin-top: 6px; padding: 0 11px; border: 2px solid var(--ink); border-radius: 9px; background: white; }
.form-grid .full { grid-column: 1 / -1; }
.checkout-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; white-space: nowrap; }
.checkout-actions button { min-height: 44px; border: 2px solid var(--ink); }
.checkout-actions .pay { color: var(--ink); background: var(--lime); }
.order-card ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.order-card li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid #17191450; font-size: 10px; }
.order-card strong { display: block; margin-top: 24px; font-size: 26px; }

.article-shell { margin: auto; }
.mode-broken .article-shell { width: 760px; }
.article-shell header { margin-bottom: 26px; }
.article-shell h3 { max-width: 680px; font-size: 43px; }
.article-meta { margin: 13px 0 0; color: var(--muted); font: 800 10px var(--mono); }
.article-body { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 26px; }
.article-copy p { margin: 0 0 17px; font-size: 14px; line-height: 1.9; }
.article-callout { margin: 24px 0; padding: 21px; border: 2px solid var(--ink); border-radius: 14px; background: var(--lime); font-size: 15px; font-weight: 850; }
.article-aside { padding: 18px; border-left: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.7; }

.table-demo { min-width: 0; }
.mode-broken .table-demo { width: 850px; }
.table-scroll { max-width: 100%; }
.data-table { width: 820px; border-collapse: separate; border-spacing: 0; border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; background: white; font-size: 11px; }
.data-table th, .data-table td { min-width: 130px; padding: 15px 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.data-table th { color: white; background: #20231e; font: 900 9px var(--mono); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table th:last-child, .data-table td:last-child { border-right: 0; }
.data-table td:first-child { font-weight: 850; }

/* Fixed reflow behavior */
.mode-fixed .dashboard-layout, .mode-fixed .checkout-shell, .mode-fixed .article-shell, .mode-fixed .table-demo { width: auto; max-width: 100%; }
.mode-fixed .dashboard-layout { grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); }
.mode-fixed .checkout-shell { grid-template-columns: minmax(0, 1fr) minmax(200px, 260px); }
.mode-fixed .article-shell { max-width: 760px; }
.mode-fixed .table-scroll { overflow-x: auto; border: 3px solid var(--green); border-radius: 16px; }
.mode-fixed .table-scroll .data-table { border: 0; border-radius: 0; }

@container reflow-preview (max-width: 700px) {
  .mode-fixed .demo-site-head { align-items: flex-start; flex-direction: column; gap: 10px; padding: 18px; white-space: normal; }
  .mode-fixed .demo-site-head nav { flex-wrap: wrap; gap: 12px; }
  .mode-fixed .demo-main { padding: 22px 18px 36px; }
  .mode-fixed .dashboard-layout, .mode-fixed .checkout-shell, .mode-fixed .article-body { grid-template-columns: minmax(0, 1fr); }
  .mode-fixed .dashboard-nav ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-fixed .stat-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
  .mode-fixed .form-grid { grid-template-columns: minmax(0, 1fr); }
  .mode-fixed .form-grid .full { grid-column: auto; }
  .mode-fixed .checkout-actions { align-items: stretch; flex-direction: column-reverse; white-space: normal; }
  .mode-fixed .article-shell h3 { font-size: clamp(28px, 11cqi, 43px); overflow-wrap: anywhere; }
  .mode-fixed .article-aside { border-top: 1px solid var(--line); border-left: 0; }
}

.legend { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 10px; font-weight: 800; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 16px; height: 16px; border-radius: 4px; }
.legend .viewport-color { border: 2px solid var(--blue); background: white; }
.legend .overflow-color { border: 2px solid var(--coral); background: #ff685520; }
.legend .safe-color { border: 2px solid var(--green); background: #b5ff2d55; }
.measurement-bar { display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; border-radius: 13px; color: white; background: var(--ink); }
.measurement-bar > div { padding: 14px 15px; border-right: 1px solid #ffffff26; }
.measurement-bar > div:last-child { border: 0; }
.measurement-bar small { display: block; margin-bottom: 6px; color: #aeb5aa; font: 800 10px var(--mono); }
.measurement-bar strong { font: 900 13px var(--mono); }
.measurement-bar .fail { color: var(--coral); }
.measurement-bar .pass { color: var(--lime); }
.measurement-bar .contained { color: var(--yellow); }

.inspector { min-width: 0; color: white; background: #20231e; }
.inspector header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 22px 18px; border-bottom: 1px solid #44473f; }
.inspector header p { margin-bottom: 6px; color: #a8afa4; }
.inspector header code { font-size: 13px; font-weight: 900; overflow-wrap: anywhere; }
.inspector header span { padding: 8px 9px; border-radius: 20px; background: var(--coral); font: 900 10px var(--mono); }
.inspector header span.pass { color: var(--ink); background: var(--lime); }
.inspector header span.contained { color: var(--ink); background: var(--yellow); }
.inspector dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-bottom: 1px solid #44473f; }
.inspector dl div { padding: 15px 10px; }
.inspector dl div + div { border-left: 1px solid #44473f; }
.inspector dt { color: #a8afa4; font: 800 10px var(--mono); letter-spacing: .08em; }
.inspector dd { margin: 7px 0 0; color: var(--lime); font: 900 11px var(--mono); }
.result-explanation, .culprits, .fix-code { padding: 20px 18px; border-bottom: 1px solid #44473f; }
.result-explanation > p, .culprits > p, .fix-code > p { color: #a8afa4; }
.result-explanation strong, .fix-code strong { display: block; color: var(--lime); font-size: 15px; line-height: 1.45; }
.result-explanation span { display: block; margin-top: 9px; color: #c5c9c2; font-size: 10px; line-height: 1.75; }
.culprits div { display: grid; gap: 7px; }
.culprits code { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid #4a5045; border-radius: 8px; color: white; background: #11130f; font-size: 10px; }
.culprits code b { color: var(--coral); }
.culprits code.safe b { color: var(--lime); }
.fix-code pre { max-height: 220px; margin: 13px 0 10px; padding: 13px; overflow: auto; border: 1px solid #4a5045; border-radius: 11px; color: #d5ff94; background: #11130f; white-space: pre-wrap; font-size: 10px; line-height: 1.65; }
.fix-code button { width: 100%; border-color: var(--lime); color: var(--ink); background: var(--lime); }
.inspector-note { margin: 0; padding: 18px; color: #b6bbb2; font-size: 10px; line-height: 1.75; }

.notes-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; margin-top: 22px; }
.notes-grid .section-heading { padding: 18px; }
.notes-grid h2 { font-size: 23px; }
.zoom-diagram { display: grid; grid-template-columns: 1fr auto .62fr; align-items: center; gap: 22px; padding: 28px; }
.zoom-diagram > b { font: 900 22px var(--mono); }
.wide-screen, .narrow-screen { position: relative; display: grid; min-height: 150px; align-content: start; padding: 17px; overflow: hidden; border: 2px solid var(--ink); border-radius: 15px; background: #f1eee5; }
.narrow-screen { background: var(--lime); }
.wide-screen span, .narrow-screen span { font: 900 9px var(--mono); }
.wide-screen strong, .narrow-screen strong { margin-top: 7px; font-size: 25px; }
.wide-screen i, .narrow-screen i { height: 14px; margin-top: 10px; border-radius: 4px; background: var(--blue); }
.wide-screen i:nth-of-type(2) { width: 80%; }.wide-screen i:nth-of-type(3) { width: 58%; }.wide-screen i:nth-of-type(4) { width: 90%; }
.narrow-screen i { width: 100%; height: 65px; background: var(--surface); border: 2px solid var(--ink); }
.guide-copy { margin: 0; padding: 0 28px 27px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.take-code { padding: 21px; }
.take-code pre { margin: 0; padding: 18px; overflow: auto; border-radius: 13px; color: #c8ff78; background: #20231e; font-size: 11px; line-height: 1.65; }
.take-code p { margin: 16px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.standards { margin-top: 22px; }
.standards-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.standards-grid article { padding: 25px; border-right: 1px solid var(--line); }
.standards-grid article:last-child { border: 0; }
.standard-label { display: inline-flex; padding: 7px 10px; border-radius: 20px; color: white; background: var(--blue); font: 900 10px var(--mono); }
.standard-label.exception { color: var(--ink); background: var(--yellow); }
.standards-grid strong { display: block; margin-top: 14px; font-size: 17px; }
.standards-grid p { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.standard-link { display: block; padding: 19px 25px; border-top: 1px solid var(--line); color: var(--green); font-size: 11px; font-weight: 900; }
.cautions { margin-top: 22px; padding: 30px 24px; border-radius: 22px; background: #e7e3da; }
.cautions h2 { margin: 0 0 12px; font-size: 22px; }
.cautions p { max-width: 1280px; margin: 10px 0 0; font-size: 13px; line-height: 1.9; }
.page-footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px 4px; color: var(--muted); font: 800 11px var(--mono); }
.page-footer a { margin-left: 20px; color: var(--green); }
.toast { position: fixed; bottom: 22px; left: 50%; z-index: 10; display: none; max-width: 90vw; padding: 14px 22px; translate: -50% 0; border-radius: 12px; color: white; background: var(--ink); box-shadow: 0 6px 30px #0003; font-size: 13px; }
.toast.visible { display: block; }

@media (max-width: 1350px) {
  .page { width: calc(100% - 32px); }
  .lab-grid { grid-template-columns: 235px minmax(500px, 1fr) 280px; }
  .controls section { padding: 18px 14px; }
  .workspace { padding: 14px; }
  .inspector header, .result-explanation, .culprits, .fix-code { padding-right: 14px; padding-left: 14px; }
}

@media (max-width: 1050px) {
  .hero { flex-wrap: wrap; }
  .hero-actions { margin-left: auto; }
  .lab-grid { grid-template-columns: 230px minmax(0, 1fr); }
  .inspector { display: grid; grid-column: 1 / -1; grid-template-columns: 1fr 1fr 1.1fr 1.3fr 1.5fr; }
  .inspector header, .inspector dl, .result-explanation, .culprits, .fix-code { border-bottom: 0; }
  .inspector dl { border-right: 1px solid #44473f; border-left: 1px solid #44473f; }
  .inspector-note { display: none; }
  .notes-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .page { width: calc(100% - 24px); padding-top: 20px; }
  .hero { padding: 8px 6px 22px; }
  .hero-actions button { min-height: 42px; }
  .eyebrow { font-size: 10px; }
  h1 { white-space: normal; font-size: clamp(34px, 11.5vw, 54px); }
  .section-heading { gap: 10px; padding: 16px 14px; }
  .section-heading h2 { font-size: 21px; }
  .section-heading p { font-size: 10px; }
  .number { width: 40px; height: 44px; border-radius: 12px; }
  .heading-badges span { display: none; }
  .heading-badges b { padding: 8px; font-size: 10px; }
  .lab-grid { display: block; }
  .controls { display: grid; grid-template-columns: 1fr 1fr; border-right: 0; }
  .controls section { padding: 16px 12px; }
  .controls section:first-child, .controls section:last-child { grid-column: 1 / -1; }
  .controls section:nth-child(2) { border-right: 1px solid var(--line); }
  .controls h3 { margin-bottom: 10px; font-size: 14px; }
  .scenario-list { grid-template-columns: 1fr 1fr; }
  .scenario-list button { padding: 9px 7px; }
  .scenario-list small { display: none; }
  .zoom-list { grid-template-columns: 1fr; }
  .zoom-list button { display: flex; justify-content: space-between; }
  .zoom-list small { margin: 0; }
  .zoom-equation { flex-wrap: wrap; }
  .workspace { padding: 11px; }
  .instruction p { font-size: 10px; }
  .browser-bar { padding: 0 10px; }
  .native { display: none; }
  .preview-stage { min-height: 580px; padding: 15px 8px 50px; }
  .viewport-ruler { right: 9px; left: 9px; }
  .legend { gap: 9px; }
  .measurement-bar { grid-template-columns: 1fr 1fr; }
  .measurement-bar > div:nth-child(2) { border-right: 0; }
  .measurement-bar > div:nth-child(-n + 2) { border-bottom: 1px solid #ffffff26; }
  .inspector { display: block; }
  .inspector dl { border-right: 0; border-bottom: 1px solid #44473f; border-left: 0; }
  .zoom-diagram { grid-template-columns: 1fr; gap: 12px; padding: 20px; }
  .zoom-diagram > b { text-align: center; }
  .standards-grid { display: block; }
  .standards-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .page-footer { flex-wrap: wrap; }
  .page-footer a { margin: 0 14px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
