:root {
  /* ---- text ------------------------------------------------------------ */
  --ink: #17212b;
  --ink-2: #46535f;
  --muted: #59636e;
  --icon-muted: #7b858e;

  /* ---- surfaces -------------------------------------------------------- */
  --page: #f4f7fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f6f8fa;
  --surface-muted: #f1f3f4;
  --surface-strong: #e9ecef;
  --placeholder: #e8edf2;

  /* ---- lines and boundaries -------------------------------------------- */
  --line: #dce3ea;
  --line-strong: #d5dfe8;
  --line-contrast: #828e9a;
  /* Control boundaries: worst case 3.29:1 across every surface these sit on. */
  --control-border: #7d868e;
  --shadow-color: #ced7df;

  /* ---- brand ----------------------------------------------------------- */
  --primary: #0057b8;
  --primary-dark: #00458f;
  --accent: #0060b8;
  /* Text and glyphs drawn on top of a --primary fill. Flips with the theme, so a
     filled button never has to hard-code white. */
  --on-primary: #ffffff;
  /* Large brand-filled areas (header, auth page, the create bar). Kept apart from
     --primary so the dark theme can darken the canvas while badges stay bright. */
  --brand-canvas: #0057b8;
  --on-brand-canvas: #ffffff;
  --primary-soft: #eaf3fd;
  --primary-tint: #f7faff;
  --primary-border: #a8ccef;
  --primary-border-strong: #8dbce9;
  --primary-ring: #d9ebfd;
  --primary-glow: #82baf1;
  --primary-glow-soft: #d5e9fc;

  /* ---- status: success -------------------------------------------------- */
  --success: #20a464;
  --success-dark: #137844;
  --success-mid: #168153;
  --success-text: #0d6240;
  --success-border: #9fcdb5;
  --success-surface: #eaf7f0;
  --on-success: #ffffff;

  /* ---- status: danger --------------------------------------------------- */
  --danger: #b93434;
  --danger-dark: #8f2222;
  --danger-border: #e2adad;
  --danger-surface: #fceeee;
  --danger-ring: #f7d9d9;

  /* ---- status: warning -------------------------------------------------- */
  --warning: #8a5b00;
  --warning-mid: #c57a12;
  --warning-border: #e0c58f;
  --warning-surface: #fff0d2;
  --warning-surface-soft: #fffaf0;
  --on-warning: #ffffff;

  /* ---- status: info ----------------------------------------------------- */
  --info-text: #245b83;
  --info-border: #b8d4e7;
  --info-surface: #edf6fc;

  /* Focus ring: 6.87:1 on white, 6.13:1 on --primary-soft (WCAG 2.2 SC 1.4.11 needs 3:1). */
  --focus: #0057b8;
  --focus-on-primary: #ffffff;

  --text-2xs: 12px;
  --text-xs: 13px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-md: 18px;
  --text-lg: 20px;
  --text-xl: 24px;
  --text-2xl: 28px;
  --text-3xl: 32px;
  --text-4xl: 38px;

  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --radius-control: 6px;
  --radius-panel: 8px;
  --ease-out: cubic-bezier(.25, 1, .5, 1);
  --ease-out-quint: cubic-bezier(.22, 1, .36, 1);
  --motion-instant: 120ms;
  --motion-fast: 180ms;
  --motion-state: 220ms;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--text-base);
  /* Baseline for every block that does not set its own. Headings tighten to 1.2
     just below; small print stays readable instead of falling back to `normal`. */
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
  letter-spacing: 0;
}
/* Dark theme overrides token values only — no component rule is repeated. Every
   foreground/background pair below was checked against WCAG AA in both themes.
   Note --primary inverts role: it becomes the LIGHT fill and --on-primary the dark
   glyph on top, which is why no rule hard-codes white any more. */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7edf3;
    --ink-2: #c3cdd8;
    --muted: #9caab7;
    --icon-muted: #93a1ae;

    --page: #10161c;
    --surface: #18212a;
    --surface-2: #1d2731;
    --surface-3: #222d38;
    --surface-muted: #27323d;
    --surface-strong: #2e3a46;
    --placeholder: #2e3a46;

    --line: #2c3945;
    --line-strong: #3b4956;
    --line-contrast: #7f8d9b;
    --control-border: #8b98a5;
    --shadow-color: #05090d;

    --primary: #6fb2f2;
    --primary-dark: #97caf8;
    --accent: #7cbcf6;
    --on-primary: #0b1219;
    --brand-canvas: #091320;
    --on-brand-canvas: #e7edf3;
    --primary-soft: #17293a;
    --primary-tint: #16222e;
    --primary-border: #2f5677;
    --primary-border-strong: #43739c;
    --primary-ring: #1f3a55;
    --primary-glow: #3c6d99;
    --primary-glow-soft: #1c3145;

    --success: #34c07c;
    --success-dark: #7fd9ab;
    --success-mid: #45cf8b;
    --success-text: #7ee0af;
    --success-border: #2f6b4c;
    --success-surface: #12271d;
    --on-success: #06130c;

    --danger: #f08a8a;
    --danger-dark: #f6b0b0;
    --danger-border: #6d3535;
    --danger-surface: #2a1618;
    --danger-ring: #5a2626;

    --warning: #e9b45f;
    --warning-mid: #f0c179;
    --warning-border: #6b5426;
    --warning-surface: #2a2113;
    --warning-surface-soft: #221c12;
    --on-warning: #140f06;

    --info-text: #8fc4ea;
    --info-border: #2f4f68;
    --info-surface: #14232f;

    --focus: #7cbcf6;
    --focus-on-primary: #e7edf3;
  }
}
@view-transition { navigation: auto; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--page); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
button[aria-disabled="true"] { pointer-events: none; }
.app-header { min-height: 68px; padding: 0 32px; background: var(--brand-canvas); color: var(--on-brand-canvas); border-bottom: 1px solid color-mix(in srgb, var(--on-brand-canvas) 20%, transparent); display: flex; align-items: center; justify-content: space-between; gap: 24px; view-transition-name: app-header; }
.brand { color: var(--on-brand-canvas); font-weight: 800; font-size: var(--text-md); display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; flex: 0 0 30px; border: 2px solid var(--on-brand-canvas); border-radius: 6px; }
.brand:hover { text-decoration: none; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; padding: 11px; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 4px 0; border-radius: 1px; background: var(--ink); transition: transform var(--motion-fast) var(--ease-out), opacity var(--motion-fast) var(--ease-out); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
nav { display: flex; align-items: stretch; gap: 4px; height: 68px; overflow-x: auto; }
nav a, .link-button { border: 0; background: transparent; color: var(--on-brand-canvas); padding: 0 14px; display: flex; align-items: center; height: 68px; font-weight: 600; white-space: nowrap; }
nav a[aria-current="page"] { color: var(--on-brand-canvas); box-shadow: inset 0 -4px var(--on-brand-canvas); font-weight: 800; }
nav form { margin: 0; }
/* Deliberately loud: acting inside someone else's account must never be subtle. */
.impersonation-bar { min-height: 52px; padding: var(--space-xs) var(--space-md); background: var(--warning); color: var(--on-warning); display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; position: sticky; top: 0; z-index: 30; }
.impersonation-bar p { margin: 0; flex: 1 1 320px; font-size: var(--text-sm); line-height: 1.4; }
.impersonation-bar strong { font-weight: 800; }
.impersonation-bar form { margin: 0; }
.impersonation-mark { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; background: var(--on-warning); color: var(--warning); display: grid; place-items: center; font-size: var(--text-base); font-weight: 800; }
.impersonation-bar .secondary { min-height: 40px; border-color: var(--on-warning); background: transparent; color: var(--on-warning); font-weight: 800; }
.impersonation-bar .secondary:hover { border-color: var(--on-warning); background: color-mix(in srgb, var(--on-warning) 16%, transparent); color: var(--on-warning); }
.impersonation-bar .secondary:focus-visible { outline: 3px solid var(--on-warning); outline-offset: 2px; }
.language-switch { margin: 0; }
.language-button { min-width: 44px; justify-content: center; font-variant: tabular-nums; letter-spacing: .04em; }
nav .language-button { border-inline-end: 1px solid color-mix(in srgb, var(--on-brand-canvas) 35%, transparent); }
.auth-language { display: flex; justify-content: flex-end; margin-bottom: var(--space-md); }
/* `height: 68px` comes from the shared `nav a, .link-button` rule and min-height
   cannot override it — off the header the chip has to size itself. */
.auth-language .language-button { height: auto; min-height: 44px; padding: 0 14px; border: 1px solid var(--control-border); border-radius: var(--radius-control); background: var(--surface); color: var(--primary-dark); font-weight: 800; }
.auth-language .language-button:hover { border-color: var(--primary); background: var(--primary-soft); }
.page { width: min(1440px, 100%); margin: 0 auto; padding: 36px 32px 64px; }
.page-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.page-heading { margin-bottom: 28px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; line-height: 1.2; }
p { text-wrap: pretty; }
h1 { font-size: var(--text-3xl); line-height: 1.12; margin-bottom: 5px; }
h2 { font-size: var(--text-lg); margin-bottom: 14px; }
.muted { color: var(--muted); margin-bottom: 0; font-size: var(--text-sm); }
.primary, .secondary { min-height: 46px; border-radius: var(--radius-control); padding: 10px 18px; font-weight: 800; transition: background-color var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out), transform var(--motion-instant) var(--ease-out); }
.primary { border: 1px solid var(--primary); background: var(--primary); color: var(--on-primary); }
.primary:hover { background: var(--primary-dark); }
.primary:active, .secondary:active { transform: scale(.98); }
.secondary { border: 1px solid var(--control-border); background: var(--surface); color: var(--primary); }
.secondary:hover { border-color: var(--primary); background: var(--primary-soft); }
.primary:focus-visible, .secondary:focus-visible, .danger-text:focus-visible,
.tertiary-action:focus-visible, a:focus-visible, summary:focus-visible, .link-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
/* A blue ring is invisible on the blue header — 2.81:1 against --primary. */
.app-header :focus-visible { outline-color: var(--focus-on-primary); }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.button-link:hover { text-decoration: none; }
button.is-busy, .button-link.is-busy { gap: 9px; }
button.is-busy::after, .button-link.is-busy::after { content: ""; width: 15px; height: 15px; flex: 0 0 15px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: busy-spin 650ms linear infinite; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: ""; width: 7px; height: 7px; flex: 0 0 7px; margin-inline: 10px 3px; border-inline-end: 2px solid currentColor; border-block-end: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform var(--motion-state) var(--ease-out-quint); }
details[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.status-dot { width: 9px; height: 9px; margin-top: 8px; border-radius: 50%; background: var(--muted); }
.status-dot.ok { background: var(--success-mid); }
.status-dot.bad { background: var(--danger); }
.status-dot.warn { background: var(--warning-mid); }
.section-block { padding: 24px 0 30px; border-top: 1px solid var(--line); }
/* Column labels for the mobile card layout. Real elements rather than generated
   content: `display: block` on the table strips the row/column semantics, and
   ::before text is not reliably exposed to screen readers. Hidden on desktop,
   where the <th> still carries the association. */
.cell-label { display: none; color: var(--muted); font-size: var(--text-2xs); font-weight: 700; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
th { color: var(--primary-dark); text-align: left; font-size: var(--text-2xs); text-transform: uppercase; font-weight: 800; background: var(--primary-soft); }
th, td { padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sort-button { width: 100%; min-height: 24px; padding: 0 18px 0 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; text-align: left; text-transform: inherit; position: relative; white-space: nowrap; }
.sort-button::after { content: "\21C5"; position: absolute; right: 0; color: var(--icon-muted); font-size: var(--text-sm); }
th[aria-sort="ascending"] .sort-button::after { content: "\2191"; color: var(--accent); }
th[aria-sort="descending"] .sort-button::after { content: "\2193"; color: var(--accent); }
.sort-button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { min-width: 260px; }
.compact-table td:first-child { min-width: 150px; }
.empty { text-align: center; color: var(--muted); padding: 36px; }
.status-label { display: inline-block; font-size: var(--text-2xs); line-height: 1.4; padding: 2px 6px; border-radius: 4px; background: var(--surface-strong); white-space: nowrap; }
.status-notified, .status-ok { background: var(--success-surface); color: var(--success-text); }
.status-paylivery { background: var(--info-surface); color: var(--info-text); margin-top: 4px; }
.status-pending_ai, .status-pending_notification, .status-running { background: var(--warning-surface); color: var(--warning); }
.status-error { background: var(--danger-surface); color: var(--danger-dark); }
.compatibility-yes { color: var(--success-text); font-weight: 700; }
.compatibility-no { color: var(--danger); font-weight: 700; }
.error-cell { max-width: 340px; color: var(--danger); overflow-wrap: anywhere; }
.offers-page-heading { margin-bottom: var(--space-lg); }
.page-actions { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }
.page-actions form { margin: 0; }
.overview-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: var(--space-xl); border: 1px solid var(--primary-border); background: var(--surface); }
.overview-strip > div { min-width: 0; min-height: 84px; padding: var(--space-sm) var(--space-lg); border-inline-end: 1px solid var(--line); display: grid; align-content: center; gap: var(--space-2xs); }
.overview-strip > div:last-child { border-inline-end: 0; }
.overview-strip strong { font-size: var(--text-xl); line-height: 1.15; }
.overview-strip span { color: var(--muted); font-size: var(--text-2xs); }
/* Emphasis is opt-in via the template, not tied to DOM position: hiding or
   reordering a tile must not move the highlight onto a different metric. */
.overview-strip > div.is-highlighted { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.overview-strip > div.is-highlighted span { color: var(--on-primary); }
.overview-strip .status-dot { grid-row: 1 / 3; align-self: center; margin: 0 var(--space-xs) 0 0; }
.messenger-overview { grid-template-columns: auto minmax(0, 1fr); }
.messenger-overview strong, .messenger-overview > span:last-child { grid-column: 2; }
.offer-filter { margin-bottom: var(--space-md); padding: var(--space-sm) var(--space-md); border: 1px solid var(--line); background: var(--surface-3); display: flex; align-items: center; gap: var(--space-sm); }
.offer-filter label { color: var(--ink-2); font-size: var(--text-xs); font-weight: 700; }
.offer-filter select { width: min(100%, 340px); min-height: 42px; }
.offer-filter .secondary { min-height: 42px; }
.filter-reset { color: var(--primary); font-size: var(--text-xs); font-weight: 700; }
.top-deals-section { padding: var(--space-xl) 0; border-block: 2px solid var(--primary); }
.top-deals-heading { margin-bottom: var(--space-md); display: flex; align-items: end; justify-content: space-between; gap: var(--space-lg); }
.top-deals-heading h2 { margin-bottom: var(--space-2xs); color: var(--primary-dark); font-size: var(--text-xl); }
.top-deals-heading p { margin: 0; color: var(--muted); font-size: var(--text-sm); }
.top-deals-count { min-height: 32px; padding: 6px 10px; border-radius: var(--radius-control); background: var(--primary); color: var(--on-primary); display: inline-flex; align-items: center; font-size: var(--text-2xs); font-weight: 800; white-space: nowrap; }
.top-deals-list { border: 1px solid var(--primary-border); background: var(--surface); }
.top-deal { min-width: 0; padding: var(--space-md); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 38px 96px minmax(220px, 1fr) minmax(90px, auto) minmax(280px, auto); align-items: center; gap: var(--space-md); transition: background-color var(--motion-fast) var(--ease-out); }
.top-deal:last-child { border-bottom: 0; }
.top-deal:hover { background: var(--primary-tint); }
.top-deal:first-child { background: var(--primary-soft); }
.top-deal-rank { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: var(--text-xs); font-weight: 800; }
.top-deal:first-child .top-deal-rank { background: var(--primary); color: var(--on-primary); }
.top-deal-image { width: 96px; height: 72px; display: block; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--placeholder); object-fit: cover; transition: transform var(--motion-state) var(--ease-out-quint); }
/* Placeholder text lives in the template, not here — CSS content is untranslatable. */
.top-deal-image-empty { display: grid; place-items: center; padding: 4px; color: var(--muted); font-size: var(--text-2xs); line-height: 1.3; text-align: center; }
.top-deal-main { min-width: 0; display: grid; gap: 3px; }
.top-deal-main > a { color: var(--ink); font-size: var(--text-base); font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.top-deal-main > a:hover { color: var(--primary); }
.top-deal-main > span { color: var(--muted); font-size: var(--text-2xs); }
.top-deal-main p { margin: 2px 0 0; color: var(--ink-2); font-size: var(--text-2xs); line-height: 1.4; }
.top-deal-main .top-deal-image-note { color: var(--info-text); }
.top-deal-price strong { font-size: var(--text-lg); white-space: nowrap; }
.top-deal-price span { color: var(--muted); font-size: var(--text-2xs); }
.top-deal-scores { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(72px, 1fr)); gap: var(--space-xs); }
.top-deal-scores div { min-width: 0; padding-inline-start: var(--space-sm); border-inline-start: 1px solid var(--line); display: grid; align-content: center; }
.top-deal-scores dt { color: var(--muted); font-size: var(--text-2xs); line-height: 1.25; }
.top-deal-scores dd { margin: 2px 0 0; color: var(--ink); font-size: var(--text-lg); font-weight: 800; }
.top-deal-scores div:last-child dd { color: var(--primary); }
.top-score-track { width: 100%; height: 3px; margin-top: 5px; border-radius: 2px; background: var(--line-strong); overflow: hidden; }
.top-score-track i { width: 0; height: 100%; border-radius: inherit; background: var(--primary); display: block; transform-origin: left center; }
.top-deal:has(.top-deal-explanation[open]) { background: var(--primary-soft); }
.top-deal:has(.top-deal-explanation[open]) .top-deal-image { transform: scale(1.035); }
.top-deal-explanation { grid-column: 3 / -1; margin: 0; }
.top-deal-explanation summary { min-height: 44px; }
.top-deal-explanation .offer-explanation-content { margin-bottom: var(--space-xs); border-color: var(--primary-border); background: var(--surface); }
.top-deals-empty { min-height: 118px; padding: var(--space-lg); display: grid; place-content: center; gap: var(--space-xs); text-align: center; }
.top-deals-empty span { color: var(--muted); font-size: var(--text-xs); }
.offers-section { padding-block: var(--space-lg) var(--space-xl); }
.offers-section-heading { margin-bottom: var(--space-md); }
.offers-section-heading h2 { margin-bottom: var(--space-2xs); }
.mobile-offer-sort { display: none; }
.offers-table tbody tr { transition: background-color var(--motion-fast) var(--ease-out); }
.offers-table tbody tr:hover { background: var(--primary-tint); }
.offers-table th, .offers-table td { padding: var(--space-sm) var(--space-md); }
.offers-table .offer-main-cell { min-width: 310px; }
.offer-title-cell { display: flex; align-items: flex-start; gap: var(--space-sm); }
.offer-title-cell > div { min-width: 0; display: grid; gap: var(--space-2xs); }
.offer-thumbnail { width: 64px; height: 48px; flex: 0 0 64px; border-radius: var(--radius-control); object-fit: cover; background: var(--placeholder); }
.offer-title { color: var(--ink); font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.offer-title:hover { color: var(--primary); }
.offer-agent, .offer-process-status { color: var(--muted); font-size: var(--text-2xs); line-height: 1.35; }
.offer-process-status { color: var(--warning); }
.offer-explanation { margin-top: var(--space-2xs); }
.offer-explanation summary { width: max-content; min-height: 32px; display: flex; align-items: center; color: var(--primary); font-size: var(--text-2xs); font-weight: 700; cursor: pointer; }
.offer-explanation-negative summary { color: var(--danger); }
.offer-explanation-content { min-width: 260px; padding: var(--space-sm); border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface-2); display: grid; gap: var(--space-sm); }
.offer-explanation-content section { display: grid; gap: var(--space-2xs); }
.offer-explanation-content h3 { margin: 0; font-size: var(--text-xs); }
.offer-explanation-content ul { margin: 0; padding-inline-start: 18px; display: grid; gap: var(--space-2xs); color: var(--ink-2); font-size: var(--text-2xs); line-height: 1.45; }
.offer-explanation-content .market-range { margin: 0; color: var(--ink-2); font-size: var(--text-2xs); }
.offer-risks h3, .offer-risks li::marker { color: var(--warning); }
.offer-image-assessment h3 { color: var(--info-text); }
.offer-image-assessment p { margin: 0; color: var(--ink-2); font-size: var(--text-2xs); line-height: 1.45; }
.offer-price strong { font-size: var(--text-base); white-space: nowrap; }
.score-display { display: flex; align-items: baseline; gap: var(--space-2xs); color: var(--ink); }
.score-display strong { font-size: var(--text-md); }
.score-display span { color: var(--muted); font-size: var(--text-2xs); }
.score-total strong { color: var(--primary); }
.score-caption, .score-pending { display: block; margin-top: var(--space-2xs); color: var(--muted); font-size: var(--text-2xs); line-height: 1.35; }
.score-pending { max-width: 12ch; }
.score-guide { margin-top: var(--space-md); border-top: 1px solid var(--line); }
.score-guide summary, .system-details > summary { min-height: 48px; display: flex; align-items: center; color: var(--primary); font-weight: 700; cursor: pointer; }
.score-guide dl { margin: 0 0 var(--space-md); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg); }
.score-guide dl > div { min-width: 0; }
.score-guide dt { font-weight: 700; margin-bottom: var(--space-2xs); }
.score-guide dd { margin: 0; color: var(--muted); font-size: var(--text-xs); line-height: 1.5; }
.empty-offers-row .empty { min-height: 180px; display: grid; place-content: center; gap: var(--space-xs); }
.empty-offers-row .empty strong { color: var(--ink); font-size: var(--text-md); }
.empty-offers-row .empty span { max-width: 52ch; }
.empty-action { justify-self: center; margin-top: var(--space-sm); }
.system-details { margin-top: var(--space-lg); border-top: 1px solid var(--line); }
.system-details[open] { padding-bottom: var(--space-xl); }
.system-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: var(--space-lg); border: 1px solid var(--line); background: var(--surface); }
.system-grid > div { min-height: 68px; padding: var(--space-sm) var(--space-md); border-inline-end: 1px solid var(--line); display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: center; column-gap: var(--space-xs); }
.system-grid > div:last-child { border-inline-end: 0; }
.system-grid .status-dot { margin-top: 6px; }
.system-grid small { grid-column: 1 / -1; color: var(--muted); margin-top: var(--space-2xs); }
.flash-stack { margin-bottom: 18px; }
.flash { padding: 12px 14px; border: 1px solid var(--info-border); border-radius: 5px; background: var(--info-surface); color: var(--info-text); animation: feedback-in 240ms var(--ease-out-quint) both; }
.flash + .flash { margin-top: 8px; }
.flash.error { border-color: var(--danger-border); background: var(--danger-surface); color: var(--danger-dark); }
.flash.success { border-color: var(--success-border); background: var(--success-surface); color: var(--success-text); display: flex; align-items: center; gap: 10px; }
.flash.success::before { content: "✓"; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; background: var(--success-mid); color: var(--on-success); display: grid; place-items: center; font-size: var(--text-xs); font-weight: 800; animation: success-mark-in 360ms var(--ease-out-quint) both; }
.flash.notice { border-color: var(--line-strong); background: var(--surface-muted); color: var(--ink-2); }
.search-management-section { padding-top: 0; }
.search-management-heading { align-items: end; margin-bottom: var(--space-md); }
.search-management-heading h2 { margin-bottom: var(--space-2xs); }
.agent-filter { width: min(320px, 100%); }
.bulk-search-actions { min-height: 50px; margin-bottom: var(--space-md); padding: var(--space-xs) var(--space-sm); border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }
.bulk-search-actions > span { margin-inline-end: auto; color: var(--muted); font-size: var(--text-xs); }
.bulk-search-actions > span strong { color: var(--ink); }
.bulk-search-actions[data-has-selection="false"] { background: var(--surface-3); }
/* Keep the destructive action visually apart from the reversible ones. */
.bulk-search-actions [data-bulk-delete] { margin-inline-start: var(--space-sm); }
.bulk-hint { margin: calc(-1 * var(--space-xs)) 0 var(--space-md); color: var(--muted); font-size: var(--text-2xs); }
.bulk-hint kbd { padding: 1px 5px; border: 1px solid var(--control-border); border-radius: 3px; background: var(--surface); font-family: inherit; font-size: var(--text-2xs); font-weight: 700; }
.agent-filter-empty { min-height: 120px; margin: 0; display: grid; place-items: center; color: var(--muted); }
.agent-filter-empty[hidden] { display: none; }
.search-grid { display: grid; }
.agent-list { overflow: hidden; border: 1px solid var(--primary-border); border-radius: var(--radius-panel); background: var(--surface); }
.search-card { min-width: 0; background: var(--surface); transition: background-color var(--motion-state) var(--ease-out); }
.agent-row { padding: var(--space-md); display: grid; grid-template-columns: 28px minmax(220px, 1.6fr) minmax(150px, .8fr) minmax(145px, .8fr) auto; gap: var(--space-md); align-items: center; }
.agent-row + .agent-row { border-top: 1px solid var(--line); }
.search-card:has(.agent-select input:checked) { background: var(--primary-soft); }
.search-card.disabled { background: var(--surface-3); }
.agent-select { width: 28px; display: grid; place-items: center; }
.agent-select input { width: 18px; height: 18px; min-height: 18px; padding: 0; accent-color: var(--primary); }
.agent-identity { min-width: 0; display: grid; gap: var(--space-2xs); }
.agent-identity strong { color: var(--primary-dark); font-size: var(--text-base); font-weight: 800; overflow-wrap: anywhere; line-height: 1.3; }
.agent-identity span { overflow: hidden; color: var(--muted); font-size: var(--text-xs); text-overflow: ellipsis; white-space: nowrap; }
.agent-status-block, .agent-check-block { min-width: 0; display: grid; gap: var(--space-2xs); }
.agent-column-label { color: var(--muted); font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase; }
.agent-check-block time, .agent-check-block > span:last-child { color: var(--ink-2); font-size: var(--text-xs); line-height: 1.35; }
.agent-state-compact, .agent-check-compact { display: none; }
label { display: grid; gap: 5px; color: var(--ink-2); font-size: var(--text-2xs); font-weight: 600; }
input, select, textarea { width: 100%; min-height: 44px; border: 1px solid var(--control-border); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); padding: 10px 12px; transition: border-color var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 2px var(--danger-ring); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--primary-ring); }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.check-option { display: flex; align-items: center; gap: 9px; min-height: 28px; color: var(--ink); }
.check-option input { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; padding: 0; accent-color: var(--primary); }
.agent-toggle { min-height: 44px; padding: 0; border: 0; border-radius: var(--radius-control); background: transparent; display: inline-flex; align-items: center; gap: var(--space-xs); color: var(--ink-2); font-size: var(--text-xs); font-weight: 600; line-height: 1.35; text-align: start; }
.agent-toggle-track { width: 42px; height: 24px; flex: 0 0 42px; border: 1px solid var(--control-border); border-radius: 12px; background: var(--control-border); position: relative; transition: background-color var(--motion-state) var(--ease-out); }
.agent-toggle-track::after { content: ""; width: 18px; height: 18px; position: absolute; top: 2px; left: 2px; border-radius: 50%; background: var(--surface); transition: transform var(--motion-state) var(--ease-out); }
.agent-toggle[aria-checked="true"] .agent-toggle-track { border-color: var(--primary); background: var(--primary); }
.agent-toggle[aria-checked="true"] .agent-toggle-track::after { transform: translateX(18px); }
.agent-toggle:hover .agent-toggle-track { border-color: var(--primary-dark); }
.agent-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.card-actions { min-height: 40px; display: flex; align-items: center; gap: 9px; padding-top: 3px; }
.baseline { margin-right: auto; color: var(--muted); font-size: var(--text-2xs); }
.danger-text { min-height: 44px; border: 0; background: transparent; color: var(--danger); padding: 8px; }
.danger-button { min-height: 46px; padding: 10px 18px; border: 1px solid var(--danger); border-radius: var(--radius-control); background: var(--surface); color: var(--danger); font-weight: 800; transition: background-color var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out), transform var(--motion-instant) var(--ease-out); }
.danger-button:hover:not(:disabled) { border-color: var(--danger-dark); background: var(--danger-surface); color: var(--danger-dark); }
.danger-button:active { transform: scale(.98); }
.danger-button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.tertiary-action { min-height: 44px; border: 0; background: transparent; color: var(--muted); padding: 8px 0; font-weight: 600; }
.create-section { max-width: 980px; }
.create-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; align-items: end; }
.create-form .full-field { grid-column: 1 / -1; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--brand-canvas); position: relative; }
/* The auth page centres its grid items, so as a normal child the switch became a
   stray chip floating above the card. It belongs in the page corner instead. */
