:root {
  --cream: #f7f3eb;
  --paper: #fffdf8;
  --ink: #1d2a2c;
  --teal: #0c3f44;
  --teal-2: #0d7f76;
  --muted: #55605f;
  --line: #ddd5c6;
  --off: #ece7dc;
  --warn-bg: #fff4dc;
  --warn: #6b4500;
  font-family: Figtree, Urbanist, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--cream);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.45; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { color: var(--teal); line-height: 1.2; margin: 0; }
h1 { font-size: 1.6rem; margin: 2px 0 12px; }
h2 { font-size: 1.15rem; }
a { color: var(--teal); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--teal-2); outline-offset: 2px; }

/* Header */
.top { padding: 20px 0 12px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0; font-size: .875rem; color: var(--muted); }
.routes { display: flex; flex-wrap: wrap; gap: 8px; }
.routes button {
  border: 1px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 8px 14px; cursor: pointer; min-height: 44px;
}
.routes button[aria-pressed="true"] { background: var(--teal); color: #fff; border-color: var(--teal); }
.status { margin: 12px 0 0; font-size: .875rem; color: var(--muted); }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 16px; padding-bottom: 24px; }
@media (min-width: 900px) {
  .layout { grid-template-columns: 280px minmax(0, 1fr); align-items: start; gap: 24px; }
  .rail { position: sticky; top: 16px; }
}

/* Rail */
.rail { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 14px; }
.field { display: grid; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.field label, .label { font-size: .875rem; font-weight: 600; color: var(--teal); padding: 0; }
.field select, .field input[type="date"] {
  width: 100%; min-height: 44px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.swap {
  justify-self: start; min-height: 40px; padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--cream); cursor: pointer; font-size: .875rem;
}
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button {
  width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; font-size: 1.25rem; cursor: pointer;
}
.stepper output { min-width: 2ch; text-align: center; font-weight: 700; font-size: 1.1rem; }
.hint { margin: 0; font-size: .875rem; color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { text-align: center; padding: 10px 6px; cursor: pointer; background: #fff; color: var(--ink); font-weight: 500; }
.seg input:checked + label { background: var(--teal); color: #fff; }
.seg input:focus-visible + label { outline: 3px solid var(--teal-2); outline-offset: -3px; }

/* Panel */
.panel { display: grid; gap: 16px; }
.panel section { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.panel .details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.panel section.off { background: transparent; border-style: dashed; }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.sec-sub { margin: 4px 0 0; color: var(--muted); font-size: .875rem; }
.datebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 4px; }
.datebar button {
  min-height: 40px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: .875rem;
}
.datebar button:disabled { opacity: .5; cursor: default; }
.datebar strong { margin-right: auto; font-size: 1rem; flex-basis: 100%; }
@media (min-width: 600px) { .datebar strong { flex-basis: auto; } }
.season { margin: 0 0 12px; font-size: .875rem; color: var(--muted); }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
@media (min-width: 900px) { .tiles { display: flex; flex-wrap: wrap; } .tile { width: 108px; } }
.tile {
  position: relative; display: grid; gap: 2px; justify-items: start; text-align: left;
  padding: 10px 12px; min-height: 76px; border-radius: 10px; cursor: pointer;
  border: 2px solid var(--line); background: #fff;
}
.tile .t { font-size: 1.35rem; font-weight: 700; color: var(--teal); font-variant-numeric: tabular-nums; }
.tile .f { font-size: .875rem; color: var(--ink); }
.tile .n { font-size: .75rem; font-weight: 600; color: var(--teal-2); text-transform: uppercase; letter-spacing: .03em; }
.tile:hover:not(:disabled) { border-color: var(--teal-2); }
.tile[aria-pressed="true"] { border-color: var(--teal-2); box-shadow: inset 0 0 0 1px var(--teal-2); background: #eef7f5; }
.tile.next:not([aria-pressed="true"]) { border-color: #9fcfc8; }
.tile:disabled { cursor: not-allowed; background: var(--off); border-color: var(--off); }
.tile:disabled .t, .tile:disabled .f { color: #5f625f; }
.tile:disabled .t { text-decoration: line-through; text-decoration-thickness: 1px; }
.tile:disabled .n { color: #5f625f; }

.empty { padding: 14px; border-radius: 10px; background: var(--off); margin: 0; }
.empty strong { display: block; color: var(--teal); }
.note { margin: 10px 0 0; font-size: .875rem; color: var(--muted); }
.warn {
  margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--warn-bg);
  color: var(--warn); border-left: 4px solid #c98a12; font-size: .95rem;
}
.warn a { color: var(--warn); }
.inline-btn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }

/* Summary / sticky CTA */
.summary {
  position: sticky; bottom: 0; z-index: 2;
  background: var(--teal); color: #fff; border-radius: 12px 12px 0 0; padding: 14px 16px;
  display: grid; gap: 10px; box-shadow: 0 -6px 18px rgba(12, 63, 68, .18);
}
@media (min-width: 900px) { .summary { border-radius: 12px; } }
.summary a { color: #fff; }
.total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.total .amt { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.total .lbl { font-size: .875rem; opacity: .9; }
.breakdown { margin: 0; font-size: .875rem; }
.details p { margin: 0 0 6px; }
.details p:last-child { margin: 0; }
.ctas { display: flex; flex-wrap: wrap; gap: 8px; }
.cta {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 600; border: 2px solid #fff;
}
.cta.primary { background: #fff; color: var(--teal); }
.cta.secondary { background: transparent; color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
