/* Boligsyn / Design / Approved · Mode 1 */
:root {
  --color-canvas: #F6F5F2;
  --color-surface: #FFFFFF;
  --color-ink: #10172E;
  --color-muted: #505866;
  --color-subtle: #626A76;
  --color-primary: #174BCB;
  --color-selected: #EAF0FF;
  --color-border: #D6D8DD;
  --color-borderstrong: #707784;
  --color-error: #A4262C;
  --radius-control: 8px;
  --control-height: 44px;
  --control-padding: 12px;
}

/* Runtime additions under DESIGN.md. Native-exported values stay in tokens.css. */
:root {
  --color-primary-hover: #12399f;
  --color-surface-muted: #f0efeb;
  --color-divider: #ececef;
  --color-panel-border: #e9e9e8;
  --color-plan-ink: #414651;
  --color-plan-door: #ab4d18;
  --color-plan-window: #146b9d;
  --color-plan-opening: #60447b;
  --color-warning-ink: #775008;
  --color-warning-surface: #fff3d5;
  --font-body: system-ui, -apple-system, sans-serif;
  --font-controls: system-ui;
  --font-heading: Georgia, serif;
  /* The mobile host keeps its existing larger controls and Dynamic Type scale. */
  --app-control-height: 48px;
}

report-delivery { display: block; margin-block: 1rem; overflow-wrap: anywhere; }
report-delivery[hidden] { display: none; }
report-delivery > details, report-delivery > section { padding: 1rem; border: 1px solid var(--color-border); border-radius: .75rem; background: var(--color-surface); }
report-delivery summary { cursor: pointer; padding-block: .65rem; font-weight: 600; }
report-delivery article { padding-block: .75rem; border-block-end: 1px solid var(--color-border); }
report-delivery ol { padding-inline-start: 1.5rem; }
report-delivery li { padding-block: .4rem; }
report-delivery p { margin-block: .4rem; }
report-delivery .report-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: .7rem; }
report-delivery form { display: grid; gap: .75rem; max-width: 35rem; }
report-delivery label { display: grid; gap: .3rem; }
report-delivery input, report-delivery textarea { width: 100%; min-width: 0; box-sizing: border-box; }

point-sources { display: block; margin-block: .75rem; overflow-wrap: anywhere; }
point-sources > details { padding: .65rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-control); background: var(--color-surface); }
point-sources summary { cursor: pointer; padding-block: .4rem; font-weight: 600; }
point-sources article { border-block-start: 1px solid var(--color-border); padding-block: .75rem; }
point-sources p { margin-block: .4rem; }
point-sources form, point-sources form div { display: grid; gap: .65rem; max-width: 36rem; }
point-sources label { display: grid; gap: .3rem; margin-block: .4rem; }
point-sources input:not([type=checkbox]), point-sources select, point-sources textarea { min-width: 0; width: 100%; box-sizing: border-box; }
point-sources img { max-width: 100%; }
report-acknowledgement { display: block; margin-block: 1rem; }
report-acknowledgement > details { padding: 1rem; border: 1px solid var(--color-border); border-radius: .75rem; background: var(--color-surface); }
report-acknowledgement form > div { display: grid; gap: .75rem; }
report-acknowledgement svg { max-width: 100%; height: auto; }
report-acknowledgement blockquote { margin: .75rem 0; padding-inline-start: .75rem; border-inline-start: 3px solid currentColor; white-space: pre-wrap; }
inspection-visit { display:block; margin-block:.75rem; overflow-wrap:anywhere; }
inspection-visit section, inspection-visit form { background:var(--color-surface); padding:1rem; border:1px solid var(--color-border); border-radius:.75rem; }
inspection-visit form, inspection-visit label { display:grid; gap:.5rem; }
inspection-visit [hidden] { display:none; }
inspection-visit .visit-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
inspection-visit input, inspection-visit textarea, inspection-visit select { min-width:0; max-width:100%; }
#plan-panel:has(inspection-visit[data-blocked=true]) > :not(inspection-visit), #guided-finish:has(inspection-visit[data-blocked=true]) > :not(inspection-visit) { display:none; }
.limitation-form { margin-block: .75rem; padding: .75rem; border: 1px solid var(--line, #d4d7de); border-radius: .65rem; }
.limitation-form summary { cursor: pointer; font-weight: 600; }
.limitation-form label { display: grid; gap: .25rem; margin-block: .75rem; }
.limitation-form :is(input,select,textarea) { width: 100%; max-width: 100%; }
inspection-appointments, preinspection-points:not(:empty) { display: block; margin-block: .75rem; overflow-wrap: anywhere; }
preinspection-points article, preinspection-points form { padding: .75rem; border: 1px solid var(--color-border); border-radius: .75rem; }
preinspection-points label { display: grid; gap: .35rem; margin-block: .75rem; }
preinspection-points :is(input,select,textarea) { width: 100%; min-width: 0; }

.report-signature-dialog {
  box-sizing: border-box;
  width: min(100%, 38rem);
  max-width: 100%;
  max-height: 92dvh;
  margin: auto;
  padding: clamp(1rem, 4vw, 2rem);
  border: 1px solid #667085;
  border-radius: 1rem;
  overflow: auto;
  overflow-wrap: anywhere;
  overscroll-behavior: contain;
  background: #fff;
  color: #101a30;
}
.report-signature-dialog::backdrop { background: rgb(16 26 48 / 55%); }
.report-signature-dialog :is(button, select, input, a),
personal-signature :is(button, summary) { min-height: 44px; }
.report-signature-dialog label { display: grid; gap: .3rem; margin-block: .7rem; }
.report-signature-dialog :is(input, select, textarea, canvas, svg),
personal-signature :is(canvas, svg) { box-sizing: border-box; max-width: 100%; }
.report-signature-dialog svg, personal-signature svg { display: block; }
.report-signature-dialog button, personal-signature button { margin: .25rem .25rem .25rem 0; }
@media (max-width: 40rem) {
  .report-signature-dialog { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)); }
}
.report-signature-dialog :is(input,select,textarea,button), personal-signature button { font: inherit; }
.report-signature-dialog a { display: inline-flex; align-items: center; color: var(--color-primary); }
.report-signature-dialog button.signature-primary, personal-signature button.signature-primary {
  background: var(--color-primary); color: white; border: 1px solid var(--color-primary); font-weight: 650;
  padding: .62rem 1rem; border-radius: var(--radius-control);
}
.report-signature-dialog button.signature-secondary {
  background: white; color: var(--color-primary); border: 1px solid var(--color-primary); padding: .62rem 1rem;
}
.report-signature-dialog button.signature-quiet, personal-signature button.signature-quiet {
  background: transparent; color: var(--color-muted); text-decoration: underline; border: 0;
}
.report-signature-dialog summary { padding: .7rem 0; cursor: pointer; }
.report-signature-dialog button:disabled { opacity: .65; }

