:root {
  --navy-950: #071426;
  --navy-900: #0b2038;
  --navy-800: #102946;
  --navy-700: #1c3e5e;
  --orange-600: #df7412;
  --orange-500: #f28a22;
  --orange-100: #fff1df;
  --ink: #101820;
  --muted: #60707b;
  --surface: #ffffff;
  --canvas: #eef3f6;
  --line: #d8e0e5;
  --line-strong: #bccbd4;
  --success: #118653;
  --success-soft: #e7f6ee;
  --danger: #b42318;
  --danger-soft: #fff0ed;
  --warning-soft: #fff7e6;
  --shadow: 0 16px 40px rgba(7, 20, 38, 0.08);
  --header-height: 72px;
  --mobile-nav-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--canvas);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, var(--navy-950) 0 var(--header-height), transparent var(--header-height)),
    var(--canvas);
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(242, 138, 34, 0.45);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  transform: translateY(-140%);
  border-radius: 6px;
  background: var(--surface);
  color: var(--navy-950);
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.resident-app {
  min-height: 100vh;
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  background: var(--navy-950);
  color: var(--surface);
}

body[data-portal-state="loading"] .site-header {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
}

body[data-portal-state="loading"] .site-header .brand {
  width: max-content;
  justify-self: center;
}

body[data-portal-state="loading"] #resident-main {
  display: grid;
  min-height: calc(100dvh - var(--header-height));
  place-items: center;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.25);
  object-fit: cover;
}

.brand-copy {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.brand-copy strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy span {
  margin-top: 3px;
  color: #c9d5df;
  font-size: 12px;
}

.session-tools {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.session-name {
  display: none;
  overflow: hidden;
  max-width: 180px;
  color: #d9e3eb;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.button-primary {
  border-color: var(--orange-600);
  background: var(--orange-500);
  color: var(--navy-950);
}

.button-primary:hover {
  background: #fb9a35;
}

.button-quiet {
  border-color: var(--line);
  background: #f7fafb;
  color: var(--navy-900);
}

.site-header .button-quiet {
  border-color: rgba(255, 255, 255, 0.3);
  background: transparent;
  color: var(--surface);
}

.system-state {
  display: grid;
  min-height: calc(100vh - var(--header-height));
  place-items: center;
  padding: 24px 16px;
}

.system-state-loading {
  width: 100%;
  max-width: 392px;
  min-height: 100%;
  margin-inline: auto;
  grid-template-columns: minmax(0, 360px);
  justify-content: center;
  justify-items: center;
  align-content: center;
  gap: 14px;
  text-align: center;
}

.system-state-loading .state-mark {
  justify-self: center;
}

.system-state-loading > div:last-child {
  width: 100%;
  text-align: center;
}

.system-state h1 {
  max-width: 760px;
  margin: 4px 0 8px;
  color: var(--navy-950);
  font-size: clamp(30px, 8vw, 48px);
  line-height: 1.06;
}

.system-state p {
  margin: 0;
  color: var(--muted);
}

.state-mark {
  width: 36px;
  height: 36px;
  border: 4px solid var(--line);
  border-top-color: var(--orange-500);
  border-radius: 50%;
  animation: resident-spin 0.9s linear infinite;
}

@keyframes resident-spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-panel,
.setup-panel,
.unavailable-panel {
  width: min(100%, 720px);
  border-top: 5px solid var(--orange-500);
  border-radius: 8px;
  padding: 28px 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-intro > p {
  max-width: 580px;
}

.auth-form {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.auth-form label,
.resident-form label,
.message-form label {
  color: var(--navy-900);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 11px 12px;
  background: var(--surface);
}

textarea {
  min-height: 112px;
  resize: vertical;
}

.auth-form input {
  margin-bottom: 10px;
}

.privacy-note {
  margin-top: 18px !important;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.password-requirements {
  margin: 0 0 4px !important;
  color: var(--muted);
  font-size: 13px;
}

.form-message {
  border-radius: 6px;
  padding: 10px 12px;
  font-weight: 700;
}

.form-message-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.unavailable-panel {
  text-align: left;
}

.unavailable-panel > p:not(.eyebrow) {
  max-width: 600px;
  margin-bottom: 22px;
}

.unavailable-panel .button + .button {
  margin-left: 8px;
}

.state-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--orange-100);
  color: var(--orange-600);
  font-size: 24px;
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--orange-600);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.portal-shell {
  display: grid;
  min-height: calc(100vh - var(--header-height));
}

.desktop-sidebar {
  display: none;
}

.portal-content {
  width: 100%;
  min-width: 0;
  padding: 18px 14px calc(var(--mobile-nav-height) + 24px);
}

.preview-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 0 auto 16px;
  border: 1px solid #efc38e;
  border-left: 5px solid var(--orange-500);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--warning-soft);
  color: #5d3c0b;
}

.preview-banner div {
  display: grid;
  gap: 2px;
}

.preview-banner strong {
  color: var(--navy-950);
}

.preview-banner span {
  font-size: 13px;
}

.preview-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--orange-500);
  color: var(--navy-950);
  font-size: 11px !important;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-shell.is-preview form :is(input, select, textarea, button),
