.calculator-page { width: min(100% - 36px, 960px); margin: 0 auto; padding: 22px 0 64px; }
.breadcrumbs { color: var(--muted); font-size: .87rem; margin-bottom: 24px; }
.calculator-page h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin-bottom: 8px; color: var(--navy-deep); }
.intro { font-size: 1.05rem; max-width: 45rem; margin-bottom: 23px; }
.calculator-page h2 { font-size: 1.25rem; margin-bottom: 9px; }
.layout { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.calculator-page [hidden] { display: none !important; }
.entry, .results { border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; }
.entry { background: #fff; }
.results { background: #edf5f7; border-color: #ccdde3; }
.results h2:focus { outline-offset: 4px; }
.results h2 { scroll-margin-top: 145px; }
.guide, .small, #result-prompt { color: #485b68; }
.guide { font-size: .94rem; margin-bottom: 15px; }
.small, .error { font-size: .88rem; }
.flight, .prior { min-width: 0; margin: 0; }
.flight { padding: 10px 14px 5px; border: 1px solid #c4d2d9; border-radius: 10px; }
.flight + .flight { margin-top: 13px; }
.flight legend, .prior legend { color: var(--ink); font-weight: 750; }
.flight legend { padding: 0 6px; margin-left: -4px; }
.row-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.calculator-page input, .calculator-page button { font: inherit; }
.row-fields label { font-size: .9rem; color: var(--ink); }
.row-fields input, .prior-fields input { display: block; border: 1px solid #8c9ca7; background: #fff; color: var(--ink); border-radius: 6px; font-size: 1rem; min-height: 44px; padding: 5px 8px; }
.row-fields input { width: 100%; min-width: 0; margin-top: 3px; }
.row-options { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.overnight-label { display: inline-flex; min-height: 44px; gap: 7px; align-items: center; cursor: pointer; }
.short-label { display: flex; align-items: flex-start; gap: 7px; color: var(--navy-deep); margin: 2px 0 8px; cursor: pointer; }
.short-label input { flex: none; position: relative; top: 5px; }
.overnight-label input, .short-label input { accent-color: var(--navy); width: 16px; height: 16px; margin: 0; }
.calculator-page button, .calculator-page .stores a { min-height: 44px; cursor: pointer; }
.primary, .secondary { border-radius: 8px; padding: 8px 14px; font-weight: 700 !important; }
.primary { background: var(--navy); border: 1px solid var(--navy); color: white; }
.primary:hover { background: var(--navy-deep); }
.secondary { border: 1px solid #9cb0bd; color: var(--navy); background: white; }
.secondary:hover { background: #f2f7f9; }
.text-button { color: var(--navy); background: none; border: 0; padding: 6px 4px; text-decoration: underline; text-underline-offset: 3px; }
.remove { font-size: .86rem !important; }
.add { margin-top: 9px; }
.prior { padding: 0; border: 0; margin: 20px 0; }
.prior legend { padding: 0; }
.prior p { margin: 2px 0 5px; }
.prior-fields, .prior-fields label { display: flex; gap: 8px; align-items: center; }
.prior-fields { flex-wrap: wrap; gap: 14px; }
.prior-fields input { width: 7ch; text-align: right; }
#prior-hours { width: 9ch; }
.actions, .stores { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.private-note { margin: 12px 0 0; }
.calculator-page [aria-invalid="true"] { border-color: #a13a31; background: #fff6f3; }
.calculator-page .error { color: #942f27; margin: 0 0 6px; font-weight: 650; }
.totals { margin: 0; }
.totals div { padding: 10px 0; border-bottom: 1px solid #bbd0da; }
.totals dt { color: #3c5360; }
.totals dd { margin: 0; color: var(--navy-deep); font-size: 1.6rem; font-weight: 800; overflow-wrap: anywhere; }
.results table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: .9rem; }
.results th, .results td { padding: 5px 2px; text-align: right; overflow-wrap: anywhere; }
.results tr > :first-child { text-align: left; }
.results thead { color: #3c5360; }
.results tbody tr { border-top: 1px solid #c6d6db; }
.transfer, .app { margin-top: 26px; }
.transfer p, .app p { max-width: 52rem; }
.stores a { display: inline-flex; align-items: center; text-decoration: none; }
@media (max-width: 730px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .entry, .results { padding: 15px; }
  .breadcrumbs { margin-bottom: 15px; }
}
@media (max-width: 390px) {
  .calculator-page { width: calc(100% - 24px); }
  .row-fields { gap: 8px; }
  .flight { padding-left: 10px; padding-right: 10px; }
}
