/* Busca Imobi public site. Mobile first; tokens on :root, dark theme below. */

:root {
  --bg: #f6f7f5;
  --surface: #ffffff;
  --surface-2: #eef2ef;
  --text: #1c2421;
  --muted: #5d6a65;
  --line: #dde3df;
  --brand: #0f5f56;
  --brand-strong: #0a4740;
  --brand-soft: #e3f1ee;
  --accent: #c2410c;
  --warn-bg: #fff4e5;
  --warn-line: #f5c27a;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --ok-bg: #e7f6ec;
  --ok-line: #9fd3b0;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(16 24 20 / 6%), 0 4px 16px rgb(16 24 20 / 6%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

/* Dark theme: follows the browser unless the visitor picked a theme (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111614;
    --surface: #1a201e;
    --surface-2: #232b28;
    --text: #e7ece9;
    --muted: #a3b0ab;
    --line: #2e3834;
    --brand: #4fb8a8;
    --brand-strong: #7fd3c5;
    --brand-soft: #1d3430;
    --accent: #fb923c;
    --warn-bg: #2d2416;
    --warn-line: #7a5a26;
    --danger: #f97066;
    --danger-soft: #3a1d1a;
    --ok-bg: #16291f;
    --ok-line: #2f5e42;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111614;
  --surface: #1a201e;
  --surface-2: #232b28;
  --text: #e7ece9;
  --muted: #a3b0ab;
  --line: #2e3834;
  --brand: #4fb8a8;
  --brand-strong: #7fd3c5;
  --brand-soft: #1d3430;
  --accent: #fb923c;
  --warn-bg: #2d2416;
  --warn-line: #7a5a26;
  --danger: #f97066;
  --danger-soft: #3a1d1a;
  --ok-bg: #16291f;
  --ok-line: #2f5e42;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-strong); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.section { margin-top: 2.5rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: .5rem 1rem; z-index: 10; }

/* Header, breadcrumbs */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--brand); text-decoration: none; }
/* The logo (templates/core/_logo.html): the mark and the name drawn as outlines. */
.brand-mark { flex: none; width: 2rem; height: 2rem; }
.brand-name { flex: none; width: auto; height: 1.0625rem; fill: currentColor; }
.brand-name-rest { fill: var(--text); }
.header-nav { display: flex; gap: 1.1rem; font-size: .95rem; }
.header-nav a { color: var(--text); text-decoration: none; }
.header-nav a:hover { color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.theme-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); }
.theme-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.theme-toggle .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
/* The header menu (base.html): a <details> whose panel drops below its button.
   Lists never end, so there is no footer: the menu holds what one would. */
.site-header { position: relative; z-index: 30; }
.site-menu { position: relative; }
.menu-button {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; list-style: none;
}
.menu-button::-webkit-details-marker { display: none; }
.menu-button:hover, .site-menu[open] > .menu-button { border-color: var(--brand); color: var(--brand); }
.site-menu[open] > .menu-button { background: var(--brand-soft); }
.menu-button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: min(300px, calc(100vw - 32px));
  display: grid; gap: .1rem; padding: .4rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 8px 28px rgb(16 24 20 / 16%); font-size: .95rem;
}
.menu-links { display: grid; padding-bottom: .3rem; margin-bottom: .3rem; border-bottom: 1px solid var(--line); }
.menu-links a { padding: .6rem .75rem; border-radius: 8px; color: var(--text); text-decoration: none; }
.menu-links a:hover { background: var(--surface-2); color: var(--text); }
.menu-links a:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
@media (min-width: 521px) { .menu-phone { display: none; } }
.menu-links-last { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
/* The account menu's button is the header's "Minha conta", with a caret. */
.account-menu > summary { list-style: none; cursor: pointer; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu .menu-caret { transition: transform .15s; }
.account-menu[open] .menu-caret { transform: rotate(180deg); }
.account-menu[open] > summary { color: var(--brand); }
.account-menu > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 44px; padding: .2rem .3rem .2rem .75rem; color: var(--muted); }
.menu-row .theme-toggle { width: 36px; height: 36px; }
.menu-foot { margin: .3rem 0 0; padding: .6rem .75rem .35rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 520px) { .header-nav { display: none; } .header-actions { gap: .6rem; } }
@media (max-width: 360px) { .header-row { gap: .5rem; } .header-actions { gap: .3rem; } .lang-switch a { padding: .3rem; } }
@media (max-width: 340px) { .brand-mark { display: none; } }

/* Staff bar above the header (templates/core/_admin_bar.html), dark in both themes, like WordPress's. */
:root { --adminbar-bg: #1d2421; --adminbar-text: #e7ece9; --adminbar-muted: #a3b0ab; --adminbar-hover: #2e3834; --adminbar-ok: #7fd3c5; --adminbar-error: #ffb4ab; }
.admin-bar { background: var(--adminbar-bg); color: var(--adminbar-text); font-size: .85rem; }
.admin-bar-row { display: flex; align-items: center; gap: .75rem; min-height: 34px; }
.admin-bar a, .admin-bar button {
  display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .55rem; border-radius: 6px;
  color: var(--adminbar-text); text-decoration: none; font: inherit; background: none; border: 0; cursor: pointer;
}
.admin-bar a:hover, .admin-bar button:hover { background: var(--adminbar-hover); color: #fff; }
.admin-bar a:focus-visible, .admin-bar button:focus-visible { outline: 2px solid var(--adminbar-ok); outline-offset: 1px; }
.admin-bar-links { display: flex; gap: .25rem; }
.admin-bar-pull { display: flex; align-items: center; gap: .5rem; margin-left: auto; min-width: 0; }
.admin-bar-pull form { margin: 0; }
.admin-bar-pull button { border: 1px solid var(--adminbar-hover); }
.admin-bar-note { color: var(--adminbar-muted); }
.admin-bar-error { color: var(--adminbar-error); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-bar-user { color: var(--adminbar-muted); margin-left: auto; white-space: nowrap; }
.admin-bar-pull + .admin-bar-user { margin-left: 0; }
.admin-bar-spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--adminbar-hover); border-top-color: var(--adminbar-ok); animation: admin-bar-spin .8s linear infinite; }
@keyframes admin-bar-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .admin-bar-spinner { animation-duration: 3s; } }
@media (max-width: 640px) {
  .admin-bar a span, .admin-bar button span, .admin-bar-user, .admin-bar-note { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .admin-bar-error { max-width: 45vw; }
}
.lang-switch { display: flex; gap: .15rem; font-size: .85rem; font-weight: 600; }
.lang-switch a { color: var(--muted); text-decoration: none; padding: .3rem .45rem; border-radius: 6px; }
.lang-switch a:hover { color: var(--brand); }
.lang-switch a[aria-current] { color: var(--brand); background: var(--brand-soft); }
.lang-switch a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; padding: 0; margin: 1rem auto 0; font-size: .875rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: .25rem; }
.crumbs a { color: var(--muted); }


/* Buttons and chips */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .55rem 1.1rem; border-radius: 10px; border: 0;
  background: var(--brand); color: #fff; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--brand-strong); color: #fff; }
.button-quiet { background: var(--brand-soft); color: var(--brand-strong); }
.button-quiet:hover { background: var(--line); color: var(--text); }
.button-block { width: 100%; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.button, .button:hover, .segmented input:checked + span, .badge) { color: #0b1512; }
}
:root[data-theme="dark"] :is(.button, .button:hover, .segmented input:checked + span, .badge) { color: #0b1512; }

.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: .5rem 0 0; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); text-decoration: none; font-size: .925rem; }
.chip span { font-size: .8rem; color: var(--muted); }
.chip-quiet { background: var(--surface-2); color: var(--text); }
a.chip:hover { outline: 1px solid var(--brand); }
/* "mais...": the rest of a long chip list. Closed it sits in the list as one
   more chip; open, it takes a full row and the rest follow, ending in
   "menos...", which closes it again. */
