/* One comparison matrix, using exactly the room labels from the apartment pages. */
.areas-page { --page-width: 1800px; }
.areas-page .page-intro,
.areas-page .content-section { width: min(94%, var(--page-width)); }
.areas-page .page-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding-bottom: 24px; }
.areas-page h1 { font-size: clamp(1.8rem, 3vw, 2.8rem); max-width: none; margin: 0; }
.area-overview-download { flex-shrink: 0; }
.areas-page .area-overview-content { padding-top: 8px; }
.area-table-note { max-width: 100ch; color: var(--muted); font-size: .9375rem; line-height: 1.7; margin: 0 0 24px; }
.area-table-scroll { max-height: 75vh; max-height: 75dvh; overflow: auto; border: 1px solid var(--line); isolation: isolate; overscroll-behavior-inline: contain; scrollbar-color: var(--accent) var(--bg); }
.area-table-scroll:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 5px; }
.area-matrix { width: 100%; min-width: 86rem; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.area-matrix caption { padding: 18px 20px; color: var(--gold-light); background: var(--surface); text-align: left; font-size: 1rem; font-weight: 600; }
.area-id-col { width: 6rem; }
.area-total-col { width: 8rem; }
.area-living-col { width: 15rem; }
.area-rooms-col { width: 11rem; }
.area-halls-col { width: 12rem; }
.area-baths-col { width: 10rem; }
.area-wc-col,
.area-loggias-col,
.area-balconies-col { width: 8rem; }
.area-matrix th,
.area-matrix td { padding: 20px 18px; vertical-align: top; text-align: left; line-height: 1.5; }
.area-matrix thead th { position: sticky; top: 0; z-index: 3; background: var(--bg); color: var(--gold-light); font-size: .875rem; font-weight: 600; border-bottom: 2px solid var(--accent); }
.area-matrix .area-apartment { position: sticky; left: 0; z-index: 1; background: var(--bg); box-shadow: 1px 0 0 var(--line); }
.area-matrix thead .area-apartment { z-index: 4; }
.area-matrix tr[data-record] { background: var(--bg); }
.area-matrix tr[data-record]:nth-child(odd),
.area-matrix tr[data-record]:nth-child(odd) .area-apartment { background: var(--surface); }
.area-matrix tr[data-record]:hover,
.area-matrix tr[data-record]:focus-within,
.area-matrix tr[data-record]:hover .area-apartment,
.area-matrix tr[data-record]:focus-within .area-apartment { background: #253a47; }
.area-apartment a { display: inline-flex; min-height: 44px; align-items: flex-start; color: var(--gold-light); font-size: 1.125rem; font-weight: 600; white-space: nowrap; text-decoration: underline; text-underline-offset: 5px; }
.area-matrix td.area-total { font-size: 1.25rem; font-weight: 600; white-space: nowrap; }
.area-room-items { display: grid; gap: 18px; list-style: none; padding: 0; margin: 0; }
.area-room-items li { display: grid; gap: 5px; }
.area-room-name { font-size: .875rem; line-height: 1.5; color: var(--muted); overflow-wrap: break-word; }
.area-room-items strong { font-size: 1rem; line-height: 1.5; font-weight: 500; white-space: nowrap; }
.area-empty { color: var(--muted); }
.area-matrix .area-group th { padding: 20px 18px; background: #26343c; color: var(--fg); font-size: 1rem; font-weight: 600; }
.area-group-note { display: block; margin-top: 5px; color: var(--muted); font-size: .875rem; font-weight: 400; }
.area-matrix .area-summary th,
.area-matrix .area-summary td { background: #273a43; color: var(--gold-light); font-size: 1rem; font-weight: 600; }
.area-matrix .area-summary .area-total { font-size: 1.25rem; }
@media (max-width: 760px) {
  .area-table-scroll { max-height: 72vh; max-height: 72dvh; }
  .areas-page .page-intro { padding-top: 30px; }
  .area-table-note { margin-bottom: 18px; }
}
@media print {
  .area-overview-download { display: none; }
  @page { size: A3 landscape; margin: 12mm; }
  .area-table-scroll { max-height: none; overflow: visible; border: 0; }
  .area-matrix { min-width: 0; width: 100%; font-size: 9pt; }
  .area-matrix col { width: auto; }
  .area-matrix th, .area-matrix td { padding: 8px; }
  .area-matrix thead th, .area-matrix .area-apartment { position: static; }
  .area-matrix th, .area-matrix td, .area-matrix span, .area-matrix a, .area-matrix caption { color: black !important; background: white !important; box-shadow: none !important; }
  .area-matrix tr { break-inside: avoid; }
  .area-matrix thead { display: table-header-group; }
}
