@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Arial", sans-serif;
  background: #ffffff;
  color: #121212;
  min-height: 100vh;
}

/* Hero */
.hero {
  position: relative;
  min-height: 320px;
  background-image: url('/static/images/hero-bg.jpg');
  background-size: cover;
  background-position: center 60%;
  display: flex;
  flex-direction: column;
  transition: min-height .4s ease;
}
.hero--full {
  min-height: 100vh;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.55) 0%, rgba(0,0,0,.45) 60%, rgba(0,0,0,.6) 100%);
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: .75rem 2rem 2rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}
.hero__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.hero__brand {
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.01em;
}
.hero__api-link {
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.35);
  padding: .4rem 1rem;
  border-radius: 3px;
  transition: background .15s, border-color .15s;
}
.hero__api-link:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.65); }
.hero__center { text-align: center; }
.hero__title {
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
  margin-bottom: .6rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.hero__sub {
  color: rgba(255,255,255,.8);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.hero__search-box {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  text-align: left;
  overflow: visible;
}
.hero__search-wrap {
  position: relative;
  padding: 1rem;
}
.hero__input-row {
  display: flex;
  gap: 0;
}
.hero__input-row #searchInput {
  flex: 1;
  min-width: 0;
  padding: .85rem 1.1rem;
  font-size: 1.05rem;
  border: 2px solid #d0d0d0;
  border-right: none;
  border-radius: 4px 0 0 4px;
  outline: none;
  transition: border-color .2s;
}
.hero__input-row #searchInput:focus { border-color: #111111; }
.hero__search-btn {
  padding: 0 1.5rem;
  background: #111111;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid #111111;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.hero__search-btn:hover { background: #333333; border-color: #333333; }

@media (max-width: 700px) {
  .hero__title { font-size: 1.8rem; }
  .hero__inner { padding: 1rem 1rem 2.5rem; }
  .hero__topbar { margin-bottom: 2rem; }
}

.main-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Sidebars */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 1.5rem;
}

/* News feed */
.news-feed {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  border: 1px solid #e2e2e2;
  overflow: hidden;
}

.news-feed__title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #333333;
  padding: .75rem 1rem;
  border-bottom: 3px solid #111111;
  background: #f7f7f5;
}

