/* SPDX-License-Identifier: GPL-3.0-only
 * Copyright (c) 2026 AethelisDEV / Aeon Platform. All rights reserved.
 *
 * Page layer — compositions specific to a screen: the home hero and its search panel, the
 * commission comparison, listing cards and grids, area tiles and the how-it-works steps.
 *
 * Anything reused on three or more screens graduates from here into components.css.
 */

/* =============================================================================================
 * Hero
 *
 * A full-bleed navy band: a city silhouette pinned to its foot, a warm glow behind the headline,
 * the search bar floating on white at the centre and the property-type shortcuts beneath it.
 *
 * The header is laid *over* this section (`.site-header--overlay`), so the top padding has to
 * clear the bar itself — hence `--nav-height-lg` in the padding calculation rather than a
 * hand-tuned number.
 * =========================================================================================== */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-block-size: clamp(34rem, 26rem + 20vw, 46rem);
  padding-block: calc(var(--nav-height-lg) + var(--space-16)) var(--space-16);
  overflow: hidden;
  isolation: isolate;
  background-color: var(--ink-strong);
  color: #fff;
  text-align: center;
}

/* The skyline. `background-position: bottom` with `cover` keeps the rooftops on the section's
 * edge at every viewport width, so the silhouette never floats in the middle of the band. */
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("../img/hero-skyline.svg");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 130% auto;
  opacity: 0.9;
}

@media (min-width: 900px) {
  .hero__media {
    background-size: 100% auto;
  }
}

/* Two overlapping glows — a warm one behind the headline, a cool one at the shoulder — plus a
 * vertical scrim so the type never fights the silhouette. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 55% at 50% 34%, rgba(244, 81, 30, 0.28) 0%, rgba(244, 81, 30, 0) 100%),
    radial-gradient(46% 46% at 84% 10%, rgba(90, 130, 220, 0.22) 0%, rgba(90, 130, 220, 0) 100%),
    linear-gradient(180deg, rgba(15, 19, 26, 0.72) 0%, rgba(15, 19, 26, 0.35) 40%, rgba(15, 19, 26, 0.9) 100%);
}

/* Sized in rem rather than in `ch`: the headline is set at up to 72px, and a `ch` measure
 * computed from the 16px body size would wrap it after two or three words. */
.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  max-inline-size: 52rem;
  margin-inline: auto;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: var(--text-footnote);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
}

.hero__title {
  font-size: var(--text-display-l);
  font-weight: var(--weight-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

.hero__subtitle {
  font-size: clamp(var(--text-subhead), 0.9rem + 0.5vw, var(--text-title-3));
  line-height: var(--leading-relaxed);
  color: rgba(255, 255, 255, 0.78);
  max-inline-size: 54ch;
}

/* The Buy / Rent tabs that sit directly above the search bar. */
.hero__tabs {
  display: flex;
  justify-content: center;
  margin-block-start: var(--space-8);
}

/* =============================================================================================
 * Search bar — one white slab, hairline-divided, with a solid orange submit at its end.
 *
 * A plain GET form: it works with JavaScript disabled, produces a shareable URL, and lets the
 * browser restore the visitor's previous entries on the back button.
 * =========================================================================================== */
.hero-search {
  display: grid;
  gap: var(--space-1);
  inline-size: min(100%, 900px);
  margin: var(--space-4) auto 0;
  padding: var(--space-2);
  border-radius: var(--radius-l);
  background-color: var(--surface);
  box-shadow: var(--shadow-l);
  text-align: start;
}

@media (min-width: 860px) {
  .hero-search {
    grid-template-columns: 1.5fr 1fr 1fr auto;
    align-items: stretch;
    gap: 0;
  }
}

.hero-search__field {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-s);
}

/* Hairline dividers between fields, drawn only once the bar is a single row. */
@media (min-width: 860px) {
  .hero-search__field + .hero-search__field {
    border-inline-start: 1px solid var(--separator);
  }
}

.hero-search__label {
  font-size: var(--text-caption-1);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--label-tertiary);
}

/* Borderless controls: the slab itself is the input surface, so each control only carries type. */
.hero-search__control {
  inline-size: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--label);
  /* 16px minimum prevents iOS Safari from zooming the viewport on focus. */
  font-size: max(var(--text-subhead), 16px);
  font-weight: var(--weight-bold);
  appearance: none;
}

.hero-search__control:focus {
  outline: none;
}

/* The focus ring goes on the field, not the control, so it frames the label too. */
.hero-search__field:focus-within {
  box-shadow: var(--shadow-focus);
}

.hero-search__control::placeholder {
  color: var(--label-quaternary);
  font-weight: var(--weight-medium);
}

select.hero-search__control {
  padding-inline-end: var(--space-6);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23f4511e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 14px;
}

[dir="rtl"] select.hero-search__control {
  background-position: left center;
}

.hero-search__submit {
  display: inline-grid;
  place-items: center;
  gap: var(--space-2);
  grid-auto-flow: column;
  min-block-size: 52px;
  padding-inline: var(--space-6);
  border-radius: var(--radius-s);
  background-color: var(--brand);
  color: var(--brand-contrast);
  font-weight: var(--weight-bold);
  transition: background-color var(--duration-fast) var(--ease-out);
}

.hero-search__submit:hover {
  background-color: var(--brand-hover);
}

/* On a single-row bar the button is a square icon; the word is only shown when stacked. */
@media (min-width: 860px) {
  .hero-search__submit {
    inline-size: 56px;
    padding-inline: 0;
  }

  .hero-search__submit-text {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.hero__hint {
  margin-block-start: var(--space-4);
  font-size: var(--text-caption-1);
  color: rgba(255, 255, 255, 0.6);
}

/* =============================================================================================
 * Property-type shortcuts — the ring of round icon buttons under the search bar.
 * =========================================================================================== */
.quick-types {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4) var(--space-8);
  margin-block-start: var(--space-10);
}

.quick-type {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-caption-1);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--duration-fast) var(--ease-out);
}

.quick-type__icon {
  display: grid;
  place-items: center;
  inline-size: 62px;
  block-size: 62px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.quick-type:hover {
  color: #fff;
}

.quick-type:hover .quick-type__icon {
  background-color: var(--brand);
  border-color: var(--brand);
  transform: translateY(-3px);
}

/* =============================================================================================
 * Featured inventory — a bento grid: one lead tile at double size, four supporting tiles.
 *
 * Below 1024px it collapses to a plain two-column grid, where a "lead" tile would only make the
 * rhythm uneven.
 * =========================================================================================== */
.bento {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}

/* The cell is a flex parent purely so the tile inside fills a double-height lead slot; without
 * it the tile keeps its own min-height and leaves the rest of the cell empty. */
.bento__item {
  display: flex;
}

.bento__item > .tile {
  flex: 1;
  min-inline-size: 0;
}

@media (min-width: 640px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .bento {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 208px;
  }

  .bento__item--lead {
    grid-column: span 2;
    grid-row: span 2;
  }
}

/* =============================================================================================
 * Tile — a listing rendered as a photograph with its caption laid over the foot.
 *
 * The whole tile is clickable through a stretched pseudo-element on the title link, so the
 * accessible name stays on the real anchor rather than wrapping price, badges and specs into it.
 * =========================================================================================== */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-block-size: 232px;
  border-radius: var(--radius-l);
  overflow: hidden;
  isolation: isolate;
  background-color: var(--ink-soft);
  color: #fff;
  transition: transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-m);
}

