:root {
  --ink: #17202a;
  --muted: #657381;
  --line: #d9e0e7;
  --paper: #f7f8f7;
  --page-bg:
    radial-gradient(circle at top left, rgba(11, 90, 85, 0.16), rgba(11, 90, 85, 0.075) 18rem, transparent 52rem),
    radial-gradient(circle at bottom right, rgba(178, 138, 58, 0.16), rgba(178, 138, 58, 0.075) 18rem, transparent 50rem),
    linear-gradient(135deg, rgba(11, 90, 85, 0.035) 0%, transparent 42%, rgba(178, 138, 58, 0.04) 100%),
    linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
  --panel: #ffffff;
  --brand: #0b5a55;
  --brand-dark: #084844;
  --gold: #b28a3a;
  --danger: #9f2f2f;
  --button-font-weight: 650;
}

/* Keep status labels consistent across every dashboard role and tab. */
.dashboard-title ~ * .pill {
  min-height: 20px;
  padding: 3px 7px;
  font-size: 11px;
  line-height: 1.2;
}

.dashboard-title ~ * .dashboard-chat-thread-pills,
.dashboard-title ~ * .buyer-bid-title-pills,
.dashboard-title ~ * .status-stack,
.dashboard-title ~ * .agency-compliance-pillars {
  gap: 4px;
}

* { box-sizing: border-box; }

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page-bg);
  display: flex;
  flex-direction: column;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(178, 138, 58, 0.95);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(178, 138, 58, 0.2);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand img {
  display: block;
  width: auto;
  height: 34px;
  max-width: 132px;
  object-fit: contain;
}

.brand span {
  font-size: 30px;
  font-weight: 850;
  color: var(--brand);
}

.brand small {
  color: var(--muted);
  font-weight: 650;
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

nav a,
.nav-logout-form button {
  display: inline-flex;
  align-items: center;
  padding: 9px 11px;
  color: #26323d;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 650;
  border-radius: 6px;
  transition: color 0.16s ease;
}

nav a:hover,
nav a:focus-visible,
.nav-logout-form button:hover,
.nav-logout-form button:focus-visible {
  color: #0b6b66;
}

nav a.nav-active {
  color: #075d59;
}

nav a.button:hover,
nav a.button:focus-visible {
  color: #fff;
}

nav a.button.nav-active {
  color: #fff;
}

.nav-register-menu,
.nav-dropdown-menu {
  position: relative;
}

.nav-register-menu summary,
.nav-dropdown-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.nav-register-menu summary::-webkit-details-marker,
.nav-dropdown-menu summary::-webkit-details-marker {
  display: none;
}

.nav-register-menu summary::after,
.nav-dropdown-menu summary::after {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.16s ease;
}

.nav-register-menu[open] summary::after,
.nav-dropdown-menu[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.nav-dropdown-menu summary {
  padding: 9px 11px;
  color: #26323d;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
  transition: color 0.16s ease;
}

.nav-dropdown-menu summary:hover,
.nav-dropdown-menu summary:focus-visible,
.nav-dropdown-menu summary.nav-active {
  color: #075d59;
}

.nav-register-submenu,
.nav-dropdown-submenu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(23, 32, 42, 0.14);
}

.nav-agencies-menu .nav-dropdown-submenu {
  right: auto;
  left: 0;
}

.nav-register-submenu a,
.nav-dropdown-submenu a {
  width: 100%;
  padding: 10px 12px;
  white-space: nowrap;
}

.nav-logout-form {
  margin: 0;
  display: flex;
  align-items: center;
}

.nav-logout-form button {
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
}

.language-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 6px;
}

.language-switcher:hover,
.language-switcher:focus-visible {
  border-color: var(--line);
  background: #fff;
}

.flag {
  width: 24px;
  height: 16px;
  display: block;
  border: 1px solid rgba(23, 32, 42, 0.22);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(23, 32, 42, 0.08);
  object-fit: cover;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 0;
}

@media (min-width: 1181px) and (max-width: 1320px) {
  .topbar-inner {
    width: min(1280px, calc(100% - 24px));
    gap: 12px;
  }

  .brand img {
    height: 30px;
    max-width: 116px;
  }

  nav {
    flex-wrap: nowrap;
    gap: 5px;
  }

  nav > a,
  .nav-logout-form button,
  .nav-register-menu summary.button.small,
  .nav-dropdown-menu summary {
    padding-right: 7px;
    padding-left: 7px;
    font-size: 17px;
    white-space: nowrap;
  }

  .nav-register-menu summary.button.small {
    padding-right: 12px;
    padding-left: 12px;
  }

  .language-switcher-desktop {
    flex: 0 0 auto;
    padding: 6px;
  }
}

@media (min-width: 1181px) {
  .topbar-inner {
    width: min(1320px, calc(100% - 24px));
    gap: 12px;
  }

  nav {
    flex-wrap: nowrap;
  }

  nav > a,
  .nav-logout-form button,
  .nav-register-menu summary,
  .nav-dropdown-menu summary {
    white-space: nowrap;
  }

  .language-switcher-desktop {
    flex: 0 0 auto;
  }

  .topbar-inner-authenticated {
    width: min(1320px, calc(100% - 24px));
    gap: 12px;
  }

  .topbar-inner-authenticated .brand img {
    height: 30px;
    max-width: 116px;
  }

  nav.authenticated-nav {
    flex-wrap: nowrap;
    gap: 8px;
  }

  nav.authenticated-nav > a,
  nav.authenticated-nav .nav-logout-form button,
  nav.authenticated-nav .nav-dropdown-menu summary {
    padding-right: 6px;
    padding-left: 6px;
    font-size: 16px;
    white-space: nowrap;
  }

  nav.authenticated-nav .language-switcher-desktop {
    flex: 0 0 auto;
    padding: 6px;
  }
}

.language-switcher-mobile {
  display: none;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
}

.menu-toggle:hover,
.menu-toggle:focus,
.menu-toggle:focus-visible,
.menu-toggle[aria-expanded="true"] {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  flex: 1;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 540px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
  padding: clamp(18px, 2.4vw, 28px);
  margin: 24px 0 18px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(12, 30, 36, 0.86), rgba(12, 30, 36, 0.46) 48%, rgba(12, 30, 36, 0.72)),
    url("/assets/img/site/home-hero-portugal.jpg") center/cover;
  border-radius: 8px;
  box-shadow: 0 24px 58px rgba(23, 32, 42, 0.18);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 18%, rgba(11, 90, 85, 0.2), transparent 22rem),
    linear-gradient(180deg, transparent 0%, rgba(12, 30, 36, 0.5) 100%);
}

.hero-pane {
  min-height: 484px;
  display: flex;
  align-items: stretch;
}

.hero-pane-content {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: transparent;
}

.hero h1 {
  min-height: 2.04em;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.02;
}

.hero p {
  color: #edf3f2;
  font-size: 18px;
  line-height: 1.55;
  max-width: 480px;
}

.hero-pane-list {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.hero-pane-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #f7faf9;
  line-height: 1.35;
}

.hero-pane-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 7px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #cfe4e1;
}

.hero .actions {
  margin-top: auto;
  padding-top: 10px;
}

.hero .actions .button {
  background: #fff;
  color: var(--brand-dark);
  font-weight: 650;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.hero .actions .button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.hero .actions .button:hover,
.hero .actions .button:focus-visible {
  background: #f5fbf8;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.hero .actions .button.secondary:hover,
.hero .actions .button.secondary:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.78);
}

@media (min-width: 1181px) {
  .hero .actions {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .hero .actions .button {
    min-height: 36px;
    padding: 8px 9px;
    font-size: 13px;
    white-space: nowrap;
  }
}

.error-page {
  min-height: 560px;
  display: grid;
  align-items: center;
  padding: 70px clamp(22px, 5vw, 64px);
  margin: 28px 0;
  background:
    linear-gradient(90deg, rgba(12, 30, 36, 0.86), rgba(12, 30, 36, 0.48)),
    url("/assets/img/site/access-denied-portugal.jpg") center/cover;
  border-radius: 8px;
  color: #fff;
}

.error-page > div {
  max-width: 700px;
}

.error-page .pill {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.error-page h1 {
  color: #fff;
  margin: 14px 0 12px;
}

.error-page p {
  max-width: 620px;
  color: #edf3f2;
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #d4c08a;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4.5vw, 50px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 { margin: 0 0 16px; font-size: 24px; }
h3 { margin: 10px 0 8px; font-size: 21px; }
p { color: var(--muted); line-height: 1.6; }

.home-video-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  gap: 28px;
  align-items: center;
  margin: 28px 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f7;
}

.home-video-copy .eyebrow,
.home-video-copy h2,
.home-video-copy p { margin-top: 0; }

.home-video-copy .eyebrow {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

/* Homepage hero: video introduction with audience-specific action groups. */
.home-video-hero {
  grid-template-areas:
    "copy"
    "video"
    "actions";
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: start;
  gap: 18px;
  min-height: 0;
  padding: 28px;
}

.home-video-hero .home-video-copy {
  grid-area: copy;
  align-self: auto;
  width: min(760px, 100%);
  margin: 0 auto;
  min-width: 0;
  text-align: center;
}

.home-video-hero .home-video-copy .eyebrow,
.home-video-hero .home-video-copy h1,
.home-video-hero .home-video-copy p {
  color: #fff;
  text-align: center;
}

.home-video-hero .home-video-copy .eyebrow {
  margin-bottom: 10px;
}

.home-video-hero .home-video-copy h1 {
  display: block;
  width: 100%;
  min-height: 0;
  margin-bottom: 12px;
  font-size: clamp(32px, 4vw, 48px);
}

.home-video-hero .home-video-copy p {
  margin: 0 auto;
  font-size: 17px;
}

.hero-action-groups {
  grid-area: actions;
  align-self: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  margin: 0 auto;
}

.hero-action-group {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-action-group h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 15px;
}

.home-video-hero .hero-audience-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 7px;
  background: rgba(7, 29, 25, 0.24);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.home-video-hero .hero-audience-card:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(7, 29, 25, 0.38);
  transform: translateY(-1px);
}

.hero-audience-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-video-hero .hero-audience-card-heading h2 {
  margin: 0;
  font-size: 14px;
}

.hero-audience-card-heading span {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4c08a;
}

.hero-audience-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 0;
}

.hero-audience-links a {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  transition: color 0.16s ease;
}

.hero-audience-links a:not(:last-child)::after {
  margin: 0 8px;
  color: rgba(255, 255, 255, 0.32);
  content: "·";
}

.hero-audience-links a:hover,
.hero-audience-links a:focus-visible {
  color: #fff;
  text-decoration: none;
}

.home-video-hero .hero-action-links {
  gap: 8px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.home-video-hero .hero-action-links .button {
  width: auto;
  min-height: 38px;
  padding: 9px 11px;
  font-size: 13px;
  white-space: normal;
}

.home-video-hero .home-video-player {
  grid-area: video;
  align-self: auto;
  width: 100%;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

.home-video-player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: linear-gradient(135deg, #183b35, #071d19);
  box-shadow: 0 16px 34px rgba(7, 29, 25, 0.18);
}

.home-video-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.home-video-sound {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

.home-video-sound:hover,
.home-video-sound:focus-visible {
  background: #fff;
  color: var(--brand-dark);
}

.home-video-sound:disabled {
  opacity: 0;
  pointer-events: none;
}

.home-video-thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-video-placeholder {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  height: 100%;
  padding: 24px;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, rgba(7, 29, 25, 0.12), rgba(7, 29, 25, 0.52));
}

.home-video-play {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-dark);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.home-video-play:hover,
.home-video-play:focus-visible { background: #d4c08a; }

.home-video-play span {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid currentColor;
}

.home-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 28px 0;
}

.home-section-card,
.home-opportunities,
.home-call-to-action {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.home-section-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.home-section-card-featured {
  background: #f4faf8;
}

.home-section-card .eyebrow,
.home-opportunities .eyebrow {
  margin: 0;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-section-card h2,
.home-section-card p,
.home-opportunities h2,
.home-opportunities p,
.home-call-to-action h2,
.home-call-to-action p {
  margin: 0;
}

.home-opportunities {
  margin: 28px 0;
  background: #f7f8f7;
}

.home-opportunities .eyebrow {
  color: var(--brand-dark);
}

.home-opportunities > div {
  max-width: 760px;
}

.home-call-to-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 24px;
  align-items: center;
  margin: 28px 0 44px;
}

.home-call-to-action > div:first-child {
  align-self: center;
  display: grid;
  align-content: center;
}

.home-call-actions {
  display: grid;
  gap: 10px;
  min-width: 260px;
  align-self: center;
}

.home-call-actions .button {
  justify-content: center;
  width: 100%;
}

.agency-page-hero {
  display: grid;
  align-items: end;
  min-height: 430px;
  margin: 24px 0 28px;
  padding: 54px clamp(22px, 5vw, 64px);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 45, 49, 0.92), rgba(15, 45, 49, 0.72)),
    url("/assets/img/site/home-hero-portugal.jpg") center/cover;
  color: #fff;
}

.partners-page-hero {
  display: grid;
  align-items: end;
  min-height: 310px;
  margin: 24px 0 28px;
  padding: 54px clamp(22px, 5vw, 64px);
  border-radius: 8px;
  background:
    linear-gradient(105deg, rgba(7, 29, 25, 0.94), rgba(16, 62, 53, 0.72)),
    url("/assets/img/site/home-hero-portugal.jpg") center/cover;
  color: #fff;
}

.partners-page-hero > div { max-width: 720px; }
.partners-page-hero h1 { color: #fff; }
.partners-page-hero p { max-width: 640px; color: #edf3f2; font-size: 18px; }

.partner-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 28px 0 48px;
}

.partner-category-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.partner-category-placeholder {
  aspect-ratio: 16 / 9;
  margin: 0 24px 24px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(18, 72, 62, 0.08), rgba(212, 192, 138, 0.16)),
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(18, 72, 62, 0.035) 18px 19px);
}

.partner-category-card h2 {
  margin: 0 24px 24px;
  padding: 20px 0 12px;
  border-bottom: 2px solid #d4c08a;
  color: var(--brand-dark);
}

.partner-profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 0 24px 26px;
}

.partner-logo-link {
  display: block;
  width: 62px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.partner-logo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.partner-profile-details {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.partner-profile-details h3 { margin: 0 0 4px; color: var(--brand-dark); }
.partner-profile-details address { display: grid; color: var(--muted); font-style: normal; line-height: 1.5; }
.partner-profile-details > a:not(.button) { overflow-wrap: anywhere; color: var(--brand-dark); }
.partner-website-link {
  width: fit-content;
  margin-top: 6px;
  color: var(--brand-dark);
  font-weight: 750;
  text-decoration: none;
}

.agency-page-hero > div {
  max-width: 840px;
}

.agency-page-hero h1 {
  max-width: 860px;
  color: #fff;
}

.agency-page-hero p {
  max-width: 760px;
  color: #edf3f2;
  font-size: 18px;
}

.process-page-hero {
  align-items: center;
}

.agency-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 18px;
  margin: 28px 0;
}

.agency-page-card,
.agency-page-split,
.agency-page-contact {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.agency-page-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.agency-page-card-featured {
  background: #f4faf8;
}

.agency-page-card > span,
.agency-page-card > h2,
.agency-page-card > p {
  margin: 0;
}

.agency-page-card > span,
.agency-page-card .eyebrow,
.agency-page-split .eyebrow,
.agency-page-contact .eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.agency-page-card h2,
.agency-page-split h2,
.agency-page-contact h2 {
  color: var(--ink);
  line-height: 1.2;
}

.agency-page-split {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(300px, 1fr);
  gap: 28px;
  align-items: start;
  margin: 28px 0;
}

.agency-page-split h2,
.agency-page-split p,
.agency-page-contact h2,
.agency-page-contact p {
  margin-top: 0;
}

.agency-benefit-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.agency-benefit-list li {
  position: relative;
  padding: 12px 14px 12px 38px;
  border: 1px solid #d6e4e1;
  border-radius: 6px;
  background: #f9fbfa;
  color: var(--ink);
  font-weight: 650;
}

.agency-benefit-list li::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 17px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4c08a;
}

.agency-commercial-model {
  margin: 28px 0;
}

.agency-page-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 24px;
  align-items: center;
  margin: 28px 0 44px;
  background: #f7f8f7;
}

