:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-strong: #102421;
  --text: #13201f;
  --muted: #5f6c68;
  --line: #ddd8cc;
  --accent: #0f7c6b;
  --accent-strong: #0a5b50;
  --gold: #d9982f;
  --rose: #c85c55;
  --sky: #31748f;
  --shadow: 0 18px 55px rgba(23, 35, 31, 0.13);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111815;
  --surface: #19231f;
  --surface-strong: #eef5ed;
  --text: #eef5ed;
  --muted: #adbab5;
  --line: #31403b;
  --accent: #62cbb9;
  --accent-strong: #9ee2d6;
  --gold: #e3b154;
  --rose: #f08a7d;
  --sky: #75bfd8;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

button,
input,
select {
  font: inherit;
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 12px clamp(18px, 5vw, 64px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topbar-left {
  display: contents;
}

.topbar-left .menu-button {
  justify-self: start;
}

.topbar-left .brand {
  grid-column: 2;
  justify-self: center;
}

.topbar-actions {
  justify-self: end;
}

.brand,
.nav-links,
.hero-actions,
.search-band,
.section-heading,
.form-row {
  display: flex;
  align-items: center;
}

.menu-button {
  display: inline-flex;
  gap: 8px;
  width: auto;
  height: 34px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 999px;
  padding: 6px 9px;
  font-weight: 850;
}

.menu-lines {
  display: grid;
  gap: 4px;
}

.menu-lines span {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.menu-label {
  font-size: 0.9rem;
}

.menu-button:hover {
  border-color: color-mix(in srgb, var(--accent) 18%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent-strong);
}

.brand {
  gap: 10px;
  font-weight: 950;
  letter-spacing: 0;
  font-size: clamp(1.28rem, 2vw, 1.58rem);
}

.brand-aura {
  color: var(--accent);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
}

.nav-links {
  gap: 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--text);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.icon-button.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 78px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  padding: 6px 10px;
}

.profile-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--bg);
  cursor: pointer;
  font-weight: 900;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(5, 12, 10, 0.46);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(5, 12, 10, 0.5);
}

.side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 21;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 20px;
  width: min(380px, 92vw);
  height: 100vh;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateX(-104%);
  transition: transform 180ms ease;
}

.side-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.drawer-head h2 {
  margin-bottom: 0;
  font-size: 1.7rem;
}

.drawer-nav,
.drawer-tools {
  display: grid;
  gap: 10px;
}

.drawer-nav a,
.drawer-tools {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.drawer-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 850;
}

.drawer-tools h3 {
  margin-bottom: 2px;
}

.signup-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 31;
  display: grid;
  gap: 16px;
  width: min(720px, calc(100% - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.map-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 31;
  display: grid;
  gap: 16px;
  width: min(560px, calc(100% - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.signup-modal.open,
.map-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.modal-head h2 {
  margin-bottom: 0;
  font-size: 1.9rem;
}

.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
}

.account-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-actions .primary-action,
.account-actions .ghost-button {
  min-height: 46px;
}

.auth-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 40%, var(--surface));
}

.google-button span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--bg);
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.signup-form,
.profile-form {
  border: 0;
  padding: 0;
  box-shadow: none;
}

label em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.credibility-note {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--muted);
}

.credibility-note strong {
  color: var(--text);
}

.auth-panel[data-auth-mode="login"] label:has(input[name="workEmail"]),
.auth-panel[data-auth-mode="login"] .credibility-note {
  display: none;
}

.customer-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.customer-avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--bg);
  font-weight: 950;
}

.customer-card h3 {
  margin-bottom: 3px;
}

.customer-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.profile-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 900;
}

.profile-builder {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.profile-score {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.profile-score h3,
.optional-trust h3 {
  margin-bottom: 0;
}

.profile-score strong {
  color: var(--accent-strong);
  font-size: 1.55rem;
}

.score-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 74%, var(--surface));
}