.tile__image {
  position: absolute;
  inset: 0;
  z-index: -2;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.tile:hover .tile__image {
  transform: scale(1.05);
}

/* Shown instead of a photo while a listing has no media, so the tile reads as intentional
 * rather than broken: a type icon on a navy gradient. */
.tile__placeholder {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: grid;
  place-items: center;
  /* Pushed above centre so the glyph clears the caption that sits over the tile's foot. */
  padding-block-end: 40%;
  /* The same weave the community tiles use, so a photo-less grid still has a surface rather than
   * a flat rectangle. The glyph on top is kept faint: it is texture, not an illustration. */
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.03) 0 2px,
      rgba(255, 255, 255, 0) 2px 12px
    ),
    linear-gradient(150deg, var(--ink-raised) 0%, var(--ink-strong) 100%);
  color: rgba(255, 255, 255, 0.1);
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--scrim-card);
}

.tile__top {
  position: absolute;
  inset-block-start: var(--space-3);
  inset-inline: var(--space-3);
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  pointer-events: none;
}

.tile__top > * {
  pointer-events: auto;
}

.tile__flags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tile__save {
  display: grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  border-radius: 50%;
  background-color: rgba(21, 27, 37, 0.55);
  color: #fff;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.tile__save:hover {
  background-color: var(--brand);
}

.tile__save[aria-pressed="true"] {
  background-color: var(--brand);
  color: #fff;
}

.tile__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-5);
}

.tile__title {
  font-size: var(--text-subhead);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
}

.tile--lead .tile__title {
  font-size: var(--text-title-2);
}

.tile__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.tile__location {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-caption-1);
  color: rgba(255, 255, 255, 0.7);
}

.tile__price {
  font-size: var(--text-title-3);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-title);
  font-variant-numeric: tabular-nums;
}

.tile--lead .tile__price {
  font-size: var(--text-title-1);
}

.tile__price-note {
  font-size: var(--text-caption-1);
  font-weight: var(--weight-medium);
  color: rgba(255, 255, 255, 0.7);
}

/* The lead tile has room to set the price against the title rather than under it. */
.tile--lead .tile__body {
  gap: var(--space-2);
}

@media (min-width: 1024px) {
  .tile--lead .tile__headline {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-6);
  }
}

/* The specification strip pinned to the very bottom edge, as in the reference layout. */
.tile__specs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block-start: var(--space-3);
}

/* =============================================================================================
 * Value pillars — "why choose us", three centred icon columns.
 * =========================================================================================== */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--space-10) var(--space-8);
}

.value {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}

.value__icon {
  display: grid;
  place-items: center;
  inline-size: 68px;
  block-size: 68px;
  border-radius: 50%;
  background-color: var(--accent-soft);
  color: var(--accent-text);
}

/* Three quiet tints, so the row reads as a set rather than as one colour repeated. */
.value:nth-child(2) .value__icon {
  background-color: rgba(22, 121, 74, 0.12);
  color: var(--positive);
}

.value:nth-child(3) .value__icon {
  background-color: rgba(52, 96, 190, 0.12);
  color: #3460be;
}

.value:nth-child(4) .value__icon {
  background-color: rgba(168, 91, 0, 0.12);
  color: var(--notice);
}

.value__title {
  font-size: var(--text-title-3);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-title);
}

.value__text {
  font-size: var(--text-subhead);
  line-height: var(--leading-relaxed);
  color: var(--label-secondary);
  max-inline-size: 34ch;
  text-wrap: pretty;
}

/* =============================================================================================
 * Ink panel — an inset navy slab used for the commission argument. Anything dropped inside is
 * inverted by the panel rather than by a modifier on the child.
 * =========================================================================================== */
.ink-panel {
  padding: clamp(var(--space-8), 4vw, var(--space-16));
  border-radius: var(--radius-2xl);
  background-color: var(--ink);
  color: var(--on-ink);
  overflow: hidden;
}

/* Headings are left to inherit `color` from the panel rather than being forced white: that is
 * what lets the white calculator card sitting inside it keep dark headings of its own. */
.ink-panel .lede {
  color: var(--on-ink-secondary);
}

/* =============================================================================================
 * Commission comparison — the product's central argument, rendered as two facing figures.
 * =========================================================================================== */
.commission {
  display: grid;
  gap: var(--space-10);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 960px) {
  .commission {
    grid-template-columns: 1fr minmax(320px, 400px);
    gap: var(--space-16);
  }
}

.commission__figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.commission__figure {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-5);
  border-radius: var(--radius-l);
  border: 1px solid var(--ink-line);
  background-color: rgba(255, 255, 255, 0.04);
}

.commission__figure--ours {
  border-color: var(--brand);
  background-color: rgba(244, 81, 30, 0.14);
}

.commission__rate {
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-display);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.commission__figure--ours .commission__rate {
  color: var(--brand-hover);
}

.commission__figure--market .commission__rate {
  color: var(--on-ink-tertiary);
  text-decoration: line-through;
  text-decoration-thickness: 3px;
}

.commission__caption {
  font-size: var(--text-footnote);
  color: var(--on-ink-secondary);
}

/* Savings calculator — a white card sitting on the navy panel. */
.calculator {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  background-color: var(--surface);
  color: var(--label);
  box-shadow: var(--shadow-l);
}

.calculator__title {
  font-size: var(--text-title-3);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-title);
}

.calculator__result {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-5);
  border-radius: var(--radius-l);
  background-color: var(--accent-soft);
}

.calculator__amount {
  font-size: clamp(1.625rem, 1.1rem + 2vw, 2.25rem);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-display);
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.calculator .commission__caption {
  color: var(--label-secondary);
}

.calculator__line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--text-subhead);
  color: var(--label-secondary);
}

.calculator__line strong {
  color: var(--label);
  font-variant-numeric: tabular-nums;
}

/* =============================================================================================
 * Listing card — the white card used by search results, the panel and any grid that is not the
 * home page's bento.
 * =========================================================================================== */
.listing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  border: 1px solid var(--separator);
  border-radius: var(--radius-l);
  overflow: hidden;
  transition: transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-m);
  border-color: transparent;
}

.listing-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--placeholder);
  overflow: hidden;
}

.listing-card__image {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.listing-card:hover .listing-card__image {
  transform: scale(1.04);
}

/* Shown instead of a photo while a listing has no media, so the tile reads as intentional. */
.listing-card__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--label-quaternary);
}

/*
 * The "Featured" corner ribbon.
 *
 * A wide bar rotated 45° and pushed out past the corner, then clipped by the media box's
 * `overflow: hidden`. Anchored with logical properties and re-rotated the other way in Arabic, so
 * it hangs off the correct corner in both directions.
 */
.listing-card__ribbon {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  inline-size: 140px;
  padding-block: 5px;
  background-color: var(--brand);
  color: var(--brand-contrast);
  font-size: var(--text-caption-2);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  transform: translate(-36px, 22px) rotate(-45deg);
  pointer-events: none;
}

