:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #172536;
  background: #f6f5f0;
  font-size: 16px;
  line-height: 1.55;
  --ink: #172536;
  --muted: #536273;
  --line: #dfdfd8;
  --paper: #fff;
  --accent: #a94324;
  --accent-dark: #8e3319;
  --accent-pale: #f7e9e0;
  --baseline: #6c8299;
  --navy: #142337;
  --green: #23624c;
  --green-pale: #e9f3ec;
  --shadow: 0 18px 36px -32px #18283e69;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }
button, a, input, select { touch-action: manipulation; }
:focus-visible { outline: 3px solid #27668e; outline-offset: 4px; }
[hidden] { display: none !important; }
.wrap { max-width: 1276px; margin: auto; padding-inline: 32px; }
.site-header { background: #faf9f5; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand, .source-link, nav a { text-decoration: none; }
.brand { font-size: 1.24rem; font-weight: 750; display: flex; align-items: center; gap: 10px; white-space: nowrap; letter-spacing: -.04em; }
.brand b { color: var(--accent); }
.brand-icon { display: block; flex: 0 0 35px; }
nav { display: flex; gap: 5px; align-items: center; }
nav a, .source-link { padding: 8px 14px; border-radius: 9px; white-space: nowrap; font-size: .93rem; font-weight: 650; color: var(--muted); }
nav a:hover, nav a[aria-current] { background: var(--accent-pale); color: var(--accent-dark); }
.source-link { border: 1px solid var(--line); background: var(--paper); }
main { min-height: calc(100vh - 150px); padding-block: 26px 62px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.55rem, 5.25vw, 5.1rem); font-weight: 760; letter-spacing: -.068em; line-height: .99; margin-bottom: 20px; }
h2 { font-size: clamp(1.45rem, 2.7vw, 2.35rem); letter-spacing: -.046em; line-height: 1.12; margin-bottom: 12px; }
h3 { font-size: 1.23rem; letter-spacing: -.033em; line-height: 1.2; margin-bottom: 8px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--accent-dark); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 760; margin: 0 0 15px; }
.eyebrow span { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.hero { min-height: 500px; display: grid; grid-template-columns: 1.12fr 1fr; background: #faf8f1; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.hero-copy { padding: clamp(26px, 4.3vw, 57px); align-self: center; }
.hero h1 em { display: block; color: var(--accent); font-family: Georgia, serif; font-weight: 500; letter-spacing: -.06em; }
.hero-copy > p:not(.eyebrow) { color: var(--muted); max-width: 445px; font-size: 1.11rem; margin: 0 0 23px; }
.hero-visual { min-height: 330px; display: flex; align-items: flex-end; padding: 27px; background: linear-gradient(155deg, #14233700 25%, #1423378a), url("images/warehouse.webp") center center / cover, var(--navy); }
.hero-score { width: min(100%, 270px); border: 1px solid #fcf8ed59; border-radius: 15px; background: #152337e8; color: #f8f1e8; padding: 16px 20px; box-shadow: 0 10px 40px #0a15263a; }
.hero-score strong { display: block; font-size: 2.65rem; color: #ffd5bb; letter-spacing: -.055em; line-height: 1.1; margin-block: 2px 5px; }
.hero-score span { display: block; font-size: .92rem; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; background: var(--accent); color: white; border: 1px solid transparent; border-radius: 9px; padding: 9px 16px; font-weight: 680; text-decoration: none; cursor: pointer; transition: background .17s ease; }
.button:hover { background: var(--accent-dark); }
.button.secondary { background: white; color: var(--ink); border-color: #caced2; }
.button.secondary:hover { background: #f4f5f7; }
.text-link { color: var(--accent-dark); font-weight: 680; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.intro-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-block: 28px; }
.intro-band > div { display: flex; gap: 12px; align-items: flex-start; }
.intro-band strong { font-weight: 740; }
.intro-band p { margin: .15rem 0 0; color: var(--muted); font-size: .93rem; }
.step-icon { display: grid; place-items: center; flex: 0 0 37px; height: 37px; background: var(--accent-pale); color: var(--accent-dark); border-radius: 11px; font-size: 1.36rem; line-height: 1; }
.section-heading { margin: 37px 0 15px; }
.section-heading p:last-child, .page-heading > p:not(.eyebrow) { max-width: 700px; margin-bottom: 0; color: var(--muted); }
.page-heading { padding-block: 14px 22px; }
.page-heading h1 { font-size: clamp(2.45rem, 5.5vw, 4.5rem); margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-block: 16px; }
.split { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-block: 16px; }
.panel, .metric { padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; min-width: 0; box-shadow: var(--shadow); }
.metric span { display: block; font-size: .88rem; color: var(--muted); }
.metric strong { display: block; font-size: clamp(1.25rem, 2.9vw, 2.15rem); letter-spacing: -.04em; line-height: 1.2; margin-top: 6px; font-variant-numeric: tabular-nums; }
.muted, .caption { color: var(--muted); }
.caption { font-size: .88rem; margin: 9px 0 0; }
.field-title { font-weight: 690; font-size: .9rem; margin: 0 0 7px; }
.capacity-demo { display: grid; align-items: center; grid-template-columns: .85fr 1fr; gap: clamp(20px, 5vw, 68px); padding: clamp(20px, 4vw, 43px); }
.comparison-intro p:not(.eyebrow) { color: var(--muted); }
.segmented { display: inline-flex; gap: 3px; padding: 4px; background: #f2f3f5; border: 1px solid #e4e6e9; border-radius: 10px; }
.segmented button { border: 1px solid transparent; border-radius: 7px; color: var(--muted); min-height: 38px; min-width: 46px; padding: 3px 9px; background: transparent; cursor: pointer; font-size: .9rem; font-weight: 700; }
.segmented button:hover { background: white; }
.segmented button[aria-pressed="true"] { background: var(--navy); color: white; }
.insight { color: var(--green); background: var(--green-pale); padding: 9px 12px; border-radius: 9px; margin: 14px 0 0; font-size: .94rem; font-weight: 650; }
.insight.compact { display: block; }
.warning { background: #fff0df; color: #734324; border: 1px solid #edddc4; border-radius: 10px; padding: 12px 15px; margin-block: 16px; font-size: .93rem; }
.controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.controls.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
label { font-size: .92rem; font-weight: 650; display: block; }
input:not([type=checkbox], [type=range]), select { margin-top: 6px; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #bcc4ce; background: #fff; color: var(--ink); border-radius: 8px; }
input[type=range] { accent-color: var(--accent); margin: 5px 0; min-width: 0; width: 100%; cursor: pointer; }
.capacity-fields { display: grid; grid-template-columns: minmax(0, 1fr) 72px; gap: 10px; align-items: center; }
.capacity-fields input[type=number] { margin: 0; }
.controls .segmented { margin-top: 8px; }
.replay-controls { grid-template-columns: 1fr 1.2fr 1fr; }
.reveal-panel { background: var(--navy); color: #f8f8f7; display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; justify-content: space-between; }
.reveal-panel h2 { font-size: 1.3rem; margin-bottom: 4px; }
.reveal-panel p { color: #d8e1e9; font-size: .95rem; margin: 0; }
.reveal-panel .button { background: #ffd5bb; color: #27272c; }
.reveal-panel .button:hover { background: #ffe1d0; }
.reveal-panel .button[aria-pressed="true"] { background: #ebf2f7; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.toolbar h2, .toolbar h3 { margin-bottom: 0; }
.table-scroll { overflow: auto; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th, td { padding: 11px 10px; border-bottom: 1px solid #e6e8eb; white-space: nowrap; }
th { background: #f2f4f7; color: #34465b; font-size: .85rem; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #faf8f5; }
td small { display: block; color: var(--muted); }
.order-button { background: none; border: 0; padding: 3px 0; font-family: ui-monospace, Consolas, monospace; font-size: .83rem; cursor: pointer; text-underline-offset: 3px; text-decoration: underline; color: var(--accent-dark); }
.risk-cell { min-width: 92px; font-variant-numeric: tabular-nums; }
.risk-meter { display: block; background: #f0ece8; height: 4px; width: 55px; margin-top: 4px; border-radius: 9px; overflow: hidden; }
.risk-meter i { display: block; background: var(--accent); height: 100%; }
.tag { display: inline-block; border-radius: 20px; background: var(--green-pale); color: var(--green); font-weight: 680; padding: 3px 8px; }
.tag.late { background: var(--accent-pale); color: var(--accent-dark); }
.bars { display: grid; gap: 12px; margin-top: 16px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 5px 12px; font-size: .9rem; }
.bar-row strong { font-variant-numeric: tabular-nums; }
.bar-track { grid-column: 1 / -1; background: #eef0f4; height: 8px; border-radius: 8px; overflow: hidden; }
.bar-track i { display: block; background: var(--accent); height: 100%; border-radius: inherit; }
.comparison-bars { gap: 15px; }
.comparison-bars .bar-track { height: 12px; }
.state-bars { gap: 9px; }
.state-bars .bar-row { grid-template-columns: minmax(110px, 1fr) 1.65fr auto; }
.state-bars .bar-row strong { order: 3; }
.state-bars .bar-track { grid-column: auto; }
canvas { width: 100%; height: 215px; display: block; }
.selectable-chart { cursor: pointer; }
.legend { display: flex; flex-wrap: wrap; gap: 7px 16px; font-size: .85rem; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; vertical-align: 1px; margin-right: 5px; border-radius: 50%; }
.chart-select { max-width: 280px; margin-top: 8px; }
.stack > * + * { margin-top: 16px; }
.case-inspection { background: #f4f6fa; border: 1px solid #e4e8ef; border-radius: 12px; padding: 14px 17px; margin-block: 16px; }
.case-inspection p { margin: 4px 0 0; }
.factors { margin: 10px 0 0; padding-left: 20px; }
.touch-hint { display: none; margin-bottom: 7px; }
.heat-table button { border: 1px solid transparent; background: #edf1f5; color: var(--ink); border-radius: 8px; padding: 8px; width: 100%; min-height: 42px; cursor: pointer; }
.heat-table button.positive { background: #e4f1e8; color: #205b47; }
.heat-table button.negative { background: #f9e9df; color: #883a1f; }
.heat-table button[aria-pressed="true"] { border-color: var(--ink); font-weight: 750; }
.site-footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; padding-block: 22px; color: var(--muted); font-size: .89rem; }
.site-footer a { color: var(--ink); text-underline-offset: 3px; }
.loading { padding: 18px 0; color: var(--muted); }
details summary { cursor: pointer; font-weight: 680; }
details p { margin: 12px 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }
@media (max-width: 900px) {
  .hero { min-height: 420px; }
  .hero-score { max-width: 230px; }
  .metrics, .controls.four { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .replay-controls { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .wrap { padding-inline: 20px; }
  .header-inner { flex-wrap: wrap; gap: 8px; padding-block: 12px; }
  .header-inner nav { order: 3; width: 100%; flex-wrap: wrap; }
  nav a { padding: 7px 9px; font-size: .84rem; }
  .hero, .split, .capacity-demo { grid-template-columns: 1fr; }
  .hero-visual { min-height: 260px; padding: 17px; }
  .intro-band { gap: 16px; }
  .intro-band > div { flex-direction: column; gap: 7px; }
  .intro-band .step-icon { flex: none; width: 37px; }
  .touch-hint { display: block; }
}
@media (max-width: 480px) {
  .wrap { padding-inline: 14px; }
  main { padding-top: 15px; }
  .panel, .metric { padding: 16px; }
  .hero { border-radius: 17px; }
  .hero-visual { min-height: 215px; }
  .hero-score { padding: 11px 14px; max-width: 207px; }
  .hero-score strong { font-size: 2rem; }
  .hero-score span { font-size: .85rem; }
  .intro-band, .controls { grid-template-columns: 1fr; }
  .intro-band > div { flex-direction: row; }
  .controls.four { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
  .site-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
