/**
 * O3 portal: "the lease schedule".
 * A deep blue bar with the O3 logo; records set as numbered schedule sections with ruled
 * rows; agreement shown as an initialled box, the one place the mark's green is spent freely.
 * Colours: the blue and green of the logo's globe.
 * Light ground: an office in daylight, a person outside on a phone.
 */

:root {
  --navy: #14507f; /* the blue of the logo, deepened for text and buttons */
  --navy-deep: #0b2d4a;
  --navy-wash: #e8f1f9;
  --red: #7cae34; /* the brand accent: the green of the globe (RKF calls this one red) */
  --red-ink: #c4102f; /* error red for text: 5.9:1 on white */
  --red-wash: #fbeaed;
  --link: #1a62a8;
  --ink: #1b1f2a;
  --ink-2: #565a63; /* secondary text, from the logo's grey, 7:1 */
  --rule: #c5d2de;
  --rule-soft: #e1e9f1;
  --ground: #ffffff;
  --ground-2: #f4f8fb;
  --ok: #17663a;
  --ok-wash: #e8f4ec;
  /* the schedule panel a section sits on (Douw asked for a background on sections, 2026-11-15) */
  --panel: #f4f8fb;
  --panel-rule: #d8e5ef;

  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;

  --radius: 3px;
  --bar-h: 76px;
  --row-h: 40px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
  accent-color: var(--navy);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #a9b1c2 var(--ground-2);
}

body {
  margin: 0;
  font: 400 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--ground);
  font-variant-numeric: tabular-nums;
  caret-color: var(--navy);
}

::selection {
  background: var(--navy);
  color: #fff;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
  border-radius: 2px;
}

code {
  font: 0.86em/1 var(--mono);
  color: var(--ink-2);
}

.skip {
  position: absolute;
  left: var(--s3);
  top: -100px;
  z-index: 10;
  padding: var(--s2) var(--s3);
  background: #fff;
  color: var(--navy);
}
.skip:focus {
  top: var(--s3);
}

/* ---------- the bar ---------- */

.bar {
  display: flex;
  align-items: center;
  gap: var(--s5);
  min-height: var(--bar-h);
  padding: 0 var(--s5);
  background: var(--navy-deep);
  color: #fff;
}
.brand {
  display: flex;
  flex: none;
  align-items: center;
}
.brand img {
  display: block;
  height: 48px;
  width: auto;
}
.menu {
  display: flex;
  flex: 1;
  align-self: stretch;
  gap: var(--s1);
  min-width: 0;
  /* only whole links show on the bar: the rest wrap out of sight and are in the menu */
  flex-wrap: wrap;
  height: var(--bar-h);
  overflow: hidden;
}
@media (min-width: 761px) and (max-width: 1400px) {
  .bar {
    gap: var(--s4);
  }
  .menu {
    gap: 0;
  }
  .menu a {
    padding: 0 var(--s2);
  }
}
.menu a {
  display: flex;
  align-items: center;
  height: var(--bar-h);
  box-sizing: border-box;
  padding: 0 var(--s3);
  color: #d6ddee;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  border-top: 3px solid transparent;
  white-space: nowrap;
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.menu a:hover {
  color: #fff;
}
.menu a[aria-current='page'] {
  color: #fff;
  border-bottom-color: #fff;
}
.menu a:focus-visible,
.site-menu summary:focus-visible,
.brand:focus-visible {
  outline-color: #fff;
}
.bar {
  position: relative;
}
.site-menu {
  flex: none;
  margin-left: auto;
}
.site-menu summary {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 44px;
  padding: 0 var(--s2);
  border-radius: var(--radius);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.site-menu summary::-webkit-details-marker {
  display: none;
}
.site-menu-icon,
.site-menu-icon::before,
.site-menu-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.site-menu-icon {
  position: relative;
}
.site-menu-icon::before,
.site-menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
}
.site-menu-icon::before {
  top: -6px;
}
.site-menu-icon::after {
  top: 6px;
}
.site-menu-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  right: var(--s5);
  width: 300px;
  max-height: calc(100vh - var(--bar-h) - 16px);
  overflow-y: auto;
  padding: var(--s3);
  border: 1px solid var(--navy-wash);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 12px 32px rgb(11 31 85 / 0.22);
}
.site-menu-name {
  margin: 0;
  padding: var(--s2) var(--s3) var(--s3);
  border-bottom: 1px solid var(--navy-wash);
  color: var(--ink-2);
  font-size: 0.875rem;
}
.site-menu-profile {
  display: block;
  margin-top: 2px;
  color: var(--navy);
  font-weight: 600;
}
.site-menu-panel nav {
  display: grid;
  padding: var(--s2) 0;
}
.site-menu-panel nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s3);
  border-radius: var(--radius);
  color: var(--navy);
  font-weight: 500;
  text-decoration: none;
}
.site-menu-panel nav a:hover {
  background: var(--navy-wash);
}
.site-menu-panel nav a[aria-current='page'] {
  background: var(--navy);
  color: #fff;
}
/* Sign out stays in view however long the list of pages is */
.site-menu-panel form {
  position: sticky;
  bottom: calc(-1 * var(--s3));
  margin: 0 calc(-1 * var(--s3)) calc(-1 * var(--s3));
  padding: var(--s3);
  border-top: 1px solid var(--navy-wash);
  background: #fff;
}
.site-menu summary:hover {
  color: #fff;
  opacity: 0.85;
}
.site-menu-panel button {
  width: 100%;
}

/* ---------- page and head ---------- */

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--s6) var(--s5) var(--s7);
}
/* a page with a table of many columns uses the width of the screen */
.page:has(.table-scroll th:nth-child(9)) {
  max-width: 1720px;
}
.page.narrow {
  max-width: 640px;
}
.page-head {
  margin: 0 0 var(--s5);
  padding-bottom: var(--s4);
  border-bottom: 2px solid var(--navy);
}
.page-head h1 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--navy);
  text-wrap: balance;
}
.page-head .context {
  margin: var(--s1) 0 0;
  color: var(--ink-2);
  max-width: 72ch;
}
.page-head .back {
  display: inline-block;
  margin-bottom: var(--s2);
  font-size: 0.875rem;
}
.page-head .back::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
}
.lead {
  font-size: 1.0625rem;
  max-width: 60ch;
}

/* ---------- schedule sections ---------- */

.sched h2,
.clause-group legend {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  margin: 0 0 var(--s3);
  font-size: 1.0625rem;
  font-weight: 650;
  color: var(--ink);
}
.no {
  min-width: 1.75em;
  color: var(--navy);
  font-weight: 700;
}
.count {
  margin-left: auto;
  padding: 0 var(--s2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
}
.sched .intro {
  margin: calc(-1 * var(--s2)) 0 var(--s3) calc(1.75em + var(--s2));
}
.sched.unnumbered .intro,
.sched.unnumbered .fold summary {
  margin-left: 0;
}
.sched.unnumbered .rows li,
.sched.unnumbered .empty,
.sched.unnumbered .fields {
  padding-left: 0;
  color: var(--ink-2);
  max-width: 72ch;
}

/* each section is a schedule panel: a flat tinted sheet with a hairline frame and a navy-wash
   heading band, like the shaded schedules of a printed lease; no shadow, the page stays white */
.sched {
  margin: 0 0 var(--s5);
  padding: 0 var(--s5) var(--s5);
  background: var(--panel);
  border: 1px solid var(--panel-rule);
  border-radius: var(--radius);
}
.sched > h2 {
  margin: 0 calc(-1 * var(--s5)) var(--s4);
  padding: var(--s3) var(--s5);
  background: var(--navy-wash);
  border-bottom: 1px solid var(--panel-rule);
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--navy);
}
.sched > h2 .count {
  background: #fff;
  border-color: var(--panel-rule);
}
/* a panel that opens and closes: its heading band is the button, with a chevron that turns */
.sched.accordion {
  padding-bottom: 0;
  margin-bottom: var(--s3);
}
.sched.accordion > details[open] {
  padding-bottom: var(--s5);
}
.sched.accordion summary {
  display: block;
  position: relative;
  margin: 0 calc(-1 * var(--s5));
  list-style: none;
  cursor: pointer;
}
.sched.accordion summary::-webkit-details-marker {
  display: none;
}
.sched.accordion summary h2 {
  margin: 0;
  padding: var(--s3) var(--s7) var(--s3) var(--s5);
  background: var(--navy-wash);
  border-radius: var(--radius);
  color: var(--navy);
}
.sched.accordion summary::after {
  content: '';
  position: absolute;
  top: calc(50% - 7px);
  right: var(--s5);
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  transform: rotate(45deg);
  transition: transform 160ms var(--ease-out);
}
.sched.accordion details[open] > summary {
  margin-bottom: var(--s4);
  border-bottom: 1px solid var(--panel-rule);
}
.sched.accordion details[open] > summary::after {
  top: calc(50% - 3px);
  transform: rotate(225deg);
}
.sched.accordion summary:hover h2 {
  background: #dcebf6;
}
.sched.accordion summary:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
.sched .facts {
  border-top: 0;
}
.sched .facts > div,
.sched .rows li,
.sched .plain-list li,
.sched .history li {
  border-bottom-color: var(--panel-rule);
}
.sched .rows {
  border-top: 0;
}
.sched .empty {
  padding-top: var(--s2);
  padding-bottom: var(--s2);
  border: 0;
}
.sched .sched-table thead th {
  border-bottom-color: var(--panel-rule);
}
.sched .sched-table td {
  border-bottom-color: var(--panel-rule);
}
.sched .sched-table tbody tr:hover td {
  background: #fff;
}
.sched .quote {
  background: #fff;
  border-color: var(--panel-rule);
}
.sched .video iframe {
  border-radius: var(--radius);
}

/* ruled rows: a plain list of items */
.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.rows li {
  min-height: var(--row-h);
  padding: var(--s2) 0 var(--s2) calc(1.75em + var(--s2));
  border-bottom: 1px solid var(--rule-soft);
}
.rows.links a {
  font-weight: 500;
}

/* ---------- tables ---------- */

