/* Area prices: housewizz.com/area/ and /area/<OUTCODE>. Builds on style.css tokens and components. */
:root {
  --reach-plenty: #1d7a4a;
  --reach-some: #8db89b;
  --reach-stretch: var(--yellow);
  --reach-out: #cfcfc8;
  --track: #ecebe5;
}

/* Install lives in the page on phones (it can't be installed there anyway), so the nav keeps just the link. */
@media (max-width: 560px) { .nav [data-install] { display: none; } }

.a-hero { padding: 88px 0 56px; }
.a-hero h1 { font-size: clamp(38px, 6vw, 72px); line-height: 1.04; max-width: 980px; }
.a-hero .lede { max-width: 760px; }
.a-hero .lede + .lede { margin-top: 16px; }
.tag a { color: inherit; text-underline-offset: 3px; }

.a-sec { padding: 96px 0; }
.a-sec + .a-sec:not(.a-grey) { border-top: 1px solid var(--line); }
.a-grey { background: var(--grey); }
.a-tool { padding-top: 0; }
.a-head { max-width: 720px; margin-bottom: 40px; }
.a-head .sub { margin-bottom: 0; }
.a-note { max-width: 760px; margin: 24px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- Controls ---------- */
.q { padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line-2); border-radius: var(--r); background: var(--white); }
.q-ctl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.q-f { min-width: 0; margin: 0; padding: 0; border: 0; }
.q-l { display: block; margin: 0 0 8px; padding: 0; font-size: 14px; color: var(--muted); }
.q-num { width: 100%; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--white); color: var(--ink); font: inherit; font-size: 30px; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; }
.q-num:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.q-hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

/* Range: a plain line, the chosen part in ink, a square yellow handle. */
.q-rw { position: relative; margin-top: 12px; }
.q-rw i { position: absolute; left: 0; top: 12px; height: 4px; width: calc(11px + (100% - 22px) * var(--p, 0)); border-radius: 2px; background: var(--ink); pointer-events: none; }
.q-range { position: relative; display: block; width: 100%; height: 28px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.q-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: transparent; }
.q-rw::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 2px; background: var(--track); }
.q-range::-moz-range-track { height: 4px; background: transparent; }
.q-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border: 2px solid var(--ink); border-radius: 3px; background: var(--yellow); }
.q-range::-moz-range-thumb { width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 3px; background: var(--yellow); }
.q-range:focus { outline: none; }
.q-range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Segmented choices, like the extension's own settings. */
.q-seg { display: flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.q-seg label { position: relative; flex: 1 1 auto; min-width: 0; cursor: pointer; }
.q-seg label + label { border-left: 1px solid var(--line-2); }
.q-seg input { position: absolute; opacity: 0; pointer-events: none; }
.q-seg span { display: block; padding: 11px 8px; text-align: center; font-size: 15px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .15s; }
.q-seg label:hover span { background: var(--grey); }
.q-seg input:checked + span { background: var(--ink); color: var(--white); }
.q-seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: -4px; box-shadow: inset 0 0 0 3px var(--white); }

@media (min-width: 860px) {
  .q-ctl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 20px 48px; }
  .q-budget { grid-row: span 2; }
}

/* ---------- The answer ---------- */
.ans { max-width: 880px; margin: 56px 0 40px; }
.ans-t { margin: 0; font-size: clamp(24px, 3.2vw, 34px); line-height: 1.25; letter-spacing: -.03em; font-weight: 500; }
.ans-t b { font-weight: 600; }
.ans-s { margin: 16px 0 0; font-size: 19px; color: var(--ink-2); }
.ans-live { margin: 12px 0 0; font-size: 17px; color: var(--muted); }
.ans-live b { color: var(--ink); font-weight: 600; }

