:root {
  color-scheme: light dark;
  --ink: #12263a;
  --ink-soft: #3a5368;
  --fog: #e7eef2;
  --paper: #f6f3ee;
  --panel: rgba(255, 255, 255, 0.72);
  --harbour: #1f6f78;
  --harbour-deep: #0e3d44;
  --sun: #d9922f;
  --line: rgba(18, 38, 58, 0.12);
  --muted: #3a5368;
  --accent: #1f6f78;
  --shadow: 0 18px 40px rgba(14, 61, 68, 0.12);
  --danger: #9b2c2c;
  --radius: 16px;
  --radius-pill: 999px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --bg:
    radial-gradient(1100px 560px at 8% -12%, rgba(31, 111, 120, 0.2), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(217, 146, 47, 0.16), transparent 48%),
    linear-gradient(180deg, #dbe7eb 0%, var(--paper) 40%, #f1ebe3 100%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #e8eef3;
    --ink-soft: #a9b8c4;
    --fog: #243746;
    --paper: #0f1a22;
    --panel: rgba(18, 32, 42, 0.82);
    --harbour: #4db0b8;
    --harbour-deep: #9ed7db;
    --sun: #e0a84a;
    --line: rgba(232, 238, 243, 0.12);
    --muted: #a9b8c4;
    --accent: #4db0b8;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    --bg:
      radial-gradient(1000px 520px at 10% -10%, rgba(77, 176, 184, 0.18), transparent 55%),
      radial-gradient(800px 420px at 100% 0%, rgba(224, 168, 74, 0.1), transparent 50%),
      linear-gradient(180deg, #0c151c 0%, #12202a 45%, #15242f 100%);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8eef3;
  --ink-soft: #a9b8c4;
  --fog: #243746;
  --paper: #0f1a22;
  --panel: rgba(18, 32, 42, 0.82);
  --harbour: #4db0b8;
  --harbour-deep: #9ed7db;
  --sun: #e0a84a;
  --line: rgba(232, 238, 243, 0.12);
  --muted: #a9b8c4;
  --accent: #4db0b8;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --bg:
    radial-gradient(1000px 520px at 10% -10%, rgba(77, 176, 184, 0.18), transparent 55%),
    radial-gradient(800px 420px at 100% 0%, rgba(224, 168, 74, 0.1), transparent 50%),
    linear-gradient(180deg, #0c151c 0%, #12202a 45%, #15242f 100%);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--bg);
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0 0;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 2.5rem;
  min-block-size: 2.5rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle .icon {
  inline-size: 1.1rem;
  block-size: 1.1rem;
}

.icon {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon {
  display: none;
}

:root:not([data-theme]) .theme-icon-auto,
:root[data-theme="light"] .theme-icon-light,
:root[data-theme="dark"] .theme-icon-dark {
  display: block;
}

.hero {
  padding: 1.4rem 0 1rem;
}

.kicker {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--harbour-deep);
}

h1 {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(2rem, 4.8vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0.55rem 0 0;
  max-width: 44rem;
  color: var(--ink-soft);
}

.meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.chip {
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.38rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 0.9rem;
}

.panel {
  margin: 0.3rem 0 1.2rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.filters label,
.field {
  display: grid;
  gap: 0.3rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.filters .wide {
  grid-column: span 2;
}

.filters .span-4 {
  grid-column: 1 / -1;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.68rem 0.75rem;
  background: color-mix(in srgb, var(--paper) 70%, white);
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) input,
  :root:not([data-theme="light"]) select {
    background: #162632;
  }
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select {
  background: #162632;
}

.hint {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--harbour-deep);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.more-toggle::after {
  content: "";
  inline-size: 0.45rem;
  block-size: 0.45rem;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
  transform: rotate(45deg);
  translate: 0 -0.1rem;
  transition: transform 160ms ease;
}

.more-toggle[aria-expanded="true"]::after {
  transform: rotate(225deg);
  translate: 0 0.1rem;
}

.more-filters {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.more-filters[hidden] {
  display: none;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  align-items: center;
  padding-top: 0.35rem;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
}

.filters > .check {
  margin-top: 1.45rem;
}

.check input {
  width: auto;
  accent-color: var(--harbour);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 0.72rem 1.05rem;
  cursor: pointer;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, var(--harbour), #15565c);
  color: #fff;
}

:root[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #2f8f96, #1d6a70);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary {
    background: linear-gradient(135deg, #2f8f96, #1d6a70);
  }
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.status {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
  padding-bottom: 1.2rem;
}

.card {
  display: grid;
  grid-template-rows: 180px auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card-media {
  position: relative;
  background: linear-gradient(135deg, #6f8f96, #2d4a52);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.badge {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(12, 24, 32, 0.78);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
}

.card-body {
  display: grid;
  gap: 0.4rem;
  padding: 0.9rem 1rem 1.05rem;
}

.price {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
}

.address {
  margin: 0;
  font-weight: 700;
}

.suburb {
  margin: 0;
  color: var(--harbour-deep);
  font-size: 0.9rem;
  font-weight: 600;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.stat {
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  background: var(--fog);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
}

.empty {
  grid-column: 1 / -1;
  padding: 2rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--ink-soft);
  background: var(--panel);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0 0 2rem;
}

.footer {
  padding: 0 0 2.5rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.footer a {
  color: var(--harbour-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 900px) {
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters .wide,
  .filters .span-4 {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .filters {
    grid-template-columns: 1fr;
  }

  .filters .wide,
  .filters .span-4 {
    grid-column: span 1;
  }
}