:root {
  color-scheme: light;
  --ink: var(--color-ink);
  --muted: var(--color-muted);
  --line: var(--color-border);
  --paper: var(--color-canvas);
  --blue: var(--color-primary);
  --blue-hover: var(--color-primary-hover);
  --surface: var(--color-surface);
  --selected: var(--color-selected);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--font-body);
}
a {
  color: var(--blue);
  text-underline-offset: 3px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.workspace {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #efeeeb;
  border-right: 1px solid var(--line);
  padding: 28px 12px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.brand,
.login-brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 17px;
  padding: 0 12px;
}
.brand-mark {
  font-size: 26px;
  letter-spacing: 0;
}
.sidebar nav {
  display: grid;
}
.nav-item {
  padding: 12px;
  border-radius: var(--radius-control);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.nav-item.active {
  background: #e4e4e2;
  border-left: 3px solid var(--blue);
}
.nav-item span {
  font-size: 22px;
  color: var(--blue);
  padding-right: 12px;
}
.sidebar form {
  margin-top: auto;
}
.quiet {
  background: transparent;
  color: var(--ink);
  padding: 10px 12px;
}
.workspace main {
  width: 100%;
  max-width: 1490px;
  padding: 32px;
  margin: 0 auto;
  min-width: 0;
}
.login-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.login-brand {
  position: absolute;
  top: 32px;
  left: 32px;
}
.login-layout main {
  width: min(100%, 500px);
  padding: 24px;
}
.login {
  background: var(--color-surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
}
.login form {
  display: grid;
  gap: 10px;
}
.login label {
  font-weight: 600;
  font-size: 14px;
}
.login input {
  margin-bottom: 12px;
}
.login h1 {
  font-size: 36px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
}
h1 {
  font: 700 40px/1.12 var(--font-heading);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
h2 {
  font-size: 20px;
  line-height: 1.3;
  margin: 0 0 16px;
}
h3 {
  font-size: 16px;
  margin: 0 0 8px;
}
p {
  margin: 0 0 16px;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: var(--control-height);
  padding: 10px 16px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--blue);
  color: var(--color-surface);
  font: 600 14px var(--font-controls);
  cursor: pointer;
  text-decoration: none;
}
button:hover,
.button:hover {
  background: var(--blue-hover);
}
button.quiet:hover {
  background: #e4e4e2;
}
input,
select {
  min-height: var(--control-height);
  font: inherit;
  border: 1px solid var(--color-borderstrong);
  border-radius: var(--radius-control);
  padding: 10px 12px;
  width: 100%;
  background: var(--color-surface);
}
.intro,
.muted,
small {
  color: var(--muted);
}
.breadcrumb {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 28px;
}
.breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.breadcrumb span {
  margin: 0 12px;
  color: #8b8f98;
}
.home-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.home-meta {
  color: var(--muted);
  font-size: 14px;
}
.home-meta span {
  margin: 0 8px;
  color: var(--line);
}
.jump {
  display: flex;
  gap: 32px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  margin: 22px 0 20px;
}
.jump a {
  display: block;
  white-space: nowrap;
  padding: 10px 0 12px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
}
.jump a:first-child {
  color: var(--blue);
  border-bottom: 2px solid var(--blue);
  font-weight: 600;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr);
  gap: 16px;
  align-items: start;
}
.overview-grid section {
  margin: 0;
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-panel-border);
  border-radius: 12px;
}
.overview-grid h2 {
  font-size: 16px;
}
.overview-side {
  display: grid;
  gap: 16px;
}
.plan-panel {
  min-height: 500px;
  display: flex;
  flex-direction: column;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
}
.panel-heading p,
.plan-caption {
  font-size: 13px;
  color: var(--muted);
}
.plan-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 350px;
}
.floorplan {
  display: block;
  max-width: 100%;
  max-height: 560px;
  object-fit: contain;
}
.plan-caption {
  margin: 12px 0 0;
}
.room-list {
  border-top: 1px solid var(--line);
}
.room-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 12px;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--color-divider);
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
}
.room-row:hover {
  background: #f6f8ff;
}
.room-icon {
  font-size: 23px;
}
.badge {
  background: var(--color-surface-muted);
  color: var(--muted);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.document-row {
  border-top: 1px solid var(--color-divider);
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}
.document-row div {
  display: flex;
  gap: 14px;
  white-space: nowrap;
}
.history-summary p,
.history-summary a {
  font-size: 14px;
}
.workspace main > section {
  border-top: 1px solid var(--line);
  margin: 40px 0 0;
  padding: 30px 0 0;
}
.workspace main > section h2 {
  font-size: 22px;
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
}
.facts div {
  min-width: 0;
}
.facts dt {
  font-size: 13px;
  color: var(--muted);
}
.facts dd {
  margin: 2px 0;
  font-weight: 600;
}
.facts small {
  display: block;
  font-weight: 400;
}
.source {
  font-size: 12px;
  white-space: normal;
}
.documents article {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.documents article p {
  margin: 0 0 8px;
}
.actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.rooms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 16px;
}
.rooms article,
.source-record {
  background: var(--color-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 16px;
  overflow-wrap: anywhere;
}
.rooms ul {
  padding-left: 18px;
  font-size: 14px;
}
.notice {
  border-left: 3px solid var(--color-warning-ink);
  background: var(--color-warning-surface);
  padding: 16px;
  margin: 16px 0;
}
.notice p {
  margin: 4px 0;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  background: var(--color-surface);
}
th,
td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--color-surface-muted);
  white-space: nowrap;
}
.reading {
  max-width: 75ch;
  padding: 25px 0;
}
.reading h1 {
  font-size: 35px;
}
.reading h2 {
  padding-top: 25px;
  margin-top: 30px;
}
.reading img {
  max-width: 100%;
  height: auto;
}
.reading table {
  display: block;
  overflow-x: auto;
}
.source-record {
  margin: 14px 0;
}
.source-record summary {
  cursor: pointer;
  font-weight: 600;
}
.source-record dd,
.hash {
  overflow-wrap: anywhere;
}
.hash {
  font-size: 12px;
  color: var(--muted);
}
.back {
  display: block;
  margin: 0 0 20px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 30px;
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
}
.card:hover {
  border-color: var(--blue);
}
.card h2 {
  font: 700 25px var(--font-heading);
}
.card strong {
  color: var(--blue);
  font-size: 14px;
}
.card span {
  margin: 0 8px;
}
.count {
  font-size: 14px;
  color: var(--muted);
}
@media (max-width: 1000px) {
  .workspace {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .plan-panel {
    min-height: unset;
  }
  .overview-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-side .history-summary {
    grid-column: 1/-1;
  }
}
@media (max-width: 767px) {
  .workspace {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .sidebar nav {
    display: none;
  }
  .sidebar form {
    margin: 0;
  }
  .workspace main {
    padding: 24px 16px;
  }
  .breadcrumb {
    margin-bottom: 20px;
  }
  h1 {
    font-size: 30px;
  }
  .home-heading {
    flex-wrap: wrap;
  }
  .home-heading .button {
    width: 100%;
  }
  .jump {
    gap: 24px;
  }
  .overview-side {
    grid-template-columns: 1fr;
  }
  .overview-side .history-summary {
    grid-column: auto;
  }
  .overview-grid section {
    padding: 16px;
  }
  .plan-image {
    min-height: 200px;
  }
  .room-row {
    grid-template-columns: 24px minmax(0, 1fr) auto 10px;
  }
  .document-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .login-brand {
    top: 20px;
    left: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
.plan-frame {
  position: relative;
  width: min(100%, 735px);
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.plan-frame .floorplan {
  display: block;
  width: 100%;
  max-height: none;
}
.plan-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.plan-region {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
  stroke-width: 0.4;
  vector-effect: non-scaling-stroke;
  transition: fill 0.15s;
}
.plan-overlay a:hover .plan-region,
.plan-overlay a:focus-visible .plan-region {
  fill: rgba(23, 75, 203, 0.22);
  stroke: var(--color-primary);
  stroke-width: 2;
}
.plan-overlay a:focus-visible {
  outline: none;
}
.rooms article:target {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.plan-zoom-input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.plan-zoom-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.plan-zoom-controls span {
  margin-right: 4px;
}
.plan-zoom-controls label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--color-surface);
  font-size: 13px;
  cursor: pointer;
}
.plan-zoom-fit:checked ~ .plan-zoom-controls label[for="plan-zoom-fit"],
.plan-zoom-medium:checked ~ .plan-zoom-controls label[for="plan-zoom-medium"],
.plan-zoom-large:checked ~ .plan-zoom-controls label[for="plan-zoom-large"] {
  background: var(--selected);
  color: var(--blue);
  border-color: var(--blue);
}
.plan-zoom-fit:focus-visible ~ .plan-zoom-controls label[for="plan-zoom-fit"],
.plan-zoom-medium:focus-visible
  ~ .plan-zoom-controls
  label[for="plan-zoom-medium"],
.plan-zoom-large:focus-visible
  ~ .plan-zoom-controls
  label[for="plan-zoom-large"] {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.plan-scroll {
  width: 100%;
  max-height: 560px;
  overflow: auto;
  overscroll-behavior: contain;
}
.plan-scroll:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.plan-zoom-medium:checked ~ .plan-scroll .plan-frame {
  width: 150%;
  max-width: none;
}
.plan-zoom-large:checked ~ .plan-scroll .plan-frame {
  width: 200%;
  max-width: none;
}

.plan-selection {
  display: none;
}
.plan-selection:target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin: 0 0 12px;
  border-radius: var(--radius-control);
  background: var(--selected);
  font-size: 14px;
}
.plan-selection a {
  font-weight: 600;
}

.room-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.room-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Keep pinned source hashes readable at narrow viewport widths. */
.checklist-source p {
  overflow-wrap: anywhere;
}
/* Saved inspection and immutable report navigation. */
.saved-inspection {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  min-height: 44px;
}
.saved-inspection > span:first-child {
  flex: 1;
}
.saved-inspection,
.report-versions a,
.inspection-facts dd {
  overflow-wrap: anywhere;
}
.inspection-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.inspection-facts dt {
  font-size: 14px;
  color: var(--muted);
}
.inspection-facts dd {
  margin: 0;
}
.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}
.report-actions .secondary {
  background: var(--surface);
  color: var(--blue);
  border: 1px solid var(--blue);
}
.report-actions button:disabled {
  background: #e9e9e7;
  color: var(--color-muted);
  cursor: default;
}
.report-versions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.report-versions a {
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
.report-versions a[aria-current] {
  background: var(--selected);
  border-color: var(--blue);
  font-weight: 600;
}
#report-progress {
  max-width: 75ch;
  overflow-wrap: anywhere;
}
#report-view {
  max-width: 640px;
}
select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
@media (max-width: 767px) {
  .saved-inspection {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .inspection-facts {
    grid-template-columns: 1fr;
  }
  .report-versions {
    flex-direction: column;
  }
  .report-actions > * {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}
.inspection-report-page h1,
.inspection-report-page h2,
.inspection-report-page p {
  overflow-wrap: anywhere;
}
/* Nested housing JSON must not consume the narrow page through default dd indentation. */
.workspace main dl dd {
  margin-inline-start: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.workspace main dl ul {
  padding-inline-start: 20px;
}
.documents p {
  overflow-wrap: anywhere;
}

/* Saved inspection reading uses semantic disclosure rows and existing surfaces. */
.saved-inspection-page {
  overflow-wrap: anywhere;
}
.saved-inspection-page section {
  margin: 28px 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.saved-inspection-page summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
}
.saved-inspection-page summary h2 {
  display: inline;
  margin-right: 16px;
}
.saved-inspection-page summary span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}
.inspection-room-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.inspection-room-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
.checklist-reading {
  border-top: 1px solid var(--line);
  padding: 4px 0;
}
.saved-inspection-page .saved-note {
  white-space: pre-wrap;
  max-width: 75ch;
}
.current-finding {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.inspection-history {
  background: var(--paper);
  padding: 16px;
  margin-top: 24px;
  border-left: 3px solid #8b8f98;
}
.inspection-history article {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.saved-inspection-page figure {
  margin: 16px 0;
  max-width: 560px;
}
.saved-inspection-page img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-control);
}
.saved-inspection-page figcaption {
  font-size: 14px;
  margin-top: 8px;
}
.saved-inspection-page h4 {
  font-size: 16px;
  margin: 12px 0;
}
.saved-inspection-page .breadcrumb a,
.saved-inspection-page .back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.inspection-room:has(:target) {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.saved-inspection-page details:target {
  scroll-margin-top: 16px;
}
@media (max-width: 767px) {
  .saved-inspection-page section {
    padding: 16px;
  }
  .saved-inspection-page .report-actions > * {
    width: 100%;
  }
}

.inspection-report-page .back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Human reading surfaces share the housing palette and remain inside the viewport. */
.workspace main {
  overflow-wrap: anywhere;
}
.workspace main > * {
  min-width: 0;
  max-width: 100%;
}
.document-reader {
  max-width: 78ch;
  margin-inline: auto;
}
.document-reader .reading {
  max-width: 100%;
  font-size: 17px;
  line-height: 1.7;
}
.reading h1 {
  font-family: var(--font-heading);
}
.source-text {
  font: inherit;
  white-space: pre-line;
  overflow-wrap: anywhere;
  line-height: 1.65;
  margin: 20px 0;
}
.reading pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}
.reading .original-page {
  margin: 20px 0;
  background: var(--color-surface-muted);
  padding: 8px 16px;
  border-radius: var(--radius-control);
}
.reading summary,
main > section > details > summary {
  min-height: 44px;
  padding-block: 10px;
  cursor: pointer;
  font-weight: 600;
}
.reading .original-page img {
  display: block;
  margin: 16px auto;
}
.reading table,
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.reading table {
  white-space: normal;
}
.reading td {
  min-width: 7em;
}
.reading th {
  white-space: normal;
}
.reading a,
.reading p {
  overflow-wrap: anywhere;
}
.actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.badge {
  white-space: normal;
}
@media (max-width: 767px) {
  .document-reader .reading {
    font-size: 16px;
  }
  .reading h1 {
    font-size: 30px;
  }
  .cards,
  .rooms {
    grid-template-columns: minmax(0, 1fr);
  }
}
.reading .source-paragraph {
  white-space: pre-wrap;
}
.actions .secondary {
  background: var(--surface);
  color: var(--blue);
  border: 1px solid var(--blue);
}
.actions .secondary:hover,
.report-actions .secondary:hover {
  background: var(--selected);
}
.document-reader {
  width: min(100%, 75ch);
}

/* Historical sources retain their own document and room context. */
.historical-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}
.historical-card {
  min-width: 0;
  padding: 16px;
  background: var(--surface, var(--color-surface));
  border: 1px solid #dedbd4;
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.historical-card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #f4f2ec;
}
.historical-original {
  display: block;
}
.historical-original img {
  height: auto;
  max-height: none;
}
.historical-card details {
  margin-top: 12px;
}
.historical-card h3 {
  margin-top: 12px;
}
.historical-card small {
  overflow-wrap: anywhere;
}
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}
.comparison-grid figure {
  min-width: 0;
  margin: 0;
}
.photo-comparison img {
  width: 100%;
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.scan-reader summary {
  min-height: 44px;
  display: list-item;
  padding: 10px 0;
  cursor: pointer;
}

/* Saved RoomPlan: generated safe source geometry, shared app/web conventions. */
.saved-plan {
  background: var(--color-canvas);
  border: 1px solid var(--color-border);
  padding: 16px;
  margin: 16px 0;
  color: var(--color-plan-ink);
}
.plan-story {
  margin: 12px 0;
}
.plan-story summary {
  min-height: 44px;
  font-weight: 600;
}
.plan-story label {
  display: inline-block;
  min-height: 44px;
  padding: 10px 8px;
  cursor: pointer;
}
.plan-viewport {
  overflow: auto;
  max-height: 70vh;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.plan-viewport svg {
  display: block;
  width: 100%;
  min-width: 280px;
  max-height: none;
}
.plan-story:has(.plan-zoom:checked) .plan-viewport svg {
  width: 200%;
  max-width: none;
}
.plan-story:has(.plan-hide:checked) .plan-viewport .plan-objects {
  display: none;
}
.saved-plan polygon,
.saved-plan polyline {
  vector-effect: non-scaling-stroke;
  stroke-width: 4;
  stroke: var(--color-plan-ink);
  fill: none;
}
.saved-plan .plan-floors polygon {
  fill: var(--color-surface-muted);
  stroke: var(--color-borderstrong);
  stroke-width: 1;
}
.saved-plan .plan-objects polygon {
  fill: var(--color-selected);
  stroke: var(--color-primary);
  stroke-width: 2;
}
.saved-plan .plan-doors polyline {
  stroke: var(--color-plan-door);
  stroke-width: 6;
}
.saved-plan .plan-windows polyline {
  stroke: var(--color-plan-window);
  stroke-width: 6;
}
.saved-plan .plan-openings polyline {
  stroke: var(--color-plan-opening);
  stroke-dasharray: 7 5;
  stroke-width: 5;
}
.saved-plan text {
  font: 600 32px sans-serif;
  fill: var(--color-ink);
  paint-order: stroke;
  stroke: var(--color-surface);
  stroke-width: 4;
  pointer-events: none;
}
.saved-plan a:focus polygon,
.saved-plan a:focus polyline,
.saved-plan a:hover polygon,
.saved-plan a:hover polyline {
  stroke: var(--color-primary);
  stroke-width: 7;
}
details[id^="scan-element-"]:target {
  outline: 3px solid var(--color-primary);
  scroll-margin: 20px;
}

.plan-story input[type="checkbox"] {
  width: 24px;
  min-height: 24px;
  height: 24px;
  padding: 0;
  vertical-align: middle;
}

.plan-story label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  white-space: nowrap;
}

/* Dashboard handoff: native frames18/311/20066, shared masters4/7/9/11/77/140. */
.brand,
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  color: var(--ink);
  font: 700 30px/1.15 var(--font-heading);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand img,
.login-brand img {
  display: block;
  flex: none;
  object-fit: contain;
}
.brand {
  white-space: nowrap;
}
.workspace {
  grid-template-columns: 240px minmax(0, 1fr);
}
.sidebar {
  padding: 16px 12px 24px;
  background: var(--surface);
  border: 0;
  gap: 36px;
}
.sidebar > .brand {
  margin: 0 8px;
}
.sidebar nav {
  gap: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  min-height: var(--control-height);
  padding: 8px var(--control-padding);
  border-radius: var(--radius-control);
  font-weight: 400;
}
.nav-item.active {
  background: var(--selected);
  border: 0;
  color: var(--blue);
}
.nav-item span {
  font-size: 24px;
}
.home-navigation {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.sidebar form {
  padding: 16px 0 0;
  margin-inline: 8px;
  border-top: 1px solid var(--line);
}
.quiet {
  font-weight: 400;
}
.compact-header {
  display: none;
}
.workspace main {
  padding: 0 32px 32px;
  max-width: none;
}
.workspace main:has(> .home-heading),
.workspace main:has(> .saved-inspection-page),
.workspace main:has(> .document-reader) {
  padding-top: 32px;
}
.workspace main:not(:has(> .workspace-topline)) {
  padding-top: 32px;
}
.workspace-topline {
  height: 57px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  font-size: 14px;
}
.catalogue-heading {
  padding-top: 24px;
}
.catalogue-heading .breadcrumb {
  color: var(--blue);
  margin: 0 0 20px;
  font-size: 14px;
}
.catalogue-heading h1 {
  font-size: 44px;
  line-height: 1.15;
  margin: 0 0 20px;
}
.catalogue-heading .intro {
  margin: 0;
}
.catalogue-search {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 32px 0 24px;
}
.catalogue-search label {
  font-size: 14px;
  font-weight: 650;
  flex: none;
}
.catalogue-search input {
  flex: 1;
  min-width: 0;
}
.secondary {
  background: var(--surface);
  border: 1px solid var(--blue);
  color: var(--blue);
}
.secondary:hover {
  background: var(--selected);
}
.catalogue-table {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
}
.catalogue-table table {
  min-width: 620px;
  table-layout: fixed;
}
.catalogue-table .address-column {
  width: 36%;
}
.catalogue-table .department-column {
  width: 19%;
}
.catalogue-table th,
.catalogue-table td {
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 16px;
  vertical-align: middle;
}
.catalogue-table th {
  background: var(--surface);
  font-size: 14px;
  font-weight: 650;
  height: 52px;
  padding-block: 12px;
}
.catalogue-table td {
  height: 76px;
}
.catalogue-table tr:last-child td {
  border-bottom: 0;
}
.catalogue-table tbody tr:hover,
.catalogue-table tbody tr:focus-within {
  background: var(--selected);
}
.catalogue-table small {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 4px;
}
.catalogue-empty {
  padding: 32px !important;
}
.table-scroll:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.visually-hidden,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  padding: 12px;
  background: var(--surface);
  z-index: 20;
}
.login-layout {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
}
.login-layout main {
  width: min(100%, 620px);
  padding: 0;
}
.login {
  min-height: 640px;
  padding: 39px 43px 48px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.login-brand {
  position: static;
  font-size: 40px;
  gap: 20px;
  margin-bottom: 48px;
}
.login h1 {
  font: 650 30px/1.2 var(--font-body);
  letter-spacing: -0.02em;
  margin: 0;
}
.login form {
  gap: 32px;
  margin-top: 76px;
}
.login form > div {
  display: grid;
  gap: 8px;
}
.login label {
  font-size: 14px;
  font-weight: 650;
}
.login input {
  height: 52px;
  margin: 0;
  font-size: 16px;
  border-color: var(--color-borderstrong);
  border-radius: var(--radius-control);
  padding-inline: var(--control-padding);
}
.login button {
  margin-top: 24px;
  min-height: var(--control-height);
  padding-inline: var(--control-padding);
  border-radius: var(--radius-control);
}
.login-error {
  margin: 16px 0 0;
  color: var(--color-error);
  font-size: 14px;
}
.login-error + form {
  margin-top: 24px;
}
@media (max-width: 1199px) {
  .workspace {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .compact-header {
    display: flex;
    align-items: center;
    gap: 36px;
    height: 64px;
    padding: 12px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }
  .compact-header .brand {
    font-size: 30px;
  }
  .compact-menu {
    position: relative;
  }
  .compact-menu > summary {
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
  .compact-menu > summary::after {
    content: "⌄";
  }
  .compact-menu nav {
    position: absolute;
    top: 48px;
    left: 0;
    z-index: 10;
    width: 200px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    box-shadow: 0 8px 20px #10172e14;
  }
  .compact-menu nav > a {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 10px 12px;
  }
  .compact-menu form {
    margin-top: 8px;
    border-top: 1px solid var(--line);
    padding-top: 8px;
  }
  .workspace main {
    padding: 24px;
  }
  .workspace-topline {
    display: none;
  }
  .catalogue-heading {
    padding-top: 0;
  }
  .catalogue-heading .breadcrumb {
    color: var(--ink);
  }
  .catalogue-heading .intro {
    margin-top: 12px;
  }
  .catalogue-search {
    margin: 32px 0 36px;
  }
  .catalogue-table table {
    min-width: 620px;
  }
  .catalogue-table .address-column {
    width: 34%;
  }
  .catalogue-table .department-column {
    width: 18%;
  }
}
@media (max-width: 600px) {
  .compact-header {
    height: auto;
    min-height: 64px;
    padding: 12px 16px;
    gap: 16px;
    justify-content: space-between;
  }
  .compact-header .brand {
    font-size: 25px;
    gap: 8px;
  }
  .compact-header .brand img {
    width: 36px;
    height: 36px;
  }
  .compact-menu > summary {
    padding-inline: 12px;
    border-right: 0;
  }
  .compact-menu nav {
    left: auto;
    right: 0;
  }
  .workspace main {
    padding: 24px 16px;
  }
  .catalogue-heading h1 {
    font-size: 36px;
  }
  .catalogue-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin: 24px 0;
  }
  .catalogue-search label {
    grid-column: 1/-1;
  }
  .catalogue-search button {
    padding-inline: 16px;
  }
  .login-layout {
    padding: 16px;
  }
  .login {
    min-height: 0;
    padding: 28px 24px 32px;
  }
  .login-brand {
    font-size: 32px;
    gap: 12px;
    margin-bottom: 36px;
  }
  .login-brand img {
    width: 56px;
    height: 56px;
  }
  .login form {
    margin-top: 40px;
    gap: 24px;
  }
  .login button {
    margin-top: 12px;
  }
  .login h1 {
    font-size: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

button,
.button {
  min-height: var(--control-height);
  border-radius: var(--radius-control);
  padding-inline: var(--control-padding);
}

.nav-item svg {
  width: 24px;
  height: 24px;
  flex: none;
  margin-right: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Enlarged text can wrap identity and controls without losing the menu. */
.brand,
.login-brand {
  flex-wrap: wrap;
}
.compact-header {
  flex-wrap: wrap;
}
.sidebar {
  overflow-y: auto;
}
.login input {
  height: auto;
  min-height: 52px;
}

/* Keep catalogue density aligned with311; the housing profile carries details. */
.catalogue-heading .breadcrumb {
  margin-bottom: 16px;
}
.catalogue-heading h1 {
  margin-bottom: 12px;
}
.catalogue-search {
  margin: 12px 0;
}
.catalogue-table td {
  height: 60px;
}
.catalogue-table .address-column {
  width: 36%;
}
.catalogue-table .department-column {
  width: 19%;
}
@media (max-width: 1199px) {
  .catalogue-heading .intro {
    margin-top: 0;
  }
  .catalogue-search {
    margin: 26px 0 36px;
  }
  .catalogue-table td {
    height: 76px;
  }
  .catalogue-table .address-column {
    width: 34%;
  }
  .catalogue-table .department-column {
    width: 18%;
  }
}
@media (max-width: 600px) {
  .catalogue-search {
    margin: 24px 0;
  }
}

/* Dashboard housing214: actual rooms and saved syn, then source documents. */
.sidebar .brand,
.compact-header .brand {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.catalogue-heading h1,
.housing-page h1 {
  font-size: 40px;
  line-height: 1.12;
}
.housing-page {
  padding-top: 24px;
}
.housing-page .breadcrumb {
  color: var(--blue);
  margin-bottom: 20px;
}
.housing-page .home-heading {
  margin-bottom: 36px;
}
.housing-page .home-heading p {
  margin: 16px 0 0;
  font-size: 14px;
}
.housing-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  grid-template-areas: "rooms syn";
  gap: 32px;
  align-items: start;
  margin-bottom: 48px;
}
.housing-grid > section {
  min-width: 0;
}
.housing-grid > #rum {
  grid-area: rooms;
}
.housing-grid > #rapporter {
  grid-area: syn;
}
.housing-grid h2,
.housing-documents h2 {
  margin-bottom: 14px;
}
.housing-rooms,
.housing-inspection,
.housing-documents .documents > article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
.housing-rooms {
  padding: 12px 20px;
}
.housing-room {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 68px;
  padding: 12px 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
}
.housing-room span {
  font-size: 12px;
  color: var(--muted);
}
.housing-room:hover strong {
  text-decoration: underline;
  color: var(--blue);
}
.housing-inspections {
  display: grid;
  gap: 16px;
}
.housing-inspection {
  padding: 24px;
  min-height: 172px;
}
.housing-inspection h3 {
  font-size: 20px;
  line-height: 1.3;
  margin: 0 0 16px;
}
.housing-inspection p {
  font-size: 14px;
  margin-bottom: 20px;
}
.housing-inspection > a {
  font-size: 14px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  text-decoration: none;
}
.housing-inspection > a:hover {
  text-decoration: underline;
}
.housing-documents {
  margin-bottom: 32px;
}
.housing-documents .documents {
  display: grid;
  gap: 16px;
}
.housing-documents .documents > article {
  padding: 24px;
}
.housing-documents .documents h3 {
  font-size: 18px;
  margin-bottom: 12px;
}
.housing-documents .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.housing-secondary {
  border-top: 1px solid var(--line);
  padding: 8px 0;
}
.housing-secondary > details > summary {
  font-weight: 600;
  min-height: 44px;
  padding: 10px 0;
  cursor: pointer;
}
.housing-secondary > details > section {
  margin-top: 16px;
}
.housing-page .rooms article {
  background: var(--surface);
}
.housing-page .table-scroll {
  width: 100%;
}
.housing-page .table-scroll table {
  min-width: 700px;
}
.housing-secondary:has(:target) > details {
  scroll-margin: 16px;
}
@media (max-width: 1199px) {
  .housing-page {
    padding-top: 0;
  }
  .housing-grid {
    grid-template-columns: minmax(250px, 1fr) minmax(0, 2fr);
    gap: 24px;
  }
  .housing-page .home-heading {
    margin-bottom: 32px;
  }
}
@media (max-width: 767px) {
  .housing-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "syn" "rooms";
    gap: 24px;
    margin-bottom: 32px;
  }
  .housing-page h1 {
    font-size: 30px;
  }
  .housing-inspection,
  .housing-documents .documents > article {
    padding: 16px;
  }
  .housing-inspection h3 {
    font-size: 18px;
  }
  .housing-page .home-heading {
    margin-bottom: 24px;
  }
  .housing-room {
    min-height: 52px;
  }
  .housing-page .breadcrumb {
    margin-bottom: 16px;
  }
}

@media (max-width: 600px) {
  .catalogue-heading h1 {
    font-size: 36px;
  }
}

/* Saved inspection: approved plan variant10225, real selected-room evidence. */
.saved-inspection-page > .eyebrow {
  margin-bottom: 8px;
}
.saved-inspection-page > h1 {
  max-width: 75ch;
}
.saved-inspection-page > section:first-of-type {
  padding: 0;
  border: 0;
  background: transparent;
  margin: 12px 0 24px;
}
.saved-inspection-page > section:first-of-type > h2 {
  font-size: 16px;
  margin: 0;
}
.saved-inspection-page .inspection-summary {
  margin: 8px 0;
}
.saved-inspection-page > section:first-of-type > details {
  margin-top: 8px;
}
.inspection-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  margin: 24px 0;
}
.inspection-tabs a {
  min-height: 44px;
  padding: 10px 0;
  text-decoration: none;
  color: var(--muted);
}
.inspection-tabs a[aria-current] {
  color: var(--blue);
  border-bottom: 2px solid var(--blue);
  font-weight: 600;
}
.inspection-workbench {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) minmax(270px, 320px);
  gap: 20px;
  align-items: start;
}
.inspection-workbench > * {
  min-width: 0;
}
.saved-inspection-page .inspection-workbench section {
  margin: 0;
  padding: 20px;
  border-radius: var(--radius-control);
}
.inspection-rooms {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 20px 12px;
}
.inspection-rooms h2 {
  padding-inline: 8px;
}
.inspection-room-nav {
  display: grid;
  gap: 4px;
}
.inspection-room-nav a {
  border: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  padding: 10px 12px;
  text-decoration: none;
}
.inspection-room-nav a[aria-current] {
  background: var(--selected);
  color: var(--blue);
  font-weight: 650;
}
.room-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  padding-bottom: 16px;
}
.room-heading h2 {
  margin: 0;
}
.room-heading span,
.scan-caption {
  font-size: 13px;
  color: var(--muted);
}
.inspection-scan > .plan-viewport {
  height: 370px;
  display: grid;
  align-items: center;
  margin: 16px 0;
}
.inspection-scan .plan-viewport svg {
  min-width: 280px;
  max-height: 370px;
  width: 100%;
}
.scan-choice,
.scan-result-link {
  display: block;
  font-size: 14px;
  padding: 10px 0;
  min-height: 44px;
}
.scan-caption {
  margin-top: 12px;
}
.inspection-observations .current-finding {
  padding: 16px 0;
}
.inspection-observations .current-finding h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 16px;
}
.observation-number {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  min-width: 26px;
  height: 26px;
  background: var(--blue);
  color: var(--color-surface);
  font-size: 13px;
  flex: none;
}
.inspection-observations .current-finding .muted {
  display: none;
}
.inspection-observations figure {
  margin: 12px 0;
}
.inspection-observations img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: var(--paper);
}
.inspection-observations figcaption {
  font-size: 12px;
}
.inspection-secondary {
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
.inspection-secondary > summary {
  font-weight: 650;
}
.inspection-secondary section {
  margin: 16px 0;
}
.inspection-workbench .saved-note {
  line-height: 1.6;
}
.inspection-scan .notice {
  font-size: 14px;
}
.inspection-workbench .plan-viewport svg polygon,
.inspection-workbench .plan-viewport svg polyline {
  vector-effect: non-scaling-stroke;
}
.inspection-tabs {
  flex-wrap: wrap;
  gap: 8px 24px;
}
@media (max-width: 1350px) {
  .inspection-workbench {
    grid-template-columns: 160px minmax(0, 1fr) minmax(240px, 290px);
    gap: 16px;
  }
}
@media (max-width: 850px) {
  .inspection-workbench {
    grid-template-columns: 150px minmax(0, 1fr);
  }
  .inspection-observations {
    grid-column: 2;
  }
  .inspection-scan .plan-viewport {
    height: 300px;
  }
}
@media (max-width: 600px) {
  .inspection-workbench {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .inspection-workbench > * {
    width: 100%;
  }
  .inspection-room-nav {
    display: flex;
    flex-wrap: wrap;
  }
  .inspection-rooms {
    padding: 16px;
  }
  .saved-inspection-page .inspection-workbench section {
    padding: 16px;
  }
  .inspection-scan .plan-viewport {
    height: 260px;
  }
  .inspection-tabs {
    gap: 8px 20px;
  }
  .inspection-tabs a {
    font-size: 14px;
  }
  .saved-inspection-page > h1 {
    font-size: 30px;
  }
  .inspection-workbench .plan-viewport {
    max-width: 100%;
  }
  .inspection-observations .current-finding h3 {
    flex-wrap: wrap;
  }
  .plan-story label {
    white-space: normal;
  }
}
@media (min-width: 1200px) {
  .inspection-workbench {
    grid-template-columns: 152px minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 16px;
  }
  .saved-inspection-page .inspection-workbench section {
    padding: 12px;
  }
  .inspection-observations .current-finding:has(img) {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 8px 16px;
  }
  .inspection-observations .current-finding:has(img) > h3,
  .inspection-observations .current-finding:has(img) > .saved-note {
    grid-column: 2;
  }
  .inspection-observations .finding-photos {
    grid-column: 1;
    grid-row: 1 / span 3;
  }
  .inspection-observations .finding-photos figure:first-child {
    margin-top: 0;
  }
}
.inspection-source {
  font-size: 14px;
}
.room-scan-choices {
  border-top: 1px solid var(--line);
  margin-top: 16px;
}
.inspection-source > summary {
  font-weight: 400;
}
.inspection-observations > .current-finding:first-of-type {
  border-top: 0;
}
.observation-number {
  background: var(--surface);
  border: 2px solid var(--blue);
  color: var(--blue);
}
.inspection-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}
.inspection-heading > div {
  min-width: 0;
}
.inspection-heading h1 {
  font-size: 40px;
  line-height: 1.12;
}
.inspection-heading > .button {
  flex: none;
}
.inspection-heading p {
  margin: 16px 0 0;
  font-size: 14px;
}
.inspection-receipt {
  margin: 20px 0;
}
.inspection-receipt h2 {
  font-size: 20px;
  margin-bottom: 8px;
}
.inspection-receipt p {
  font-size: 13px;
  margin: 0;
}
.saved-inspection-page .inspection-tabs {
  margin: 20px 0;
}
.saved-inspection-page > .breadcrumb {
  margin-bottom: 20px;
}
.inspection-scan > h2 {
  font-size: 14px;
  color: var(--blue);
  border: 1px solid var(--blue);
  border-radius: var(--radius-control);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
}
.saved-inspection-page .inspection-workbench section {
  min-height: 600px;
}
.inspection-heading .button {
  min-width: 184px;
}
@media (max-width: 850px) {
  .saved-inspection-page .inspection-workbench section {
    min-height: 0;
  }
}
@media (max-width: 600px) {
  .inspection-heading {
    flex-wrap: wrap;
    gap: 16px;
  }
  .inspection-heading h1 {
    font-size: 30px;
  }
  .inspection-heading > .button {
    width: 100%;
  }
  .inspection-heading p {
    font-size: 14px;
  }
}
.inspection-scan > h2 {
  display: block;
  border: 0;
  border-radius: 0;
  padding: 0;
  min-height: 0;
  color: var(--ink);
  font-size: 16px;
}

/* Source/result11296: selected reader first in DOM; complete source list alongside. */
.scan-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.scan-workbench.has-result {
  grid-template-columns: minmax(240px, 1fr) minmax(0, 2.4fr);
  grid-template-areas: "sources result";
}
.scan-workbench > * {
  min-width: 0;
}
.scan-workbench.has-result > .scan-reader {
  grid-area: result;
}
.scan-registry {
  grid-area: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.scan-workbench.has-result > .scan-registry {
  grid-area: sources;
}
.scan-registry section + section {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 20px;
}
.scan-registry a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.scan-registry ul {
  padding-left: 20px;
}
.scan-reader {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.scan-reader > .saved-plan {
  margin-top: 12px;
}
.scan-reader h2 {
  margin-bottom: 8px;
}
.photo-jumps {
  flex-wrap: wrap;
  gap: 4px 24px;
  overflow: visible;
}
.photo-jumps a,
.photo-jumps a:first-child {
  min-height: 44px;
  border: 0;
  color: var(--blue);
  font-weight: 400;
  text-decoration: underline;
  white-space: normal;
}
.photo-jumps a:hover {
  text-decoration-thickness: 2px;
}
/* Report16652/16861 reader gateway: saved version before secondary creation. */
.inspection-report-page .report-inspection-summary {
  margin: 16px 0 24px;
}
.report-inspection-summary .inspection-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 12px 0;
}
.report-inspection-summary .back {
  margin-bottom: 0;
}
.report-inspection-summary summary,
.report-create > summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
}
.report-inspection-summary details > p {
  max-width: 75ch;
}
.report-reader-gateway {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.report-reader-gateway h2 {
  font-size: 22px;
}
.report-recovery {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 20px 0;
}
.report-recovery button {
  background: var(--surface);
  border: 1px solid var(--blue);
  color: var(--blue);
}
.report-recovery p {
  margin: 0;
}
.report-version-list {
  margin: 24px 0;
}
.report-create {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.report-create > summary {
  font-weight: 650;
}
.report-create p {
  max-width: 75ch;
}
.report-reader-gateway .report-actions {
  margin-bottom: 8px;
}
@media (max-width: 767px) {
  .scan-workbench.has-result {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "result" "sources";
  }
  .scan-reader,
  .scan-registry,
  .report-reader-gateway {
    padding: 16px;
  }
  .report-reader-gateway .report-actions > a {
    width: 100%;
  }
  .report-inspection-summary .inspection-facts {
    font-size: 14px;
    gap: 8px 20px;
  }
  .inspection-report-page h1 {
    font-size: 30px;
  }
}

.scan-registry a[aria-current] {
  background: var(--selected);
  font-weight: 650;
  border-radius: var(--radius-control);
  padding-inline: 8px;
}
.scan-registry summary {
  min-height: 44px;
  padding-block: 10px;
  cursor: pointer;
}
.scan-saved-choices {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 12px;
}

.scan-guidance {
  margin: 8px 0 20px;
}
.scan-guidance > summary {
  min-height: 44px;
  padding: 10px 0;
  cursor: pointer;
}
.scan-reader > p {
  font-size: 14px;
  margin-bottom: 8px;
}
.scan-reader .saved-plan {
  padding: 12px;
}
.scan-reader .saved-plan p {
  font-size: 14px;
  margin-bottom: 8px;
}
.scan-reader .plan-story {
  margin: 4px 0 12px;
}
.scan-reader .plan-story label {
  font-size: 14px;
}

.report-reader-gateway label[for="report-view"] {
  display: block;
  margin-bottom: 8px;
}

/* Setup: existing persistent form panel family613/659/709 and17532/17582. */
.setup-entry {
  float: right;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
}
.setup-page {
  max-width: 960px;
  overflow-wrap: anywhere;
}
.setup-page h1 {
  margin-bottom: 24px;
}
.setup-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  margin-top: 24px;
}
.setup-form {
  display: grid;
  gap: 24px;
}
.setup-form h2,
.setup-form p {
  margin-bottom: 0;
}
.setup-field {
  display: grid;
  gap: 8px;
}
.setup-field label,
.setup-choice legend {
  font-size: 14px;
  font-weight: 600;
}
.setup-field .muted {
  font-size: 14px;
}
.setup-choice {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.setup-choice label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}
.setup-choice input {
  width: 20px;
  min-height: 20px;
  height: 20px;
  margin: 0;
  flex: none;
}
.setup-new,
.setup-adopt {
  display: grid;
  gap: 24px;
}
.setup-form:has(input[value="create"]:checked) .setup-adopt,
.setup-form:has(input[value="adopt"]:checked) .setup-new {
  display: none;
}
.setup-error {
  color: var(--color-error);
  background: #fff0f0;
  border-left: 3px solid var(--color-error);
  padding: 16px;
  margin: 0 0 24px;
}
.setup-error[hidden] {
  display: none;
}
.setup-form .actions,
.setup-card > .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.setup-card .secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.setup-form button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.setup-progress:empty {
  display: none;
}
.setup-form input,
.setup-form select {
  max-width: 100%;
  min-width: 0;
}
.setup-form select {
  white-space: normal;
  text-overflow: ellipsis;
}
.setup-form input:focus-visible,
.setup-form select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .setup-card {
    padding: 20px 16px;
  }
  .setup-entry {
    float: none;
    margin-bottom: 12px;
  }
  .setup-page h1 {
    font-size: 30px;
  }
  .setup-form .actions > * {
    width: 100%;
  }
}

.setup-card {
  max-width: 760px;
}
.setup-form input,
.setup-form select {
  border-color: var(--line);
}
.housing-neutral {
  max-width: 75ch;
  margin-bottom: 24px;
}

/* Approved navigation v1: four stable destinations, shared shell and existing tokens. */
.bottom-navigation {
  display: none;
}
.sidebar .nav-item.active {
  background: var(--selected);
  border-left: 3px solid var(--blue);
}
.sidebar .nav-item svg,
.bottom-navigation svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  flex: none;
}
.sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.destination-index {
  max-width: 1040px;
}
.destination-index > p {
  max-width: 75ch;
}
.destination-group {
  margin: 24px 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.destination-entry {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.destination-entry h3 {
  font-size: 18px;
  margin: 0 0 8px;
}
.destination-entry p {
  margin: 8px 0;
}
.destination-entry a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.destination-entry > p {
  font-size: 14px;
}
.destination-group h2 {
  overflow-wrap: anywhere;
}
.bottom-navigation a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -4px;
}
.workspace main {
  min-width: 0;
}
@media (max-width: 767px) {
  .workspace {
    display: block;
  }
  .workspace > .sidebar {
    display: none;
  }
  .workspace > .compact-header {
    display: flex;
  }
  .workspace main {
    padding: 20px 16px calc(var(--dashboard-nav-height, 100px) + 20px);
  }
  .bottom-navigation {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  }
  .bottom-navigation .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 2px;
    min-height: 56px;
    font-size: 12px;
    border: 0;
    border-radius: var(--radius-control);
  }
  .bottom-navigation .nav-item.active {
    background: var(--selected);
    color: var(--blue);
    box-shadow: inset 0 3px var(--blue);
  }
  .destination-group {
    padding: 16px;
  }
  .destination-entry > p {
    overflow-wrap: anywhere;
  }
  .destination-index h1 {
    font-size: 30px;
  }
}
@media (min-width: 768px) {
  .workspace {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .workspace > .sidebar {
    display: flex;
  }
  .workspace > .compact-header {
    display: none;
  }
  .workspace main {
    padding: 32px;
    min-width: 0;
  }
  .sidebar {
    gap: 32px;
  }
}
.sidebar .nav-item span {
  font-size: 16px;
  padding: 0;
  color: inherit;
}
.sidebar .nav-item svg,
.bottom-navigation .nav-item svg {
  margin: 0;
}
.bottom-navigation .nav-item span {
  font-size: 12px;
  padding: 0;
  color: inherit;
  line-height: 1.35;
  white-space: nowrap;
}
/* Navigation restores reading positions immediately, including fragment routes. */
html {
  scroll-behavior: auto;
}
/* Price administration shares the account shell, with flowing phone rows. */
.prices-page {
  max-width: 1100px;
  min-width: 0;
}
.prices-page fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
}
.prices-page label {
  display: block;
  font-weight: 600;
  margin: 8px 0;
  min-width: 0;
}
.prices-page input:not([type="checkbox"]),
.prices-page select,
.prices-page textarea {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 44px;
  margin-top: 4px;
}
.prices-page button,
.prices-page summary {
  min-height: 44px;
  white-space: normal;
}
.catalogue-entry {
  border-top: 1px solid var(--border, var(--color-border));
  padding: 20px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.catalogue-entry h2,
.catalogue-entry details {
  grid-column: 1/-1;
  margin: 0;
}
.catalogue-entry fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.catalogue-entry fieldset legend {
  font-weight: 600;
  margin-top: 12px;
}
.catalogue-entry input[type="checkbox"] {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 8px;
}
.catalogue-entry fieldset label {
  font-weight: 400;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.price-publish {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}
.prices-page details {
  overflow-wrap: anywhere;
}
.prices-page summary {
  padding: 12px 0;
  cursor: pointer;
}
@media (max-width: 700px) {
  .catalogue-entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .catalogue-entry > * {
    grid-column: 1 !important;
  }
  .prices-page {
    width: 100%;
  }
}
.prices-page .catalogue-entry {
  display: block;
  padding: 0;
  border-top: 1px solid var(--color-border);
}
.catalogue-entry > summary {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 4px;
  list-style: none;
  min-height: 60px;
}
.catalogue-entry > summary > span:last-child {
  color: var(--color-primary);
}
.price-entry-editor {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  padding: 8px 0 24px;
}
.price-entry-editor > details {
  grid-column: 1/-1;
}
.prices-page .price-remove,
.prices-page #price-add,
.prices-page #price-reload {
  background: var(--color-surface);
  color: var(--color-ink);
  border: 1px solid var(--color-borderstrong);
}
.prices-page .price-remove {
  justify-self: start;
  min-height: 44px;
  font-weight: 400;
  padding: 8px 12px;
}
.prices-page .price-remove:hover,
.prices-page #price-add:hover,
.prices-page #price-reload:hover {
  background: var(--color-surface-muted);
}
@media (max-width: 700px) {
  .catalogue-entry > summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
  }
  .catalogue-entry > summary > strong {
    grid-column: 1;
  }
  .catalogue-entry > summary > span:nth-child(2) {
    grid-column: 1;
    font-size: 0.9em;
  }
  .catalogue-entry > summary > span:last-child {
    grid-column: 2;
    grid-row: 1/3;
  }
  .price-entry-editor {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Reviewed 13 November dashboard: bounded work area and content-sized rows. */
.workspace main {
  max-width: 1480px;
  margin: 0;
  padding: 32px;
  justify-self: start;
}
.workspace main > p,
.read-error {
  max-width: 75ch;
}
.workspace :is(h1, h2, h3, h4, p, dd, summary, a, button) {
  overflow-wrap: anywhere;
}
button,
.button {
  white-space: normal;
  text-align: center;
  max-width: 100%;
}
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.ui-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex: none;
}
.ui-icon.chevron {
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.sidebar .nav-item svg,
.bottom-navigation .nav-item svg {
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.housing-grid {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "syn" "rooms";
  gap: 28px;
  margin-bottom: 28px;
}
.housing-page .home-heading {
  margin-bottom: 28px;
}
.housing-inspections {
  gap: 12px;
}
.inspection-row {
  display: grid;
  grid-template-columns: minmax(100px, 1.4fr) minmax(220px, 2fr) auto auto;
  gap: 12px 24px;
  align-items: center;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  min-width: 0;
}
.inspection-row > * {
  min-width: 0;
}
.inspection-row h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}
.inspection-row-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin: 0;
  font-size: 14px;
}
.inspection-row-dates dt {
  font-size: 12px;
  color: var(--muted);
}
.inspection-row-dates dd {
  margin: 2px 0 0;
}
.inspection-row > .badge {
  justify-self: start;
}
.inspection-open {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.inspection-open:hover {
  text-decoration: underline;
}
.housing-inspection {
  min-height: 0;
  padding: 16px 20px;
}
.housing-inspection p {
  margin: 0;
}
.housing-rooms {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}
.housing-room {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
.housing-room:hover,
.inspection-room-nav a:hover {
  background: var(--selected);
}
.housing-room strong {
  min-width: 0;
  overflow-wrap: anywhere;
}
.housing-documents .documents {
  gap: 12px;
}
.housing-documents .documents > article {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 24px;
  align-items: center;
}
.housing-documents .documents h3 {
  font-size: 16px;
  margin: 0;
}
.housing-documents .documents article > p {
  font-size: 14px;
  margin: 0;
  color: var(--muted);
}
.housing-documents .documents .actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  gap: 8px 24px;
}
.document-reader {
  max-width: 75ch;
  margin-inline: 0;
}
.document-reader .reading {
  max-width: 75ch;
}
.setup-page {
  max-width: 840px;
}
.setup-card {
  max-width: 100%;
  padding: 24px;
}
.destination-index {
  max-width: none;
}
.destination-group {
  padding: 0;
  margin: 28px 0;
  background: transparent;
  border: 0;
}
.destination-group h2 {
  font-size: 20px;
  margin-bottom: 12px;
}
.destination-entry {
  border: 0;
  padding: 0;
  margin: 12px 0;
}
.destination-entry > p,
.destination-entry > details {
  padding: 0 20px;
}
.destination-entry:has(> p),
.destination-entry:has(> details) {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding-bottom: 12px;
}
.destination-entry:has(> p) > .inspection-row,
.destination-entry:has(> details) > .inspection-row {
  border: 0;
}
.saved-inspection-page .inspection-workbench section {
  min-height: 0;
}
.inspection-heading {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 16px 32px;
}
.inspection-heading > .button {
  align-self: center;
}
.inspection-room-nav a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 14px;
  gap: 10px;
  align-items: center;
  padding: 10px 8px;
  min-height: 48px;
  border-radius: var(--radius-control);
}
.inspection-room-nav a > span {
  min-width: 0;
}
.inspection-room-nav .chevron {
  width: 14px;
  height: 14px;
}
.inspection-rooms {
  padding: 16px 8px;
}
.inspection-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}
.inspection-facts > div {
  min-width: 0;
}
.inspection-facts dt {
  font-size: 12px;
  color: var(--muted);
}
.inspection-facts dd {
  margin: 2px 0 0;
}
.scan-reader > p,
.scan-guidance {
  max-width: 75ch;
}
.report-reader-gateway > p {
  max-width: 75ch;
}
.historical-card:only-child {
  max-width: 840px;
}
.prices-page {
  max-width: 1100px;
}
.price-entry-editor {
  max-width: 840px;
}
.login {
  min-height: 0;
}
.login-brand {
  margin-bottom: 32px;
}
.login form {
  margin-top: 40px;
}
@media (min-width: 1200px) {
  .inspection-workbench {
    grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1.2fr);
  }
}
@media (min-width: 851px) and (max-width: 1199px) {
  .inspection-workbench {
    grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1fr);
  }
}
@media (max-width: 1199px) {
  .housing-rooms {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .inspection-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 16px;
  }
  .inspection-row h3 {
    grid-column: 1;
  }
  .inspection-row > .badge {
    grid-column: 2;
    grid-row: 1;
  }
  .inspection-row-dates {
    grid-column: 1;
    grid-row: 2;
  }
  .inspection-open {
    grid-column: 2;
    grid-row: 2;
  }
  .housing-page {
    padding-top: 0;
  }
}
@media (max-width: 850px) {
  .housing-rooms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .housing-documents .documents > article {
    grid-template-columns: minmax(0, 1fr);
  }
  .housing-documents .documents .actions {
    grid-column: 1;
    grid-row: auto;
  }
  .inspection-workbench {
    grid-template-columns: 160px minmax(0, 1fr);
  }
}
@media (max-width: 767px) {
  .workspace main {
    padding: 20px 16px calc(var(--dashboard-nav-height, 100px) + 20px);
  }
  .inspection-row {
    padding: 12px 16px;
  }
  .inspection-row-dates {
    grid-column: 1/-1;
    grid-row: 2;
    gap: 12px 16px;
    min-width: 0;
  }
  .inspection-open {
    grid-column: 1/-1;
    grid-row: 3;
    justify-content: space-between;
  }
  .housing-room {
    padding: 12px;
    gap: 8px;
  }
  .housing-room .chevron {
    width: 14px;
  }
  .housing-room {
    grid-template-columns: 24px minmax(0, 1fr) 14px;
  }
  .housing-page .home-heading {
    margin-bottom: 24px;
  }
  .housing-documents .documents > article {
    padding: 16px;
  }
  .destination-entry > p,
  .destination-entry > details {
    padding-inline: 16px;
  }
  .setup-card {
    padding: 20px 16px;
  }
  .scan-registry,
  .scan-reader,
  .report-reader-gateway {
    padding: 16px;
  }
}
@media (max-width: 600px) {
  .inspection-workbench {
    display: flex;
    flex-direction: column;
  }
  .inspection-room-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 8px;
  }
  .inspection-heading > .button {
    width: auto;
  }
  .inspection-heading h1 {
    font-size: 30px;
  }
}
@media (max-width: 360px) {
  .housing-rooms,
  .inspection-room-nav {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Local readers/forms must override the generic direct-child overflow bound. */
.workspace main > .document-reader {
  max-width: 75ch;
}
.workspace main > .setup-page {
  max-width: 840px;
}
.workspace main > .prices-page {
  max-width: 1100px;
}
.prices-page #price-list-fields {
  max-width: 840px;
}
.inspection-row > .badge {
  align-self: start;
  margin-top: 2px;
}
/* Selected-home readers: ordinary GET destinations, with source context retained. */
.selected-home-identity {
  border-top: 1px solid var(--line);
  padding: 20px 12px;
  display: grid;
  gap: 8px;
  overflow-wrap: anywhere;
}
.selected-home-identity small {
  font-size: 12px;
}
.selected-home-identity strong {
  font-size: 14px;
}
.home-view-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 28px;
}
.home-view-navigation a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 16px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  border-radius: var(--radius-control) 8px 0 0;
}
.home-view-navigation a[aria-current="page"] {
  color: var(--blue);
  background: var(--selected);
  border-bottom-color: var(--blue);
  font-weight: 700;
}
.home-context {
  overflow-wrap: anywhere;
}
.home-context section {
  min-width: 0;
}
.home-context .intro {
  margin-bottom: 28px;
}
.home-panel,
.home-facts-strip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 20px;
}
.home-panel h2 {
  font-size: 20px;
}
.home-facts-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px 48px;
  margin-bottom: 28px;
}
.home-facts-strip dl {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
  margin: 0;
}
.home-facts-strip dt {
  font-size: 13px;
  color: var(--muted);
}
.home-facts-strip dd {
  margin: 4px 0 0;
  font-weight: 700;
}
.home-facts-strip > a {
  font-size: 14px;
  font-weight: 650;
}
.home-source-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.home-source-grid > *,
.history-side > * {
  min-width: 0;
}
.home-documents section {
  margin-bottom: 28px;
}
.home-context .documents > article {
  display: block;
}
.home-context .documents h3 {
  font-size: 16px;
  margin: 0 0 6px;
}
.home-context .documents article > p {
  margin-bottom: 8px;
}
.home-context .documents .actions {
  display: flex;
  gap: 12px 24px;
}
.home-context .actions a {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}
.home-context .source-detail {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0;
}
.home-context summary {
  cursor: pointer;
  min-height: 32px;
  display: list-item;
  padding: 4px 0;
}
.home-context details p {
  margin-top: 8px;
}
.home-room-choice {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 24px;
}
.home-room-choice > div {
  flex: 1;
  min-width: min(100%, 180px);
}
.home-room-choice label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}
.home-room-choice select {
  max-width: 100%;
}
.home-room-choice button {
  flex: none;
}
.home-context .checklist-point {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.home-context .checklist-point p {
  max-width: 65ch;
}
.home-context .checklist-point > p:last-of-type {
  margin-bottom: 8px;
}
.home-context .checklist-point h3 {
  font-size: 18px;
}
.home-context .section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.home-context .section-heading h2 {
  margin: 0;
}
.home-context .section-heading a {
  font-weight: 650;
  font-size: 14px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
}
.home-context-entries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.home-context-entries > a {
  text-decoration: none;
  color: var(--ink);
}
.home-context-entries h2 {
  font-size: 18px;
  margin-bottom: 6px;
}
.home-context-entries p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.home-profile-details {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 28px;
}
.history-note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.history-note > p:first-child {
  font-size: 13px;
  margin-bottom: 6px;
}
.history-note > p:last-of-type {
  margin-bottom: 0;
}
.history-note .original-note {
  white-space: pre-wrap;
  max-width: 75ch;
}
.history-note .source {
  font-size: 14px;
}
.history-side {
  display: grid;
  gap: 24px;
}
.old-quantity {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.old-quantity p {
  font-size: 14px;
  margin-bottom: 8px;
}
.old-quantity .source {
  font-size: 13px;
}
.archive-report {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.archive-report p {
  font-size: 13px;
}
.home-context #tenancy-history {
  margin-top: 32px;
}
.home-context #plan {
  margin-top: 28px;
}
.home-context :target {
  scroll-margin-top: 24px;
}
.home-context .facts {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}
select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
@media (max-width: 1050px) {
  .home-source-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-source-grid > .home-panel {
    max-width: none;
  }
  .home-facts-strip {
    gap: 16px 32px;
  }
}
@media (max-width: 767px) {
  .home-view-navigation {
    gap: 0;
    margin-bottom: 24px;
  }
  .home-view-navigation a {
    padding: 10px 12px;
    flex: 1;
    justify-content: center;
  }
  .home-panel,
  .home-facts-strip {
    padding: 16px;
  }
  .home-context-entries {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .home-source-grid {
    gap: 24px;
  }
  .home-facts-strip dl {
    gap: 16px 24px;
  }
  .history-note {
    padding: 16px;
  }
  .home-context .home-heading {
    margin-bottom: 20px;
  }
  .home-room-choice {
    margin: 16px 0 24px;
  }
  .home-context .source-detail summary {
    min-height: 36px;
  }
}

.home-context .plan-selection.selected {
  display: flex;
}
.home-context .plan-selection.selected ~ .plan-selection:target {
  display: flex;
}
.home-context #plan [hidden] {
  display: none;
}
/* Keep each local destination intact; enlarged links wrap as whole items. */
.home-context .home-view-navigation a {
  white-space: nowrap;
  flex: 0 0 auto;
}

.report-selected-version {
  font-weight: 650;
  margin-bottom: 4px;
}
.report-inspection-summary > p {
  margin: 0;
}
.report-inspection-summary .inspection-facts {
  margin: 8px 0;
}
.report-version-list .report-versions {
  display: grid;
  gap: 0;
}
.report-version-list .report-versions > a {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 767px) {
  .bottom-navigation.large-text {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bottom-navigation .nav-item {
    min-width: 0;
  }
  .bottom-navigation .nav-item span {
    flex: none;
  }
}

/* The shared viewer keeps the saved reader and its fallback within the available column. */
[data-dashboard-room-view] {
  min-width: 0;
  max-width: 100%;
}
[data-dashboard-room-view] [hidden] {
  display: none !important;
}
[data-dashboard-room-view] .room-view-wall-label {
  flex-wrap: wrap;
  flex-basis: 140px;
  min-width: 0;
}
[data-dashboard-room-view] select {
  max-width: 100%;
}
[data-dashboard-room-view] [data-room-original] {
  overflow-wrap: anywhere;
}

/* Organisation chooser and shared basis: natural-height surfaces, URL-owned scope. */
.housing-scope {
  margin: 20px 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
.housing-scope form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}
.housing-scope form > div {
  min-width: 0;
}
.housing-scope label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.housing-scope select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  font: inherit;
}
.housing-scope .actions {
  margin-top: 16px;
}
.housing-owner p {
  font-size: 14px;
  margin: 6px 0;
}
.housing-owner .actions {
  margin: 0;
}
.shared-basis header h1 {
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.2;
}
.shared-basis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}
.shared-basis-grid > * {
  min-width: 0;
}
.shared-basis section {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  margin: 0 0 24px;
}
.shared-basis h2 {
  font-size: 22px;
}
.shared-document {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.shared-document:last-child {
  padding-bottom: 0;
}
.shared-document h3 {
  font-size: 18px;
  line-height: 1.4;
  margin: 4px 0 8px;
}
.shared-document p {
  font-size: 14px;
}
.shared-document .eyebrow {
  font-size: 13px;
}
.shared-basis .actions a,
.housing-scope .actions a,
.housing-owner .actions a,
.shared-prices > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
}
.shared-basis,
.housing-owner,
.housing-scope {
  overflow-wrap: anywhere;
}
.shared-basis .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.shared-basis .breadcrumb a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.housing-owner .actions {
  display: flex;
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .housing-scope {
    padding: 16px;
  }
  .housing-scope form {
    grid-template-columns: minmax(0, 1fr);
  }
  .housing-scope button {
    min-height: 44px;
  }
  .shared-basis-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .shared-basis section {
    padding: 16px;
  }
  .shared-basis header h1 {
    font-size: 30px;
  }
  .shared-document .actions,
  .housing-scope .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
  }
  .home-profile-details .facts > div {
    min-width: 0;
  }
}
/* Shared basis responds to its content column, including enlarged text. */
.shared-basis {
  container-type: inline-size;
}
@container (max-width:48em) {
  .shared-basis-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}