.sched-table {
  width: 100%;
  border-collapse: collapse;
}
.sched-table th,
.sched-table td {
  padding: var(--s2) var(--s3);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule-soft);
}
.sched-table thead th {
  border-bottom: 1px solid var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
  /* headings may take two lines, so that a table of many columns fits its panel */
  vertical-align: bottom;
}
.sched-table tbody tr:hover td {
  background: var(--ground-2);
}
.sched-table tr.group th {
  padding-top: var(--s5);
  border-bottom: 1px solid var(--rule);
  font-weight: 650;
  background: none;
}
.sched-table td.clause,
.sched-table th.clause {
  width: 4.5em;
  color: var(--navy);
  font-weight: 600;
}
.sched-table .code {
  width: 1%;
  white-space: nowrap;
}
.sched-table .num {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}
.sched-table .choice {
  width: 1%;
}
.sched-table tr.is-deny td {
  background: var(--red-wash);
}
.sched-table tr.is-grant td {
  background: var(--ok-wash);
}
.sched-table tr.is-off td {
  color: var(--ink-2);
}

.tally {
  margin: 0 0 var(--s2);
  font-size: 0.875rem;
  color: var(--ink-2);
}

/* ---------- the initial box ---------- */

.ticks {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.tick-row {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--rule-soft);
}
.tick-row label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--s3);
  flex: 1;
  padding-top: 3px;
  cursor: pointer;
}
.tick-row .clause {
  min-width: 2.75em;
  color: var(--navy);
  font-weight: 600;
}
.tick-row .label {
  font-weight: 500;
}
.tick-row .hint {
  flex-basis: 100%;
  margin-left: 0;
}
.clause-group .tick-row .hint {
  margin-left: calc(2.75em + var(--s3));
}
/* short lists (provinces): ticks side by side */
.ticks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  column-gap: var(--s4);
  border-top: 0;
}
.ticks-grid .tick-row {
  padding: var(--s1) 0;
  border-bottom: 0;
}
.tick-row.is-off .label {
  color: var(--ink-2);
}

input.initial {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 28px;
  height: 28px;
  margin: 0;
  border: 1.5px solid var(--navy);
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
input.initial:hover {
  background: var(--navy-wash);
}
/* the initial: a pen mark in the brand red, drawn on when the box is ticked */
input.initial:checked {
  border-color: var(--red);
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M5 15.5c1.6-1.2 3.1 2.6 4.6 3.8 1-2.4 3.3-7.6 5.6-10.3.9 1.9.2 6.3 1.8 6.8 1.3.4 3.4-3.4 6-6.6' fill='none' stroke='%23ed1944' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 24px 24px no-repeat;
  animation: initial-in 320ms var(--ease-out);
}
@keyframes initial-in {
  from {
    background-size: 8px 8px;
  }
}
input.initial:disabled {
  border-color: var(--rule);
  cursor: not-allowed;
  opacity: 0.7;
}
@media (prefers-reduced-motion: reduce) {
  input.initial:checked {
    animation: none;
  }
}

.clause-group {
  margin: 0 0 var(--s5);
  padding: 0;
  border: 0;
}
.clause-group legend {
  width: 100%;
  padding: 0;
}

/* ---------- forms ---------- */

button,
input[type='submit'],
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 var(--s4);
  border: 1.5px solid var(--navy);
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  font: 600 0.9375rem/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out);
}
button:hover,
input[type='submit']:hover,
.button:hover {
  background: var(--navy-deep);
}
button.secondary,
.button.secondary {
  background: #fff;
  color: var(--navy);
}
button.secondary:hover,
.button.secondary:hover {
  background: var(--navy-wash);
}
button.on-bar {
  min-height: 34px;
  border-color: rgb(255 255 255 / 0.5);
  background: transparent;
  color: #fff;
  font-weight: 500;
}
button.on-bar:hover {
  background: rgb(255 255 255 / 0.12);
}
button:disabled {
  border-color: var(--rule);
  background: var(--ground-2);
  color: var(--ink-2);
  cursor: not-allowed;
}

input:not([type='checkbox']):not([type='hidden']):not([type='submit']):not([type='file']),
select,
textarea {
  min-height: 40px;
  padding: 0 var(--s3);
  border: 1px solid #8f97a8;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  max-width: 100%;
}
input:not([type='checkbox']):focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 0;
  border-color: var(--navy);
}
input::placeholder {
  color: #767b86;
}
select:disabled,
input:disabled {
  background: var(--ground-2);
  color: var(--ink-2);
}

.fields {
  max-width: 480px;
  padding-left: calc(1.75em + var(--s2));
}
.field {
  margin: 0 0 var(--s4);
}
.field label {
  display: block;
  margin-bottom: var(--s1);
  font-weight: 600;
}
.field input {
  width: 100%;
}
.optional {
  font-weight: 400;
  color: var(--ink-2);
}
.hint {
  margin: var(--s1) 0 0;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  padding: var(--s4) 0 0;
}
/* The links at the top of a page, in one panel that is closed when the page loads (src/web/quick-links.ts).
   Its band looks like the heading of a folding panel. */
.quick-links {
  margin: 0 0 var(--s4);
}
.quick-links summary {
  display: block;
  position: relative;
  padding: var(--s3) var(--s7) var(--s3) var(--s5);
  list-style: none;
  cursor: pointer;
  background: var(--navy-wash);
  border-radius: var(--radius);
  color: var(--navy);
  font-weight: 650;
}
.quick-links summary::-webkit-details-marker {
  display: none;
}
.quick-links summary::after {
  content: '';
  position: absolute;
  top: calc(50% - 7px);
  right: var(--s5);
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  transform: rotate(45deg);
  transition: transform 160ms var(--ease-out);
}
.quick-links[open] summary::after {
  top: calc(50% - 3px);
  transform: rotate(225deg);
}
.quick-links summary:hover {
  background: #dcebf6;
}
.quick-links summary:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* The links of a page (under its title, and in a row of actions) look like its buttons (Douw, 30 Nov 2026).
   A link with a class of its own for another look keeps it: .button, and the "show all" of a filter. */
.actions a:not(.button):not(.reset),
.page-head .context a:not(.button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 var(--s4);
  border: 1.5px solid var(--navy);
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy);
  font: 600 0.9375rem/1 var(--font);
  text-decoration: none;
  transition: background-color 160ms var(--ease-out);
}
.actions a:not(.button):not(.reset):hover,
.page-head .context a:not(.button):hover {
  background: var(--navy-wash);
}
/* beside the text of the line, so a little lower than in a row of actions */
.page-head .context a:not(.button) {
  min-height: 34px;
  margin: 2px 4px 2px 0;
}
.actions.sticky {
  position: sticky;
  bottom: 0;
  margin: 0 calc(-1 * var(--s5));
  padding: var(--s3) var(--s5);
  background: #fff;
  border-top: 1px solid var(--rule);
  box-shadow: 0 -6px 12px -8px rgb(16 43 114 / 0.25);
}


.fold summary {
  display: inline-block;
  margin: 0 0 var(--s3) calc(1.75em + var(--s2));
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin: 0 0 var(--s6);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--rule);
}
.status-line p {
  margin: 0;
}

/* ---------- states and messages ---------- */

.state,
.tag {
  display: inline-block;
  margin-right: var(--s2);
  padding: 1px var(--s2);
  border: 1px solid currentColor;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
}
.state-on {
  color: var(--ok);
}
.state-off,
.tag {
  color: var(--ink-2);
  border-style: dashed;
}

.msg {
  margin: 0 0 var(--s5);
  padding: var(--s3) var(--s4);
  border: 1px solid;
  border-radius: var(--radius);
}
.msg-ok {
  border-color: var(--ok);
  background: var(--ok-wash);
  color: var(--ok);
}
.msg-error {
  border-color: var(--red-ink);
  background: var(--red-wash);
  color: var(--red-ink);
}
.msg-note {
  border-color: var(--navy);
  background: var(--navy-wash);
  color: var(--navy);
}

.empty {
  margin: 0;
  padding: var(--s4) 0 var(--s4) calc(1.75em + var(--s2));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink-2);
}
.note,
.muted {
  color: var(--ink-2);
}
.note {
  font-size: 0.875rem;
}

/* ---------- login as user ---------- */

.as-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  padding: var(--s3) var(--s5);
  background: var(--navy-deep);
  color: #fff;
  border-bottom: 1px dashed rgb(255 255 255 / 0.5);
}
.as-banner p {
  margin: 0;
}
.as-banner form {
  margin: 0;
}

/* ---------- audit log ---------- */

.field-inline label {
  display: block;
  margin-bottom: var(--s1);
  font-weight: 600;
}
.field-inline .reset {
  margin-left: var(--s3);
}
.audit .when {
  width: 1%;
  white-space: nowrap;
  color: var(--ink-2);
}
.audit tr.kind-access td,
.audit tr.kind-impersonate td {
  background: var(--ground-2);
}
.detail summary {
  margin-top: var(--s1);
  font-size: 0.8125rem;
  color: var(--navy);
  cursor: pointer;
}
.detail pre {
  margin: var(--s2) 0 0;
  padding: var(--s3);
  overflow-x: auto;
  background: var(--ground-2);
  border: 1px solid var(--rule-soft);
  font: 0.8125rem/1.4 var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
}
.pager {
  display: flex;
  gap: var(--s4);
  margin: var(--s4) 0 0;
}

.no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- building search: one search line, then photo cards ---------- */

.search-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s4) var(--s5);
}
.search-title .context {
  margin-top: var(--s1);
}
/* the search line is the same tinted panel as the filter bar (Douw, 2026-11-20): its own row
   under the title and the page's buttons */