.login-page > .auth-language { position: absolute; inset-block-start: var(--space-md); inset-inline-end: var(--space-md); margin: 0; }
.login-panel { width: min(410px, 100%); border: 1px solid var(--primary-border-strong); border-radius: var(--radius-panel); background: var(--surface); padding: 38px; }
.login-panel h1 { color: var(--primary-dark); font-size: var(--text-2xl); margin-bottom: 24px; }
.stack-form { display: grid; gap: 15px; }
.auth-brand { margin-bottom: var(--space-lg); color: var(--primary); display: inline-flex; align-items: center; gap: 9px; font-size: var(--text-base); font-weight: 800; }
.auth-brand img { width: 28px; height: 28px; }
.auth-intro { margin: calc(-1 * var(--space-md)) 0 var(--space-lg); color: var(--muted); line-height: 1.5; }
.auth-switch { margin: var(--space-lg) 0 0; color: var(--muted); font-size: var(--text-xs); text-align: center; }
.signup-panel { width: min(460px, 100%); }
.signup-panel .stack-form { gap: 9px; }
.signup-panel .field-help { margin: -3px 0 5px; }
.invitation-valid { margin: 0 0 var(--space-md); padding: var(--space-sm); border: 1px solid var(--success-border); border-radius: var(--radius-control); background: var(--success-surface); color: var(--success-text); display: flex; align-items: center; gap: 8px; font-size: var(--text-xs); font-weight: 700; }
.settings-section { max-width: 980px; }
.settings-form { display: grid; gap: 16px; }
.channel-options { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.channel-options legend { color: var(--ink-2); font-size: var(--text-2xs); font-weight: 600; margin-bottom: 7px; }
.channel-option { min-height: 66px; border: 1px solid var(--line); border-radius: 5px; padding: 11px; display: flex; align-items: center; gap: 9px; background: var(--surface); color: var(--ink); }
.channel-option:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.channel-option input { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; accent-color: var(--primary); }
.channel-option > span { display: grid; gap: 3px; font-size: var(--text-sm); }
.channel-state { font-weight: 400; color: var(--muted); }
.channel-state.ready { color: var(--success-text); }
.channel-state.missing { color: var(--warning); }
.settings-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.form-submit { justify-self: start; }
.password-form { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.password-form .form-submit { min-width: 150px; }
.inline-form, .user-actions, .reset-form { display: flex; align-items: center; gap: 7px; }
.inline-form .check-option { white-space: nowrap; }
.compact-button { min-height: 32px; padding: 5px 9px; font-size: var(--text-2xs); }
.user-table td:first-child { min-width: 130px; }
.user-table td:last-child { min-width: 330px; }
.reset-form input { min-height: 32px; width: 145px; padding: 5px 7px; }
.user-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.invitation-section { max-width: 980px; }
.invitation-heading { align-items: end; }
.invitation-heading h2 { margin-bottom: var(--space-2xs); }
.invitation-share { margin-bottom: var(--space-lg); padding: var(--space-md); border: 1px solid var(--primary-border); border-radius: var(--radius-panel); background: var(--primary-soft); display: grid; gap: var(--space-sm); }
.invitation-share > div:first-child { display: grid; gap: var(--space-2xs); }
.invitation-share > div:first-child span { color: var(--ink-2); font-size: var(--text-xs); }
.copy-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-xs); }
.copy-field input { background: var(--surface); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: var(--text-xs); }
.copy-feedback { min-height: 20px; margin: 0; color: var(--success-dark); font-size: var(--text-xs); font-weight: 700; }
.invitation-list { border: 1px solid var(--line); background: var(--surface); }
.invitation-row { min-height: 62px; padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(180px, 1fr) auto auto auto; align-items: center; gap: var(--space-md); }
.invitation-row:last-child { border-bottom: 0; }
.invitation-row > div { display: grid; gap: var(--space-2xs); }
.invitation-row > div span, .invitation-row > span { color: var(--muted); font-size: var(--text-2xs); }
.profile-notification-actions, .onboarding-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-notification-actions form, .onboarding-actions form, .onboarding-footer form { margin: 0; }
.connection-summary { display: flex; align-items: center; gap: 8px; margin: 5px 0 18px; }
.connection-summary .status-dot { margin: 0; }
.connection-summary > span:last-child { display: flex; align-items: baseline; gap: var(--space-xs); }
.connection-summary small { color: var(--muted); font-size: var(--text-sm); }
.advanced-settings { border-top: 1px solid var(--line); padding-top: 15px; }
.advanced-settings summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-bottom: 15px; }
.technical-settings-note { max-width: 65ch; margin: 0 0 var(--space-md); color: var(--muted); font-size: var(--text-xs); line-height: 1.5; }
.reset-details summary { min-height: 32px; display: flex; align-items: center; color: var(--primary); font-size: var(--text-2xs); font-weight: 700; cursor: pointer; }
.reset-details[open] { flex-basis: 100%; }
.onboarding-page-content { width: min(1280px, 100%); padding-block: var(--space-xl) var(--space-3xl); }
.onboarding-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--space-2xl); align-items: start; }
.agent-onboarding-shell { max-width: 960px; margin-inline: auto; grid-template-columns: minmax(0, 1fr); }
.onboarding-rail { min-height: 620px; padding-inline-end: var(--space-xl); border-inline-end: 1px solid var(--line); position: sticky; top: var(--space-xl); }
.rail-intro { display: grid; gap: var(--space-xs); margin-bottom: var(--space-xl); }
.rail-intro strong { font-size: var(--text-md); line-height: 1.35; }
.rail-kicker, .task-kicker, .preview-kicker, .choice-label { color: var(--primary); font-size: var(--text-2xs); font-weight: 800; text-transform: uppercase; }
.onboarding-progress { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-xs); }
.onboarding-progress li { min-width: 0; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--space-sm); align-items: center; min-height: 72px; padding: var(--space-sm); border: 1px solid transparent; border-radius: var(--radius-panel); color: var(--muted); }
.onboarding-progress li.current { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.onboarding-progress li.done { color: var(--ink-2); }
.step-number, .guided-steps > div > span { width: 32px; height: 32px; border: 1px solid var(--control-border); border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: var(--text-xs); font-weight: 800; }
.onboarding-progress .current .step-number { border-color: var(--on-primary); background: var(--on-primary); color: var(--primary); }
.onboarding-progress .done .step-number { border-color: var(--success-dark); background: var(--success-dark); color: var(--on-success); }
.step-copy { min-width: 0; display: grid; gap: var(--space-2xs); }
.step-copy strong { color: inherit; font-size: var(--text-sm); line-height: 1.25; overflow-wrap: anywhere; }
.step-copy small { font-size: var(--text-2xs); font-weight: 400; line-height: 1.35; }
.rail-note { margin: var(--space-xl) 0 0; color: var(--muted); font-size: var(--text-2xs); line-height: 1.55; }
.onboarding-workspace { min-width: 0; padding-top: var(--space-xs); }
.mobile-progress { display: none; }
.task-heading { max-width: 720px; margin-bottom: var(--space-xl); }
.task-heading h1 { margin: var(--space-xs) 0 var(--space-sm); color: var(--primary-dark); font-size: var(--text-4xl); line-height: 1.1; }
.task-heading p { max-width: 65ch; margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.narrow-task { max-width: 680px; }
.onboarding-channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); max-width: 840px; }
.onboarding-choice { min-height: 232px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); padding: var(--space-lg); display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: var(--space-lg); transition: border-color var(--motion-state) var(--ease-out), box-shadow var(--motion-state) var(--ease-out), transform var(--motion-state) var(--ease-out); }
.onboarding-choice:hover { border-color: var(--primary-border-strong); transform: translateY(-2px); box-shadow: 0 3px 8px var(--shadow-color); }
.onboarding-choice strong { color: var(--primary-dark); font-size: var(--text-lg); }
.choice-copy { display: grid; gap: var(--space-xs); }
.choice-copy p { color: var(--muted); margin: 0; line-height: 1.5; }
.onboarding-choice > button { width: 100%; }
.recommended-choice { border-color: var(--primary-border-strong); background: var(--primary-tint); }
.recommendation-label { justify-self: start; padding: 4px 8px; border-radius: 4px; background: var(--primary-soft); color: var(--primary); font-size: var(--text-2xs); font-weight: 800; }
.availability-note { color: var(--warning); }
.guided-steps { display: grid; gap: var(--space-md); margin: var(--space-xl) 0; }
.guided-steps > div { display: flex; gap: var(--space-sm); align-items: flex-start; }
.guided-steps > div > span { flex: 0 0 32px; border-color: var(--primary); color: var(--primary); }
.guided-steps p { margin: 4px 0 0; line-height: 1.5; }
.onboarding-actions { gap: var(--space-sm); }
.onboarding-form { display: grid; gap: var(--space-lg); max-width: 540px; }
.onboarding-form button { justify-self: start; }
.field-group { display: grid; gap: var(--space-xs); }
.field-group label { color: var(--ink); font-size: var(--text-sm); font-weight: 700; }
.field-help { color: var(--muted); margin: 0; font-weight: 400; line-height: 1.4; }
.field-error { display: block; margin: 0; color: var(--danger-dark); font-size: var(--text-sm); font-weight: 700; line-height: 1.4; }
.inline-help { margin: 0 0 var(--space-lg); max-width: 65ch; }
.inline-help summary, .search-settings summary, .manual-create summary { min-height: 44px; display: flex; align-items: center; color: var(--accent); font-weight: 700; cursor: pointer; }
.inline-help p { margin: var(--space-xs) 0 0; line-height: 1.55; }
.connection-wait { max-width: 65ch; margin: var(--space-lg) 0 0; padding: var(--space-sm) var(--space-md); border: 1px solid var(--info-border); border-radius: var(--radius-control); background: var(--info-surface); color: var(--info-text); display: flex; align-items: center; gap: var(--space-sm); }
.status-pulse { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--primary-glow); animation: status-pulse 1.8s infinite; }
.description-field textarea { min-height: 132px; line-height: 1.55; }
.field-section { padding-top: var(--space-lg); border-top: 1px solid var(--line); }
.price-field { align-self: start; }
.price-field > label { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-xs); }
.price-field > label small { color: var(--muted); font-size: var(--text-2xs); font-weight: 600; }
.criteria-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-sm); }
.criteria-list li { min-width: 0; position: relative; padding-inline-start: 24px; font-size: var(--text-sm); line-height: 1.4; overflow-wrap: anywhere; }
.criteria-list li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; color: var(--success-dark); font-weight: 800; animation: criterion-check-in 300ms var(--ease-out-quint) both; }
.criteria-list li:nth-child(2)::before { animation-delay: 60ms; }
.criteria-list li:nth-child(3)::before { animation-delay: 120ms; }
.criteria-list li:nth-child(4)::before { animation-delay: 180ms; }
.criteria-list li:nth-child(5)::before { animation-delay: 240ms; }
.sourced-reason { display: grid; gap: 4px; }
.reason-evidence { color: var(--muted); font-size: var(--text-2xs); line-height: 1.5; }
.reason-evidence strong { color: var(--ink); }
.reason-evidence a { color: var(--accent); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; overflow-wrap: anywhere; }
.reason-evidence [aria-hidden="true"] { margin-inline: 4px; color: var(--muted); }
.completion-stage { display: flex; align-items: flex-start; gap: var(--space-lg); max-width: 760px; padding-top: var(--space-xl); view-transition-name: agent-workshop; }
.completion-stage .task-heading { flex: 1; }
/* --success-dark, not --success: white on the lighter green is 3.2:1, which only
   passes as large text. Matches .sale-confirmation-mark either way. */