/* One scoped price list with comparable rows and one selected editor. */
.workspace main > .prices-page {
  max-width: none;
}
.prices-page {
  max-width: none;
  overflow-wrap: anywhere;
}
.prices-page [hidden] {
  display: none !important;
}
.price-scope-links {
  display: flex;
  gap: 8px 24px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.price-scope-links a,
.price-scope-choices summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.price-scope-choices summary {
  display: list-item;
  cursor: pointer;
}
.prices-page .breadcrumb {
  margin-bottom: 16px;
}
.prices-page h1 {
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.2;
}
.prices-page #price-base:has(p) {
  padding: 16px 20px;
  background: var(--selected);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  margin: 20px 0;
}
.prices-page #price-base p {
  margin: 0 0 8px;
}
.prices-page #price-base a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.prices-page #price-list-fields {
  max-width: 840px;
  margin: 24px 0;
}
.prices-page #price-list-fields > fieldset {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 20px;
}
.prices-page #price-list-fields p {
  grid-column: 1/-1;
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
#price-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
#price-workspace > * {
  min-width: 0;
}
#price-entries {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  overflow: hidden;
}
.prices-page .price-row,
.price-row-heading {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(40px, 0.5fr) minmax(
      0,
      1fr
    ) minmax(0, 1fr);
  width: 100%;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 16px 20px;
  font: inherit;
  line-height: 1.5;
}
.prices-page .price-row {
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  min-height: 68px;
}
.prices-page .price-row[aria-pressed="true"] {
  background: var(--selected);
}
.prices-page .price-row:hover {
  background: var(--selected);
}
.price-row-heading {
  font-size: 14px;
  background: var(--paper);
  color: var(--muted);
}
#price-entries > p {
  padding: 16px 20px;
}
#price-editor {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-control);
  padding: 20px;
}
#price-editor h2 {
  font-size: 22px;
}
#price-editor > fieldset {
  display: grid;
  gap: 8px;
}
#price-editor input:disabled,
#price-editor select:disabled,
#price-editor textarea:disabled,
.prices-page #price-list-fields :disabled {
  color: var(--ink);
  opacity: 1;
  background: var(--paper);
}
#price-editor fieldset fieldset label {
  font-weight: 400;
  display: flex;
  align-items: center;
  min-height: 44px;
}
#price-editor input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 8px;
}
#price-editor legend {
  font-weight: 600;
  margin-top: 12px;
}
.prices-page .price-publish {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 32px;
}
.price-publish > p {
  flex-basis: 100%;
  font-weight: 600;
}
.price-field-error {
  color: #a10f22;
}
.prices-page [aria-invalid="true"] {
  border: 2px solid #a10f22;
}
.report-inspection-summary .report-participants {
  margin: 12px 0;
}
.report-versions .report-version-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px 24px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.report-version-row a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.report-version-row p {
  margin: 0;
}
.report-source-links {
  margin: 28px 0;
}
.report-source-links .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.report-source-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.report-create {
  margin-top: 28px;
  padding-top: 24px;
}
.report-create h2 {
  font-size: 22px;
}
.report-local-archives > article {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.report-local-archives a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
@media (max-width: 1100px) {
  .prices-page .price-row,
  .price-row-heading {
    padding: 12px;
    gap: 8px;
    font-size: 14px;
  }
}
@media (max-width: 900px) {
  #price-workspace {
    display: block;
  }
  #price-editor {
    margin: 12px;
    border-color: var(--blue);
  }
  .prices-page .price-row,
  .price-row-heading {
    grid-template-columns: minmax(0, 2fr) minmax(40px, 0.5fr) minmax(
        0,
        1fr
      ) minmax(0, 1fr);
  }
}
@media (max-width: 550px) {
  .prices-page h1 {
    font-size: 30px;
  }
  .price-row-heading {
    display: none;
  }
  .prices-page .price-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 16px;
  }
  .price-row strong {
    grid-column: 1;
  }
  .price-row span:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }
  .price-row span:nth-child(3),
  .price-row span:nth-child(4) {
    grid-column: 1/-1;
  }
  .prices-page #price-list-fields > fieldset {
    grid-template-columns: minmax(0, 1fr);
  }
  .report-versions .report-version-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .report-version-row a {
    justify-self: start;
  }
}
/* Publication belongs to the selected work, before the next mobile row. */
#price-editor .price-publish {
  margin: 20px 0 0;
  padding-top: 16px;
  gap: 8px;
}
#price-editor .price-publish > p {
  font-size: 14px;
  font-weight: 400;
}
#price-editor .price-publish button {
  font: inherit;
  font-size: 14px;
}