.chip-more:has(> details[open]) { flex-basis: 100%; }
.chip-more summary { cursor: pointer; list-style: none; }
.chip-more button { cursor: pointer; border: 0; font: inherit; font-size: .925rem; }
.chip-more summary::-webkit-details-marker { display: none; }
.chip-more :is(summary, button):hover { outline: 1px solid var(--brand); }
.chip-more details[open] > summary { display: none; }
.chip-more .chip-list { margin: 0; }

/* Panels and page heads */
.page-head { margin-top: 1.25rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 1rem; }
.subhead { margin-top: 1rem; font-size: .95rem; color: var(--muted); font-weight: 600; }
.stat-line { color: var(--muted); }
.stat-line strong { color: var(--text); white-space: nowrap; }
.notice { border-radius: var(--radius); padding: .85rem 1rem; margin: 1rem 0; }
.notice-warn { background: var(--warn-bg); border: 1px solid var(--warn-line); }

/* Home */
.hero { background: linear-gradient(160deg, var(--brand-soft), var(--bg) 70%); padding: 2.5rem 0 2rem; border-bottom: 1px solid var(--line); }
.hero h1 { max-width: 28ch; font-size: clamp(1.7rem, 5vw, 2.6rem); text-wrap: balance; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.quick-search { display: grid; gap: .75rem; margin-top: 1.5rem; background: var(--surface); padding: 1rem; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 860px; }
@media (min-width: 720px) { .quick-search { grid-template-columns: 2fr 1fr 1.4fr auto; align-items: end; } }
.hero-search { padding: 1.5rem 0 1rem; }
/* The search box comes first on phones; the headline shows on desktop only (screen readers keep it everywhere). */
.hero-intro { margin-bottom: 1.25rem; }
@media (max-width: 899px) { .hero-intro { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
.text-search { display: flex; gap: .5rem; max-width: 860px; background: var(--surface); padding: .5rem; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
/* In dark the surface is nearly the hero's colour and the shadow doesn't show, so lift the box and outline it. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .text-search { background: var(--surface-2); border-color: var(--muted); }
}
:root[data-theme="dark"] .text-search { background: var(--surface-2); border-color: var(--muted); }
.text-search input[type="search"] {
  flex: 1; min-width: 0; min-height: 48px; padding: .5rem .75rem; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); font: inherit; font-size: 1.05rem;
}
.search-hint { font-size: .875rem; max-width: 860px; margin: .6rem 0 0; }
/* The busiest cities under the search box (home.html): one row that scrolls sideways on phones. */
.hero-cities { display: flex; align-items: flex-start; gap: .5rem; margin-top: 1rem; }
.hero-cities > span { flex: none; padding-top: .4rem; font-size: .875rem; font-weight: 600; color: var(--muted); }
.hero-cities ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; min-width: 0; }
.hero-cities .chip { background: var(--surface); border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
@media (max-width: 720px) {
  .hero-cities { margin-right: -16px; }
  .hero-cities ul { flex-wrap: nowrap; overflow-x: auto; padding-right: 16px; scrollbar-width: none; }
  .hero-cities ul::-webkit-scrollbar { display: none; }
}
.search-filters { margin: 0 0 1rem; }
label > span, legend { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .03em; }
select, input[type="text"], input[type="email"], input[type="password"], input[type="number"] {
  width: 100%; min-height: 44px; padding: .5rem .65rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit;
}
select:focus, input:focus, .button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.city-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.city-list a { display: grid; grid-template-columns: 1fr auto; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.city-list a:hover { border-color: var(--brand); }
.city-list small { grid-column: 1 / -1; color: var(--muted); }

/* City field (combobox) */
.city-field { position: relative; }
.city-options {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0;
  list-style: none; margin: 0; padding: .25rem; max-height: 320px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
}
.city-options[hidden] { display: none; }
.city-options li { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .55rem .65rem; border-radius: 6px; cursor: pointer; }
.city-options li small { color: var(--muted); white-space: nowrap; }
.city-options li:hover, .city-options li[aria-selected="true"] { background: var(--brand-soft); color: var(--brand-strong); }

/* State page */
.region h2 { font-size: 1.1rem; }
.coming-soon { max-width: 80ch; line-height: 1.7; }
.showcase-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: .75rem; }
.showcase-head h2 { margin: 0; }
.eyebrow { display: block; font-size: .8rem; font-weight: 600; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .2rem; }
.see-all { white-space: nowrap; font-weight: 600; }
#vitrine.htmx-request { opacity: .55; transition: opacity .15s; }
.steps { padding-left: 1.25rem; display: grid; gap: .5rem; max-width: 70ch; }

/* City hub */
.tx-grid { display: grid; gap: 1rem; margin-top: 1.25rem; }
.tx-grid > .panel + .panel { margin-top: 0; } /* the grid gap already spaces the cards; keeps their tops aligned side by side */
@media (min-width: 860px) { .tx-grid { grid-template-columns: 1fr 1fr; } }
.tx-grid h2 a { color: var(--text); text-decoration: none; }
.tx-grid h2 a:hover { color: var(--brand); }
/* Each panel is a <details> whose summary is its heading and totals. On phones
   _panels_script.html closes them on load and a tap on the summary opens one
   (and filters the feed); from 860px,
   side by side, they stay open. */
.panel-details > summary { list-style: none; }
.panel-details > summary::-webkit-details-marker { display: none; }
.panel-details > summary .stat-line, .panel-details > summary .muted { display: block; }
@media (max-width: 859px) { .panel-details > summary { cursor: pointer; } }
@media (min-width: 860px) {
  .panel-details > summary { pointer-events: none; }
  .panel-details > summary a { pointer-events: auto; }
}

/* Search */
.tabs { display: flex; gap: .25rem; margin: .75rem 0 0; border-bottom: 1px solid var(--line); }
.tabs a { padding: .5rem 1rem; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.tabs a[aria-current="page"] { color: var(--brand); border-color: var(--brand); }

.search-layout { display: grid; gap: 1.25rem; margin-top: 1.25rem; }
.filters form { display: grid; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.filters-toggle { width: 100%; }
@media (max-width: 899px) { .filters form { display: none; margin-top: .75rem; } .filters.is-open form { display: grid; } }
@media (min-width: 900px) {
  .filters-toggle { display: none; }
  /* --shift and --fade follow the scroll (_filters_script.html). */
  .filters { position: sticky; top: .5rem; z-index: 20; transform: translateY(calc(-1 * var(--shift, 0px))); opacity: var(--fade, 1); }
  .filters form { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem 1rem; padding: .75rem 1rem; box-shadow: var(--shadow); }
  .filters form > * { flex: 1 1 9rem; }
  .filters form > .reset { flex: 0 0 auto; align-self: center; }
  .filters form > fieldset:has(.price-range), .filters form > .city-field { flex-basis: 14rem; }
  .filters .city-options { min-width: 16rem; }
}
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.segmented { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.segmented label { flex: 1; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; text-align: center; padding: .55rem .25rem; cursor: pointer; font-size: .925rem; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--text); margin: 0; }
.segmented label + label span { border-left: 1px solid var(--line); }
.segmented input:checked + span { background: var(--brand); color: #fff; }
.segmented input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }
.segmented input:disabled + span { opacity: .5; cursor: not-allowed; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.reset { font-size: .9rem; }

.results.htmx-request { opacity: .55; transition: opacity .15s; }
.results-head { min-height: 1.5rem; color: var(--muted); }
.results-head strong { color: var(--text); }
.card-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { height: 100%; }
.card-link { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.card-link:hover { border-color: var(--brand); transform: translateY(-2px); color: var(--text); }
.card-photo { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
/* Several photos: a strip that snaps one photo at a time (swipe on phones,
   follows the mouse across the photo via js/cards.js), with dots just below the photo, in
   the card body's top padding so the card keeps its height. */
.card-photos { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.card-photos::-webkit-scrollbar { display: none; }
.card-photos img { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.card-dots { position: relative; height: 0; display: flex; justify-content: center; gap: 4px; top: .35rem; }
.card-dots span { width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 45%, transparent); transition: background-color .15s, transform .15s; }
.card-dots span.on { background: var(--brand); transform: scale(1.15); }
.photo-placeholder { display: grid; place-content: center; justify-items: center; gap: .3rem; height: 100%; color: var(--muted); font-size: .85rem; }
.photo-placeholder svg { opacity: .55; }
.card-body { flex: 1; padding: .85rem 1rem 1rem; display: flex; flex-direction: column; gap: .15rem; }
.price { font-size: 1.25rem; font-weight: 750; margin: 0; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.price small { font-size: .8rem; font-weight: 500; color: var(--muted); }
.card-body h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.place { color: var(--muted); margin: 0; font-size: .925rem; }
/* One line, dot-separated; cut short rather than wrapped. */
.facts { list-style: none; padding: 0; margin: .4rem 0 0; font-size: .875rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.facts li { display: inline; }
.facts li + li::before { content: " · "; }
/* Last in the card body, which fills the card: the same place on every card of a row. */
.agency-name { margin: auto 0 0; padding-top: .5rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.card-body > :has(+ .agency-name) { margin-bottom: .35rem; }
.agency-many { color: var(--brand); font-weight: 600; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 1.5rem 0 0; }
.card-grid > .grid-heading { grid-column: 1 / -1; margin-top: 1.5rem; }
.grid-heading h2 { margin: 0; }
.more { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 1rem 0; }
html:not(.js) .more, .js .pagination { display: none; }
/* City and state feed filters: chips above the feed (catalog/_feed_filters.html) and, on
   small screens, a floating box of icon buttons (catalog/_feed_float.html) that
   feedFilters (_feed_script.html) slides in while scrolling back up. */
.feed-filters { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin-bottom: 1rem; }
.feed-filters .chip-list { margin-top: .4rem; }
.feed-filters .chip[aria-current] { font-weight: 600; }
.feed-float { position: fixed; left: 50%; bottom: 1rem; z-index: 20; display: flex; gap: .5rem; padding: .4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 6px 24px rgb(0 0 0 / .18); opacity: 0; transform: translate(-50%, 120%); }
.feed-control { position: relative; }
.feed-btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.feed-btn.on { background: var(--brand-soft); color: var(--brand-strong); }
.feed-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.feed-menu { position: absolute; bottom: calc(100% + .6rem); left: 50%; transform: translateX(-50%); min-width: 9rem; margin: 0; padding: .3rem; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 24px rgb(0 0 0 / .18); }
.feed-menu button { display: block; width: 100%; padding: .55rem .75rem; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.feed-menu button[aria-current] { background: var(--brand-soft); color: var(--brand-strong); font-weight: 600; }
html:not(.js) .feed-float { display: none; }
@media (min-width: 900px) { .feed-float { display: none; } }
@media (max-width: 899px) { .feed-filters:not(.filtered), .feed-filters .chip-off { display: none; } }

/* Property */
.property-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: .75rem 2rem; margin-top: 1.25rem; }
.property-head .place { font-size: 1.05rem; }
.property-price { font-size: 1.6rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.property-price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.gallery { position: relative; }
.gallery-track { display: grid; grid-auto-flow: column; grid-auto-columns: 92%; gap: .5rem; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius); }
.gallery-track > a { scroll-snap-align: start; display: block; border-radius: var(--radius); cursor: zoom-in; }
.gallery-track > a:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.gallery-track img { display: block; aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: var(--radius); }
/* The last photos' start positions lie past the end of the strip, so give it a snap point there. */
.gallery-track > a:last-child { scroll-snap-align: end; }
/* Desktop: two square photos at a time, beside the offers panel. */
@media (min-width: 900px) { .gallery-track { grid-auto-columns: calc(50% - .25rem); } }
.gallery-count { position: absolute; right: .75rem; bottom: .75rem; padding: .2rem .6rem; border-radius: 999px; background: rgb(0 0 0 / 62%); color: #fff; font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
@media (max-width: 899px) { .gallery-count { right: calc(8% + .75rem); } }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); box-shadow: var(--shadow); cursor: pointer; opacity: .92; }
.gallery-arrow:hover { opacity: 1; color: var(--brand); }
.gallery-arrow:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.gallery-arrow[hidden] { display: none; }
.gallery-prev { left: .5rem; }
.gallery-next { right: .5rem; }
.gallery-track img { height: auto; }
/* A photo opened large: fills the screen, on dark whatever the theme, like a photo viewer. */
.lightbox { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(0 0 0 / 92%); color: #fff; overscroll-behavior: contain; }
.lightbox::backdrop { background: rgb(0 0 0 / 60%); }
.lightbox[open] { display: grid; }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox-figure { display: grid; grid-template-rows: 1fr auto; place-items: center; gap: .5rem; min-height: 0; margin: 0; padding: 3.5rem 1rem 1rem; }
.lightbox-figure img { max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; }
.lightbox-count { font-size: .9rem; font-variant-numeric: tabular-nums; opacity: .85; }
.lightbox-close { position: absolute; top: .75rem; right: .75rem; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%; background: rgb(255 255 255 / 12%); color: #fff; cursor: pointer; }
.lightbox-close:hover { background: rgb(255 255 255 / 22%); }
.lightbox-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox .gallery-arrow { border-color: transparent; background: rgb(255 255 255 / 12%); color: #fff; box-shadow: none; }
.lightbox .gallery-arrow:hover { background: rgb(255 255 255 / 22%); color: #fff; }
.lightbox .gallery-arrow:focus-visible { outline-color: #fff; }
.lightbox-prev { left: .75rem; }
.lightbox-next { right: .75rem; }
@media (min-width: 900px) { .lightbox-figure { padding: 3.5rem 4.5rem 1.25rem; } }
.videos { display: grid; gap: .5rem; }
.videos video { width: 100%; max-height: 70vh; border-radius: var(--radius); background: #000; }
@media (min-width: 900px) { .videos { grid-template-columns: repeat(2, 1fr); } }
/* Photos and details on the left; on desktop the offers panel, with the price and
   the way to the agency, stays in view beside them. */
.property-layout { display: grid; gap: 1rem; margin-top: 1rem; }
.property-main { display: grid; gap: 1rem; min-width: 0; }
.property-main > .panel + .panel { margin-top: 0; }
.side-price { margin: 0 0 .25rem; font-size: 1.75rem; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.side-price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
@media (min-width: 900px) {
  .property-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  .property-side { position: sticky; top: 1rem; }
  .property-head .property-price { display: none; }
}
@media (max-width: 899px) { .side-price { display: none; } }
/* Phones: the price and the way to the cheapest ad, fixed to the bottom. */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .6rem max(16px, env(safe-area-inset-right, 0px)) calc(.6rem + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgb(16 24 20 / 8%);
}
.cta-bar-text { display: grid; min-width: 0; }
.cta-bar-text strong { font-size: 1.15rem; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cta-bar-text small { font-size: .8rem; font-weight: 500; color: var(--muted); }
.cta-bar-text span { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta-bar .button { flex: none; }
@media (max-width: 899px) { body:has(.cta-bar) { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); } }
@media (min-width: 900px) { .cta-bar { display: none; } }
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem 1rem; margin: 0; }
.specs dt { font-size: .8rem; color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; }
.features { margin-top: 1rem; }
.description { margin-top: 1rem; }
.map { height: 300px; border-radius: 8px; z-index: 0; }
.offer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.offer { border: 1px solid var(--line); border-radius: 10px; padding: .85rem; }
.offer-best { border-color: var(--brand); background: var(--brand-soft); }
.offer-row { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; }
.offer-agency { font-weight: 600; }
.offer-price { font-weight: 750; font-size: 1.1rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.offer-price small { font-weight: 500; color: var(--muted); font-size: .8rem; }
.offer p { margin: .25rem 0 .5rem; }

/* Agencies, prose */
.agency-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: start; }
.contact-list { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; }
.verified { color: var(--brand); font-weight: 600; }
.agency-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.agency-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .85rem 1rem; }
.claim { background: var(--brand-soft); border-radius: var(--radius); padding: 1rem 1.25rem; }
.prose { max-width: 72ch; margin-top: 1.25rem; }
.prose h2 { margin-top: 1.75rem; }
.prose li { margin-bottom: .35rem; }

/* Visitor accounts (D6): sign-in pages, Minha conta, favourites, alerts */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.header-account { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; color: var(--text); text-decoration: none; font-size: .95rem; font-weight: 600; }
.header-account:hover { color: var(--brand); }
.header-signin { padding: 0 .9rem; border-radius: 10px; background: var(--brand-soft); color: var(--brand-strong); }
.header-signin:hover { background: var(--line); color: var(--brand-strong); }
@media (max-width: 520px) { .header-account:not(.header-signin) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
@media (max-width: 340px) { .header-signin { padding: 0 .6rem; } }

.messages { margin-top: 1rem; }
.messages .notice { margin: 0 0 .5rem; }
.notice-info { background: var(--brand-soft); border: 1px solid var(--line); }
.notice-success { background: var(--ok-bg); border: 1px solid var(--ok-line); }
.notice-warning { background: var(--warn-bg); border: 1px solid var(--warn-line); }
.notice-error { background: var(--danger-soft); border: 1px solid var(--danger); }

.auth-page { padding-top: 1.5rem; }
.auth-page > * { max-width: 440px; margin-left: auto; margin-right: auto; }
.auth-manage > * { max-width: 560px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.25rem; box-shadow: var(--shadow); }
.auth-page form { margin-top: 1rem; margin-bottom: 1rem; }
.auth-card form { margin-left: 0; margin-right: 0; }
.form-stack { display: grid; gap: .85rem; }
.form-stack p { margin: 0; }
.field { display: grid; gap: .1rem; }
.field-check { grid-template-columns: auto 1fr; align-items: start; gap: .5rem; }
.field-check input { width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; accent-color: var(--brand); }
.field-check label { font-size: .925rem; }
.help { color: var(--muted); font-size: .825rem; }
.help ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.errorlist { list-style: none; margin: .2rem 0 0; padding: 0; color: var(--danger); font-size: .875rem; }
.or { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .875rem; margin: 1rem 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.provider-list { display: grid; gap: .5rem; }
.password-login { margin-top: 1.25rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.password-login summary { cursor: pointer; color: var(--brand); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.auth-switch { margin: 1.25rem 0 0; text-align: center; }
.back-link { margin: 0 auto 1rem; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
.button-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.button-row form { margin: 0; }
.button-col { flex-direction: column; align-items: stretch; }
.link-button { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; text-decoration: underline; cursor: pointer; }
.button-danger { background: var(--danger); color: #fff; }
.button-danger:hover { background: var(--danger); color: #fff; filter: brightness(.9); }
.button-danger-quiet { background: var(--danger-soft); color: var(--danger); }
.button-danger-quiet:hover { background: var(--danger); color: #fff; }
.auth-page table { width: 100%; border-collapse: collapse; }
.auth-page th, .auth-page td { text-align: left; padding: .4rem .25rem; border-bottom: 1px solid var(--line); }

/* Favourite heart: over the card photo, or labelled next to the property price */
.card { position: relative; }
.fav-form { margin: 0; }
.card > .fav-form { position: absolute; top: .5rem; right: .5rem; }
.fav, .property-share {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-width: 44px; min-height: 44px; padding: 0; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-weight: 600;
  box-shadow: var(--shadow);
}
.fav:hover { color: var(--accent); border-color: var(--accent); }
.fav.is-saved { color: var(--accent); }
.fav:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.fav-labelled { padding: 0 1rem; box-shadow: none; }
.fav-form.htmx-request .fav { opacity: .6; }
/* Share: the phone's share sheet, or the share panel below (js/cards.js),
   so it needs JavaScript. */
.share-button { position: relative; }
html:not(.js) .share-button { display: none; }
/* On the property page: round, like the heart beside it. */
.property-actions { display: flex; gap: .5rem; }
.property-share:hover { color: var(--brand); border-color: var(--brand); }
.property-share:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* On cards: it sits outside the card link (a button can't go inside one), placed over
   the price line: the photo is square, so the line starts one card width
   (100cqw) down, plus the body's top padding; centred on its 1.875rem line. */
.card { container-type: inline-size; }
.card-body .price { padding-right: 2rem; }
.card-share {
  position: absolute; right: .25rem; top: calc(100cqw - 1px + .85rem + .9375rem - 22px);
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: none; color: var(--muted);
}
.card-share:hover { color: var(--brand); }
.card-share:focus-visible { outline: 2px solid var(--brand); outline-offset: -4px; }
.property-head-side { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
/* The share panel (catalog/_share_dialog.html): the link and a copy button,
   then the networks. js/cards.js places it under the button that opened it. */
.share-dialog {
  position: absolute; inset: auto; margin: 0; padding: 0; width: min(26rem, 100vw - 2rem); max-width: none;
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text);
  box-shadow: 0 8px 32px rgb(16 24 20 / 18%);
}
.share-dialog::backdrop { background: transparent; }
.share-panel { display: grid; gap: 1rem; padding: 1rem; }
.share-link {
  display: flex; align-items: center; gap: .5rem; min-width: 0;
  padding: .25rem .25rem .25rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2);
}
.share-link input {
  flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: .9rem;
  text-overflow: ellipsis;
}
.share-link input:focus { outline: none; }
.share-link:focus-within { border-color: var(--brand); }
.share-copy-link {
  display: inline-flex; align-items: center; gap: .35rem; flex: none; min-height: 40px; padding: 0 1rem;
  border: 0; border-radius: 999px; background: var(--brand); color: #fff; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
}
.share-copy-link:hover { background: var(--brand-strong); }
.share-copy-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.share-copy-link .share-check, .share-copy-link .share-copy-done { display: none; }
.share-copy-link.is-copied { background: var(--brand-soft); color: var(--brand-strong); }
.share-copy-link.is-copied .share-check { display: block; }
.share-copy-link.is-copied .share-copy-done { display: inline; }
.share-copy-link.is-copied .share-copy-idle { display: none; }
.share-targets { display: grid; grid-template-columns: repeat(6, 1fr); gap: .25rem; margin: 0; padding: 0; list-style: none; }
.share-targets a {
  display: grid; justify-items: center; gap: .4rem; padding: .35rem 0; border-radius: 12px;
  color: var(--text); font-size: .75rem; text-decoration: none;
}
.share-mark {
  display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--surface-2); color: var(--mark, var(--text));
}
.share-targets a:hover .share-mark { background: var(--line); }
.share-targets a:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
@media (max-width: 380px) { .share-mark { width: 2.6rem; height: 2.6rem; } .share-targets a { font-size: .7rem; } }

/* Alerts box on category pages and on the favourites page */
.alert-box { display: grid; grid-template-columns: auto 1fr; gap: .5rem .75rem; align-items: center; background: var(--brand-soft); border-radius: var(--radius); padding: .85rem 1rem; margin: 0 0 1rem; color: var(--brand-strong); }
.alert-box p { margin: 0; color: var(--text); }
.alert-box .button { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 640px) { .alert-box { grid-template-columns: auto 1fr auto; } .alert-box .button { grid-column: auto; } }
/* Phones: one row, without the explanation, so the listings start higher. */
@media (max-width: 639px) {
  .alert-box { grid-template-columns: auto 1fr auto; padding: .5rem .5rem .5rem .85rem; }
  .alert-box p { font-size: .925rem; }
  .alert-box p .muted { display: none; }
  .alert-box .button { grid-column: auto; }
}

/* Minha conta */
.account-body { margin-top: 1.25rem; display: grid; gap: 1rem; }
.account-body .panel + .panel { margin-top: 0; }
.settings { display: grid; gap: 1rem; margin: 0 0 1rem; }
.settings dt { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.settings dd { margin: .1rem 0 0; }
.alert-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.alert-head { display: grid; gap: .15rem; margin-bottom: .75rem; }
.alert-paused { opacity: .7; }
.inline-form select { width: auto; }
.saved { height: 100%; display: flex; flex-direction: column; }
.saved-off .card-link { opacity: .6; }
.saved-note { margin: .4rem 0 0; font-size: .875rem; color: var(--muted); }
.saved-drop { color: var(--brand); font-weight: 600; }
.saved-gone { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1rem; display: grid; gap: .5rem; align-content: start; }
.saved-gone p { margin: 0; }
.narrow { max-width: 560px; }
/* Dark theme: quiet buttons keep light text. The rule above darkens every .button and its :is() list
   counts as (0,2,2) (from ".segmented input:checked + span"), hence the repeated class here. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .button.button-quiet.button-quiet { color: var(--brand-strong); }
  :root:not([data-theme="light"]) .button.button-quiet.button-quiet:hover { color: var(--text); }
  :root:not([data-theme="light"]) .button.button-danger-quiet.button-danger-quiet { color: var(--danger); }
}
:root[data-theme="dark"] .button.button-quiet.button-quiet { color: var(--brand-strong); }
:root[data-theme="dark"] .button.button-quiet.button-quiet:hover { color: var(--text); }
:root[data-theme="dark"] .button.button-danger-quiet.button-danger-quiet { color: var(--danger); }
.alert-box .button-quiet { background: var(--surface); }
.hp { position: relative; height: 0; overflow: hidden; }

/* Agency panel (/painel/, apps/sites, D22) */
.panel-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem 1rem; }
.panel-head h1 { margin: 0; }
.panel-head form { margin: 0; }
.panel-head select { width: auto; min-width: 220px; }
.tabs { flex-wrap: wrap; }
.tabs .count { display: inline-block; min-width: 1.4em; padding: 0 .35rem; margin-left: .25rem; border-radius: 999px; background: var(--danger); color: #fff; font-size: .75rem; text-align: center; }
.panel-body { margin-top: 1.25rem; margin-bottom: 3rem; }
/* Creating a site without staff (/painel/criar/): the numbered steps. */
.wizard-steps { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; list-style: none; padding: 0; margin: .75rem 0 0; }
.wizard-steps li { display: flex; align-items: center; color: var(--muted); font-weight: 600; font-size: .925rem; }
.wizard-steps a { display: flex; align-items: center; color: inherit; text-decoration: none; }
.wizard-steps a:hover { color: var(--brand); }
.wizard-number { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; margin-right: .4rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .8rem; }
.wizard-steps .done .wizard-number { background: var(--ok-bg); border-color: var(--ok-line); }
.wizard-steps [aria-current="step"] { color: var(--brand); }
.wizard-steps [aria-current="step"] .wizard-number { background: var(--brand); border-color: var(--brand); color: #fff; }
.panel h2 { margin-top: 0; font-size: 1.15rem; }
.panel textarea, .panel input[type="url"], .panel input[type="tel"] {
  width: 100%; min-height: 44px; padding: .5rem .65rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit;
}
.panel input[type="color"] { width: 64px; height: 44px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.panel input[type="file"] { font: inherit; max-width: 100%; }
.form-grid { display: grid; gap: .85rem 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid > .field { align-content: start; } /* a neighbour's help text doesn't stretch the input */
.field > label { font-weight: 600; font-size: .9rem; }
.checks { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; list-style: none; padding: 0; margin: .25rem 0 0; }
.checks div, .checks label { display: inline-flex; gap: .4rem; align-items: center; font-size: .925rem; font-weight: 400; }
.stats { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; text-decoration: none; color: var(--text); }
.stat strong { display: block; font-size: 1.6rem; }
.stat span { color: var(--muted); font-size: .875rem; }
.pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pill-ok { background: var(--ok-bg); border: 1px solid var(--ok-line); }
.pill-warn { background: var(--warn-bg); border: 1px solid var(--warn-line); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-muted { background: var(--surface-2); color: var(--muted); }
.panel-table { width: 100%; border-collapse: collapse; }
.panel-table th, .panel-table td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.panel-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.panel-table img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.panel-table .actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.panel-table .actions form { display: contents; }
.photo-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.photo-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-grid .button-row { padding: .5rem; }
.message-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.message-list li { border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; background: var(--surface); }
.message-list .unread { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.message-list p { margin: .35rem 0 0; white-space: pre-line; }
@media (max-width: 720px) {
  .panel-table thead { display: none; }
  .panel-table tr { display: grid; grid-template-columns: 72px 1fr; gap: .25rem .75rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
  .panel-table td { border: 0; padding: 0; }
  .panel-table td:first-child { grid-row: span 4; }
}
/* Compact buttons, for actions inside a table row (the panel's listing table). */
.button.button-compact { min-height: 36px; padding: .3rem .75rem; font-size: .875rem; }
.panel-table .nowrap { white-space: nowrap; }
.field-check > .help, .field-check > .errorlist { grid-column: 2; }
.panel input[type="file"] { width: 100%; }
.form-grid .help { overflow-wrap: anywhere; }
/* Image fields in the panel (ImageThumbInput): the current image as a thumbnail. */
.image-input { display: grid; gap: .5rem; }
.image-current { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.image-current a { display: block; line-height: 0; }
.image-thumb { width: 96px; height: 72px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); }
.image-thumb-wide { width: 160px; height: 72px; object-fit: cover; }
.image-thumb-round { width: 72px; height: 72px; object-fit: cover; border-radius: 999px; }
.image-clear { display: inline-flex; align-items: center; gap: .35rem; font-size: .9rem; font-weight: 400; }
/* The website's look in the panel and at sign-up (sites/widgets/theme_picker.html,
   palettes.html, js/site-look.js): theme cards drawn in the chosen colours, and
   ready-made colour pairs. --p and --a are the two colours. */
.theme-picker { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.theme-card { position: relative; display: grid; gap: .2rem; align-content: start; padding: .6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; font-weight: 400; }
.theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.theme-card:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.theme-card:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.theme-card strong { font-size: .95rem; margin-top: .3rem; }
.theme-card small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.theme-mini { --p: #2f5d1e; --a: #efe3c4; position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: #f4f5f3; border: 1px solid var(--line); }
.theme-mini i { position: absolute; display: block; }
/* Campo: coloured header, banner with the search box, category buttons, cards. */
.theme-mini-campo i:nth-child(1) { inset: 0 0 auto; height: 12%; background: var(--p); }
.theme-mini-campo i:nth-child(2) { left: 0; right: 0; top: 12%; height: 46%; background: color-mix(in srgb, var(--p) 78%, #fff); }
.theme-mini-campo i:nth-child(3) { left: 22%; right: 22%; top: 28%; height: 12%; background: #fff; border-radius: 2px; }
.theme-mini-campo i:nth-child(4) { left: 22%; right: 22%; top: 45%; height: 7%; background: repeating-linear-gradient(90deg, var(--a) 0 30%, transparent 30% 35%); }
.theme-mini-campo i:nth-child(5) { left: 8%; right: 8%; top: 66%; height: 24%; background: repeating-linear-gradient(90deg, #fff 0 23%, transparent 23% 25.66%); box-shadow: 0 1px 2px rgb(0 0 0 / 12%); }
.theme-mini-campo i:nth-child(6) { inset: auto 0 0; height: 5%; background: var(--p); }
/* Conceito: white header, banner split by a diagonal, plain cards, dark footer. */
.theme-mini-conceito { background: #fff; }
.theme-mini-conceito i:nth-child(1) { left: 36%; right: 36%; top: 4%; height: 5%; background: repeating-linear-gradient(90deg, #555 0 14%, transparent 14% 22%); opacity: .5; }
.theme-mini-conceito i:nth-child(2) { left: 0; right: 0; top: 13%; height: 40%; background: var(--p); }
.theme-mini-conceito i:nth-child(3) { left: 48%; right: 0; top: 13%; height: 40%; background: linear-gradient(135deg, #c9bfae, #8e9aa3); clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%); }
.theme-mini-conceito i:nth-child(4) { left: 10%; width: 26%; top: 27%; height: 9%; background: color-mix(in srgb, var(--p) 20%, #fff); border-radius: 1px; }
.theme-mini-conceito i:nth-child(5) { left: 8%; right: 8%; top: 62%; height: 22%; background: repeating-linear-gradient(90deg, #d9dcdf 0 23%, transparent 23% 25.66%); }
.theme-mini-conceito i:nth-child(6) { left: 8%; right: 8%; top: 87%; height: 4%; background: repeating-linear-gradient(90deg, var(--a) 0 10%, transparent 10% 25.66%); }
/* Horizonte: tall header with the name in the middle, wide banner, labelled cards. */
.theme-mini-horizonte i:nth-child(1) { inset: 0 0 auto; height: 20%; background: var(--p); }
.theme-mini-horizonte i:nth-child(2) { left: 42%; right: 42%; top: 6%; height: 7%; background: var(--a); border-radius: 1px; }
.theme-mini-horizonte i:nth-child(3) { left: 0; right: 0; top: 20%; height: 32%; background: linear-gradient(90deg, #c9bfae, color-mix(in srgb, var(--p) 85%, #000)); }
.theme-mini-horizonte i:nth-child(4) { left: 8%; right: 8%; top: 60%; height: 4%; background: repeating-linear-gradient(90deg, var(--p) 0 23%, transparent 23% 25.66%); }
.theme-mini-horizonte i:nth-child(5) { left: 8%; right: 8%; top: 64%; height: 22%; background: repeating-linear-gradient(90deg, #fff 0 23%, transparent 23% 25.66%); box-shadow: 0 1px 2px rgb(0 0 0 / 12%); }
.theme-mini-horizonte i:nth-child(6) { left: 10%; right: 10%; top: 78%; height: 3%; background: repeating-linear-gradient(90deg, var(--a) 0 9%, transparent 9% 25.66%); }
/* Vitrine: a white pennant over the banner photo, the search in one row, rows of cards. */
.theme-mini-vitrine { background: #fff; }
.theme-mini-vitrine i:nth-child(1) { inset: 0 0 auto; height: 58%; background: linear-gradient(rgb(0 0 0 / 35%), rgb(0 0 0 / 35%)), linear-gradient(135deg, #b9b2a5, #6f7a80); }
.theme-mini-vitrine i:nth-child(2) { left: 8%; width: 12%; top: 0; height: 22%; background: #fff; clip-path: polygon(0 0, 100% 0, 100% 75%, 50% 100%, 0 75%); }
.theme-mini-vitrine i:nth-child(3) { right: 8%; width: 12%; top: 7%; height: 7%; background: var(--p); }
.theme-mini-vitrine i:nth-child(4) { left: 12%; right: 12%; top: 34%; height: 9%; background: linear-gradient(90deg, #fff 0 78%, transparent 78% 80%, var(--p) 80%); }
.theme-mini-vitrine i:nth-child(5) { left: 8%; right: 8%; top: 66%; height: 26%; background: repeating-linear-gradient(90deg, #eceae6 0 31%, transparent 31% 34.5%); }
.theme-mini-vitrine i:nth-child(6) { left: 44%; width: 12%; top: 61%; height: 2%; background: var(--p); }
.palette-label { font-weight: 600; font-size: .9rem; }
.palettes { display: flex; flex-wrap: wrap; gap: .5rem; }
.palettes[hidden] { display: none; }
html .palette { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: .3rem .75rem .3rem .35rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .875rem; cursor: pointer; }
html .palette:hover { border-color: var(--brand); }
html .palette[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--brand-soft); font-weight: 600; }
.palette-swatch { width: 30px; height: 30px; border-radius: 999px; background: linear-gradient(135deg, var(--p) 0 50%, var(--a) 50% 100%); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 12%); flex: none; }