.agency-page-contact > div:first-child {
  align-self: center;
  display: grid;
  align-content: center;
}

.how-works-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
  counter-reset: process;
}

.how-works-step {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 238px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.how-works-step::after {
  content: "";
  position: absolute;
  top: 34px;
  right: -12px;
  width: 18px;
  height: 18px;
  border-top: 2px solid #d4c08a;
  border-right: 2px solid #d4c08a;
  transform: rotate(45deg);
  background: #fff;
  z-index: 1;
}

.how-works-step:nth-child(4)::after,
.how-works-step:last-child::after {
  display: none;
}

.how-works-step-featured {
  background: #f4faf8;
}

.how-works-step > span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.how-works-step h2,
.how-works-step p {
  margin: 0;
}

.how-works-step h2 {
  color: var(--ink);
  line-height: 1.2;
}

.how-works-step p {
  color: var(--muted);
}

.how-works-summary {
  align-items: start;
}

.agency-contact-actions {
  display: grid;
  gap: 10px;
  min-width: 260px;
  align-self: center;
}

.agency-contact-actions .button {
  justify-content: center;
  width: 100%;
}

.contact-page-hero {
  display: grid;
  align-items: center;
  min-height: 430px;
  margin: 24px 0 28px;
  padding: 54px clamp(22px, 5vw, 64px);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 45, 49, 0.92), rgba(15, 45, 49, 0.72)),
    url("/assets/img/site/home-hero-portugal.jpg") center/cover;
  color: #fff;
}

.contact-page-hero > div {
  max-width: 840px;
}

.contact-page-hero h1 {
  max-width: 860px;
  color: #fff;
}

.contact-page-hero p {
  max-width: 760px;
  color: #edf3f2;
  font-size: 18px;
}

.register-interest-hero {
  min-height: 0;
  margin: 18px 0 22px;
  padding: 28px clamp(18px, 4vw, 36px);
}

.register-interest-hero h1 {
  margin-bottom: 8px;
}

.register-interest-hero p:last-child {
  margin-bottom: 0;
}

.contact-page {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
  margin: 34px 0 48px;
}

.contact-form,
.contact-details-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.contact-details-card {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 30px;
}

.contact-details-card .eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-details-card h2 {
  margin-bottom: 0;
}

.contact-details-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.contact-details-list > div {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid #d6e4e1;
  border-radius: 8px;
  background: #f9fbfa;
}

.contact-details-list > div:first-child {
  grid-column: 1 / -1;
}

.contact-details-list dt,
.contact-details-list dd {
  margin: 0;
}