.search-line {
  display: flex;
  flex: 1 1 100%;
  order: 4;
  justify-content: flex-start;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--s3) var(--s4);
  margin: 0;
  padding: var(--s3) var(--s4) var(--s4);
  background: var(--panel);
  border: 1px solid var(--panel-rule);
  border-radius: var(--radius);
}
.search-line > .field-inline > label {
  margin-bottom: 6px;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
/* each filter: its name on one line, its field on the next */
.search-line > .field-inline {
  flex: 0 1 170px;
  min-width: 0;
}
.search-line > .field-name {
  flex: 1 1 220px;
}
.search-line > .field-inline input,
.search-line > .field-inline select {
  width: 100%;
  max-width: none;
}
.search-line .reset {
  align-self: center;
  margin-left: var(--s1);
}
.more {
  position: relative;
}
.more summary {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 40px;
  padding: 0 var(--s3);
  border: 1px solid #8f97a8;
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.more summary::-webkit-details-marker {
  display: none;
}
.more summary::after {
  content: '';
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms var(--ease-out);
}
.more[open] summary::after {
  transform: translateY(1px) rotate(-135deg);
}
.more summary .count {
  margin: 0;
  border-color: var(--navy);
  color: var(--navy);
}
.more-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5;
  display: grid;
  gap: var(--s3);
  width: 300px;
  padding: var(--s4);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 28px -12px rgb(16 43 114 / 0.35);
}
.more-panel .field-inline select {
  width: 100%;
  max-width: none;
}

.stamp {
  position: absolute;
  left: var(--s2);
  bottom: var(--s2);
  padding: 3px var(--s2);
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy);
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 2px 6px -2px rgb(16 43 114 / 0.35);
}
.stamp strong {
  font-weight: 750;
}
.stamp-none {
  color: var(--ink-2);
  font-weight: 500;
}
.clamp {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* wide screens: the search line's fields stay on one row */
@media (min-width: 1181px) {
  .search-line {
    flex-wrap: nowrap;
  }
}
.empty.flush {
  padding-left: 0;
}
.pager span {
  color: var(--ink-2);
}

/* ---------- records: facts, photos, prose ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0 var(--s6);
  margin: 0;
  border-top: 1px solid var(--rule);
}
.facts > div {
  display: grid;
  grid-template-columns: 11em 1fr;
  gap: var(--s3);
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--rule-soft);
}
.facts dt {
  color: var(--ink-2);
}
.facts dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.facts .hint,
.sched-table .hint {
  display: block;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s2);
  margin: 0 0 var(--s7);
}
.gallery a {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ground-2);
}
.gallery a.lead-photo {
  grid-column: span 2;
  grid-row: span 2;
}
.gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.more-photos {
  margin: calc(-1 * var(--s6)) 0 var(--s7);
}

/* a broker's building request: the photo of the front they sent */
.request-facade {
  margin: 0 0 var(--s5);
}
.request-facade img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: var(--ground-2);
}
.more-photos summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
}
.gallery-rest {
  margin: var(--s3) 0 0;
}
.video {
  position: relative;
  max-width: 880px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.prose {
  max-width: 72ch;
}
.prose p {
  margin: 0 0 var(--s3);
}

.field-inline.wide input {
  width: 260px;
}
.field-inline.narrow input {
  width: 120px;
}
.field-inline select {
  max-width: 220px;
}
.check-inline label {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: 40px;
  font-weight: 400;
}
.check-inline input {
  width: 18px;
  height: 18px;
}

/* ---------- editing a record: panels of fields, each with its own Save ---------- */

.record-actions {
  margin: calc(-1 * var(--s3)) 0 var(--s5);
}
.edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--s5);
  max-width: 920px;
}
.edit-grid .field select,
.edit-grid .field input:not([type='checkbox']) {
  width: 100%;
}
.edit-grid .field-wide,
.edit-grid > .hint {
  grid-column: 1 / -1;
}
.edit-grid > .hint {
  margin: 0 0 var(--s4);
}
.field-number input {
  max-width: 14em;
  font-variant-numeric: tabular-nums;
}
textarea {
  width: 100%;
  min-height: 0;
  padding: var(--s2) var(--s3);
  line-height: 1.5;
  resize: vertical;
}
.field-check label {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: 40px;
  margin: 0;
  font-weight: 500;
}
.field-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
}
.field-check .hint {
  margin-top: 0;
  padding-left: calc(18px + var(--s2));
}
.edit-form .actions {
  margin-top: var(--s1);
}
.city-pick {
  margin-bottom: var(--s4);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--panel-rule);
}
.city-pick .actions {
  margin-top: 0;
}

/* ---------- stock: a schedule of units, and the unit's headline figures ---------- */

.stock-table .sunit {
  display: flex;
  align-items: center;
  gap: var(--s3);
  color: var(--ink);
  text-decoration: none;
}
.stock-table .sunit img,
.stock-table .sunit .no-photo {
  flex: none;
  width: 72px;
  height: 54px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--ground-2);
}
.stock-table .sname {
  display: block;
  color: var(--navy);
  font-weight: 600;
}
.stock-table a.sunit:hover .sname {
  text-decoration: underline;
}
.stock-table .date {
  white-space: nowrap;
}
.stock-table .spremises {
  display: block;
}
.field-size .range {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.field-size .range input {
  width: 100%;
  min-width: 0;
}
.hint.flush {
  margin: 0 0 var(--s2);
}

.figures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: calc(-1 * var(--s2)) 0 var(--s5);
  border-bottom: 1px solid var(--rule);
}
.figures > div {
  padding: var(--s3) var(--s4) var(--s3) 0;
}
.figures > div + div {
  padding-left: var(--s4);
  border-left: 1px solid var(--rule-soft);
}
.figures dt {
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.figures dd {
  margin: var(--s1) 0 0;
  color: var(--navy);
  font-size: 1.375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.figures small {
  font-size: 0.875rem;
  font-weight: 600;
}
.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.plain-list li {
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--rule-soft);
}

/* ---------- enquiries: status tabs, the client's message, history, the pipeline ---------- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s5);
  margin: calc(-1 * var(--s3)) 0 var(--s4);
  border-bottom: 1px solid var(--rule);
}
.tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--ink-2);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.tabs a:hover {
  color: var(--navy);
}
.tabs a[aria-current='page'] {
  color: var(--navy);
  border-bottom-color: var(--red);
}
.tag-warn {
  color: var(--red-ink);
  border-style: solid;
}
.conflict p {
  margin: 0 0 var(--s2);
}
.conflict .plain-list li {
  border-bottom-color: rgb(196 16 47 / 0.2);
}
.quote {
  max-width: 72ch;
  margin: 0 0 var(--s4);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  background: var(--ground-2);
}
.quote p:last-child {
  margin-bottom: 0;
}
.history {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 80ch;
}
.history li {
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--rule-soft);
}
.history-meta {
  margin: 0 0 var(--s1);
  font-size: 0.8125rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.history .prose p {
  margin: 0 0 var(--s2);
}
.progress-table td:first-child {
  min-width: 15em;
}
.progress-table .comment {
  min-width: 18em;
  max-width: 32em;
}
/* the Directors' report tables: a name column, then figures; the totals row closes the table */
.report-table tbody th {
  font-weight: 500;
  white-space: nowrap;
}
.report-table thead th {
  vertical-align: bottom;
}
.report-table thead th.num {
  white-space: normal;
  min-width: 5.5em;
}
.report-table tfoot th,
.report-table tfoot td {
  padding-top: var(--s3);
  border-top: 2px solid var(--navy);
  border-bottom: none;
  font-weight: 700;
  color: var(--navy);
}
.report-table .num .hint {
  display: block;
  white-space: nowrap;
}
.report-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: var(--s4);
  margin-bottom: var(--s4);
}
.report-chart {
  margin: 0 0 var(--s4);
}
.report-chart figcaption {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: var(--s2);
}
.report-chart svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 36rem;
}
.report-chart text {
  font-size: 10px;
  fill: var(--ink-2);
}
.report-chart .grid {
  stroke: var(--rule-soft);
  stroke-width: 1;
}
.report-chart .line {
  fill: none;
  stroke: var(--navy);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.report-chart .dot {
  fill: var(--navy);
}

/* report charts above the tables (src/web/charts.ts): columns per month, bars per name */
.chart {
  margin: 0 0 var(--s5);
  min-width: 0;
}
.chart figcaption {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: var(--s3);
}
.chart .t1 {
  fill: #1a62a8;
  background: #1a62a8;
}
.chart .t2 {
  fill: #7cae34;
  background: #7cae34;
}
.chart .t3 {
  fill: #4ca3dd;
  background: #4ca3dd;
}
.chart .t4 {
  fill: #2e6b34;
  background: #2e6b34;
}
.chart .t5 {
  fill: #0a9d8f;
  background: #0a9d8f;
}
.chart-cols {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: flex;
  align-items: stretch;
  gap: 3px;
  height: 160px;
  border-bottom: 1px solid var(--rule);
}
.chart-cols.dense {
  gap: 1px;
}
.chart-cols li {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
}
.chart-cols svg {
  display: block;
  width: 100%;
  height: 100%;
}
.chart-cols li:hover svg {
  opacity: 0.8;
}
.chart-cols .lab {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 5px;
  font-size: 0.6875rem;
  color: var(--ink-2);
  white-space: nowrap;
}
.chart-cols .lab.n {
  display: block;
}
/* the first and last labels stay inside the chart */
.chart-cols .lab.start {
  left: 0;
  transform: none;
}
.chart-cols .lab.end {
  left: auto;
  right: 0;
  transform: none;
}
@media (min-width: 600px) {
  .chart-cols .lab.n {
    display: none;
  }
  .chart-cols .lab.w {
    display: block;
  }
}
.chart-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s2);
}
.chart-bars li {
  display: grid;
  grid-template-columns: minmax(0, 15em) 1fr auto;
  align-items: center;
  gap: var(--s3);
  font-size: 0.875rem;
}
.chart-bars .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-bars svg {
  display: block;
  width: 100%;
  height: 12px;
  border-radius: 6px;
  background: var(--rule-soft);
}
.chart-bars .val {
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  min-width: 3.5em;
  text-align: right;
}
@media (max-width: 599px) {
  .chart-bars li {
    grid-template-columns: minmax(0, 7.5em) 1fr auto;
  }
}
.chart-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  margin: var(--s3) 0 0;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.chart-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
}
.chart-high {
  color: var(--ink-2);
  font-size: 0.8125rem;
  margin: var(--s2) 0 0;
}
.progress-table tfoot th,
.progress-table tfoot td {
  padding-top: var(--s3);
  border-top: 2px solid var(--navy);
  font-weight: 700;
  color: var(--navy);
}
.progress-table .num .hint,
.progress-table .date .hint {
  white-space: nowrap;
}

/* ---------- index pages: one row anatomy for stock, enquiries and the lists to come ---------- */