[dir="rtl"] .listing-card__ribbon {
  transform: translate(36px, 22px) rotate(45deg);
}

.listing-card__favourite {
  position: absolute;
  inset-block-end: var(--space-3);
  inset-inline-start: var(--space-3);
  z-index: 3;
  display: grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  border-radius: 50%;
  background-color: rgba(21, 27, 37, 0.55);
  color: #fff;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.listing-card__favourite:hover {
  background-color: var(--brand);
  transform: scale(1.06);
}

.listing-card__favourite[aria-pressed="true"] {
  background-color: var(--brand);
  color: #fff;
}

/* The trust chips take the opposite bottom corner from the save control. */
.listing-card__flags {
  position: absolute;
  inset-block-end: var(--space-3);
  inset-inline-end: var(--space-3);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-1);
  max-inline-size: 68%;
}

/* `flex: 1` plus the `margin-block-start: auto` on the chip row is what lines the chip rows of a
 * grid up with each other, however many lines each title takes. */
.listing-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
}

.listing-card__title {
  font-size: var(--text-body);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  color: var(--label);
}

.listing-card__location {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  font-size: var(--text-footnote);
  line-height: var(--leading-normal);
  color: var(--label-secondary);
}

.listing-card__location svg {
  flex: none;
  /* Nudged down to sit on the first line's optical centre rather than on its cap height. */
  margin-block-start: 3px;
  color: var(--brand);
}

.listing-card__price {
  font-size: var(--text-title-2);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-title);
  font-variant-numeric: tabular-nums;
}

.listing-card__price-note {
  font-size: var(--text-footnote);
  font-weight: var(--weight-medium);
  color: var(--label-tertiary);
}

/* The chip row below the hairline: one loud orange chip, then the quiet figures. */
.listing-card__specs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin-block-start: auto;
  padding-block-start: var(--space-4);
  border-block-start: 1px solid var(--separator);
  font-size: var(--text-footnote);
  color: var(--label-secondary);
}

.listing-card__spec {
  white-space: nowrap;
}

.listing-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* =============================================================================================
 * Area tiles — the "explore Dubai communities" grid.
 * =========================================================================================== */
.area-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-block-size: 190px;
  padding: var(--space-5);
  border-radius: var(--radius-l);
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  /* A navy gradient with a faint diagonal weave over it. The communities have no photography of
   * their own, so the texture is what stops eight identical rectangles reading as placeholders. */
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.035) 0 2px,
      rgba(255, 255, 255, 0) 2px 12px
    ),
    linear-gradient(155deg, var(--ink-raised) 0%, var(--ink-strong) 100%);
  transition: transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

.area-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-m);
}

/* The affordance: a chevron in the corner that warms up and steps forward on hover. */
.area-tile::after {
  content: "›";
  position: absolute;
  inset-block-start: var(--space-4);
  inset-inline-end: var(--space-5);
  font-size: var(--text-title-2);
  font-weight: var(--weight-extrabold);
  line-height: 1;
  color: rgba(255, 255, 255, 0.3);
  transition: color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.area-tile:hover::after {
  color: #fff;
  transform: translateX(3px);
}

[dir="rtl"] .area-tile::after {
  content: "‹";
}

[dir="rtl"] .area-tile:hover::after {
  transform: translateX(-3px);
}

/* A warm wash that only appears on hover, so a grid of eight tiles stays calm at rest. */
.area-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(244, 81, 30, 0) 30%, rgba(244, 81, 30, 0.55) 100%);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
}

.area-tile:hover::before {
  opacity: 1;
}

.area-tile__name {
  font-size: var(--text-title-3);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-title);
}

.area-tile__count {
  font-size: var(--text-footnote);
  color: rgba(255, 255, 255, 0.75);
  font-variant-numeric: tabular-nums;
}

/* =============================================================================================
 * How it works — numbered steps.
 * =========================================================================================== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--space-6);
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  border-radius: var(--radius-l);
  background-color: var(--surface);
  border: 1px solid var(--separator);
  transition: border-color var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

.step:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-s);
}

.step__number {
  display: grid;
  place-items: center;
  inline-size: 42px;
  block-size: 42px;
  border-radius: var(--radius-s);
  background-color: var(--brand);
  color: var(--brand-contrast);
  font-size: var(--text-body);
  font-weight: var(--weight-extrabold);
  font-variant-numeric: tabular-nums;
}

.step__title {
  font-size: var(--text-title-3);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-title);
}

.step__text {
  font-size: var(--text-subhead);
  line-height: var(--leading-relaxed);
  color: var(--label-secondary);
  text-wrap: pretty;
}

/* =============================================================================================
 * Statistics strip — four counters on a single navy rule, no boxes.
 * =========================================================================================== */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(50%, 180px), 1fr));
  gap: var(--space-8);
  padding-block: var(--space-10);
  border-block: 1px solid var(--separator);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  text-align: center;
}

.stat__value {
  font-size: clamp(1.875rem, 1.2rem + 2.2vw, 3rem);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-display);
  line-height: 1;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.stat__label {
  font-size: var(--text-footnote);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--label-tertiary);
}

/* =============================================================================================
 * Promo pair — the orange slab and the navy slab that close the page.
 * =========================================================================================== */
.promo-duo {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .promo-duo {
    grid-template-columns: 1.15fr 1fr;
  }
}

.promo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  padding: clamp(var(--space-8), 3vw, var(--space-12));
  border-radius: var(--radius-2xl);
}

.promo--brand {
  background-color: var(--brand);
  color: #fff;
}

.promo--ink {
  background-color: var(--ink);
  color: var(--on-ink);
}

.promo__title {
  font-size: var(--text-display-s);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-display);
  color: #fff;
  max-inline-size: 16ch;
}

.promo__text {
  font-size: var(--text-subhead);
  line-height: var(--leading-relaxed);
  color: rgba(255, 255, 255, 0.82);
  max-inline-size: 44ch;
}

.promo__list {
  display: grid;
  gap: var(--space-2);
  font-size: var(--text-subhead);
  color: rgba(255, 255, 255, 0.85);
}

.promo__list li {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.promo__list li::before {
  content: "›";
  font-weight: var(--weight-extrabold);
  line-height: 1;
}

.promo--ink .promo__list li::before {
  color: var(--brand-hover);
}

/* The darkened orange used for text on white has no contrast on navy; the lit one does. */
.promo--ink .btn--outline,
.ink-panel .btn--outline,
.section--ink .btn--outline {
  color: var(--brand-hover);
}

.promo--ink .btn--outline:hover,
.ink-panel .btn--outline:hover,
.section--ink .btn--outline:hover {
  color: var(--brand-contrast);
}

[dir="rtl"] .promo__list li::before {
  content: "‹";
}

/* The orange slab's button has to invert: an orange button on orange would vanish. */
.promo--brand .btn--primary {
  background-color: #fff;
  color: var(--accent-text);
}

.promo--brand .btn--primary:hover {
  background-color: rgba(255, 255, 255, 0.88);
}

/* =============================================================================================
 * Call to action band
 * =========================================================================================== */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  padding: clamp(var(--space-12), 5vw, var(--space-20)) var(--gutter);
  border-radius: var(--radius-2xl);
  background-color: var(--brand);
  background-image: radial-gradient(80% 120% at 12% 0%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 60%);
  color: #fff;
  text-align: center;
}

