:root {
  --ink: #132d43; --muted: #64798a; --brand: #00629b; --blue-soft: #e9f3f9;
  --green: #3c8766; --green-soft: #eef7f1; --amber: #a57635; --amber-soft: #fbf4e9;
  --border: #dce5eb; --paper: #fff; --bg: #f5f8fa; --red: #b55252;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: var(--ink); background: var(--bg); font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4,p { margin: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible, summary:focus-visible { outline: 3px solid #78b5d5; outline-offset: 4px; }
button:disabled { opacity: .45; cursor: default; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 12px 20px; background: white; z-index: 20; }
.skip-link:focus { top: 12px; }
.topbar { max-width: 1440px; margin: auto; min-height: 76px; padding: 0 48px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); gap: 20px; }
.library-link { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 12px; }
.library-link span { font-size: 18px; }
.wordmark { color: var(--ink); font-weight: 750; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.wordmark > span:last-child { font-size: 10px; font-weight: 500; letter-spacing: .12em; color: var(--muted); border-left: 1px solid #cbd8e1; padding-left: 10px; }
.brand-glyph { display: flex; gap: 3px; align-items: end; height: 19px; }
.brand-glyph i { display: block; width: 4px; height: 14px; background: var(--brand); border-radius: 1px; }
.brand-glyph i:nth-child(2) { height: 19px; }
.brand-glyph i:nth-child(3) { height: 10px; background: var(--green); }
.top-note { color: var(--muted); font-size: 12px; }
main { max-width: 1440px; padding: 0 48px; margin: auto; }
.hero { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(280px, .8fr); gap: 60px; padding: 58px 0 52px; align-items: center; }
.eyebrow { display: block; font-size: 10px; letter-spacing: .11em; font-weight: 700; color: var(--muted); line-height: 1.5; }
.hero .eyebrow { color: #47718c; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
h1 { font-size: clamp(36px, 4.25vw, 62px); letter-spacing: -.055em; line-height: 1.07; font-weight: 650; margin: 17px 0 21px; }
h1 span { color: var(--brand); }
.hero-copy > p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.8; max-width: 640px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 19px; margin-top: 25px; color: #6c8191; font-size: 10px; }
.hero-meta span + span:before { content: "·"; margin-right: 19px; }
.hero-art { padding: 17px 19px; background: linear-gradient(150deg, #f5f9fc, #edf5f3); border: 1px solid #dfE9eb; border-radius: 18px; transform: rotate(-1deg); }
.art-caption { text-align: center; color: #788b99; font-size: 8px; letter-spacing: .11em; margin-bottom: 7px; }
.hero-art svg { width: 100%; display: block; }
.art-foot { display: flex; justify-content: center; gap: 12px; color: #5e7f83; font-size: 10px; padding-top: 8px; }
.art-foot span + span:before { content: "/"; margin-right: 12px; opacity: .4; }
.learning-layout { display: grid; grid-template-columns: 211px minmax(0, 1fr); gap: 38px; align-items: start; padding-top: 30px; border-top: 1px solid var(--border); }
.lesson-sidebar { position: sticky; top: 24px; }
.sidebar-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.sidebar-heading > span:last-child { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.progress-track { height: 3px; background: #e1e9ee; margin: 11px 0 24px; border-radius: 5px; overflow: hidden; }
.progress-track > span { height: 100%; background: var(--green); width: 0; display: block; transition: width .4s ease; }
.nav-group { margin: 21px 0 9px 10px; font-size: 8px; color: #8a9ba8; letter-spacing: .1em; font-weight: 650; }
.lesson-link { display: flex; gap: 10px; align-items: center; padding: 12px 10px; margin: 3px 0; border: 1px solid transparent; border-radius: 9px; color: #456075; transition: background .18s ease; }
.lesson-link:hover { background: #ecf2f6; text-decoration: none; }
.lesson-link.active { background: #e8f1f7; border-color: #cddfea; color: var(--brand); }
.lesson-index { display: grid; place-items: center; width: 25px; height: 28px; flex-shrink: 0; font-size: 10px; font-variant-numeric: tabular-nums; color: #8797a3; }
.active .lesson-index { color: var(--brand); }
.lesson-index.checked { color: var(--green); }
.lesson-link strong { display: block; font-size: 11px; line-height: 1.45; font-weight: 650; }
.lesson-link small { display: block; font-size: 9px; color: #7b8e9e; line-height: 1.5; margin-top: 3px; }
.sidebar-note { margin-top: 30px; padding: 20px 10px 0; border-top: 1px solid var(--border); }
.small-glyph { font-size: 22px; color: #8fadb5; }
.sidebar-note p { font-size: 10px; line-height: 1.8; color: #8a9ba8; margin-top: 10px; }
.lesson-column { min-width: 0; }
#lesson { scroll-margin-top: 24px; outline: none; }
.lesson-meta { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 0 0 10px; }
.lesson-meta > span:last-child { font-size: 10px; color: #91a0ac; }
.lesson-heading h2 { font-size: clamp(25px, 2.5vw, 34px); letter-spacing: -.035em; font-weight: 650; line-height: 1.2; }
.lesson-heading > p { font-size: 13px; line-height: 1.8; max-width: 770px; color: var(--muted); margin: 13px 0 25px; }
.paper { background: var(--paper); border: 1px solid var(--border); border-radius: 15px; box-shadow: 0 5px 20px #17395103; padding: 23px; min-width: 0; }
.experiment-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 19px; }
.experiment-title h3 { margin-top: 5px; font-size: 17px; letter-spacing: -.025em; font-weight: 650; }
.experiment-title .eyebrow { font-size: 8px; letter-spacing: .08em; color: #8395a1; }
.day-badge { border: 1px solid var(--border); padding: 7px 11px; border-radius: 7px; background: #fafcfd; font-size: 11px; color: #4b667b; white-space: nowrap; font-variant-numeric: tabular-nums; }
.neutral-badge { font-size: 9px; color: #7a8d9d; }
.playbar { display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.button-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.button { min-height: 38px; border: 1px solid #cfdee7; border-radius: 7px; padding: 8px 12px; font-size: 11px; font-weight: 600; background: white; color: #36576e; transition: background .15s ease, transform .15s ease; }
.button:hover { background: #f0f6fa; transform: translateY(-1px); }
.button.primary { background: var(--brand); border-color: var(--brand); color: white; }
.button.primary:hover { background: #075682; }
.icon-button { width: 38px; font-size: 18px; padding: 3px; }
.preset-buttons { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { min-height: 30px; border: 1px solid var(--border); border-radius: 20px; background: white; color: #6f8393; padding: 5px 10px; font-size: 9px; }
.chip:hover, .chip.active { border-color: #8eb5cb; color: var(--brand); background: #f0f7fb; }
.control-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; margin: 21px 0; }
.control-grid.two-controls { grid-template-columns: repeat(2, minmax(0,1fr)); }
.range-control { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.range-control > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #698093; font-size: 10px; line-height: 1.5; }
.range-control output { font-weight: 650; color: #315570; font-variant-numeric: tabular-nums; white-space: nowrap; }
input[type=range] { width: 100%; height: 17px; accent-color: var(--brand); margin: 0; cursor: pointer; }
.select-control { display: grid; gap: 7px; color: #698093; font-size: 10px; align-content: start; }
select { border: 1px solid var(--border); border-radius: 6px; color: #315570; background: white; font-size: 10px; padding: 7px 20px 7px 7px; max-width: 100%; min-height: 32px; }
.advanced-controls { border-top: 1px solid #e7edf2; margin: 18px 0 20px; }
.advanced-controls summary { list-style: none; padding: 12px 0 0; font-size: 10px; color: #708899; cursor: pointer; display: flex; justify-content: space-between; }
.advanced-controls summary::-webkit-details-marker { display: none; }
.advanced-controls[open] summary span { transform: rotate(45deg); }
.advanced-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; margin: 19px 0 12px; }
fieldset { padding: 0; margin: 0; border: none; min-width: 0; }
legend { color: #385a72; font-size: 10px; font-weight: 600; margin-bottom: 15px; }
fieldset .range-control { margin-bottom: 13px; }
fieldset p { font-size: 9px; color: #7b90a0; line-height: 1.6; margin-bottom: 12px; }
.settings-note { font-size: 9px; color: #8698a5; line-height: 1.65; margin-top: 9px; }
.factory-comparison { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; margin-top: 20px; }
.factory-card { padding: 14px 12px 10px; border-radius: 11px; background: #fdfbf7; border: 1px solid #eadfce; min-width: 0; }
.pull-card { background: #f8fcf9; border-color: #d1e4d8; }
.factory-card header { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.mode-pill { display: inline-block; background: #f6e9d5; color: #9a713b; font-size: 8px; letter-spacing: .09em; font-weight: 700; border-radius: 4px; padding: 4px 7px; white-space: nowrap; }
.pull-card .mode-pill { color: #438061; background: #e3f1e8; }
.factory-card header > span:last-child { font-size: 9px; color: #7c8d99; }
.factory-svg { display: block; width: 100%; margin: 13px 0 3px; overflow: visible; }
.factory-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding-top: 9px; border-top: 1px solid #e4e9e7; }
.metric { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.metric > span { font-size: 9px; color: #768b9a; line-height: 1.4; }
.metric strong { color: #244962; font-weight: 600; font-size: 25px; letter-spacing: -.04em; margin: 5px 0 1px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.metric small { color: #91a0aa; font-size: 8px; line-height: 1.5; }
.factory-metrics .metric strong { font-size: 25px; }
.factory-trend { margin-top: 16px; display: grid; grid-template-columns: 80px 1fr; gap: 8px; align-items: center; border-top: 1px solid #e8ece8; padding-top: 8px; }
.factory-trend > span { font-size: 8px; color: #899aA6; line-height: 1.6; }
.factory-trend svg { width: 100%; }
.trend-chart { min-width: 0; }
.trend-chart small { display: block; text-align: right; font-size: 9px; color: #64798a; }
.comparison-insight { display: flex; align-items: center; min-height: 46px; margin-top: 16px; padding: 11px 14px; background: #f0f6fa; border-left: 2px solid #80acc4; border-radius: 0 7px 7px 0; font-size: 11px; line-height: 1.65; color: #53738a; }
.comparison-insight.attention { background: #fcf6ed; color: #936f3d; border-color: #d4aa6b; }
.model-note { margin-top: 14px; font-size: 9px; color: #8495a2; }
.model-note summary { cursor: pointer; }
.model-note p { margin-top: 8px; line-height: 1.75; max-width: 780px; }
.try-it { display: flex; gap: 18px; align-items: flex-start; margin: 18px 0 26px; padding: 14px 2px; }
.try-it > span { font-size: 8px; letter-spacing: .09em; border: 1px solid #cbdde7; border-radius: 4px; padding: 4px 7px; white-space: nowrap; color: #517992; font-weight: 650; }
.try-it p { color: #6a8294; font-size: 11px; line-height: 1.75; }
.try-it strong { font-weight: 600; color: #3b5e74; }
.concept-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 24px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.concept-notes .eyebrow { font-size: 8px; color: #6b8b9d; }
.concept-notes p { color: #718593; font-size: 11px; line-height: 1.8; margin-top: 9px; }
.knowledge-check { margin-top: 30px; padding: 23px; background: #edf4f7; border: 1px solid #dce6ed; border-radius: 11px; }
.check-heading { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-bottom: 12px; }
.check-heading .eyebrow { font-size: 8px; color: #5c8096; }
.completion-badge { color: #8398a5; font-size: 9px; }
.knowledge-check h3 { font-size: 13px; font-weight: 600; line-height: 1.7; }
.answer-options { display: flex; gap: 8px; margin-top: 16px; }
.answer-options button { flex: 1; display: flex; gap: 9px; align-items: center; text-align: left; background: white; border: 1px solid #d5e1e9; border-radius: 7px; padding: 11px; min-height: 49px; font-size: 10px; color: #577388; line-height: 1.5; }
.answer-options button > span { display: grid; place-items: center; font-size: 8px; border: 1px solid #e1e9ee; border-radius: 3px; width: 18px; height: 18px; flex-shrink: 0; }
.answer-options button:hover { border-color: #80b1cc; }
.answer-options button.correct { background: #edf8ef; border-color: #85b899; color: #3f7956; }
.answer-options button.incorrect { background: #fff6ec; border-color: #d8ba8e; }
.answer-feedback { font-size: 11px; color: #668394; line-height: 1.75; }
.answer-feedback:not(:empty) { margin-top: 15px; }
.answer-feedback.success { color: #3d7b59; }
.answer-feedback.retry { color: #987241; }
.lesson-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 23px 0 46px; font-size: 10px; }
.lesson-footer > a:first-child { color: #8a9eab; }
.next-lesson { font-weight: 600; }
.next-lesson span { padding-left: 9px; }
.site-footer { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 25px 0 35px; border-top: 1px solid var(--border); font-size: 10px; color: #8ba0af; }
.site-footer a { color: #668399; }
.metrics-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; border-top: 1px solid #e5edf2; padding-top: 19px; margin-top: 23px; }

.supermarket-scene { display: grid; grid-template-columns: 185px 1fr; gap: 22px; margin: 24px 0; align-items: center; }
.supplier-card { text-align: center; padding: 22px 16px; border: 1px dashed #b9cdd9; border-radius: 12px; background: #f9fbfc; }
.large-icon { display: inline-block; font-size: 36px; color: #6395a9; line-height: 1; margin-bottom: 14px; }
.supplier-card h4 { font-size: 12px; font-weight: 600; }
.supplier-card p { color: #8398a6; font-size: 10px; line-height: 1.7; margin: 10px 0 16px; }
.supplier-card .mode-pill { color: #4d876b; background: #e6f4eb; }
.shelf-card { min-width: 0; border: 1px solid #d4e3dc; background: #f6faf7; border-radius: 12px; padding: 20px; }
.shelf-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 18px; }
.shelf-heading > span { font-size: 8px; letter-spacing: .09em; color: #7d9a89; }
.shelf-heading strong { font-size: 11px; font-weight: 600; color: #4c7f62; }
.shelf { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; padding-bottom: 8px; border-bottom: 4px solid #b9cebf; }
.shelf-slot { min-height: 82px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; border: 1px dashed #bfd3c6; border-radius: 6px; color: #96ae9d; }
.shelf-slot > span:last-child { font-size: 7px; letter-spacing: .04em; }
.shelf-slot.filled { background: #fff; border: 1px solid #cbddd2; color: #698e79; }
.lamp-product { display: block; position: relative; width: 30px; height: 33px; }
.lamp-product:before { content: ""; position: absolute; width: 28px; height: 13px; border-radius: 18px 18px 3px 3px; left: 1px; top: 0; background: #73a58b; }
.lamp-product:after { content: ""; position: absolute; height: 17px; width: 3px; background: #487d62; left: 13px; top: 12px; }
.lamp-product i { position: absolute; bottom: 0; left: 5px; right: 5px; height: 4px; border-radius: 4px 4px 1px 1px; background: #487d62; }
.empty-slot { font-size: 26px; line-height: 33px; font-weight: 300; }
.shelf-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px; color: #93a79b; font-size: 8px; margin-top: 12px; }
.kanban-row { margin-top: 24px; display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; }
.kanban-row .eyebrow { font-size: 8px; }
.kanban-row p { font-size: 9px; line-height: 1.7; color: #8c9eaa; margin-top: 5px; }
.kanbans { display: flex; flex-wrap: wrap; gap: 7px; }
.kanban { display: flex; flex-direction: column; min-width: 70px; padding: 9px; gap: 4px; border: 1px solid #bed7cb; border-top: 3px solid #72a98c; border-radius: 5px; background: #f7fcf9; }
.kanban span { font-size: 7px; letter-spacing: .1em; color: #729b83; }
.kanban strong { font-size: 11px; color: #4b7d60; }
.kanban small { font-size: 8px; color: #8fa89a; }
.empty-note { color: #8da29a; }

.takt-formula { display: flex; align-items: center; justify-content: space-between; background: #f2f7fa; padding: 21px 26px; border: 1px solid #e1eaf0; border-radius: 10px; margin: 24px 0; gap: 18px; }
.takt-formula > div { display: flex; flex-direction: column; gap: 6px; }
.takt-formula span { color: #7c95a5; font-size: 10px; }
.takt-formula strong { font-size: 25px; font-weight: 550; letter-spacing: -.035em; }
.takt-formula small { font-size: 10px; color: #7290a3; letter-spacing: 0; font-weight: 400; }
.takt-formula > b { font-size: 23px; color: #b4c7d3; font-weight: 400; }
.takt-answer strong { color: var(--brand); }
.takt-lab { display: grid; grid-template-columns: 185px minmax(0,1fr); gap: 38px; margin: 27px 0; }
.cycle-controls .eyebrow { font-size: 8px; margin-bottom: 19px; }
.cycle-controls .range-control { margin-top: 16px; }
.chart-key { display: flex; gap: 13px; font-size: 9px; color: #879cab; margin-bottom: 30px; }
.chart-key > span { display: inline-flex; align-items: center; gap: 5px; }
.key-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; }
.key-dot.green { background: #66a487; } .key-dot.coral { background: #c7897e; } .key-dot.blue { background: #4c8aa9; }
.cycle-bars { position: relative; padding: 0; }
.cycle-row { position: relative; height: 38px; margin: 10px 0; background: #f4f7f9; border-radius: 5px; }
.cycle-bar { height: 100%; background: #dceee3; border-radius: 5px; color: #4a8060; transition: width .2s ease; }
.cycle-bar.over { background: #f1e0d8; color: #a67260; }
.cycle-bar span, .cycle-bar strong { position: absolute; top: 50%; transform: translateY(-50%); font-size: 11px; }
.cycle-bar span { left: 10px; } .cycle-bar strong { right: 10px; font-weight: 600; }
.takt-line { position: absolute; top: -10px; bottom: -5px; width: 1px; border-left: 1.5px dashed #487b9c; z-index: 1; transition: left .2s ease; }
.takt-line span { position: absolute; top: -14px; left: -27px; color: #537f9a; font-size: 8px; white-space: nowrap; }
.chart-axis { display: flex; justify-content: space-between; color: #94a5b1; font-size: 8px; margin-top: 16px; }

.matrix-scroll { overflow-x: auto; border: 1px solid #e1eaf0; border-radius: 9px; }
.family-matrix { width: 100%; border-collapse: collapse; min-width: 550px; }
.family-matrix th, .family-matrix td { padding: 14px 10px; border-bottom: 1px solid #eaf0f4; text-align: center; }
.family-matrix th:first-child { text-align: left; }
.family-matrix thead th { color: #7790a2; font-size: 9px; font-weight: 500; background: #f7fafc; }
.family-matrix tr:last-child td, .family-matrix tr:last-child th { border-bottom: none; }
.family-matrix tbody tr.selected { background: #edf5fa; }
.family-matrix tr[data-family=lamps] { box-shadow: inset 3px 0 #4a8baa; }
.family-matrix tr[data-family=shelves] { box-shadow: inset 3px 0 #b9925e; }
.family-matrix tr[data-family=kits] { box-shadow: inset 3px 0 #76a791; }
.product-select { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.product-select input { width: 15px; height: 15px; accent-color: var(--brand); flex-shrink: 0; }
.product-select strong { font-size: 11px; color: #4d6b81; font-weight: 550; }
.product-select small { display: block; color: #91a3b0; font-size: 8px; font-weight: 400; margin-top: 3px; }
.route-dot { color: #82a8bc; font-size: 14px; }
.selected .route-dot { color: var(--brand); }
.no-route { color: #d1dde4; font-size: 12px; }
.matrix-key { display: flex; justify-content: space-between; color: #8a9eac; font-size: 9px; margin-top: 13px; }
.matrix-key i { margin-right: 5px; }
.family-result { display: flex; gap: 16px; align-items: flex-start; border-top: 1px solid #e4edf3; padding-top: 22px; margin-top: 22px; }
.result-icon { display: grid; place-items: center; background: #ecf4f9; color: #56809b; width: 40px; height: 40px; flex-shrink: 0; border-radius: 9px; font-size: 19px; }
.result-icon.positive { color: #4c8566; background: #eef8f2; }
.result-icon.warning { color: #a9804d; background: #fbf5ec; }
.family-result h4 { font-size: 13px; font-weight: 600; line-height: 1.6; }
.family-result p { font-size: 11px; line-height: 1.8; color: #7b92a2; margin: 6px 0; }
.family-result small { font-size: 9px; color: #8da1ae; line-height: 1.7; display: block; }
.route-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 11px 0; }
.route-tags span { font-size: 9px; padding: 5px 9px; border: 1px solid #cee0ea; border-radius: 5px; color: #7193a8; }

.batch-toolbar { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; margin: 26px 0; }
.batch-lane { margin: 19px 0; }
.batch-svg { width: 100%; display: block; }
.timeline-control { background: #f4f8fa; border-radius: 9px; padding: 16px 20px; margin-top: 25px; }
.segmented { display: flex; padding: 3px; border: 1px solid #d9e4ec; background: #f5f8fa; border-radius: 7px; gap: 3px; }
.segmented button { border: none; padding: 7px 10px; border-radius: 5px; font-size: 10px; color: #7e95a4; background: transparent; }
.segmented button.active { background: white; color: var(--brand); box-shadow: 0 1px 4px #203e5012; }
.map-layers { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.stream-svg { width: 100%; display: block; }
.stream-svg g { transition: opacity .2s ease; }

/* Keep instructional copy comfortably readable without flattening the hierarchy. */
.lesson-heading > p { font-size: 14px; }
.comparison-insight, .try-it p, .concept-notes p, .answer-feedback, .family-result p { font-size: 13px; color: #536d80; }
.settings-note, .model-note, fieldset p, .family-result small { font-size: 11px; color: #64798a; }
.range-control > span, .select-control, select, .advanced-controls summary, .button { font-size: 12px; }
.button { min-height: 42px; }
.chip { min-height: 34px; font-size: 11px; }
.answer-options button { font-size: 12px; }
.knowledge-check h3 { font-size: 15px; }
.metric > span { font-size: 11px; color: #617b8e; }
.metric small { font-size: 10px; color: #6d8291; }
.lesson-link strong { font-size: 12px; }
.lesson-link small, .completion-badge, .lesson-footer { font-size: 11px; color: #64798a; }
.supplier-card p, .kanban-row p, .family-matrix thead th, .matrix-key { font-size: 11px; color: #64798a; }
.product-select strong { font-size: 12px; }
.product-select small { font-size: 10px; color: #6d8291; }
.experiment-title .eyebrow, .concept-notes .eyebrow, .check-heading .eyebrow { color: #5f7d90; font-size: 9px; }

@media (min-width: 1550px) { .hero { padding-top: 70px; padding-bottom: 62px; } }
@media (max-width: 1150px) {
  main, .topbar { padding-left: 28px; padding-right: 28px; }
  .learning-layout { grid-template-columns: 185px minmax(0,1fr); gap: 25px; }
  .hero { gap: 30px; }
  .paper { padding: 19px; }
  .factory-comparison { grid-template-columns: 1fr; }
  .factory-svg { max-height: 215px; }
  .factory-trend { grid-template-columns: 90px 1fr; }
  .factory-trend svg { max-height: 50px; }
  .answer-options { flex-direction: column; }
  .supermarket-scene { grid-template-columns: 140px 1fr; gap: 13px; }
  .shelf { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .takt-lab { grid-template-columns: 150px minmax(0,1fr); gap: 23px; }
  .metrics-strip { gap: 10px; }
}
@media (max-width: 780px) {
  .topbar { min-height: 63px; padding: 0 20px; }
  .top-note { display: none; }
  main { padding: 0 20px; }
  .hero { grid-template-columns: 1fr; padding: 36px 0 30px; gap: 0; }
  .hero-art { display: none; }
  .hero .eyebrow { font-size: 8px; }
  .hero-meta { gap: 12px; font-size: 9px; margin-top: 20px; }
  .hero-meta span + span:before { margin-right: 12px; }
  .hero-copy > p:not(.eyebrow) { font-size: 13px; }
  .wide-only { display: none; }
  .learning-layout { display: block; padding-top: 20px; }
  .lesson-sidebar { position: static; margin-bottom: 25px; }
  .sidebar-heading { margin-bottom: 8px; }
  .progress-track { margin: 0 0 14px; }
  #lessonNav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
  .nav-group, .sidebar-note { display: none; }
  .lesson-link { padding: 9px 6px; margin: 0; gap: 3px; background: #fff8; border-color: #e1e9ee; align-items: flex-start; }
  .lesson-index { width: 19px; height: 20px; font-size: 8px; }
  .lesson-link strong { font-size: 11px; }
  .lesson-link small { display: none; }
  .lesson-meta > span:last-child { font-size: 9px; }
  .lesson-meta .eyebrow { font-size: 8px; }
  .lesson-heading > p { font-size: 14px; }
  .factory-comparison { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .factory-card header { align-items: flex-start; flex-direction: column; }
  .factory-trend { display: block; }
  .factory-metrics .metric strong { font-size: 20px; }
  .factory-metrics .metric small { font-size: 9px; }
  .site-footer { flex-wrap: wrap; line-height: 1.7; }
  .site-footer > span { display: none; }
}
@media (max-width: 580px) {
  main { padding: 0 16px; }
  .topbar { padding: 0 16px; }
  .library-link { font-size: 10px; gap: 6px; }
  .wordmark { font-size: 12px; }
  .wordmark > span:last-child { display: none; }
  h1 { font-size: 42px; }
  .hero-meta span:last-child { flex-basis: 100%; }
  .hero-meta span:last-child:before { content: none; }
  .hero-meta { row-gap: 7px; }
  .paper { padding: 16px; }
  .experiment-title { align-items: flex-start; gap: 12px; }
  .experiment-title h3 { font-size: 15px; }
  .experiment-title .eyebrow { font-size: 7px; }
  .day-badge { font-size: 9px; padding: 6px 8px; }
  .control-grid, .control-grid.two-controls { grid-template-columns: 1fr; gap: 18px; }
  .main-controls { grid-template-columns: 1fr 1fr; }
  .main-controls .select-control { grid-column: 1 / -1; }
  .range-control > span { font-size: 12px; }
  input[type=range] { height: 25px; }
  .advanced-grid { grid-template-columns: 1fr; gap: 22px; }
  .factory-comparison { grid-template-columns: 1fr; }
  .factory-card { padding: 13px; }
  .factory-card header { flex-direction: row; }
  .factory-svg { margin-top: 17px; }
  .factory-metrics .metric strong { font-size: 27px; }
  .factory-trend { display: grid; grid-template-columns: 95px 1fr; }
  .factory-trend svg { max-height: 50px; }
  .concept-notes { grid-template-columns: 1fr; gap: 22px; }
  .knowledge-check { padding: 17px; }
  .check-heading { align-items: flex-start; }
  .completion-badge { font-size: 8px; }
  .lesson-footer { flex-direction: column; align-items: stretch; gap: 20px; }
  .next-lesson { align-self: flex-end; }
  .supermarket-scene { grid-template-columns: 1fr; }
  .supplier-card { padding: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; text-align: left; }
  .supplier-card .large-icon { margin: 0; font-size: 24px; }
  .supplier-card p { display: none; }
  .supplier-card .mode-pill { margin-left: auto; }
  .shelf-card { padding: 15px; }
  .shelf { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .shelf-heading { align-items: flex-start; }
  .shelf-heading > span { font-size: 7px; max-width: 100px; }
  .shelf-heading strong { font-size: 10px; }
  .kanban-row { grid-template-columns: 1fr; gap: 12px; }
  .metrics-strip { grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 20px; }
  .takt-formula { padding: 14px; gap: 10px; }
  .takt-formula strong { font-size: 20px; }
  .takt-formula span { font-size: 8px; }
  .takt-formula small { font-size: 8px; display: block; }
  .takt-formula > b { font-size: 16px; }
  .takt-lab { grid-template-columns: 1fr; }
  .cycle-controls .range-control { margin-top: 16px; }
  .takt-chart { padding-top: 12px; }
  .neutral-badge { display: none; }
  .matrix-scroll { margin-left: -6px; margin-right: -6px; }
  .family-matrix { min-width: 515px; }
  .family-matrix td, .family-matrix th { padding: 13px 8px; }
  .matrix-key { font-size: 8px; }
  .result-icon { width: 31px; height: 31px; }
  .family-result { gap: 12px; }
  .batch-toolbar { grid-template-columns: 1fr; gap: 18px; }
  .batch-svg { min-width: 590px; }
  #batchDiagram { overflow-x: auto; }
  .stream-svg { min-width: 660px; }
  #streamMap { overflow-x: auto; }
  .segmented button { font-size: 9px; padding: 6px 7px; white-space: nowrap; }
  .segmented { flex-shrink: 0; }
  .try-it { gap: 12px; }
  .try-it p { font-size: 13px; }
  .site-footer { font-size: 9px; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .transfer-token { display: none; }
}