.portal-shell.is-preview [data-acknowledge-responsibility],
.portal-shell.is-preview #payment-link {
  cursor: not-allowed;
}

.content-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 auto 16px;
}

.content-toolbar h1 {
  margin: 0;
  color: var(--navy-950);
  font-size: clamp(28px, 8vw, 44px);
  line-height: 1;
}

.page-message {
  margin: 0 0 16px;
  border-left: 4px solid var(--success);
  padding: 12px 14px;
  background: var(--success-soft);
  color: #0b7045;
  font-weight: 700;
}

.page-message.is-error {
  border-left-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.form-action-message {
  margin: 10px 0 0;
  border-left: 4px solid var(--success);
  padding: 10px 12px;
  background: var(--success-soft);
  color: #0b7045;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.form-action-message.is-error {
  border-left-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.form-action-message[hidden] {
  display: none;
}

.portal-view {
  display: grid;
  gap: 16px;
}

.welcome-band,
.summary-band,
.content-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.welcome-band {
  display: flex;
  min-height: 136px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-top: 5px solid var(--orange-500);
  padding: 22px 18px;
}

.welcome-band h2,
.section-heading h2 {
  margin: 0;
  color: var(--navy-950);
  font-size: 24px;
  line-height: 1.15;
}

.welcome-band p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
}

.status-pill {
  flex: 0 0 auto;
  border: 1px solid #b9dfce;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--success-soft);
  color: #0e7448;
  font-size: 12px;
  font-weight: 900;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.metric {
  min-width: 0;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 5px;
  color: var(--navy-950);
  font-size: 20px;
  line-height: 1.15;
}

.split-layout,
.household-layout {
  display: grid;
  gap: 16px;
}

.content-section {
  min-width: 0;
  padding: 18px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-intro {
  max-width: 800px;
  margin: -4px 0 20px;
  color: var(--muted);
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-top: 5px solid var(--orange-500);
}

.summary-item {
  min-width: 0;
  padding: 18px;
  background: var(--surface);
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-item strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 4px;
  color: var(--navy-950);
  font-size: 21px;
}

.record-list {
  display: grid;
}

.record,
.responsibility-record,
.message-record,
.document-record {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.record:first-child,
.responsibility-record:first-child,
.message-record:first-child {
  border-top: 0;
  padding-top: 0;
}

.record:last-child,
.responsibility-record:last-child,
.message-record:last-child {
  padding-bottom: 0;
}

.record-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.record-title {
  margin: 0;
  color: var(--navy-950);
  font-size: 16px;
}

.record-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.record-description {
  margin: 8px 0 0;
  color: #304552;
  white-space: pre-wrap;
}

.record-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: #edf2f5;
  color: #40545e;
  font-size: 11px;
  font-weight: 900;
}

.record-amount {
  flex: 0 0 auto;
  color: var(--navy-950);
  font-weight: 900;
}

.next-action-required {
  border-left: 4px solid var(--orange-500);
  padding-left: 12px;
}

.next-action-required[role="link"] {
  cursor: pointer;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.next-action-required[role="link"]:hover {
  background: #fff8ef;
}

.next-action-required[role="link"]:focus-visible {
  outline: 3px solid rgba(242, 132, 31, 0.32);
  outline-offset: 2px;
}

.next-action-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 18px;
  background: #f7fafb;
  color: var(--muted);
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy-900);
}

.detail-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-list div {
  display: grid;
  gap: 2px;
}

.detail-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--navy-950);
  font-weight: 700;
}