.tab-count {
  margin-left: 6px;
  color: var(--ink-2);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.tabs a[aria-current='page'] .tab-count {
  color: var(--navy);
}
.chip {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: baseline;
}
.chip-on {
  color: var(--ok);
  background: var(--ok-wash);
}
.chip-navy {
  color: var(--navy);
  background: var(--navy-wash);
}
.chip-off {
  color: var(--ink-2);
  border-style: dashed;
}
.chip-warn {
  color: var(--red-ink);
  border-style: dashed;
}

.index-table tbody tr {
  position: relative;
}
.index-table tbody td {
  padding-top: var(--s4);
  padding-bottom: var(--s4);
  vertical-align: top;
}
.index-table tbody tr:hover td {
  background: var(--ground-2);
}
.index-table .ix-main {
  width: 34%;
  min-width: 18em;
}
.index-table .ix-where {
  min-width: 11em;
}
.age-stamp.is-new strong {
  font-size: 1.0625rem;
}
/* between a phone and a wide screen the last column goes (each record still shows it) */
@media (min-width: 761px) and (max-width: 1100px) {
  .index-table .ix-changed {
    display: none;
  }
  .index-table .ix-main {
    min-width: 15em;
  }
  .index-table .ix-where {
    min-width: 8em;
  }
  .ix-visual {
    width: 80px;
    height: 60px;
  }
}
.ix-link {
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
  color: var(--ink);
  text-decoration: none;
}
/* the whole row opens the record */
a.ix-link::after {
  content: '';
  position: absolute;
  inset: 0;
}
a.ix-link:focus-visible {
  outline: none;
}
.index-table tbody tr:has(a.ix-link:focus-visible) {
  outline: 2px solid var(--navy);
  outline-offset: -2px;
}
.ix-visual {
  flex: none;
  width: 96px;
  height: 72px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ground-2);
}
.ix-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms var(--ease-out);
}
.index-table tbody tr:hover .ix-visual img {
  transform: scale(1.04);
}
.ix-visual .no-photo {
  font-size: 0.75rem;
}
.ix-text {
  min-width: 0;
  padding-top: 1px;
}
.ix-name {
  display: block;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.3;
  text-wrap: balance;
}
a.ix-link:hover .ix-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ix-sub {
  display: block;
  margin-top: 2px;
  line-height: 1.35;
}
.ix-meta {
  display: block;
  margin-top: var(--s1);
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.ix-meta .chip {
  margin-left: var(--s1);
  font-size: 0.75rem;
  padding: 0 5px;
}
.ix-strong {
  display: block;
  font-weight: 600;
}
.ix-hint {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 400;
}
.ix-val {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ix-unit {
  margin-left: 2px;
  color: var(--ink-2);
  font-size: 0.8125rem;
}
.index-table td.num {
  white-space: nowrap;
}
.ix-changed {
  color: var(--ink-2);
  white-space: nowrap;
}
.age-stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  background: var(--navy-wash);
  color: var(--navy);
  line-height: 1.1;
}
.age-stamp strong {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.age-stamp small {
  font-size: 0.75rem;
  font-weight: 600;
}
.age-stamp.is-old {
  border-style: dashed;
  border-color: var(--ink-2);
  background: #fff;
  color: var(--ink-2);
}
.enquiry-table .ix-visual {
  width: 64px;
  height: 64px;
}

/* ---------- phone ---------- */

@media (max-width: 760px) {
  .bar {
    flex-wrap: wrap;
    gap: 0 var(--s3);
    padding: 0 var(--s4);
  }
  .brand {
    min-height: 64px;
  }
  .brand img {
    height: 40px;
  }
  .menu {
    display: none;
  }
  .site-menu-panel {
    right: var(--s4);
    left: var(--s4);
    width: auto;
  }
  button.on-bar {
    min-height: 44px;
  }
  .tick-row {
    min-height: 52px;
    align-items: center;
  }
  input.initial {
    width: 32px;
    height: 32px;
  }
  button,
  .button,
  .actions a:not(.button):not(.reset),
  .page-head .context a:not(.button),
  input:not([type='checkbox']):not([type='hidden']),
  select {
    min-height: 44px;
  }
  .page {
    padding: var(--s5) var(--s4) var(--s7);
  }
  .page-head h1 {
    font-size: 1.5rem;
  }
  .actions.sticky {
    margin: 0 calc(-1 * var(--s4));
    padding: var(--s3) var(--s4);
  }
  .actions button {
    flex: 1;
  }
  .fields,
  .fold summary,
  .sched .intro,
  .empty {
    padding-left: 0;
    margin-left: 0;
  }
  .rows li {
    padding-left: 0;
  }
  .tick-row label {
    gap: 0 var(--s2);
  }
  .tick-row .clause {
    min-width: 2.25em;
  }
  .tick-row .label {
    flex: 1;
    min-width: 0;
  }
  .clause-group .tick-row .hint {
    margin-left: calc(2.25em + var(--s2));
  }

  .facts > div {
    grid-template-columns: 9em 1fr;
  }
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .filters .field-inline,
  .filters .field-inline input,
  .filters .field-inline select {
    width: 100%;
    max-width: none;
  }

  /* phone: name on its own line, the two main filters side by side, then More filters and Search */
  .search-line {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .search-line .field-name,
  .search-line .more,
  .search-line button {
    grid-column: 1 / -1;
  }
  .search-line button {
    width: 100%;
  }
  .search-line .reset {
    align-self: center;
    justify-self: start;
  }
  .more summary {
    width: 100%;
    justify-content: space-between;
  }
  .more-panel {
    position: static;
    width: 100%;
    margin-top: var(--s2);
    box-shadow: none;
  }

  /* tables that stack: each row becomes a block of labelled lines */
  .sched-table.stack thead {
    display: none;
  }
  .sched-table.stack,
  .sched-table.stack tbody,
  .sched-table.stack tr,
  .sched-table.stack tbody th,
  .sched-table.stack td {
    display: block;
    width: auto;
  }
  .sched-table.stack tr {
    padding: var(--s3) 0;
    border-bottom: 1px solid var(--rule);
  }
  .sched-table.stack td {
    padding: 2px 0;
    border: 0;
    text-align: left;
    white-space: normal;
  }
  .sched-table.stack td:first-child {
    font-size: 1.0625rem;
    font-weight: 600;
  }
  .sched-table.stack:not(.feed-table) td:not(:first-child)[data-label]::before {
    content: attr(data-label) ': ';
    color: var(--ink-2);
  }
  /* the label that every cell of a stacked table gets from its column heading (labelCells, views.ts) */
  .sched-table.stack:not(.feed-table) td:not(:first-child)[data-col]::before {
    content: attr(data-col) ': ';
    color: var(--ink-2);
  }
  .sched-table.stack tbody tr:hover td {
    background: none;
  }
  /* index rows: picture and name across, then the figures in a small grid with their labels above */
  .index-table thead {
    display: none;
  }
  .index-table,
  .index-table tbody {
    display: block;
  }
  .index-table tbody tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s3) var(--s3);
    padding: var(--s4) 0;
    border-bottom: 1px solid var(--rule);
  }
  .index-table tbody td {
    display: block;
    padding: 0;
    border: 0;
    text-align: left;
    white-space: normal;
  }
  .index-table tbody td.ix-main,
  .index-table tbody td.ix-where {
    grid-column: 1 / -1;
    width: auto;
    min-width: 0;
  }
  .index-table tbody td:not(.ix-main)::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--ink-2);
    font-size: 0.75rem;
  }
  .index-table tbody tr:hover td {
    background: none;
  }
  .ix-visual {
    width: 88px;
    height: 66px;
  }
  .enquiry-table .ix-visual {
    width: 56px;
    height: 56px;
  }
  .progress-table tfoot {
    display: none;
  }
  .progress-table .comment {
    min-width: 0;
    max-width: none;
  }
  .tabs {
    gap: 0 var(--s4);
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .tabs a {
    white-space: nowrap;
  }
  .sched {
    padding: 0 var(--s4) var(--s4);
  }
  .edit-grid {
    grid-template-columns: 1fr;
  }
  .field-number input {
    max-width: none;
  }
  .sched > h2 {
    margin: 0 calc(-1 * var(--s4)) var(--s3);
    padding: var(--s3) var(--s4);
  }
  .stock-table.stack td:first-child {
    font-size: 1rem;
    font-weight: 400;
    padding-bottom: var(--s2);
  }
  .figures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .figures > div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .figures > div:nth-child(n + 3) {
    border-top: 1px solid var(--rule-soft);
  }

  /* wide tables that do not stack scroll sideways inside the page */
  .sched-table:not(.stack) {
    display: block;
    overflow-x: auto;
  }
  .sched-table:not(.stack) .code {
    display: none;
  }
}

/* ---------- Property24 on the unit page ---------- */
.p24-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  margin: 0 0 var(--s3);
}

/* ---------- photos: the manager page ---------- */
.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s5) var(--s4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.photo-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--ground-2);
}
.photo-meta {
  margin: var(--s2) 0 var(--s2);
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s2);
}
.photo-actions form {
  margin: 0;
}
.photo-actions button {
  min-height: 32px;
  padding: 0 var(--s3);
  font-size: 0.8125rem;
}
.upload-form input[type='file'],
.edit-form input[type='file'] {
  width: 100%;
  max-width: 480px;
  padding: var(--s2);
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  background: #fff;
}
@media (max-width: 760px) {
  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .photo-actions button {
    min-height: 40px;
  }
}

/* ---------- video upload ---------- */
.video-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  margin: var(--s3) 0 0;
}
.video-progress progress {
  width: min(420px, 100%);
  height: 10px;
  accent-color: var(--navy);
}
.video-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s1) var(--s2);
}
.video-list .hint {
  flex-basis: 100%;
}
.video-progress[hidden] {
  display: none;
}

/* the unit's writeup: the count turns red while it is short of the minimum */
.writeup-form textarea {
  max-width: 72ch;
}
.writeup-count {
  font-variant-numeric: tabular-nums;
}
.writeup-count.writeup-short {
  color: var(--red-ink);
}