.completion-mark { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; display: grid; place-items: center; background: var(--success-dark); color: var(--on-success); font-size: var(--text-xl); font-weight: 800; position: relative; animation: completion-in 420ms var(--ease-out) both; }
.completion-mark::after { content: ""; position: absolute; inset: -1px; border: 2px solid var(--success-border); border-radius: 50%; animation: completion-ring 720ms var(--ease-out-quint) both; }
.connection-success-stage { max-width: 720px; display: flex; align-items: flex-start; gap: var(--space-lg); padding-top: var(--space-md); }
.agent-wizard { max-width: 900px; margin: 0 auto; }
.guided-search-section > .agent-wizard { padding: var(--space-xl); }
.agent-wizard-progress { margin: 0 0 var(--space-xl); padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
/* Third column holds the connector, so it can never run through the label —
   whatever length the step name has in the active language. */
.agent-wizard-progress li { min-width: 0; color: var(--muted); display: grid; grid-template-columns: 28px minmax(0, auto) minmax(12px, 1fr); align-items: center; gap: var(--space-xs); }
.agent-wizard-progress li::after { content: ""; height: 2px; background: var(--line); }
.agent-wizard-progress li:last-child::after { display: none; }
.agent-wizard-progress li > span { width: 28px; height: 28px; border: 2px solid var(--control-border); border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: var(--text-2xs); font-weight: 800; }
.agent-wizard-progress li > small { min-width: 0; font-size: var(--text-2xs); font-weight: 700; line-height: 1.25; }
.agent-wizard-progress li.current { color: var(--primary); }
.agent-wizard-progress li.current > span { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.agent-wizard-progress li.done > span { border-color: var(--success-dark); background: var(--success-dark); color: var(--on-success); }
.agent-wizard-progress li.done::after { background: var(--success); }
.wizard-stage-heading { max-width: 720px; margin-bottom: var(--space-xl); }
.wizard-stage-heading h2 { margin: 5px 0 var(--space-xs); font-size: clamp(23px, 3vw, 30px); }
.wizard-stage-heading p { max-width: 68ch; margin: 0; color: var(--muted); line-height: 1.6; }
.agent-stage-form { display: grid; gap: var(--space-lg); }
.agent-stage-form textarea { min-height: 150px; }
.wizard-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-sm); padding-top: var(--space-xs); }
.budget-estimate { margin-bottom: var(--space-lg); padding: var(--space-lg); border: 1px solid var(--primary-border); border-radius: var(--radius-panel); background: var(--primary-soft); }
.budget-label { display: block; color: var(--primary-dark); font-size: var(--text-xs); font-weight: 800; }
.budget-range { display: block; margin: 5px 0 var(--space-sm); color: var(--primary-dark); font-size: clamp(30px, 5vw, 42px); line-height: 1; }
.budget-estimate p { max-width: 680px; margin: 0; line-height: 1.55; }
.wizard-context { max-width: 70ch; margin: calc(-1 * var(--space-sm)) 0 var(--space-lg); padding-bottom: var(--space-md); border-bottom: 1px solid var(--line); }
.wizard-context strong { display: block; margin-bottom: var(--space-2xs); font-size: var(--text-sm); }
.wizard-context p { margin: 0; color: var(--muted); line-height: 1.5; }
.compact-stage-form { max-width: 660px; }
.prominent-price-field { padding: var(--space-lg); border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); }
.prominent-price-field .input-with-suffix { max-width: 240px; }
.prominent-price-field input { font-size: var(--text-xl); font-weight: 800; }
.preserved-choice { color: var(--primary-dark); font-size: var(--text-sm); font-weight: 700; line-height: 1.45; }
.location-picker { margin-top: var(--space-xs); border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); }
.location-picker > summary { min-height: 52px; padding: var(--space-sm) var(--space-md); display: flex; align-items: center; gap: var(--space-sm); color: var(--accent); cursor: pointer; position: relative; }
.location-picker > summary > span { font-weight: 700; }
.location-picker > summary > strong { margin-inline-start: auto; color: var(--ink); font-size: var(--text-sm); font-weight: 700; text-align: end; }
.location-picker:not([open]) > :not(summary) { display: none; }
.location-picker > p { margin: 0; padding: 0 var(--space-md) var(--space-sm); color: var(--muted); font-size: var(--text-sm); line-height: 1.45; }
.location-picker .location-options { padding: 0 var(--space-md) var(--space-md); }
.quality-fieldset { margin: 0; padding: 0; border: 0; }
.quality-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); }
.quality-option { min-width: 0; cursor: pointer; }
.quality-option input { width: 1px; height: 1px; margin: 0; position: absolute; opacity: 0; overflow: hidden; clip-path: inset(50%); }
.quality-option > span { height: 100%; min-height: 210px; padding: var(--space-lg); border: 1px solid var(--control-border); border-radius: var(--radius-panel); background: var(--surface); display: flex; flex-direction: column; gap: var(--space-xs); transition: border-color var(--motion-instant), background-color var(--motion-instant), transform var(--motion-instant); }
.quality-option strong { font-size: var(--text-md); }
.quality-option em { color: var(--primary-dark); font-style: normal; font-weight: 700; }
.quality-option small { color: var(--muted); font-size: var(--text-sm); line-height: 1.5; }
.quality-option b { align-self: flex-start; padding: 3px 7px; border-radius: 3px; background: var(--primary); color: var(--on-primary); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .04em; }
.quality-option input:checked + span { border: 2px solid var(--primary); padding: calc(var(--space-lg) - 1px); background: var(--primary-soft); }
.quality-option input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.agent-summary { margin-bottom: var(--space-lg); border-block: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.agent-summary section { min-width: 0; padding: var(--space-lg); border-block-end: 1px solid var(--line); }
.agent-summary section:nth-child(odd) { border-inline-end: 1px solid var(--line); }
.agent-summary section:nth-last-child(-n + 2) { border-block-end: 0; }
.agent-summary section > span { display: block; margin-bottom: var(--space-xs); color: var(--muted); font-size: var(--text-2xs); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.agent-summary section > strong { display: block; margin-bottom: var(--space-xs); font-size: var(--text-lg); }
.agent-summary section p { color: var(--muted); line-height: 1.5; }
.agent-summary section a { font-weight: 700; }
.final-wizard-actions .primary { min-width: 240px; }
.empty-state { min-height: 180px; padding: var(--space-xl); border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); display: grid; place-content: center; justify-items: center; gap: var(--space-md); text-align: center; }
.empty-state p { max-width: 52ch; margin: 0; color: var(--muted); line-height: 1.55; }
.onboarding-footer { margin-top: var(--space-2xl); border-top: 1px solid var(--line); padding-top: var(--space-lg); display: flex; align-items: center; gap: var(--space-md); flex-wrap: wrap; }
.onboarding-footer small { flex-basis: 100%; color: var(--muted); }
@keyframes status-pulse { 50% { box-shadow: 0 0 0 7px var(--primary-glow-soft); } }
@keyframes completion-in { from { opacity: 0; transform: scale(.75); } to { opacity: 1; transform: scale(1); } }
@keyframes page-leave { to { opacity: 0; transform: translateY(-5px); } }
@keyframes page-enter { from { opacity: 0; transform: translateY(8px); } }
::view-transition-group(app-header) { animation-duration: 180ms; }
::view-transition-group(agent-workshop) { animation-duration: 420ms; animation-timing-function: var(--ease-out-quint); }
::view-transition-old(root) { animation: page-leave 100ms ease-in both; }
::view-transition-new(root) { animation: page-enter 280ms var(--ease-out-quint) both; }
.ai-wait { max-width: min(440px, calc(100vw - 2 * var(--space-md))); padding: 0; border: 1px solid var(--primary-border); border-radius: var(--radius-panel); background: var(--surface); color: var(--ink); }
.ai-wait::backdrop { background: rgba(15, 32, 48, .62); }
.ai-wait-panel { padding: var(--space-xl) var(--space-lg) var(--space-lg); display: grid; justify-items: center; gap: var(--space-xs); text-align: center; }
.ai-wait-mark { width: 60px; height: 60px; margin-bottom: var(--space-xs); border-radius: 50%; background: var(--primary-soft); display: grid; place-items: center; position: relative; }
.ai-wait-mark::before { content: ""; position: absolute; inset: 6px; border: 3px solid var(--primary-border); border-top-color: var(--primary); border-radius: 50%; animation: ai-wait-spin 900ms linear infinite; }
.ai-wait-mark span { width: 15px; height: 15px; border-radius: 3px; background: var(--primary); animation: ai-wait-core 900ms var(--ease-out) infinite alternate; }
.ai-wait h2 { margin: 0; font-size: var(--text-lg); line-height: 1.3; }
.ai-wait-status { min-height: 20px; margin: 0; color: var(--primary-dark); font-size: var(--text-sm); font-weight: 700; line-height: 1.45; }
.ai-wait-hint { max-width: 40ch; margin: var(--space-2xs) 0 0; color: var(--muted); font-size: var(--text-xs); line-height: 1.5; }
.ai-wait-elapsed { margin: var(--space-xs) 0 0; color: var(--muted); font-size: var(--text-2xs); font-variant-numeric: tabular-nums; }
.ai-wait-escape { margin-top: var(--space-md); }
.ai-wait-escape[hidden] { display: none; }
@keyframes ai-wait-spin { to { transform: rotate(1turn); } }
@keyframes ai-wait-core { to { transform: scale(.7); opacity: .6; } }
@media (prefers-reduced-motion: reduce) {
  /* The global reduce rule stills every animation. A frozen spinner reads as a
     crash, so drop it here — the ticking elapsed time carries the liveness. */
  .ai-wait-mark::before { display: none; }
  .ai-wait-mark span { width: 22px; height: 22px; border-radius: 50%; }
}
.skip-link { position: absolute; z-index: 100; top: var(--space-xs); left: var(--space-xs); min-height: 44px; padding: 10px 16px; border-radius: var(--radius-control); background: var(--surface); color: var(--primary-dark); font-weight: 800; display: inline-flex; align-items: center; transform: translateY(calc(-100% - var(--space-xs) * 2)); transition: transform var(--motion-state) var(--ease-out-quint); }
.skip-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; transform: translateY(0); text-decoration: none; }
/* Programmatic focus targets: the move is announced by the region itself, so the
   ring would only read as a stray artefact around a whole panel. */