.detail-list a {
  color: #08677b;
}

.request-section {
  border-top: 5px solid var(--orange-500);
}

.resident-form,
.message-form {
  display: grid;
  gap: 14px;
}

.resident-form label,
.message-form label {
  display: grid;
  gap: 6px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.emergency-note {
  margin: 0;
  border-left: 4px solid var(--orange-500);
  padding: 11px 12px;
  background: var(--warning-soft);
  color: #61420f;
  font-size: 13px;
}

.accessibility-note,
.legal-disclaimer {
  margin: 0;
  border-left: 4px solid #18758a;
  padding: 12px 14px;
  background: #eef8fa;
  color: #214956;
  font-size: 13px;
  line-height: 1.55;
}

.legal-acknowledgements {
  display: grid;
  gap: 12px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 16px;
  background: #f7fafb;
}

.legal-acknowledgements legend {
  padding: 0 6px;
  color: var(--navy-950);
  font-size: 14px;
  font-weight: 900;
}

.legal-acknowledgements label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: #263e4a;
  font-size: 13px;
  line-height: 1.5;
}

.legal-acknowledgements input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
}

.improvement-terms {
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.improvement-terms summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 14px 16px;
  background: #f1f6f8;
  color: var(--navy-950);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.improvement-terms summary::marker {
  color: var(--orange-500);
}

.improvement-terms-summary-note {
  color: #526b77;
  font-size: 12px;
  font-weight: 800;
}

.improvement-terms-content {
  max-height: 38rem;
  overflow-y: auto;
  padding: 18px;
  color: #263e4a;
  font-size: 13px;
  line-height: 1.6;
  scrollbar-gutter: stable;
}

.improvement-terms-content section + section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.improvement-terms-content h4 {
  margin: 0 0 8px;
  color: var(--navy-950);
  font-size: 14px;
}

.improvement-terms-content p,
.improvement-terms-content ul,
.improvement-terms-content ol {
  margin: 0 0 10px;
}

.improvement-terms-content ul,
.improvement-terms-content ol {
  padding-left: 24px;
}

.improvement-terms-content li + li {
  margin-top: 4px;
}

.improvement-terms-lead {
  border-left: 4px solid var(--orange-500);
  padding: 10px 12px;
  background: var(--warning-soft);
  color: #513b1b;
  font-weight: 800;
}

.improvement-acceptance {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin: 0;
  border: 2px solid #0b7b75;
  border-radius: 8px;
  padding: 16px;
  background: #e9f7f5;
  color: #173e41;
  font-size: 14px;
  line-height: 1.5;
}

.improvement-acceptance input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
}

.improvement-acceptance strong {
  display: block;
  margin-bottom: 3px;
  color: #075c58;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

@media (max-width: 620px) {
  .improvement-terms summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .improvement-terms-content {
    max-height: 30rem;
    padding: 15px;
  }
}

.improvement-record {
  --improvement-accent: #2f6fb0;
  --improvement-soft: #edf5ff;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line-strong);
  border-left: 6px solid var(--improvement-accent);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(7, 20, 38, 0.06);
}

#improvement-list {
  gap: 18px;
}

#improvement-list .improvement-record:first-child {
  border-top: 1px solid var(--line-strong);
  padding-top: 16px;
}

#improvement-list .improvement-record:last-child {
  padding-bottom: 16px;
}

.improvement-phase-review {
  --improvement-accent: #bb650f;
  --improvement-soft: #fff4e5;
}

.improvement-phase-work {
  --improvement-accent: #0b7b75;
  --improvement-soft: #e9f7f5;
}

.improvement-phase-completion {
  --improvement-accent: #6758a6;
  --improvement-soft: #f1effa;
}

.improvement-phase-complete {
  --improvement-accent: #147a4d;
  --improvement-soft: #e8f6ef;
}

.improvement-phase-closed {
  --improvement-accent: #a33a32;
  --improvement-soft: #fff0ed;
}

.improvement-record-badges {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.improvement-phase-label {
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--improvement-soft);
  color: var(--improvement-accent);
  font-size: 11px;
  font-weight: 900;
}