/* a value that cannot change here (a unit over 10 days old): read like a filled field, not an input */
.field .label {
  display: block;
  margin-bottom: var(--s1);
  font-weight: 600;
}
.field .fixed {
  margin: 0;
  min-height: 40px;
  padding: var(--s2) 0;
  font-weight: 600;
}

/* ---------- the bulk stock grid: a wide sheet for data capture on desktop ---------- */
.grid-scroll {
  overflow-x: auto;
  margin: 0 0 var(--s4);
  border: 1px solid var(--panel-rule);
  border-radius: var(--radius);
  background: var(--panel);
}
.grid-scroll:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
.stock-grid {
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 100%;
}
.stock-grid th,
.stock-grid td {
  padding: var(--s1) var(--s2);
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
  text-align: left;
}
.stock-grid thead th {
  position: sticky;
  top: 0;
  background: var(--navy-wash);
  color: var(--navy-deep);
  font-weight: 600;
  white-space: nowrap;
  vertical-align: bottom;
}
.stock-grid th.num,
.stock-grid td.num {
  text-align: right;
}
.stock-grid th.tick,
.stock-grid td.tick {
  text-align: center;
}
/* the reference stays in view while the sheet scrolls sideways */
.stock-grid .grid-ref,
.stock-grid thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--panel);
  white-space: nowrap;
}
.stock-grid thead th:first-child {
  z-index: 2;
  background: var(--navy-wash);
}
.stock-grid .grid-ref .tag {
  display: block;
  width: max-content;
  margin: var(--s1) 0 0;
  font-weight: 400;
  font-size: 0.75rem;
}
.stock-grid .tag-new {
  color: var(--ok);
}
.stock-grid input:not([type='checkbox']),
.stock-grid select,
.stock-grid textarea {
  min-height: 32px;
  padding: 0 var(--s2);
  font-size: 0.875rem;
}
.stock-grid td.num input {
  width: 6.5em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.stock-grid .grid-text {
  width: 9em;
}
.stock-grid select {
  max-width: 13em;
}
.stock-grid .grid-notes {
  width: 14em;
  min-height: 32px;
  padding: var(--s1) var(--s2);
}
.stock-grid .grid-fixed {
  display: inline-block;
  padding-top: var(--s1);
  color: var(--ink-2);
}
.copy-down {
  display: block;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  text-decoration: underline;
  cursor: pointer;
}
.stock-grid .grid-row-error > * {
  background: var(--red-wash);
}
.stock-grid .grid-problem td {
  padding-top: 0;
  background: var(--red-wash);
}
.stock-grid .grid-problem .msg {
  margin: 0;
}
/* on a wide screen the grid takes the screen's width, not the reading width of the page */
@media (min-width: 1200px) {
  .grid-scroll {
    width: min(calc(100vw - 64px), 1880px);
    margin-left: calc(50% - min(calc(50vw - 32px), 940px));
  }
}

/* the client's own words on the enquiry's edit page: set apart as a quote */
.enquiry-message {
  margin: 0 0 var(--s4);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  background: var(--ground-2);
  color: var(--ink-2);
  max-width: 72ch;
}

/* ---------- the invoice request ---------- */
.form-part {
  margin: var(--s5) 0 var(--s3);
  font-size: 1rem;
  color: var(--navy-deep);
}
.form-part:first-of-type {
  margin-top: 0;
}
/* the moves the person may make now, side by side; a reason box above those that need one */
.moves {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  align-items: flex-end;
  margin-top: var(--s4);
}
.move-form .field {
  margin-bottom: var(--s2);
}
.move-form textarea {
  width: min(32ch, 100%);
}
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.timeline li {
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--rule-soft);
}
.doc-table td {
  vertical-align: top;
}
.doc-upload {
  margin-top: var(--s4);
}

/* ---------- geo: tick lists in columns on wide screens ---------- */
@media (min-width: 720px) {
  .ticks.columns {
    columns: 3 14rem;
    column-gap: var(--s5);
  }
  .ticks.columns .tick-row {
    break-inside: avoid;
  }
}
.status-grid input.initial {
  vertical-align: middle;
}
.status-grid .short {
  display: none;
}
@media (max-width: 600px) {
  .status-grid .long {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .status-grid .short {
    display: inline;
  }
  .status-grid th,
  .status-grid td {
    padding-left: var(--s2);
    padding-right: var(--s2);
  }
}

/* ---------- the stock report's options ---------- */
.report-options .order-input {
  width: 3.5em;
  min-width: 3.5em;
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
}
.report-options textarea {
  width: 100%;
  min-width: 12rem;
}
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}
/* in a table of many columns the cells stand closer */
.table-scroll .sched-table th:nth-child(7) ~ th,
.table-scroll .sched-table:has(th:nth-child(8)) th,
.table-scroll .sched-table:has(th:nth-child(8)) td {
  padding-left: var(--s2);
  padding-right: var(--s2);
  font-size: 0.8125rem;
}
@media (max-width: 720px) {
  .report-options thead {
    display: none;
  }
  .report-options,
  .report-options tbody {
    display: block;
  }
  .report-options tr {
    display: grid;
    grid-template-columns: 4em 1fr auto;
    column-gap: var(--s3);
    align-items: start;
    padding: var(--s3) 0;
    border-bottom: 1px solid var(--rule-soft);
  }
  .report-options td {
    display: block;
    padding: 0;
    border: 0;
  }
  .report-options td:nth-child(1) {
    grid-row: span 2;
  }
  .report-options td:nth-child(2) {
    grid-column: 2 / 4;
  }
  .report-options td:nth-child(5),
  .report-options td:nth-child(6) {
    grid-column: 1 / 4;
    margin-top: var(--s2);
    text-align: left;
  }
  .report-options textarea {
    min-width: 0;
  }
  .report-options td:nth-child(6)::before {
    content: 'Take out ';
    color: var(--ink-2);
    margin-right: var(--s2);
    vertical-align: middle;
  }
}

/* ---------- for sale ---------- */
form.inline {
  display: inline;
}
button.link {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.record-actions.moves {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s3);
  align-items: center;
}

.site-date {
  white-space: nowrap;
}

/* ---------- the map on a property's page ---------- */
.map-card {
  max-width: 880px;
  margin: 0 0 var(--space-5, 24px);
}
.map-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.map-card figcaption {
  margin-top: 6px;
  font-size: 0.875rem;
}

/* the Buildings page's buttons get their own row under the title and search */
.search-head {
  flex-wrap: wrap;
}
.search-head .record-actions {
  order: 3;
  flex-basis: 100%;
  margin: 0;
}

/* ---------- the managed schedule's actions ---------- */
.inline-form {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin: 0 var(--s2) var(--s1) 0;
}
.confirm-send {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  font-size: 0.875rem;
  white-space: nowrap;
}

.field-label {
  display: block;
  font-weight: 600;
}
.field-label + p {
  margin: var(--s1) 0 0;
}

/* ---------- the expiry diary: leases grouped by how near their end is ---------- */

