/* Styles for the server-rendered pages (lib/seo.mjs): same tokens as the app (index.html). */
:root {
  --bg: #f4f2ee; --panel: #ffffff; --panel-2: #faf9f7; --ink: #191a1c; --ink-2: #44464b; --muted: #7a7c82;
  --line: #e6e3dd; --accent: #1d5b8c; --accent-ink: #ffffff; --accent-soft: #e6eef6;
  --good: #1f7a4d; --good-soft: #e3f3ea; --warn: #b26a00; --warn-soft: #fbf0dc; --bad: #b42a2a; --bad-soft: #f9e4e4;
  --slate: #59606b; --slate-soft: #eceef1; --shadow: 0 1px 2px rgba(20, 20, 30, .05), 0 4px 16px rgba(20, 20, 30, .06);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121315; --panel: #1b1c1f; --panel-2: #202125; --ink: #eceae6; --ink-2: #c5c3be; --muted: #8f9096;
    --line: #2e2f33; --accent: #6aaee0; --accent-ink: #0d1a24; --accent-soft: #1d2a35;
    --good: #5cc98f; --good-soft: #17291f; --warn: #e8a64a; --warn-soft: #2d2415; --bad: #ef7d7d; --bad-soft: #2f1a1a;
    --slate: #a9b0bb; --slate-soft: #26292e; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.fine { font-size: 12.5px; color: var(--muted); }

.top { background: var(--panel); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand .logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); }
.brand b { display: block; font-size: 17px; }
.brand small { display: block; font-size: 12px; color: var(--muted); }
.top nav { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.top nav:not(.guides) a:not(.btn) { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.crumbs { font-size: 13px; color: var(--muted); margin: 18px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.crumbs .sep { opacity: .6; }
h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.15; margin: 6px 0 10px; letter-spacing: -.01em; }
h2 { font-size: 21px; margin: 34px 0 12px; }
.lead { font-size: 16.5px; color: var(--ink-2); max-width: 820px; margin: 0 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.chips span { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; }
.cta { margin: 28px 0; }
.more { margin: 14px 0 0; font-weight: 600; }
/* "Avisar-me de novas casas em …": email-alert sign-up on distrito, concelho and listing pages */
.alertbox { background: var(--accent-soft); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 16px 0 20px; max-width: 820px; }
.alertbox p { margin: 0; color: var(--ink-2); }
.alertbox .ab-go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; }
.alertbox .ab-go a:not(.btn) { font-weight: 600; font-size: 14px; }
/* the ready-made alert form (lib/alertform.mjs) */
form.alertform { display: grid; gap: 10px; }
form.alertform .ab-title { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 15.5px; }
form.alertform .ab-title svg { flex: none; color: var(--accent); }
form.alertform .ab-error { color: var(--bad, #b42a2a); font-weight: 600; }
form.alertform .ab-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
form.alertform label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
form.alertform select, form.alertform input[type=email] { font: inherit; font-size: 16px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); width: 100%; min-width: 0; }
form.alertform .ab-row { display: flex; gap: 8px; }
form.alertform .ab-row .btn { flex: none; font-size: 15px; padding: 10px 18px; cursor: pointer; }
form.alertform label.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; font-size: 12.5px; color: var(--ink-2); }
form.alertform label.check input { margin-top: 2px; flex: none; }
form.alertform .fine { margin: 0; }
form.alertform .hp { position: absolute; left: -9999px; }
.notice { background: var(--accent-soft); border-radius: 10px; padding: 10px 14px; }
.empty { padding: 30px; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); }

.places { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.places.small { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.places a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.places a:hover { border-color: var(--accent); }
.places.small a { padding: 9px 12px; }
.places span { font-size: 12.5px; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.card:hover { border-color: var(--accent); }
.card .ph { position: relative; aspect-ratio: 16 / 10; background: var(--slate-soft); display: grid; place-items: center; color: var(--muted); }
.card .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card .ph .badge { position: absolute; left: 10px; top: 10px; }
.card .ph .tag { position: absolute; right: 10px; top: 10px; }
.cb { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cb h3 { font-size: 15.5px; margin: 0; line-height: 1.3; }
.cb .loc { font-size: 13px; color: var(--muted); }
.cb .price { font-size: 20px; font-weight: 800; margin-top: auto; }
.cb .price small { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.specs { display: flex; flex-wrap: wrap; gap: 5px; }
.specs span { font-size: 12px; background: var(--slate-soft); color: var(--slate); border-radius: 7px; padding: 2px 8px; }
.badge { display: inline-block; background: var(--good); color: #fff; font-weight: 800; font-size: 13px; border-radius: 8px; padding: 3px 9px; }
.tag { display: inline-block; background: rgba(255, 255, 255, .92); color: #191a1c; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 3px 9px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags .tag { background: var(--accent-soft); color: var(--accent); }
.tags .tag.soft { background: var(--slate-soft); color: var(--slate); }
.tags .tag.bad { background: var(--bad-soft); color: var(--bad); }
.tags .tag.warn { background: var(--warn-soft); color: var(--warn); }

.ends { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); align-self: flex-start; }
.ends svg { flex: none; }
.ends .when { font-weight: 500; opacity: .8; }
.ends.week { background: var(--warn-soft); color: var(--warn); }
.ends.soon { background: var(--bad-soft); color: var(--bad); }
.ends.over { background: var(--slate-soft); color: var(--slate); }

.listing { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.gallery .main { display: block; border-radius: var(--radius); overflow: hidden; background: var(--slate-soft); aspect-ratio: 4 / 3; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .main.empty { display: grid; place-items: center; color: var(--muted); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; margin-top: 6px; }
.thumbs a { aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--slate-soft); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.loc { display: flex; align-items: center; gap: 6px; color: var(--muted); margin: 0 0 12px; }
.warnline { color: var(--warn); font-size: 14px; }
.mkt { font-size: 14px; color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.facts { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts th, .facts td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.facts th { width: 170px; color: var(--muted); font-weight: 500; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.prose { max-width: 820px; }
.prose h3 { font-size: 16.5px; margin: 20px 0 4px; }
.prose p { margin: 0 0 10px; color: var(--ink-2); }

.foot { margin-top: 50px; background: var(--panel); border-top: 1px solid var(--line); padding: 26px 0 34px; font-size: 13.5px; }
.foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.foot h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.foot .links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 16px; }
.foot .links a { color: var(--ink-2); text-decoration: none; }
.foot .links a:hover { color: var(--accent); }

@media (max-width: 760px) {
  .listing { grid-template-columns: minmax(0, 1fr); } /* minmax: a 1fr column would grow to the thumbnail strip and widen the page */
  .foot .wrap { grid-template-columns: 1fr; }
  .top nav:not(.guides) a:not(.btn) { display: none; }
  .facts th { width: 120px; }
  .grid { grid-template-columns: 1fr; }
}

/* guide pages (lib/guides.mjs) */
.toc { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 10px 0 6px; }
.toc a { padding: 6px 11px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 13.5px; text-decoration: none; color: var(--ink-2); }
.toc a:hover { border-color: var(--accent); color: var(--accent); }
.channel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px 14px; margin: 16px 0; max-width: 860px; }
.channel h2 { margin: 16px 0 6px; }
.channel p { margin: 8px 0; color: var(--ink-2); }
.count { display: inline-block; font-size: 13.5px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 3px 11px; }
.count.soon { background: var(--slate-soft); color: var(--slate); }
.sites { margin: 8px 0 0; padding-left: 20px; columns: 2 240px; }
.sites li { margin: 3px 0; }

/* barómetro (lib/barometro.mjs) */
.chart { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; max-width: 760px; }
.chart svg { max-width: 100%; height: auto; }
.b-ink { fill: var(--ink); } .b-muted { fill: var(--muted); } .b-good { fill: var(--accent); } .b-bad { fill: var(--bad); } .b-axis { stroke: var(--line); }
table.baro { max-width: 760px; }
table.baro th { text-align: left; }
table.baro td:not(:first-child), table.baro th:not(:first-child) { text-align: right; white-space: nowrap; }
pre.embed { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-size: 12.5px; max-width: 760px; white-space: pre-wrap; word-break: break-all; }

/* simulador de custos (lib/simulador.mjs) */
form.sim { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; max-width: 860px; }
form.sim label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
form.sim label.check { flex-direction: row; align-items: flex-start; gap: 8px; grid-column: 1 / -1; font-weight: 400; }
form.sim input[type=number], form.sim select { font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: var(--ink); }
form.sim small, .sim-result small, .costs small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; }
table.sim-result, .costs table { max-width: 860px; }
table.sim-result td, .costs td { text-align: right; white-space: nowrap; }
table.sim-result th { width: auto; }
table.sim-result tfoot th, table.sim-result tfoot td { font-weight: 700; color: var(--ink); border-top: 2px solid var(--line); }
form.sim [hidden] { display: none; }

/* /contacto (serve.mjs) */
form.contact { display: grid; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; max-width: 640px; margin: 4px 0 24px; }
form.contact label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
form.contact label small { font-weight: 400; font-size: 12px; color: var(--muted); }
form.contact input, form.contact select, form.contact textarea { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: var(--ink); width: 100%; }
form.contact textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
form.contact .btn { justify-self: start; font-size: 15px; padding: 11px 18px; cursor: pointer; }
form.contact .fine { margin: 0; }
form.contact .hp { position: absolute; left: -9999px; }
.form-error { max-width: 640px; padding: 12px 14px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); font-weight: 500; }

/* leilões mais licitados (lib/semana.mjs) */
ol.ranking { list-style: none; padding: 0; margin: 14px 0; max-width: 860px; counter-reset: rank; }
.rank-item { display: grid; grid-template-columns: 180px 1fr; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 10px 0; position: relative; }
.rank-item::before { counter-increment: rank; content: counter(rank); position: absolute; top: 8px; left: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 800; border-radius: 999px; min-width: 28px; height: 28px; display: grid; place-items: center; font-size: 14px; }
.rank-item img { width: 180px; height: 130px; object-fit: cover; border-radius: 10px; background: var(--slate-soft); }
.rank-item h3 { margin: 2px 0 4px; font-size: 17px; }
.rank-item p { margin: 4px 0; }
.rank-item .closed { color: var(--good); }
.follow { font-size: 14px; }
@media (max-width: 560px) { .rank-item { grid-template-columns: 1fr; } .rank-item img { width: 100%; height: 180px; } }
ul.sim-notes { max-width: 860px; margin: 10px 0 0; padding-left: 20px; font-size: 13.5px; color: var(--ink-2); }
ul.sim-notes li { margin: 4px 0; }

/* charts (lib/charts.mjs): diverging blue (below the market) / orange (above), gray = de-emphasis; validated pairs */
:root { --c-pos: #1d5b8c; --c-neg: #c2410c; --c-mute: #c9c6bf; --c-grid: #e6e3dd; }
@media (prefers-color-scheme: dark) { :root { --c-pos: #4f92c8; --c-neg: #d9733a; --c-mute: #55575d; --c-grid: #2e2f33; } }
.c-pos { fill: var(--c-pos); } .c-neg { fill: var(--c-neg); } .c-mute { fill: var(--c-mute); } .c-surface { fill: var(--panel); }
.c-ink { fill: var(--ink); } .c-ink2 { fill: var(--ink-2); } .c-muted { fill: var(--muted); }
.s-grid { stroke: var(--c-grid); } .s-pos { stroke: var(--c-pos); } .s-mute { stroke: var(--muted); }
.chart svg g:hover path, .chart svg g:hover circle { opacity: .82; }
.chart h3 { margin: 0 0 4px; font-size: 15px; }
.chart .sub { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 16px; max-width: 1160px; }
.charts .chart { max-width: none; }

/* stat tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 18px 0 8px; max-width: 1160px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi-value { font-size: 30px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); line-height: 1.15; }
.kpi-sub { font-size: 12.5px; color: var(--ink-2); }
.kpi-delta { font-size: 12.5px; color: var(--muted); }
.kpi .spark { margin-top: 6px; }
details.numbers { margin: 16px 0; max-width: 860px; }
details.numbers summary { cursor: pointer; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
details.numbers table { margin-bottom: 14px; }
@media (max-width: 520px) { .charts .chart { overflow-x: auto; padding: 12px; } .charts .chart svg { min-width: 440px; } }

/* guides strip under the header: pill buttons (lib/seo.mjs guidePills) */
.top .wrap.guides { justify-content: flex-start; flex-wrap: nowrap; gap: 8px; padding-top: 0; padding-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.top .wrap.guides::-webkit-scrollbar { display: none; }
.guide-pill { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 7px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13.5px; font-weight: 600; text-decoration: none; transition: background .15s, color .15s; }
.guide-pill:hover, .guide-pill[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
/* long URLs shown as link text (e.g. the CITIUS address) wrap instead of widening the page on phones */
main p a { overflow-wrap: anywhere; }
/* share buttons (lib/share.mjs): "Partilhar" only where the browser can share, and the main button on touch screens */
.share { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.share .btn { font-size: 13.5px; padding: 7px 12px; gap: 6px; cursor: pointer; }
.share [data-s="partilha"] { display: none; }
.can-share .share [data-s="partilha"] { display: inline-flex; }
.can-share.coarse .share [data-s="partilha"] { order: -1; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Listing gallery: arrows + counter on the main photo, thumbnails switch it, full-screen slideshow (lib/seo.mjs GALLERY_JS) */
.gallery .stage { position: relative; }
.gallery .main { cursor: zoom-in; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: #191a1c; font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); display: grid; place-items: center; padding: 0 0 3px; }
.g-arrow.l { left: 10px; } .g-arrow.r { right: 10px; }
.g-count { position: absolute; right: 10px; bottom: 10px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 3px 10px; }
.thumbs a { cursor: pointer; outline: 2px solid transparent; outline-offset: -2px; }
.thumbs a.on { outline-color: var(--accent); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: #0b0b0d; display: grid; place-items: center; touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lightbox .g-arrow { position: fixed; background: rgba(255, 255, 255, .15); color: #fff; box-shadow: none; }
.lightbox .g-count { position: fixed; left: 50%; right: auto; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); }
.lb-x { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 20px; cursor: pointer; }
/* thumbnails: one scrollable row (it follows the current photo), so a 14-photo gallery doesn't push the page down */
.thumbs { display: flex; overflow-x: auto; scrollbar-width: thin; gap: 6px; scroll-behavior: smooth; padding-bottom: 4px; }
.thumbs a { flex: 0 0 92px; }
@media (max-width: 760px) {
  .thumbs { scrollbar-width: none; }
  .thumbs::-webkit-scrollbar { display: none; }
  .thumbs a { flex: 0 0 84px; }
}
.gallery { min-width: 0; }

/* Header search button: keeps the page's place (lib/seo.mjs appLink); a full-width row on phones */
.top .app-link svg { flex: none; }
/* Listing pages on phones: price, discount and deadline above the photos (.quick), and a bar at the bottom of the
   screen with the price and the official link (.buybar). Hidden on wider screens, where the info sits beside the photos. */
.quick, .buybar { display: none; }
@media (max-width: 760px) {
  .top nav:not(.guides) { width: 100%; }
  .brand small { display: none; } /* the tagline wraps to two lines on phones; each page's heading says what it is */
  .top nav:not(.guides) .app-link { flex: 1; justify-content: center; padding: 11px 14px; font-size: 15px; }
  /* breadcrumbs: the current page is the heading right below, so one line instead of two */
  .crumbs [aria-current], .crumbs .sep:has(+ [aria-current]) { display: none; }
  .quick { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 12px; margin: 4px 0 10px; }
  .q-row { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; width: 100%; }
  .q-price small { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
  .q-price b { font-size: 24px; font-weight: 800; line-height: 1.15; }
  .gallery .main { aspect-ratio: 16 / 10; }
  .buybar { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .08); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .bb-price { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
  .bb-price b { font-size: 17px; font-weight: 800; white-space: nowrap; }
  .bb-price span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
  .bb-price .week { color: var(--warn); } .bb-price .soon { color: var(--bad); }
  .buybar .btn { flex: none; padding: 11px 14px; }
  body:has(.buybar) .foot { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
}
/* short lists of links in the page body (distrito "Por tipo de venda" examples, links between the type pages) */
.linklist { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 4px 0 16px; }

/* hub (/casas-penhoradas): number tiles per way of selling, buying-guide cards, FAQ accordion */
.ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); flex: none; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0 12px; }
.stat-tile { display: flex; flex-direction: column; gap: 1px; padding: 14px 16px 15px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.stat-tile:hover { border-color: var(--accent); }
.stat-tile .ic { margin-bottom: 10px; }
.stat-tile b { font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-tile .t { font-weight: 600; font-size: 14.5px; margin-top: 2px; }
.stat-tile .s { font-size: 12.5px; color: var(--muted); }
.section-sub { color: var(--muted); margin: -4px 0 16px; max-width: 720px; }
.how-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.how-card { display: flex; flex-direction: column; align-items: flex-start; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.how-card h3 { font-size: 16.5px; margin: 12px 0 6px; }
.how-card p { margin: 0 0 14px; color: var(--ink-2); font-size: 14.5px; }
.how-card .more-link { margin-top: auto; font-weight: 600; font-size: 14px; text-decoration: none; }
.how-card .more-link:hover { text-decoration: underline; }
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px 40px; align-items: start; margin-top: 44px; }
.faq h2 { margin-top: 0; }
.faq-head { position: sticky; top: 16px; }
.faq-head .section-sub { margin: 0 0 10px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; cursor: pointer; list-style: none; font-weight: 600; font-size: 15.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 18px; font-weight: 700; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--accent); }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--ink-2); }
@media (max-width: 760px) {
  .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-tile b { font-size: 24px; }
  .how-grid, .faq { grid-template-columns: 1fr; }
  .faq-head { position: static; }
}

/* photos that failed to load even through the proxy (IMG_JS in lib/seo.mjs): hidden, so the placeholder shows */
img.img-broken { display: none !important; } /* beats .gallery .main img { display: block } */
.thumbs a.img-broken { display: none; }
.gallery .stage.img-broken .main { display: grid; place-items: center; }
.gallery .stage.img-broken .main::after { content: ""; width: 56px; height: 56px; background: var(--muted); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3C/svg%3E") center / contain no-repeat; }

/* listing page: the photos and the summary on top; then a main column (Descrição, Detalhes, costs) and a side column
   that stays in view (email alert, how this kind of sale works); similar listings at the bottom. One column on phones. */
.l-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; margin-top: 30px; }
.l-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.l-side { min-width: 0; }
.l-sticky { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
.l-side .alertbox { margin: 0; }
.l-side .how-card { padding: 16px 18px; }
.l-side .how-card p { font-size: 14px; }
.l-card, .desc-card, .cost-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.l-card { padding: 6px 24px 14px; }
.l-card h2, .l-main .desc-card h2, .l-main .cost-card h2 { font-size: 20px; margin: 16px 0 12px; }
.l-main .desc-card { max-width: none; margin-top: 0; }
.l-main .cost-card { padding: 6px 24px 18px; }
/* Detalhes: one card, the three groups in balanced columns */
.facts-cols { columns: 2 260px; column-gap: 32px; }
.fact-group { break-inside: avoid; margin-bottom: 14px; }
.fact-group h3 { display: flex; align-items: center; gap: 10px; font-size: 15px; margin: 4px 0 6px; }
.fact-group h3 .ic { width: 28px; height: 28px; border-radius: 8px; }
.fact-group dl { margin: 0; }
.fact-group dl > div { display: grid; grid-template-columns: minmax(96px, 40%) 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.fact-group dl > div:first-child { border-top: 0; }
.fact-group dt { color: var(--muted); font-size: 13.5px; }
.fact-group dd { margin: 0; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.fact-group dd small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.fact-group .more-link { display: inline-block; margin: 4px 0 4px; }
/* Listing header: the title bar (.l-head) over the photos and the price card (.pcard) beside them */
.l-head { margin: 4px 0 18px; }
.l-head .tags { margin-bottom: 10px; }
.l-head h1 { font-size: clamp(25px, 3vw, 32px); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 6px; max-width: 920px; }
.l-head .subtitle { margin: 0 0 6px; color: var(--ink-2); max-width: 920px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; } /* some portals' titles are a whole paragraph */
.l-head .loc { margin: 0; color: var(--ink-2); font-size: 15px; }
.l-head .loc svg { color: var(--muted); flex: none; }
.l-keys { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 14px 0 0; }
.l-keys li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px 6px 11px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; }
.l-keys svg { color: var(--accent); flex: none; }
.pcard { display: flex; flex-direction: column; gap: 16px; min-width: 0; align-self: start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px 18px; }
.pc-top small { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pc-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-top: 2px; }
.pc-price b { font-size: 36px; line-height: 1.1; font-weight: 800; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.pc-price span { color: var(--muted); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.pc-top .badge { margin-top: 10px; }
/* vs. the market: verdict, bar (tick = the local median), source */
.pcard .mkt { display: flex; flex-direction: column; gap: 8px; padding: 13px 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px; font-size: 13.5px; color: var(--ink-2); }
.pcard .mkt.muted { color: var(--muted); }
.mkt-head { font-size: 15px; color: var(--ink); }
.mkt-head b { color: var(--good); font-weight: 800; }
.mkt-head b.over { color: var(--warn); }
.mkt-src { font-size: 12.5px; color: var(--muted); }
.mkt-src b { color: var(--ink-2); font-weight: 600; }
.mkt-note { font-size: 12.5px; color: var(--ink-2); }
.pcard .conf { font-size: 11px; background: var(--slate-soft); color: var(--slate); border-radius: 99px; padding: 1px 7px; white-space: nowrap; }
.pbar { position: relative; height: 7px; background: var(--slate-soft); border-radius: 99px; }
.pbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--good); }
.pbar i.over { background: var(--warn); }
.pbar .tick { position: absolute; top: -3px; bottom: -3px; left: 66.7%; width: 2px; background: var(--ink-2); border-radius: 1px; }
/* the sale's numbers: label left, value right */
.pc-facts { margin: 0; }
.pc-facts > div { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pc-facts > div:first-child { border-top: 1px solid var(--line); }
.pc-facts dt { color: var(--muted); font-size: 14px; }
.pc-facts dd { margin: 0; text-align: right; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.pc-facts dd small { display: block; font-weight: 500; font-size: 12px; color: var(--warn); }
.pc-facts .ends { font-size: 13px; }
.pc-facts .cond { color: var(--warn); }
.pcard .warnline { margin: 0; }
.pc-actions { display: flex; flex-direction: column; gap: 8px; }
.pc-actions .btn { justify-content: center; padding: 13px 16px; font-size: 15px; border-radius: 11px; }
.pc-actions .btn.primary { box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 30%, transparent); }
.pc-actions .btn:not(.primary) svg { color: var(--accent); }
.pcard .fine { margin: -4px 0 0; }
.pcard .share { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); gap: 6px; }
.pcard .share .btn { flex: 1 1 0; min-width: 0; justify-content: center; white-space: nowrap; font-size: 13px; padding: 7px 6px; background: transparent; color: var(--ink-2); }
.pcard .share .btn:hover { border-color: var(--accent); color: var(--accent); }
/* where the browser can share, its "Partilhar" gets the first row and the three links share the second */
.can-share .pcard .share [data-s="partilha"] { order: -1; flex-basis: 100%; }
.can-share.coarse .pcard .share [data-s="partilha"] { background: transparent; border-color: var(--line); color: var(--ink-2); }
@media (max-width: 760px) {
  .l-head { margin: 0 0 12px; }
  .l-head h1 { font-size: 23px; }
  .l-head .loc { font-size: 14px; }
  .l-keys { gap: 6px; margin-top: 12px; }
  .l-keys li { font-size: 13px; gap: 6px; padding: 5px 10px 5px 8px; }
  .l-keys svg { width: 14px; height: 14px; }
  .pcard { padding: 16px; gap: 14px; }
  .pcard .share .btn { font-size: 12.5px; gap: 5px; }
  .pcard .pc-top, .pc-facts .pc-ends { display: none; } /* price and deadline: in .quick and in the bar at the bottom */
}
@media (max-width: 900px) {
  .l-body { grid-template-columns: minmax(0, 1fr); }
  .l-sticky { position: static; }
}
.l-similar { margin-top: 34px; }
@media (max-width: 760px) {
  .l-card, .l-main .cost-card { padding: 4px 16px 12px; }
  .facts-cols { columns: 1; }
  .l-similar .card:nth-child(n+5) { display: none; } /* 4 on phones: 8 stacked cards are a very long scroll */
  #predio .card:nth-child(n+5) { display: flex; } /* "No mesmo prédio" shows every one it counts */
}
.more-link { font-weight: 600; font-size: 14px; text-decoration: none; }
.more-link:hover { text-decoration: underline; }
.desc-card { max-width: 860px; margin-top: 34px; padding: 6px 26px 18px; }
.desc-card h2 { margin: 18px 0 10px; }
.desc-card p { color: var(--ink-2); font-size: 15px; line-height: 1.7; margin: 0 0 12px; }
.desc-card ul { margin: 0 0 14px; padding-left: 20px; color: var(--ink-2); line-height: 1.6; }
.desc-card li { margin: 3px 0; }
.desc-card li::marker { color: var(--accent); }
.desc-card .fine { margin: 10px 0 0; }
details.legal { margin: 14px 0 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
details.legal summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 14px; color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 8px; }
details.legal summary::-webkit-details-marker { display: none; }
details.legal summary::before { content: "›"; display: inline-block; font-size: 18px; line-height: 1; color: var(--muted); transition: transform .15s; }
details.legal[open] summary::before { transform: rotate(90deg); }
details.legal p { font-size: 13.5px; line-height: 1.6; color: var(--muted); padding: 0 14px; margin: 0 0 10px; }
.buy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; align-items: start; margin-top: 34px; }
.buy-grid h2 { margin-top: 0; }
.cost-card { padding: 18px 20px; }
.cost-card h2 { font-size: 19px; margin: 0 0 12px; }
.cost-total { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.cost-total small { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cost-total b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 2px 0; }
.cost-total span { font-size: 13px; color: var(--ink-2); }
table.cost-lines { width: 100%; border-collapse: collapse; }
.cost-lines th, .cost-lines td { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.cost-lines th { text-align: left; font-weight: 500; color: var(--ink-2); padding-right: 16px; }
.cost-lines td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.cost-lines tr.sum th, .cost-lines tr.sum td { border-bottom: 0; color: var(--ink); font-weight: 700; }
.cost-alt { font-size: 13.5px; color: var(--ink-2); background: var(--panel-2); border-radius: 10px; padding: 9px 12px; margin: 6px 0 10px; }
.cost-card .fine { margin: 6px 0 10px; }
@media (max-width: 760px) {
  .desc-card { padding: 4px 16px 14px; }
  .buy-grid { grid-template-columns: 1fr; }
  .cost-total b { font-size: 24px; }
}
.desc-card p.fine { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.desc-card p.d-h { font-weight: 700; color: var(--ink); margin: 18px 0 6px; line-height: 1.4; }
.desc-card p.d-more { font-style: italic; color: var(--muted); }

/* barómetro breakdowns: results by kind of sale/property, what is for sale today (lib/barometro.mjs) */
table.baro.wide { max-width: 980px; }
table.baro.wide th { width: auto; white-space: nowrap; }
table.baro td .n { color: var(--muted); font-size: 12.5px; }
table.baro td.pct { white-space: nowrap; }
table.baro td.pct .bar { display: inline-block; width: 54px; height: 6px; margin-right: 8px; vertical-align: middle; border-radius: 3px; background: var(--line); overflow: hidden; }
table.baro td.pct .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
table.baro tr.home td:first-child { font-weight: 600; }
table.baro tr.total td { border-top: 2px solid var(--line); font-weight: 600; }
table.baro .muted { color: var(--muted); }
.scroll { overflow-x: auto; max-width: 100%; }
.scroll > table { margin-bottom: 14px; }
h2 + p.sub, h3 + p.sub { margin: -4px 0 10px; font-size: 13.5px; color: var(--muted); max-width: 820px; }

/* barómetro: the last full month, early in a month (lib/barometro.mjs) */
.lastmonth { max-width: 1160px; margin: 14px 0 6px; padding: 14px 18px 12px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.lastmonth .lm-label { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.lastmonth .lm-figs { display: grid; gap: 10px 24px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.lastmonth .lm-figs b { display: block; font-size: 30px; line-height: 1.1; font-weight: 750; letter-spacing: -.01em; color: var(--ink); }
.lastmonth .lm-figs span { display: block; margin-top: 3px; font-size: 13px; color: var(--ink-2); }
.lastmonth .lm-more { margin: 10px 0 0; font-size: 14px; font-weight: 600; }

/* barómetro: every distrito, opening to its concelhos (lib/barometro.mjs regions) */
.rg-table { min-width: 760px; max-width: 1160px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rg-row { display: grid; grid-template-columns: minmax(150px, 1.5fr) repeat(6, minmax(86px, 1fr)); gap: 0 10px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.rg-head { border-top: 0; font-size: 12px; color: var(--muted); font-weight: 500; background: var(--panel-2); }
.rg-c { text-align: right; white-space: nowrap; }
.rg-head .rg-c { white-space: normal; line-height: 1.25; }
.rg-c .n { color: var(--muted); font-size: 12.5px; }
.rg-c .pct .bar { display: inline-block; width: 44px; height: 6px; margin-right: 6px; vertical-align: middle; border-radius: 3px; background: var(--line); overflow: hidden; }
.rg-c .pct .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
details.rg > summary { cursor: pointer; list-style: none; font-weight: 600; }
details.rg > summary::-webkit-details-marker { display: none; }
details.rg > summary .rg-name::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 9px 2px 1px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
details.rg[open] > summary .rg-name::before { transform: rotate(45deg); }
details.rg > summary:hover { background: var(--panel-2); }
details.rg[open] > summary { background: var(--panel-2); }
.rg-row.sub { font-size: 13.5px; padding-top: 7px; padding-bottom: 7px; }
.rg-row.sub .rg-name { padding-left: 20px; }
.rg-more { margin: 0; padding: 8px 14px 12px 34px; font-size: 13.5px; border-top: 1px solid var(--line); }
details.rg:target > summary { background: var(--accent-soft, var(--panel-2)); }

/* distrito pages: one row of tiles per way of selling, the kinds of property as pills */
.chan-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.chan-tile { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.chan-tile:hover { border-color: var(--accent); }
.chan-tile .ic { grid-row: 1 / span 3; align-self: start; margin-top: 2px; }
.chan-tile .n { font-size: 22px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chan-tile h3 { margin: 1px 0 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
.chan-tile .s { font-size: 12.5px; color: var(--muted); }
.type-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 13.5px; }
.type-pills > span { color: var(--muted); }
.type-pills a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px 6px 13px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); font-weight: 500; text-decoration: none; }
.type-pills a:hover { border-color: var(--accent); color: var(--accent); }
.type-pills a b { padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; }
/* the concelhos: pills with the count, the biggest first; the rest behind "Ver os outros N concelhos" */
.by-place h2 { margin-bottom: 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 7px 6px 13px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); font-size: 13.5px; font-weight: 500; text-decoration: none; }
.pills a:hover { border-color: var(--accent); color: var(--accent); }
.pills a b { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; text-align: center; }
details.more-pills { margin-top: 10px; }
details.more-pills summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; color: var(--accent); font-size: 13.5px; font-weight: 600; }
details.more-pills summary::-webkit-details-marker { display: none; }
details.more-pills summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
details.more-pills[open] summary { margin-bottom: 10px; }
details.more-pills[open] summary::after { transform: translateY(2px) rotate(-135deg); }
@media (max-width: 760px) {
  .chan-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .chan-tile { column-gap: 10px; padding: 10px 12px; }
  .chan-tile .ic { grid-row: auto; width: 30px; height: 30px; margin: 0; } /* icon beside the number, the phrase below */
  .chan-tile h3 { grid-column: 1 / -1; margin-top: 6px; }
  .chan-tile .n { font-size: 20px; }
  .chan-tile h3 { font-size: 13px; }
  .chan-tile .s { display: none; }
}

/* Sources and last update, under list-page leads and in the listing summary (lib/seo.mjs srcLine, summaryCard) */
.src-line { font-size: 13px; color: var(--muted); margin: -4px 0 14px; max-width: 900px; }
.src-line a { color: var(--ink-2); }
.src-line a:hover { color: var(--accent); }
/* /sobre */
.about h2 { scroll-margin-top: 12px; }
.about ul { padding-left: 20px; color: var(--ink-2); }
.about li { margin: 6px 0; }
.src-table { margin: 6px 0 14px; }
.src-table th { width: auto; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.src-table td:nth-child(3) { font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .src-table thead { display: none; }
  .src-table tr { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
  .src-table tr:last-child { border-bottom: 0; }
  .src-table td { padding: 0; border: 0; font-size: 13.5px; }
  .src-table td:nth-child(2), .src-table td:nth-child(4) { color: var(--muted); font-size: 12.5px; }
  .src-table td:nth-child(4) { text-align: right; }
  .src-table td:nth-child(3)::after { content: " à venda"; color: var(--muted); font-size: 12.5px; }
}

/* "Como acabam leilões como este" (lib/seo.mjs outlookCard) */
.fe-card { scroll-margin-top: 12px; }
.fe-card .fe-sub { margin: -4px 0 12px; font-size: 14px; color: var(--ink-2); }
.fe-own { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.fe-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 14px; }
.fe-tiles > div { display: flex; flex-direction: column; gap: 1px; padding: 12px 14px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line); }
.fe-tiles b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fe-tiles span { font-size: 13.5px; color: var(--ink-2); }
.fe-tiles small { font-size: 12px; color: var(--muted); }
.fe-note { margin: 0 0 14px; font-size: 14px; color: var(--ink-2); }
.fe-rows { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 0 0 10px; }
.fe-rows th { text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); }
.fe-rows td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.fe-rows tr:last-child td { border-bottom: 0; }
.fe-rows td:nth-child(2) { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.fe-rows td.ok { color: var(--good); font-weight: 600; }
.fe-rows td.no { color: var(--muted); }
.fe-card .fine { margin: 6px 0 4px; }
@media (max-width: 600px) {
  .fe-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fe-tiles > div:only-child, .fe-tiles > div:nth-child(3):last-child { grid-column: 1 / -1; }
  .fe-rows thead { display: none; }
  .fe-rows tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .fe-rows tr:last-child { border-bottom: 0; }
  .fe-rows td { padding: 0; border: 0; }
  .fe-rows td:nth-child(3) { grid-column: 1 / -1; }
}

/* the source line at the bottom of Detalhes */
.fact-src { margin: 12px 0 4px; padding-top: 10px; border-top: 1px solid var(--line); }

/* "Perto deste imóvel" / "No mesmo prédio" (lib/seo.mjs): the distance on each card, and the price card's link down */
.card .loc .dist { color: var(--accent); font-weight: 600; white-space: nowrap; }
.pc-link { display: block; padding: 9px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.pc-link:hover { border-color: var(--accent); color: var(--accent); }
.l-similar h2 + p.sub { max-width: 860px; }

/* the paid registry report's offer card, between a listing's photos and its description (lib/relatorio-oferta.mjs
   promoHtml; the same rules are in index.html for the pop-up) */
.rep-promo { container-type: inline-size; }
.rpm { display: grid; grid-template-columns: 44% 1fr; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel); box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 10px 30px -12px rgba(16,24,40,.25); }
.rpm-vis { display: flex; align-items: center; justify-content: center; padding: 14px 6px; background: radial-gradient(120% 90% at 80% 10%, #2f77b0 0, transparent 60%), linear-gradient(135deg, #0d2f4d, #1d5b8c); }
.rpm-vis img { width: 112%; max-width: none; height: auto; display: block; transition: transform .25s ease; }
.rpm-vis:hover img { transform: scale(1.03); }
.rpm-txt { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.rpm-k { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.rpm-t { display: block; font-size: 19px; line-height: 1.25; letter-spacing: -.01em; color: var(--ink); }
.rpm ul { list-style: none; margin: 4px 0 6px; padding: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.rpm li { position: relative; padding-left: 24px; margin: 5px 0; }
.rpm li::before { content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%231d5b8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.rpm-act { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 2px; }
.rpm-act .btn { padding: 11px 18px; font-size: 15px; }
.rpm-ex { font-weight: 600; font-size: 14px; color: var(--accent); text-decoration: none; }
.rpm-ex:hover { text-decoration: underline; }
.rpm small { font-size: 12.5px; color: var(--muted); }
@container (max-width: 560px) {
  .rpm { grid-template-columns: 1fr; }
  .rpm-vis { padding: 16px 10px 8px; max-height: 210px; overflow: hidden; align-items: flex-start; }
  .rpm-vis img { width: min(100%, 420px); }
  .rpm-txt { padding: 16px; }
}
.pc-rep { font-weight: 600; }

/* a Leilosoc lot's registry card: what the certificate the leiloeira published says, dated (lib/relatorio-oferta.mjs
   registryCardHtml) */
.reg-card { padding-bottom: 18px; }
.reg-src { margin: 0 0 12px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.reg-rows { list-style: none; margin: 0 0 12px; padding: 0; border-top: 1px solid var(--line); }
.reg-rows li { display: grid; grid-template-columns: 1fr auto minmax(130px, auto); gap: 14px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.reg-t { font-weight: 600; }
.reg-t small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.reg-y { color: var(--muted); font-variant-numeric: tabular-nums; }
.reg-v { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.reg-none, .reg-note { margin: 0 0 12px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.reg-act { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 8px; }
.reg-act .btn { padding: 11px 18px; font-size: 15px; }
.reg-card .fine { margin: 0; }
@media (max-width: 640px) {
  .reg-rows li { grid-template-columns: 1fr auto; row-gap: 2px; }
  .reg-v { grid-column: 1 / -1; text-align: left; }
}
/* …and the same facts inside the report's offer card, when the report is on sale for the lot (.reg-promo .rpm): the
   rows are a plain table-like list (no check marks), and a row that doesn't fit drops its amount to a second line */
.reg-promo .rpm-t { margin-bottom: 2px; }
.reg-promo .reg-src { margin: 0 0 6px; font-size: 14px; }
.reg-promo .reg-rows { margin: 0 0 8px; color: var(--ink); }
.reg-promo .reg-rows li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 8px 0; margin: 0; font-size: 14.5px; }
.reg-promo .reg-rows li::before { content: none; }
.reg-promo .reg-t { flex: 0 1 auto; }
.reg-promo .reg-y { flex: 0 0 auto; }
.reg-promo .reg-v { flex: 1 1 auto; text-align: right; }
.reg-promo .reg-none, .reg-promo .reg-note { margin: 0 0 8px; font-size: 14px; }

/* the one ad of a page (lib/ads.mjs): in the content, labelled; hidden when AdSense has nothing to show */
.ad-slot { margin: 22px 0; }
.ad-slot > small { display: block; margin-bottom: 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ad-slot:has(ins[data-ad-status="unfilled"]) { display: none; }