.score-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 160ms ease;
}

.optional-trust {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--sky) 7%, var(--surface));
}

.profile-form {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.profile-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.68fr) minmax(0, 1.32fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.profile-row:last-of-type {
  border-bottom: 0;
}

.profile-row > span:first-child {
  color: var(--text);
  font-size: 0.9rem;
}

.profile-row input,
.profile-row select {
  width: 100%;
  min-width: 0;
}

.location-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.location-control .ghost-button {
  min-height: 42px;
  padding: 0 12px;
  white-space: nowrap;
}

.map-shell {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 124, 107, 0.18) 1px, transparent 1px),
    linear-gradient(rgba(49, 116, 143, 0.16) 1px, transparent 1px),
    color-mix(in srgb, var(--accent) 8%, var(--surface));
  background-size: 46px 46px;
}

.map-grid {
  position: absolute;
  inset: 24px;
  border: 2px solid color-mix(in srgb, var(--accent) 42%, transparent);
  border-radius: 40% 55% 48% 52%;
  transform: rotate(-8deg);
}

.map-pin {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  background: var(--rose);
  transform: translate(-50%, -50%) rotate(-45deg);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.map-pin::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: white;
}

.map-shell p {
  position: absolute;
  left: 14px;
  bottom: 10px;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 850;
}

.map-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-options button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 8px 10px;
  font-weight: 850;
}

.map-options button.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent-strong);
}

.optional-row {
  background: color-mix(in srgb, var(--sky) 6%, var(--surface));
}

.time-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-form > .primary-action {
  margin: 12px;
  width: auto;
}

.profile-form > .form-note {
  padding: 0 12px 12px;
}

.hero {
  position: relative;
  min-height: clamp(500px, 68vh, 640px);
  display: grid;
  align-items: center;
  padding: clamp(34px, 6vw, 68px) clamp(18px, 5vw, 64px);
  overflow: hidden;
  --hero-fade: 1;
}

.hero img,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero img {
  object-fit: cover;
  object-position: center;
  opacity: var(--hero-fade);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(9, 19, 17, 0.88) 0%, rgba(9, 19, 17, 0.66) 42%, rgba(9, 19, 17, 0.12) 100%),
    linear-gradient(0deg, rgba(9, 19, 17, 0.42), transparent 36%);
  opacity: calc(0.72 + (var(--hero-fade) * 0.28));
}