.contact-details-list dt {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-details-list dd,
.contact-details-list a {
  color: var(--ink);
}

.contact-details-list dd {
  font-weight: 400;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.contact-details-list .company-details {
  display: grid;
  gap: 5px;
}

.contact-details-list .company-details strong {
  font-weight: 650;
}

.contact-details-list a {
  text-decoration: none;
  font-weight: 500;
}

.contact-details-list a:hover,
.contact-details-list a:focus-visible {
  text-decoration: underline;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
  min-height: 420px;
  padding: 26px;
}

.contact-form-head {
  grid-column: 1 / -1;
}

.contact-form-head .eyebrow {
  margin: 0;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-hp-field,
.bot-trap-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form label {
  display: grid;
  gap: 7px;
}

.contact-form label span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.contact-message-field,
.contact-form button {
  grid-column: 1 / -1;
}

.contact-form textarea {
  min-height: 170px;
  resize: vertical;
}

.contact-form button {
  justify-self: stretch;
  width: 100%;
}

.register-interest-page {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
}

.register-interest-page .contact-form {
  grid-template-columns: 1fr;
  min-height: 0;
  width: 100%;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 11px 16px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: var(--button-font-weight);
  line-height: 1;
  cursor: pointer;
}

.button:hover,
button:hover { background: var(--brand-dark); }
.nav-logout-form button:hover,
.nav-logout-form button:focus-visible {
  background: transparent;
}
.button.ghost { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.45); }
.button.ghost-dark { background: #eef2f4; color: var(--ink); }
.button.ghost-dark:hover { background: var(--brand-dark); color: #fff; }
.button.secondary,
button.secondary { background: #eef2f4; color: var(--ink); }
.button.secondary:hover,
button.secondary:hover { background: #dfe7ea; }
.button.danger,
button.danger { background: var(--danger); color: #fff; }
.button.danger:hover,
button.danger:hover { background: #7e2424; }
.button:disabled,
button:disabled,
.button[aria-busy="true"],
button[aria-busy="true"] {
  opacity: 0.72;
  cursor: wait;
  pointer-events: none;
}
.button-spinner {
  width: 1em;
  height: 1em;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  flex: 0 0 auto;
  animation: button-spinner-rotate 0.7s linear infinite;
}
@keyframes button-spinner-rotate {
  to { transform: rotate(360deg); }
}
.button.small { min-height: 42px; padding: 11px 16px; font-size: inherit; }
.button.wide { width: 100%; margin-top: 16px; }

.registration-actions {
  display: grid;
  gap: 6px;
}

.registration-actions .button.wide { margin-top: 0; }

.overview-action {
  width: 150px;
  flex: 0 0 150px;
  white-space: nowrap;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  margin: 16px 0 20px;
}

.metrics > div {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(23, 32, 42, 0.04);
}

.metrics > div:hover {
  border-color: #b8d2ce;
  background: #fbfdfc;
}

.metric-card,
.auction-panel,
.auth,
.timeline article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric-card {
  display: block;
  padding: 10px 11px;
}

.metric-card:hover {
  border-color: #b8d2ce;
  background: #fbfdfc;
}

.metrics strong,
.metric-card strong {
  display: block;
  color: var(--brand);
  font-size: 20px;
  line-height: 1;
}

.dashboard-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  width: 100%;
  margin: 18px 0 26px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.dashboard-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #30404f;
  font-size: 13px;
  font-weight: var(--button-font-weight);
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}

.dashboard-tabs a.active {
  border-color: #b8d2ce;
  background: #e8f3f1;
  color: var(--brand-dark);
}

.dashboard-tabs span {
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  min-width: 20px;
  min-height: 18px;
  padding: 1px 6px;
  border-radius: 6px;
  background: #eef2f4;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  text-align: center;
}

.dashboard-tabs [data-discussion-unread-badge] {
  display: inline-flex;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-indent: 0;
}

.admin-dashboard-tabs {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}

.admin-dashboard-tabs a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  padding-inline: 8px;
  font-size: 12px;
}

.admin-dashboard-tabs a > span {
  justify-self: end;
}

@media (min-width: 821px) {
  html[lang="pt-PT"] .admin-dashboard-tabs {
    grid-template-columns: 0.75fr 0.75fr 0.9fr 0.75fr 1.18fr 0.9fr 0.78fr 0.92fr 1.28fr 1.48fr;
  }

  html[lang="pt-PT"] .admin-dashboard-tabs a {
    padding-inline: 7px;
    font-size: 11px;
    line-height: 1.15;
  }
}

.property-edit-tabs,
.settings-tabs,
.buyer-dashboard-tabs,
.agency-dashboard-tabs,
.seller-dashboard-tabs {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.metrics span,
dt,
.list-row span {
  color: var(--muted);
  font-size: 14px;
}

.list-row span strong {
  color: var(--ink);
  font-weight: 750;
}

.metrics span {
  line-height: 1.25;
  font-size: 11px;
}

.page-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 38px 0 16px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px 18px;
  margin: 38px 0 16px;
  text-align: left;
}

.section-head h2 {
  grid-column: 1;
  margin-bottom: 0;
}

.section-head p {
  grid-column: 1;
  flex: 1 1 auto;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: left;
}

.section-head > a,
.section-head > button {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  align-self: end;
}

.dashboard-tabs ~ .section-head {
  margin: 30px 0 16px;
  padding: 3px 0 13px 15px;
  border-left: 3px solid var(--brand);
  border-bottom: 1px solid #d8e4e2;
}

.dashboard-tabs ~ .section-head h2,
.audit-events-section-head h2 {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.dashboard-tabs ~ .section-head p,
.audit-events-section-head p {
  max-width: 780px;
  color: #607382;
  font-size: 14px;
  line-height: 1.5;
}

.dashboard-tabs ~ .section-head > a,
.dashboard-tabs ~ .section-head > button,
.audit-events-section-head > a,
.audit-events-section-head > button {
  align-self: center;
  margin-bottom: 1px;
}

.dashboard-tabs ~ .section-head .button,
.dashboard-tabs ~ .section-head button,
.audit-events-section-head .button,
.audit-events-section-head button,
.dashboard-tabs ~ .list .button,
.dashboard-tabs ~ .list button,
.dashboard-tabs ~ .list-row .button,
.dashboard-tabs ~ .list-row button {
  min-height: 36px;
  height: 36px;
  padding: 8px 12px;
  font-size: 14px;
}

.page-title {
  display: block;
  padding: 34px 0 10px;
}

.page-title.dashboard-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.page-title.dashboard-title > div {
  min-width: 0;
}

.dashboard-account-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 9px;
}

.dashboard-account-identity > * + *::before {
  content: "\00b7";
  margin-right: 9px;
  color: #91a0aa;
}

.admin-dashboard-title,
.agency-dashboard-title,
.buyer-dashboard-title {
  position: relative;
  align-items: flex-end;
  min-height: 154px;
  padding: 42px 0 24px 22px;
  border-bottom: 1px solid #d8e4e2;
}

.admin-dashboard-title::before,
.agency-dashboard-title::before,
.buyer-dashboard-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 44px;
  bottom: 25px;
  width: 4px;
  border-radius: 2px;
  background: var(--brand);
}

.admin-dashboard-title h1,
.agency-dashboard-title h1,
.buyer-dashboard-title h1 {
  margin: 0;
  font-size: clamp(32px, 3.5vw, 42px);
}

.admin-dashboard-title .dashboard-account-identity,
.agency-dashboard-title .dashboard-account-identity,
.buyer-dashboard-title .dashboard-account-identity {
  margin: 8px 0 0;
  color: #5f7180;
  font-size: 15px;
}

.admin-dashboard-title .dashboard-account-name,
.agency-dashboard-title .dashboard-account-name,
.buyer-dashboard-title .dashboard-account-name {
  color: #344754;
  font-weight: 700;
}

.buyer-dashboard-title {
  display: block;
  min-height: 0;
  margin: 28px 0 18px;
  padding: 22px 24px;
  border: 1px solid #d5e1df;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(24, 49, 59, 0.05);
}

.buyer-dashboard-title::before {
  display: none;
}

.buyer-dashboard-title > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.page-title.buyer-dashboard-title h1 {
  color: var(--ink);
  font-size: 28px;
}

.buyer-dashboard-title .dashboard-account-identity {
  display: flex;
  justify-content: flex-end;
  gap: 5px 9px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.buyer-dashboard-title .dashboard-account-identity > * + *::before {
  display: inline;
}

.buyer-dashboard-title .dashboard-account-name {
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 600;
}

.dashboard-tabs.buyer-dashboard-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 26px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.dashboard-tabs.buyer-dashboard-tabs a {
  justify-content: center;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dashboard-tabs.buyer-dashboard-tabs a.active {
  border-color: #b8d2ce;
  background: #e8f3f1;
}

.dashboard-tabs.buyer-dashboard-tabs ~ .section-head {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 5px;
  margin: 0 0 14px;
  padding: 18px 20px;
  border: 1px solid #d5e1df;
  border-top: 3px solid #5a8f86;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(24, 49, 59, 0.05);
}

.dashboard-tabs.buyer-dashboard-tabs ~ .section-head h2 {
  grid-column: 1;
  font-size: 22px;
}

.dashboard-tabs.buyer-dashboard-tabs ~ .section-head p {
  grid-column: 1;
  max-width: 620px;
}

.admin-dashboard-title,
.agency-dashboard-title {
  align-items: center;
  min-height: 0;
  margin: 28px 0 18px;
  padding: 22px 24px;
  border: 1px solid #d5e1df;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(24, 49, 59, 0.05);
}

.admin-dashboard-title::before,
.agency-dashboard-title::before {
  display: none;
}

.page-title.admin-dashboard-title h1,
.page-title.agency-dashboard-title h1 {
  color: var(--ink);
  font-size: 30px;
}

.admin-dashboard-title .dashboard-account-identity,
.agency-dashboard-title .dashboard-account-identity {
  color: var(--muted);
}

.admin-dashboard-title .dashboard-account-name,
.agency-dashboard-title .dashboard-account-name {
  color: var(--brand-dark);
}

.page-title.dashboard-title.settings-page-title {
  display: flex;
  align-items: center;
  min-height: 0;
  margin: 28px 0 18px;
  padding: 22px 24px;
  border: 1px solid #d5e1df;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(24, 49, 59, 0.05);
  text-align: left;
}

.page-title.dashboard-title.settings-page-title::before {
  display: none;
}

.page-title.dashboard-title.settings-page-title > div {
  display: block;
  min-width: 0;
}

.page-title.dashboard-title.settings-page-title h1 {
  color: var(--ink);
  font-size: 30px;
}

.page-title.dashboard-title.settings-page-title .dashboard-account-identity {
  display: flex;
  justify-content: flex-start;
  min-width: 0;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.page-title.dashboard-title.settings-page-title .dashboard-account-name {
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 600;
}

.admin-dashboard-tabs ~ .section-head,
.agency-dashboard-tabs ~ .section-head,
.audit-events-section-head {
  margin: 0 0 14px;
  padding: 18px 20px;
  border: 1px solid #d5e1df;
  border-top: 3px solid #5a8f86;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(24, 49, 59, 0.05);
}

.dashboard-agency-logo {
  flex: 0 0 auto;
  width: 112px;
  height: 72px;
  object-fit: contain;
  padding: 1px;
  border: 1px solid #d6e4e1;
  border-radius: 8px;
  background: #fff;
}

.page-title h1 {
  color: var(--ink);
  font-size: clamp(28px, 3.5vw, 42px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;
}

.property-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.property-card:hover,
.property-card:focus-visible {
  border-color: #b8d2ce;
  box-shadow: 0 12px 28px rgba(23, 32, 42, 0.08);
  transform: translateY(-1px);
}

.property-card:focus-visible {
  outline: 3px solid rgba(11, 90, 85, 0.24);
  outline-offset: 3px;
}

.property-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.property-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 220px;
  aspect-ratio: 4 / 3;
  border: 1px dashed #c8d3d1;
  background: #f6f8f7;
  color: var(--muted);
  font-weight: 760;
  text-align: center;
}

.property-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.property-body p {
  margin-top: auto;
}

.property-card-footer {
  display: grid;
  gap: 14px;
  margin-top: auto;
  padding-top: 16px;
}

.property-card-footer dl {
  grid-template-columns: minmax(0, 1.5fr) minmax(90px, 1fr) 44px;
  margin-top: 0;
}

.property-card-footer dl > div {
  display: grid;
  grid-template-rows: minmax(16px, auto) minmax(31px, auto);
  align-items: start;
}

.property-card-agency {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.property-card-agency img,
.property-card-agency-placeholder {
  width: 34px;
  height: 34px;
  border: 1px solid #d6e4e1;
  border-radius: 7px;
  background: #fff;
}

.property-card-agency img {
  object-fit: contain;
  padding: 1px;
}

.property-card-agency-placeholder {
  display: grid;
  place-items: center;
  color: var(--brand);
  font-weight: 800;
}

.property-card-agency span:last-child {
  overflow-wrap: anywhere;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.property-card .status-row .property-status-pill {
  height: 22px;
  min-height: 22px;
  padding: 0 9px;
  line-height: 1;
}

.pill {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 5px 14px;
  border-radius: 6px;
  background: #e6f0ef;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.property-status-pill.is-issue {
  background: #fff5f5;
  color: var(--danger);
}

.property-status-pill.is-muted {
  background: #eef2f4;
  color: var(--muted);
}

.property-status-pill.status-live,
.property-status-pill.status-certified,
.property-status-pill.status-sold {
  background: #e4f5e9;
  color: #176536;
}

.property-status-pill.status-scheduled,
.property-status-pill.status-submitted,
.property-status-pill.status-approved-for-auction {
  background: #e8f1fb;
  color: #245d91;
}

.property-status-pill.status-pending,
.property-status-pill.status-legal-review,
.property-status-pill.status-compliance-review,
.property-status-pill.status-returned {
  background: #fff3d8;
  color: #805a08;
}

.property-status-pill.status-rejected,
.property-status-pill.status-cancelled {
  background: #fff0f0;
  color: #a52d2d;
}

.property-status-pill.status-draft,
.property-status-pill.status-closed,
.property-status-pill.status-withdrawn {
  background: #eef2f4;
  color: #5f6b76;
}

.dashboard-property-name-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.dashboard-property-name-line > strong {
  min-width: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.dashboard-property-name-line .property-status-pill {
  min-height: 20px;
  padding: 3px 8px;
  font-size: 11px;
}

.property-title-status-pills {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  align-self: center;
}

.property-title-status-pills .pill {
  min-height: 20px;
  padding: 3px 7px;
  font-size: 11px;
  line-height: 1.2;
}

.property-title-status-pills .property-approval-waiting-pill {
  min-height: 20px;
  padding: 3px 8px;
  background: #fff3d8;
  color: #805a08;
  font-size: 11px;
  font-weight: 650;
}

.property-title-status-pills .property-relist-available-pill {
  min-height: 20px;
  padding: 3px 8px;
  background: #e5f3f0;
  color: #17675f;
  font-size: 11px;
  font-weight: 650;
}

.buyer-property-card .buyer-property-card-body > .buyer-referral-attribution {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 6px;
  margin-bottom: 10px;
  padding: 7px 9px;
  border-left: 3px solid var(--brand);
  background: #f5f9f8;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.buyer-referral-attribution strong {
  color: var(--ink);
  font-size: 13px;
}

.buyer-bid-title-pills .referral-status-pill {
  min-height: 20px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0 0;
}

dt { margin-bottom: 4px; }
dd { margin: 0; font-weight: 780; }

.property-card-footer dt {
  min-height: 16px;
  line-height: 1.2;
  white-space: nowrap;
}

.property-card-footer dd {
  display: grid;
  align-content: start;
  gap: 2px;
  min-width: 0;
  min-height: 31px;
}

.property-card-date {
  overflow-wrap: anywhere;
}

.property-card-footer dd small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
}

.detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 28px;
  margin: 28px 0;
}

.detail > img,
.gallery-main {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  background: #e9eef0;
  border-radius: 8px;
  cursor: zoom-in;
}

.gallery-main.property-placeholder {
  min-height: 320px;
  object-fit: unset;
}

.property-gallery {
  display: grid;
  gap: 10px;
  align-self: start;
  min-width: 0;
}

.property-media-stack {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  min-width: 0;
}

.property-auction-column {
  align-self: start;
  min-width: 0;
}

.property-mobile-summary {
  display: grid;
  gap: 0;
}

.property-mobile-heading {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.property-mobile-heading-gallery {
  display: none;
}

.property-mobile-heading > .pill {
  justify-self: start;
  width: auto;
  max-width: max-content;
}

.property-detail-address {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.property-detail-address strong {
  color: var(--ink);
}

.property-market-card {
  display: grid;
  gap: 10px;
  margin: 8px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.property-market-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.property-market-metrics div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dce6e4;
  border-radius: 8px;
  background: #fff;
}

.property-market-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.property-market-metrics strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
}

.property-market-range {
  white-space: nowrap;
}

.property-market-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.property-description-card {
  display: grid;
  gap: 4px;
  margin: 8px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.property-description-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.38;
}

.property-description-card p.is-clamped {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 20;
}

.property-description-card button[hidden] {
  display: none;
}

.property-description-card .button {
  justify-self: end;
  min-height: 30px;
  padding: 6px 10px;
  font-size: 13px;
}

.property-section-card {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.property-viewing-card {
  grid-column: 1;
}

.property-auction-column > .property-section-card {
  margin-top: 14px;
}

.property-section-card h2 {
  margin-bottom: 0;
}

.property-question-card {
  display: grid;
  gap: 10px;
  margin: -4px 0 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.property-question-card[hidden] {
  display: none;
}

.property-question-card h2,
.property-question-card p {
  margin: 0;
}

.property-question-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.compact-question-form {
  gap: 8px;
}

.question-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.question-form-actions .button,
.question-form-actions button {
  min-width: 118px;
}

.agency-property-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(23, 32, 42, 0.06);
}

.agency-property-card.no-logo {
  grid-template-columns: minmax(0, 1fr) auto;
}

.agency-property-card img {
  width: 72px;
  height: 72px;
  padding: 8px;
  border: 1px solid #d6e4e1;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.agency-property-card div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.agency-property-card span,
.agency-property-card small {
  color: var(--muted);
  font-size: 13px;
}

.agency-property-card strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 17px;
}

.agency-property-website-link {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--brand);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.agency-property-website-link:hover {
  color: var(--brand-dark);
}

.agency-property-card .button {
  margin-top: 0;
  white-space: nowrap;
}

.agency-property-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.description-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 32, 42, 0.52);
}

.description-modal-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(80vh, 760px);
  overflow: auto;
  padding: 22px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(23, 32, 42, 0.26);
}

.description-modal-panel h2 {
  margin: 0 44px 14px 0;
}

.description-modal-body {
  line-height: 1.6;
}

.description-modal-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-height: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  background: #eef2f4;
  color: var(--ink);
}

.description-modal-close::before,
.description-modal-close::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.description-modal-close::before {
  transform: rotate(45deg);
}

.description-modal-close::after {
  transform: rotate(-45deg);
}

.description-modal-close:hover {
  color: #fff;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  margin-top: 0;
  padding-bottom: 2px;
}

.gallery-thumbs img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.gallery-thumbs img:hover {
  border-color: var(--brand);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(13, 22, 30, 0.86);
}

.image-lightbox img {
  max-width: min(1100px, 96vw);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.image-lightbox button {
  position: fixed;
  width: 42px;
  height: 42px;
  min-height: 0;
  padding: 0;
  flex: 0 0 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
}

.lightbox-close {
  top: 18px;
  right: 18px;
}

.lightbox-close::before,
.lightbox-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}

.lightbox-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.lightbox-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.lightbox-arrow {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

.lightbox-arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 13px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.lightbox-prev::before {
  transform: translate(-38%, -50%) rotate(-45deg);
}

.lightbox-next::before {
  transform: translate(-62%, -50%) rotate(135deg);
}

.property-image-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.property-image-admin-item {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.property-image-admin-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.property-image-order-form {
  display: grid;
  gap: 12px;
}

.photo-order-field {
  display: grid;
  gap: 4px;
}

.photo-order-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.photo-order-field input {
  width: 100%;
  min-width: 0;
}

.photo-order-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
  align-self: end;
  justify-content: stretch;
  width: 100%;
  margin-top: auto;
}

.photo-order-actions .pill {
  grid-column: 1 / -1;
  justify-self: stretch;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.photo-order-actions .button {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 7px 8px;
  font-size: 12px;
  line-height: 1;
}

.empty-panel {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

.detail h1,
.property-responsive-title {
  color: var(--ink);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 700;
  margin: 0;
  line-height: 1.15;
}

.auction-end-live {
  display: grid;
  gap: 10px;
  margin: 18px 0 -10px;
  width: 100%;
  padding: 14px;
  border: 1px solid #b8d2ce;
  border-radius: 8px;
  background: #f3faf8;
  color: var(--ink);
}

.auction-end-live-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

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

.auction-countdown-cell {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid rgba(11, 90, 85, 0.16);
  border-radius: 6px;
  background: #fff;
}

.auction-countdown-cell strong {
  font-size: 24px;
  line-height: 1;
  color: var(--brand-dark);
}

.auction-countdown-cell small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.auction-end-live.ended {
  border-color: var(--line);
  background: #f7f8f8;
}

.auction-end-live.ended .auction-countdown-cell strong {
  color: var(--muted);
}

.auction-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 22px 0;
}

.auction-panel div {
  display: grid;
  align-content: start;
  grid-template-rows: 18px auto;
  min-width: 0;
  padding: 12px 14px;
  background: #fff;
}

.auction-panel span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

.auction-panel strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  white-space: nowrap;
}

.auction-panel.activation-summary-panel {
  grid-template-columns: 1fr;
}

.activation-summary-panel strong {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.22;
}

.activation-summary-panel span {
  white-space: nowrap;
}

.auction-panel strong small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.auction-panel strong.bid-flash {
  animation: bidFlash 1.4s ease-out;
}

.bidder-position-panel {
  display: grid;
  gap: 4px;
  margin: -6px 0 18px;
  padding: 12px 14px;
  border: 1px solid #b8d2ce;
  border-radius: 8px;
  background: #f3faf8;
}

.bidder-position-panel strong {
  color: var(--brand-dark);
}

.bidder-position-panel.is-second,
.bidder-position-panel.is-lower {
  border-color: rgba(159, 47, 47, 0.35);
  background: #fff5f5;
}

.bidder-position-panel.is-second strong,
.bidder-position-panel.is-lower strong {
  color: var(--danger);
}

.bidder-position-panel span {
  color: var(--muted);
  font-size: 13px;
}

.bidder-position-pill {
  border-color: #b8d2ce;
  background: #f3faf8;
  color: var(--brand-dark);
}

.bidder-position-pill.is-second,
.bidder-position-pill.is-lower {
  border-color: rgba(159, 47, 47, 0.35);
  background: #fff5f5;
  color: var(--danger);
}

.qualification-status-pill.is-complete {
  background: #e5f3ed;
  color: #146447;
}

.qualification-status-pill.is-pending {
  background: #fff7df;
  color: #8a6500;
}

.qualification-status-pill.is-issue {
  background: #fff5f5;
  color: var(--danger);
}

.qualification-status-pill.is-muted {
  background: #eef2f4;
  color: var(--muted);
}

.qualification-status-pill.is-released {
  background: #edf6f8;
  color: #21606a;
}

.compliance-status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.agency-compliance-pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 18px;
}

.agency-compliance-pillar.is-complete {
  background: #e5f3ed;
  color: #146447;
}

.agency-compliance-pillar.is-pending {
  background: #fff7df;
  color: #8a6500;
}

.agency-compliance-pillar.is-issue {
  background: #fff5f5;
  color: var(--danger);
}

.bid-status-pill.is-outbid {
  background: #fff5f5;
  color: var(--danger);
}

@keyframes bidFlash {
  0% {
    color: #fff;
    background: var(--brand);
    box-shadow: 0 0 0 6px rgba(11, 90, 85, 0.18);
  }
  100% {
    color: var(--ink);
    background: transparent;
    box-shadow: none;
  }
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 28px 0;
}

.stacked .two-col.onboarding-compact-fields {
  gap: 12px;
  margin: 0;
}

.stacked .two-col.onboarding-compact-fields + .two-col.onboarding-compact-fields {
  margin-top: 0;
}

.stacked .two-col.onboarding-compact-fields + .field-help {
  margin-top: -6px;
}

.stacked .two-col.market-range-fields {
  gap: 12px;
  margin: 0;
}

.stacked .two-col.market-range-fields + .field-help {
  margin-top: -6px;
}

.stacked .onboarding-compact-help {
  margin-top: -8px;
}

.stacked input[type="file"] + .field-help.onboarding-file-help {
  margin-top: -6px;
}

.facts {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.facts th,
.facts td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.facts th { width: 34%; color: var(--muted); }

.list {
  display: grid;
  gap: 10px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.property-workflow-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
}

.property-workflow-card.list-row {
  display: block;
  padding: 0;
  overflow: hidden;
}

.admin-expandable-card.list-row {
  display: block;
  padding: 0;
  overflow: hidden;
}

.property-workflow-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.user-management-summary {
  grid-template-columns: minmax(0, 1fr) max-content 18px;
}

.user-management-summary-status {
  justify-self: end;
  flex-wrap: nowrap;
}

.property-workflow-summary::-webkit-details-marker {
  display: none;
}

.property-workflow-summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.property-workflow-summary .agency-property-row-title {
  margin-bottom: 0;
}

.property-workflow-card:not([open]) .dashboard-property-name-line > strong,
.buyer-property-card:not([open]) .dashboard-property-name-line > strong,
.admin-expandable-card:not([open]) .dashboard-property-name-line > strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.property-workflow-chevron {
  width: 9px;
  height: 9px;
  justify-self: center;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 160ms ease, border-color 160ms ease;
}

.property-workflow-summary:hover .property-workflow-chevron {
  border-color: var(--brand);
}

.property-workflow-card[open] .property-workflow-chevron,
.buyer-property-card[open] .property-workflow-chevron,
.admin-expandable-card[open] .property-workflow-chevron,
.dashboard-chat-thread[open] .property-workflow-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.property-workflow-card > .property-workflow-row {
  padding: 14px;
  border-top: 1px solid var(--line);
}

.admin-expandable-summary:hover {
  background: #fbfdfc;
}

.admin-expandable-body {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.admin-record-details {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.admin-record-details > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-card-secondary-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.admin-compliance-title-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  min-width: 0;
}

.admin-compliance-title-copy > .agency-property-meta::before {
  content: "\00b7";
  color: var(--muted);
}

.admin-compliance-title-copy > strong {
  min-width: 0;
  color: var(--ink);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.admin-expandable-card .management-actions-inline {
  margin-top: 0;
}

.property-workflow-row > div:first-child {
  width: 100%;
  min-width: 0;
}

.agency-property-row-title {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.agency-property-row-title.no-logo {
  grid-template-columns: minmax(0, 1fr);
}

.agency-property-row-title img,
.agency-property-logo-placeholder {
  width: 44px;
  height: 44px;
  border: 1px solid #d6e4e1;
  border-radius: 8px;
  background: #fff;
}

.agency-property-row-title img {
  object-fit: contain;
  padding: 5px;
}

.agency-property-logo-placeholder {
  display: grid;
  place-items: center;
  color: var(--brand);
  font-size: 18px;
  font-weight: 800;
}

.agency-property-row-title > div {
  display: grid;
  align-self: center;
  gap: 2px;
  min-width: 0;
}

.agency-property-row-title .dashboard-property-name-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 6px;
}

.agency-property-row-title strong {
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.agency-property-row-title span {
  color: var(--muted);
  font-size: 13px;
}

.agency-property-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 5px;
  min-width: 0;
  line-height: 1.2;
}

.agency-property-meta > span {
  font-size: 12px;
}

.agency-property-company {
  min-width: 0;
  overflow-wrap: anywhere;
}

.agency-property-ami {
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
}

.agency-property-ami::before {
  content: "\00b7";
  margin-right: 5px;
}

.user-management-meta-separated::before {
  content: "\00b7";
  margin-right: 5px;
}

.list-row .property-public-link-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.property-public-link-row a {
  min-width: 0;
  color: var(--brand);
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-public-link-row a:hover {
  text-decoration: underline;
}

.icon-button.copy-link-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--brand);
  line-height: 1;
  text-transform: none;
}

.dashboard-tabs ~ .list .property-public-link-row button.copy-link-button,
.dashboard-tabs ~ .list-row .property-public-link-row button.copy-link-button {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  padding: 0;
}

.icon-button.copy-link-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-button.copy-link-button:hover,
.icon-button.copy-link-button.is-copied {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.clipboard-copy-fallback {
  position: fixed;
  top: -1000px;
  left: -1000px;
}

.property-workflow-form {
  flex: none;
  width: 100%;
  max-width: 520px;
  height: 100%;
  align-self: stretch;
  align-content: stretch;
  margin-left: 0;
}

.list-row > * {
  min-width: 0;
}

.list-row div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.bid-row div:first-child span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.bid-row {
  justify-content: flex-start;
  padding: 8px 10px;
}

.bid-history-heading {
  margin: 0 0 4px;
}

.bid-history-row {
  opacity: 0.9;
}

.bid-row div:first-child span strong {
  color: var(--ink);
  font-size: 14px;
}

.bid-row .bid-amount {
  display: inline-flex;
  flex: 0 0 auto;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  unicode-bidi: isolate;
}

.buyer-bid-row {
  align-items: flex-start;
  display: block;
}

.buyer-property-card.list-row {
  display: block;
  padding: 0;
  overflow: hidden;
}

.buyer-property-card-body {
  padding: 14px;
  border-top: 1px solid var(--line);
}

.buyer-first-offer-hold-note {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.buyer-property-detail-pills {
  justify-content: flex-start;
  margin-bottom: 10px;
}


.buyer-bid-title-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px;
}

.buyer-bid-title-line > strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.buyer-bid-title-pills {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  align-self: center;
}

.buyer-bid-title-pills .pill {
  margin: 0;
}

.buyer-bid-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 12px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.buyer-bid-facts > div {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border-left: 1px solid var(--line);
}

.buyer-bid-facts > div:first-child {
  border-left: 0;
}

.buyer-bid-facts > .is-wide {
  grid-column: span 2;
}

.buyer-bid-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0;
}

.buyer-bid-facts dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.buyer-bid-facts .is-primary dd {
  color: var(--brand-dark);
  font-size: 16px;
}

.buyer-bid-facts .is-positive dd {
  color: var(--brand);
}

.buyer-bid-facts .is-attention dd {
  color: #805a08;
}

.property-workflow-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 12px 0 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.property-workflow-facts > div {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border-left: 1px solid var(--line);
}

.property-workflow-facts > div:nth-child(odd),
.property-workflow-facts > .is-wide {
  border-left: 0;
}

.property-workflow-facts > .is-wide {
  grid-column: 1 / -1;
}

.property-workflow-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0;
}

.property-workflow-facts dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.property-workflow-facts .is-primary dd {
  color: var(--brand-dark);
  font-size: 16px;
}

.property-workflow-facts.is-agency-compact,
.property-workflow-facts.is-admin-compact {
  margin-top: 8px;
  margin-bottom: 4px;
}

.property-workflow-facts.is-agency-compact > div,
.property-workflow-facts.is-admin-compact > div {
  padding: 7px 8px;
}

.property-workflow-facts.is-agency-compact dt,
.property-workflow-facts.is-admin-compact dt {
  font-size: 10px;
}

.property-workflow-facts.is-agency-compact dd,
.property-workflow-facts.is-admin-compact dd {
  font-size: 13px;
  line-height: 1.25;
}

.property-workflow-facts.is-agency-compact .is-primary dd,
.property-workflow-facts.is-admin-compact .is-primary dd {
  font-size: 14px;
}

.buyer-bid-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: start;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.buyer-bid-card-actions > .button {
  grid-column: 2;
  margin-left: auto;
}

.viewing-actions {
  align-self: stretch;
}

.viewing-summary-content {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.viewing-expandable-summary {
  grid-template-columns: minmax(0, 1fr) auto 18px;
}

.viewing-summary-pills {
  justify-self: end;
}

.viewing-expandable-body {
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: end;
}

.viewing-request-details {
  align-self: start;
}

.viewing-status-form {
  display: grid;
  justify-items: end;
  align-content: end;
  height: 100%;
  gap: 8px;
  width: max-content;
}

.viewing-status-form label {
  display: grid;
  gap: 5px;
  width: 100%;
}

.viewing-status-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.viewing-status-form select {
  width: 100%;
  min-width: 208px;
}

.viewing-action-buttons {
  display: inline-flex;
  gap: 8px;
  width: 100%;
}

.viewing-action-buttons .button,
.viewing-action-buttons button {
  flex: 1 1 0;
  height: 42px;
  min-height: 42px;
  padding: 0 16px;
  line-height: 1;
}

.viewing-action-buttons .view-property-button {
  min-width: max-content;
  white-space: nowrap;
}

.bid-history-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
}

.buyer-bid-history-details {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  margin: 0;
}

.buyer-bid-history-details summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faf8;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.buyer-bid-history-details summary::marker {
  content: "";
}

.buyer-bid-history-details summary::-webkit-details-marker {
  display: none;
}

.buyer-bid-history-details summary::before {
  content: "";
  display: inline-grid;
  place-items: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background:
    linear-gradient(#fff, #fff) center / 9px 2px no-repeat,
    linear-gradient(#fff, #fff) center / 2px 9px no-repeat,
    var(--brand);
}

.buyer-bid-history-details[open] summary::before {
  background:
    linear-gradient(#fff, #fff) center / 9px 2px no-repeat,
    var(--brand);
}

.buyer-bid-history-details summary span {
  color: var(--muted);
  font-size: 12px;
}

.bid-history-item {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.bid-history-item > span,
.bid-history-item > strong {
  min-width: 0;
}

.bid-history-item strong {
  color: var(--ink);
}

.bid-history-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.bid-history-meta time {
  white-space: nowrap;
}

.bid-history-meta time::before {
  content: "·";
  margin-right: 6px;
}

.list:has(.bid-row) {
  gap: 5px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-actions form {
  margin: 0;
}

.row-actions.action-buttons a {
  min-height: 42px;
  padding: 11px 16px;
  background: var(--brand);
  color: #fff;
}

.row-actions.action-buttons a:hover {
  background: var(--brand-dark);
}

.row-actions a,
.link-danger {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-size: 13px;
  font-weight: 760;
}

.link-danger {
  color: var(--danger);
}

.link-danger:hover {
  background: transparent;
}

.list-row > form {
  flex: 0 0 auto;
}

.compliance-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 12px;
}

.compliance-row > form.compliance-form {
  width: 100%;
  max-width: none;
}

.property-edit-title {
  margin-bottom: 0;
}

.property-edit-tabs {
  margin-top: 12px;
}

.property-edit-panel {
  margin-top: 0;
}

.referral-management-panel {
  display: grid;
  gap: 20px;
}

.referral-create-form {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.referral-create-form h3,
.referral-management-panel > h3 {
  margin: 0;
  font-size: 18px;
}

.management-fields.referral-partner-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.referral-partner-fields .referral-address-field {
  grid-column: span 2;
}

.referral-address-field textarea {
  min-height: 92px;
}

.referral-link-list,
.referral-buyer-list {
  margin-top: -8px;
}

.referral-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.referral-link-row .management-summary .referral-link-heading {
  display: block;
  align-items: center;
  min-width: 0;
}

.referral-link-heading strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.referral-link-row .row-actions,
.referral-buyer-list .row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.referral-link-row .row-actions {
  display: grid;
  justify-items: end;
  align-self: stretch;
  align-content: space-between;
}

.referral-link-row .row-actions form {
  margin: 0;
}

.referral-registration-context {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-left: 4px solid var(--brand);
  background: #f3f7f6;
}

.referral-registration-context span,
.referral-registration-context small {
  color: var(--muted);
}

.referral-registration-context + form {
  margin-top: 16px;
}

.referral-registration-context + .registration-readiness {
  margin-top: 18px;
}

.registration-readiness {
  display: grid;
  gap: 22px;
}

.registration-readiness h2,
.registration-readiness h3,
.registration-readiness p {
  margin: 0;
}

.registration-readiness h2 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 24px;
}

.registration-readiness h3 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 16px;
}

.registration-readiness p {
  color: var(--muted);
  line-height: 1.55;
}

.registration-requirements {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: registration-requirement;
}

.registration-requirements li {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px 0 12px 38px;
  border-bottom: 1px solid var(--line);
  counter-increment: registration-requirement;
}

.registration-requirements li:first-child {
  border-top: 1px solid var(--line);
}

.registration-requirements li::before {
  content: counter(registration-requirement);
  position: absolute;
  top: 13px;
  left: 0;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid #b8d2ce;
  border-radius: 50%;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.registration-requirements strong {
  color: var(--ink);
  font-size: 14px;
}

.registration-requirements span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.registration-hold-notice {
  padding: 14px 16px;
  border-left: 4px solid var(--brand);
  background: #f3f7f6;
}

.registration-hold-notice strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}

.referral-admin-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 24px;
}

.referral-admin-metrics > div {
  min-height: 68px;
  gap: 5px;
  padding: 12px 14px;
}

.referral-report-heading {
  margin-top: 26px;
}

.admin-dashboard-tabs ~ .section-head.referral-attribution-heading {
  margin-top: 26px;
}

.referral-admin-table-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.referral-admin-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
}

.referral-link-performance-table col:nth-child(1) { width: 14%; }
.referral-link-performance-table col:nth-child(2) { width: 21%; }
.referral-link-performance-table col:nth-child(3) { width: 13%; }
.referral-link-performance-table col:nth-child(4) { width: 23%; }
.referral-link-performance-table col:nth-child(n + 5):nth-child(-n + 8) { width: 4%; }
.referral-link-performance-table col:nth-child(9) { width: 13%; }
.referral-buyer-table col:nth-child(1) { width: 18%; }
.referral-buyer-table col:nth-child(2) { width: 15%; }
.referral-buyer-table col:nth-child(3),
.referral-buyer-table col:nth-child(4) { width: 13%; }
.referral-buyer-table col:nth-child(5) { width: 10%; }
.referral-buyer-table col:nth-child(n + 6):nth-child(-n + 8) { width: 8%; }
.referral-buyer-table col:nth-child(9) { width: 7%; }

.referral-admin-table th,
.referral-admin-table td {
  min-width: 0;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.referral-admin-table th {
  background: #f4f7f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.referral-admin-table tbody tr:last-child td {
  border-bottom: 0;
}

@media (min-width: 821px) {
  .referral-admin-table:not(.referral-buyer-table) th:nth-child(n + 5):nth-child(-n + 8),
  .referral-admin-table:not(.referral-buyer-table) td:nth-child(n + 5):nth-child(-n + 8) {
    padding-right: 3px;
    padding-left: 3px;
    text-align: center;
  }
}

.referral-admin-table td > strong,
.referral-admin-table td > small,
.referral-admin-table td > a {
  display: block;
}

.referral-admin-table td > small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.3;
}

.referral-admin-table td > a {
  color: var(--brand);
  font-weight: 700;
}

.referral-admin-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  max-width: 100%;
  margin-bottom: 7px;
}

.referral-admin-link a {
  min-width: 0;
  overflow: hidden;
  color: var(--brand);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-admin-empty {
  padding: 24px !important;
  color: var(--muted);
  text-align: center !important;
}

.property-photo-upload {
  margin-bottom: 22px;
}

.form-section-title {
  margin-top: 28px;
}

.locale-fields {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.locale-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(36px, 1fr));
  gap: 4px;
  width: max-content;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.locale-toolbar {
  display: inline-grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
}

.locale-tabs button {
  min-width: 36px;
  min-height: 0;
  height: 24px;
  margin: 0;
  padding: 2px 5px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 0;
}

.locale-tabs button.active {
  background: #e8f3f1;
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px rgba(11, 90, 85, 0.3);
}

.locale-tabs .flag {
  margin: 0 auto;
  flex: 0 0 auto;
}

.locale-panel {
  display: none;
  gap: 12px;
}

.locale-panel.active {
  display: grid;
}

.translate-pt-button {
  flex: 0 0 auto;
  justify-self: start;
  height: 30px;
  min-height: 30px;
  margin-top: 0;
  padding: 6px 12px;
  font-size: 13px;
  white-space: nowrap;
}

.legal-pack-row {
  align-items: stretch;
}

.legal-pack-actions {
  display: grid;
  align-content: end;
  justify-items: end;
}

.legal-pack-index-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.legal-pack-index-actions > .pill,
.legal-pack-index-actions > a {
  width: 132px;
  min-height: 34px;
  white-space: nowrap;
}

.document-access-form {
  display: flex;
  align-items: end;
  gap: 8px;
  margin: 0;
}

.document-access-form label {
  display: grid;
  gap: 4px;
}

.document-access-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.document-access-form select {
  min-width: 132px;
  min-height: 44px;
  padding: 9px 28px 9px 9px;
}

.document-action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.document-action-buttons .button {
  background: var(--brand);
  color: #fff;
}

.document-action-buttons .button:hover {
  background: var(--brand-dark);
}

.document-action-buttons .button.danger {
  background: var(--danger);
}

.document-action-buttons .button.danger:hover {
  background: #7e2424;
}

.list-row > a,
.list-row > .button {
  flex: 0 0 auto;
}

.auth {
  width: min(520px, 100%);
  margin: 46px auto;
  padding: 28px;
}

.wide-auth { width: min(820px, 100%); }
.auth h1 { color: var(--ink); font-size: 40px; }
.auth h1.buyer-registration-title {
  font-size: 32px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.auth-reset-link {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

.auth-reset-link:hover,
.auth-reset-link:focus-visible {
  color: var(--brand-dark);
  text-decoration-color: currentColor;
}

.email-preferences-page {
  max-width: 760px;
}

.email-preferences-page > p {
  margin: 0 0 20px;
  color: var(--muted);
}

.settings-email-preferences > .field-help {
  margin: 0 0 20px;
}

.email-preferences-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.email-preference-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  cursor: pointer;
}

.email-preference-option + .email-preference-option {
  border-top: 1px solid var(--line);
}

.email-preference-option span {
  display: grid;
  gap: 3px;
}

.email-preference-option > span {
  margin-left: 3px;
}

.email-preference-option small {
  color: var(--muted);
  line-height: 1.4;
}

.email-essential-notice {
  margin: 4px 0 0;
}

.email-preference-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.settings-email-preferences .email-preference-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.settings-email-preferences .email-preference-actions .button {
  width: 100%;
}

.settings-email-preferences .email-preference-actions .button[value="save"] {
  grid-column: 1 / -1;
  justify-self: end;
  width: auto;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .auth.settings-email-preferences {
    margin-top: 18px;
    padding: 16px;
  }

  .settings-email-preferences h2 {
    margin-bottom: 10px;
    font-size: 22px;
    line-height: 1.2;
  }

  .settings-email-preferences > .field-help {
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .email-preference-option {
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 12px;
  }

  .email-preference-option > span {
    gap: 5px;
  }

  .email-preference-option strong {
    line-height: 1.3;
  }

  .email-preference-option small {
    font-size: 12px;
    line-height: 1.35;
  }

  .settings-email-preferences .email-essential-notice {
    padding: 12px;
  }

  .settings-email-preferences .email-essential-notice span {
    font-size: 12px;
    line-height: 1.4;
  }

  .email-preference-actions {
    gap: 6px;
  }

  .settings-email-preferences .email-preference-actions {
    grid-template-columns: 1fr;
  }

  .settings-email-preferences .email-preference-actions .button {
    width: 100%;
  }

  .settings-email-preferences .email-preference-actions .button[value="save"] {
    grid-column: auto;
    justify-self: stretch;
    width: 100%;
  }

  .email-preference-actions .button {
    width: 100%;
    min-height: 44px;
    height: auto;
    padding: 11px 12px;
    line-height: 1.25;
    white-space: normal;
    text-align: center;
  }
}

.stacked {
  display: grid;
  gap: 12px;
}

.stacked .field-group {
  display: grid;
  gap: 6px;
}

.stacked .field-group .field-help {
  margin: 0 0 2px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 18px;
}

.tabs a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  font-weight: var(--button-font-weight);
  white-space: nowrap;
}

.tabs a.active {
  border-color: #b8d2ce;
  background: #e8f3f1;
  color: var(--brand-dark);
}

.registration-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 40px;
  padding: 9px 8px;
  font-size: 14px;
  line-height: 1.15;
  white-space: normal;
}

.field-help {
  display: block;
  margin: -6px 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.payment-card-note {
  margin: 14px 0 6px;
}

.field-error {
  display: block;
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.field-error[hidden] {
  display: none;
}

input[type="file"] + .field-help,
.agency-logo-form .field-help {
  margin-top: 4px;
}

.inline-field {
  flex: 1 1 auto;
  min-width: 0;
}

.inline-field .field-help {
  margin: 5px 0 0;
}

input,
textarea,
select {
  max-width: 100%;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #cfd8df;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

select[name="pep_declaration"],
select[name="pep_declaration"] option {
  text-transform: none;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select {
  height: 44px;
  line-height: 1.35;
}

input[type="file"] {
  min-height: 44px;
  padding: 7px;
  color: var(--muted);
  line-height: 28px;
}

.readonly-money-input:disabled {
  color: #64748b;
  background: #eef2f6;
  border-color: #d7dee7;
  text-align: right;
  opacity: 1;
}

input[type="file"]::file-selector-button {
  min-height: 30px;
  margin: 0 10px 0 0;
  padding: 7px 12px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: var(--button-font-weight);
  line-height: 1;
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  background: var(--brand-dark);
}

input[type="file"]::-webkit-file-upload-button {
  min-height: 30px;
  margin: 0 10px 0 0;
  padding: 7px 12px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: var(--button-font-weight);
  line-height: 1;
  cursor: pointer;
}

select {
  padding-top: 9px;
  padding-bottom: 9px;
  font-size: 14px;
}

input[type="date"],
input[type="datetime-local"],
input[type="time"] {
  appearance: none;
  -webkit-appearance: none;
}

textarea { min-height: 100px; resize: vertical; }

.money-input {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfd8df;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.money-input > span {
  flex: 0 0 auto;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-left: 1px solid #dfe6eb;
  background: #f4f7f8;
  color: var(--brand-dark);
  font-weight: 780;
}

.money-input input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: right;
}

.money-input input:focus {
  outline: 2px solid rgba(11, 90, 85, 0.2);
  outline-offset: -2px;
}

.inline-form,
.row-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-form .inline-field input[type="number"],
.inline-form .inline-field .money-input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: none;
}

.inline-form button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.bid-form .inline-field {
  flex: 0 1 50%;
}

.bid-form {
  flex-wrap: wrap;
}

.bid-form > .field-error {
  flex: 0 0 100%;
  width: 100%;
  margin: 0;
}

.bid-form .inline-field .money-input {
  width: 100%;
}

.bid-form button {
  flex: 1 1 auto;
}

.bid-learn-more {
  justify-self: start;
  width: auto;
  min-height: 28px;
  margin-top: 2px;
  padding: 6px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.bid-learn-more:hover,
.bid-learn-more:focus-visible {
  color: #fff;
}

.reserve-info-content h3 {
  margin: 18px 0 6px;
  font-size: 17px;
}

.reserve-info-content ul {
  margin: 0 0 8px 20px;
  padding: 0;
}

.reserve-info-content li + li {
  margin-top: 6px;
}

.property-primary-action {
  display: flex;
  justify-content: center;
  width: 100%;
}

.row-form select { min-width: 120px; }

.labelled-form {
  align-items: start;
}

.labelled-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.labelled-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.labelled-form label small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.labelled-form select {
  min-width: 0;
}

.labelled-form input[type="datetime-local"] {
  min-width: 0;
}

.auction-settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  justify-content: stretch;
  align-items: start;
  max-width: 100%;
  width: 100%;
}

.auction-settings-form > label {
  grid-template-rows: auto 44px auto;
  row-gap: 6px;
  min-width: 0;
}

.auction-settings-form select,
.auction-settings-form input[type="datetime-local"] {
  height: 44px;
  min-height: 44px;
}

.auction-settings-form small {
  min-height: 0;
  line-height: 1.35;
}

.property-workflow-form.auction-settings-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  row-gap: 10px;
}

.property-workflow-form.auction-settings-form > label {
  grid-template-rows: 16px 44px auto;
  row-gap: 3px;
}

.property-workflow-readonly-date {
  display: grid;
  grid-template-rows: 16px auto auto;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.property-workflow-readonly-date > span,
.property-workflow-readonly-date > small {
  color: var(--muted);
}

.property-workflow-readonly-date > span {
  font-size: 12px;
  font-weight: 760;
}

.property-workflow-readonly-date > strong {
  padding: 10px 0 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

.property-workflow-readonly-date > small {
  font-size: 11px;
  line-height: 1.35;
}

.property-workflow-form .auction-ends-field {
  grid-column: auto;
}

.property-workflow-form .approval-status-field {
  grid-column: 1 / -1;
  row-gap: 3px;
}

.property-workflow-form .approval-status-field small {
  line-height: 1.2;
}

.auction-ends-field {
  grid-column: 2;
}

.property-action-buttons {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  align-self: start;
  gap: 8px;
  margin-top: 0;
  padding-top: 17px;
  grid-column: 1 / -1;
  flex-wrap: wrap;
}

.property-workflow-form .property-action-buttons {
  display: inline-flex;
  grid-row: 4;
  align-self: end;
  justify-self: end;
  width: auto;
  margin-top: auto;
  padding-top: 0;
}

.property-workflow-form .auction-ends-field {
  margin-top: 0;
}

.certificate-row {
  align-items: stretch;
}

.certificate-summary-content {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.certificate-summary-content .dashboard-property-name-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
}

@media (min-width: 761px) {
  .agency-property-row-title > div {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-rows: repeat(4, auto);
    column-gap: 6px;
  }

  .agency-property-row-title .dashboard-property-name-line,
  .certificate-summary-content .dashboard-property-name-line {
    display: contents;
  }

  .agency-property-row-title .dashboard-property-name-line > :first-child,
  .certificate-summary-content .dashboard-property-name-line > :first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .agency-property-row-title .dashboard-property-name-line > :last-child:not(:first-child),
  .certificate-summary-content .dashboard-property-name-line > :last-child:not(:first-child) {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
  }

  .agency-property-row-title > div > :not(.dashboard-property-name-line),
  .certificate-summary-content > :not(.dashboard-property-name-line) {
    grid-column: 1;
  }

  .certificate-summary-content {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-rows: repeat(3, auto);
    column-gap: 6px;
  }
}

.certificate-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0;
}

.certificate-facts > div {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border-left: 2px solid #d8e6e3;
  background: #f8fbfa;
}

.certificate-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.certificate-facts dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.certificate-facts small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.certificate-actions {
  justify-self: end;
  padding-top: 0;
}

.certificate-row .property-action-buttons {
  align-self: end;
  padding-top: 0;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.property-action-buttons .button,
.property-action-buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  min-height: 42px;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
}

.certificate-row .property-action-buttons .button,
.certificate-row .property-action-buttons button {
  white-space: nowrap;
}

.relist-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d6e4e1;
  border-radius: 6px;
  background: #f4faf8;
}

.relist-panel > strong {
  font-size: 14px;
}

.auction-relist-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px 14px;
  align-items: start;
  justify-content: stretch;
  width: 100%;
}

.auction-relist-form > label {
  display: grid;
  grid-template-rows: 16px 44px minmax(28px, auto);
  gap: 5px;
}

.relist-action-cell {
  display: grid;
  grid-template-rows: 4px 44px 0;
  gap: 5px;
  align-items: start;
  padding-top: 0;
}

.relist-action-cell > span,
.relist-action-cell > small {
  visibility: hidden;
  pointer-events: none;
}

.auction-relist-form input[type="datetime-local"] {
  height: 44px;
  min-height: 44px;
  min-width: 250px;
  width: 100%;
}

.auction-relist-form button {
  min-width: 150px;
  height: 44px;
  min-height: 44px;
  margin-top: 0;
  width: 100%;
  align-self: start;
}

.admin-relist-panel {
  gap: 8px;
  padding: 10px;
}

.admin-auction-relist-form {
  grid-template-columns: repeat(2, minmax(170px, 1fr)) max-content;
  gap: 10px;
  align-items: start;
}

.admin-auction-relist-form input[type="datetime-local"],
.admin-auction-relist-form .admin-relist-action-cell button {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.admin-auction-relist-form input[type="datetime-local"] {
  min-width: 0;
}

.admin-relist-action-cell {
  display: grid;
  grid-template-rows: 16px 44px minmax(28px, auto);
  gap: 5px;
  align-items: start;
  justify-self: end;
  width: auto;
  padding-top: 0;
}

.admin-relist-action-cell button {
  grid-row: 2;
  width: auto;
}

.management-row {
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  align-items: flex-start;
  gap: 16px;
}

.management-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.management-form {
  display: grid;
  gap: 14px;
  width: 100%;
}

.management-summary {
  width: 100%;
}

.management-summary > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.management-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.management-fields label {
  min-width: 0;
}

.labelled-form label.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-top: 6px;
}

.labelled-form label.checkbox-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.labelled-form label.checkbox-field .checkbox-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.stacked label.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 2px 0 4px;
}

.stacked label.checkbox-field input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 1px 0 0;
}

.stacked label.checkbox-field .checkbox-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.stacked label.checkbox-field .checkbox-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.25;
}

.stacked label.checkbox-field .checkbox-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.25;
}

.owner-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.72);
}

.owner-editor-head,
.owner-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.owner-editor-head h2 {
  margin: 0 0 2px;
  font-size: 18px;
}

.owner-editor-head .field-help {
  margin: 0;
}

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

.owner-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 8px;
  background: #fff;
}

.owner-card-head strong {
  font-size: 13px;
  letter-spacing: 0;
}

.owner-corporate {
  padding: 2px 0;
}

.labelled-form label.checkbox-field .checkbox-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.25;
}

.labelled-form label.checkbox-field .checkbox-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  margin: 0;
  line-height: 1.25;
}

.management-form textarea {
  min-height: 70px;
}

.management-fields textarea {
  width: 100%;
}

.management-agency-logo {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  position: absolute;
  top: 16px;
  right: 16px;
}

.management-agency-logo img {
  width: 104px;
  height: 64px;
  object-fit: contain;
  padding: 8px;
  border: 1px solid #d6e4e1;
  border-radius: 8px;
  background: #fff;
}

.management-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.management-actions-inline {
  grid-column: 1 / -1;
  align-self: end;
  width: 100%;
}

.agency-management-actions {
  justify-content: flex-end;
}

.settings-password-actions {
  justify-content: flex-end;
}

.management-actions button {
  width: auto;
}

.api-integration-card {
  padding: 18px;
  border: 1px solid #d6e4e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(15, 50, 48, 0.06);
}

.api-integration-card + .api-integration-card {
  margin-top: 18px;
}

.api-integration-card h3 {
  margin-top: 0;
}

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

.openai-translate-action {
  align-self: end;
}

.openai-settings-fields {
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
}

.api-settings-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.api-clear-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 14px;
}