.tab-count {
  margin-left: var(--s1);
  padding: 0 6px;
  border-radius: var(--radius);
  background: var(--navy-wash);
  color: var(--navy);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.chip-ended {
  color: var(--red-ink);
  background: var(--red-wash);
  border-color: transparent;
}
.lease-bar {
  display: flex;
  align-items: center;
  gap: var(--s4);
  margin: calc(-1 * var(--s3)) 0 var(--s4);
  border-bottom: 1px solid var(--rule);
}
.lease-bar .tabs {
  flex: 1 1 auto;
  margin: 0;
  border-bottom: 0;
}
.lease-bar .button {
  flex: none;
  margin-bottom: var(--s2);
}
.lease-table {
  table-layout: fixed;
}
.lease-table th,
.lease-table td {
  overflow-wrap: anywhere;
}
.lease-table tbody tr {
  position: relative;
}
.lease-table .l-broker {
  width: 11rem;
}
.lease-table .l-size {
  width: 6.5rem;
  font-variant-numeric: tabular-nums;
}
.lease-table .l-ends {
  width: 17rem;
}
.lease-link {
  color: var(--navy);
  font-weight: 650;
  text-decoration: none;
}
/* the whole row opens the lease */
.lease-link::after {
  content: '';
  position: absolute;
  inset: 0;
}
.lease-table tbody tr:hover .lease-link {
  text-decoration: underline;
}
.lease-link:focus-visible {
  outline: none;
}
.lease-link:focus-visible::after {
  outline: 2px solid var(--navy);
  outline-offset: -2px;
}
.lease-date {
  display: inline-block;
  min-width: 6.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* phones: each lease is a short block, the end date beside the tenant */
@media (max-width: 720px) {
  .lease-bar {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: var(--s3);
    margin-top: 0;
  }
  .lease-bar .button {
    margin-bottom: 0;
    text-align: center;
  }
  .lease-table,
  .lease-table tbody {
    display: block;
  }
  .lease-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .lease-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px var(--s3);
    padding: var(--s3);
    border-bottom: 1px solid var(--rule-soft);
  }
  .lease-table tbody td {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
    text-align: left;
    white-space: normal;
  }
  .lease-table .l-tenant {
    grid-column: 1;
  }
  .lease-table .l-ends {
    grid-column: 2;
    grid-row: 1 / span 2;
    text-align: right;
  }
  .lease-table .l-ends .chip {
    margin-top: 2px;
  }
  .lease-date {
    display: block;
    min-width: 0;
  }
  .lease-table .l-broker,
  .lease-table .l-size,
  .lease-table .l-ends {
    width: auto;
  }
  .lease-table .l-building {
    grid-column: 1 / -1;
    margin-top: var(--s1);
  }
  .lease-table .l-broker {
    grid-column: 1;
  }
  .lease-table .l-size {
    grid-column: 2;
    text-align: right;
  }
  .lease-table .l-building,
  .lease-table .l-broker,
  .lease-table .l-size {
    color: var(--ink-2);
    font-size: 0.875rem;
  }
  .lease-table .l-building .hint {
    display: inline;
  }
  .lease-table .l-building .hint::before {
    content: ', ';
  }
}

/* the data error list: the report's words under its details */
.facts + .quote {
  margin-top: var(--s4);
}

/* bulk mail: a template shown as the mail will look */
.mail-preview {
  display: block;
  width: 100%;
  max-width: 660px;
  height: 900px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #eef1f6;
}

/* ---------- filter bars: a list's or a report's filters on one panel, the button at the row's end ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--s3) var(--s4);
  margin: 0 0 var(--s5);
  padding: var(--s3) var(--s4) var(--s4);
  background: var(--panel);
  border: 1px solid var(--panel-rule);
  border-radius: var(--radius);
}
/* inside a schedule section the section is the panel */
.sched .filter-bar {
  padding: 0;
  background: none;
  border: 0;
}
.filter-bar .edit-grid {
  display: contents;
}
.filter-bar .field,
.filter-bar .field-inline {
  flex: 1 1 9rem;
  min-width: 0;
  max-width: 15rem;
  margin: 0;
}
/* words to search for get more room; dates and sizes less */
.filter-bar .field:not(.field-number):has(> input:not([type])),
.filter-bar .field:has(> input[type='search']),
.filter-bar .field-words {
  flex: 2 1 15rem;
  max-width: 24rem;
}
.filter-bar .field:has(> input[type='date']),
.filter-bar .field-number {
  flex: 0 1 10rem;
}
.filter-bar .field label,
.filter-bar .field-inline label {
  margin-bottom: 6px;
  overflow: hidden;
  font-size: 0.8125rem;
  color: var(--ink-2);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.filter-bar .field label .optional {
  font-size: 0.75rem;
}
.filter-bar select,
.filter-bar input:not([type='checkbox']) {
  width: 100%;
  max-width: none;
}
.filter-bar .field .hint {
  display: none;
}
.filter-bar > .hint,
.filter-bar .edit-grid > .hint {
  align-self: center;
  margin: 0;
}
.filter-bar .actions {
  flex: 0 0 auto;
  align-items: center;
  gap: var(--s3);
  margin: 0;
  padding: 0;
}
/* the button that runs the filter is the one action here, so it is the solid one */
.filter-bar .actions button.secondary {
  background: var(--navy);
  color: #fff;
}
.filter-bar .actions button.secondary:hover {
  background: var(--navy-deep);
}
.filter-bar .reset {
  margin: 0;
  white-space: nowrap;
}
@media (max-width: 599px) {
  .filter-bar {
    gap: var(--s3);
    padding: var(--s3);
  }
  .filter-bar .field,
  .filter-bar .field-inline,
  .filter-bar .field:has(> input[type='date']),
  .filter-bar .field-number {
    flex: 1 1 calc(50% - var(--s3));
    max-width: none;
  }
  .filter-bar .field:not(.field-number):has(> input:not([type])),
  .filter-bar .field:has(> input[type='search']),
  .filter-bar .field-words {
    flex-basis: 100%;
    max-width: none;
  }
  .filter-bar .actions {
    flex: 1 1 100%;
  }
  .filter-bar .actions button {
    flex: 1;
  }
}

/* ---------- stock search: a card a unit (Douw, 2026-11-20) ----------
   photo with the size stamp and when it is available, the unit, then its figures in a schedule
   strip at the same place on every card, so units compare at a glance */
.scards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s5);
  margin: 0 0 var(--s5);
  padding: 0;
  list-style: none;
}
.scards > li {
  display: flex;
  min-width: 0;
}
.scard {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--panel-rule);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 160ms var(--ease-out);
}
a.scard:hover,
.scard:has(.scard-link:hover) {
  border-color: var(--navy);
}
a.scard:focus-visible,
.scard:has(.scard-link:focus-visible) {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}
/* a card with more than one link (a building: its page, and the contact's number): the name is
   the link and stretches over the card; the number sits above it */
.scard {
  position: relative;
}
.scard-link {
  color: inherit;
  text-decoration: none;
}
.scard-link::after {
  content: '';
  position: absolute;
  inset: 0;
}
.scard-link:focus-visible {
  outline: none;
}
.stel {
  position: relative;
  z-index: 1;
  display: block;
  font-variant-numeric: tabular-nums;
}
.sfig .clamp {
  display: block;
}
/* the for-sale "not updated" tab: a tick box on each card, above the card's link */
.stick {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 0.875rem;
}
.swide {
  grid-column: 1 / -1;
}
.scard.is-off .sphoto img {
  filter: grayscale(0.7);
  opacity: 0.8;
}
.sphoto {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ground-2);
}
.sphoto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease-out);
}
a.scard:hover .sphoto img,
.scard:has(.scard-link:hover) .sphoto img {
  transform: scale(1.03);
}
.sstate {
  position: absolute;
  top: var(--s2);
  left: var(--s2);
}
.sstate .chip {
  background-color: #fff;
  box-shadow: 0 2px 6px -2px rgb(16 43 114 / 0.35);
}
.sstate .chip-on {
  background-color: var(--ok-wash);
}
.sbody {
  display: grid;
  gap: 2px;
  padding: var(--s3) var(--s4) var(--s3);
  min-width: 0;
}
.sname {
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.3;
  text-wrap: balance;
}
a.scard:hover .sname,
.scard-link:hover {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.ssub {
  font-weight: 500;
}
.smeta {
  font-size: 0.875rem;
  color: var(--ink-2);
}
.smeta .chip {
  font-size: 0.75rem;
}
.sfigs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s2) var(--s3);
  margin-top: auto;
  padding: var(--s3) var(--s4);
  border-top: 1px solid var(--panel-rule);
  background: var(--panel);
}
.sfig {
  min-width: 0;
  font-size: 0.9375rem;
  white-space: nowrap;
}
.slabel {
  display: block;
  margin-bottom: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-2);
}
.slabel {
  white-space: nowrap;
}
.swhen {
  grid-column: 1 / -1;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.is-private .sphoto img {
  filter: grayscale(0.7);
  opacity: 0.8;
}
@media (max-width: 1180px) {
  .scards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .scards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 599px) {
  .scards {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s4);
  }
}
@media (prefers-reduced-motion: reduce) {
  .sphoto img {
    transition: none;
  }
}

/* a person's photo on their page (the people pages, 2026-11-21) */
.person-photo {
  display: block;
  width: 130px;
  height: auto;
  border: 1px solid var(--panel-rule);
  border-radius: var(--radius);
}

/* the people list: a small photo beside the name */
.person-cell {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.person-thumb {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ground-2);
  object-fit: cover;
}

/* area profile photos (the website pages, 2026-11-21) */
.profile-photos {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  margin: 0 0 var(--s4);
  padding: 0;
  list-style: none;
}
.profile-photo {
  display: grid;
  gap: var(--s1);
  justify-items: start;
}
.profile-photo img {
  border: 1px solid var(--panel-rule);
  border-radius: var(--radius);
}