/* Catalogue: compact comparison on desktop, complete labelled rows on phones. */
.catalogue-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px 24px;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}
.catalogue-heading > div {
  min-width: 0;
  flex: 1 1 240px;
}
.catalogue-heading .setup-entry {
  float: none;
  flex: none;
  margin: 0;
  max-width: 100%;
}
.catalogue-label {
  display: none;
}
.workspace main > section.housing-scope {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid var(--line);
}
@media (max-width: 1000px) {
  .workspace main > section.housing-scope {
    padding: 16px;
  }
  .catalogue-heading h1 {
    font-size: 30px;
  }
  .catalogue-heading .setup-entry {
    font-size: 14px;
    flex: 0 1 auto;
  }
  .catalogue-table {
    overflow: visible;
    border: 0;
    background: transparent;
  }
  .catalogue-table table {
    display: block;
    min-width: 0;
    table-layout: auto;
    background: transparent;
  }
  .catalogue-table colgroup {
    display: none;
  }
  .catalogue-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .catalogue-table tbody {
    display: grid;
    gap: 12px;
  }
  .catalogue-table tbody tr {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    gap: 12px 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
    min-width: 0;
  }
  .catalogue-table tbody td {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 4px;
    min-width: 0;
    height: auto;
    padding: 0;
    border: 0;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .catalogue-table .catalogue-address,
  .catalogue-table td:nth-child(2),
  .catalogue-table .catalogue-empty {
    grid-column: 1/-1;
  }
  .catalogue-table .catalogue-address a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 18px;
    font-weight: 650;
    max-width: 100%;
  }
  .catalogue-table .catalogue-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
  }
  .catalogue-table .badge {
    white-space: normal;
    max-width: 100%;
    font-size: 14px;
  }
  .catalogue-table .catalogue-empty {
    padding: 0 !important;
  }
}
/* Dashboard hierarchy: authorised company → department → one selected home. */
.sidebar {
  gap: 24px;
  padding: 20px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  height: 100svh;
}
.sidebar > .brand {
  margin: 0 4px;
  flex: none;
}
.sidebar-hierarchy {
  min-width: 0;
  flex: none;
}
.sidebar-company,
.sidebar-department,
.sidebar-home {
  min-width: 0;
}
.sidebar-department,
.sidebar-home {
  margin: 22px 0 0 6px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}