main:focus, .sale-details-stage:focus, .sale-draft-preview:focus { outline: none; }
.confirm-dialog { max-width: min(440px, calc(100vw - 2 * var(--space-md))); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); color: var(--ink); }
.confirm-dialog::backdrop { background: rgba(15, 32, 48, .62); }
.confirm-panel { padding: var(--space-lg); display: grid; gap: var(--space-sm); }
.confirm-panel h2 { margin: 0; font-size: var(--text-lg); }
.confirm-panel p { margin: 0; color: var(--ink-2); line-height: 1.55; overflow-wrap: anywhere; }
.confirm-actions { margin-top: var(--space-xs); display: flex; justify-content: flex-end; gap: var(--space-sm); flex-wrap: wrap; }
@media (max-width: 600px) {
  .confirm-actions { flex-direction: column-reverse; }
  .confirm-actions > button { width: 100%; }
}
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.guided-search-section { margin-top: var(--space-2xl); scroll-margin-top: var(--space-xl); }
.guided-create-summary { min-height: 76px; padding: var(--space-md) var(--space-lg); border-radius: var(--radius-panel); background: var(--brand-canvas); display: flex; align-items: center; color: var(--on-brand-canvas); cursor: pointer; }
.guided-create-summary > span { display: grid; gap: var(--space-2xs); }
.guided-create-summary strong { color: var(--on-brand-canvas); font-size: var(--text-lg); }
.guided-create-summary small { color: var(--on-brand-canvas); font-weight: 600; }
.guided-search-section[open] .guided-create-summary { margin-bottom: var(--space-lg); }
.guided-search-intro { max-width: 760px; }
.guided-search-intro p { max-width: 65ch; line-height: 1.55; margin-bottom: 0; }
.guided-agent-layout { margin-top: var(--space-lg); }
.guided-search-form { min-width: 0; max-width: none; margin: 0; display: grid; gap: var(--space-lg); }
.guided-search-form label { color: var(--ink); font-size: var(--text-sm); }
.guided-search-form textarea { line-height: 1.55; }
.guided-structured-fields { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr); gap: 14px; max-width: 900px; }
.guided-structured-fields > label { max-width: 440px; }
.location-fieldset { grid-column: 1 / -1; border: 0; padding: 0; margin: 0; }
.location-fieldset legend { color: var(--ink); font-size: var(--text-sm); font-weight: 600; margin-bottom: 8px; }
.location-fieldset legend small { color: var(--muted); font-weight: 400; margin-left: 5px; }
.location-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 7px; }
.location-option { min-height: 44px; border: 1px solid var(--control-border); border-radius: 5px; background: var(--surface); padding: 8px 10px; display: flex; align-items: center; gap: 9px; color: var(--ink); cursor: pointer; transition: border-color var(--motion-state) var(--ease-out), background-color var(--motion-state) var(--ease-out), box-shadow var(--motion-state) var(--ease-out), transform var(--motion-instant) var(--ease-out); }
.location-option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.location-option input { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; margin: 0; padding: 0; accent-color: var(--primary); }
.location-option span { font-size: var(--text-xs); font-weight: 600; }
.compact-location-fieldset { margin-bottom: 2px; }
.compact-search-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.input-with-suffix { display: grid; grid-template-columns: 1fr 44px; }
.input-with-suffix input { border-radius: 4px 0 0 4px; }
.input-with-suffix > span { min-height: 44px; border: 1px solid var(--control-border); border-left: 0; border-radius: 0 4px 4px 0; background: var(--surface-muted); display: grid; place-items: center; color: var(--ink-2); font-weight: 700; }
.delivery-fieldset { max-width: 900px; border: 0; padding: 0; margin: 10px 0 2px; }
.delivery-fieldset legend { color: var(--ink); font-size: var(--text-sm); font-weight: 600; margin-bottom: 8px; }
.delivery-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.delivery-option { min-height: 76px; border: 1px solid var(--control-border); border-radius: 5px; background: var(--surface); padding: 11px 12px; display: flex; align-items: flex-start; gap: 10px; color: var(--ink); cursor: pointer; transition: border-color var(--motion-state) var(--ease-out), background-color var(--motion-state) var(--ease-out), box-shadow var(--motion-state) var(--ease-out), transform var(--motion-instant) var(--ease-out); }
.delivery-option:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--primary-soft); }
.delivery-option input { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; margin: 2px 0 0; padding: 0; accent-color: var(--primary); }
.delivery-option > span { display: grid; gap: 4px; }
.delivery-option strong { font-size: var(--text-sm); }
.delivery-option small { color: var(--muted); font-weight: 400; line-height: 1.35; }
.compact-delivery-fieldset { margin-top: 0; }
.compact-delivery-fieldset .delivery-option { min-height: 48px; align-items: center; }
.guided-search-submit { display: flex; align-items: center; gap: 14px; margin-top: 6px; flex-wrap: wrap; }
.guided-search-submit small { color: var(--muted); }
.search-settings { min-width: 0; }
.search-settings > summary { min-height: 44px; padding-inline: var(--space-xs); justify-content: center; white-space: nowrap; }
.search-settings[open] { grid-column: 1 / -1; margin: 0 calc(-1 * var(--space-md)) calc(-1 * var(--space-md)); padding: var(--space-md); border-top: 1px solid var(--line); background: var(--surface-2); }
.search-settings[open] > summary { justify-content: flex-start; padding-inline: 0; }
.search-settings-fields { display: grid; gap: var(--space-md); padding-top: var(--space-sm); }
.threshold-field { align-content: start; }
.threshold-field .field-help { font-size: var(--text-2xs); line-height: 1.45; }
.threshold-label { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }
.threshold-label em { border-radius: 4px; background: var(--primary-soft); color: var(--primary); padding: 2px 5px; font-size: var(--text-2xs); font-style: normal; font-weight: 700; }
.expert-settings { margin-top: var(--space-xs); border-top: 1px solid var(--line); padding-top: var(--space-xs); }
.expert-settings > summary { min-height: 44px; display: flex; align-items: center; color: var(--primary); font-weight: 700; cursor: pointer; }
.expert-settings > p { max-width: 65ch; color: var(--muted); font-size: var(--text-xs); line-height: 1.5; }
.expert-settings-fields { display: grid; gap: var(--space-md); }
.expert-settings-fields textarea { min-height: 148px; }
.manual-create { max-width: 980px; margin-top: var(--space-xl); padding-top: var(--space-md); border-top: 1px solid var(--line); }
.manual-create .create-form { margin-top: var(--space-md); }
.sell-page-heading { align-items: end; }
.sale-workspace { display: grid; grid-template-columns: minmax(440px, 520px) minmax(0, 1fr); align-items: start; gap: var(--space-xl); }
.sale-intake, .sale-result-panel { min-width: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-panel); background: var(--surface); }
.sale-intake { padding: var(--space-lg); }
.sale-intake form { display: grid; gap: var(--space-lg); }
.sale-identity-inputs { display: grid; gap: var(--space-lg); }
.sale-identity-inputs[hidden] { display: none; }
.sale-section-heading { margin-bottom: var(--space-lg); display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); }
.sale-section-heading h2, .sale-section-heading h3 { margin: 0; }
.sale-section-heading > span { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-size: var(--text-2xs); font-weight: 800; }
.sale-section-heading.compact { margin-bottom: var(--space-md); }
.sale-section-heading.compact h3 { font-size: var(--text-md); }
.sale-section-heading.compact > span { width: 25px; height: 25px; flex-basis: 25px; font-size: var(--text-2xs); }
.sale-choice-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.sale-choice-fieldset legend { margin-bottom: var(--space-xs); font-size: var(--text-sm); font-weight: 700; }
.sale-condition-options { display: flex; flex-wrap: wrap; gap: 7px; }
.sale-condition-options label, .sale-delivery-options label { cursor: pointer; }
.sale-condition-options input, .sale-delivery-options input, .sale-strategy input { position: absolute; width: 1px; height: 1px; min-height: 1px; margin: 0; padding: 0; overflow: hidden; opacity: 0; pointer-events: none; clip-path: inset(50%); }
.sale-condition-options span { min-height: 40px; padding: 8px 10px; border: 1px solid var(--control-border); border-radius: var(--radius-control); background: var(--surface); display: inline-flex; align-items: center; color: var(--ink-2); font-size: var(--text-2xs); font-weight: 700; transition: border-color var(--motion-state) var(--ease-out), background-color var(--motion-state) var(--ease-out); }
.sale-condition-options label:has(input:checked) span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); box-shadow: inset 0 0 0 1px var(--primary); }
.sale-condition-options label:has(input:focus-visible) span, .sale-delivery-options label:has(input:focus-visible) span, .sale-strategy:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.sale-condition-source { margin-top: 7px; color: var(--success-text); font-size: var(--text-2xs); font-weight: 700; }
.sale-condition-source[hidden] { display: none; }
.sale-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.sale-detail-grid textarea { min-height: 104px; }
/* Dashed edge is the only "droppable here" affordance, so it carries the 3:1
   boundary contrast a control boundary needs (was #8da2b4 at 2.52:1). */