/* the signature pad (public/signature.js draws on the canvas) */
.signature-pad {
  display: grid;
  gap: var(--s2);
  max-width: 640px;
}
.signature-canvas {
  display: block;
  width: 100%;
  height: 200px;
  background: #fff;
  border: 1px solid #8f97a8;
  border-radius: var(--radius);
  cursor: crosshair;
  /* the page must not scroll or zoom while a line is drawn */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.signature-tools {
  display: flex;
  gap: var(--s3);
}
.signature-tools button {
  min-height: 44px;
}
.signature-error {
  margin: var(--s1) 0 0;
  color: var(--red-ink);
  font-weight: 600;
}
.signature-error[hidden] {
  display: none;
}
.signature {
  display: block;
  max-width: 100%;
  width: 320px;
  background: #fff;
  border: 1px solid var(--panel-rule);
  border-radius: var(--radius);
}

/* the map of all sites: a box of at most 960 by 600, the full width on a phone */
.map-canvas {
  width: 100%;
  max-width: 960px;
  height: 600px;
  background: var(--ground-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
@media (max-width: 599px) {
  .map-canvas {
    height: 70vh;
    max-height: 600px;
  }
}

/* a small status mark: a filled green dot for ok, a red ring for not ok (the title holds the words) */
.mark {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  border-radius: 50%;
  vertical-align: -0.05em;
}
.mark-ok {
  background: var(--ok);
}
.mark-no {
  background: #fff;
  border: 2px solid var(--red-ink);
}

fieldset.read-only {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

/* the map on "Create a New Building" (the RKF CRM's map picker) */
.map-picker .map-search {
  width: 100%;
  max-width: 36rem;
  margin-bottom: var(--s2);
}
.map-picker .map-canvas {
  width: 100%;
  height: 22rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
}
@media (max-width: 760px) {
  .map-picker .map-canvas {
    height: 16rem;
  }
}

/* two forms in one folding panel (a quote: e-mail it, upload one) */
.sched.accordion details > form + form {
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--panel-rule);
}

/* ---------- job card feeds on a phone: a block per card ---------- */
/* The three feeds (and the finance copy of the maintenance one). The cells keep the order of the desktop
   columns, so they are placed and labelled here by column number: change these when a column moves. */
@media (max-width: 760px) {
  .sched-table.stack.feed-table tbody {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s3);
  }
  .sched-table.stack.feed-table tbody tr {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-content: start;
    gap: var(--s2) var(--s3);
    padding: var(--s3) var(--s3) var(--s4);
    background: var(--ground);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
  }
  /* the rule between what the job is and its dates and people */
  .feed-table tbody tr::after {
    content: '';
    grid-column: 1 / -1;
    border-top: 1px solid var(--panel-rule);
  }
  /* outweighs the closer, smaller cells of a table with many columns */
  .table-scroll .sched-table.stack.feed-table tbody td {
    grid-column: span 3;
    min-width: 0;
    padding: 0;
    background: none;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  /* a small label above each fact */
  .sched-table.stack.feed-table td::before {
    display: block;
    color: var(--ink-2);
    font-size: 0.75rem;
    font-weight: 600;
  }

  /* the name of the building, across the top, with room for the chevron */
  .table-scroll .feed-maintenance.sched-table.stack tbody td:nth-child(2),
  .table-scroll .feed-calls.sched-table.stack tbody td:nth-child(8) {
    grid-row: 1;
    grid-column: 1 / -1;
    padding-right: var(--s6);
    color: var(--navy);
    font-size: 1.0625rem;
    font-weight: 650;
    line-height: 1.35;
  }
  .feed-maintenance.sched-table.stack td:nth-child(2)::before,
  .feed-calls.sched-table.stack td:nth-child(n + 8)::before,
  .feed-calls.sched-table.stack td:nth-child(2)::before,
  .feed-maintenance.sched-table.stack td:nth-child(3)::before,
  .feed-maintenance.sched-table.stack td:nth-child(5)::before {
    content: none;
  }

  /* the one link of a card covers the whole block, with the back link's chevron turned forward */
  .feed-table td a::after {
    content: '';
    position: absolute;
    inset: 0;
  }
  .feed-table td a::before {
    content: '';
    position: absolute;
    top: 1.25rem;
    right: var(--s4);
    width: 9px;
    height: 9px;
    border-top: 2px solid var(--navy);
    border-right: 2px solid var(--navy);
    transform: rotate(45deg);
  }
  .sched-table.stack.feed-table tbody tr:has(a:active) {
    background: var(--navy-wash);
  }
  .sched-table.stack.feed-table tbody tr:has(a:focus-visible) {
    outline: 2px solid var(--navy);
    outline-offset: 1px;
  }
  .feed-table td a:focus-visible {
    outline: none;
  }

  /* the job number */
  .table-scroll .sched-table.stack.feed-table tbody td:first-child {
    grid-column: 1 / 3;
    align-self: center;
    color: var(--ink-2);
    font-size: 0.875rem;
    font-weight: 600;
  }
  .sched-table.stack.feed-table td:first-child::before {
    content: 'Job ';
    display: inline;
    font-size: inherit;
  }

  /* the status as a chip at the right: the word says it, whatever the colour */
  .table-scroll .feed-maintenance.sched-table.stack tbody td:nth-child(5),
  .table-scroll .feed-calls.sched-table.stack tbody td:nth-child(2) {
    justify-self: end;
    align-self: center;
    padding: 2px var(--s2);
    background: var(--navy-wash);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    color: var(--ink);
    font-size: 0.8125rem;
    font-weight: 600;
  }

  /* maintenance: name; job, type, status; start and progress; supervisor and confirmed; admin check */
  .feed-maintenance td:nth-child(1),
  .feed-maintenance td:nth-child(3),
  .feed-maintenance td:nth-child(5) {
    grid-row: 2;
  }
  .table-scroll .feed-maintenance.sched-table.stack tbody td:nth-child(3) {
    grid-column: 3 / 5;
    align-self: center;
    color: var(--ink-2);
    font-size: 0.875rem;
  }
  /* may reach back over the empty end of the type's cell, so "Completed" never breaks */
  .table-scroll .feed-maintenance.sched-table.stack tbody td:nth-child(5) {
    grid-column: 3 / 7;
  }
  .feed-maintenance tbody tr::after {
    grid-row: 3;
  }
  .feed-maintenance td:nth-child(4),
  .feed-maintenance td:nth-child(6) {
    grid-row: 4;
  }
  .feed-maintenance td:nth-child(7),
  .feed-maintenance td:nth-child(8) {
    grid-row: 5;
  }
  .table-scroll .feed-maintenance.sched-table.stack tbody td:nth-child(6),
  .table-scroll .feed-maintenance.sched-table.stack tbody td:nth-child(8) {
    grid-column: 1 / 4;
  }
  .table-scroll .feed-maintenance.sched-table.stack tbody td:nth-child(4),
  .table-scroll .feed-maintenance.sched-table.stack tbody td:nth-child(7) {
    grid-column: 4 / 7;
  }
  .table-scroll .feed-maintenance.sched-table.stack tbody td:nth-child(9) {
    grid-row: 6;
    grid-column: 1 / -1;
  }
  .feed-maintenance.sched-table.stack td:nth-child(4)::before {
    content: 'Progress';
  }
  .feed-maintenance.sched-table.stack td:nth-child(6)::before {
    content: 'Start';
  }
  .feed-maintenance.sched-table.stack td:nth-child(7)::before {
    content: 'Confirmed';
  }
  .feed-maintenance.sched-table.stack td:nth-child(8)::before {
    content: 'Supervisor';
  }
  /* the mark's words are only in its title, which a phone cannot show */
  .feed-maintenance.sched-table.stack td:nth-child(9)::before {
    display: inline;
    margin-right: var(--s2);
  }
  .feed-maintenance.sched-table.stack td:nth-child(9):has(.mark-ok)::before {
    content: 'Admin Check: done';
  }
  .feed-maintenance.sched-table.stack td:nth-child(9):has(.mark-no)::before {
    content: 'Admin Check: not done';
  }

  /* repairs and installations: building and address; job and status; dates; people */
  .table-scroll .feed-calls.sched-table.stack tbody td:nth-child(9),
  .table-scroll .feed-calls.sched-table.stack tbody td:nth-child(10) {
    grid-column: 1 / -1;
    margin-top: calc(-1 * var(--s2));
    color: var(--ink-2);
    font-size: 0.875rem;
    font-weight: 400;
  }
  .feed-calls td:nth-child(9) {
    grid-row: 2;
  }
  .feed-calls td:nth-child(10) {
    grid-row: 3;
  }
  .feed-calls td:nth-child(1),
  .feed-calls td:nth-child(2) {
    grid-row: 4;
  }
  .table-scroll .feed-calls.sched-table.stack tbody td:nth-child(2) {
    grid-column: 3 / 7;
  }
  .feed-calls tbody tr::after {
    grid-row: 5;
  }
  .feed-calls td:nth-child(4),
  .feed-calls td:nth-child(5) {
    grid-row: 6;
  }
  .feed-calls td:nth-child(6),
  .feed-calls td:nth-child(7) {
    grid-row: 7;
  }
  .table-scroll .feed-calls.sched-table.stack tbody td:nth-child(5),
  .table-scroll .feed-calls.sched-table.stack tbody td:nth-child(6) {
    grid-column: 1 / 4;
  }
  .table-scroll .feed-calls.sched-table.stack tbody td:nth-child(4),
  .table-scroll .feed-calls.sched-table.stack tbody td:nth-child(7) {
    grid-column: 4 / 7;
  }
  .table-scroll .feed-calls.sched-table.stack tbody td:nth-child(3) {
    grid-row: 8;
    grid-column: 1 / -1;
  }
  .feed-calls.sched-table.stack td:nth-child(3)::before {
    content: 'Repair Name Tech';
  }
  .feed-calls.sched-table.stack td:nth-child(4)::before {
    content: 'Date Created';
  }
  .feed-calls.sched-table.stack td:nth-child(5)::before {
    content: 'Date Tech on Site';
  }
  .feed-calls.sched-table.stack td:nth-child(6)::before {
    content: 'Contact Person';
  }
  .feed-calls.sched-table.stack td:nth-child(7)::before {
    content: 'Contact Tel';
  }
  /* the number stays above the block's link, so it can be held, copied or dialled */
  .table-scroll .feed-calls.sched-table.stack tbody td:nth-child(7) {
    position: relative;
    z-index: 1;
    justify-self: start;
  }
  /* the status colour on a phone is a dot in the status chip; every other line is plain ink */
  .feed-calls td:not(:nth-child(2)) font {
    color: inherit;
  }
  .feed-calls td:nth-child(2) font::before {
    content: '';
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 6px;
    border-radius: 50%;
    background: currentColor;
  }
  .feed-calls td:nth-child(2) font {
    -webkit-text-fill-color: var(--ink);
  }
}

/* the search of a job card feed: the box takes the room, the buttons stand beside it (under it on a phone) */
.filter-bar.feed-search .field {
  flex: 1 1 18rem;
  max-width: 36rem;
}
@media (max-width: 760px) {
  .filter-bar.feed-search .field {
    flex-basis: 100%;
  }
}

/* on a phone a panel has less padding, so the folding heading reaches out less */
@media (max-width: 760px) {
  .sched.accordion {
    padding-bottom: 0;
  }
  .sched.accordion summary {
    margin: 0 calc(-1 * var(--s4));
  }
  .sched.accordion summary h2 {
    padding-left: var(--s4);
  }
  .sched.accordion summary::after {
    right: var(--s4);
  }
}

/* the status buttons of the repair and installation feeds: the chosen one is filled */
.status-links a[aria-current='true'] {
  background: var(--navy);
  color: #fff;
}
/* on a phone they are one row that is swiped sideways, so that the job cards start near the top; the row
   reaches the edge of the screen, where a cut-off button shows that there is more */
@media (max-width: 760px) {
  .actions.status-links {
    flex-wrap: nowrap;
    gap: var(--s2);
    overflow-x: auto;
    margin: 0 calc(-1 * var(--s4)) var(--s4);
    padding: 2px var(--s4) var(--s2);
    scroll-padding: 0 var(--s4);
    scroll-snap-type: x proximity;
  }
  .actions.status-links a {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 var(--s3);
    font-size: 0.875rem;
    white-space: nowrap;
    scroll-snap-align: start;
  }
  /* the chosen status comes first, so that it is never off the screen */
  .actions.status-links a[aria-current='true'] {
    order: -1;
  }
}

/* in the Quick Links panel they all show once it is open: they wrap, also on a phone (Douw, 30 Nov 2026) */
.quick-links .actions.status-links {
  flex-wrap: wrap;
  overflow-x: visible;
  margin: 0;
  padding: var(--s3) 0 0;
}
.quick-links .actions.status-links a[aria-current='true'] {
  order: 0;
}

/* the enquiries on a phone, in the blocks of the job card feeds: the client; number, type and status;
   the dates; the admin user; the start of the message. Cells are placed by column number: No, Received
   (the link that opens the enquiry), Last Update, Status, Admin User, From, Enquiry Type, Enquiry. */
@media (max-width: 760px) {
  .table-scroll .feed-enquiries.sched-table.stack tbody td:nth-child(6) {
    grid-row: 1;
    grid-column: 1 / -1;
    padding-right: var(--s6);
    color: var(--ink-2);
    font-size: 0.875rem;
  }
  .feed-enquiries .from-name {
    display: block;
    color: var(--navy);
    font-size: 1.0625rem;
    font-weight: 650;
    line-height: 1.35;
  }
  .feed-enquiries .from-name + br {
    display: none;
  }
  .feed-enquiries.sched-table.stack td:nth-child(6)::before {
    content: none;
  }
  /* the e-mail link stays its own: it sits above the link of the block, with no chevron of its own */
  .feed-enquiries td:nth-child(6) a {
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 4px 0;
  }
  .feed-enquiries.feed-table td:nth-child(6) a::before,
  .feed-enquiries.feed-table td:nth-child(6) a::after {
    content: none;
  }

  .feed-enquiries td:nth-child(1),
  .feed-enquiries td:nth-child(4),
  .feed-enquiries td:nth-child(7) {
    grid-row: 2;
  }
  .sched-table.stack.feed-table.feed-enquiries td:first-child::before {
    content: 'No ';
  }
  .table-scroll .feed-enquiries.sched-table.stack tbody td:nth-child(7) {
    grid-column: 3 / 5;
    align-self: center;
    color: var(--ink-2);
    font-size: 0.875rem;
  }
  .feed-enquiries.sched-table.stack td:nth-child(7)::before {
    content: none;
  }
  .table-scroll .feed-enquiries.sched-table.stack tbody td:nth-child(4) {
    grid-column: 5 / 7;
    justify-self: end;
    align-self: center;
    padding: 2px var(--s2);
    background: var(--navy-wash);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    color: var(--ink);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: capitalize;
  }
  .feed-enquiries.sched-table.stack td:nth-child(4)::before {
    content: none;
  }

  .feed-enquiries tbody tr::after {
    grid-row: 3;
  }
  .feed-enquiries td:nth-child(2),
  .feed-enquiries td:nth-child(3) {
    grid-row: 4;
  }
  .table-scroll .feed-enquiries.sched-table.stack tbody td:nth-child(2) {
    grid-column: 1 / 4;
  }
  .table-scroll .feed-enquiries.sched-table.stack tbody td:nth-child(3) {
    grid-column: 4 / 7;
  }
  .table-scroll .feed-enquiries.sched-table.stack tbody td:nth-child(5) {
    grid-row: 5;
    grid-column: 1 / -1;
  }
  .table-scroll .feed-enquiries.sched-table.stack tbody td:nth-child(8) {
    grid-row: 6;
    grid-column: 1 / -1;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    font-weight: 400;
  }
  .feed-enquiries.sched-table.stack td:nth-child(2)::before {
    content: 'Received';
  }
  .feed-enquiries.sched-table.stack td:nth-child(3)::before {
    content: 'Last Update';
  }
  .feed-enquiries.sched-table.stack td:nth-child(5)::before {
    content: 'Admin User';
  }
  .feed-enquiries.sched-table.stack td:nth-child(8)::before {
    content: 'Enquiry';
  }
}

/* the unit checklists of the three job cards on a phone, in the blocks of the job card feeds: the unit;
   where it is; type and make; the status; the facts. The cells are placed by what they are (data-part),
   so the three lists may keep different columns. The link of the "open" cell opens the checklist from
   anywhere on the block; the unit's own link and the delete button stay their own. */
@media (max-width: 760px) {
  .sched-table.stack.check-cards tbody {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s3);
  }
  .sched-table.stack.check-cards tbody tr {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-content: start;
    gap: var(--s2) var(--s3);
    padding: var(--s3) var(--s3) var(--s4);
    background: var(--ground);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
  }
  .table-scroll .sched-table.stack.check-cards tbody td {
    order: 10;
    grid-column: span 3;
    min-width: 0;
    padding: 0;
    background: none;
    text-align: left;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  /* a small label above each fact (the label itself is the column heading, data-col) */
  .sched-table.stack.check-cards:not(.feed-table) tbody td[data-col]::before {
    content: attr(data-col);
    display: block;
    color: var(--ink-2);
    font-size: 0.75rem;
    font-weight: 600;
  }
  .sched-table.stack.check-cards:not(.feed-table) tbody td[data-part='name']::before,
  .sched-table.stack.check-cards:not(.feed-table) tbody td[data-part='sub']::before,
  .sched-table.stack.check-cards:not(.feed-table) tbody td[data-part='kind']::before,
  .sched-table.stack.check-cards:not(.feed-table) tbody td[data-part='make']::before,
  .sched-table.stack.check-cards:not(.feed-table) tbody td[data-part='status']::before,
  .sched-table.stack.check-cards:not(.feed-table) tbody td[data-part='action']::before {
    content: none;
  }

  .table-scroll .sched-table.stack.check-cards tbody td[data-part='name'] {
    order: 1;
    grid-column: 1 / -1;
    padding-right: var(--s6);
    color: var(--navy);
    font-size: 1.0625rem;
    font-weight: 650;
    line-height: 1.35;
  }
  .table-scroll .sched-table.stack.check-cards tbody td[data-part='sub'] {
    order: 2;
    grid-column: 1 / -1;
    margin-top: calc(-1 * var(--s2));
    color: var(--ink-2);
    font-size: 0.875rem;
    font-weight: 400;
  }
  .table-scroll .sched-table.stack.check-cards tbody td[data-part='kind'],
  .table-scroll .sched-table.stack.check-cards tbody td[data-part='make'] {
    order: 3;
    color: var(--ink-2);
    font-size: 0.875rem;
  }
  .table-scroll .sched-table.stack.check-cards tbody td[data-part='status'] {
    order: 4;
    grid-column: 1 / -1;
    justify-self: start;
    padding: 2px var(--s2);
    background: var(--navy-wash);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    color: var(--ink);
    font-size: 0.8125rem;
    font-weight: 600;
  }
  /* the rule between what the unit is and what was done to it */
  .check-cards tbody tr::after {
    content: '';
    order: 5;
    grid-column: 1 / -1;
    border-top: 1px solid var(--panel-rule);
  }
  .table-scroll .sched-table.stack.check-cards tbody td[data-part='open'] {
    order: 9;
  }
  .table-scroll .sched-table.stack.check-cards tbody td[data-part='action'] {
    order: 20;
    grid-column: 1 / -1;
  }
  .check-cards td[data-part='action'] form {
    display: flex;
    margin: 0;
  }
  .check-cards td[data-part='action'] button {
    position: relative;
    z-index: 1;
    min-height: 44px;
    font-size: 0.875rem;
  }

  /* the checklist link covers the block, with the feeds' chevron */
  .check-cards td[data-part='open'] a::after {
    content: '';
    position: absolute;
    inset: 0;
  }
  .check-cards tr:has(td[data-part='open'] a) td[data-part='open'] a::before {
    content: '';
    position: absolute;
    top: 1.25rem;
    right: var(--s4);
    width: 9px;
    height: 9px;
    border-top: 2px solid var(--navy);
    border-right: 2px solid var(--navy);
    transform: rotate(45deg);
  }
  /* the unit's link opens the unit, not the checklist: it sits above the block's link */
  .check-cards td[data-part='name'] a {
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 4px 0;
  }
  .sched-table.stack.check-cards tbody tr:has(td[data-part='open'] a:active) {
    background: var(--navy-wash);
  }
  .sched-table.stack.check-cards tbody tr:has(td[data-part='open'] a:focus-visible) {
    outline: 2px solid var(--navy);
    outline-offset: 1px;
  }
}

/* checklist blocks whose name is the link that opens the record (name-opens): the units of a building and
   the client reporting contacts. The link covers the whole block, with the feeds' chevron. A person with no
   link to the record sees no chevron */
@media (max-width: 760px) {
  .sched-table.stack.check-cards.name-opens td[data-part='name'] a {
    position: static;
    display: inline;
    padding: 0;
  }
  .name-opens td[data-part='name'] a::after {
    content: '';
    position: absolute;
    inset: 0;
  }
  .name-opens td[data-part='name'] a::before {
    content: '';
    position: absolute;
    top: 1.25rem;
    right: var(--s4);
    width: 9px;
    height: 9px;
    border-top: 2px solid var(--navy);
    border-right: 2px solid var(--navy);
    transform: rotate(45deg);
  }
  .sched-table.stack.check-cards.unit-cards:not(.feed-table) tbody td[data-part='status']::before {
    content: 'Last maintenance: ';
    display: inline;
    font-size: inherit;
    color: var(--ink-2);
  }
  .sched-table.stack.name-opens tbody tr:has(td[data-part='name'] a:active) {
    background: var(--navy-wash);
  }
  .sched-table.stack.name-opens tbody tr:has(td[data-part='name'] a:focus-visible) {
    outline: 2px solid var(--navy);
    outline-offset: 1px;
  }
  .name-opens td[data-part='name'] a:focus-visible {
    outline: none;
  }
}

/* the client reporting contacts: the chip is the Pastel ID; a long e-mail address or postal address wraps */
@media (max-width: 760px) {
  .sched-table.stack.check-cards.contact-cards:not(.feed-table) tbody td[data-part='status']::before {
    content: 'Pastel ID: ';
    display: inline;
    font-size: inherit;
    color: var(--ink-2);
  }
}

/* the buildings list on a phone: the checklist blocks. The chip says when maintenance was last done; the
   Map, View stats and View Units links stand in a row at the foot of the block, above the block's own link */
@media (max-width: 760px) {
  .sched-table.stack.check-cards.building-cards:not(.feed-table) tbody td[data-part='status']::before {
    content: 'Last maintenance: ';
    display: inline;
    font-size: inherit;
    color: var(--ink-2);
  }
  /* the street and the suburb are two lines of one address */
  .table-scroll .sched-table.stack.check-cards.building-cards tbody td[data-part='sub'] + td[data-part='sub'] {
    margin-top: calc(-1 * var(--s2));
  }
  /* a break before the buttons, so that they start a row of their own */
  .building-cards tbody tr::before {
    content: '';
    order: 19;
    grid-column: 1 / -1;
  }
  .table-scroll .sched-table.stack.check-cards.building-cards tbody td[data-part='link'] {
    order: 20;
    grid-column: span 2;
  }
  .sched-table.stack.check-cards.building-cards:not(.feed-table) tbody td[data-part='link']::before {
    content: none;
  }
  /* a link the building does not have (no map position) or the person may not open leaves no empty button */
  .table-scroll .sched-table.stack.check-cards.building-cards tbody td[data-part='link']:not(:has(a)) {
    display: none;
  }
  .sched-table.stack.check-cards.building-cards td[data-part='link'] a {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid var(--navy);
    border-radius: var(--radius);
    color: var(--navy);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
  }
}