.scope-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.scope-identity {
  display: block;
  font-weight: 650;
  overflow-wrap: anywhere;
  line-height: 1.45;
  margin: 0 0 2px;
  text-decoration: none;
}
.scope-absence {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.scope-switch {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.sidebar-hierarchy nav {
  margin-top: 12px;
  gap: 4px;
}
.sidebar .nav-item {
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border-left: 3px solid transparent;
  line-height: 1.4;
}
.sidebar .nav-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.sidebar .nav-item[aria-current="page"] {
  background: var(--selected);
  border-left-color: var(--blue);
  color: var(--blue);
  font-weight: 650;
}
.sidebar-account {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  flex: none;
}
.dashboard-scope-context {
  display: none;
}
@media (min-width: 768px) {
  .workspace {
    grid-template-columns: 248px minmax(0, 1fr);
  }
  .home-view-navigation {
    display: none;
  }
}
@media (min-width: 768px) and (max-width: 1000px) {
  .workspace main {
    padding: 24px 20px;
  }
  .housing-scope form {
    grid-template-columns: 1fr;
  }
  .housing-scope select {
    max-width: 100%;
    min-width: 0;
  }
  .setup-card {
    padding: 20px 16px;
  }
  .prices-page #price-list-fields > fieldset {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 767px) {
  .dashboard-scope-context {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-bottom: 20px;
    font-size: 14px;
    overflow-wrap: anywhere;
  }
  .dashboard-scope-context .scope-identity {
    display: inline;
    margin: 0;
  }
  .dashboard-scope-context > * {
    min-width: 0;
    max-width: 100%;
  }
}

.sidebar-department-choice {
  margin-top: 20px;
}
/* On phones the compact scope replaces repeated home navigation metadata. */
@media (max-width: 767px) {
  .dashboard-scope-context ~ .home-context > .breadcrumb,
  .dashboard-scope-context ~ .home-context .home-heading .housing-owner > p {
    display: none;
  }
}

/* Sequential chooser: one ordinary GET decision per page. */
.housing-choices {
  max-width: 1128px;
  min-width: 0;
}
.housing-choices h1 {
  font-family: var(--font-heading);
  font-size: 36px;
  line-height: 1.2;
}
.choice-search {
  margin: 36px 0 28px;
}
.choice-search label {
  display: block;
  font-weight: 650;
  margin-bottom: 8px;
}
.choice-search > div {
  display: flex;
  gap: 12px;
}
.choice-search input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
}
.choice-search button {
  min-height: 48px;
}
.housing-choice-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.housing-choice-list li {
  border-top: 1px solid var(--line);
}
.housing-choice-list a {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  padding: 24px 16px;
  min-height: 88px;
  text-decoration: none;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.housing-choice-list a > span {
  min-width: 0;
}
.choice-name {
  font-family: var(--font-heading);
  font-size: 23px;
  color: var(--ink);
}
.choice-empty {
  padding: 24px 0;
}
.housing-exception {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.housing-exception a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.sidebar-department,
.sidebar-home {
  margin: 20px 0 0;
  padding-left: 0;
  border-left: 0;
}
.sidebar-home {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
@media (max-width: 767px) {
  .housing-choices h1 {
    font-size: 30px;
  }
  .housing-choice-list a {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 0;
  }
  .choice-name {
    font-size: 22px;
  }
  .choice-search {
    margin: 24px 0;
  }
  .choice-search > div {
    gap: 8px;
  }
}

.dashboard-level-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  width: 100%;
  margin-top: 8px;
}
.dashboard-level-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.dashboard-level-navigation [aria-current="page"] {
  font-weight: 700;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 8px;
}
/* Account and mailbox continuations use the established dashboard family. */
.profile-page {
  max-width: 1128px;
}
.profile-page > .intro {
  margin-bottom: 28px;
}
.profile-page .setup-card {
  margin-block: 24px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
.profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}
.profile-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}
.profile-field label {
  font-size: 14px;
  color: var(--muted);
}
.profile-field:has(#title) {
  grid-column: 1/-1;
}
.profile-field input[readonly] {
  background: var(--paper);
}
.profile-field input {
  min-width: 0;
}
.avatar-editor {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.profile-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: var(--selected);
  color: var(--blue);
  font-weight: 750;
  font-size: 24px;
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.form-status {
  margin: 16px 0;
  overflow-wrap: anywhere;
}
.form-status:empty {
  display: none;
}
.identity-page {
  max-width: 520px;
  width: 100%;
  padding: 24px 0;
}
.identity-page .login-brand {
  font-size: 28px;
  margin: 0 0 24px;
}
.identity-page h1 {
  font-size: 32px;
  margin-block: 20px;
}
.identity-page form {
  display: grid;
  gap: 16px;
  margin-block: 32px;
}
.identity-page input {
  max-width: 100%;
}
.identity-page label {
  display: block;
  margin-bottom: 8px;
}
.identity-page .button {
  margin-block: 12px;
}
.identity-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.identity-login-options {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.identity-login-options > a {
  min-height: 44px;
  display: flex;
  align-items: center;
}
.profile-page .actions {
  gap: 12px;
}
#password-change-request {
  display: grid;
  gap: 16px;
  margin-block: 16px;
}
#password-change-request > button {
  justify-self: start;
}
#password-change-request > .form-status {
  margin: 0;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
.profile-page p,
.identity-page p,
.profile-page h2 {
  overflow-wrap: anywhere;
}
[hidden] {
  display: none !important;
}
@media (max-width: 600px) {
  .profile-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .profile-page .setup-card {
    padding: 16px;
  }
  .profile-page .actions > * {
    flex: 1 1 100%;
  }
  .avatar-editor {
    gap: 12px;
  }
  .identity-page {
    padding: 0;
  }
  .identity-page h1 {
    font-size: 30px;
  }
  .identity-page form button,
  .identity-page .button {
    width: 100%;
  }
}
.workspace main > .setup-page.profile-page {
  max-width: 1128px;
}
.identity-invitation {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 20px 16px;
  margin-block: 24px;
}
.identity-invitation h2 {
  font: 700 23px var(--font-heading);
}
.login-layout:has(.identity-page) {
  place-items: start center;
  padding: 16px;
}
.identity-page h1:focus {
  outline: none;
}
.account-company-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}
.account-company-compact p {
  margin: 0;
}
.account-company-compact > div {
  min-width: 0;
}
.account-company-compact h3 {
  overflow-wrap: anywhere;
}
.account-company-compact > a {
  flex: none;
}
@media (max-width: 600px) {
  .account-company-compact {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .account-company-compact > a {
    width: 100%;
  }
  .profile-page input {
    scroll-margin-block: 24px calc(var(--dashboard-nav-height, 100px) + 24px);
  }
}

/* Company access administration shares the bounded dashboard shell. */
.access-page {
  max-width: 1128px;
  min-width: 0;
}
.access-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.access-heading h1 {
  margin-bottom: 12px;
}
.access-tabs {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid var(--border, #d5d9e1);
  margin: 24px 0;
}
.access-tabs a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-weight: 700;
}
.access-filters {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}
.access-page label {
  display: block;
}
.access-page input,
.access-page select {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.access-page :is(input:not([type="checkbox"]), select) {
  width: 100%;
  min-height: 46px;
}
.access-list {
  background: var(--color-surface);
  border: 1px solid #d5d9e1;
  border-radius: var(--radius-control);
  padding: 0 20px;
}
.access-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 120px minmax(0, 1.5fr) 44px;
  gap: 20px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid #e6e8ed;
}
.access-row:last-child {
  border-bottom: 0;
}
.access-row h2 {
  font-family: inherit;
  font-size: 17px;
  margin: 0;
}
.access-row p {
  font-size: 14px;
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.access-row a {
  min-height: 44px;
  display: flex;
  align-items: center;
}
.access-person {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.access-person > div {
  min-width: 0;
}
.access-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-selected);
  color: var(--color-primary);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  font-weight: 700;
  overflow: hidden;
}
.access-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.access-badge {
  font-size: 13px;
  background: #e9f4ef;
  color: #16664d;
  padding: 5px 10px;
  border-radius: 20px;
  justify-self: start;
}
.assignment-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 16px;
  align-items: end;
  background: var(--color-surface);
  border: 1px solid #d5d9e1;
  border-radius: var(--radius-control);
  margin: 12px 0;
  padding: 16px;
}
.assignment-row legend {
  font-weight: 700;
}
.permission-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
.permission-groups fieldset {
  margin: 0;
  min-width: 0;
}
.permission-groups legend {
  font-size: 18px;
  font-weight: 700;
}
.access-page .permission {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}
.permission input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.access-assignment {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid #d5d9e1;
  padding: 12px 0;
}
.access-page .actions {
  flex-wrap: wrap;
  margin-top: 20px;
}
.access-page #memberships {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}
.access-page :is(input, button, select, a) {
  scroll-margin-bottom: 100px;
}
.access-page [readonly] {
  background: #f4f3f0;
}
.access-page h1,
.access-page h2,
.access-page p {
  overflow-wrap: anywhere;
}
.access-page .profile-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.access-page #access-status:empty {
  margin: 0;
}
.access-page #access-status:not(:empty) {
  padding: 12px;
  background: var(--color-surface);
  border-left: 3px solid var(--color-primary);
}
.access-page #access-scope select {
  width: auto;
  max-width: 100%;
}
@media (max-width: 1000px) {
  .access-row {
    grid-template-columns: minmax(0, 1fr) 100px;
  }
  .access-row > div:nth-of-type(2) {
    grid-column: 1;
  }
  .access-filters {
    gap: 12px;
  }
  .access-page .profile-fields {
    grid-template-columns: 1fr 1fr;
  }
  .assignment-row {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .access-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .access-filters,
  .permission-groups,
  .access-page .profile-fields,
  .assignment-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .access-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .access-row > div:nth-of-type(2) {
    grid-column: auto;
  }
  .access-row {
    gap: 10px;
  }
  .access-assignment {
    align-items: flex-start;
    flex-direction: column;
  }
  .access-list {
    padding: 0 16px;
  }
  .access-page .setup-card {
    padding: 16px;
  }
  .access-heading .button {
    width: auto;
  }
}
html:has(.access-page) {
  scroll-padding-bottom: calc(var(--dashboard-nav-height, 84px) + 24px);
}
.access-tabs a[aria-current="page"] {
  border-bottom: 3px solid var(--color-primary);
}
.access-tabs a[hidden] {
  display: none;
}
.sidebar-admin-children {
  padding-left: 12px;
  border-left: 1px solid #d5d9e1;
  margin-left: 16px;
}
.sidebar-admin-children:empty {
  display: none;
}

.connections-page {
  min-width: 0;
}
.connections-page fieldset {
  min-width: 0;
  margin: 20px 0;
  border: 1px solid var(--line, #d3d7df);
  border-radius: var(--radius-control);
  padding: 16px;
}
.connections-page legend {
  font-weight: 650;
  padding: 0 6px;
}
.connections-page .permission {
  overflow-wrap: anywhere;
  min-height: 44px;
  align-items: center;
}
.connections-page .permission input {
  width: 18px;
  flex: none;
}
.connections-page .access-row {
  grid-template-columns: minmax(0, 1fr) auto minmax(120px, 190px) auto;
}
.connections-page input,
.connections-page select {
  max-width: 100%;
  min-width: 0;
}
.connection-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 16px;
}
.connections-page p,
.connections-page small,
.connections-page h2 {
  overflow-wrap: anywhere;
}
.connections-page .setup-card > label {
  display: block;
  margin: 16px 0 6px;
}
.connections-page [hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  .connections-page .access-row,
  .connection-copy {
    grid-template-columns: minmax(0, 1fr);
  }
  .connections-page fieldset {
    padding: 10px;
  }
  .connections-page .access-list {
    padding: 0;
  }
  .connections-page .access-row {
    padding: 20px 16px;
  }
  .connection-copy button {
    justify-self: start;
  }
}

.login .local-login {
  margin-top: 24px;
}
.login .local-login summary {
  min-height: 44px;
  padding: 12px 0;
}
.login #email-login {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

/* Login and recovery remain readable when text is enlarged independently. */
.login-layout main,
.login form > div {
  min-width: 0;
}
.login {
  overflow-wrap: anywhere;
}
.login-brand {
  flex-wrap: wrap;
}
.login input {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 52px;
}
.login a,
.login button {
  white-space: normal;
  text-align: center;
}

/* Own AI setup: client choice, server guide and dated proof share the account shell. */
.connections-page .access-heading,
.connections-page #connection-primary { display: flex; gap: 12px; flex-wrap: wrap; }
.connections-page .connection-guide-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; }
.connections-page .setup-card { min-width: 0; }
.connections-page h1 { overflow-wrap: anywhere; }
.connections-page button,
.connections-page .button,
.connections-page summary,
.connections-page .access-row > a { min-height: 44px; height: auto; white-space: normal; overflow-wrap: anywhere; }
.connections-page input,
.connections-page select,
.connections-page textarea { font: inherit; height: auto; min-height: 48px; width: 100%; box-sizing: border-box; }
.connections-page textarea { line-height: 1.55; padding: 14px; border: 1px solid #707784; border-radius: 8px; resize: vertical; white-space: pre-wrap; overflow-wrap: anywhere; }
.connections-page .permission input { width: 20px; height: 20px; min-height: 20px; }
.connections-page .client-choices { border: 0; padding: 0; }
.connections-page .client-choices .permission { padding: 12px; border: 1px solid #d6d8dd; border-radius: 8px; margin-top: 10px; gap: 12px; }
.connections-page .client-choices .permission:has(input:checked),
.connections-page .connection-rights-note { background: #eaf0ff; }
.connections-page .client-choices small { display: block; margin-top: 4px; }
.connections-page .connection-rights-note { padding: 16px; border-radius: 8px; }
.connections-page summary { cursor: pointer; color: #174bcb; font-weight: 650; padding: 12px 0; }
.connections-page .connection-test.test-success { border-color: #176044; }
.connections-page .connection-test.test-success h2 { color: #176044; }
.connections-page li { margin-bottom: 12px; overflow-wrap: anywhere; }
.connections-page :is(input,select,textarea,button,a,summary):focus-visible { outline: 3px solid #174bcb; outline-offset: 3px; }
.connections-page .actions { flex-wrap: wrap; }
.connections-page #connection-content { padding-bottom: 24px; }
@media (max-width: 950px) {
  .connections-page .connection-guide-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 700px) {
  .connections-page .actions > *, .connections-page #connection-primary > * { width: 100%; }
  .connections-page .connection-copy button { justify-self: stretch; }
  .connections-page .setup-card { padding: 16px; }
}
.connections-page a { min-height: 44px; display: inline-flex; align-items: center; max-width: 100%; }
.connections-page .public-configuration { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.connections-page .permission { display: flex; gap: 10px; }
.connections-page .permission span { min-width: 0; }
.connections-page .actions > * { max-width: 100%; }
html:has(.connections-page) { scroll-padding-bottom: 140px; }
.connections-page :is(input,select,textarea,button,a,summary) { scroll-margin-block: 24px 140px; }
@media (max-width: 700px) {
  .connections-page { padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
}

.mcp-reference {
  margin-inline: auto;
  padding: clamp(1rem, 4vw, 2.5rem);
  overflow-wrap: anywhere;
}
.mcp-reference table {
  display: table;
  width: 100%;
  table-layout: fixed;
}
.mcp-reference th:first-child {
  width: 28%;
}
.mcp-reference pre {
  padding: 0.75rem;
  background: var(--color-surface-muted);
  border-radius: var(--radius-control);
  font-family: monospace;
}

inspection-settlement { display:block; margin:1rem 0; max-width:54rem; }
inspection-settlement details { padding:.8rem 1rem; background:var(--color-surface,#fff); border:1px solid var(--color-border,#ccd1d9); border-radius:.65rem; margin:.65rem 0; }
inspection-settlement summary { cursor:pointer; font-weight:650; }
inspection-settlement form, inspection-settlement label { display:grid; gap:.35rem; max-width:34rem; margin:.7rem 0; }
inspection-settlement input, inspection-settlement select, inspection-settlement textarea { width:100%; min-width:0; box-sizing:border-box; }
inspection-settlement table { width:100%; border-collapse:collapse; margin:.8rem 0; font-variant-numeric:tabular-nums; }
inspection-settlement th, inspection-settlement td { padding:.45rem .3rem; text-align:right; border-bottom:1px solid var(--color-border,#ccd1d9); }
inspection-settlement th:first-child { text-align:left; }
inspection-settlement a { display:block; margin:.5rem 0; }
inspection-settlement p { overflow-wrap:anywhere; }

.visit-tasks { max-width:48rem; margin-block:1.5rem; padding:1rem 1.25rem; background:var(--color-surface,#fff); border:1px solid var(--color-border,#d1d5db); border-radius:.75rem; }
.visit-tasks h2 { margin:0 0 .7rem; }
.visit-tasks ul { list-style:none; padding:0; margin:0; }
.visit-tasks li + li { margin-block-start:.75rem; padding-block-start:.75rem; border-block-start:1px solid var(--color-border,#d1d5db); }
.visit-tasks p { margin:.2rem 0; }
inspection-limitations:not(:empty) { display: grid; gap: .75rem; margin-block: 1rem; }
inspection-limitations article { border: 1px solid var(--line, #d4d7de); border-radius: .75rem; background: white; padding: 1rem; overflow-wrap: anywhere; }
inspection-limitations article > :first-child { margin-top: 0; }
inspection-limitations label { display: grid; gap: .35rem; margin-block: .75rem; }
inspection-limitations :is(input,textarea) { width: min(100%, 36rem); }

inspection-appointments { display: grid; gap: .75rem; margin-block: 1rem; }
inspection-appointments details, inspection-appointments form { padding: 1rem; border: 1px solid var(--line, #d4d7de); border-radius: .75rem; background: white; }
inspection-appointments label { display: grid; gap: .35rem; margin-block: .75rem; }
inspection-appointments button { justify-self: start; margin: .2rem .35rem .2rem 0; }
inspection-appointments pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
inspection-appointments :is(input,textarea,select) { width: min(100%, 36rem); }

@media (max-width: 767px) {
  html:has(.bottom-navigation) {
    scroll-padding-block-end: calc(var(--dashboard-nav-height, 74px) + 8px);
  }
}
