:root {
  color-scheme: light;
  --navy: #102a43;
  --navy-2: #193b59;
  --ink: #172b3a;
  --muted: #64788a;
  --line: #dce5eb;
  --surface: #fff;
  --canvas: #f3f6f8;
  --teal: #087e83;
  --teal-light: #e7f5f4;
  --amber: #805200;
  --amber-bg: #fff4d8;
  --red: #923a2c;
  --red-bg: #fff0ed;
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 15px; line-height: 1.55; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: #06747a; text-underline-offset: 3px; }
a:hover { color: #07545a; }
button { cursor: pointer; }
.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; }
.skip-link { position: absolute; z-index: 99; left: 12px; top: -60px; padding: 10px 14px; background: #fff; color: var(--navy); border-radius: 6px; }
.skip-link:focus { top: 12px; }

.site-header { background: var(--navy); color: #fff; }
.header-inner { max-width: 1240px; min-height: 72px; margin: auto; padding: 0 24px; display: flex; align-items: center; gap: 38px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: white; text-decoration: none; font-size: 17px; font-weight: 750; letter-spacing: -.04em; white-space: nowrap; }
.brand-light { font-weight: 450; color: #c5d5e0; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #18a0a0; color: #fff; font-weight: 800; font-size: 18px; }
.main-nav { flex: 1; display: flex; align-items: center; gap: 26px; }
.main-nav a { color: #d6e0e8; font-size: 13px; font-weight: 580; text-decoration: none; }
.main-nav a:hover { color: #fff; }
.local-badge { display: flex; align-items: center; gap: 8px; color: #cad7e1; font-size: 12px; white-space: nowrap; }
.local-badge span { width: 8px; height: 8px; border-radius: 50%; background: #54d3b1; }

.safety-banner { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; gap: 12px; padding: 12px max(24px, calc((100% - 1192px)/2)); background: #fff0d0; border-bottom: 1px solid #e8c67b; color: #573d0d; box-shadow: 0 3px 12px #16324a12; }
.safety-icon { flex: 0 0 25px; height: 25px; display: grid; place-items: center; border: 2px solid #9a6b10; border-radius: 50%; font-weight: 800; font-size: 14px; }
.safety-banner strong { display: block; font-size: 13px; line-height: 1.4; }
.safety-banner span { display: block; font-size: 12px; line-height: 1.45; }

main { max-width: 1240px; margin: auto; padding: 0 24px 48px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 370px; align-items: center; gap: 54px; padding: 52px 0 44px; }
.eyebrow { margin: 0 0 7px; color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy); }
h1 { max-width: 690px; margin-bottom: 13px; font-size: clamp(35px, 4vw, 48px); line-height: 1.09; letter-spacing: -.055em; }
h1 span { color: var(--teal); }
.hero-copy > p:not(.eyebrow) { max-width: 630px; margin-bottom: 17px; color: #566d80; font-size: 16px; }
.hero-meta { display: flex; align-items: center; gap: 8px; color: #657b8c; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #d39a2e; }
.hero-card { padding: 20px 21px 16px; border: 1px solid #dce7ed; border-radius: 12px; background: #fff; box-shadow: 0 6px 20px #173a5410; }
.hero-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-card-label { color: #708391; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.status-pill { padding: 4px 8px; border-radius: 30px; font-size: 9px; line-height: 1.5; font-weight: 800; letter-spacing: .045em; }
.status-pending, .status-review { background: var(--amber-bg); color: var(--amber); }
.status-blocked { background: var(--red-bg); color: var(--red); }
.hero-card-main { min-height: 50px; padding: 18px 0 15px; color: var(--navy); font-size: 15px; font-weight: 680; line-height: 1.4; }
.hero-card-foot { display: flex; align-items: flex-start; gap: 8px; border-top: 1px solid #e8eef2; padding-top: 11px; color: #758794; font-size: 11px; }
.mini-icon { color: var(--teal); font-size: 16px; line-height: 1; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 6px 0 18px; }
.section-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; padding: 8px 13px; border: 1px solid transparent; border-radius: 7px; font-size: 12px; font-weight: 700; text-decoration: none; transition: background .15s, border-color .15s, transform .15s; }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--teal); color: #fff; }
.button-primary:hover { background: #076c71; color: #fff; }
.button-quiet { border-color: #d5e0e7; background: #fff; color: #365266; }
.button-quiet:hover { border-color: #a9bdca; background: #f8fbfc; }
.button:disabled { opacity: .6; cursor: wait; }
.button-small { min-height: 33px; padding: 5px 10px; font-size: 11px; }
.storage-message { min-height: 0; margin: -10px 0 12px; color: #526b7b; font-size: 12px; }
.storage-message.message-error { color: #923a2c; }

.panel { margin-bottom: 20px; padding: 24px; border: 1px solid #dde6eb; border-radius: var(--radius); background: var(--surface); box-shadow: 0 4px 14px #1e3d5108; scroll-margin-top: 80px; }
.panel-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.section-number { flex: 0 0 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; background: var(--teal-light); color: var(--teal); font-size: 12px; font-weight: 850; }
.panel-heading .eyebrow { margin-bottom: 2px; }
.panel-heading h2 { margin: 0; font-size: 20px; line-height: 1.3; letter-spacing: -.035em; }
.panel-tag { margin-left: auto; padding: 5px 9px; border-radius: 6px; background: #edf2f5; color: #536a7b; font-size: 10px; font-weight: 750; white-space: nowrap; }
.panel-tag-warn { background: var(--amber-bg); color: var(--amber); }
.section-intro { max-width: 920px; margin: 0 0 17px 51px; color: #647989; font-size: 13px; }

.stops-list { display: grid; gap: 9px; }
.stop-row { display: grid; grid-template-columns: 35px minmax(100px, .7fr) minmax(220px, 1.5fr) auto; align-items: center; gap: 10px; }
.stop-index { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #eff5f7; color: #567183; font-size: 11px; font-weight: 800; }
.stop-row:first-child .stop-index, .stop-row:last-child .stop-index { background: var(--teal-light); color: var(--teal); }
.control { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #d8e2e8; border-radius: 6px; background: #fff; color: var(--ink); font-size: 13px; }
.control:focus, .field input:focus, .field select:focus { outline: 3px solid #0b838327; border-color: #0b8383; }
.stop-actions { display: flex; gap: 4px; }
.icon-button { min-width: 31px; min-height: 31px; display: inline-grid; place-items: center; padding: 4px; border: 1px solid #e1e8ec; border-radius: 6px; background: #fff; color: #607789; font-size: 14px; }
.icon-button:hover { background: #f1f7f8; color: var(--teal); }
.icon-button:disabled { opacity: .35; cursor: not-allowed; }
.route-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 13px; }
.consent-row, .check-row { display: flex; align-items: flex-start; gap: 10px; color: #526878; font-size: 12px; line-height: 1.5; }
.consent-row { margin-top: 14px; }
.consent-row input, .check-row input { flex: 0 0 auto; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--teal); }
.result-box { margin-top: 14px; padding: 15px; border: 1px solid #e2e9ed; border-radius: 8px; background: #f8fafb; }
.empty-state { display: flex; align-items: center; gap: 10px; color: #6a7e8d; font-size: 12px; }
.empty-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #eaf1f4; color: var(--teal); font-size: 16px; }
.route-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.route-stat { padding: 9px 11px; border: 1px solid #e2e9ed; border-radius: 7px; background: #fff; }
.route-stat strong { display: block; color: var(--navy); font-size: 18px; line-height: 1.3; }
.route-stat span { display: block; color: #708392; font-size: 10px; }
.route-disclaimer { margin: 12px 0 0; color: #805200; font-size: 11px; }
.route-error { margin: 0; color: #8b3c2c; font-size: 12px; }

.two-column { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); align-items: start; gap: 20px; }
.two-column .panel { height: calc(100% - 20px); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 12px; margin: 16px 0 0; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 5px; color: #314b5d; font-size: 11px; font-weight: 680; }
.field input, .field select { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #d8e2e8; border-radius: 6px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 450; }
.field input::placeholder { color: #99a8b2; }
.optional { color: #8a9ba6; font-size: 10px; font-weight: 450; }
.required { display: block; color: #92702c; font-size: 10px; font-weight: 500; }
.subsection-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.subsection-heading h3 { margin: 0; font-size: 14px; }
.subsection-heading p { margin: 3px 0 0; color: #758895; font-size: 10px; }
.cargo-list { display: grid; gap: 8px; }
.cargo-row { display: grid; grid-template-columns: minmax(100px, 1.25fr) minmax(74px, .75fr) minmax(80px, .85fr) auto; gap: 7px; align-items: end; padding: 9px; border: 1px solid #e5ebef; border-radius: 7px; background: #fbfcfd; }
.cargo-row > .cargo-field:nth-child(4) { grid-column: 1 / span 2; }
.cargo-row > .cargo-field:nth-child(5) { grid-column: 3 / span 2; }
.cargo-row > .remove-cargo { grid-column: 4; grid-row: 1; }
.cargo-field { display: flex; flex-direction: column; gap: 4px; color: #718492; font-size: 9px; font-weight: 700; }
.cargo-field input, .cargo-field select { width: 100%; min-height: 34px; padding: 6px 8px; border: 1px solid #dce5e9; border-radius: 5px; background: #fff; color: var(--ink); font-size: 11px; }
.total-strip { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 9px 11px; border-radius: 6px; background: #eff7f7; color: #4a6b73; font-size: 11px; }
.total-strip strong { color: var(--navy); font-size: 13px; }
.dimension-grid { margin-top: 16px; }
.check-row { margin-top: 14px; }

.axle-table-wrap { overflow-x: auto; border: 1px solid #e1e8ed; border-radius: 7px; }
.axle-table { width: 100%; min-width: 650px; border-collapse: collapse; }
.axle-table th { padding: 8px 7px; background: #f5f8fa; color: #607686; font-size: 9px; font-weight: 800; text-align: left; }
.axle-table td { padding: 6px 5px; border-top: 1px solid #edf1f3; color: #3a5668; font-size: 11px; text-align: center; }
.axle-table th:first-child, .axle-table td:first-child { text-align: left; padding-left: 10px; }
.axle-table input[type="number"] { width: 96px; min-height: 33px; padding: 5px 6px; border: 1px solid #dce5e9; border-radius: 5px; font-size: 11px; }
.axle-table input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--teal); }
.axle-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0 12px; }
.muted-value { color: #7a8d9a; font-size: 10px; }
.calc-results { display: grid; gap: 8px; }
.calc-card { padding: 12px; border: 1px solid #e3eaee; border-radius: 7px; background: #fbfcfd; }
.calc-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.calc-card h3 { margin: 0; font-size: 12px; }
.calc-card p { margin: 6px 0 0; color: #627888; font-size: 11px; }
.check-status { padding: 3px 7px; border-radius: 5px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.check-status.pass { background: #e6f4ee; color: #24684c; }
.check-status.fail { background: var(--red-bg); color: var(--red); }
.check-status.pending { background: var(--amber-bg); color: var(--amber); }
.calc-card.fail-card { border-color: #e8c5bd; background: #fffafa; }
.result-list { display: grid; gap: 6px; margin-top: 8px; }
.result-line { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; border-top: 1px solid #edf1f3; color: #5e7280; font-size: 10px; }
.result-line strong { color: #294456; font-weight: 700; text-align: right; }
.method-note { margin: 12px 0 0; color: #758895; font-size: 10px; line-height: 1.5; }

.checklist-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin-top: 20px; }
.check-card { min-height: 205px; padding: 15px 14px; border: 1px solid #e3e9ed; border-radius: 8px; background: #fbfcfd; }
.check-card-icon { display: inline-grid; width: 28px; height: 28px; place-items: center; margin-bottom: 10px; border-radius: 7px; background: #e9f4f3; color: var(--teal); font-size: 9px; font-weight: 850; }
.check-card h3 { margin-bottom: 6px; font-size: 13px; }
.check-card p { margin-bottom: 9px; color: #667b89; font-size: 10px; line-height: 1.5; }
.check-card a { display: block; margin-top: 6px; font-size: 10px; font-weight: 700; }
.dispatch-confirm { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 17px; padding: 13px; border-radius: 7px; background: #f4f7f8; }
.dispatch-confirm .check-row { margin: 0; }

.source-panel { display: grid; grid-template-columns: 1fr 300px; align-items: center; gap: 35px; margin: 20px 0 0; padding: 22px 24px; border: 1px solid #dce6eb; border-radius: 10px; background: #eaf1f4; }
.source-panel h2 { margin-bottom: 7px; font-size: 17px; }
.source-panel p:not(.eyebrow) { max-width: 760px; margin: 0; color: #5e7482; font-size: 11px; }
.source-links { display: grid; gap: 7px; }
.source-links a { font-size: 11px; font-weight: 700; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; max-width: 1240px; margin: auto; padding: 20px 24px 28px; border-top: 1px solid #dbe4e9; color: #708290; font-size: 10px; }
.site-footer span:first-child { color: var(--navy); font-weight: 750; }

@media (max-width: 900px) {
  .header-inner { gap: 20px; }
  .main-nav { gap: 14px; }
  .local-badge { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr) 300px; gap: 25px; }
  .two-column { grid-template-columns: 1fr; gap: 0; }
  .two-column .panel { height: auto; }
  .checklist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .header-inner { min-height: 60px; padding: 0 16px; flex-wrap: wrap; gap: 0; }
  .brand { min-height: 60px; }
  .main-nav { order: 2; width: 100%; overflow-x: auto; gap: 19px; padding: 0 0 11px; }
  .main-nav a { flex-shrink: 0; font-size: 11px; }
  .safety-banner { align-items: flex-start; padding: 10px 15px; }
  .safety-banner strong { font-size: 11px; }
  .safety-banner span { font-size: 10px; }
  main { padding: 0 14px 32px; }
  .hero { grid-template-columns: 1fr; gap: 18px; padding: 30px 0 25px; }
  h1 { font-size: 36px; }
  .hero-copy > p:not(.eyebrow) { font-size: 14px; }
  .hero-card { padding: 16px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading h2 { font-size: 22px; }
  .toolbar { justify-content: flex-start; }
  .button { min-height: 38px; padding: 7px 10px; font-size: 11px; }
  .panel { padding: 16px 13px; }
  .panel-heading { gap: 9px; }
  .section-number { flex-basis: 32px; height: 32px; }
  .panel-heading h2 { font-size: 17px; }
  .panel-tag { max-width: 120px; white-space: normal; text-align: center; font-size: 9px; }
  .section-intro { margin-left: 0; font-size: 12px; }
  .stop-row { grid-template-columns: 28px minmax(65px, .7fr) minmax(120px, 1.4fr) auto; gap: 6px; }
  .control { min-height: 37px; padding: 7px; font-size: 11px; }
  .stop-actions { flex-direction: column; }
  .route-actions { align-items: stretch; }
  .route-actions .button { flex: 1; }
  .route-summary { grid-template-columns: 1fr 1fr; }
  .route-stat strong { font-size: 16px; }
  .field-grid { gap: 10px 8px; }
  .field { font-size: 10px; }
  .field input, .field select { min-height: 38px; padding: 7px; font-size: 11px; }
  .cargo-row { grid-template-columns: minmax(85px, 1fr) minmax(74px, .8fr) minmax(62px, .65fr) auto; gap: 5px; padding: 7px; }
  .cargo-field input { font-size: 10px; }
  .subsection-heading h3 { font-size: 13px; }
  .dimension-grid { grid-template-columns: 1fr 1fr; }
  .checklist-grid { grid-template-columns: 1fr; }
  .check-card { min-height: 0; }
  .dispatch-confirm { grid-template-columns: 1fr; }
  .source-panel { grid-template-columns: 1fr; gap: 15px; padding: 17px; }
  .site-footer { flex-direction: column; padding: 18px 14px 24px; }
}
@media print {
  :root { --canvas: #fff; }
  body { background: #fff; font-size: 10pt; }
  .site-header, .main-nav, .local-badge, .toolbar, .route-actions, .consent-row, #add-stop, #add-cargo, #add-axle, .icon-button, .site-footer { display: none !important; }
  .safety-banner { position: static; box-shadow: none; padding: 9px 12px; border: 1px solid #b78b42; }
  main { max-width: none; padding: 0; }
  .hero { padding: 20px 0 14px; }
  .panel, .source-panel, .hero-card { box-shadow: none; break-inside: avoid; }
  .two-column { grid-template-columns: 1fr 1fr; gap: 10px; }
  .checklist-grid { grid-template-columns: repeat(2, 1fr); }
  .check-card { min-height: 0; }
  a { color: #222; }
}
