:root {
  color-scheme: light;
  --paper: #f7f7f2;
  --surface: #fff;
  --ink: #1d3029;
  --muted: #68766f;
  --line: #e3e8e1;
  --green: #245b45;
  --green-soft: #eaf2ed;
  --amber: #946316;
  --amber-soft: #fbf3df;
  --red: #a7443d;
  --red-soft: #f9e9e6;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

.compact-dialog {
  width: min(100% - 32px, 520px);
}

* {
  box-sizing: border-box;
}

.form-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

.history-controls {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 5px;
}

.history-controls .replay-button {
  padding-right: 6px;
  padding-left: 6px;
  font-size: 10px;
}

button,
a {
  font: inherit;
}

.site-header {
  min-height: 78px;
  padding: 0 max(28px, calc((100% - 1080px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--green);
}

.brand-mark svg {
  width: 25px;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.brand-name {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.brand-name span {
  color: var(--green);
}

.header-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.dashboard {
  width: min(100% - 48px, 960px);
  margin: 0 auto;
  padding: 55px 0 38px;
}

.welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  padding: 0 0 36px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Manrope", "Segoe UI", sans-serif;
}

h1 {
  margin-bottom: 9px;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -1.1px;
  line-height: 1.2;
}

.welcome-copy {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.overview-stats {
  display: grid;
  flex: 1 1 440px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.stat {
  min-width: 0;
  padding: 13px 11px 12px;
  display: grid;
  gap: 3px;
}

.stat + .stat {
  border-left: 1px solid var(--line);
}

.stat-number {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-label {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.stat-monitor .stat-number {
  color: var(--amber);
}

.stat-attention .stat-number {
  color: var(--red);
}

.residents-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-actions .section-hint {
  text-align: right;
}

.add-resident-button {
  min-height: 36px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--green);
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.add-resident-button:hover {
  background: #1e4b39;
}

.add-resident-button span {
  font-size: 18px;
  font-weight: 400;
  line-height: 0.8;
}

.add-resident-button:focus-visible,
.remove-list-button:focus-visible,
.remove-resident-button:focus-visible {
  outline: 3px solid #76a991;
  outline-offset: 2px;
}

.resident-entry {
  position: relative;
}

.resident-entry-custom .resident-row {
  padding-right: 70px;
}

.remove-list-button {
  position: absolute;
  top: 50%;
  right: 2px;
  padding: 6px 8px;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.remove-list-button:hover {
  border-color: var(--red);
  color: var(--red);
}

.resident-storage-note {
  margin: 0;
  padding: 10px 24px;
  border-top: 1px solid var(--line);
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  line-height: 1.5;
}

.current-window-note {
  margin: -10px 0 15px;
  padding: 9px 11px;
  border-left: 3px solid var(--green);
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  line-height: 1.5;
}

.resident-detail-actions {
  margin: 0 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.resident-storage-note-error {
  background: var(--red-soft);
  color: var(--red);
}

.replay-section {
  margin-top: 24px;
  padding: 22px 24px 18px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: 8px;
  background: var(--surface);
}

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

.replay-heading h2 {
  margin: 0 0 6px;
  font-size: 19px;
  letter-spacing: -0.4px;
}

.replay-intro {
  max-width: 510px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.replay-resident-label {
  min-width: 180px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.replay-resident-label select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.replay-resident-label select:focus-visible,
.replay-date-label select:focus-visible,
.history-date-label select:focus-visible,
.replay-button:focus-visible {
  outline: 3px solid #76a991;
  outline-offset: 2px;
}

.replay-date-label,
.history-date-label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.replay-date-label {
  max-width: 280px;
  margin-top: 18px;
}

.replay-date-label select,
.history-date-label select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.replay-controls {
  margin: 13px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.replay-button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.replay-button:hover:not(:disabled) {
  border-color: #aab9ae;
  background: var(--paper);
}

.replay-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.replay-reset {
  margin-left: auto;
  color: var(--green);
}

.replay-current-day {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.replay-result {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fdfdfa;
}

.replay-result-heading {
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.replay-result-heading .eyebrow {
  margin-bottom: 5px;
}

.replay-result-heading .status-pill {
  font-size: 11px;
}

.replay-result-summary {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
}

.replay-observations {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.replay-observations .timeline-cell {
  min-height: 78px;
  padding: 8px;
}

.replay-observations .timeline-label {
  font-size: 10px;
}

.replay-observations .timeline-value {
  font-size: 11px;
}

.replay-observations .timeline-detail {
  font-size: 10px;
}

.replay-explanation {
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.replay-explanation h3 {
  margin: 0 0 5px;
  font-size: 12px;
}

.replay-explanation p,
.replay-explanation li {
  color: #45544b;
  font-size: 11px;
  line-height: 1.55;
}

.replay-explanation p {
  margin: 0 0 13px;
}

.replay-explanation ul {
  margin: 0;
  padding-left: 17px;
}

.replay-explanation li + li {
  margin-top: 4px;
}

.replay-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.section-heading {
  min-height: 91px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.section-heading .eyebrow {
  margin-bottom: 4px;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

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

.resident-list {
  padding: 0 24px;
}

.resident-row {
  width: 100%;
  min-height: 92px;
  padding: 16px 2px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(145px, 180px) minmax(0, 1.6fr) 20px;
  align-items: center;
  gap: 20px;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.resident-row:last-child {
  border-bottom: 0;
}

.resident-row:hover .resident-name {
  color: var(--green);
}

.resident-row:focus-visible,
.close-button:focus-visible {
  outline: 3px solid #76a991;
  outline-offset: 3px;
}

.resident-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.resident-initials {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf1ec;
  color: #435d4d;
  font-size: 12px;
  font-weight: 700;
}

.resident-name {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resident-unit {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.status-pill {
  width: fit-content;
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-routine {
  background: var(--green-soft);
  color: var(--green);
}

.status-keep-an-eye-on {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-needs-review {
  background: var(--red-soft);
  color: var(--red);
}

.resident-reason {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.row-arrow {
  width: 18px;
  color: #89968f;
}

.row-arrow path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.page-footer {
  max-width: 690px;
  margin: 22px auto 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
}

.footer-mark {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: grid;
  place-items: center;
  border: 1px solid #9da9a1;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
}

.page-footer p {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
}

.page-footer strong {
  color: #48584f;
  font-weight: 600;
}

.rule-note {
  margin-top: 5px;
  display: block;
}

.detail-dialog {
  width: min(100% - 32px, 480px);
  max-height: min(85vh, 680px);
  overflow-y: auto;
  padding: 26px 28px 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 18px 60px rgb(23 41 32 / 18%);
}

.detail-dialog::backdrop {
  background: rgb(23 41 32 / 42%);
}

.resident-form-dialog {
  width: min(100% - 32px, 650px);
  max-height: min(90vh, 820px);
  overflow-y: auto;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 18px 60px rgb(23 41 32 / 18%);
}

.resident-form-dialog::backdrop {
  background: rgb(23 41 32 / 42%);
}

.resident-form-dialog .dialog-topline {
  align-items: flex-start;
}

.resident-form-dialog .dialog-topline .eyebrow {
  margin-bottom: 5px;
}

.resident-form-dialog h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.5px;
}

.form-intro,
.form-disclaimer {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.form-intro {
  margin: 13px 0 18px;
}

.form-group {
  min-width: 0;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.form-group legend {
  padding: 0 5px;
  color: var(--green);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.form-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 14px;
}

.form-field {
  min-width: 0;
  margin: 0 0 12px;
  display: grid;
  align-content: start;
  gap: 5px;
  color: #45544b;
  font-size: 11px;
  font-weight: 600;
}

.form-field:last-child {
  margin-bottom: 0;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 9px;
  border: 1px solid #d6ded7;
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font: 400 12px "DM Sans", "Segoe UI", sans-serif;
}

.form-field textarea {
  min-height: 58px;
  resize: vertical;
}

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  outline: 3px solid #76a991;
  outline-offset: 1px;
}

.field-hint {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.form-field-inline {
  max-width: 260px;
  margin-top: 12px;
}

.form-error {
  margin: 8px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--red);
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
  line-height: 1.5;
}

.form-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.form-disclaimer {
  margin: 12px 0 0;
}

.remove-resident-button {
  margin-top: 18px;
  padding: 8px 10px;
  border: 1px solid #e8c6c1;
  border-radius: 4px;
  background: var(--surface);
  color: var(--red);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.remove-resident-button:hover {
  background: var(--red-soft);
}

.dialog-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.close-button {
  width: 34px;
  height: 34px;
  padding: 7px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
}

.close-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.detail-dialog h2 {
  margin: 7px 0 12px;
  font-size: 23px;
  letter-spacing: -0.6px;
}

.detail-status {
  margin-bottom: 12px;
}

.detail-reason {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.warning-summary {
  margin: -8px 0 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--green);
  background: var(--green-soft);
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.warning-summary:empty {
  display: none;
}

.warning-summary-review {
  border-left-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

.warning-summary-watch {
  border-left-color: var(--amber);
  background: var(--amber-soft);
  color: var(--amber);
}

.detail-block {
  margin-top: 20px;
}

.detail-dialog h3 {
  margin-bottom: 9px;
  font-size: 13px;
}

.baseline-list,
.flag-reasons,
.change-list,
.suggested-checks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.baseline-list li,
.flag-reasons li,
.change-list li,
.suggested-checks li {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  color: #45544b;
  font-size: 12px;
  line-height: 1.5;
}

.baseline-list li:last-child,
.flag-reasons li:last-child,
.change-list li:last-child,
.suggested-checks li:last-child {
  border-bottom: 0;
}

.no-changes {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--green);
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.flag-explanation {
  padding: 13px 14px;
  border-left: 3px solid var(--green);
  background: var(--paper);
}

.no-flags {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.evidence-comparison {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.evidence-comparison h4 {
  margin: 0 0 4px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 12px;
}

.evidence-hint {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.evidence-categories {
  display: grid;
  gap: 8px;
}

.evidence-category {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.evidence-category h5 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 11px;
}

.evidence-baseline,
.evidence-recent,
.evidence-change {
  margin: 0;
  color: #45544b;
  font-size: 11px;
  line-height: 1.5;
}

.evidence-recent {
  margin: 4px 0;
  padding-left: 16px;
}

.evidence-change {
  color: var(--amber);
  font-weight: 600;
}

.flag-explanation-watch {
  border-left-color: var(--amber);
}

.flag-explanation-review {
  border-left-color: var(--red);
}

.timeline-hint {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 11px;
}

.history-controls {
  margin: 10px 0 5px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.history-date-label {
  min-width: 0;
}

.history-date-count {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.timeline {
  margin: 0;
  padding: 0;
}

.timeline-row {
  padding: 11px 0;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.timeline-row:last-child {
  border-bottom: 0;
}

.timeline-date {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: 11px;
}

.timeline-cells {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.timeline-cell {
  min-width: 0;
  min-height: 57px;
  padding: 6px;
  display: grid;
  align-content: start;
  gap: 3px;
  border-left: 2px solid var(--green);
  background: var(--green-soft);
  overflow-wrap: anywhere;
}

.timeline-changed {
  border-left-color: var(--amber);
  background: var(--amber-soft);
}

.timeline-marked {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.timeline-label {
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.timeline-value {
  color: #45544b;
  font-size: 10px;
  line-height: 1.3;
}

.timeline-detail {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
}

.detail-reminder {
  margin: 18px 0 0;
  padding: 11px 12px;
  background: var(--paper);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .site-header {
    min-height: 68px;
    padding: 0 20px;
  }

  .header-note {
    max-width: 145px;
    font-size: 11px;
    text-align: right;
  }

  .dashboard {
    width: min(100% - 32px, 540px);
    padding-top: 36px;
  }

  .welcome {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
    padding-bottom: 25px;
  }

  .overview-stats {
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    padding: 12px;
  }

  .stat:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .stat:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .section-heading {
    min-height: auto;
    padding: 18px 18px 15px;
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .section-actions {
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .section-actions .section-hint {
    max-width: 180px;
    text-align: left;
  }

  .resident-entry-custom .resident-row {
    padding-right: 60px;
  }

  .remove-list-button {
    right: 0;
  }

  .replay-section {
    padding: 18px;
  }

  .replay-heading {
    flex-direction: column;
    gap: 14px;
  }

  .replay-resident-label {
    width: 100%;
  }

  .replay-date-label {
    max-width: none;
  }

  .replay-controls {
    flex-wrap: wrap;
    justify-content: center;
  }

  .replay-current-day {
    order: -1;
    width: 100%;
  }

  .replay-reset {
    margin-left: 0;
  }

  .replay-result-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .replay-result-summary {
    text-align: left;
  }

  .resident-list {
    padding: 0 18px;
  }

  .resident-row {
    min-height: 0;
    padding: 17px 0;
    grid-template-columns: minmax(0, 1fr) 20px;
    gap: 9px 12px;
  }

  .resident-identity {
    grid-column: 1;
  }

  .resident-row .status-pill {
    grid-column: 1;
    grid-row: 2;
    margin-left: 52px;
  }

  .resident-reason {
    grid-column: 1;
    grid-row: 3;
    margin-left: 52px;
  }

  .row-arrow {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }

  .page-footer {
    justify-content: flex-start;
  }

  .timeline-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .timeline-date {
    margin-top: 0;
  }

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

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

  .resident-form-dialog {
    padding: 20px 16px;
  }

  .form-field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 360px) {
  .site-header {
    padding: 0 14px;
    gap: 12px;
  }

  .header-note {
    max-width: 110px;
    font-size: 10px;
  }

  .brand-name {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .resident-row,
  .close-button {
    transition: color 140ms ease, background-color 140ms ease;
  }
}