.cta__title {
  font-size: var(--text-display-s);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-display);
  max-inline-size: 22ch;
}

.cta__text {
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
  color: rgba(255, 255, 255, 0.9);
  max-inline-size: 52ch;
}

.cta .btn--primary {
  background-color: #fff;
  color: var(--accent-text);
}

.cta .btn--primary:hover {
  background-color: rgba(255, 255, 255, 0.88);
}

/* =============================================================================================
 * Error pages
 * =========================================================================================== */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  min-block-size: 70vh;
  padding: var(--space-10) var(--gutter);
  text-align: center;
}

.error-page__code {
  font-size: clamp(4rem, 2rem + 10vw, 8rem);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-display);
  line-height: 1;
  color: var(--label-quaternary);
  font-variant-numeric: tabular-nums;
}

.error-page__title {
  font-size: var(--text-display-s);
  font-weight: var(--weight-semibold);
}

.error-page__text {
  color: var(--label-secondary);
  max-inline-size: 52ch;
}

.error-page__trace {
  inline-size: 100%;
  max-inline-size: 100%;
  margin-block-start: var(--space-8);
  padding: var(--space-5);
  border-radius: var(--radius-l);
  background-color: var(--surface-sunken);
  border: 1px solid var(--separator);
  text-align: start;
  font-family: var(--font-mono);
  font-size: var(--text-caption-1);
  line-height: 1.6;
  color: var(--label-secondary);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* =============================================================================================
 * Property index — a horizontal filter band above a full-width results grid.
 *
 * The page reads as three bands: a white breadcrumb strip, a periwinkle band carrying the filter
 * grid and the transaction tabs, then the white results band. Losing the old sidebar rail is what
 * lets the results run four across.
 * =========================================================================================== */

/*
 * Shared bits that outlived the old two-column search page.
 *
 * `.page-title` heads every panel, account and content screen; `.filters__group`, `.filters__pair`
 * and `.segmented--full` are used by the registration form, the profile form and the enquiry form.
 * They keep their original names so those screens need no edit — only the property index's own
 * `.filters` rail is gone.
 */
.page-title {
  margin-block-start: var(--space-3);
  font-size: var(--text-display-s);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-display);
}

.filters__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  border: 0;
  padding: 0;
  margin: 0;
}

.filters__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

/* Full-width segmented control: each option takes an equal share of the row. */
.segmented--full {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  inline-size: 100%;
}

.segmented--full .segmented__option,
.segmented--full .segmented__label {
  inline-size: 100%;
}

.segmented--full .segmented__label {
  padding-inline: var(--space-2);
  justify-content: center;
  font-size: var(--text-footnote);
}

/* --- Breadcrumb strip ------------------------------------------------------------------------ */
.crumb-bar {
  background-color: var(--surface);
  border-block-end: 1px solid var(--separator);
}

.crumb-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
}

.breadcrumbs__current {
  color: var(--accent-text);
  font-weight: var(--weight-bold);
}

/* --- Filter band ----------------------------------------------------------------------------- */
.filter-bar {
  background-color: var(--surface-sunken);
  padding-block: var(--space-6) 0;
}

/*
 * Below 1024px the grid folds into a disclosure: ten controls stacked would push the results off
 * the screen. Two rules reveal it again on desktop, because browsers hide a closed <details> in
 * two different ways — see the note on `.search-layout__rail` history: older engines set
 * `display: none` on the non-summary children, while Chrome slots them into a `::details-content`
 * pseudo-element and hides that with `content-visibility`, which skips painting and hit-testing
 * while still laying the subtree out.
 */
.filter-bar__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-block-end: var(--space-4);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-s);
  background-color: var(--surface);
  font-size: var(--text-subhead);
  font-weight: var(--weight-bold);
  cursor: pointer;
  list-style: none;
}

.filter-bar__toggle::-webkit-details-marker {
  display: none;
}

@media (min-width: 1024px) {
  .filter-bar__toggle {
    display: none;
  }

  .filter-bar__disclosure::details-content {
    content-visibility: visible;
    block-size: auto;
  }
}

.filter-bar__grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: minmax(0, 1fr);
}

/*
 * `minmax(0, 1fr)`, not `1fr`: a `<select>` reports its widest option as its min-content size, so
 * plain `1fr` lets the community list — which holds "Jumeirah Beach Residence (JBR)" — bully the
 * short columns down to nothing. The explicit zero minimum is what keeps the columns even.
 */
@media (min-width: 560px) {
  .filter-bar__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 860px) {
  .filter-bar__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .filter-bar__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Every control is a flat white slab on the periwinkle: no border at rest, brand hairline on
 * focus. The field names itself through its empty option, so no label is drawn. */
.filter-field {
  position: relative;
  display: flex;
  border-radius: var(--radius-s);
  background-color: var(--surface);
  /* The 1px gap in the paired variant shows this through as the divider between the two inputs. */
  gap: 1px;
}

.filter-field__control {
  flex: 1;
  min-inline-size: 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  background-color: var(--surface);
  color: var(--label);
  /* 16px minimum prevents iOS Safari from zooming the viewport on focus. */
  font-size: max(var(--text-subhead), 16px);
  font-weight: var(--weight-semibold);
  appearance: none;
}

.filter-field__control::placeholder {
  color: var(--label-tertiary);
  font-weight: var(--weight-semibold);
}

.filter-field__control:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--shadow-focus);
  /* Above its neighbour, so the focus ring is not clipped by the adjacent input in a pair. */
  z-index: 1;
}

select.filter-field__control {
  padding-inline-end: var(--space-8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23151b25' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  background-size: 14px;
  cursor: pointer;
}

[dir="rtl"] select.filter-field__control {
  background-position: left var(--space-4) center;
  padding-inline-end: var(--space-8);
}

/* Min/max pairs share one cell, split by the 1px gap showing the separator colour through. */
.filter-field--pair {
  background-color: var(--separator);
}

.filter-field--pair .filter-field__control:first-child {
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}

.filter-field--pair .filter-field__control:last-child {
  border-start-start-radius: 0;
  border-end-start-radius: 0;
}

.filter-bar__apply {
  min-block-size: 48px;
}

/* --- "Clear all" and "More filters" ----------------------------------------------------------- */
.filter-bar__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-6);
  margin-block-start: var(--space-4);
  font-size: var(--text-subhead);
  font-weight: var(--weight-semibold);
}

.filter-bar__clear {
  color: var(--label-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}

.filter-bar__clear:hover {
  color: var(--accent-text);
}

.filter-bar__more-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--accent-text);
  cursor: pointer;
  list-style: none;
}

.filter-bar__more-toggle::-webkit-details-marker {
  display: none;
}

.filter-bar__chevron {
  transition: transform var(--duration-fast) var(--ease-out);
}

.filter-bar__more[open] .filter-bar__chevron {
  transform: rotate(180deg);
}