.news-item {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid #ededed;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: #f7f7f5; }

.news-item__tag {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #666666;
}

.news-item__headline {
  font-size: .83rem;
  font-weight: 500;
  color: #121212;
  text-decoration: none;
  line-height: 1.45;
  font-family: "Libre Baskerville", Georgia, serif;
}
.news-item__headline:hover { color: #326891; }

.news-item__meta {
  font-size: .72rem;
  color: #999999;
}

.ad-slot {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  border: 1px solid #e2e2e2;
  overflow: hidden;
}

.ad-label {
  display: block;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #999999;
  padding: .4rem .75rem;
  border-bottom: 1px solid #ededed;
}

.ad-placeholder {
  width: 300px;
  height: 250px;
  background: #f7f7f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999999;
  border: 2px dashed #d0d0d0;
}

.ad-placeholder.ad-tall { height: 600px; }

.ad-placeholder p { font-size: 1rem; font-weight: 500; }
.ad-size { font-size: .8rem !important; margin-top: .25rem; font-weight: 400 !important; }

/* Demo ads */
.demo-ad {
  padding: 1.25rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .6rem;
  min-height: 250px;
}
.demo-ad--tall { min-height: 600px; justify-content: center; }

.demo-ad--mortgage { background: linear-gradient(160deg, #f7f7f5 0%, #fff 100%); }
.demo-ad--buyers-agent { background: linear-gradient(160deg, #f0f4f8 0%, #fff 100%); }

.demo-ad__logo { font-size: 2rem; }
.demo-ad__brand { font-weight: 700; font-size: 1rem; color: #121212; font-family: "Libre Baskerville", Georgia, serif; }
.demo-ad__tagline { font-size: .85rem; color: #555555; font-style: italic; }
.demo-ad__body { font-size: .82rem; color: #555555; line-height: 1.55; text-align: left; }

.demo-ad__points {
  list-style: none;
  text-align: left;
  width: 100%;
  font-size: .82rem;
  color: #333333;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.demo-ad__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: .25rem 0;
}
.demo-ad__stat-num   { font-size: 1.6rem; font-weight: 700; color: #111111; font-family: "Libre Baskerville", Georgia, serif; }
.demo-ad__stat-label { font-size: .75rem; color: #666666; text-transform: uppercase; letter-spacing: .06em; }

.demo-ad__cta {
  display: inline-block;
  background: #111111;
  color: #fff;
  padding: .55rem 1.1rem;
  border-radius: 3px;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: .25rem;
}
.demo-ad__cta:hover { background: #333333; color: #fff; }

.demo-ad__disclaimer { font-size: .68rem; color: #999999; margin-top: .25rem; }

/* Mini mortgage calculator widget */
.mini-calc {
  padding: .9rem .9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.mini-calc__group {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.mini-calc__group label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #666666;
}

.mini-calc__input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #d0d0d0;
  border-radius: 3px;
  overflow: hidden;
  background: #fff;
}

.mini-calc__input-wrap input {
  flex: 1;
  min-width: 0;
  padding: .4rem .5rem;
  font-size: .88rem;
  border: none;
  outline: none;
  background: transparent;
}

.mini-calc__prefix,
.mini-calc__suffix {
  padding: .4rem .5rem;
  font-size: .82rem;
  color: #666;
  background: #f5f5f3;
  border-right: 1.5px solid #d0d0d0;
  white-space: nowrap;
}

.mini-calc__suffix {
  border-right: none;
  border-left: 1.5px solid #d0d0d0;
}

.mini-calc__group select {
  padding: .4rem .5rem;
  font-size: .88rem;
  border: 1.5px solid #d0d0d0;
  border-radius: 3px;
  background: #fff;
  outline: none;
  width: 100%;
}

.mini-calc__btn {
  margin-top: .2rem;
  padding: .55rem .75rem;
  background: #121212;
  color: #fff;
  font-size: .88rem;
  font-weight: 600;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background .15s;
}

.mini-calc__btn:hover { background: #333333; }
.mini-calc__btn:disabled { background: #888; cursor: default; }

.mini-calc__result {
  background: #f7f7f5;
  border: 1px solid #e2e2e2;
  border-radius: 3px;
  padding: .65rem .75rem;
  text-align: center;
}

.mini-calc__result__label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #666;
  margin-bottom: .15rem;
}

.mini-calc__result__value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #121212;
  font-family: "Libre Baskerville", Georgia, serif;
}

.mini-calc__result__sub {
  font-size: .75rem;
  color: #555;
  margin-top: .2rem;
}

.mini-calc__error {
  font-size: .8rem;
  color: #c0392b;
  background: #fdf3f3;
  border: 1px solid #f5c6c6;
  border-radius: 3px;
  padding: .45rem .65rem;
}

.mini-calc__link {
  font-size: .78rem;
  color: #326891;
  text-align: center;
  text-decoration: none;
  margin-top: .1rem;
}

.mini-calc__link:hover { text-decoration: underline; }

/* CRM card */
.crm-card__body {
  padding: 1.1rem 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  text-align: center;
}

.crm-card__icon { font-size: 1.8rem; }

.crm-card__title {
  font-size: .95rem;
  font-weight: 700;
  color: #121212;
  font-family: "Libre Baskerville", Georgia, serif;
}

.crm-card__tagline {
  font-size: .8rem;
  color: #555555;
  font-style: italic;
  line-height: 1.45;
}

.crm-card__link {
  display: inline-block;
  margin-top: .35rem;
  padding: .5rem 1rem;
  background: #121212;
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  border-radius: 3px;
  text-decoration: none;
  transition: background .15s;
}

.crm-card__link:hover { background: #333333; }

/* Collapse sidebars on small screens */
@media (max-width: 1100px) {
  .sidebar--left { display: none; }
}
@media (max-width: 900px) {
  .page-layout { flex-direction: column; }
  .sidebar { width: 100%; position: static; }
  .ad-placeholder { width: 100%; }
}

/* User-type tabs (inside hero search box) */
.user-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e2e2e2;
  overflow-x: auto;
  border-radius: 4px 4px 0 0;
}
.user-tab {
  padding: .65rem 1.2rem;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  color: #555555;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  flex-shrink: 0;
}
.user-tab:hover  { color: #111111; }
.user-tab.active { color: #111111; border-bottom-color: #111111; }

.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  z-index: 100;
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
}
.suggestions li {
  padding: .65rem 1rem;
  cursor: pointer;
  font-size: .95rem;
  border-bottom: 1px solid #ededed;
}
.suggestions li:last-child { border-bottom: none; }
.suggestions li:hover { background: #f7f7f5; }

/* Address header */
.address-header {
  background: #fff;
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  border: 1px solid #e2e2e2;
  margin-bottom: 1.25rem;
}
.address-header h2 { font-size: 1.25rem; margin-bottom: .75rem; font-family: "Libre Baskerville", Georgia, "Times New Roman", serif; }
.metrics { display: flex; gap: 1rem; flex-wrap: wrap; }
.metric {
  background: #f7f7f5;
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  padding: .6rem 1rem;
  min-width: 120px;
}
.metric .label { font-size: .75rem; color: #666666; text-transform: uppercase; letter-spacing: .06em; }
.metric .value { font-size: 1.1rem; font-weight: 600; color: #121212; margin-top: 2px; }

/* Tabs */
.tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.tab-btn {
  padding: .3rem .65rem;
  border: 1.5px solid #d0d0d0;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 500;
  transition: all .15s;
  color: #555555;
}
.tab-btn:hover  { border-color: #111111; color: #111111; }
.tab-btn.active { border-color: #111111; background: #111111; color: #fff; }

.tab-group {
  position: relative;
  display: inline-flex;
}
.tab-group-btn {
  padding: .3rem .65rem;
  border: 1.5px solid #d0d0d0;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 500;
  transition: all .15s;
  color: #555;
  white-space: nowrap;
}
.tab-group-btn:hover { border-color: #111; color: #111; }
.tab-group-btn.active { border-color: #111; background: #111; color: #fff; }
.tab-group-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1.5px solid #d0d0d0;
  border-radius: 3px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  display: none;
  flex-direction: column;
  min-width: 170px;
  z-index: 200;
}
.tab-group.open .tab-group-dropdown { display: flex; }
.tab-group-dropdown .tab-btn {
  text-align: left;
  border: none;
  border-bottom: 1px solid #f0f0f0;
  border-radius: 0;
  width: 100%;
  padding: .45rem .75rem;
}
.tab-group-dropdown .tab-btn:last-child { border-bottom: none; }
.tab-group-dropdown .tab-btn:hover { background: #f5f5f5; color: #111; border-color: transparent; }
.tab-group-dropdown .tab-btn.active { background: #111; color: #fff; border-color: transparent; }

.ask-more-btn {
  padding: .3rem .65rem;
  border: 1.5px solid #2563eb;
  border-radius: 3px;
  background: #2563eb;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all .15s;
  margin-left: .5rem;
}
.ask-more-btn:hover { background: #1d4ed8; border-color: #1d4ed8; }

/* Panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.panel-card {
  background: #fff;
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  border: 1px solid #e2e2e2;
}

/* Radius row */
.radius-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  background: #fff;
  padding: .75rem 1rem;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  border: 1px solid #e2e2e2;
  flex-wrap: wrap;
}
.radius-row input[type=range] { flex: 1; min-width: 150px; accent-color: #111111; }
.radius-row button {
  padding: .4rem .9rem;
  border: none;
  border-radius: 3px;
  background: #111111;
  color: #fff;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 500;
}
.radius-row button:hover { background: #333333; }

/* Filter row (transport/school type checkboxes) */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  padding: .5rem 1rem;
  background: #f7f7f5;
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  margin-bottom: .75rem;
  font-size: .875rem;
}
.filter-label { color: #444; font-weight: 600; }
.filter-row label { display: flex; align-items: center; gap: .3rem; cursor: pointer; color: #333; }
.filter-row input[type=checkbox] { accent-color: #111111; }

/* Table */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th {
  text-align: left;
  padding: .6rem .75rem;
  background: #f7f7f5;
  border-bottom: 2px solid #333333;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #555555;
}
td { padding: .6rem .75rem; border-bottom: 1px solid #ededed; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f7f7f5; }

/* AI / Market Insights */
.ai-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid #e8e8e8;
}
.ai-body { line-height: 1.8; font-size: .97rem; color: #222; }
.ai-heading { color: #111; font-weight: 700; margin: 1.4rem 0 .4rem; }
.ai-heading--1 { font-size: 1.1rem; }
.ai-heading--2 { font-size: 1rem; letter-spacing: .01em; text-transform: uppercase; color: #444; font-weight: 600; }
.ai-heading--3 { font-size: .95rem; font-weight: 600; color: #555; }
.ai-heading:first-child { margin-top: 0; }
.ai-para { margin-bottom: .9rem; }
.ai-para:last-child { margin-bottom: 0; }
.ai-list {
  margin: .5rem 0 .9rem 0;
  padding-left: 1.4rem;
  list-style: none;
}
.ai-list li {
  position: relative;
  padding-left: .6rem;
  margin-bottom: .45rem;
  color: #333;
}
.ai-list li::before {
  content: "▸";
  position: absolute;
  left: -1rem;
  color: #888;
  font-size: .8rem;
  top: .05em;
}

/* Utilities */
.loading { color: #666666; font-style: italic; padding: 1rem 0; }
.error   { color: #c53030; padding: 1rem 0; }
.empty   { color: #666666; padding: 1rem 0; }
a { color: #326891; }

/* Title registry link */
.title-registry-link {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem;
  background: #f7f7f5; border: 1px solid #e2e2e2; border-radius: 4px;
  padding: .75rem 1rem; margin-bottom: 1.25rem;
}
.title-cad-row { display: flex; align-items: center; gap: .5rem; }
.title-cad-id { font-size: .9rem; color: #333333; }
.title-hint { font-size: .8rem; color: #555555; margin: -.5rem 0 1rem; }
.btn-copy {
  background: #e2e2e2; border: none; border-radius: 3px;
  padding: .25rem .6rem; font-size: .8rem; cursor: pointer; color: #333333;
}
.btn-copy:hover { background: #d0d0d0; }
.btn-registry {
  display: inline-block; background: #111111; color: #fff;
  padding: .5rem 1rem; border-radius: 3px; font-size: .9rem;
  text-decoration: none; white-space: nowrap;
}
.btn-registry:hover { background: #333333; color: #fff; }

/* JSON renderer */
.json-table { width: 100%; border-collapse: collapse; }
.json-table td { padding: .35rem .6rem; vertical-align: top; border-bottom: 1px solid #ededed; font-size: .9rem; }
.json-key { font-weight: 600; color: #333333; white-space: nowrap; width: 35%; }
.json-array { margin: 0; padding-left: 1.2rem; }
.json-array li { padding: .2rem 0; font-size: .9rem; }
.json-str  { color: #276749; }
.json-num  { color: #326891; }
.json-bool { color: #b7791f; }
.json-null, .json-empty { color: #999999; font-style: italic; }

/* Bushfire risk table */
.bf-label { font-weight: 600; color: #555555; padding: .3rem 1rem .3rem 1rem; white-space: nowrap; vertical-align: top; width: 7rem; }
.bf-value  { color: #121212; padding: .3rem .5rem; }