.hero-content {
  position: relative;
  max-width: 720px;
  color: white;
  padding-bottom: 58px;
  opacity: calc(0.38 + (var(--hero-fade) * 0.62));
  transform: translateY(calc((1 - var(--hero-fade)) * -10px));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.hero .eyebrow {
  color: #92e4d7;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 690px;
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 5.8vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.04rem;
}

.hero-content p:not(.eyebrow) {
  max-width: 570px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.1rem;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-action {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
}

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: white;
}

.hero-panel {
  position: absolute;
  right: clamp(18px, 5vw, 64px);
  bottom: 32px;
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 1px;
  max-width: min(520px, calc(100% - 36px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  backdrop-filter: blur(18px);
  opacity: calc(0.2 + (var(--hero-fade) * 0.8));
}

.hero-panel div {
  padding: 16px;
  background: rgba(9, 19, 17, 0.28);
}

.hero-panel strong,
.hero-panel span {
  display: block;
}

.hero-panel strong {
  font-size: 1.45rem;
  line-height: 1;
}

.hero-panel span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.83rem;
}

.search-band {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(150px, 0.75fr));
  align-items: end;
  gap: 12px;
  margin: -42px auto 0;
  width: min(1220px, calc(100% - 36px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.locality-field {
  min-width: 0;
}

.filter-mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-mini-actions button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  padding: 4px 7px;
  font-size: 0.72rem;
  font-weight: 850;
}

.filter-mini-actions button:hover {
  color: var(--text);
  border-color: var(--accent);
}

.budget-field {
  min-width: 0;
  grid-column: span 2;
}

.budget-field span:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.budget-field strong {
  color: var(--accent-strong);
  font-size: 0.78rem;
}

.range-pair {
  display: grid;
  gap: 4px;
}

.range-pair input {
  width: 100%;
  min-width: 0;
  min-height: 24px;
  padding: 0;
  accent-color: var(--accent);
}

.filter-go {
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  padding: 9px 24px;
  font-weight: 900;
}

.filter-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
  align-self: end;
}

.filter-reset {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  padding: 9px 12px;
  font-weight: 850;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

select,
input {
  min-height: 42px;
  min-width: 176px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 11px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.toggle-row input {
  min-width: auto;
  min-height: auto;
  accent-color: var(--accent);
}

.section-shell,
.split-section,
.trust-section,
.workflow,
.documents-section,
.post-section {
  width: min(1180px, calc(100% - 36px));
  margin: 82px auto;
}

.home-page .search-band,
.home-page #homes,
.home-page #flatmates,
.home-page #post,
.listings-page .hero,
.listings-page #flatmates,
.listings-page #why-us,
.listings-page .workflow,
.listings-page #documents,
.listings-page #post,
.flatmates-page .hero,
.flatmates-page .search-band,
.flatmates-page #homes,
.flatmates-page #why-us,
.flatmates-page .workflow,
.flatmates-page #documents,
.flatmates-page #post,
.post-page .hero,
.post-page .search-band,
.post-page #homes,
.post-page #flatmates,
.post-page #why-us,
.post-page .workflow,
.post-page #documents {
  display: none;
}

.listings-page .search-band {
  margin-top: 34px;
}

.listings-page #homes,
.flatmates-page #flatmates,
.post-page #post {
  margin-top: 48px;
}

.section-heading {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.listing-card,
.flatmate-card,
.trust-grid article,
.document-card,
.workflow div,
form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 32px rgba(23, 35, 31, 0.06);
}

.listing-card {
  overflow: hidden;
}

.listing-photo {
  position: relative;
  min-height: 156px;
  background:
    linear-gradient(135deg, var(--accent), transparent 62%),
    linear-gradient(45deg, var(--gold), var(--sky));
}

.listing-photo span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #13201f;
  font-size: 0.76rem;
  font-weight: 850;
}

.listing-body,
.flatmate-card,
.workflow div {
  padding: 16px;
}

.listing-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.rent {
  white-space: nowrap;
  color: var(--accent-strong);
  font-weight: 900;
}

.listing-meta,
.cost-breakdown,
.tags,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.listing-meta {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
}

.total-cost {
  display: grid;
  gap: 3px;
  margin: 14px 0;
  padding: 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--gold) 13%, var(--surface));
}

.total-cost span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.total-cost strong {
  color: var(--text);
  font-size: 1.28rem;
}

.cost-breakdown {
  gap: 6px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.78rem;
}

.cost-breakdown span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tag {
  padding: 5px 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 800;
}

.card-actions {
  margin-top: 16px;
}

.ghost-button,
.save-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.ghost-button {
  flex: 1;
}

.save-button {
  width: 42px;
}

.save-button.saved {
  border-color: var(--rose);
  color: var(--rose);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: start;
}

.flatmate-copy p:not(.eyebrow) {
  max-width: 520px;
  color: var(--muted);
}

.flatmate-list {
  display: grid;
  gap: 12px;
}

.flatmate-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}

.avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--bg);
  font-weight: 900;
}

.flatmate-card p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.profile-links a,
.profile-links span {
  padding: 5px 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--sky) 12%, var(--surface));
  color: var(--sky);
  font-size: 0.76rem;
  font-weight: 850;
}

.match-score {
  color: var(--accent-strong);
  font-weight: 900;
}