.api-save-actions {
  margin-top: 18px;
}

.openai-api-key-field {
  min-width: min(100%, 520px);
}

.openai-clear-key {
  display: inline-grid;
  grid-template-columns: auto max-content;
  align-items: center;
  justify-content: start;
  gap: 8px;
  margin: 0;
  white-space: nowrap;
  color: var(--muted);
  line-height: 18px;
}

.openai-clear-key span {
  display: block;
  line-height: 18px;
}

.public-properties-subsetting {
  margin-top: 14px;
}

.homepage-video-toggle {
  margin-bottom: 14px;
}

.homepage-video-language-field {
  margin-top: 14px;
}

.settings-card-intro {
  margin: -4px 0 18px;
  color: var(--muted);
  line-height: 1.45;
}

.settings-form .management-fields label {
  display: grid;
  grid-template-rows: 34px 44px minmax(32px, auto);
  gap: 5px;
  align-items: start;
}

.settings-form .management-fields label > span {
  display: flex;
  align-items: end;
  min-height: 34px;
  line-height: 1.25;
}

.settings-form .management-fields input,
.settings-form .management-fields select {
  width: 100%;
  min-height: 44px;
}

.audit-filters {
  margin-top: 18px;
  width: 100%;
}

.audit-filter-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  row-gap: 16px;
}