/*
 * The amenity panel takes a full-width line of its own inside the right-aligned meta row, and is
 * shown by the sibling disclosure's open state — see the note in partials/search-filters.php for
 * why it is a sibling rather than a child.
 */
.filter-bar__more:not([open]) ~ .filter-bar__panel {
  display: none;
}

.filter-bar__panel {
  flex: 1 0 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: var(--space-6);
  padding: var(--space-6);
  border-radius: var(--radius-l);
  background-color: var(--surface);
  text-align: start;
}

.filter-bar__amenity-group {
  display: grid;
  gap: var(--space-2);
  align-content: start;
}

.filter-bar__amenity-heading {
  font-size: var(--text-caption-1);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--label-tertiary);
}

/* --- Transaction tabs and keyword search ------------------------------------------------------ */
.result-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-block-start: var(--space-6);
  border-block-start: 1px solid var(--separator);
}

.result-tabs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

/*
 * The active marker is a rule *above* the tab rather than under it: the row sits on the band's
 * bottom edge, and a line drawn there would collide with the results heading below.
 */
.result-tabs__tab {
  padding: var(--space-5) var(--space-5) var(--space-5) 0;
  border-block-start: 2px solid transparent;
  margin-block-start: -1px;
  font-size: var(--text-subhead);
  font-weight: var(--weight-bold);
  color: var(--label-secondary);
  transition: color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.result-tabs__tab + .result-tabs__tab {
  padding-inline-start: var(--space-5);
}

.result-tabs__tab:hover {
  color: var(--label);
}

.result-tabs__tab[aria-current="page"] {
  border-block-start-color: var(--brand);
  color: var(--accent-text);
}

.result-tabs__count {
  color: var(--label-tertiary);
  font-weight: var(--weight-medium);
}

.result-tabs__tab[aria-current="page"] .result-tabs__count {
  color: var(--accent-text);
}

.keyword-search {
  display: flex;
  align-items: center;
  flex: 1 1 min(100%, 320px);
  max-inline-size: 340px;
  margin-block: var(--space-3);
  padding-inline-end: var(--space-2);
  border-radius: var(--radius-s);
  background-color: var(--surface);
}

.keyword-search__input {
  flex: 1;
  min-inline-size: 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  background: none;
  color: var(--label);
  font-size: max(var(--text-subhead), 16px);
}

.keyword-search__input:focus {
  outline: none;
  border-color: var(--brand);
}

.keyword-search__input::placeholder {
  color: var(--label-tertiary);
}

.keyword-search__submit {
  display: grid;
  place-items: center;
  flex: none;
  inline-size: 32px;
  block-size: 32px;
  border-radius: var(--radius-s);
  color: var(--label-tertiary);
  transition: color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

.keyword-search__submit:hover {
  background-color: var(--accent-soft);
  color: var(--accent-text);
}

/* --- Results band ----------------------------------------------------------------------------- */

/* The results follow the filter band directly, so they take a tighter top than a standalone
 * section: a full `--section-y` above the heading strands it in the middle of the page. */
.results-band {
  padding-block: var(--space-10) var(--space-20);
}

.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-block-end: var(--space-8);
}

.results-head__title {
  font-size: var(--text-display-s);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-display);
}

.results-head__count {
  margin-block-start: var(--space-2);
  font-size: var(--text-subhead);
}

.results-head__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
}

.view-toggle {
  display: inline-flex;
  gap: var(--space-1);
}

.view-toggle__item {
  display: grid;
  place-items: center;
  inline-size: 36px;
  block-size: 36px;
  border-radius: var(--radius-s);
  color: var(--label-quaternary);
  transition: color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

.view-toggle__item:hover {
  background-color: var(--surface-sunken);
  color: var(--label-secondary);
}

.view-toggle__item[aria-current="true"] {
  background-color: var(--accent-soft);
  color: var(--brand);
}

.results-head__sort {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.results-head__sort-label {
  font-size: var(--text-subhead);
  font-weight: var(--weight-semibold);
  color: var(--label-secondary);
  white-space: nowrap;
}

.results-head__sort .select {
  inline-size: auto;
  min-inline-size: 12rem;
  font-weight: var(--weight-semibold);
}

/* --- Results grid ----------------------------------------------------------------------------- */
.results-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr));
}

/*
 * List layout. The card turns on its side rather than being a second component: everything inside
 * it — ribbon, save control, chips — keeps working, so the two layouts cannot drift apart.
 */
.results-grid--list {
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .results-grid--list .listing-card {
    flex-direction: row;
  }

  .results-grid--list .listing-card__media {
    flex: 0 0 clamp(220px, 30%, 360px);
    aspect-ratio: auto;
  }

  .results-grid--list .listing-card__body {
    justify-content: center;
    padding: var(--space-6);
  }

  .results-grid--list .listing-card__title {
    font-size: var(--text-title-3);
  }
}

/* --- Pagination -------------------------------------------------------------------------------- */
.pagination__gap {
  padding-inline: var(--space-2);
  color: var(--label-quaternary);
}

/* The previous-page chevron points backwards; both mirror again in Arabic. */
.pagination__prev-icon {
  transform: scaleX(-1);
}

[dir="rtl"] .pagination__prev-icon {
  transform: none;
}

[dir="rtl"] .pagination__next-icon {
  transform: scaleX(-1);
}

/* =============================================================================================
 * Listing detail page
 * =========================================================================================== */

/* --- Gallery -------------------------------------------------------------------------------
 * A CSS-only mosaic: the cover takes the left half and the supporting shots tile the right. The
 * count modifier collapses it gracefully — one photo becomes a single wide frame.
 * ------------------------------------------------------------------------------------------- */
.gallery {
  display: grid;
  gap: var(--space-2);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  margin-block-start: var(--space-4);
  aspect-ratio: 16 / 9;
  max-block-size: 34rem;
}

.gallery--count-1 {
  grid-template-columns: 1fr;
}

.gallery--count-2 {
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 900px) {
  .gallery--count-3,
  .gallery--count-4,
  .gallery--count-5 {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
  }

  .gallery--count-3 .gallery__item:first-child,
  .gallery--count-4 .gallery__item:first-child,
  .gallery--count-5 .gallery__item:first-child {
    grid-row: span 2;
  }

  .gallery--count-3 .gallery__item:nth-child(2) {
    grid-column: span 2;
  }

  .gallery--count-3 .gallery__item:nth-child(3) {
    grid-column: span 2;
  }
}

@media (max-width: 899px) {
  .gallery {
    grid-template-columns: 1fr;
    aspect-ratio: 4 / 3;
  }

  .gallery .gallery__item:not(:first-child) {
    display: none;
  }
}

.gallery__item {
  position: relative;
  background: var(--placeholder);
  overflow: hidden;
}

.gallery__item img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.gallery--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  aspect-ratio: 21 / 9;
  background: var(--placeholder);
  color: var(--label-tertiary);
  text-align: center;
  padding: var(--space-8);
}

.gallery__empty-title {
  font-size: var(--text-title-3);
  font-weight: var(--weight-semibold);
  color: var(--label-secondary);
}

/* --- Two-column body ------------------------------------------------------------------------ */
.listing-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  padding-block: var(--space-10) var(--space-16);
}