.improvement-stage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.improvement-stage span {
  border-radius: 6px;
  padding: 7px 9px;
  background: #edf2f5;
  color: #667984;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.improvement-stage span.is-complete {
  background: #e3f5ec;
  color: #086b45;
}

.improvement-stage span.is-current {
  background: var(--improvement-soft);
  color: var(--improvement-accent);
  box-shadow: inset 0 0 0 1px var(--improvement-accent);
}

.improvement-conditions {
  border-left: 4px solid var(--orange-500);
  padding: 10px 12px;
  background: var(--orange-100);
  color: #533517;
  white-space: pre-wrap;
}

.improvement-actions,
.improvement-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.improvement-proposal-evidence {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #f8fafb;
}

.improvement-evidence-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.improvement-evidence-warning {
  color: #9a3412;
}

.improvement-household-consent {
  display: grid;
  gap: 12px;
  border: 1px solid #cbd7de;
  border-left: 4px solid #bb650f;
  border-radius: 7px;
  padding: 13px;
  background: #fff9f0;
}

.improvement-household-consent.consent-accepted {
  border-left-color: #147a4d;
  background: #f0faf5;
}

.improvement-household-consent.consent-declined {
  border-left-color: #a33a32;
  background: #fff4f1;
}

.improvement-consent-roster {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.improvement-consent-roster li {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
}

.improvement-consent-identity {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.improvement-consent-identity strong,
.improvement-consent-identity small {
  overflow-wrap: anywhere;
}

.improvement-consent-identity small {
  color: var(--ink-700);
}

.improvement-consent-decision {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff0da;
  color: #91500c;
  font-size: 11px;
  font-weight: 900;
}

.improvement-consent-roster li.consent-accepted .improvement-consent-decision {
  background: #e3f5ec;
  color: #086b45;
}

.improvement-consent-roster li.consent-declined .improvement-consent-decision {
  background: #fff0ed;
  color: #a33a32;
}

.improvement-consent-message {
  margin: 0;
  border-left: 3px solid #bb650f;
  padding: 8px 10px;
  background: #fff;
  color: #5f3a15;
  font-weight: 750;
}

.improvement-consent-message.is-approved {
  border-left-color: #147a4d;
  color: #086b45;
}

.improvement-consent-message.is-declined {
  border-left-color: #a33a32;
  color: #8d2f28;
}

.improvement-consent-form {
  display: grid;
  gap: 11px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.improvement-consent-form h4,
.improvement-consent-form p {
  margin: 0;
}

.improvement-consent-terms .improvement-terms-content {
  max-height: 24rem;
  overflow: auto;
}

.improvement-consent-acceptance {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.improvement-consent-acceptance input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  flex: 0 0 20px;
}

.improvement-proposal-evidence-form {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.improvement-file-queue {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}

.improvement-file-queue[hidden] {
  display: none;
}

.improvement-file-queue-summary {
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 800;
}

.improvement-file-queue-list {
  display: grid;
  gap: 6px;
}

.improvement-file-queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 7px;
}

.improvement-file-queue-details {
  display: grid;
  min-width: 0;
}

.improvement-file-queue-details strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.improvement-file-queue-details span {
  color: var(--ink-600);
  font-size: 12px;
}

.improvement-file-remove {
  flex: 0 0 auto;
  border: 1px solid #f3b9aa;
  border-radius: 5px;
  padding: 6px 9px;
  background: #fff4ef;
  color: #9a3412;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.improvement-file-remove:hover,
.improvement-file-remove:focus-visible {
  border-color: #c2410c;
  outline: none;
}

@media (max-width: 520px) {
  .improvement-file-queue-item {
    align-items: flex-start;
  }

  .improvement-file-queue-details strong {
    max-width: min(58vw, 290px);
  }
}

.improvement-completion-form {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.improvement-attachment-link {
  border-radius: 6px;
  padding: 7px 9px;
  background: #edf2f5;
  color: #08677b;
  font-size: 12px;
  font-weight: 800;
}

.document-grid {
  display: grid;
  gap: 10px;
}

.document-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.document-record:first-child {
  padding-top: 14px;
}

.document-record h3 {
  margin: 0;
  color: var(--navy-950);
  font-size: 15px;
}

.document-record p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.responsibility-record h3 {
  margin: 0 0 5px;
  color: var(--navy-950);
  font-size: 16px;
}

.responsibility-record {
  scroll-margin-top: 24px;
}

.responsibility-record.is-route-target {
  animation: resident-route-target 1.6s ease-out;
}

@keyframes resident-route-target {
  0%, 35% {
    background: #fff2df;
    box-shadow: 0 0 0 3px rgba(242, 132, 31, 0.28);
  }

  100% {
    background: transparent;
    box-shadow: 0 0 0 0 rgba(242, 132, 31, 0);
  }
}

.responsibility-record p {
  margin: 0;
  color: #304552;
  white-space: pre-wrap;
}

.responsibility-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.responsibility-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.responsibility-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.responsibility-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--orange-600);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.hvac-proof-record {
  border-top: 5px solid var(--orange-500);
  background: #fff;
}

.hvac-proof-description {
  max-width: 780px;
}

.record-badge.proof-draft,
.record-badge.proof-needs_correction {
  background: #fff0da;
  color: #8a4908;
}

.record-badge.proof-submitted {
  background: #e8f1fb;
  color: #1d5d99;
}

.record-badge.proof-approved {
  background: #e3f5ec;
  color: #086b45;
}

.hvac-proof-notice {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid #2f6fb0;
  border-radius: 7px;
  padding: 12px 14px;
  background: #edf5ff;
  color: #24455f;
}

.hvac-proof-notice.is-correction {
  border-color: #e7bd84;
  border-left-color: #bb650f;
  background: #fff7eb;
  color: #71400e;
}

.hvac-proof-notice.is-approved {
  border-color: #a9d8c2;
  border-left-color: #147a4d;
  background: #eff9f4;
  color: #086b45;
}

.hvac-proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.hvac-proof-slot {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f7fafb;
}

.hvac-proof-slot.has-photo {
  border-color: #9fd5bd;
  background: #f2faf6;
}

.hvac-proof-slot-copy {
  display: grid;
  gap: 3px;
}

.hvac-proof-slot-copy strong {
  color: var(--navy-950);
  font-size: 14px;
}

.hvac-proof-slot-copy p {
  color: var(--muted);
  font-size: 12px;
}

.hvac-proof-photo {
  display: grid;
  gap: 6px;
  color: var(--teal-700);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.hvac-proof-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  object-fit: cover;
  background: #dfe8ec;
}

.hvac-proof-placeholder {
  display: grid;
  min-height: 128px;
  place-items: center;
  border: 1px dashed #aebfc9;
  border-radius: 6px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.hvac-proof-upload {
  justify-content: center;
  width: 100%;
  cursor: pointer;
}

.hvac-proof-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.hvac-proof-upload-message {
  width: 100%;
  margin-top: 0;
}

.hvac-proof-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.hvac-proof-progress strong {
  color: var(--navy-950);
}

.hvac-proof-actions {
  justify-content: flex-start;
}

.hvac-proof-audit {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.hvac-proof-audit summary {
  color: var(--navy-950);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.hvac-proof-audit-list {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 12px;
}

.button-compact {
  min-height: 40px;
  padding: 8px 12px;
}

.acknowledgement-status {
  color: var(--success);
  font-size: 12px;
  font-weight: 900;
}

.message-thread {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.message-record {
  width: min(88%, 680px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #f7fafb;
}

.message-record.is-resident {
  justify-self: end;
  border-color: #f3b478;
  background: var(--orange-100);
}

.message-record p {
  margin: 0;
  white-space: pre-wrap;
}

.message-record footer {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.message-form {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.household-request-section {
  border-top: 5px solid var(--orange-500);
}

.household-request-history {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.household-request-history h3 {
  margin: 0 0 12px;
  color: var(--navy-950);
  font-size: 17px;
}

.resident-tools-section {
  border-top: 5px solid var(--orange-500);
}

.resident-tools-grid {
  display: grid;
  gap: 10px;
}

.resident-tool-link {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #f7fafb;
  color: var(--navy-950);
  cursor: pointer;
  text-align: left;
}

.resident-tool-link:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.resident-tool-link > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.resident-tool-link strong {
  font-size: 16px;
}

.resident-tool-link small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.resident-tool-arrow {
  flex: 0 0 auto;
  color: var(--orange-600);
  font-size: 22px;
  font-weight: 900;
}

.mobile-navigation {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: var(--mobile-nav-height);
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--navy-950);
  box-shadow: 0 -10px 24px rgba(7, 20, 38, 0.15);
}

.mobile-navigation button {
  min-width: 0;
  min-height: var(--mobile-nav-height);
  border: 0;
  border-top: 4px solid transparent;
  padding: 8px 6px;
  background: transparent;
  color: #bfcbd5;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.mobile-navigation button[aria-current="page"] {
  border-top-color: var(--orange-500);
  background: var(--navy-900);
  color: var(--surface);
}

@media (max-width: 519px) {
  .preview-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .preview-badge {
    align-self: flex-start;
  }

  .unavailable-panel .button {
    width: 100%;
  }

  .unavailable-panel .button + .button {
    margin-top: 8px;
    margin-left: 0;
  }

  .responsibility-heading,
  .responsibility-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .responsibility-heading .record-badge {
    align-self: flex-start;
  }

  .responsibility-actions .button {
    width: 100%;
  }

  .hvac-proof-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hvac-proof-progress {
    align-items: flex-start;
    flex-direction: column;
  }

  #improvement-list .record-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .improvement-record-badges {
    justify-content: flex-start;
  }

  .improvement-stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .improvement-consent-roster li {
    align-items: flex-start;
    flex-direction: column;
  }

  .improvement-actions .button,
  .improvement-completion-form .button,
  .improvement-proposal-evidence-form .button {
    width: 100%;
  }
}

@media (min-width: 520px) {
  .session-name {
    display: inline;
  }

  .portal-content {
    padding-right: 20px;
    padding-left: 20px;
  }

  .metric-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .form-grid,
  .document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-band {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  body {
    background: var(--canvas);
  }

  .site-header {
    position: sticky;
    top: 0;
    padding-right: 24px;
    padding-left: 24px;
  }

  .portal-shell {
    grid-template-columns: 216px minmax(0, 1fr);
  }

  .desktop-sidebar {
    position: sticky;
    top: var(--header-height);
    display: flex;
    height: calc(100vh - var(--header-height));
    flex-direction: column;
    border-right: 1px solid #19334d;
    padding: 24px 14px;
    background: var(--navy-950);
    color: var(--surface);
  }

  .property-context {
    display: grid;
    gap: 4px;
    padding: 0 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .context-label {
    color: #aebdca;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .property-context strong {
    overflow-wrap: anywhere;
    font-size: 16px;
  }

  .section-navigation {
    display: grid;
    gap: 4px;
    margin-top: 20px;
  }

  .section-navigation button {
    min-height: 44px;
    border: 0;
    border-left: 4px solid transparent;
    border-radius: 4px;
    padding: 10px 12px;
    background: transparent;
    color: #c6d2dc;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
  }

  .section-navigation button:hover {
    background: var(--navy-900);
    color: var(--surface);
  }

  .section-navigation button[aria-current="page"] {
    border-left-color: var(--orange-500);
    background: var(--navy-800);
    color: var(--surface);
  }

  .secure-session-note {
    margin: auto 10px 0;
    color: #8fa1b1;
    font-size: 11px;
  }

  .portal-content {
    width: min(100%, 1440px);
    margin: 0 auto;
    padding: 28px 30px 48px;
  }

  .mobile-navigation {
    display: none;
  }

  .split-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.65fr);
  }

  .household-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .household-request-section {
    grid-column: 1 / -1;
  }

  .content-section {
    padding: 22px;
  }
}

@media (min-width: 1200px) {
  .portal-content {
    padding-right: 40px;
    padding-left: 40px;
  }

  .document-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.field-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.upload-progress {
  border-left: 4px solid var(--orange-500);
  padding: 10px 12px;
  background: var(--orange-100);
  color: #61420f;
  font-size: 13px;
  font-weight: 800;
}

.maintenance-photo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.maintenance-photo-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #f7fafb;
  color: #08677b;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.maintenance-photo-link:hover {
  border-color: #8fb4c0;
  background: #eef7f8;
}