.audit-filter-fields label {
  display: grid;
  grid-template-rows: minmax(16px, auto) 44px minmax(28px, auto);
  gap: 6px;
  align-items: start;
}

.audit-filter-fields label > span {
  line-height: 1.25;
}

.audit-filter-fields input,
.audit-filter-fields select {
  width: 100%;
  min-height: 44px;
}

.audit-filter-fields label small {
  margin: 0;
  line-height: 1.25;
}

.audit-row div:first-child {
  gap: 6px;
}

.audit-verification-panel {
  display: grid;
  gap: 18px;
}

.verification-status {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #bcdcca;
  border-radius: 8px;
  background: #e9f5ef;
  color: #125a34;
}

.verification-status.error {
  border-color: #e8bcbc;
  background: #f8eaea;
  color: var(--danger);
}

.verification-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.verification-facts > div {
  min-width: 0;
}

.hash-value {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.25;
}

.audit-verify-form {
  display: block;
}

.audit-verify-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: start;
}

.audit-verify-controls button,
.audit-verify-controls .button {
  min-height: 44px;
  height: 44px;
  margin-top: 20px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--muted);
}

.management-delete-form {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin: -6px 0 0;
}

.labelled-form button {
  margin-top: 17px;
}

.labelled-form .admin-relist-action-cell button {
  height: 44px;
  min-height: 44px;
  margin-top: 0;
}

.labelled-form.audit-verify-form .audit-verify-controls button,
.labelled-form.audit-verify-form .audit-verify-controls .button {
  height: 44px;
  min-height: 44px;
  margin-top: 20px;
}

.labelled-form .property-action-buttons .button,
.labelled-form .property-action-buttons button {
  margin-top: 0;
}

.compliance-form {
  display: grid;
  gap: 10px;
  justify-items: end;
  width: min(100%, 980px);
  max-width: none;
}

.agency-compliance-form {
  justify-self: stretch;
  width: 100%;
}

.compliance-fields {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: start;
  justify-content: flex-end;
  width: 100%;
}

.compliance-fields label {
  flex: 1 1 0;
  min-width: 0;
}

.compliance-fields select {
  width: 100%;
  min-width: 0;
}

.compliance-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  width: 100%;
  flex-wrap: wrap;
}

.compliance-actions button {
  margin-top: 0;
  flex: 0 0 auto;
}

.compliance-inline-form {
  display: inline-flex;
  margin: 0;
}

.compliance-inline-form button {
  margin-top: 0;
}

.compliance-actions button[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

.compliance-reset-form {
  justify-self: end;
}

.management-form .management-actions button,
.management-delete-form button {
  margin-top: 0;
}

.agency-logo-panel {
  display: grid;
  gap: 20px;
  width: 100%;
  margin: 0;
  padding: 24px;
}

.agency-profile-form input:focus-visible {
  outline: 2px solid rgba(178, 138, 58, 0.9);
  outline-offset: -2px;
  box-shadow: 0 0 0 2px rgba(178, 138, 58, 0.12);
}

.agency-profile-form {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 0;
}

.agency-profile-form label {
  min-width: 0;
}

.agency-profile-form .management-actions-inline {
  justify-content: flex-start;
}

.agency-profile-form .field-help {
  margin-top: 6px;
}

.agency-profile-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
  align-items: start;
  gap: 32px;
}

