:root {
  --ink: #465563;
  --ink-deep: #273541;
  --muted: #667582;
  --line: #dce2e6;
  --soft: #f5f7f8;
  --yellow: #ffcc1f;
  --yellow-soft: #fff4c7;
  --pink: #ec0078;
  --pink-soft: #fff0f7;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(39, 53, 65, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink-deep);
  background: linear-gradient(180deg, #fff 0, #fff 15rem, #f3f5f7 15rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

button, select, input { font: inherit; }

.site-header {
  min-height: 5.5rem;
  padding: 1rem max(1.25rem, calc((100vw - 72rem) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.brand-logo { display: block; width: 7.25rem; height: auto; }
.sheet-date { color: var(--muted); font-size: .9rem; }
.sheet-date strong { color: var(--ink-deep); }

.page-shell { max-width: 72rem; margin: 0 auto; padding: 3rem 1.25rem 2rem; }
.intro { max-width: 43rem; margin-bottom: 2rem; }
.eyebrow, .step { margin: 0 0 .35rem; color: var(--pink); font-size: .78rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
h1 { margin: 0; color: var(--ink-deep); font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.03; letter-spacing: -.055em; }
.intro > p:last-child { margin: 1rem 0 0; color: var(--muted); font-size: 1.08rem; }

.calculator-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(19rem, .9fr); gap: 1.5rem; align-items: start; }
.panel, .result-card { border-radius: 1.1rem; background: var(--white); box-shadow: var(--shadow); }
.booking-panel { padding: clamp(1.25rem, 3vw, 2rem); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
h2 { margin: 0; color: var(--ink-deep); font-size: 1.45rem; line-height: 1.2; letter-spacing: -.025em; }
.helper { margin: .65rem 0 1.4rem; color: var(--muted); font-size: .92rem; }
.text-button { border: 0; padding: .45rem .25rem; color: var(--pink); background: transparent; font-weight: 750; cursor: pointer; }
.text-button:hover { text-decoration: underline; }

.sessions { display: grid; gap: .55rem; }
.session-row { min-height: 4.4rem; display: grid; grid-template-columns: minmax(7.2rem, 1fr) 1.15fr auto 1.15fr; align-items: center; gap: .65rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: .8rem; transition: border-color .2s, background .2s; }
.session-row.active { border-color: #f0b8d4; background: var(--pink-soft); }
.day-toggle { display: flex; align-items: center; gap: .7rem; cursor: pointer; font-weight: 750; }
.day-toggle input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--pink); }
.time-field { display: grid; gap: .2rem; }
.time-field span { color: var(--muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
select { width: 100%; min-height: 2.65rem; border: 1px solid #cbd3d9; border-radius: .55rem; padding: .45rem .55rem; color: var(--ink-deep); background: var(--white); }
select:disabled { opacity: .5; background: var(--soft); }
.time-separator { color: var(--muted); padding-top: 1rem; }
.row-error { grid-column: 2 / -1; margin-top: -.25rem; color: #a50045; font-size: .8rem; font-weight: 650; }

.funding { margin: 1.8rem 0 0; padding: 1.35rem 0 0; border: 0; border-top: 1px solid var(--line); }
.funding legend { width: 100%; padding: 0 0 .9rem; color: var(--ink-deep); font-size: 1.15rem; font-weight: 780; }
.funding legend .step { display: block; }
.funding-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.funding-card { display: flex; gap: .7rem; align-items: center; padding: .95rem; border: 1px solid var(--line); border-radius: .8rem; cursor: pointer; }
.funding-card:has(input:checked) { border: 2px solid var(--pink); padding: calc(.95rem - 1px); background: var(--pink-soft); }
.funding-card input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--pink); }
.funding-card span { display: flex; flex-direction: column; }
.funding-card strong { font-size: 1.02rem; }
.funding-card small { color: var(--muted); }

.result-card { position: sticky; top: 1.25rem; overflow: hidden; padding: 1.75rem; color: var(--white); background: var(--ink-deep); }
.result-card::before { content: ""; position: absolute; width: 8rem; height: 8rem; top: -4rem; right: -2rem; border-radius: 50%; background: var(--yellow); opacity: .95; }
.result-label { position: relative; margin: 0; color: #cbd3d9; font-size: .85rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.average-fee { position: relative; display: grid; gap: .2rem; margin: .45rem 0 1.6rem; padding-bottom: 1.35rem; border-bottom: 1px solid rgba(255,255,255,.18); }
.average-fee span { color: #cbd3d9; font-size: .88rem; }
.average-fee strong { color: var(--yellow); font-size: clamp(2.6rem, 5vw, 3.65rem); line-height: 1; letter-spacing: -.055em; }
.result-heading { position: relative; margin: 0 0 1rem; color: var(--white); font-size: 1.25rem; }
.term-fees { position: relative; display: grid; gap: .65rem; }
.term-fee { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid rgba(255,255,255,.16); border-radius: .8rem; background: rgba(255,255,255,.06); }
.term-fee.featured { border-color: rgba(255,204,31,.55); background: rgba(255,204,31,.09); }
.term-fee > span { display: flex; flex-direction: column; }
.term-fee small { margin-top: .15rem; color: #cbd3d9; font-size: .78rem; }
.term-amount { flex: none; color: var(--yellow); font-size: 1.45rem; letter-spacing: -.035em; }
.notice { display: grid; gap: .2rem; margin: 1.25rem 0; padding: 1rem; border-radius: .75rem; color: var(--ink-deep); background: var(--yellow); }
.notice span { font-size: .85rem; }
.notice.error { color: #7f0035; background: #ffd6e8; }
.notice.quote { color: #7f0035; border: 1px solid #f0b8d4; background: var(--pink-soft); }

.important-note { max-width: 52rem; margin: 2rem 0 0; padding: 1.4rem 1.6rem; border-left: .35rem solid var(--yellow); background: var(--yellow-soft); }
.important-note h2 { font-size: 1.08rem; }
.important-note p { margin: .45rem 0 0; color: var(--ink); font-size: .9rem; }
footer { max-width: 72rem; margin: 0 auto; padding: 1rem 1.25rem 2rem; color: var(--muted); font-size: .8rem; }

:focus-visible { outline: 3px solid rgba(236, 0, 120, .35); outline-offset: 2px; }

@media (max-width: 820px) {
  .calculator-grid { grid-template-columns: 1fr; }
  .result-card { position: static; grid-row: 1; }
  .booking-panel { grid-row: 2; }
}

@media (max-width: 570px) {
  .site-header { align-items: flex-start; }
  .brand-logo { width: 6.1rem; }
  .sheet-date { max-width: 8.5rem; text-align: right; }
  .page-shell { padding-top: 2rem; }
  .session-row { grid-template-columns: 1fr 1fr; gap: .55rem; }
  .day-toggle { grid-column: 1 / -1; }
  .time-separator { display: none; }
  .row-error { grid-column: 1 / -1; }
  .funding-options { grid-template-columns: 1fr; }
  .term-fee { align-items: flex-start; }
  .term-amount { font-size: 1.25rem; }
}

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