.sale-photo-field { padding: var(--space-md); border: 1px dashed var(--control-border); border-radius: var(--radius-panel); background: var(--surface-2); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-sm); transition: border-color var(--motion-state) var(--ease-out), background-color var(--motion-state) var(--ease-out); }
.sale-photo-field.is-dragover { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.sale-photo-field > div:first-child { display: grid; gap: 3px; }
.sale-photo-field > div:first-child strong { font-size: var(--text-sm); }
.sale-photo-field > div:first-child small, .sale-photo-field > p { color: var(--muted); font-size: var(--text-2xs); line-height: 1.4; }
.sale-photo-field > input { position: absolute; width: 1px; height: 1px; min-height: 1px; margin: 0; padding: 0; overflow: hidden; opacity: 0; clip-path: inset(50%); }
.sale-photo-field > input:focus-visible + .sale-photo-picker { outline: 3px solid var(--focus); outline-offset: 2px; }
.sale-photo-picker { cursor: pointer; }
.sale-photo-previews { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.sale-photo-previews:empty { display: none; }
.sale-photo-preview { width: 84px; position: relative; display: grid; gap: 3px; }
.sale-photo-preview img { width: 84px; height: 68px; border: 1px solid var(--line); border-radius: var(--radius-control); object-fit: cover; background: var(--surface); }
.sale-photo-preview small { overflow: hidden; color: var(--muted); font-size: var(--text-2xs); text-overflow: ellipsis; white-space: nowrap; }
.sale-photo-remove { width: 26px; height: 26px; padding: 0; border: 1px solid var(--control-border); border-radius: 50%; background: var(--surface); color: var(--danger); position: absolute; top: -8px; right: -8px; display: grid; place-items: center; font-size: var(--text-lg); font-weight: 700; line-height: 1; }
/* Stays 26px visually — a 44px disc would swallow the thumbnail it sits on — but
   the invisible expander gives the finger a full 44×44 target. Adjacent previews
   are 96px apart, so the expanded areas never overlap. */
.sale-photo-remove::after { content: ""; position: absolute; inset: -9px; }
.sale-photo-remove:hover { border-color: var(--danger); background: var(--danger-surface); }
.sale-photo-remove:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sale-photo-status { grid-column: 1 / -1; color: var(--ink-2); font-size: var(--text-2xs); line-height: 1.4; }
.sale-photo-status.is-error { color: var(--danger); font-weight: 700; }
.sale-photo-field > p { grid-column: 1 / -1; margin: 0; }
.sale-identify-action { width: 100%; }
.sale-clarification { padding: var(--space-md); border: 1px solid var(--primary-border-strong); border-radius: var(--radius-panel); background: var(--info-surface); display: grid; gap: var(--space-md); }
.sale-clarification[hidden], .sale-identity-confirmation[hidden], .sale-details-stage[hidden], .sale-benefit-input[hidden] { display: none; }
.sale-dialog-heading { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: var(--space-sm); }
.sale-dialog-heading > span { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 800; }
.sale-dialog-heading h3 { margin: 0 0 3px; font-size: var(--text-base); }
.sale-dialog-heading p { margin: 0; color: var(--info-text); font-size: var(--text-xs); line-height: 1.45; }
.sale-question-list { display: grid; gap: var(--space-md); }
.sale-question-list input { background: var(--surface); }
.sale-clarification > .primary { justify-self: start; }
.sale-identity-confirmation { padding: var(--space-md); border: 1px solid var(--success-border); border-radius: var(--radius-panel); background: var(--success-surface); display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: var(--space-sm); }
.sale-confirmation-mark { width: 32px; height: 32px; border-radius: 50%; background: var(--success-dark); color: var(--on-success); display: grid; place-items: center; font-weight: 800; }
.sale-identity-confirmation > div { min-width: 0; display: grid; gap: 2px; }
.sale-identity-confirmation small { color: var(--success-dark); font-size: var(--text-2xs); font-weight: 700; }
.sale-identity-confirmation strong { overflow-wrap: anywhere; font-size: var(--text-base); }
.sale-identity-confirmation p { margin: 5px 0 0; display: grid; gap: 2px; color: var(--success-text); font-size: var(--text-2xs); }
.sale-identity-confirmation p b { color: var(--success-text); font-size: var(--text-2xs); }
.sale-identity-confirmation .secondary { min-height: 40px; padding: 7px 10px; }
.sale-details-stage { padding-top: var(--space-lg); border-top: 1px solid var(--line); display: grid; gap: var(--space-lg); }
.sale-stage-heading { margin-bottom: 0; align-items: start; }
.sale-stage-heading h2 { margin-bottom: 3px; }
.sale-stage-heading p { margin: 0; color: var(--muted); font-size: var(--text-xs); }
.sale-benefit-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: var(--space-sm); }
.sale-benefit-fieldset > legend { margin-bottom: 3px; font-size: var(--text-sm); font-weight: 700; }
.sale-benefit-fieldset > p { margin: 0; color: var(--muted); font-size: var(--text-2xs); line-height: 1.45; }
.sale-benefit-options { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xs); }
.sale-benefit-options label { min-width: 0; cursor: pointer; }
.sale-benefit-options input { position: absolute; width: 1px; height: 1px; min-height: 1px; opacity: 0; pointer-events: none; clip-path: inset(50%); }
.sale-benefit-options label > span { height: 100%; min-height: 92px; padding: var(--space-sm); border: 1px solid var(--control-border); border-radius: var(--radius-control); background: var(--surface); display: grid; align-content: start; gap: 4px; transition: border-color var(--motion-state) var(--ease-out), background-color var(--motion-state) var(--ease-out); }
.sale-benefit-options strong { color: var(--ink); font-size: var(--text-xs); }
.sale-benefit-options small { color: var(--muted); font-size: var(--text-2xs); line-height: 1.4; }
.sale-benefit-options label:has(input:checked) > span { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.sale-benefit-options label:has(input:checked) strong { color: var(--primary-dark); }
.sale-benefit-options label:has(input:focus-visible) > span { outline: 3px solid var(--focus); outline-offset: 2px; }
.sale-benefit-input { padding-top: var(--space-xs); }
.sale-delivery-options { padding: 3px; border: 1px solid var(--control-border); border-radius: var(--radius-control); background: var(--surface-strong); display: grid; grid-template-columns: repeat(3, 1fr); }
.sale-delivery-options span { min-height: 42px; padding: 7px 9px; border-radius: 4px; display: grid; place-items: center; color: var(--ink-2); font-size: var(--text-2xs); font-weight: 700; text-align: center; }
.sale-delivery-options label:has(input:checked) span { background: var(--surface); color: var(--primary); box-shadow: 0 1px 3px var(--shadow-color); }
.sale-private-toggle { min-height: 52px; display: flex; align-items: flex-start; gap: var(--space-sm); cursor: pointer; }
.sale-private-toggle input { width: 19px; height: 19px; min-height: 19px; flex: 0 0 19px; margin-top: 2px; padding: 0; accent-color: var(--primary); }
.sale-private-toggle > span { display: grid; gap: 2px; }
.sale-private-toggle strong { font-size: var(--text-sm); }
.sale-private-toggle small { color: var(--muted); line-height: 1.4; }
.sale-analyze-button { width: 100%; }
.sale-result-panel { min-height: 620px; overflow: hidden; }
.sale-result-empty { min-height: 620px; padding: var(--space-2xl); display: grid; place-content: center; justify-items: center; gap: var(--space-xs); text-align: center; }
.sale-result-empty > span { width: 58px; height: 58px; margin-bottom: var(--space-sm); border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: var(--text-xl); font-weight: 800; }
.sale-result-empty h2 { margin: 0; }
.sale-result-empty p { max-width: 42ch; margin: 0; color: var(--muted); line-height: 1.55; }
.sale-analysis-loading { min-height: 620px; padding: var(--space-2xl); display: grid; place-content: center; justify-items: center; gap: var(--space-sm); }
.sale-analysis-loading[hidden], .sale-analysis-error[hidden], [data-sale-result][hidden] { display: none; }
.sale-analysis-loading h2 { margin: 0; text-align: center; }
.sale-loading-status { min-height: 22px; max-width: 48ch; margin: 0 0 var(--space-sm); color: var(--ink-2); font-size: var(--text-xs); line-height: 1.5; text-align: center; }
.sale-loading-hint { max-width: 48ch; margin: calc(-1 * var(--space-xs)) 0 var(--space-sm); padding: 7px 10px; border-radius: var(--radius-control); background: var(--info-surface); color: var(--info-text); font-size: var(--text-2xs); line-height: 1.45; text-align: center; }
.sale-loading-hint[hidden] { display: none; }
.sale-analysis-loading ol { width: min(100%, 520px); margin: 0; padding: var(--space-md); border: 1px solid var(--line-strong); background: var(--surface-2); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs) var(--space-lg); list-style: none; color: var(--muted); font-size: var(--text-2xs); font-weight: 700; }
.sale-analysis-loading li { min-height: 28px; display: flex; align-items: center; gap: 9px; transition: color var(--motion-state) var(--ease-out); }
/* 3.19:1 on the panel — still reads as the quiet state next to active/complete,
   but the pending step is now actually visible (was #aeb9c2 at 1.91:1). */