.agency-profile-settings {
  display: grid;
  gap: 22px;
  min-width: 0;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.agency-logo-preview {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  min-width: 0;
}

.agency-logo-preview img,
.agency-logo-placeholder {
  width: 112px;
  height: 112px;
  border: 1px solid #d6e4e1;
  border-radius: 8px;
  background: #fff;
}

.agency-logo-preview img {
  object-fit: contain;
  padding: 4px;
}

.agency-logo-placeholder {
  display: grid;
  place-items: center;
  color: var(--brand);
  font-size: 38px;
  font-weight: 800;
}

.agency-logo-preview div:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.agency-logo-preview div:last-child > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.agency-logo-preview span {
  color: var(--muted);
  font-size: 13px;
}

.agency-logo-form {
  width: 100%;
  max-width: none;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}

.agency-logo-form .management-actions-inline {
  grid-column: 1;
}

.agency-agreement-download {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.agency-agreement-download form {
  margin: 0;
}

.status-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.qualification-row .status-stack {
  margin-left: auto;
}

.qualification-account-checks {
  margin-bottom: 12px;
}

.qualification-account-checks .account-checks-copy {
  flex: 1 1 auto;
  width: 100%;
}

.qualification-account-checks .account-checks-copy .account-checks-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.qualification-account-checks .account-checks-copy .account-checks-heading-row .status-stack {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  margin-left: auto;
}

@media (min-width: 821px) {
  .qualification-account-checks .account-checks-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 14px;
  }

  .qualification-account-checks .account-checks-copy .account-checks-heading-row {
    display: contents;
  }

  .qualification-account-checks .account-checks-copy .account-checks-heading-row > strong {
    grid-column: 1;
    grid-row: 1;
  }

  .qualification-account-checks .account-checks-copy .account-checks-heading-row .status-stack {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .qualification-account-checks .account-checks-copy > span {
    grid-column: 1;
    grid-row: 2;
  }
}

.check {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  line-height: 1.35;
}

.bidder-agreement-check {
  display: grid;
  gap: 6px;
}

.bidder-agreement-check strong {
  color: var(--ink);
  font-size: 14px;
}

.bidder-agreement-check .check {
  margin: 0;
  min-height: 20px;
  align-items: center;
}

.bidder-agreement-check .check span {
  display: inline;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.bidder-agreement-check .check a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.registration-consent-check,
.marketing-consent-check {
  align-items: flex-start;
}

.bidder-agreement-check + .marketing-consent-check {
  margin-top: -8px;
}

.registration-consent-check span,
.marketing-consent-check span {
  display: inline;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.registration-consent-check input[type="checkbox"],
.marketing-consent-check input[type="checkbox"] {
  margin-top: 2px;
}

.marketing-consent-check a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-form label.register-interest-marketing-consent {
  display: flex;
  grid-column: 1 / -1;
  gap: 10px;
}

.contact-form label.register-interest-marketing-consent span {
  font-weight: 400;
}

.check input[type="checkbox"],
.checkbox-field input[type="checkbox"],
.openai-clear-key input[type="checkbox"],
.email-preference-option input[type="checkbox"] {
  appearance: none;
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  min-height: 15px;
  margin: 0;
  border: 1.5px solid #b8c7c5;
  border-radius: 4px;
  background: #fff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 10px 10px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.check input[type="checkbox"]:checked,
.checkbox-field input[type="checkbox"]:checked,
.openai-clear-key input[type="checkbox"]:checked,
.email-preference-option input[type="checkbox"]:checked {
  border-color: var(--brand);
  background: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 14' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 7.2 5.8 10 11 4' fill='none' stroke='%23fff' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.check input[type="checkbox"]:focus-visible,
.checkbox-field input[type="checkbox"]:focus-visible,
.openai-clear-key input[type="checkbox"]:focus-visible,
.email-preference-option input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 90, 85, 0.18);
}

.remember-verification {
  align-items: center;
}

.remember-verification span {
  display: block;
}

.qualify-confirmation {
  align-items: center;
}

.qualify-confirmation span {
  display: block;
}

.demo-users {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.resend-form {
  margin-top: 12px;
}

.demo-users span {
  padding: 6px 8px;
  border-radius: 6px;
  background: #eef2f4;
  color: var(--muted);
  font-size: 12px;
}

.timeline {
  display: grid;
  gap: 14px;
  margin: 26px 0 44px;
}

.timeline article { padding: 22px; }

.flash {
  position: fixed;
  top: 86px;
  right: 18px;
  z-index: 40;
  width: min(420px, calc(100vw - 36px));
  margin: 0;
  padding: 13px 15px;
  border-radius: 8px;
  background: #e9f5ef;
  border: 1px solid #bcdcca;
  color: #125a34;
  box-shadow: 0 18px 48px rgba(23, 32, 42, 0.16);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.flash.is-hiding {
  opacity: 0;
  transform: translateY(-6px);
}

.flash.error {
  background: #f8eaea;
  border-color: #e8bcbc;
  color: var(--danger);
}

.flash.bid-feedback {
  display: grid;
  gap: 3px;
  position: static;
  width: auto;
  margin: 18px 0;
  box-shadow: none;
}

.flash.bid-feedback strong,
.flash.bid-feedback span {
  display: block;
}

.bid-feedback {
  margin: 10px 0 0;
}

.notice-panel {
  display: grid;
  gap: 5px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #bcdcca;
  border-radius: 8px;
  background: #e9f5ef;
  color: #125a34;
}

.notice-panel span {
  color: #30664a;
  font-size: 14px;
  line-height: 1.45;
}

.agency-approval-notice {
  margin-bottom: 12px;
}

.seller-profile-card {
  margin-bottom: 16px;
}

.seller-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.seller-profile-grid div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.seller-profile-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.seller-profile-grid strong {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.seller-document-list,
.seller-bid-list {
  margin-bottom: 16px;
}

.seller-document-row > div,
.seller-bid-row > div {
  gap: 5px;
}

.seller-bid-row > .seller-bid-single-line {
  display: block;
  overflow-wrap: anywhere;
}

.seller-bid-single-line span {
  display: inline;
}

.seller-bid-record-row {
  margin-left: 22px;
  padding: 8px 10px;
  border-color: #e3e9ed;
  background: #fbfdfc;
}

.seller-bid-record-row .seller-bid-single-line {
  font-size: 13px;
}

.seller-bid-record-row strong {
  font-size: 13px;
}

footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  width: 100%;
  margin: 46px 0 0;
  padding: 28px max(16px, calc((100% - 1180px) / 2)) 42px;
  background: #fff;
  border-top: 1px solid #dbe5e2;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
  box-shadow: 0 0 0 100vmax #fff;
  clip-path: inset(0 -100vmax);
}

.footer-copy {
  display: grid;
  gap: 18px;
  min-width: 0;
  width: 100%;
  max-width: none;
}

.footer-policy-link {
  display: block;
  min-width: 0;
  padding: 5px 0;
  color: #163c47;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.16s ease, transform 0.16s ease;
}

.footer-policy-link:hover {
  color: #0b6b66;
  transform: translateX(2px);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 28px;
  width: 100%;
  padding-top: 2px;
}

.footer-link-group {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 2px 0 2px 16px;
  border-left: 1px solid #dbe5e2;
}

.footer-link-group-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 2px;
  color: var(--muted);
}

.footer-security-badge {
  display: inline-flex;
  align-self: center;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  padding: 8px 10px;
  border: 1px solid #dbe5e2;
  border-radius: 8px;
  background: #fbfdfc;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.footer-security-badge:hover {
  border-color: #b8d8d3;
  box-shadow: 0 8px 22px rgba(22, 60, 71, 0.08);
  transform: translateY(-1px);
}

.footer-security-badge img {
  display: block;
  max-width: 150px;
  height: auto;
}

.footer-disclaimer {
  max-width: 980px;
  margin: 2px auto 0;
  color: #5d6d75;
  text-align: center;
}

.footer-authorisation {
  max-width: 980px;
  margin: -10px auto 0;
  color: #5d6d75;
  font-weight: 650;
  text-align: center;
}

.legal-page-title {
  max-width: 920px;
  margin-right: auto;
  margin-left: auto;
  padding: 24px 0 20px;
  border-bottom: 1px solid #d9e4e1;
}

.legal-page-title h1 {
  max-width: 880px;
  line-height: 1.08;
}

.legal-page-title p {
  max-width: 760px;
  margin-top: 12px;
  color: #526870;
  line-height: 1.65;
}

.legal-page {
  max-width: 920px;
  margin: 18px auto 0;
  padding: 22px 28px 30px;
  border: 1px solid #dbe5e2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(16, 36, 42, 0.07);
  color: var(--ink);
  line-height: 1.72;
  font-size: 15px;
}

.legal-page h2 {
  margin: 28px -28px 14px;
  padding: 15px 28px;
  border-top: 1px solid #e6eeeb;
  border-bottom: 1px solid #edf3f1;
  background: #f7faf9;
  color: #163c47;
  font-size: 21px;
  line-height: 1.28;
}

.legal-page h2:first-child {
  margin-top: -22px;
  border-top: 0;
  border-radius: 8px 8px 0 0;
}

.legal-page h3 {
  margin: 18px 0 8px;
  color: #244f59;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.legal-page p {
  margin: 0 0 8px;
  max-width: 850px;
}

.legal-page pre {
  overflow-x: auto;
  margin: 10px 0 16px;
  padding: 16px;
  border: 1px solid #dbe5e2;
  border-left: 4px solid #88aaa2;
  border-radius: 8px;
  background: #fbfdfc;
  color: #193d46;
  font-family: ui-monospace, SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre;
}

.legal-page .legal-field {
  display: grid;
  grid-template-columns: minmax(150px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid #e5ecea;
}

.legal-page .legal-field-label {
  color: #254a54;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.45;
}

.legal-page .legal-field-value {
  min-width: 0;
  color: #243d44;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.legal-page .legal-url {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-page .legal-field-label-standalone {
  margin: 14px 0 5px;
  padding-left: 10px;
  border-left: 3px solid #88aaa2;
}

.legal-page ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 14px;
  padding: 13px 18px 13px 38px;
  border: 1px solid #e3ece9;
  border-left: 4px solid #88aaa2;
  border-radius: 8px;
  background: #fbfdfc;
}

.legal-page li + li {
  margin-top: 0;
}

.legal-page li {
  padding-left: 2px;
}

.legal-page ul.legal-clause-list {
  padding-left: 18px;
  list-style: none;
}

.legal-page .legal-clause-list li {
  padding-left: 0;
}

.legal-page ul.legal-recital-list {
  gap: 0;
  padding: 6px 16px;
  list-style: none;
}

.legal-page .legal-recital-list li {
  padding: 9px 0;
}

.legal-page .legal-recital-list li + li {
  border-top: 1px solid #e3ece9;
}

.legal-page h2 + p,
.legal-page h2 + ul,
.legal-page h3 + p,
.legal-page h3 + ul {
  margin-top: 0;
}

.cookie-notice {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid #cfdedb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(23, 32, 42, 0.16);
  color: var(--ink);
}

.cookie-settings-toggle {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.cookie-notice[hidden] {
  display: none;
}

.cookie-notice.is-hidden {
  display: none !important;
}

.cookie-preference-decided:not(.cookie-settings-open) .cookie-notice {
  display: none;
}

.cookie-settings-open .cookie-notice {
  display: flex !important;
}

.cookie-settings-toggle:checked + .cookie-notice {
  display: flex !important;
}

/* Keep Privacy choices usable even if a browser restores a page without its click handlers. */
#cookie-preferences:target {
  display: flex !important;
}

.cookie-notice-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 500px;
}

.cookie-notice strong {
  font-size: 14px;
}

.cookie-notice span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.cookie-notice a {
  display: inline;
  color: #163c47;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.cookie-notice a:hover {
  text-decoration: underline;
}

.cookie-notice button {
  flex: 0 0 auto;
  margin-top: 0;
  cursor: pointer;
}

.cookie-notice-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}

.cookie-notice .cookie-choice-button {
  min-height: 44px;
  border: 1px solid #527078;
  background: #fff;
  color: #163c47;
}

.cookie-notice [data-cookie-accept] {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  color: #fff;
}

.cookie-notice [data-cookie-reject]:hover,
.cookie-notice [data-cookie-reject]:focus-visible {
  border-color: var(--brand-dark);
  background: #eef2f4;
  color: var(--brand-dark);
}

.cookie-notice [data-cookie-accept]:hover,
.cookie-notice [data-cookie-accept]:focus-visible {
  border-color: #0b6b66;
  background: #0b6b66;
  color: #fff;
}

.cookie-notice .cookie-choice-button:focus,
.cookie-notice .cookie-choice-button:focus-visible {
  outline: none;
  box-shadow: none;
}

.footer-privacy-control {
  display: block;
  justify-self: center;
  width: fit-content;
  min-height: 0;
  margin: 8px auto 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #52656a;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.footer-privacy-control:hover,
.footer-privacy-control:focus-visible {
  background: transparent;
  color: #163c47;
}

.chat-message {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.chat-message.is-own {
  border-color: #b8d8d3;
  background: #f7fbfa;
}

.chat-message p {
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.chat-message p strong {
  color: var(--ink);
  font-size: 12px;
}

.chat-message p time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.dashboard-chat-threads {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
}

.dashboard-chat-thread {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.dashboard-chat-thread-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fbfdfc;
  cursor: pointer;
  list-style: none;
}

.dashboard-chat-thread[open] .dashboard-chat-thread-header {
  border-bottom: 1px solid var(--line);
}

.dashboard-chat-thread-header::-webkit-details-marker {
  display: none;
}

.dashboard-chat-thread-header::marker {
  content: "";
}

.dashboard-chat-thread-header div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dashboard-chat-thread-header > .pill {
  justify-self: end;
  white-space: nowrap;
}

.dashboard-chat-thread-pills {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.dashboard-chat-thread-pills .pill {
  white-space: nowrap;
}

.dashboard-chat-thread-header span,
.dashboard-chat-thread-header small {
  color: var(--muted);
}

.dashboard-chat-thread-header strong,
.dashboard-chat-thread-header small {
  overflow-wrap: anywhere;
}

.dashboard-chat-messages {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding: 14px;
  background: #f7f8f7;
}

.dashboard-chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.dashboard-chat-compose textarea {
  min-height: 42px;
  height: 42px;
  resize: vertical;
}

.dashboard-chat-compose button {
  align-self: end;
  height: 42px;
  min-width: 112px;
  min-height: 42px;
}

@media (max-width: 1180px) {
  .referral-admin-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .topbar-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
  }
  .brand small { display: none; }
  .brand span { font-size: 28px; }
  .brand img {
    width: auto;
    height: 30px;
    max-width: 116px;
  }
  .language-switcher-desktop { display: none; }
  .language-switcher-mobile {
    display: flex;
    width: 42px;
    height: 42px;
    padding: 0;
    border-color: var(--line);
    background: #fff;
    border-radius: 6px;
  }
  .menu-toggle { display: inline-block; }
  nav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
    padding-top: 8px;
  }
  nav.is-open {
    display: grid;
    gap: 6px;
  }
  nav a,
  .nav-logout-form button {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    background: #fff;
  }
  .nav-register-menu,
  .nav-register-menu summary,
  .nav-dropdown-menu,
  .nav-dropdown-menu summary {
    width: 100%;
  }
  .nav-register-menu summary,
  .nav-dropdown-menu summary {
    justify-content: space-between;
  }
  .nav-dropdown-menu summary {
    padding: 12px;
    border: 1px solid var(--line);
    background: #fff;
  }
  .nav-register-submenu,
  .nav-dropdown-submenu {
    position: static;
    width: 100%;
    min-width: 0;
    gap: 6px;
    margin-top: 6px;
    padding: 6px 0 0 16px;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }
  .nav-agencies-menu .nav-dropdown-submenu {
    right: auto;
    left: auto;
  }
  .language-switcher {
    width: 42px;
    height: 42px;
    background: #fff;
    border: 1px solid var(--line);
  }
  .agency-property-card {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
  }
  .agency-property-card.no-logo {
    grid-template-columns: minmax(0, 1fr);
  }
  .agency-property-card img {
    width: 56px;
    height: 56px;
    padding: 6px;
  }
  .agency-property-card-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }
  .agency-property-card-actions .button {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }
  .property-primary-action {
    width: 100%;
    margin-top: 10px;
    justify-content: center;
    white-space: normal;
  }
  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 10px;
  }
  .hero-pane {
    min-height: 420px;
  }
  .hero h1 {
    min-height: 0;
    margin-bottom: 10px;
  }
  .hero .actions,
  .hero .actions .button {
    width: 100%;
  }
  .home-video-hero {
    grid-template-areas:
      "copy"
      "video"
      "actions";
    gap: 14px;
    padding: 24px;
  }
  .home-video-hero .hero-action-links {
    width: auto;
  }
  .home-video-hero .hero-action-links .button {
    width: auto;
  }
  .home-section-grid,
  .home-video-section,
  .home-call-to-action {
    grid-template-columns: 1fr;
  }
  .home-section-card,
  .home-video-section,
  .home-opportunities,
  .home-call-to-action {
    padding: 18px;
  }
  .home-call-actions {
    min-width: 0;
  }
  .agency-page-hero {
    min-height: 420px;
    padding: 42px 18px;
  }
  .partners-page-hero {
    min-height: 300px;
    padding: 42px 18px;
  }
  .partners-page-hero p { font-size: 16px; }
  .partner-category-grid { grid-template-columns: 1fr; }
  .partner-profile { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 0 18px 22px; }
  .agency-page-hero p {
    font-size: 16px;
  }
  .agency-page-grid,
  .agency-page-split,
  .agency-page-contact {
    grid-template-columns: 1fr;
  }
  .how-works-flow {
    grid-template-columns: 1fr;
  }
  .how-works-step {
    min-height: 0;
  }
  .how-works-step::after {
    top: auto;
    right: auto;
    left: 32px;
    bottom: -13px;
    transform: rotate(135deg);
  }
  .how-works-step:nth-child(4)::after {
    display: block;
  }
  .agency-page-card,
  .agency-page-split,
  .agency-page-contact {
    padding: 18px;
  }
  .agency-contact-actions {
    min-width: 0;
  }
  .contact-page {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .contact-page-hero {
    min-height: 420px;
    padding: 42px 18px;
  }
  .register-interest-hero {
    min-height: 0;
    padding: 24px 18px;
  }
  .contact-page-hero p {
    font-size: 16px;
  }
  .contact-details-card {
    padding: 18px;
  }
  .contact-details-list {
    grid-template-columns: 1fr;
  }
  .contact-form {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 18px;
  }
  .contact-form button {
    width: 100%;
  }
  .flash {
    top: 74px;
    right: 12px;
    width: calc(100vw - 24px);
  }
  h1 {
    font-size: clamp(28px, 7vw, 36px);
  }
  .page-title h1,
  .detail h1 {
    font-size: clamp(24px, 5.5vw, 28px);
  }
  .page-title.dashboard-title {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
  }
  .page-title.dashboard-title.admin-dashboard-title,
  .page-title.dashboard-title.agency-dashboard-title,
  .page-title.dashboard-title.buyer-dashboard-title {
    align-items: flex-start;
    min-height: 0;
    padding: 30px 0 20px 16px;
    text-align: left;
  }
  .admin-dashboard-title::before,
  .agency-dashboard-title::before,
  .buyer-dashboard-title::before {
    top: 32px;
    bottom: 21px;
    width: 3px;
  }
  .admin-dashboard-title .dashboard-account-identity,
  .agency-dashboard-title .dashboard-account-identity,
  .buyer-dashboard-title .dashboard-account-identity {
    justify-content: flex-start;
  }
  .page-title.dashboard-title.buyer-dashboard-title {
    display: block;
    margin: 22px 0 14px;
    padding: 18px 16px;
  }
  .buyer-dashboard-title > div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .page-title.buyer-dashboard-title h1 {
    font-size: 25px;
  }
  .buyer-dashboard-title .dashboard-account-identity {
    justify-content: flex-start;
    text-align: left;
  }
  .dashboard-tabs.buyer-dashboard-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 20px;
    padding: 0 0 10px;
  }
  .dashboard-tabs.buyer-dashboard-tabs ~ .section-head {
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 0 0 12px;
    padding: 14px;
  }
  .dashboard-tabs.buyer-dashboard-tabs ~ .section-head p {
    grid-column: 1;
  }
  .page-title.dashboard-title.admin-dashboard-title,
  .page-title.dashboard-title.agency-dashboard-title {
    margin: 22px 0 14px;
    padding: 18px 16px;
  }
  .page-title.dashboard-title.agency-dashboard-title {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .agency-dashboard-title > div {
    min-width: 0;
  }
  .page-title.admin-dashboard-title h1,
  .page-title.agency-dashboard-title h1 {
    font-size: 25px;
  }
	  .admin-dashboard-tabs ~ .section-head,
	  .agency-dashboard-tabs ~ .section-head,
	  .audit-events-section-head {
	    margin: 0 0 12px;
	    padding: 14px;
  }
  .dashboard-agency-logo {
    width: 88px;
    height: 58px;
  }
  .grid,
  .detail,
  .two-col { grid-template-columns: 1fr; }
  .management-fields.referral-partner-fields {
    grid-template-columns: 1fr;
  }
  .referral-partner-fields .referral-address-field {
    grid-column: auto;
  }
  .detail {
    gap: 10px;
    margin: 14px 0;
  }
  .property-gallery {
    display: contents;
  }
  .property-media-stack {
    display: grid;
    order: 1;
    gap: 8px;
    align-content: start;
    width: 100%;
    min-width: 0;
  }
  .property-auction-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    order: 5;
    gap: 0;
    width: 100%;
    min-width: 0;
    align-self: start;
    position: relative;
    z-index: 1;
  }
  .property-auction-column > * {
    min-width: 0;
  }
  .property-mobile-summary {
    display: contents;
  }
  .property-mobile-heading-gallery {
    display: grid;
    order: 1;
  }
  .property-mobile-heading-sidebar {
    display: none;
  }
  .gallery-main {
    display: block;
    order: 2;
    width: 100%;
    max-width: 100%;
    height: clamp(210px, calc((100vw - 32px) * 0.625), 420px);
    min-height: 0;
    max-height: 420px;
  }
  .gallery-thumbs {
    order: 3;
    margin-top: 0;
  }
  .property-mobile-summary > :not(.property-mobile-heading) {
    order: unset;
  }
  .property-market-card {
    order: 7;
  }
  .property-description-card {
    order: 8;
  }
  .property-viewing-card {
    order: 10;
  }
  .property-mobile-heading {
    gap: 6px;
  }
  .property-mobile-heading .pill {
    margin: 0;
  }
  .detail h1,
  .property-responsive-title {
    margin: 0;
    line-height: 1.15;
  }
  .auction-end-live,
  .agency-property-card,
  .property-market-card,
  .property-description-card,
  .property-question-card,
  .auction-panel,
  .bidder-position-panel,
  .notice-panel,
  .property-section-card {
    margin-top: 0;
    margin-bottom: 10px;
  }
  .auction-end-live {
    gap: 8px;
    padding: 10px;
  }
  .auction-countdown-grid {
    gap: 6px;
  }
  .auction-countdown-cell {
    padding: 8px 6px;
  }
  .auction-countdown-cell strong {
    font-size: 20px;
  }
  .agency-property-card {
    padding: 12px;
  }
  .property-question-card {
    margin-top: -2px;
  }
  .property-market-card,
  .property-description-card {
    padding: 10px;
  }
  .property-section-card {
    gap: 8px;
  }
  .property-section-card h2,
  .bid-history-heading {
    margin-top: 0;
    margin-bottom: 4px;
  }
  .legal-pack-index-heading {
    margin-top: 0;
  }
  .property-primary-action {
    margin-top: 0;
    margin-bottom: 10px;
  }
  .question-form-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .question-form-actions .button,
  .question-form-actions button {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
  .bid-learn-more {
    justify-self: end;
    margin-left: auto;
  }
  .dashboard-tabs,
  .admin-dashboard-tabs,
  .property-edit-tabs,
  .settings-tabs,
  .buyer-dashboard-tabs,
  .agency-dashboard-tabs,
  .seller-dashboard-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow-x: visible;
    padding-bottom: 8px;
  }
  .dashboard-tabs a {
    min-width: 0;
    max-width: none;
    min-height: 34px;
    padding: 7px 9px;
    font-size: 12px;
    white-space: normal;
  }
  .dashboard-tabs span {
    min-width: 18px;
    padding: 1px 5px;
    font-size: 10px;
  }
  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 18px 0;
  }
  .metric-card {
    padding: 9px 8px;
  }
  .metrics > div {
    min-height: 116px;
    padding: 14px;
  }
  .metrics strong,
  .metric-card strong {
    font-size: 18px;
  }
  .metrics span,
  .metric-card span {
    font-size: 10px;
    line-height: 1.2;
  }
  .property-card-footer {
    gap: 10px;
    padding-top: 12px;
  }
  .property-card-footer dl {
    grid-template-columns: minmax(0, 1.5fr) minmax(90px, 1fr) 42px;
    gap: 6px;
  }
  .property-card-footer dl > div {
    grid-template-rows: minmax(14px, auto) minmax(28px, auto);
  }
  .property-card-footer dt {
    min-height: 14px;
    font-size: 10px;
    line-height: 1.15;
  }
  .property-card-footer dd {
    min-height: 28px;
    font-size: 13px;
    line-height: 1.15;
  }
  .property-card-footer dd small {
    font-size: 11px;
  }
  .agency-property-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .agency-property-card.no-logo {
    grid-template-columns: 1fr;
  }
  .agency-property-card img {
    width: 64px;
    height: 64px;
  }
  .agency-property-card .button {
    justify-self: stretch;
  }
  .auction-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .auction-panel > div {
    min-width: 0;
    padding: 10px;
  }
  .auction-panel span {
    font-size: 11px;
  }
  .auction-panel strong {
    font-size: 17px;
    line-height: 1.15;
  }
  .auction-panel strong small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
  }
  .verification-facts,
  .audit-verify-controls {
    grid-template-columns: 1fr;
  }
  .image-lightbox {
    padding: 18px;
  }
  .image-lightbox img {
    max-width: calc(100vw - 36px);
    max-height: calc(100vh - 96px);
  }
  .lightbox-close {
    top: 12px;
    right: 12px;
  }
  .lightbox-prev {
    left: 10px;
  }
  .lightbox-next {
    right: 10px;
  }
  .gallery-main.property-placeholder { min-height: 260px; }
  .gallery-thumbs img {
    width: 100%;
  }
  .section-head,
  .list-row,
  .row-form,
  .inline-form { align-items: stretch; flex-direction: column; }
  .legal-pack-index-row {
    gap: 10px;
  }
  .legal-pack-index-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: flex-start;
    width: 100%;
    gap: 8px;
  }
  .legal-pack-index-actions > .pill,
  .legal-pack-index-actions > a {
    width: 100%;
    min-height: 34px;
  }
  .section-head {
    grid-template-columns: 1fr;
  }
  .dashboard-tabs ~ .section-head {
    margin-top: 26px;
    padding: 14px;
  }
  .dashboard-tabs ~ .section-head h2 {
    font-size: 22px;
  }
  .section-head > a,
  .section-head > button {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
  }
  .buyer-bid-title-line {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .buyer-bid-title-pills {
    justify-content: flex-start;
  }
  .buyer-bid-card-actions {
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: start;
  }
  .buyer-bid-card-actions > .button {
    margin-left: auto;
    white-space: nowrap;
    min-width: max-content;
  }
  .viewing-row {
    gap: 12px;
  }
  .viewing-row > div:first-child {
    gap: 6px;
  }
  .viewing-row span {
    overflow-wrap: anywhere;
  }
  .viewing-actions {
    width: 100%;
  }
  .viewing-expandable-body {
    grid-template-columns: 1fr;
  }
  .viewing-expandable-summary {
    grid-template-columns: minmax(0, 1fr) 18px;
  }
  .viewing-summary-pills {
    grid-column: 1;
    justify-self: end;
  }
  .viewing-expandable-summary > .property-workflow-chevron {
    grid-column: 2;
    grid-row: 1;
  }
  .viewing-status-form {
    justify-items: stretch;
    align-content: stretch;
    width: 100%;
    max-width: none;
    height: auto;
  }
  .viewing-status-form select {
    width: 100%;
    min-width: 0;
  }
  .viewing-action-buttons {
    display: grid;
    grid-template-columns: minmax(max-content, 1fr) minmax(68px, 0.8fr);
    width: 100%;
    gap: 6px;
  }
  .viewing-action-buttons .button,
  .viewing-action-buttons button {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
  }
  .viewing-action-buttons .view-property-button {
    min-width: max-content;
    white-space: nowrap;
  }
  .bid-history-list {
    margin-left: 0;
  }
  .list-row > form,
  .auction-settings-form {
    width: 100%;
    max-width: none;
  }
  .property-workflow-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }
  .property-workflow-row > div:first-child {
    gap: 6px;
  }
  .property-workflow-row > div:first-child > strong {
    font-size: 15px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .property-workflow-row span {
    overflow-wrap: anywhere;
  }
  .property-workflow-form,
  .auction-settings-form {
    max-width: none;
  }
  .auction-settings-form {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  .property-workflow-form.auction-settings-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .auction-settings-form > label,
  .auction-relist-form > label {
    grid-template-rows: none;
  }
  .auction-settings-form small {
    min-height: 0;
  }
  .auction-ends-field {
    grid-column: auto;
  }
  .auction-relist-form {
    grid-template-columns: 1fr;
  }
  .auction-relist-form input[type="datetime-local"] {
    min-width: 0;
  }
  .relist-action-cell {
    width: 100%;
    padding-top: 0;
    grid-template-rows: none;
  }
  .admin-relist-action-cell {
    display: grid;
    grid-template-rows: 16px 44px minmax(28px, auto);
    justify-self: end;
    width: auto;
  }
  .admin-relist-action-cell button {
    grid-row: 2;
    width: auto;
  }
  .admin-auction-relist-form {
    grid-template-columns: repeat(2, minmax(170px, 1fr)) max-content;
  }
  .admin-auction-relist-form > label {
    grid-template-rows: 16px 44px minmax(28px, auto);
  }
  .property-action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
    width: 100%;
    justify-content: stretch;
    gap: 6px;
  }
  .property-action-buttons .button,
  .property-action-buttons button {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding-inline: 8px;
  }
  .certificate-row .property-action-buttons {
    display: grid;
    grid-template-columns: 1fr;
    flex-wrap: initial;
    white-space: normal;
  }
  .certificate-row .property-action-buttons .button,
  .certificate-row .property-action-buttons button {
    white-space: normal;
  }
  .certificate-summary-content .dashboard-property-name-line {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }
  .certificate-summary-content .property-title-status-pills {
    justify-content: flex-start;
  }
  .certificate-facts {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .certificate-facts > div {
    padding: 8px 10px;
  }
  .property-image-admin-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 10px;
  }
  .property-image-admin-item {
    padding: 9px;
  }
  .photo-order-actions {
    gap: 6px;
  }
  .photo-order-actions .button {
    min-height: 38px;
    padding-inline: 6px;
  }
  .labelled-form input[type="date"],
  .labelled-form input[type="datetime-local"],
  .labelled-form input[type="time"] {
    width: 100%;
    min-width: 0;
  }
  .management-fields {
    grid-template-columns: 1fr;
  }
  .settings-form .management-fields label {
    grid-template-rows: none;
  }
  .settings-form .management-fields label > span {
    min-height: 0;
  }
  .audit-filter-fields {
    grid-template-columns: 1fr;
  }
  .management-row {
    grid-template-columns: 1fr;
  }
  .agency-profile-main {
    grid-template-columns: 1fr;
  }
  .agency-profile-settings {
    padding-top: 20px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .management-agency-logo {
    position: static;
    justify-content: center;
  }
  .management-main {
    order: 2;
  }
  .management-agency-logo {
    order: 1;
  }
  .management-actions-inline {
    grid-column: 1;
    grid-row: auto;
  }

  .agency-profile-form {
    padding: 0;
  }

  .agency-logo-preview {
    align-items: flex-start;
    gap: 12px;
  }

  .agency-logo-preview img,
  .agency-logo-placeholder {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
  }

  .agency-profile-form .management-actions-inline {
    justify-content: stretch;
  }

  .agency-profile-form .management-actions-inline .button,
  .agency-profile-form .management-actions-inline button {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .agency-agreement-download > .button,
  .agency-agreement-download form,
  .agency-agreement-download form button {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .management-row > .management-actions-inline {
    grid-column: 1;
    grid-row: 3;
  }
  .locale-toolbar {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }
  .locale-tabs {
    flex: 0 0 auto;
  }
  .translate-pt-button {
    flex: 1 1 150px;
    min-width: 0;
  }
  .compliance-fields {
    flex-wrap: wrap;
  }
  .compliance-fields label {
    flex-basis: 100%;
  }
  .compliance-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .compliance-actions button {
    width: 100%;
  }
  .management-actions,
  .management-delete-form {
    justify-content: stretch;
  }
  .management-agency-logo img {
    width: 112px;
    height: 72px;
    margin: 0;
  }
  .management-actions button,
  .management-delete-form button {
    width: 100%;
  }
  .overview-action {
    width: 100%;
    flex-basis: auto;
  }
  .status-stack {
    justify-content: flex-start;
  }
  .qualification-row .status-stack {
    justify-content: flex-end;
    width: 100%;
  }
  .qualification-account-checks .account-checks-copy .account-checks-heading-row {
    gap: 6px;
  }
  .qualification-account-checks .account-checks-copy .account-checks-heading-row .status-stack {
    width: auto;
  }
  .pill {
    white-space: normal;
  }
  .bid-row div:first-child span {
    white-space: normal;
    gap: 3px;
  }
  .bid-history-row {
    padding-left: 4px;
    padding-right: 4px;
  }
  .bid-row .bid-amount {
    font-size: 12px;
  }
  .facts {
    table-layout: fixed;
  }
  .facts th,
  .facts td {
    display: block;
    width: 100%;
  }
  .dashboard-chat-compose {
    grid-template-columns: 1fr;
  }
  .dashboard-chat-thread-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content 18px;
  }
  .dashboard-chat-thread-pills {
    grid-column: auto;
    justify-self: end;
    flex-wrap: nowrap;
  }
  .dashboard-chat-compose button {
    width: 100%;
  }
  footer {
    gap: 16px;
    padding-bottom: 32px;
    text-align: left;
  }
  .footer-copy {
    gap: 12px;
    max-width: none;
    width: 100%;
  }
  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
  }
  .footer-security-badge {
    align-self: center;
  }
  .footer-disclaimer {
    align-self: center;
    margin-top: 4px;
    text-align: center;
  }
}

@media (min-width: 1181px) {
  .home-video-hero .hero-action-links {
    display: grid;
    width: 100%;
    gap: 8px;
  }

  .home-video-hero .hero-action-group-buyers .hero-action-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-video-hero .hero-action-group-agencies .hero-action-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-video-hero .hero-action-links .button {
    width: 100%;
    min-height: 36px;
    padding: 7px 12px;
    line-height: 1.2;
    text-align: center;
  }
}

@media (max-width: 950px) and (max-height: 560px) and (orientation: landscape) {
  .detail {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 14px 0;
  }

  .property-gallery {
    display: contents;
  }

  .property-media-stack {
    display: grid;
    order: 1;
    gap: 8px;
    align-content: start;
    width: 100%;
    min-width: 0;
  }

  .property-auction-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    order: 5;
    gap: 0;
    width: 100%;
    min-width: 0;
    align-self: start;
    position: relative;
    z-index: 1;
  }

  .property-auction-column > * {
    min-width: 0;
  }
  .property-mobile-summary {
    display: contents;
  }

  .property-mobile-heading-gallery {
    display: grid;
    order: 1;
  }
  .property-mobile-heading-sidebar {
    display: none;
  }

  .gallery-main {
    display: block;
    order: 2;
    width: 100%;
    max-width: 100%;
    height: clamp(220px, 56vh, 360px);
    min-height: 0;
    max-height: 360px;
  }

  .gallery-thumbs {
    order: 3;
    margin-top: 0;
  }

  .property-mobile-summary > :not(.property-mobile-heading) {
    order: unset;
  }

  .property-market-card {
    order: 7;
  }

  .property-description-card {
    order: 8;
  }

  .property-viewing-card {
    order: 10;
  }

  .property-mobile-heading {
    gap: 6px;
  }

  .property-mobile-heading .pill {
    margin: 0;
  }

  .detail h1,
  .property-responsive-title {
    margin: 0;
    line-height: 1.15;
  }

  .auction-end-live,
  .agency-property-card,
  .property-market-card,
  .property-description-card,
  .property-question-card,
  .auction-panel,
  .bidder-position-panel,
  .notice-panel,
  .property-section-card {
    margin-top: 0;
    margin-bottom: 10px;
  }

  .agency-property-card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .property-card-footer {
    gap: 10px;
    padding-top: 12px;
  }

  .property-card-footer dl {
    grid-template-columns: minmax(0, 1.5fr) minmax(90px, 1fr) 42px;
    gap: 6px;
  }

  .property-card-footer dl > div {
    grid-template-rows: minmax(14px, auto) minmax(28px, auto);
  }

  .property-card-footer dt {
    min-height: 14px;
    font-size: 10px;
    line-height: 1.15;
  }

  .property-card-footer dd {
    min-height: 28px;
    font-size: 13px;
    line-height: 1.15;
  }

  .property-card-footer dd small {
    font-size: 11px;
  }

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

  .auction-panel > div {
    min-width: 0;
    padding: 10px;
  }

  .auction-panel span {
    font-size: 11px;
  }

  .auction-panel strong {
    font-size: 17px;
    line-height: 1.15;
  }

  .auction-panel strong small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
  }

  .property-description-card {
    margin: 0 0 10px;
  }
}