@media (min-width: 1024px) {
  .listing-layout {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: var(--space-12);
    align-items: start;
  }

  .listing-layout__aside {
    position: sticky;
    inset-block-start: calc(var(--nav-height-lg) + var(--space-4));
  }
}

.listing-layout__main {
  min-inline-size: 0;
}

.listing-layout__aside {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-inline-size: 0;
}

/* --- Header --------------------------------------------------------------------------------- */
.listing-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-block-end: var(--space-8);
  border-block-end: 1px solid var(--separator);
}

.listing-header__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.listing-header__title {
  font-size: var(--text-display-s);
  letter-spacing: var(--tracking-display);
}

.listing-header__location {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--label-secondary);
  font-size: var(--text-subhead);
}

.listing-header__price {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-display);
  line-height: 1.1;
}

.listing-header__price-period {
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  color: var(--label-tertiary);
}

.listing-header__meta {
  font-size: var(--text-footnote);
  font-variant-numeric: tabular-nums;
}

/* --- Sections ------------------------------------------------------------------------------- */
.listing-section {
  padding-block: var(--space-8);
  border-block-end: 1px solid var(--separator);
}

.listing-section:last-child {
  border-block-end: 0;
}

.listing-section__title {
  margin-block-end: var(--space-5);
  font-size: var(--text-title-2);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-title);
}

.listing-prose {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  color: var(--label-secondary);
  line-height: var(--leading-relaxed);
  max-inline-size: 68ch;
}

/* --- Specification grid --------------------------------------------------------------------- */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: var(--space-4);
}

.spec-grid__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4);
  border-radius: var(--radius-m);
  background-color: var(--surface);
  border: 1px solid var(--separator);
}

.spec-grid__label {
  font-size: var(--text-caption-1);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--label-tertiary);
}

.spec-grid__value {
  font-size: var(--text-subhead);
  font-weight: var(--weight-medium);
}

/* --- Amenities ------------------------------------------------------------------------------ */
.amenity-group + .amenity-group {
  margin-block-start: var(--space-6);
}

.amenity-group__title {
  margin-block-end: var(--space-3);
  font-size: var(--text-caption-1);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--label-tertiary);
}

.amenity-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: var(--space-2) var(--space-5);
}

.amenity-list__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-subhead);
  color: var(--label-secondary);
}

.amenity-list__icon {
  flex: none;
  color: var(--positive);
}

/* --- Owner card ----------------------------------------------------------------------------- */
.owner-card__identity {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-block: var(--space-4);
}

.owner-card__avatar {
  display: grid;
  place-items: center;
  inline-size: 48px;
  block-size: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-active) 100%);
  color: var(--accent-contrast);
  font-weight: var(--weight-semibold);
  flex: none;
}

.owner-card__name {
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
}

.owner-card__role {
  font-size: var(--text-footnote);
}

.owner-card__facts {
  display: grid;
  gap: var(--space-2);
  font-size: var(--text-footnote);
  color: var(--label-secondary);
}

/* --- Commission card ------------------------------------------------------------------------ */
.commission-card__title {
  margin-block-end: var(--space-4);
  font-size: var(--text-title-3);
  font-weight: var(--weight-semibold);
}

.commission-card__savings {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-block-end: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-l);
  background-color: var(--positive-soft);
}

.commission-card__amount {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-display);
  color: var(--positive);
  line-height: 1.1;
}

/* --- Enquiry form --------------------------------------------------------------------------- */
.enquiry__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-block-start: var(--space-5);
}

/* The honeypot: removed from view without `display: none`, which many bots skip. */
.enquiry__honeypot {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The enquiry card is narrow, so its segmented control keeps labels on one line and lets the
 * font shrink slightly rather than wrapping to three lines. */
.enquiry .segmented__label {
  white-space: nowrap;
  font-size: var(--text-caption-1);
  padding-inline: var(--space-3);
}

/* =============================================================================================
 * Informational pages — prose, rate blocks, checklists, FAQ and the contact list.
 * =========================================================================================== */

/* Long-form content written by an administrator. The selectors are element-based because the body
 * is authored HTML, not markup this codebase controls. */
.prose {
  max-inline-size: 68ch;
  color: var(--label-secondary);
  line-height: var(--leading-relaxed);
}

.prose > * + * {
  margin-block-start: var(--space-4);
}

.prose h2 {
  margin-block-start: var(--space-10);
  font-size: var(--text-title-1);
  color: var(--label);
}

.prose h3 {
  margin-block-start: var(--space-6);
  font-size: var(--text-title-3);
  color: var(--label);
}

.prose ul,
.prose ol {
  padding-inline-start: var(--space-6);
  list-style: disc;
  display: grid;
  gap: var(--space-2);
}

.prose ol {
  list-style: decimal;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose strong {
  color: var(--label);
}

/* A notice block an administrator can paste into page content. */
.callout {
  padding: var(--space-5);
  border-radius: var(--radius-l);
  border: 1px solid transparent;
}

.callout--notice {
  background-color: var(--notice-soft);
  border-color: color-mix(in srgb, var(--notice) 24%, transparent);
  color: var(--notice);
}

/* --- Commission page ------------------------------------------------------------------------ */
.rate-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.rate-block__heading {
  font-size: var(--text-title-2);
  font-weight: var(--weight-semibold);
}

.rate-block__basis {
  font-size: var(--text-subhead);
}

.checklist {
  display: grid;
  gap: var(--space-3);
  margin-block-start: var(--space-5);
}

.checklist__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-subhead);
  color: var(--label-secondary);
}

.checklist__icon {
  flex: none;
  margin-block-start: 2px;
}

.checklist__icon--yes {
  color: var(--positive);
}

.checklist__icon--no {
  color: var(--label-quaternary);
}

/* --- FAQ ------------------------------------------------------------------------------------ */
.faq {
  display: grid;
  gap: var(--space-3);
  margin-block-start: var(--space-6);
}

.faq__item {
  padding: var(--space-5);
  border-radius: var(--radius-l);
  background-color: var(--surface);
  border: 1px solid var(--separator);
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  cursor: pointer;
  list-style: none;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__chevron {
  flex: none;
  color: var(--label-tertiary);
  transition: transform var(--duration-fast) var(--ease-out);
}

.faq__item[open] .faq__chevron {
  transform: rotate(180deg);
}

.faq__answer {
  margin-block-start: var(--space-3);
  color: var(--label-secondary);
  line-height: var(--leading-relaxed);
}

/* --- Contact details ------------------------------------------------------------------------ */
.contact-list {
  display: grid;
  gap: var(--space-5);
  margin-block-start: var(--space-5);
}

.contact-list__item dt {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-caption-1);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--label-tertiary);
}

.contact-list__item dd {
  margin-block-start: var(--space-1);
  font-size: var(--text-body);
}

.contact-list__item a {
  color: var(--accent);
}

/* A page's introductory paragraph is constrained for readability even when its container is not,
 * so the heading still lines up with the sections below it. */
.page-lede {
  max-inline-size: 62ch;
  margin-block-start: var(--space-3);
}

/* =============================================================================================
 * Authentication screens — a single centred card on a quiet background.
 * =========================================================================================== */