.types { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 620px) { .types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .types { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ty { display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }
.ty.is-sel { border-color: var(--ink); }
.ty-h { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }
.ty-h b { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.ty-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ty-tag i { width: 8px; height: 8px; background: var(--c, var(--reach-out)); }
.ty-bar { height: 8px; border-radius: 2px; background: var(--track); overflow: hidden; }
.ty-bar span { display: block; height: 100%; background: var(--c, var(--reach-out)); transition: width .25s ease; }
.ty-r { margin: 12px 0 16px; font-size: 15px; color: var(--ink-2); }
.ty-r b { font-weight: 600; }
.ty-m { display: grid; gap: 8px; margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.ty-m div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.ty-m dt { color: var(--muted); }
.ty-m dd { margin: 0; font-weight: 600; text-align: right; }
.ty.is-few { background: transparent; }
.ty-few { font-size: 15px; color: var(--muted); }
.is-plenty { --c: var(--reach-plenty); }
.is-some { --c: var(--reach-some); }
.is-stretch { --c: var(--reach-stretch); }
.is-out { --c: var(--reach-out); }

/* ---------- Live market ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
@media (min-width: 860px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { display: flex; flex-direction: column; padding-top: 16px; border-top: 1px solid var(--ink); }
.stat span { font-size: 14px; color: var(--muted); }
.stat b { margin: 4px 0 2px; font-size: clamp(26px, 3vw, 34px); font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
.stat em { font-style: normal; font-size: 14px; color: var(--muted); }
.asks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px 64px; margin-top: 56px; }
@media (min-width: 860px) { .asks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.asks h3 { font-size: 17px; font-weight: 600; }
.ask { list-style: none; margin: 0; padding: 0; }
.ask li { display: grid; grid-template-columns: minmax(0, 1fr) auto 88px; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.ask li b { font-weight: 600; }
.ask li em { font-style: normal; color: var(--muted); text-align: right; font-size: 14px; }
.ask li.is-sel span { font-weight: 600; }
.ask li.is-sel span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--yellow); vertical-align: 1px; }
.m-head { margin: 64px 0 20px; }
.m-head h3 { font-size: 22px; margin-bottom: 4px; }
.mcs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 620px) { .mcs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .mcs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mc { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 20px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--white); text-decoration: none; transition: border-color .15s; }
.mc:hover { border-color: var(--ink); }
.mc-p { font-size: 24px; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; }
.mc-t { font-size: 16px; }
.mc-m { font-size: 14px; color: var(--muted); }
.mc-cut { color: var(--good); }
.mc-s { margin-top: auto; padding-top: 16px; font-size: 14px; font-weight: 500; }
.mc-all { display: none; margin-top: 16px; }
@media (max-width: 619px) {
  .mcs { gap: 8px; }
  .mc { padding: 16px; gap: 2px; }
  .mc-p { font-size: 20px; }
  .mc-s { padding-top: 8px; }
  .mcs:not(.is-all) .mc-more { display: none; }
  .mc-all { display: inline-flex; }
}
.live-some { max-width: 760px; margin: 0 0 40px; padding: 14px 18px; border-left: 4px solid var(--yellow); border-radius: var(--r); background: var(--white); font-size: 16px; }
.live-none { padding: 20px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--muted); }
.live-early { max-width: 680px; padding: clamp(24px, 3vw, 32px); border: 1px solid var(--line-2); border-radius: var(--r); background: var(--white); }
.live-early h3 { font-size: 22px; margin-bottom: 12px; }
.live-early p { color: var(--muted); margin-bottom: 24px; }

/* ---------- Nearby areas ---------- */
.near { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 64px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 860px) { .near { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.near > li { display: flex; flex-direction: column; gap: 4px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 16px; }
.near > li > span { font-size: 14px; color: var(--muted); }
.near a { text-decoration: none; }
.near a:hover { text-decoration: underline; text-underline-offset: 3px; }
.near b { font-weight: 600; margin-right: 4px; }
.nr-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.nr-km { font-size: 14px; color: var(--muted); white-space: nowrap; }
.nr-here { display: inline-block; margin-left: 8px; padding: 1px 6px; background: var(--yellow); font-size: 12px; font-weight: 600; vertical-align: 2px; }
.nr .ty-bar { height: 6px; }
.nr-m { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.nr-m b { color: var(--ink); font-weight: 600; }

/* ---------- Sold prices ---------- */
.t-wrap { overflow-x: auto; }
.sold { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 16px; }
.sold th, .sold td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.sold thead th { padding-top: 0; font-size: 13px; font-weight: 400; color: var(--muted); }
.sold tbody th { font-weight: 500; }
.sold tbody tr:first-child th, .sold tbody tr:first-child td { font-weight: 600; }
.sold td:last-child, .sold th:last-child { padding-right: 0; text-align: right; }
.sold .few td { color: var(--muted); text-align: left; }
.recent-h { margin: 56px 0 4px; font-size: 20px; }
.recent li em { color: var(--muted); text-decoration: none; text-align: right; white-space: nowrap; }
.recent { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 64px; }
@media (min-width: 860px) { .recent { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) { .q-seg span { padding: 11px 4px; font-size: 14px; } }
@media (max-width: 560px) {
  .sold { min-width: 0; font-size: 14px; }
  .sold th:nth-child(4), .sold td:nth-child(4) { display: none; }
  .sold .few td { display: table-cell; }
}

/* ---------- Install ---------- */
.a-cta { padding: 112px 0; border-top: 1px solid var(--line); text-align: center; }
.a-cta h2 { max-width: 760px; margin: 0 auto 16px; }
.a-cta .sub { margin: 0 auto; }
.a-faq h2 { margin-bottom: 32px; }

/* ---------- Search page ---------- */
.q-search { margin-top: 48px; max-width: 980px; }
.q-where { margin-bottom: 24px; }
.q-where-in { position: relative; }
.q-where input { width: 100%; padding: 14px 16px; border: 1px solid var(--ink); border-radius: var(--r); background: var(--white); color: var(--ink); font: inherit; font-size: 22px; letter-spacing: -.02em; }
.q-where input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.q-where input::placeholder { color: #9a9a92; }
.q-sugg { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; list-style: none; margin: 0; padding: 4px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--white); box-shadow: var(--lift); }
.q-sugg a { display: block; padding: 10px 12px; border-radius: 2px; text-decoration: none; font-size: 16px; }
.q-sugg a b { margin-right: 8px; font-weight: 600; }
.q-sugg li.is-on a, .q-sugg a:hover { background: var(--grey); }
.q-msg { min-height: 0; margin: 10px 0 0; font-size: 15px; color: var(--ink-2); }
.q-msg:empty { display: none; }
.q-msg a { display: inline-block; margin: 6px 6px 0 0; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: var(--r); text-decoration: none; font-size: 14px; }
.q-msg a:hover { border-color: var(--ink); }
.q-go { margin-top: 28px; }
.q-go .btn { min-width: 160px; }
@media (max-width: 560px) { .q-go .btn { width: 100%; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.a-chip { display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--white); text-decoration: none; font-size: 15px; transition: border-color .15s; }
.a-chip b { font-weight: 600; }
.a-chip:hover { border-color: var(--ink); }
.az { border-bottom: 1px solid var(--line); }
.az-in { margin-top: 24px; }
.az-g { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.az-g h3 { margin: 0; font-size: 15px; font-weight: 600; }
.az-g p { margin: 0; font-size: 14px; line-height: 1.9; color: var(--muted); }
.az-g a { margin-right: 14px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.az-g a:hover { text-decoration: underline; }

@media (max-width: 960px) {
  .a-hero { padding: 56px 0 40px; }
  .a-sec { padding: 72px 0; }
  .a-tool { padding-top: 0; }
  .a-cta { padding: 80px 0; }
}
