/*
 * aktivita-radon on the rogr-kit layer: the client's palette as Bootstrap 6 token overrides
 * (logo: navy #002860, steel #305880 / #6080a0, light #98a8c0) and the app's own rules.
 * Loaded after kit/theme.css; never edit the kit copies.
 */
:root {
  --bs-primary-base: #305880;
  --bs-primary-bg: #305880;
  --bs-primary-fg: light-dark(#2a4d72, #a9bad0);
  --bs-primary-fg-emphasis: light-dark(#002860, #cdd8e6);
  --bs-primary-bg-subtle: light-dark(#e8eef5, #1b2a3c);
  --bs-primary-bg-muted: light-dark(#cfdae7, #233750);
  --bs-primary-border: light-dark(#a9bacd, #3a5577);
  --bs-primary-focus-ring: light-dark(#305880, #a9bad0);
  --bs-link-color: var(--bs-primary-fg);
  --bs-link-hover-color: var(--bs-primary-fg-emphasis);
  --rogr-active: var(--bs-primary-bg-subtle);
}

.brand-logo { height: 30px; width: auto; }
[data-bs-theme="dark"] .brand-logo { background: #fff; border-radius: 6px; padding: 3px 6px; }
.login-logo { height: 44px; }
/* the login card's secondary link (Zapomenuté heslo? / Zpět na přihlášení), a 44 px target */
.login-forgot { align-self: center; display: inline-flex; align-items: center; min-height: 44px; padding-inline: 0.5rem; }
/* the Nastavení menu holds the account part too (design §4.1): it opens whole, never scrolls */
.app-nav .navbar-nav .menu { --bs-menu-max-height: none; }
/* the account button: the user's initials in a round chip next to the theme switch */
.user-avatar { border-radius: 50%; background: var(--bs-primary-bg-subtle); color: var(--bs-primary-fg-emphasis); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.02em; }
.user-avatar:hover, .user-avatar[aria-expanded="true"] { background: var(--bs-primary-bg-muted); }
.user-menu .menu-header { white-space: nowrap; }
/* without the subtitle the navbar stays one row: on a phone (logo, +, theme, account, menu) and
   between 1024 and 1279 px (the links beside the tools) */
@media (width < 480px), (1024px <= width < 1280px) { .brand-sub { display: none; } }
.tabular { font-variant-numeric: tabular-nums; }
.page-head > :last-child:not(:first-child) { margin-left: auto; }
/* fields in one row keep their own height: the kit's .form-field is a grid, which stretches a
   field to its tallest neighbour (a wrapped label, a help text, an error) */
.row > .form-field { align-content: start; }
/* a closed kit dialog keeps display:flex (for its transition) but must not lengthen the page */
.dialog:not([open]) { position: fixed; }
/* a positioned child (the visually-hidden header text) stays inside the horizontal scroll instead
   of widening the whole page on a phone */
.table-responsive { position: relative; }

/* touch: below lg every control is at least 44 px tall */
@media (width < 1024px) {
  .form-control, .btn, [class*="btn-solid"], [class*="btn-outline"], [class*="btn-subtle"], [class*="btn-text"], .btn-icon,
  .menu-item, [role="tablist"] .nav-link, .sec-nav a { min-height: 44px; }
  .btn-icon { min-width: 44px; }
}

/* the protocol's company: a large two-way switch at the head of Zakázka */
.company-switch { display: flex; width: 100%; max-width: 28rem; }
.company-switch .company-radio { flex: 1 1 0; min-height: 44px; display: flex; align-items: center; justify-content: center; font-size: 1.125rem; font-weight: 600; }
.company-switch.is-invalid { outline: 2px solid var(--bs-danger-fg); outline-offset: 2px; border-radius: 0.5rem; }

/* lists */
.list-filters .card-body { display: flex; flex-flow: row wrap; gap: 0.75rem 1rem; align-items: flex-end; }
.list-filters .form-field { min-width: 10rem; margin: 0; }
.list-filters .filter-search { flex: 1 1 22rem; }
.filter-search-row { display: flex; gap: 0.5rem; }
.filter-search-row .form-control { flex: 1 1 auto; min-width: 0; }
.list-filters .filter-check { display: flex; align-items: center; gap: 0.5rem; min-height: 2.5rem; }
.filter-more-body { display: flex; flex-flow: row wrap; gap: 0.75rem 1rem; align-items: flex-end; }
.filter-more > summary { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; cursor: pointer; font-weight: 600; list-style: none; }
.filter-more > summary::-webkit-details-marker { display: none; }
.filter-more > summary::before { content: "▸"; color: var(--bs-fg-2); }
.filter-more[open] > summary::before { content: "▾"; }
/* from md the filters stand in the card's row, the „Filtry" fold is a phone's (list.js opens it where
   ::details-content is missing) */
@media (width >= 768px) {
  .filter-more > summary { display: none; }
  .filter-more::details-content { display: block; content-visibility: visible; }
}
@media (width < 768px) {
  .list-filters .filter-search, .filter-more, .filter-more-body > .form-field { flex: 1 1 100%; }
  .filter-more-body { padding-top: 0.25rem; }
}
.protocol-list th { white-space: nowrap; }
.protocol-list th a { color: inherit; text-decoration: none; }
.protocol-list th a:hover, .protocol-list th a:focus-visible { color: var(--bs-link-hover-color); text-decoration: underline; }
.protocol-list th[aria-sort] a { color: var(--bs-fg-body); }
.protocol-list .sort-icon { margin-left: 0.3rem; font-size: 0.75em; }
.protocol-list .no-number { font-style: italic; }
/* an unpaid protocol past due: the whole row, on a phone the whole card */
.protocol-list > tbody > tr.overdue { background-color: light-dark(#fff6f5, #2f1c1c); }
.protocol-list .menu form { display: contents; }
/* the status and paid badges are one-click buttons (list.js); 44 px tall to the touch below lg */
.protocol-list .list-toggle { border: 0; cursor: pointer; font: inherit; font-size: 0.75rem; font-weight: 600; }
.protocol-list .list-toggle:disabled { opacity: 0.6; cursor: progress; }
@media (width < 1024px) { .protocol-list .list-toggle { min-height: 44px; } }
/* a row's checkbox for a shared invoice: the whole cell is its target, 44 px below lg; the merge bar sticks to
   the bottom of the window while two or more are checked (list.js) */
.protocol-list .col-select { width: 1%; padding-right: 0; }
.protocol-list .select-hit { display: flex; align-items: center; justify-content: center; cursor: pointer; }
@media (width < 1024px) { .protocol-list .select-hit { min-width: 44px; min-height: 44px; } }
.merge-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
  gap: 0.75rem 1rem; margin-top: 1rem; padding: 0.75rem 1rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius);
  background: var(--bs-bg-body); box-shadow: 0 -0.25rem 1rem rgb(0 0 0 / 0.12); }
@media (width < 1024px) { .merge-bar .btn-solid { min-height: 44px; } }
/* a tablet (768–1023 px) fits the row without wrapping a number, price or date: Objednatel goes, the
   cells come closer */
@media (768px <= width < 1024px) {
  .protocol-list { --bs-table-cell-padding-x: 0.375rem; }
  .protocol-list .col-requester { display: none; }
}
.protocol-list .builder-more { color: var(--bs-fg-2); font-size: var(--bs-font-size-sm); white-space: nowrap; }
/* a phone's row is a compact card: number · status · paid on top with ⋯ in its corner, builder,
   requester and cadastral area without labels, then price · due date */
@media (width < 768px) {
  .protocol-list > tbody > tr { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; padding-right: 3.25rem; }
  .protocol-list > tbody > tr > td { display: block; width: auto; padding: 0; }
  .protocol-list > tbody > tr > td::before { display: none; }
  .protocol-list > tbody > tr > td:empty { display: none; }
  .protocol-list .col-select { order: 0; width: auto; margin-left: -0.625rem; }
  .protocol-list .col-number { order: 1; display: flex; align-items: center; min-height: 44px; }
  .protocol-list .col-status { order: 2; }
  .protocol-list .col-paid { order: 3; }
  /* the full lines run on under the ⋯ corner */
  .protocol-list .col-builder, .protocol-list .col-requester, .protocol-list .col-area { order: 4; flex: none; width: calc(100% + 3.25rem); margin-right: -3.25rem; }
  .protocol-list .col-requester { order: 5; }
  .protocol-list .col-area { order: 6; }
  .protocol-list :is(.col-builder, .col-requester, .col-area) .meta { display: inline; }
  .protocol-list :is(.col-builder, .col-requester, .col-area) :is(span, .meta) + .meta::before { content: " · "; }
  .protocol-list > tbody > tr > td.col-requester::before { display: inline; content: "objednatel "; }
  .protocol-list .col-requester > div { display: inline; }
  /* price · due date always start their own line, also under a row without builder or area */
  .protocol-list > tbody > tr::after { content: ""; order: 7; flex-basis: 100%; height: 0; }
  .protocol-list .col-price, .protocol-list .col-due { order: 8; color: var(--bs-fg-2); font-size: var(--bs-font-size-sm); }
  .protocol-list .col-price .meta { display: none; }
  .protocol-list .col-due { order: 9; }
  .protocol-list > tbody > tr > td.col-due::before { display: inline; content: "· splatnost "; }
  .protocol-list > tbody > tr > td.stack-actions { position: absolute; top: 0.625rem; right: 0.5rem; }
  /* the corner holds ⋯ only: Kopírovat is its menu's item here (a wide paid badge ran under the copy icon) */
  .protocol-list .list-copy { display: none; }
  .protocol-list > tbody > tr > td.stack-empty { flex: 1 1 100%; width: 100%; margin-right: -3.25rem; }
}
@media (width >= 768px) { .protocol-list .list-copy-item { display: none; } }
/* the Faktury list: DUZP is for a wide screen, the card and the tablet row do without it */
@media (width < 1024px) { .invoice-list .col-duzp { display: none; } }
/* a phone's card ends with the reminder's line */
@media (width < 768px) { .invoice-list .col-reminder { order: 10; flex: none; width: calc(100% + 3.25rem); margin-right: -3.25rem; } }
/* below lg every page link is a 44 px target */
@media (width < 1024px) { .pagination .page-link { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; } }
@media (width < 600px) { .nav-new-label { display: none; } }

/* protocol page: section menu · cards · result panel (design §4.3) */
.protocol-layout { display: grid; gap: 1.25rem; grid-template-columns: 1fr; grid-template-areas: "nav" "result" "main"; }
.protocol-layout > .sec-nav { grid-area: nav; }
.protocol-layout > .result-col { grid-area: result; }
.protocol-layout > .protocol-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
/* between the section menu and the result column the form is narrow on a tablet in landscape
   (1024–1279 px: ~440–600 px): four fields a row overlap there, so narrow fields go two a row and
   wide ones full width; the climate and F dialogs (500 px) the same. Below md the grid is one
   column anyway. */
.protocol-main, #climate-dialog, #f-dialog { container-type: inline-size; }
/* wide enough (≥ 42 rem) that the container rule above keeps their fields side by side */
#climate-dialog, #f-dialog { --bs-dialog-width: 56rem; }
@media (width >= 768px) {
  @container (width < 42rem) {
    .row > :is(.md\:col-2, .md\:col-3) { width: 50%; }
    .row > :is(.md\:col-4, .md\:col-5, .md\:col-6) { width: 100%; }
  }
}
.sec-nav { display: flex; gap: 0.25rem; overflow-x: auto; position: sticky; top: 3.6rem; z-index: 5; background: var(--bs-bg-body); padding: 0.25rem 0; scrollbar-width: thin; }
/* below lg the result strip sticks under the section bar (44 px links + 0.5rem padding): the
   result stays in view while measurements are typed (design §4.3, §5) */
@media (width < 1024px) { .protocol-layout > .result-col { position: sticky; top: calc(3.6rem + 44px + 0.5rem); z-index: 4; } }
.sec-nav a { flex: 0 0 auto; display: flex; gap: 0.5rem; align-items: center; justify-content: space-between; padding: 0.45rem 0.75rem; border-radius: 0.5rem; color: var(--bs-fg-1); text-decoration: none; white-space: nowrap; }
.sec-nav a:hover { background: var(--bs-bg-3); }
.sec-nav a.on { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-fg-emphasis); font-weight: 600; }
.result-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.6rem 0.9rem; border: 1px solid var(--bs-border-color); border-radius: 0.75rem; background: var(--bs-bg-1); }
.result-strip .verdict { padding: 0.15rem 0.6rem; }
/* the RB strip stays one line: a long verdict is cut, below sm the units, „místností" and the total give way */
.rb-strip { flex-wrap: nowrap; contain: inline-size; } /* its width never grows the layout's column */
.rb-strip .verdict { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-strip .strip-end { display: flex; align-items: center; gap: 1rem; flex: none; margin-left: auto; }
@media (width < 576px) {
  .rb-strip { gap: 0.5rem; padding-inline: 0.6rem; }
  .rb-strip .strip-wide { display: none; }
}
.result-cards { display: none; }
/* unsaved changes (protocol.js sets body.is-dirty): „Neuloženo" instead of „Uloženo …" */
.unsaved-mark { display: none; }
.is-dirty .unsaved-mark { display: block; }
.is-dirty .result-strip .unsaved-mark { display: inline-block; }
.is-dirty .saved-mark { display: none; }
/* the contact tabs scroll sideways on a phone instead of wrapping */
.protocol-main [role="tablist"] { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.protocol-main [role="tablist"] .nav-link { white-space: nowrap; }
@media (width >= 1024px) {
  .protocol-layout { grid-template-columns: 12rem minmax(0, 1fr) 19rem; grid-template-areas: "nav main result"; align-items: start; }
  .sec-nav { flex-direction: column; overflow: visible; top: 4.75rem; padding: 0; }
  .result-col { position: sticky; top: 4.75rem; display: flex; flex-direction: column; gap: 1rem; }
  /* the right column's actions in two rows: Tisk and Uložit, then Kopírovat and Smazat */
  .protocol-actions { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .protocol-actions > .act-secondary { order: 1; }
  .protocol-actions form > button, .protocol-actions > button { width: 100%; }
  .result-strip { display: none; }
  .result-cards { display: flex; flex-direction: column; gap: 1rem; }
}
.protocol-main section { scroll-margin-top: 10.5rem; }
@media (width >= 1024px) { .protocol-main section { scroll-margin-top: 5.5rem; } }
.protocol-save { display: flex; gap: 0.5rem; }
.verdict { border-radius: 0.6rem; padding: 0.5rem 0.8rem; }
.verdict.low { background: light-dark(#e3f4ea, #10301f); color: light-dark(#0b5d31, #8fe0b0); }
.verdict.mid { background: light-dark(#fff3d6, #3a2e0c); color: light-dark(#7a5300, #f3cf72); }
.verdict.high { background: light-dark(#fde4e4, #3d1717); color: light-dark(#a3191f, #ff9c9c); }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--bs-border-color); border-radius: 0.5rem; padding: 0.3rem 0.7rem; background: var(--bs-bg-1); cursor: pointer; }
.chip:has(input:checked), .chip.on { border-color: var(--bs-primary-border); background: var(--bs-primary-bg-subtle); }
@media (width < 1024px) { .chip { min-height: 44px; } }

/* typeahead */
.ac-wrap { position: relative; }
.ac-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; max-height: 15rem; overflow-y: auto; background: var(--bs-bg-1); border: 1px solid var(--bs-border-color); border-radius: 0.5rem; box-shadow: 0 0.5rem 1rem rgb(0 0 0 / 0.15); }
.ac-item { display: block; width: 100%; text-align: left; padding: 0.5rem 0.75rem; border: 0; background: none; color: inherit; cursor: pointer; }
.ac-item:hover, .ac-item[aria-selected="true"] { background: var(--bs-primary-bg-subtle); }
.ac-item[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--bs-primary-base); }
@media (width < 1024px) { .ac-item { min-height: 44px; } }

/* address book and settings */
.sec-nav.settings-nav { position: static; flex-flow: row wrap; overflow: visible; margin-bottom: 1.25rem; padding: 0; background: none; }
.company-image { display: block; max-width: 100%; max-height: 8rem; object-fit: contain; margin-bottom: 0.5rem; padding: 0.5rem; background: #fff; border: 1px solid var(--bs-border-color); border-radius: 0.5rem; }
.settings-preview { padding: 0.75rem 1rem; border-left: 3px solid var(--bs-primary-border); border-radius: 0.5rem; background: var(--bs-bg-2); }

/* RI schema editor */
.schema { position: relative; display: inline-block; max-width: 100%; cursor: crosshair; touch-action: pan-y pinch-zoom; }
.schema img { max-width: 100%; border: 1px solid var(--bs-border-color); border-radius: 0.5rem; user-select: none; }
.schema-points { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.schema-points .pt { stroke: #fff; stroke-width: 2; opacity: 0.85; cursor: grab; touch-action: none; }
.schema-points .pt-probe { fill: #333; }
.schema-points .pt-interface { fill: #e6a817; }
.schema-points .pt-sample { fill: #008cd2; }
.schema-points .pt-label { fill: #fff; font: 700 11px sans-serif; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.schema-points .pt-label-lg { font-size: 14px; }
.protocol-head h1 .badge { font-size: 0.8rem; vertical-align: middle; }
/* on a phone the head's four actions take two rows of the full width: Tisk and Uložit, then Kopírovat and Smazat */
@media (width < 576px) {
  .head-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .head-actions > .act-secondary { order: 1; }
  .head-actions form > button, .head-actions > button { width: 100%; }
}

/* RI measurements */
.samples { display: grid; grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr)); gap: 0.5rem; }
.sample label { display: block; font-size: 0.75rem; color: var(--bs-fg-3); margin-bottom: 0.1rem; }
.sample-input { text-align: right; font-variant-numeric: tabular-nums; }
/* Q3: a tinted field with a strong border in both modes and „Q3" in its label (not colour alone) */
.sample-input.q3 { border-color: var(--bs-primary-fg); background: var(--bs-primary-bg-subtle); font-weight: 600; }
/* the climate days stack on a phone (the kit's .table-stack below md); the actions without a label */
@media (width < 768px) { .table-stack .stack-actions { justify-content: flex-end; } .table-stack .stack-actions::before { content: none; } }
.probe + .probe { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--bs-border-subtle); }
.interface-input { width: 9rem; }
.nowrap { white-space: nowrap; }

/* the AI draft proposed beside a filled result field */
.ai-draft-text { white-space: pre-wrap; }

/* RB climate: number fields grouped by topic, compact columns */
.climate-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.25rem 2rem; }
.num-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr)); gap: 0.75rem; }
.climate-selects { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem 1.5rem; }

/* RB rooms and electrets (rb_rooms.html); a narrow fragment (phone, the iPad's middle column) stacks a
   room's cells and lays an electret out as a grid: Elektret | d_g / U_p | U_k, a_r underneath */
.rooms-host { container-type: inline-size; }
.room-toggle { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.25rem 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.room-toggle:hover { color: var(--bs-primary-fg); }
.room-toggle > .fa-solid { width: 0.75rem; flex: none; }
.room-row.open .room-toggle { font-weight: 600; }
.room-reason { padding-left: 1.35rem; }
.rooms-table .cell-label { display: none; }
.electrets .cell-label { display: none; }
.electrets .form-control { padding-inline: 0.5rem; }
.electrets .e-number .form-control { width: 5.5rem; }
.electrets :is(.e-up, .e-uk, .e-dg) .form-control { width: 4.25rem; }
.electrets .e-ar { white-space: nowrap; }
.electrets .pair-note { margin-left: 0.5rem; font-size: var(--bs-font-size-sm); }
.electrets tr.pair-start:not(:first-child) > td { border-top: 2px solid var(--bs-border-color); }
@media (width < 1024px) { .room-toggle { min-height: 44px; } }
/* a table just wide enough (1180 px): the pair goes under a_r */
@container (34rem <= width < 44rem) {
  .electrets .e-ar { white-space: normal; }
  .electrets .pair-note { display: block; margin-left: 0; white-space: nowrap; }
}
@container (width < 34rem) {
  .rooms-table > thead, .electrets > thead { display: none; }
  .rooms-table, .rooms-table > tbody, .rooms-table > tbody > tr, .rooms-table > tbody > tr > td { display: block; }
  .rooms-table > tbody > tr.room-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 0.4rem 0; border-bottom: 1px solid var(--bs-border-color); }
  .room-row > td { border: 0; padding: 0; }
  .room-row > .room-actions { grid-column: 2; grid-row: 1; }
  .room-row > .room-cell { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.1rem 0 0.1rem 1.35rem; text-align: right; }
  .room-row > .room-cell.cell-empty { display: none; }
  .rooms-table .cell-label { display: block; flex: none; color: var(--bs-fg-2); font-size: var(--bs-font-size-sm); text-align: left; }
  .rooms-table > tbody > tr.room-electrets > td { padding: 0 0 0.75rem; border-bottom: 1px solid var(--bs-border-color); }
  .electrets, .electrets > tbody { display: block; }
  .electrets tr.electret { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: "num dg act" "up uk ." "ar ar ."; gap: 0.35rem 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--bs-border-subtle); }
  .electrets tr.electret > td { display: block; border: 0; padding: 0; }
  .electrets tr.pair-start:not(:first-child) { border-top: 2px solid var(--bs-border-color); }
  .electrets tr.pair-start:not(:first-child) > td { border: 0; }
  .electrets .e-number { grid-area: num; }
  .electrets .e-up { grid-area: up; }
  .electrets .e-uk { grid-area: uk; }
  .electrets .e-dg { grid-area: dg; }
  .electrets .e-ar { grid-area: ar; text-align: left; white-space: normal; }
  .electrets .e-act { grid-area: act; align-self: end; }
  .electrets .cell-label { display: block; margin-bottom: 0.15rem; color: var(--bs-fg-2); font-size: var(--bs-font-size-sm); }
  .electrets .e-ar .cell-label { display: inline; margin-right: 0.5rem; }
  .electrets :is(.e-number, .e-up, .e-uk, .e-dg) .form-control { width: 100%; }
}
.room-dialog { --bs-dialog-width: 40rem; }
.room-active { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }
@media (width < 1024px) { .room-active { min-height: 44px; } }

/* dashboard */
.revenue-chart { width: 100%; height: auto; }
.revenue-chart .bar-label { font-size: 12px; fill: var(--bs-fg-2); text-anchor: middle; }
.revenue-chart .bar-total { font-size: 11px; fill: var(--bs-fg-1); text-anchor: middle; font-variant-numeric: tabular-nums; }
/* the chart scales with its card: on a phone its texts take more SVG units to stay readable */
@media (width < 768px) { .revenue-chart .bar-label { font-size: 20px; } .revenue-chart .bar-total { font-size: 16px; } }
/* stacked segments part with a line of the card's colour; every colour is >= 3:1 on the card in its
   mode (light #fff, dark #2a2f30) and the legend swatches take the same class */
.revenue-chart rect { stroke: var(--bs-card-bg, var(--bs-bg-1)); stroke-width: 1.5px; }
.bar-1 { fill: light-dark(#305880, #a9bad0); background: light-dark(#305880, #a9bad0); }
.bar-2 { fill: light-dark(#6f93bd, #5b86b8); background: light-dark(#6f93bd, #5b86b8); }
.bar-3 { fill: light-dark(#002860, #e0e8f2); background: light-dark(#002860, #e0e8f2); }
.overdue-more { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }
@media (width < 1024px) { .overdue-more a { display: inline-flex; align-items: center; min-height: 44px; } }
.chart-legend { display: flex; gap: 1rem; font-size: var(--bs-font-size-sm); color: var(--bs-fg-2); }
.chart-legend .swatch { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 2px; margin-right: 0.35rem; vertical-align: -1px; }

/* map tab */
.protocol-map { height: 26rem; border: 1px solid var(--bs-border-color); border-radius: 0.75rem; z-index: 0; }
@media (width < 1024px) { .protocol-map { height: 20rem; } }

/* gallery tab */
.gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1rem; }
.gallery-item { display: flex; flex-direction: column; gap: 0.4rem; }
.gallery-thumb { display: grid; place-items: center; aspect-ratio: 4 / 3; border: 1px solid var(--bs-border-color); border-radius: 0.6rem; background: var(--bs-bg-2); overflow: hidden; color: var(--bs-fg-2); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
/* a PDF's first page: the top of the page (its heading) on white, as a document */
.gallery-thumb img.thumb-page { object-position: top; background: #fff; }

/* the Stavebník tab: one block per builder */
.builder-block { border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); padding: 1rem; margin-bottom: 1rem; min-width: 0; }
.builder-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; float: none; width: 100%; padding: 0; margin-bottom: 1rem; }
.builder-head [data-builder-remove] { min-height: 44px; }
.builder-head [data-builder-remove][hidden] { display: none; }
[data-builder-add] { min-height: 44px; }