.auth {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--section-y) var(--gutter);
  min-block-size: 60vh;
}

.auth__card {
  inline-size: 100%;
  max-inline-size: 420px;
  padding: var(--space-8);
  border-radius: var(--radius-2xl);
  background-color: var(--surface);
  border: 1px solid var(--separator);
  box-shadow: var(--shadow-s);
}

.auth__card--wide {
  max-inline-size: 520px;
}

.auth__icon {
  display: grid;
  place-items: center;
  inline-size: 56px;
  block-size: 56px;
  margin-block-end: var(--space-5);
  border-radius: 50%;
  background-color: var(--accent-soft);
  color: var(--accent);
}

.auth__title {
  font-size: var(--text-title-1);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-title);
}

.auth__subtitle {
  margin-block-start: var(--space-2);
  color: var(--label-secondary);
  font-size: var(--text-subhead);
}

.auth__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-block-start: var(--space-6);
}

.auth__links {
  display: grid;
  gap: var(--space-2);
  margin-block-start: var(--space-6);
  padding-block-start: var(--space-5);
  border-block-start: 1px solid var(--separator);
  font-size: var(--text-subhead);
  text-align: center;
}

.auth__links a {
  color: var(--accent);
  font-weight: var(--weight-medium);
}

/* The account menu in the header. */
.account-menu__name {
  max-inline-size: 12ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =============================================================================================
 * Customer area — sidebar navigation beside the content.
 * =========================================================================================== */
.account-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  padding-block: var(--section-y);
}

@media (min-width: 900px) {
  .account-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: var(--space-10);
    align-items: start;
  }
}

.account-layout__main {
  min-inline-size: 0;
}

.account-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-1);
}

@media (min-width: 900px) {
  .account-nav {
    position: sticky;
    inset-block-start: calc(var(--nav-height-lg) + var(--space-4));
    flex-direction: column;
    flex-wrap: nowrap;
  }
}

.account-nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-m);
  font-size: var(--text-subhead);
  font-weight: var(--weight-medium);
  color: var(--label-secondary);
  transition: background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.account-nav__link:hover {
  background-color: var(--surface);
  color: var(--label);
}

.account-nav__link[aria-current="page"] {
  background-color: var(--accent-soft);
  color: var(--accent);
}

/* A metric tile that is also a link keeps its text colour rather than turning blue. */
a.metric {
  color: inherit;
  transition: transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

a.metric:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-s);
}

/* --- Record lists: saved searches, enquiries, devices ---------------------------------------- */
.record-list {
  display: grid;
  gap: var(--space-3);
}

.record {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-l);
  background-color: var(--surface);
  border: 1px solid var(--separator);
}

.record__body {
  min-inline-size: 0;
  flex: 1 1 18rem;
}

.record__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
}

.record__title a {
  color: inherit;
}

.record__title a:hover {
  color: var(--accent);
}

.record__excerpt {
  margin-block-start: var(--space-1);
  font-size: var(--text-subhead);
  color: var(--label-secondary);
}

.record__meta {
  margin-block-start: var(--space-1);
  font-size: var(--text-footnote);
  color: var(--label-tertiary);
}

.record__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
}

/* The favourite control is a form wrapping a button; the form must not disturb the card layout. */
.listing-card__favourite-form {
  position: absolute;
  inset-block-end: var(--space-3);
  inset-inline-start: var(--space-3);
  z-index: 3;
  margin: 0;
}

.listing-card__favourite-form .listing-card__favourite {
  position: static;
}

/* --------------------------------------------------------------------------------------------
 * Owner panel
 *
 * The panel reuses the public site's tokens, buttons and fields wholesale; what is added here is
 * only what a working surface needs and a browsing surface does not — a sectioned form, a dense
 * data table, a photo grid.
 *
 * The visual idea stays iOS: grouped sections on a sunken background, generous internal padding,
 * hairline separators rather than boxes, and no shadow until something is interactive.
 * ------------------------------------------------------------------------------------------- */

.account-nav__eyebrow {
  padding-inline: var(--space-4);
  font-size: var(--text-caption-1);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--label-tertiary);
}

/* Hidden on narrow screens, where the nav is a horizontal strip and a heading above it would
   push the whole panel down for no benefit. */
@media (max-width: 899px) {
  .account-nav__eyebrow {
    display: none;
  }
}

.account-nav__link--cta {
  color: var(--accent);
}

.account-nav__divider {
  margin-block: var(--space-2);
  border: 0;
  border-block-start: 1px solid var(--separator);
}

@media (max-width: 899px) {
  .account-nav__divider {
    display: none;
  }
}

/* --- Notices: a whole-width, tappable "this needs you" row ----------------------------------- */
.notice {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-l);
  background-color: var(--surface);
  border: 1px solid var(--separator);
  color: var(--label);
  font-size: var(--text-subhead);
  transition: transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.notice:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-s);
}

.notice > span {
  flex: 1 1 auto;
}

.notice--critical {
  border-color: var(--critical-soft);
  background-color: var(--critical-soft);
}

.notice--notice {
  border-color: var(--notice-soft);
  background-color: var(--notice-soft);
}

.stack {
  display: grid;
  gap: var(--space-3);
}

/* --- Filter tabs: horizontal, scrollable, with counts ---------------------------------------- */
.filter-tabs {
  display: flex;
  gap: var(--space-2);
  margin-block: var(--space-6);
  padding-block-end: var(--space-2);
  overflow-x: auto;
  /* The tab strip scrolls; the page must not. */
  scrollbar-width: thin;
}

.filter-tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background-color: var(--surface-sunken);
  color: var(--label-secondary);
  font-size: var(--text-footnote);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.filter-tabs__tab:hover {
  color: var(--label);
}

.filter-tabs__tab[aria-current="page"] {
  background-color: var(--accent);
  color: #fff;
}

.filter-tabs__count {
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

/* --- Data table ------------------------------------------------------------------------------ */
.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius-l);
  border: 1px solid var(--separator);
  background-color: var(--surface);
}

.data-table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: var(--text-subhead);
}

.data-table th,
.data-table td {
  padding: var(--space-4);
  text-align: start;
  vertical-align: middle;
  border-block-end: 1px solid var(--separator);
}

.data-table thead th {
  font-size: var(--text-caption-1);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--label-tertiary);
  white-space: nowrap;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-block-end: 0;
}

.data-table .numeric {
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.cell-media {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-inline-size: 16rem;
}

.cell-media__thumb {
  flex: none;
  inline-size: 72px;
  block-size: 54px;
  border-radius: var(--radius-s);
  object-fit: cover;
  background-color: var(--surface-sunken);
}

.cell-media__thumb--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--label-quaternary);
}

.cell-media__title {
  display: block;
  font-weight: var(--weight-medium);
  color: var(--label);
}

.cell-media__title:hover {
  color: var(--accent);
}

.cell-media__meta {
  display: block;
  font-size: var(--text-caption-1);
  color: var(--label-tertiary);
}

.cell-media__meta--warning {
  color: var(--notice);
}

.cell-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
  white-space: nowrap;
}

/* --- Sectioned form -------------------------------------------------------------------------- */
.panel-form {
  display: grid;
  gap: var(--space-6);
  margin-block-start: var(--space-8);
}