.trust-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: 28px;
  align-items: start;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.trust-section > div > p:not(.eyebrow) {
  color: var(--muted);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.trust-grid article {
  padding: 16px;
}

.trust-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.documents-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 28px;
  align-items: start;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.documents-copy p:not(.eyebrow),
.document-card p {
  color: var(--muted);
}

.document-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.document-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.document-card-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
}

.doc-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent-strong);
  font-weight: 900;
}

.doc-form {
  border: 0;
  padding: 0;
  box-shadow: none;
}

.doc-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.step-number {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--gold);
  font-weight: 900;
}

.workflow p {
  margin-bottom: 0;
  color: var(--muted);
}

.post-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(300px, 1.1fr);
  gap: 30px;
  align-items: start;
  padding: 34px 0 24px;
  border-top: 1px solid var(--line);
}

.post-section > div p:not(.eyebrow) {
  color: var(--muted);
}

form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.form-row {
  gap: 14px;
}

.form-row label,
form > label {
  flex: 1;
}

.full {
  width: 100%;
  border: 0;
  cursor: pointer;
}

.form-note {
  min-height: 22px;
  margin: 0;
  color: var(--accent-strong);
  font-weight: 750;
}

.site-footer {
  display: grid;
  gap: 44px;
  padding: 58px clamp(22px, 5vw, 64px) 34px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) repeat(4, minmax(150px, 1fr));
  gap: clamp(26px, 5vw, 64px);
  align-items: start;
}

.footer-company {
  display: grid;
  gap: 18px;
  max-width: 260px;
}

.footer-logo {
  color: var(--text);
  font-size: clamp(1.28rem, 2vw, 1.58rem);
  font-weight: 950;
  line-height: 1;
}

.footer-logo span {
  color: var(--accent);
}

.footer-company p {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.9;
}

.footer-email {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 46px;
  padding: 11px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 850;
}

.footer-column {
  display: grid;
  gap: 10px;
}

.footer-column h3 {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 1.32rem;
}

.footer-column a {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 22px;
  align-items: center;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--muted);
  font-size: 1.35rem;
  font-weight: 900;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}

.footer-bottom strong {
  color: var(--text);
}

.footer-bottom button {
  min-height: 46px;
  padding: 10px 28px;
  border: 0;
  border-radius: 999px;
  background: #6f7681;
  color: white;
  cursor: pointer;
  font-weight: 850;
}

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

  .budget-field {
    grid-column: span 2;
  }

  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-section,
  .trust-section,
  .documents-section,
  .post-section {
    grid-template-columns: 1fr;
  }

  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-tools {
    grid-template-columns: 1fr;
  }

  .workflow {
    grid-template-columns: 1fr;
  }

  .footer-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 64px;
  }

  .nav-links {
    display: none;
  }

  .topbar {
    gap: 10px;
  }

  .hero {
    min-height: 620px;
    align-items: start;
  }

  .hero-content {
    padding-top: 18px;
    padding-bottom: 128px;
  }

  h1 {
    font-size: 2.55rem;
  }

  .hero-panel {
    left: 18px;
    right: 18px;
    grid-template-columns: 1fr;
  }

  .search-band {
    margin-top: -24px;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .budget-field {
    grid-column: span 1;
  }

  .search-band,
  .form-row,
  .footer-bottom {
    flex-direction: column;
  }

  .footer-social {
    grid-template-columns: 1fr;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .doc-actions {
    grid-template-columns: 1fr;
  }

  label,
  select,
  input,
  .doc-actions .primary-action,
  .doc-actions .ghost-button {
    width: 100%;
  }

  .account-actions,
  .profile-row,
  .time-pair,
  .location-control {
    grid-template-columns: 1fr;
  }

  .profile-row {
    gap: 7px;
  }

  .listing-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .flatmate-card {
    align-items: flex-start;
  }

  .flatmate-card {
    grid-template-columns: auto 1fr;
  }

  .match-score {
    grid-column: 2;
  }
}
