:root {
  color-scheme: light;
  --navy: #16324f;
  --navy-2: #224f78;
  --sky: #eaf3f8;
  --yellow: #f4c542;
  --yellow-soft: #fff7d6;
  --orange: #e96f23;
  --orange-soft: #fff0e6;
  --ink: #14202b;
  --muted: #607080;
  --line: #d8e0e7;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(22, 50, 79, .11);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.centre-logo { display: block; width: 227px; max-width: 100%; height: auto; margin: 0; border-radius: 10px; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0, rgba(244,197,66,.20), transparent 29rem),
    linear-gradient(180deg, #f5f9fc 0, #edf4f8 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

button, select, input { font: inherit; }

.page-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 72px; }
.page-header { display: grid; grid-template-columns: minmax(100px, 190px) minmax(0, 1fr) auto; align-items: center; gap: 24px; margin-bottom: 28px; }
.header-copy { min-width: 0; }
.eyebrow { margin: 0 0 6px; color: var(--navy-2); font-size: .82rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
h1 { margin: 0; color: var(--navy); font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.05; letter-spacing: -.035em; }
.intro { max-width: 650px; margin: 12px 0 0; color: var(--muted); font-size: 1.05rem; }

.reset-button { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 10px 15px; border: 1px solid #bdcbd6; border-radius: 10px; color: var(--navy); background: rgba(255,255,255,.7); cursor: pointer; font-weight: 750; }
.reset-button:hover { background: var(--white); border-color: var(--navy-2); }
.reset-button:focus-visible, select:focus-visible, input:focus-visible, .check-control:focus-within { outline: 3px solid rgba(34,79,120,.28); outline-offset: 2px; }
.reset-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.calculator-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.controls-column { display: grid; gap: 20px; }
.card, .result-card { background: rgba(255,255,255,.96); border: 1px solid rgba(166,184,198,.55); border-radius: 18px; box-shadow: var(--shadow); }
.tranche-card { display: flex; gap: 17px; padding: 23px 24px; }
.step-number { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; color: white; background: var(--navy); font-weight: 850; }
.step-content { flex: 1; min-width: 0; }
.step-content > label, .control-label, .section-heading h2 { display: block; margin: 3px 0 12px; color: var(--navy); font-size: 1.08rem; font-weight: 800; }
.select-wrap { position: relative; width: 100%; }
.select-wrap::after { content: ""; position: absolute; z-index: 2; right: 17px; top: 18px; width: 8px; height: 8px; border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(45deg); pointer-events: none; }
.select-button { width: 100%; min-height: 49px; padding: 10px 46px 10px 14px; border: 1px solid #b9c8d4; border-radius: 10px; color: var(--ink); background: white; cursor: pointer; text-align: left; }
.select-button[aria-expanded="true"] { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(34,79,120,.14); }
.tranche-menu { position: absolute; z-index: 30; top: calc(100% + 7px); left: 0; right: 0; max-height: min(80vh, 620px); padding: 6px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #b9c8d4; border-radius: 12px; background: white; box-shadow: 0 18px 45px rgba(22,50,79,.22); }
.tranche-option { display: block; width: 100%; min-height: 45px; padding: 10px 12px; border: 0; border-radius: 8px; color: var(--ink); background: white; cursor: pointer; text-align: left; }
.tranche-option:hover, .tranche-option:focus-visible { background: var(--sky); outline: none; }
.tranche-option.is-selected { color: var(--navy); background: var(--yellow-soft); font-weight: 800; }
.rate-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; color: var(--muted); font-size: .86rem; }
.rate-pill { padding: 5px 9px; border-radius: 999px; background: var(--sky); }

.schedule-card { padding: 23px 24px 25px; overflow: hidden; }
.section-heading { display: flex; gap: 17px; align-items: flex-start; margin-bottom: 18px; }
.section-heading h2 { margin: 3px 0 3px; }
.section-heading p { margin: 0; color: var(--muted); font-size: .94rem; }
table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid #c9d4dd; border-radius: 12px; }
th, td { border-right: 1px solid #d2dce4; border-bottom: 1px solid #d2dce4; }
tr > *:last-child { border-right: 0; }
tbody tr:last-child > * { border-bottom: 0; }
thead th { padding: 12px 7px; color: var(--navy); background: #e7edf2; font-size: .82rem; text-transform: uppercase; letter-spacing: .025em; }
thead th:first-child { width: 210px; text-align: left; padding-left: 15px; }
tbody th { padding: 10px 14px; text-align: left; color: var(--ink); background: #f8fafb; font-size: .91rem; }
tbody th span { display: block; color: var(--muted); font-size: .77rem; font-weight: 500; }
tbody td { position: relative; height: 55px; padding: 5px; text-align: center; background: white; }

.check-control { display: grid; place-items: center; width: 100%; height: 100%; min-height: 42px; border-radius: 8px; cursor: pointer; }
.check-control:hover { background: var(--sky); }
.afternoon-hours { color: var(--muted); font-size: .77rem; font-weight: 500; white-space: nowrap; }
.check-control[data-control="wed-afternoon"] { align-content: center; gap: 7px; }
.check-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.checkmark { display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid #8da0af; border-radius: 6px; background: white; transition: .15s ease; }
.checkmark svg { width: 17px; height: 17px; opacity: 0; fill: none; stroke: white; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transform: scale(.65); transition: .15s ease; }
.check-control input:checked + .checkmark { border-color: var(--navy-2); background: var(--navy-2); box-shadow: 0 0 0 3px rgba(34,79,120,.12); }
.check-control input:checked + .checkmark svg { opacity: 1; transform: scale(1); }
.check-control.auto-charge { background: var(--orange-soft); }
.check-control.auto-charge .checkmark { border-color: var(--orange); }
.day-card .check-control { display: flex; justify-content: space-between; min-height: 50px; padding: 8px 10px; }
.mobile-label { color: var(--ink); font-size: .93rem; font-weight: 680; text-align: left; }
.mobile-label small { display: block; color: var(--muted); font-size: .75rem; font-weight: 500; }

.mobile-schedule { display: none; }
.automatic-info { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 12px 14px; border: 1px solid #f0b58d; border-radius: 10px; color: #7c360c; background: var(--orange-soft); font-size: .88rem; }
.automatic-info svg { flex: 0 0 20px; width: 20px; margin-top: 1px; fill: none; stroke: var(--orange); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.automatic-info ul { margin: 4px 0 0; padding-left: 18px; }

.result-card { position: sticky; top: 22px; padding: 25px; color: white; background: var(--navy); border: 0; box-shadow: 0 22px 60px rgba(15,39,62,.22); }
.result-kicker { margin: 0 0 16px; color: #bed2e2; font-size: .79rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.primary-result { padding: 18px; border-radius: 13px; color: var(--navy); background: var(--yellow); }
.primary-result span, .weekly-result span { display: block; font-size: .86rem; font-weight: 720; }
.primary-result strong { display: block; margin-top: 3px; font-size: 2.45rem; line-height: 1; letter-spacing: -.035em; }
.weekly-result { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 18px 2px 15px; border-bottom: 1px solid rgba(255,255,255,.18); }
.weekly-result strong { font-size: 1.3rem; }
.result-note { min-height: 41px; margin: 14px 0; color: #d4e0e9; font-size: .88rem; }
details { border-top: 1px solid rgba(255,255,255,.16); border-bottom: 1px solid rgba(255,255,255,.16); }
summary { padding: 13px 0; cursor: pointer; color: white; font-size: .88rem; font-weight: 750; }
.breakdown { display: grid; gap: 6px; padding: 0 0 13px; color: #dce7ee; font-size: .83rem; }
.breakdown-row { display: flex; justify-content: space-between; gap: 10px; }
.breakdown-day { margin-top: 5px; color: white; font-weight: 800; }
.breakdown-empty { color: #b9cbd8; font-style: italic; }
.formula-note { display: flex; gap: 10px; padding-top: 17px; color: #c7d6e1; font-size: .79rem; }
.formula-note p { margin: 0; }
.formula-note svg { flex: 0 0 18px; width: 18px; fill: none; stroke: var(--yellow); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.privacy-note { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.16); color: #aebfcb; font-size: .76rem; text-align: center; }

@media (max-width: 920px) {
  .calculator-layout { grid-template-columns: 1fr; }
  .result-card { position: static; order: -1; }
  .result-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
  .result-kicker, .result-note, details, .formula-note, .privacy-note { grid-column: 1 / -1; }
  .weekly-result { padding: 12px 0; align-self: stretch; }
}

@media (max-width: 680px) {
  .page-shell { width: min(100% - 24px, 560px); padding: 28px 0 46px; }
  .page-header { grid-template-columns: 88px minmax(0, 1fr); align-items: start; gap: 10px 14px; }
  .header-copy { grid-column: 2; grid-row: 1 / span 2; }
  .page-header .reset-button { grid-column: 1; grid-row: 2; justify-self: center; align-self: start; }
  .page-header h1 { font-size: clamp(1.35rem, 4.5vw, 1.9rem); line-height: 1.12; }
  .page-header .eyebrow { font-size: .75rem; letter-spacing: .025em; }
  .intro { font-size: .96rem; }
  .reset-button { padding: 9px; }
  .reset-button svg { width: 21px; }
  .reset-button { font-size: 0; }
  .card, .result-card { border-radius: 15px; }
  .tranche-card, .schedule-card { padding: 19px 16px; }
  .tranche-card { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
  .tranche-card .step-content { display: contents; }
  .tranche-card .step-content > label, .tranche-card .control-label { margin-bottom: 0; }
  .tranche-card .select-wrap, .tranche-card .rate-summary { grid-column: 1 / -1; }
  .desktop-schedule { display: none; }
  .mobile-schedule { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
  .day-card { padding: 10px; border: 1px solid #ccd8e1; border-radius: 11px; background: #f9fbfc; }
  .day-card h3 { margin: 1px 5px 6px; color: var(--navy); font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; }
  .day-card.wide { grid-column: 1 / -1; }
  .day-card.wide .mobile-options { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; }
  .result-card { grid-template-columns: 1fr; padding: 21px; }
  .result-card > * { grid-column: 1; }
  .weekly-result { padding: 16px 2px 13px; }
}

@media (max-width: 420px) {
  .mobile-schedule { grid-template-columns: 1fr; }
  .day-card.wide { grid-column: auto; }
  .day-card.wide .mobile-options { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1000px) {
  .page-shell { width: calc(100% - 32px); }
  .calculator-layout { grid-template-columns: 1fr; }
  .result-card { position: static; }
}

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