.panel-form__section {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  border: 1px solid var(--separator);
  background-color: var(--surface);
  /* A fieldset carries browser defaults that fight the grid; reset them here rather than globally
     so ordinary fieldsets elsewhere keep their native behaviour. */
  min-inline-size: 0;
  margin: 0;
}

/* A disabled fieldset greys its contents; without this the whole locked section also loses its
   card, which reads as broken rather than as read-only. */
.panel-form__section[disabled] {
  opacity: 0.65;
}

.panel-form__section + .panel-form__section {
  margin-block-start: var(--space-6);
}

.panel-form__legend {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0;
  font-size: var(--text-title-3);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
}

.panel-form__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  inline-size: 28px;
  block-size: 28px;
  border-radius: 50%;
  background-color: var(--accent-soft);
  color: var(--accent);
  font-size: var(--text-footnote);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}

.field-row {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.field__prefixed {
  display: flex;
  align-items: stretch;
}

.field__prefix {
  display: inline-flex;
  align-items: center;
  padding-inline: var(--space-4);
  border: 1px solid var(--border-field);
  border-inline-end: 0;
  border-start-start-radius: var(--radius-m);
  border-end-start-radius: var(--radius-m);
  background-color: var(--surface-sunken);
  color: var(--label-secondary);
  font-size: var(--text-footnote);
  font-weight: var(--weight-medium);
}

.field__prefixed .input {
  border-start-start-radius: 0;
  border-end-start-radius: 0;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.choice-row__item {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background-color: var(--surface-sunken);
  color: var(--label-secondary);
  font-size: var(--text-subhead);
  font-weight: var(--weight-medium);
}

.choice-row__item.is-active {
  background-color: var(--accent);
  color: #fff;
}

.check-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.panel-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.panel-form__actions form {
  margin: 0;
}

.panel-form__danger {
  display: grid;
  gap: var(--space-2);
  justify-items: start;
  padding-block-start: var(--space-5);
  border-block-start: 1px solid var(--separator);
}

.checklist {
  margin-block-start: var(--space-2);
  padding-inline-start: var(--space-5);
  list-style: disc;
  font-size: var(--text-subhead);
}

.checklist li + li {
  margin-block-start: var(--space-1);
}

/* --- Photo grid ------------------------------------------------------------------------------ */
.upload-form {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
  padding: var(--space-5);
  border-radius: var(--radius-l);
  border: 1px dashed var(--separator-strong);
  background-color: var(--surface-sunken);
}

.upload-form .field {
  inline-size: 100%;
}

.media-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}

.media-grid__item {
  position: relative;
  display: grid;
  gap: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius-l);
  border: 1px solid var(--separator);
  background-color: var(--surface);
}

.media-grid__item.is-cover {
  border-color: var(--accent);
}

.media-grid__image {
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-m);
  background-color: var(--surface-sunken);
}

.media-grid__badge {
  position: absolute;
  inset-block-start: var(--space-3);
  inset-inline-start: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background-color: var(--accent);
  color: #fff;
  font-size: var(--text-caption-2);
  font-weight: var(--weight-semibold);
}

.media-grid__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.media-grid__actions form {
  margin: 0;
}

.media-grid__alt {
  display: flex;
  gap: var(--space-2);
  margin: 0;
}

.input--compact {
  padding: var(--space-2) var(--space-3);
  font-size: max(var(--text-footnote), 16px);
}

/* --- Timeline and disclosure ----------------------------------------------------------------- */
.disclosure > summary {
  cursor: pointer;
  font-size: var(--text-subhead);
  font-weight: var(--weight-medium);
  color: var(--label-secondary);
}

.timeline {
  display: grid;
  gap: var(--space-3);
  margin-block-start: var(--space-4);
  padding-inline-start: var(--space-4);
  border-inline-start: 2px solid var(--separator);
}

.timeline__item {
  display: grid;
  gap: 2px;
}

.timeline__date {
  font-size: var(--text-caption-1);
  color: var(--label-tertiary);
  font-variant-numeric: tabular-nums;
}

.timeline__text {
  font-size: var(--text-subhead);
  font-weight: var(--weight-medium);
}

.timeline__note {
  font-size: var(--text-footnote);
  color: var(--label-secondary);
}

/* --- Record list additions used by the enquiry inbox ----------------------------------------- */
.record-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-l);
  background-color: var(--surface);
  border: 1px solid var(--separator);
}

.record-list__item--stacked {
  align-items: flex-start;
}

.record-list__main {
  display: grid;
  gap: 2px;
  min-inline-size: 0;
  flex: 1 1 18rem;
  color: inherit;
}

.record-list__title {
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
}

a.record-list__title:hover,
a.record-list__main:hover .record-list__title {
  color: var(--accent);
}

.record-list__meta {
  font-size: var(--text-footnote);
  color: var(--label-tertiary);
}

.record-list__contact {
  font-size: var(--text-footnote);
  color: var(--label-secondary);
}

.record-list__excerpt {
  margin-block-start: var(--space-2);
  font-size: var(--text-subhead);
  color: var(--label-secondary);
}

/* --- Detail card used by the enquiry page ---------------------------------------------------- */
.detail-card {
  display: grid;
  gap: var(--space-5);
  margin-block-start: var(--space-6);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  border: 1px solid var(--separator);
  background-color: var(--surface);
}

.detail-list {
  display: grid;
  gap: var(--space-3);
}

.detail-list__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
}

.detail-list__row dt {
  flex: 0 0 8rem;
  font-size: var(--text-subhead);
  color: var(--label-tertiary);
}

.detail-list__row dd {
  margin: 0;
  font-size: var(--text-subhead);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-block-start: var(--space-8);
}

/* --------------------------------------------------------------------------------------------
 * Administration area
 *
 * Reuses everything the owner panel added — the sectioned form, the data table, the filter tabs —
 * and adds only what a moderation surface needs on top: a search bar, inline one-field forms, and
 * a readable rendering of a recorded change.
 * ------------------------------------------------------------------------------------------- */

.account-nav__badge {
  margin-inline-start: auto;
  min-inline-size: 22px;
  padding-inline: var(--space-2);
  border-radius: var(--radius-pill);
  background-color: var(--notice);
  color: #fff;
  font-size: var(--text-caption-2);
  font-weight: var(--weight-semibold);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.search-bar {
  display: flex;
  gap: var(--space-2);
  margin-block-start: var(--space-6);
}

.search-bar .input {
  flex: 1 1 auto;
  min-inline-size: 0;
}

/* One field plus its submit, sitting inside a table cell. The wrap keeps the pair together on a
   narrow screen rather than stranding the button on its own row. */
.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
}

.inline-form .select {
  inline-size: auto;
  min-inline-size: 8rem;
}

.change-list {
  display: grid;
  gap: var(--space-1);
  font-size: var(--text-caption-1);
}

.change-list__field {
  font-weight: var(--weight-medium);
  color: var(--label-secondary);
}

.change-list__value {
  display: block;
  color: var(--label-tertiary);
  /* A recorded value can be a long string; it must wrap rather than widen the table. */
  overflow-wrap: anywhere;
}