@media (max-width: 820px) {
  .agency-overview-metrics,
  .buyer-overview-metrics,
  .agency-dashboard-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-tabs > a:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .dashboard-chat-thread-header {
    grid-template-columns: minmax(0, 1fr) max-content 14px;
    gap: 8px;
    padding: 12px;
  }

  .dashboard-chat-thread-pills {
    grid-column: auto;
    justify-self: end;
    flex-wrap: nowrap;
  }

  .dashboard-chat-thread-header strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .dashboard-chat-thread-header .property-workflow-chevron {
    align-self: center;
  }

  .property-workflow-form.auction-settings-form {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    row-gap: 10px;
  }

  .property-workflow-form.auction-settings-form > label {
    grid-template-rows: none;
  }

  .property-workflow-form .property-action-buttons {
    display: grid;
    grid-row: auto;
    justify-self: stretch;
    width: 100%;
  }

  .property-workflow-form .property-action-buttons .button,
  .property-workflow-form .property-action-buttons button {
    width: 100%;
  }

  .admin-auction-relist-form {
    grid-template-columns: 1fr;
  }

  .admin-relist-action-cell {
    display: flex;
    justify-self: stretch;
    width: 100%;
  }

  .admin-relist-action-cell button {
    grid-row: auto;
    width: 100%;
  }

  .buyer-bid-row .buyer-bid-title-line {
    row-gap: 0;
    margin-bottom: 0;
  }

  .buyer-bid-row .dashboard-property-name-line {
    margin-bottom: 8px;
  }

  .buyer-property-summary .dashboard-property-name-line {
    margin-bottom: 0;
  }

  .property-workflow-summary:not(.admin-expandable-summary) .agency-property-row-title > div {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-rows: repeat(4, auto);
    column-gap: 6px;
  }

  .property-workflow-summary:not(.admin-expandable-summary) .agency-property-row-title .dashboard-property-name-line {
    display: contents;
  }

  .property-workflow-summary:not(.admin-expandable-summary) .agency-property-row-title .dashboard-property-name-line > :first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .property-workflow-summary:not(.admin-expandable-summary) .agency-property-row-title .dashboard-property-name-line > :last-child:not(:first-child) {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
  }

  .property-workflow-summary:not(.admin-expandable-summary) .agency-property-row-title > div > :not(.dashboard-property-name-line) {
    grid-column: 1;
  }

  .admin-expandable-summary .dashboard-property-name-line {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .admin-expandable-summary .property-title-status-pills {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
  }

  .admin-expandable-summary .property-title-status-pills .pill {
    max-width: 100%;
    white-space: nowrap;
    text-align: left;
  }

  .user-management-summary .user-management-summary-status {
    width: auto;
    justify-self: end;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .admin-expandable-summary .viewing-summary-pills {
    justify-self: end;
    justify-content: flex-end;
    width: auto;
  }

  .admin-expandable-summary .admin-card-secondary-meta {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

	  .buyer-bid-facts {
	    grid-template-columns: repeat(2, minmax(0, 1fr));
	    margin-top: 10px;
	    border-bottom: 0;
	  }

  .buyer-bid-facts > div {
    padding: 9px 8px;
  }

  .buyer-bid-facts > div:nth-child(odd) {
    border-left: 0;
  }

  .buyer-bid-facts > .is-wide {
    grid-column: 1 / -1;
    border-left: 0;
  }

  .property-workflow-facts {
    margin-top: 10px;
  }

  .property-workflow-facts > div {
    padding: 9px 8px;
  }

  .agency-property-card-actions .button:only-child {
    grid-column: 1 / -1;
  }

  .admin-dashboard-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 18px;
  }
  .referral-admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .referral-admin-metrics > div {
    min-height: 0;
    gap: 4px;
    padding: 9px 10px;
  }
	  .referral-report-heading {
	    margin-top: 22px;
	    margin-bottom: 10px;
	  }
	  .admin-dashboard-tabs ~ .section-head.referral-attribution-heading {
	    margin-top: 22px;
	  }
  .referral-admin-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }
  .referral-admin-table,
  .referral-admin-table tbody,
  .referral-admin-table tr,
  .referral-admin-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .referral-admin-table thead {
    display: none;
  }
  .referral-admin-table colgroup {
    display: none;
  }
  .referral-admin-table tbody {
    display: grid;
    gap: 8px;
  }
  .referral-admin-table tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }
  .referral-admin-table td {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 3px 10px;
    padding: 7px 10px;
  }
  .referral-admin-table td::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
  }
  .referral-admin-table td > * {
    grid-column: 2;
    min-width: 0;
  }
  .referral-admin-table td > .pill {
    justify-self: start;
  }
  .referral-admin-link {
    margin-bottom: 4px;
  }
  .referral-admin-link .copy-link-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
  }
  .referral-admin-table td.referral-admin-empty {
    display: block;
  }
}