.sale-analysis-loading li::before { content: ""; width: 16px; height: 16px; flex: 0 0 16px; border: 2px solid var(--line-contrast); border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--on-success); font-size: var(--text-2xs); line-height: 1; }
.sale-analysis-loading li.is-active { color: var(--primary); }
.sale-analysis-loading li.is-active::before { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); animation: sale-loading-pulse 1.1s var(--ease-out) infinite alternate; }
.sale-analysis-loading li.is-complete::before { content: "✓"; border-color: var(--success-mid); background: var(--success-mid); }
.sale-analysis-mark { width: 64px; height: 64px; margin-bottom: var(--space-xs); border-radius: 50%; background: var(--primary-soft); display: grid; place-items: center; position: relative; }
.sale-analysis-mark::before { content: ""; position: absolute; inset: 7px; border: 3px solid var(--primary-border); border-top-color: var(--primary); border-radius: 50%; animation: sale-loading-rotate 900ms linear infinite; }
.sale-analysis-mark span { width: 16px; height: 16px; border-radius: 3px; background: var(--primary); animation: sale-loading-core 900ms var(--ease-out) infinite alternate; }
.sale-loading-preview { width: min(100%, 520px); margin-top: var(--space-sm); padding: var(--space-md); border: 1px solid var(--line); display: grid; grid-template-columns: 84px 1fr; gap: var(--space-md); overflow: hidden; }
.sale-loading-preview > i { aspect-ratio: 1; background: var(--placeholder); position: relative; overflow: hidden; }
.sale-loading-preview > span { display: grid; align-content: center; gap: 10px; }
.sale-loading-preview > span i { height: 11px; border-radius: 2px; background: var(--placeholder); position: relative; overflow: hidden; }
.sale-loading-preview > span i:nth-child(2) { width: 76%; }
.sale-loading-preview > span i:nth-child(3) { width: 92%; }
.sale-loading-preview > span i:nth-child(4) { width: 55%; }
.sale-loading-preview i::after { content: ""; width: 45%; position: absolute; inset-block: 0; left: -50%; background: var(--primary-border-strong); animation: sale-loading-scan 1.2s var(--ease-out) infinite; }
.sale-analysis-error { min-height: 120px; margin: var(--space-lg); padding: var(--space-lg); border: 1px solid var(--danger-border); border-radius: var(--radius-control); background: var(--danger-surface); color: var(--danger-dark); display: grid; place-content: center; line-height: 1.5; }
.sale-draft-preview { min-width: 0; }
.sale-preview-heading { padding: var(--space-lg); border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-lg); }
.sale-preview-heading h2 { margin: 3px 0 6px; font-size: var(--text-xl); }
.sale-preview-heading p { max-width: 65ch; margin: 0; color: var(--ink-2); line-height: 1.5; }
.sale-preview-heading .sale-category-suggestion { margin: 0 0 var(--space-sm); padding: 7px 9px; border-radius: var(--radius-control); background: var(--primary-soft); display: inline-grid; gap: 2px; }
.sale-category-suggestion span { color: var(--info-text); font-size: var(--text-2xs); font-weight: 700; }
.sale-category-suggestion strong { color: var(--primary-dark); font-size: var(--text-2xs); }
.sale-confidence { flex: 0 0 auto; padding: 5px 7px; border-radius: 4px; background: var(--placeholder); color: var(--ink-2); font-size: var(--text-2xs); font-weight: 800; white-space: nowrap; }
.sale-evidence-section { padding: var(--space-lg); border-bottom: 1px solid var(--line); display: grid; gap: var(--space-lg); }
.sale-evidence-section h4 { margin: 0; color: var(--primary-dark); font-size: var(--text-xs); }
.sale-benefit-list { display: grid; gap: 0; }
.sale-benefit-list > h4 { padding-bottom: var(--space-xs); }
.sale-benefit-list article { padding: var(--space-sm) 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .7fr); align-items: start; gap: var(--space-lg); }
.sale-benefit-list article p { margin: 0; line-height: 1.5; }
.sale-benefit-list article > div { display: grid; gap: 4px; }
.sale-benefit-list article a { overflow-wrap: anywhere; font-size: var(--text-2xs); font-weight: 700; line-height: 1.35; }
.sale-image-finding { padding-top: var(--space-sm); border-top: 1px solid var(--line); display: grid; gap: var(--space-xs); }
.sale-image-finding p { max-width: 70ch; margin: 0; line-height: 1.5; }
.sale-image-finding small { color: var(--muted); line-height: 1.5; }
.sale-draft-preview > form { display: grid; }
.sale-price-section, .sale-copy-section { padding: var(--space-lg); border-bottom: 1px solid var(--line); }
.sale-strategy-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); }
.sale-strategy { min-width: 0; border: 1px solid var(--control-border); border-radius: var(--radius-panel); background: var(--surface); cursor: pointer; transition: border-color var(--motion-state) var(--ease-out), background-color var(--motion-state) var(--ease-out), transform var(--motion-instant) var(--ease-out); }
.sale-strategy:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.sale-strategy-content { height: 100%; min-height: 190px; padding: var(--space-md); display: flex; flex-direction: column; gap: var(--space-xs); }
.sale-strategy-top { display: flex; justify-content: space-between; align-items: start; gap: var(--space-xs); }
.sale-strategy-top strong { color: var(--primary-dark); font-size: var(--text-xs); }
.sale-strategy-top b { font-size: var(--text-lg); white-space: nowrap; }
.sale-strategy-forecast { color: var(--ink-2); font-size: var(--text-2xs); line-height: 1.4; }
.sale-strategy-forecast b { color: var(--ink); }
.sale-strategy-content small { margin-top: auto; color: var(--ink-2); line-height: 1.45; }
.sale-strategy-content em { padding-top: var(--space-xs); border-top: 1px solid var(--warning-border); color: var(--warning); font-size: var(--text-2xs); font-style: normal; font-weight: 700; line-height: 1.35; }
.sale-strategy.is-cautioned:not(:has(input:checked)) { background: var(--warning-surface-soft); }
.sale-asking-price { max-width: 240px; margin-top: var(--space-md); display: grid; gap: var(--space-xs); font-size: var(--text-xs); font-weight: 700; }
.sale-estimate-note { margin: var(--space-sm) 0 0; color: var(--muted); font-size: var(--text-2xs); line-height: 1.45; }
.sale-copy-section { display: grid; gap: var(--space-md); }
.sale-copy-section .sale-section-heading { margin-bottom: 0; }
.sale-copy-field { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.sale-copy-field label { grid-column: 1 / -1; }
.sale-copy-field textarea { grid-column: 1 / -1; }
.copy-field-button { min-height: 40px; padding: 7px 10px; border: 1px solid var(--control-border); border-radius: var(--radius-control); background: var(--surface); color: var(--primary); font-size: var(--text-2xs); font-weight: 700; }
.copy-field-button:hover { border-color: var(--primary); background: var(--primary-soft); }
.copy-field-button.is-copied { border-color: var(--success); background: var(--success-surface); color: var(--success-dark); }
.sale-draft-actions { padding: var(--space-lg); display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
.sale-draft-actions .danger-text { margin-inline-start: auto; }
.sale-photo-note { margin: calc(-1 * var(--space-sm)) var(--space-lg) var(--space-lg); color: var(--muted); font-size: var(--text-2xs); line-height: 1.45; }
.sale-comparables { border-top: 1px solid var(--line); }
.sale-comparables > summary { min-height: 54px; padding: 0 var(--space-lg); display: flex; align-items: center; color: var(--primary); font-size: var(--text-xs); font-weight: 700; cursor: pointer; }
.sale-comparables > summary > span { min-width: 23px; height: 23px; margin-inline-start: auto; border-radius: 12px; background: var(--primary-soft); display: grid; place-items: center; font-size: var(--text-2xs); }
.sale-comparable-list { border-top: 1px solid var(--line); }
.sale-comparable-list > a { min-height: 62px; padding: var(--space-sm) var(--space-lg); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); color: var(--ink); }
.sale-comparable-list > a:last-child { border-bottom: 0; }
.sale-comparable-list > a:hover { background: var(--primary-tint); text-decoration: none; }
.sale-comparable-list a > span { min-width: 0; display: grid; gap: 3px; }
.sale-comparable-list strong { overflow-wrap: anywhere; }
.sale-comparable-list small { color: var(--muted); }
.sale-comparable-list a > b { flex: 0 0 auto; font-size: var(--text-base); }
.sale-drafts-section { margin-top: var(--space-2xl); padding-top: var(--space-xl); border-top: 1px solid var(--line); }
.sale-draft-count { min-width: 32px; height: 32px; border-radius: 16px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-size: var(--text-2xs); font-weight: 800; }
.sale-draft-list { border: 1px solid var(--line); background: var(--surface); }
.sale-draft-row { min-height: 70px; padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) 180px auto; align-items: center; gap: var(--space-lg); color: var(--ink); }
.sale-draft-row:last-child { border-bottom: 0; }
.sale-draft-row:hover, .sale-draft-row[aria-current="true"] { background: var(--primary-soft); text-decoration: none; }
.sale-draft-row > span:not(.status-label) { display: grid; gap: 3px; }
.sale-draft-row small { color: var(--muted); }
@keyframes sale-loading-rotate { to { transform: rotate(360deg); } }
@keyframes sale-loading-core { to { transform: scale(.72); opacity: .65; } }
@keyframes sale-loading-pulse { to { box-shadow: 0 0 0 7px var(--primary-soft); } }
@keyframes sale-loading-scan { to { left: 110%; } }
@media (max-width: 1080px) {
  .sale-workspace { grid-template-columns: 1fr; }
  .sale-result-panel, .sale-result-empty, .sale-analysis-loading { min-height: 480px; }
}
@media (max-width: 700px) {
  .sale-strategy-options { grid-template-columns: 1fr; }
  .sale-strategy-content { min-height: 0; }
  .sale-draft-row { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-sm); }
  .sale-draft-row .status-label { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 600px) {
  .sale-intake, .sale-price-section, .sale-copy-section, .sale-preview-heading, .sale-evidence-section, .sale-draft-actions { padding: var(--space-md); }
  .sale-detail-grid { grid-template-columns: 1fr; }
  .sale-photo-field { grid-template-columns: 1fr; }
  .sale-photo-picker { width: 100%; }
  .sale-identity-confirmation { grid-template-columns: 34px minmax(0, 1fr); }
  .sale-identity-confirmation .secondary { width: 100%; grid-column: 1 / -1; }
  .sale-benefit-options { grid-template-columns: 1fr; }
  .sale-benefit-options label > span { min-height: 0; }
  .sale-benefit-list article { grid-template-columns: 1fr; gap: var(--space-xs); }
  .sale-delivery-options { grid-template-columns: 1fr; }
  .sale-preview-heading { display: grid; }
  .sale-confidence { justify-self: start; }
  .sale-copy-field { grid-template-columns: 1fr; }
  .sale-copy-field input, .sale-copy-field textarea, .sale-copy-field button { grid-column: 1; width: 100%; }
  .sale-draft-actions { align-items: stretch; flex-direction: column; }
  .sale-draft-actions > * { width: 100%; }
  .sale-draft-actions .danger-text { margin-inline-start: 0; }
  .sale-photo-note { margin-inline: var(--space-md); }
  .sale-analysis-loading { padding: var(--space-lg); }
  .sale-analysis-loading ol { grid-template-columns: 1fr; }
  .sale-loading-preview { grid-template-columns: 64px 1fr; }
}
@media (max-width: 960px) {
  .onboarding-page-content { padding: var(--space-lg) var(--space-lg) var(--space-2xl); }
  .onboarding-shell { display: block; }
  .onboarding-rail { display: none; }
  .onboarding-workspace { padding-top: 0; }
  .mobile-progress { display: grid; gap: var(--space-sm); margin-bottom: var(--space-xl); }
  .mobile-progress > div { display: flex; justify-content: space-between; gap: var(--space-md); color: var(--muted); font-size: var(--text-xs); }
  .mobile-progress > div strong { color: var(--ink); }
  .progress-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xs); }
  .progress-track i { height: 4px; border-radius: 2px; background: var(--line-strong); }
  .progress-track i.filled { background: var(--primary); }
}
@media (max-width: 1100px) {
  .agent-row { grid-template-columns: 28px minmax(180px, 1.4fr) minmax(140px, .8fr) minmax(130px, .8fr) auto; gap: var(--space-sm); }
  .top-deal { grid-template-columns: 34px 72px minmax(200px, 1fr) minmax(90px, auto); }
  .top-deal-image { width: 72px; height: 58px; }
  .top-deal-scores { grid-column: 3 / -1; }
}
@media (max-width: 900px) {
  .page { padding: 22px 18px 44px; }
  .overview-strip, .system-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-strip > div:nth-child(2), .system-grid > div:nth-child(2) { border-inline-end: 0; }
  .overview-strip > div:nth-child(-n+2), .system-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .search-grid { grid-template-columns: 1fr; }
  .create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid, .settings-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-deal { grid-template-columns: 34px 72px minmax(0, 1fr) minmax(90px, auto); }
}
@media (max-width: 700px) {
  .agent-row { grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: "select identity identity settings" ". status checked checked" "config config config config"; column-gap: var(--space-sm); row-gap: var(--space-xs); align-items: center; }
  .agent-select { grid-area: select; align-self: start; padding-top: var(--space-xs); }
  .agent-identity { grid-area: identity; }
  .agent-status-block { grid-area: status; }
  .agent-check-block { grid-area: checked; }
  .search-settings { grid-area: settings; }
  /* No `grid-column: auto` here — it would undo the column span that
     `grid-area: config` sets and squeeze the panel into a single track. */
  .search-settings[open] { grid-area: config; }
  .search-settings > summary { padding-inline: var(--space-sm); }
  .agent-identity span { white-space: normal; }
  .agent-state-full, .agent-check-full { display: none; }
  .agent-state-compact, .agent-check-compact { display: inline; }
  /* The switch already reads "Aktiv"/"Pausiert" — the column label is redundant
     here and would push the collapsed row past a scannable height. */
  .agent-status-block > .agent-column-label { display: none; }
  /* Short column label swaps in via the .agent-check-full/-compact spans, so the
     wording stays in the translation catalogue instead of CSS content. */
  .top-deals-heading { align-items: flex-start; }
  .top-deal { grid-template-columns: 30px 64px minmax(0, 1fr); align-items: start; gap: var(--space-sm); }
  .top-deal-image { width: 64px; height: 54px; }
  .top-deal-price { grid-column: 3; }
  .top-deal-scores { grid-column: 1 / -1; }
  .top-deal-explanation { grid-column: 1 / -1; }
  .mobile-offer-sort { display: grid; gap: var(--space-xs); margin-bottom: var(--space-md); color: var(--ink); font-size: var(--text-xs); }
  .offers-scroll { overflow: visible; border: 0; background: transparent; }
  .offers-table, .offers-table tbody { display: block; }
  .offers-table thead { display: none; }
  .offers-table tr.offer-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm) var(--space-md); margin-bottom: var(--space-sm); padding: var(--space-md); border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); }
  .offers-table tr.offer-row:hover { background: var(--surface); }
  .offers-table tr.offer-row td { min-width: 0; padding: 0; border: 0; display: grid; align-content: start; gap: var(--space-2xs); overflow-wrap: anywhere; }
  .offers-table tr.offer-row .cell-label { display: block; text-transform: uppercase; }
  .offers-table tr.offer-row .offer-main-cell { grid-column: 1 / -1; padding-bottom: var(--space-sm); border-bottom: 1px solid var(--line); }
  .offers-table .status-paylivery { justify-self: start; margin-top: 0; }
  .offer-thumbnail { width: 56px; height: 48px; flex-basis: 56px; }
  .offer-explanation-content { min-width: 0; }
  .offer-explanation-content h3, .offer-explanation-content ul, .offer-explanation-content .market-range { font-size: var(--text-sm); }
  .empty-offers-row, .empty-offers-row td { display: block; }
  .score-guide dl { grid-template-columns: 1fr; gap: var(--space-md); }
  .user-table { overflow: visible; border: 0; background: transparent; }
  .user-table table, .user-table tbody { display: block; }
  .user-table thead { display: none; }
  .user-table tr { margin-bottom: var(--space-sm); padding: var(--space-md); border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); display: grid; gap: var(--space-sm); }
  .user-table td { min-width: 0 !important; padding: 0; border: 0; display: grid; gap: var(--space-2xs); }
  .user-table .cell-label { display: block; }
  .user-actions { align-items: flex-start; flex-direction: column; }
  .reset-details, .reset-form { width: 100%; }
  .reset-form { align-items: stretch; flex-direction: column; }
  .reset-form input { width: 100%; min-height: 44px; }
  .invitation-row { grid-template-columns: 1fr auto; }
  .invitation-row > div { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .app-header { min-height: 58px; padding: 0 14px; position: relative; align-items: center; flex-direction: row; gap: var(--space-sm); }
  .brand { min-height: 58px; display: flex; align-items: center; }
  .nav-toggle { display: block; margin-inline-start: auto; }
  .nav-toggle span { background: var(--on-brand-canvas); }
  nav { display: grid; width: calc(100% - 28px); height: auto; min-height: 0; padding: var(--space-xs); border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); position: absolute; z-index: 20; inset: 54px 14px auto; box-shadow: 0 4px 8px var(--shadow-color); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-7px) scale(.985); transform-origin: top right; transition: opacity var(--motion-fast) var(--ease-out), transform var(--motion-state) var(--ease-out-quint), visibility 0s linear var(--motion-state); }
  nav.open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); transition-delay: 0s; }
  nav a, nav .link-button { width: 100%; height: 44px; padding: 0 var(--space-sm); color: var(--primary); justify-content: flex-start; font-size: var(--text-sm); }
  nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-dark); box-shadow: none; }
  /* Dropdown panel uses the page surface: the divider drawn against the brand bar would vanish. */
  nav .language-button { border-inline-end: 0; border-top: 1px solid var(--line); }
  /* The dropdown panel is a plain surface, so the header's on-brand ring would vanish here. */
  nav a:focus-visible, nav .link-button:focus-visible { outline-color: var(--focus); }
  .page-heading { align-items: flex-start; }
  .page-heading:not(.offers-page-heading), .search-management-heading { display: grid; }
  .settings-section .section-heading { display: grid; }
  .invitation-heading { display: grid; align-items: start; }
  .invitation-heading form, .invitation-heading button { width: 100%; }
  .copy-field { grid-template-columns: 1fr; }
  .copy-field button { width: 100%; }
  .profile-notification-actions { align-items: stretch; flex-direction: column; }
  .profile-notification-actions .button-link, .profile-notification-actions form, .profile-notification-actions button { width: 100%; }
  .connection-summary { align-items: flex-start; }
  .connection-summary > span:last-child { display: grid; gap: var(--space-2xs); }
  .page-heading > .button-link, .agent-filter { width: 100%; }
  .offers-page-heading, .offers-section-heading { display: grid; }
  .offers-page-heading form, .offers-page-heading button, .offers-section-heading form, .offers-section-heading button { width: 100%; }
  .page-actions { align-items: stretch; flex-direction: column; }
  .page-actions > * { width: 100%; }
  .offer-filter { align-items: stretch; flex-direction: column; }
  .offer-filter select, .offer-filter .secondary { width: 100%; }
  h1 { font-size: var(--text-xl); }
  .form-grid, .create-form, .settings-fields, .channel-options, .password-form { grid-template-columns: 1fr; }
  .onboarding-channels { grid-template-columns: 1fr; }
  .task-heading h1 { font-size: var(--text-2xl); }
  .onboarding-footer { align-items: flex-start; gap: var(--space-xs); flex-direction: column; }
  .guided-structured-fields, .delivery-options { grid-template-columns: 1fr; }
  .agent-purchase-fields { grid-template-columns: 1fr; }
  .guided-search-section > .agent-wizard { padding: var(--space-lg) var(--space-md); }
  /* Labels are dropped here, so the connector moves into the second column. */
  .agent-wizard-progress li { grid-template-columns: 28px minmax(12px, 1fr); }
  .agent-wizard-progress li > small { display: none; }
  .quality-options, .agent-summary { grid-template-columns: 1fr; }
  .quality-option > span { min-height: 0; }
  .agent-summary section, .agent-summary section:nth-child(odd), .agent-summary section:nth-last-child(-n + 2) { border-inline-end: 0; border-block-end: 1px solid var(--line); }
  .agent-summary section:last-child { border-block-end: 0; }
  .location-picker > summary { align-items: flex-start; flex-direction: column; }
  .location-picker > summary::after { position: absolute; align-self: flex-end; }
  .location-picker > summary > strong { margin-inline-start: 0; padding-inline-end: var(--space-lg); text-align: start; }
  .wizard-actions { align-items: stretch; flex-direction: column-reverse; }
  .wizard-actions .primary, .wizard-actions .secondary, .final-wizard-actions .primary { width: 100%; min-width: 0; }
  .connection-success-stage { display: grid; }
  .location-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .location-option { padding-inline: 8px; }
  .guided-search-submit { align-items: stretch; flex-direction: column; }
  .guided-search-submit .primary { width: 100%; }
  .completion-stage { gap: var(--space-md); padding-top: 0; }
  .onboarding-page .app-header { min-height: 58px; padding: 0 14px; flex-direction: row; align-items: center; }
  .onboarding-page .brand { padding: 0; }
  .onboarding-page nav { width: auto; min-height: 44px; }
  .onboarding-page nav .link-button { height: 44px; }
  .search-card { padding: var(--space-sm); }
  /* Full-bleed panel: the negative margins cancel the card padding, so the fields get
     the whole card width back instead of two stacked 12px insets. */
  .search-settings[open] { margin: 0 calc(-1 * var(--space-sm)) calc(-1 * var(--space-sm)); padding: var(--space-md) var(--space-sm) var(--space-md); }
  .search-settings-fields { gap: var(--space-lg); }
  .expert-settings { margin-top: var(--space-sm); padding-top: var(--space-sm); }
  .expert-settings-fields { gap: var(--space-lg); }
  .card-actions { flex-wrap: wrap; }
  .card-actions .secondary { flex: 1 1 145px; }
  .bulk-search-actions > span { flex-basis: 100%; }
  .guided-create-summary strong { font-size: var(--text-md); }
  .login-panel { padding: var(--space-lg); }
  .field-help, .expert-settings > p, .technical-settings-note { font-size: var(--text-sm); }
  .baseline { width: 100%; }
}
@media (max-width: 420px) {
  .onboarding-page-content { padding-inline: var(--space-md); }
  .mobile-progress > div { display: grid; gap: var(--space-2xs); }
  .onboarding-actions, .onboarding-actions form, .onboarding-actions .primary,
  .onboarding-actions .secondary { width: 100%; }
  .completion-stage { display: grid; }
}
@media (max-width: 340px) {
  .location-options { grid-template-columns: 1fr; }
}
@media (hover: hover) {
  .primary:not(:disabled):hover, .secondary:not(:disabled):hover { transform: translateY(-1px); }
  .location-option:hover, .delivery-option:hover { transform: translateY(-1px); }
}
@keyframes busy-spin { to { transform: rotate(1turn); } }
@keyframes feedback-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes success-mark-in { from { opacity: 0; transform: scale(.6) rotate(-20deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes criterion-check-in { from { opacity: .25; transform: scale(.45); } to { opacity: 1; transform: scale(1); } }
@keyframes completion-ring { from { opacity: .75; transform: scale(.75); } to { opacity: 0; transform: scale(1.65); } }
/* Controls that are deliberately dense on a mouse-driven desktop grow to the 44px
   touch minimum wherever the primary pointer is a finger. Keyed on pointer type
   rather than viewport width so touch laptops and tablets are covered too. */
@media (pointer: coarse) {
  .compact-button,
  .impersonation-bar .secondary,
  .sale-identity-confirmation .secondary,
  .copy-field-button,
  .offer-filter select, .offer-filter .secondary,
  .offer-explanation summary,
  .reset-details summary,
  .reset-form input,
  .sort-button,
  .sale-condition-options span,
  .sale-delivery-options span,
  .check-option,
  .agent-select { min-height: 44px; }
  /* Bare checkboxes whose label is not itself a large hit area. */
  .agent-select input, .check-option input { width: 24px; height: 24px; min-height: 24px; }
  .check-option input { flex-basis: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation-duration: .01ms !important; }
}
