:root {
  --navy: #0A364B;
  --navy-2: #02455F;
  --denim: #1F82A5;
  --light-blue: #EFF7FA;
  --green: #86F59A;
  --frost: #AFD6E6;
  --daffodil: #FBD771;
  --line: #E1EEF3;
  --body: #2C5466;
  --muted: #4F6A77; /* 5.6:1 on white */
  --white: #FFFFFF;
  --radius: 16px;
  font-family: 'Hanken Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--navy);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--light-blue); }
a { color: var(--denim); }
a:hover { color: var(--navy-2); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.card.dark :focus-visible, .site-header :focus-visible { outline-color: var(--green); }
.inputs :focus-visible { outline-color: var(--denim); }

.wrap { max-width: 1180px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.site-header { background: var(--navy); color: var(--white); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.logo { height: 64px; width: auto; display: block; margin-left: -16px; }
.header-tag { font-size: 13px; color: var(--frost); letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }

.hero { padding-top: 40px; padding-bottom: 8px; }
.eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--denim); }
h1 { margin: 0; font-size: clamp(30px, 5vw, 40px); line-height: 1.1; font-weight: 800; letter-spacing: -0.8px; text-wrap: balance; }
.lede { margin: 12px 0 0; font-size: 17px; line-height: 1.5; max-width: 680px; color: var(--body); }

.layout { padding-top: 24px; padding-bottom: 56px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.card { background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: 0 1px 2px rgba(10, 54, 75, 0.08); }
.card.dark { background: var(--navy); color: var(--white); box-shadow: none; }
h2 { margin: 0; font-size: 20px; font-weight: 700; }

/* Inputs */
.inputs { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 960px) { .inputs { position: sticky; top: 16px; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; }
.muted { font-weight: 400; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
input[type=text], input[type=number] {
  font: inherit; font-size: 16px; padding: 12px 14px; border: 1.5px solid var(--frost); border-radius: 10px;
  color: var(--navy); background: var(--white); width: 100%; font-variant-numeric: tabular-nums; min-height: 48px;
}
input[type=text]:hover, input[type=number]:hover { border-color: var(--denim); }
input::placeholder { color: var(--muted); opacity: 1; }
.money-input { position: relative; }
.money-input span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 16px; color: var(--muted); pointer-events: none; }
.money-input input { padding-left: 28px; }
.hint { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.hint .warn { background: var(--daffodil); color: var(--navy); border-radius: 999px; padding: 1px 8px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.link-button { align-self: flex-start; font: inherit; font-size: 14px; font-weight: 600; color: var(--denim); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; }
.link-button:hover { color: var(--navy-2); }

/* Suburb combobox */
.combo { position: relative; }
.listbox {
  position: absolute; z-index: 10; top: 76px; left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
  background: var(--white); border: 1.5px solid var(--frost); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(10, 54, 75, 0.16); max-height: 340px; overflow-y: auto;
}
.listbox li { padding: 10px 12px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.listbox li[aria-selected=true], .listbox li:hover { background: var(--light-blue); }
.listbox .opt-name { font-weight: 600; }
.listbox .opt-meta { font-size: 13px; color: var(--muted); white-space: nowrap; }
.listbox .opt-price { font-size: 13px; color: var(--navy); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.listbox .opt-empty { cursor: default; color: var(--muted); }
.listbox .opt-empty:hover { background: none; }

/* Results */
.results { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.headline { display: flex; flex-direction: column; gap: 20px; }
.headline-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.kicker { margin: 0; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--frost); font-weight: 600; }
.big-figure { margin: 6px 0 0; font-size: clamp(38px, 7vw, 52px); font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1; }
.pill { background: var(--navy-2); color: var(--frost); font-size: 12px; padding: 6px 12px; border-radius: 999px; font-weight: 600; }
.pill.warn { background: var(--daffodil); color: var(--navy); }
.accent { color: var(--green); }
.frost { color: var(--frost); }

.lookup { background: var(--navy-2); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.lookup p { margin: 0; font-size: 15px; line-height: 1.5; }
.lookup-price { display: flex; flex-direction: column; gap: 6px; }
.lookup-price label { font-size: 14px; font-weight: 700; }
.lookup-price input { border-color: var(--navy-2); max-width: 320px; }
.lookup .lookup-small { font-size: 13px; color: var(--frost); }
.lookup-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; padding: 10px 18px;
  min-height: 44px; border-radius: 999px; text-decoration: none;
}
.btn-primary { background: var(--green); color: var(--navy); }
.btn-primary:hover { background: #A6F8B4; color: var(--navy); }
.btn-ghost { border: 1.5px solid var(--frost); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); color: var(--white); }

.split-box { background: var(--navy-2); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.split-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.split-head label { font-size: 14px; font-weight: 700; }
.split-readout { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
#split-slider { width: 100%; accent-color: var(--green); height: 28px; margin: 0; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; }
.presets button {
  font: inherit; font-size: 13px; font-weight: 700; padding: 8px 14px; min-height: 36px; border-radius: 999px;
  border: 1.5px solid var(--green); background: transparent; color: var(--white); cursor: pointer; font-variant-numeric: tabular-nums;
}
.presets button[aria-pressed=true] { background: var(--green); color: var(--navy); }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile { background: var(--navy-2); border-radius: 12px; padding: 16px; min-width: 0; }
.tile p { margin: 0; font-size: 13px; color: var(--frost); }
.tile .tile-figure { margin-top: 6px; font-size: clamp(20px, 3vw, 26px); font-weight: 800; color: var(--white); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile .tile-figure.accent { color: var(--green); }

.breakdown h3 { margin: 18px 0 0; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--denim); font-weight: 700; }
.breakdown dl { margin: 0; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row dt { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 15px; }
.row dt span { font-size: 13px; color: var(--muted); }
.row dd { margin: 0; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row.total dt, .row.total dd { font-weight: 800; }

.how summary { font-weight: 700; font-size: 16px; cursor: pointer; }
.how ul { margin: 12px 0 0; padding-left: 20px; color: var(--body); line-height: 1.6; font-size: 15px; }
.how.card { padding-top: 20px; padding-bottom: 20px; }

.sources { font-size: 13px; color: var(--muted); line-height: 1.5; }
.sources p { margin: 0 0 6px; }

@media (max-width: 560px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .card { padding: 20px; }
  .tiles { grid-template-columns: 1fr; }
  .tile { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .tile .tile-figure { margin-top: 0; }
  .logo { height: 52px; margin-left: -12px; }
  .header-tag { font-size: 11px; }
}
@media (max-width: 380px) { .grid-2 { grid-template-columns: 1fr; } }