@media (max-width: 640px) {
  .auth {
    margin: 24px auto;
    padding: 20px;
  }
  .home-video-hero {
    grid-template-areas:
      "copy"
      "video"
      "actions";
    gap: 12px;
    margin: 16px 0;
    padding: 16px;
  }
  .home-video-hero .home-video-copy h1 {
    font-size: 30px;
  }
  .home-video-hero .home-video-copy p {
    font-size: 15px;
  }
  .auth h1 {
    font-size: 30px;
    line-height: 1.12;
  }
  .auth h1.buyer-registration-title {
    font-size: 25px;
    line-height: 1.16;
  }
  .registration-readiness {
    gap: 18px;
  }
  .registration-readiness h2 {
    font-size: 21px;
  }
  .referral-admin-table td {
    grid-template-columns: 96px minmax(0, 1fr);
  }
  .buyer-bid-history-details summary {
    min-height: 42px;
    padding: 0 11px;
  }
  .bid-history-item {
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 4px 10px;
    padding: 9px 10px;
  }
  .bid-history-type {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }
  .bid-history-amount {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
    white-space: nowrap;
  }
  .bid-history-meta {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px solid var(--line);
    font-size: 12px;
  }
  .bid-history-meta time {
    text-align: right;
  }
  .bid-history-meta time::before {
    content: none;
    margin: 0;
  }
  .buyer-bid-history-details[open] {
    grid-column: 1 / -1;
  }
  .buyer-bid-history-details[open] + .button {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    position: relative;
    z-index: 1;
  }
  .agency-property-card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  footer {
    padding-left: 12px;
    padding-right: 12px;
  }
  .footer-links {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .footer-link-group {
    padding-left: 12px;
  }
  .footer-policy-link {
    padding: 6px 0;
  }
  .legal-page-title {
    padding: 18px 0 14px;
  }
  .legal-page {
    margin-top: 14px;
    padding: 16px 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.68;
  }
  .legal-page h2 {
    margin: 22px -14px 10px;
    padding: 12px 14px;
    font-size: 18px;
  }
  .legal-page h2:first-child {
    margin-top: -16px;
  }
  .legal-page h3 {
    margin: 15px 0 7px;
    font-size: 15px;
  }
  .legal-page p {
    margin-bottom: 7px;
  }
  .legal-page pre {
    margin: 8px 0 13px;
    padding: 12px;
    font-size: 12px;
    line-height: 1.5;
  }
  .legal-page .legal-field {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 8px 0;
  }
  .legal-page .legal-field-label {
    font-size: 13px;
  }
  .legal-page .legal-field-label-standalone {
    margin: 12px 0 4px;
  }
  .legal-page ul {
    padding: 10px 12px 10px 30px;
  }
  .legal-page ul.legal-clause-list {
    padding-left: 12px;
  }
  .legal-page ul.legal-recital-list {
    padding: 4px 12px;
  }
  .cookie-notice {
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    width: auto;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px - env(safe-area-inset-bottom));
    margin: 0;
    padding: 12px;
    overflow-y: auto;
    text-align: left;
    overscroll-behavior: contain;
  }
  .cookie-notice-copy {
    flex-basis: auto;
    width: 100%;
  }
  .cookie-notice span,
  .cookie-notice a {
    font-size: 12px;
    line-height: 1.4;
  }
  .cookie-notice button {
    width: 100%;
  }
  .cookie-notice-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin-left: 0;
  }
  .cookie-notice .cookie-choice-button {
    min-height: 46px;
    padding: 9px 10px;
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;
  }
  .seller-profile-grid {
    grid-template-columns: 1fr;
  }
  .inline-form .inline-field input[type="number"],
  .inline-form .inline-field .money-input {
    flex-basis: auto;
    width: 100%;
    max-width: none;
  }
  .bid-form .inline-field {
    flex: 1 1 auto;
  }
  dl { grid-template-columns: 1fr; }
  .property-card-footer dl {
    grid-template-columns: minmax(0, 1.5fr) minmax(90px, 1fr) 42px;
    gap: 5px;
  }
  .property-card-footer dl > div {
    min-width: 0;
  }
  .property-card-footer dt,
  .property-card-footer dd {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .property-card-footer dd {
    font-size: 12px;
  }
  .property-card-footer dd small {
    font-size: 10px;
  }
}

@media (max-width: 1180px) {
  .home-video-hero .hero-action-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .home-video-hero .hero-action-links .button {
    width: 100%;
    min-height: 38px;
    padding: 7px 8px;
    font-size: 12px;
    line-height: 1.2;
  }

  .hero-action-group-buyers .hero-action-links .button:last-child {
    grid-column: 1 / -1;
  }

  .hero-action-group-sellers .hero-action-links .button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .home-video-hero .hero-action-groups {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
}

/* Agency portals share IPK's service and visual system. */
.portal-brand { display:flex; align-items:center; gap:12px; }
.portal-brand img { max-width:130px; height:64px; object-fit:contain; }
.portal-brand span { display:block; max-width:210px; font-size:16px; line-height:1.3; overflow-wrap:anywhere; }
.portal-brand small { display:block; font-size:11px; font-weight:500; margin-top:4px; }
.portal-home-hero { min-height:340px; }
.portal-home-hero .hero-pane-content { max-width:780px; }
.portal-create-form { display:grid; gap:16px; padding:24px; margin-bottom:28px; }
.portal-create-form label { display:grid; gap:6px; }
.portal-create-form .button { justify-self:start; }
.portal-management-row { flex-wrap:wrap; gap:16px; }
@media (max-width:600px) { .portal-brand img { max-width:90px; height:48px; } .portal-brand span { max-width:150px; font-size:13px; } }
