:root {
  --bg: #f4f7ff;
  --paper: rgba(255, 255, 255, 0.9);
  --paper-strong: rgba(255, 255, 255, 0.96);
  --ink: #101b2e;
  --muted: #65738b;
  --line: rgba(15, 35, 75, 0.13);
  --brand: #123a7a;
  --brand-deep: #082a63;
  --brand-soft: rgba(18, 58, 122, 0.1);
  --scrub-blue: #1f63b7;
  --sky: #eaf4ff;
  --gold: #c99542;
  --advisory-bg: rgba(255, 241, 234, 0.92);
  --advisory-line: rgba(179, 69, 50, 0.22);
  --advisory-ink: #6f2f20;
  --shadow: 0 22px 60px rgba(24, 32, 36, 0.09);
  --shadow-soft: 0 12px 32px rgba(24, 32, 36, 0.07);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Manrope, system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 4%, rgba(53, 116, 207, 0.18), transparent 35%),
    radial-gradient(circle at 86% 8%, rgba(190, 216, 255, 0.34), transparent 36%),
    radial-gradient(circle at 88% 86%, rgba(201, 149, 66, 0.12), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f5f9ff 48%, #eaf2ff 100%);
  min-height: 100vh;
}

.bg-orb {
  position: fixed;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
}
.orb-a { background: #9bc7ff; top: -6rem; left: -4rem; }
.orb-b { background: #d8e8ff; top: 6rem; right: -6rem; }

.shell {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.2rem 1.2rem 4.5rem;
  display: grid;
  gap: 1rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 1rem;
  align-items: start;
  padding: 0.4rem 0.1rem 0;
}
.hero > div:first-child {
  min-height: 13rem;
  border-radius: 32px;
  padding: clamp(1.1rem, 3vw, 2rem);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.7), rgba(255,255,255,0.18)),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.24), transparent 42%),
    linear-gradient(150deg, rgba(8, 42, 99, 0.98), rgba(18, 58, 122, 0.9));
  color: #f7fbf8;
  box-shadow: 0 24px 70px rgba(8, 42, 99, 0.22);
  overflow: hidden;
}
.hero > div:first-child .eyebrow,
.hero > div:first-child .subhead {
  color: rgba(247,251,248,0.82);
}
.hero > div:first-child .pill {
  color: #f7fbf8;
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.22);
}

.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 800;
}

h1 {
  margin: 0.3rem 0 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
}

h2 { margin: 0; font-size: 1.02rem; }
h3 { margin: 0; }

.subhead { margin: 0.7rem 0 0; color: var(--muted); max-width: 65ch; }
.subhead.compact { max-width: none; font-size: 0.93rem; }
.hint { color: var(--muted); margin: 0.2rem 0 0; font-size: 0.86rem; }
.hint.compact { margin: 0; }
.top-space { margin-top: 0.65rem; }

.hero-pills {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.grid { display: grid; gap: 1rem; }
.top-grid { grid-template-columns: 1fr 1fr; }
.account-grid { grid-template-columns: 0.82fr 1.18fr; }
.lower-grid { grid-template-columns: 1.35fr 0.65fr; }
.home-summary-grid { grid-template-columns: 1fr 1fr; }
.history-grid { grid-template-columns: 1.35fr 0.65fr; }
.settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { min-width: 0; }
.span-2:first-child { grid-column: 1 / -1; }

.home-overview-layout,
.settings-layout {
  display: grid;
  gap: 1rem;
}

.settings-layout {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
}

.settings-intro-card,
.settings-guided-card {
  grid-column: 1 / -1;
}

.card {
  background: var(--paper);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(14px);
}
.account-card,
.homes-card,
.dashboard-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,251,244,0.84));
}
.auth-helper {
  max-width: 54ch;
}
body.signed-in .account-card #requestLinkForm,
body.signed-in .account-card #googleAuthBtn {
  display: none;
}
body:not(.signed-in) #logoutBtn {
  display: none;
}
body.signed-in .account-card {
  align-content: start;
}
body.signed-in .account-card .auth-link-banner {
  background: rgba(242,251,248,0.82);
}
body.signed-in .hero,
body.signed-in .account-grid,
body.signed-in #onboardDevCard {
  display: none;
}
body.signed-in .shell {
  padding-top: 1.2rem;
  gap: 1rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.section-head.wrap { align-items: flex-start; }

.field { display: grid; gap: 0.34rem; font-size: 0.88rem; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
}
.field textarea { resize: vertical; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid rgba(18, 58, 122, 0.2);
  border-color: rgba(18, 58, 122, 0.48);
  background: rgba(255,255,255,0.96);
}

.stack { display: grid; gap: 0.65rem; }
.row { display: flex; gap: 0.6rem; align-items: center; }
.row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.actions { flex-wrap: wrap; }

.btn {
  border: 0;
  border-radius: 12px;
  min-height: 2.6rem;
  padding: 0.68rem 0.9rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #1f63b7, #082a63);
  color: white;
  box-shadow: 0 8px 18px rgba(18, 58, 122, 0.18);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(18, 58, 122, 0.22); }
.btn:focus-visible,
.nav-btn:focus-visible,
.segment-btn:focus-visible {
  outline: 3px solid rgba(18, 58, 122, 0.22);
  outline-offset: 2px;
}
.btn.ghost {
  background: rgba(255,255,255,0.7);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.output {
  background: rgba(18, 24, 27, 0.92);
  color: #d7f4e9;
  border-radius: 12px;
  padding: 0.65rem;
  margin: 0.65rem 0 0;
  min-height: 3.2rem;
  max-height: 18rem;
  overflow: auto;
  font-size: 0.78rem;
  line-height: 1.35;
}
.output.small { max-height: 10rem; }

.pill {
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.78);
  font-size: 0.82rem;
  line-height: 1;
}
.pill.subtle {
  color: var(--muted);
  background: rgba(255,255,255,0.58);
}
.pill.busy {
  color: var(--brand-deep);
  border-color: rgba(18,58,122,0.22);
  background: rgba(221, 246, 240, 0.95);
}
.pill.warn {
  color: var(--advisory-ink);
  border-color: var(--advisory-line);
  background: var(--advisory-bg);
}

.homes-list, .feed { display: grid; gap: 0.55rem; margin-top: 0.65rem; }
.compact-feed { gap: 0.5rem; }

.home-item, .feed-item, .timeline-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem;
  background: rgba(255,255,255,0.65);
}
.home-item {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.home-item:hover { border-color: rgba(18, 58, 122, 0.24); transform: translateY(-1px); }
.home-item.active {
  border-color: rgba(18, 58, 122, 0.45);
  box-shadow: inset 0 0 0 1px rgba(18,58,122,0.18), var(--shadow-soft);
  background: rgba(242, 251, 248, 0.88);
}
.home-item .title { font-weight: 700; }
.home-item .meta, .feed-item .meta, .timeline-item .meta { color: var(--muted); font-size: 0.82rem; }
.home-item-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}
.home-item-score {
  min-width: 3.4rem;
  border-radius: 18px;
  padding: 0.52rem 0.58rem;
  text-align: center;
  color: var(--brand-deep);
  font-weight: 900;
  background: rgba(221, 246, 240, 0.92);
  border: 1px solid rgba(18,58,122,0.16);
}
.home-item-badges {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}
.home-item-badges span {
  border-radius: 999px;
  padding: 0.22rem 0.48rem;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(24,32,36,0.08);
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
}
.home-item.active .home-item-badges span:first-child {
  background: rgba(18,58,122,0.12);
  color: var(--brand-deep);
  border-color: rgba(18,58,122,0.18);
}
.home-item-footer {
  margin-top: 0.52rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.home-health-card,
.recent-activity-card,
.maintenance-drawer,
.settings-card,
.settings-intro-card {
  background:
    radial-gradient(circle at top right, rgba(223, 156, 60, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,251,244,0.86));
}

.dashboard-cards {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}
.metric {
  border: 1px solid rgba(24,32,36,0.1);
  border-radius: 18px;
  padding: 0.92rem;
  background: rgba(255,255,255,0.72);
  min-height: 100%;
}
.metric-clickable {
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.metric-clickable:hover,
.metric-clickable:focus-visible {
  border-color: rgba(18, 58, 122, 0.42);
  box-shadow: 0 14px 28px rgba(18, 58, 122, 0.12);
  outline: none;
  transform: translateY(-1px);
}
.metric-clickable.active {
  border-color: rgba(18, 58, 122, 0.62);
  box-shadow: inset 0 0 0 1px rgba(18,58,122,0.22), 0 16px 32px rgba(18, 58, 122, 0.12);
  background: rgba(242, 251, 248, 0.94);
}
.metric.overall {
  grid-column: 1 / -1;
  padding: clamp(1rem, 2vw, 1.35rem);
  border-color: rgba(18,58,122,0.16);
  background:
    radial-gradient(circle at top right, rgba(223, 156, 60, 0.12), transparent 35%),
    linear-gradient(135deg, rgba(243, 252, 248, 0.96), rgba(255,255,255,0.92));
}
.metric.component {
  display: grid;
  align-content: start;
  gap: 0.35rem;
}
.metric h3 { margin: 0; font-size: 1rem; }
.metric-card-hint {
  margin-top: 0.65rem;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(18,58,122,0.16);
  background: rgba(242,251,248,0.92);
  padding: 0.28rem 0.62rem;
  color: var(--brand-deep);
  font-size: 0.8rem;
  font-weight: 800;
}
.metric-score-row {
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.metric .score { margin-top: 0; font-size: 1.55rem; font-weight: 900; }
.metric.overall .score { font-size: clamp(2rem, 5vw, 3rem); }
.metric-score-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7a2f20;
  background: rgba(255, 232, 225, 0.95);
  border: 1px solid rgba(179, 69, 50, 0.22);
}
.metric-warning-inline {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #6f2f20;
}
.metric-warning-note {
  margin-top: 0.35rem;
  font-size: 0.76rem;
  color: #6f2f20;
}
.metric-warning-actions {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.metric-warning-actions .btn {
  padding: 0.45rem 0.6rem;
  font-size: 0.78rem;
}
.metric-reasons {
  margin: 0.7rem 0 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.28rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.metric .label { color: var(--muted); font-weight: 800; }
.metric .meta { margin-top: 0.25rem; color: var(--muted); font-size: 0.83rem; line-height: 1.45; }
.bar {
  margin-top: 0.55rem;
  width: 100%;
  height: 10px;
  background: rgba(24,32,36,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.bar > span { display: block; height: 100%; border-radius: 999px; }

.component-detail-panel {
  margin-top: 0.85rem;
}
.component-detail-card {
  border: 1px solid rgba(18,58,122,0.18);
  border-radius: 24px;
  padding: clamp(0.95rem, 2vw, 1.25rem);
  background:
    radial-gradient(circle at top right, rgba(255, 197, 112, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(242,249,246,0.92));
}
.component-detail-card.empty {
  background: rgba(255,255,255,0.62);
  border-style: dashed;
}
.component-detail-copy {
  display: grid;
  gap: 1rem;
}
.component-detail-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}
.component-detail-score {
  min-width: 6.6rem;
  border-radius: 20px;
  padding: 0.8rem;
  text-align: center;
  color: var(--brand-deep);
  background: rgba(221, 246, 240, 0.95);
  border: 1px solid rgba(18,58,122,0.18);
}
.component-detail-score strong {
  display: block;
  font-size: 1.65rem;
}
.component-detail-score span {
  display: block;
  margin-top: 0.1rem;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.78rem;
}
.component-detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.component-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
  align-items: start;
}
.component-detail-media-grid {
  grid-template-columns: minmax(280px, 0.95fr) minmax(300px, 1.05fr);
}
.component-detail-main-grid {
  grid-template-columns: minmax(300px, 0.92fr) minmax(320px, 1.08fr);
  gap: 1rem;
}
.component-detail-info-stack {
  display: grid;
  gap: 0.75rem;
}
.component-detail-section {
  border: 1px solid rgba(24,32,36,0.08);
  border-radius: 18px;
  padding: 0.85rem;
  background: rgba(255,255,255,0.62);
}
.component-detail-section .metric-reasons {
  margin-top: 0.55rem;
}
.component-score-explanation {
  display: grid;
  gap: 0.55rem;
}
.component-score-explanation .metric-reasons {
  margin-top: 0;
}
.component-detail-summary-grid {
  border-top: 1px solid rgba(24,32,36,0.08);
  padding-top: 0.85rem;
}
.component-detail-photo,
.component-detail-photo-placeholder {
  margin: 0.5rem 0 0;
  border: 1px solid rgba(24,32,36,0.1);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255,255,255,0.68);
}
.component-detail-photo img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  max-height: 420px;
  object-fit: cover;
}
.component-detail-photo figcaption {
  padding: 0.55rem 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.component-detail-photo figcaption strong,
.component-detail-photo figcaption span {
  display: block;
}
.component-detail-photo figcaption strong {
  color: var(--ink);
  font-size: 0.86rem;
}
.component-detail-photo-fallback svg {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
}
.component-detail-photo-fallback-roof .fallback-roof {
  filter: drop-shadow(0 10px 14px rgba(10, 77, 71, 0.25));
}
.component-detail-photo-fallback-siding .fallback-siding {
  fill: #fff2d9;
  stroke: #d99f52;
  stroke-width: 6;
}
.component-detail-photo-fallback-siding .fallback-siding-lines {
  stroke: #c7833d;
  stroke-width: 5;
}
.component-detail-photo-fallback-windows .fallback-window {
  fill: #bfe9ef;
  stroke: #128396;
  stroke-width: 7;
  filter: drop-shadow(0 8px 14px rgba(18, 131, 150, 0.18));
}
.component-detail-photo-placeholder {
  min-height: 12rem;
  display: grid;
  place-items: center;
  gap: 0.3rem;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
}
.component-detail-photo-placeholder strong {
  color: var(--ink);
}
.component-finding-list,
.component-action-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.65rem;
}
.component-finding-item,
.component-good-news-card,
.component-action-item,
.component-contractor-card {
  border: 1px solid rgba(24,32,36,0.09);
  border-radius: 16px;
  padding: 0.75rem;
  background: rgba(255,255,255,0.7);
}
.component-finding-item span,
.component-action-item span {
  display: block;
  color: var(--brand-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.component-finding-item p,
.component-good-news-card p,
.component-action-item p {
  margin: 0.32rem 0 0;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.45;
}
.component-good-news-card {
  margin-top: 0.65rem;
  border-color: rgba(18,58,122,0.14);
  background: rgba(242, 251, 248, 0.9);
}
.component-good-news-card strong {
  display: block;
  color: var(--brand-deep);
}
.component-action-item.now {
  border-color: rgba(179, 69, 50, 0.24);
  background: rgba(255, 241, 234, 0.88);
}
.component-action-item.soon {
  border-color: rgba(226, 143, 45, 0.28);
  background: rgba(255, 247, 232, 0.88);
}
.component-action-summary {
  margin-top: 0.65rem;
  border: 1px solid rgba(18,58,122,0.12);
  border-radius: 18px;
  padding: 0.85rem;
  background: rgba(242, 251, 248, 0.88);
}
.component-action-summary span {
  display: inline-flex;
  margin-bottom: 0.4rem;
  border-radius: 999px;
  padding: 0.22rem 0.52rem;
  color: var(--brand-deep);
  background: rgba(18,58,122,0.1);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.component-action-summary strong {
  display: block;
}
.component-action-summary p {
  margin: 0.38rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.component-action-summary.recommend-inspection {
  border-color: rgba(203, 111, 46, 0.28);
  background: rgba(255, 246, 230, 0.92);
}
.component-action-summary.recommend-inspection span {
  color: #7a3b12;
  background: rgba(203, 111, 46, 0.14);
}
.component-action-summary .btn {
  margin-top: 0.72rem;
}
.component-contractor-card {
  margin-top: 0.65rem;
}
.component-contractor-card .btn {
  margin-top: 0.65rem;
}

.selected-home-address {
  color: var(--brand-deep);
  font-weight: 900;
}

.royal-blue-accent,
.pill.busy,
.home-item-score,
.metric-card-hint,
.component-detail-score,
.component-good-news-card,
.component-action-summary,
.photo-review-compact,
.onboarding-inline-summary,
.notification-decision-panel {
  border-color: rgba(18, 58, 122, 0.16);
  background: rgba(234, 244, 255, 0.9);
}

.metric-clickable:hover,
.metric-clickable:focus-visible {
  border-color: rgba(18, 58, 122, 0.42);
  box-shadow: 0 14px 28px rgba(18, 58, 122, 0.12);
}

.metric-clickable.active {
  border-color: rgba(18, 58, 122, 0.62);
  box-shadow: inset 0 0 0 1px rgba(18, 58, 122, 0.22), 0 16px 32px rgba(18, 58, 122, 0.12);
  background: rgba(244, 248, 255, 0.96);
}

.metric.overall,
.component-detail-card,
.settings-guided-card {
  border-color: rgba(18, 58, 122, 0.16);
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.12), transparent 35%),
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(244,248,255,0.94));
}

.nav-btn.active {
  background: linear-gradient(135deg, rgba(18, 58, 122, 0.12), rgba(31, 99, 183, 0.18));
  color: var(--brand-deep);
  box-shadow: inset 0 0 0 1px rgba(18, 58, 122, 0.18);
}

.timeline-item::after {
  background: rgba(18, 58, 122, 0.46);
  box-shadow: 0 0 0 3px rgba(18, 58, 122, 0.08);
}

.timeline-item.maintenance::after {
  background: rgba(31, 99, 183, 0.72);
}

.house-illustration .roof {
  background: var(--brand);
}

.house-illustration .window {
  background: #dbeafe;
  border-color: rgba(18, 58, 122, 0.16);
}

.component-detail-photo-fallback .fallback-roof {
  fill: var(--brand);
  stroke: var(--brand-deep);
}

.activity-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.activity-block {
  min-width: 0;
  border: 1px solid rgba(24,32,36,0.09);
  border-radius: 18px;
  padding: 0.85rem;
  background: rgba(255,255,255,0.68);
}
.activity-block-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
}
.activity-block-head h3 {
  font-size: 1rem;
}
.maintenance-drawer > summary,
.settings-details > summary,
.setup-details > summary {
  list-style: none;
  cursor: pointer;
}
.maintenance-drawer > summary::-webkit-details-marker,
.settings-details > summary::-webkit-details-marker,
.setup-details > summary::-webkit-details-marker {
  display: none;
}
.maintenance-drawer > summary,
.settings-details > summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
}
.maintenance-drawer > summary::after,
.settings-details > summary::after,
.setup-details > summary::after {
  content: "Show";
  align-self: flex-start;
  border-radius: 999px;
  border: 1px solid rgba(18,58,122,0.16);
  background: rgba(242,251,248,0.9);
  color: var(--brand-deep);
  padding: 0.26rem 0.58rem;
  font-size: 0.76rem;
  font-weight: 900;
}
.maintenance-drawer[open] > summary::after,
.settings-details[open] > summary::after,
.setup-details[open] > summary::after {
  content: "Hide";
}
.maintenance-drawer > summary:focus-visible,
.settings-details > summary:focus-visible,
.setup-details > summary:focus-visible {
  outline: 3px solid rgba(18,58,122,0.2);
  outline-offset: 4px;
  border-radius: 16px;
}
.maintenance-drawer > summary .pill {
  margin-left: auto;
}
.maintenance-drawer-body {
  margin-top: 0.9rem;
  border-top: 1px solid rgba(24,32,36,0.08);
  padding-top: 0.9rem;
}

.settings-intro-card {
  padding: clamp(1rem, 2vw, 1.3rem);
}
.settings-card {
  min-width: 0;
}
.settings-home-switcher {
  margin-top: 0.9rem;
  border-top: 1px solid rgba(24,32,36,0.08);
  padding-top: 0.85rem;
}
.settings-account-actions {
  margin-top: 0.9rem;
  border-top: 1px solid rgba(24,32,36,0.08);
  padding-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.compact-homes-list {
  margin-top: 0.55rem;
}
.settings-guided-card {
  background:
    radial-gradient(circle at top right, rgba(18,58,122,0.1), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.95), rgba(246,251,248,0.9));
}
.guided-setup-form {
  display: grid;
  gap: 0.85rem;
}
.setup-card {
  display: grid;
  gap: 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(24,32,36,0.09);
  background: rgba(255,255,255,0.72);
  padding: 0.95rem;
}
.setup-card-prominent {
  background:
    radial-gradient(circle at top right, rgba(223,156,60,0.1), transparent 36%),
    rgba(255,255,255,0.78);
}
.setup-status-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
}
.setup-status-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}
.setup-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.65rem;
}
.setup-review-grid:empty {
  display: none;
}
.photo-review-compact {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem;
  border: 1px solid rgba(18,58,122,0.12);
  border-radius: 18px;
  background: rgba(242,251,248,0.84);
  padding: 0.8rem;
}
.photo-review-compact strong {
  display: block;
  color: var(--brand-deep);
  margin-bottom: 0.18rem;
}
.photo-review-pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  min-width: min(20rem, 45%);
}
.setup-details {
  border: 1px solid rgba(24,32,36,0.09);
  border-radius: 16px;
  background: rgba(255,255,255,0.62);
  overflow: hidden;
}
.setup-details > summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.72rem 0.82rem;
  color: var(--ink);
  font-weight: 900;
}
.setup-details > summary > span {
  display: grid;
  gap: 0.18rem;
}
.setup-details > summary .hint {
  font-weight: 500;
}
.setup-details-body {
  border-top: 1px solid rgba(24,32,36,0.08);
  padding: 0.85rem;
  display: grid;
  gap: 0.75rem;
}
details.setup-card.setup-details {
  padding: 0;
}
details.setup-card.setup-details > summary {
  padding: 0.95rem;
}
details.setup-card.setup-details > .setup-details-body {
  border-top: 1px solid rgba(24,32,36,0.08);
  padding: 0.95rem;
}
.settings-save-bar {
  position: sticky;
  bottom: 0.8rem;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
  border: 1px solid rgba(18,58,122,0.16);
  border-radius: 18px;
  background: rgba(255,253,248,0.94);
  box-shadow: var(--shadow-soft);
  padding: 0.85rem;
  backdrop-filter: blur(10px);
}

.app-nav {
  display: flex;
  gap: 0.5rem;
  padding: 0.45rem;
  position: sticky;
  top: 0.85rem;
  z-index: 4;
}
.nav-btn {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  background: transparent;
  font: inherit;
  font-weight: 800;
  color: var(--muted);
  transition: background 120ms ease, color 120ms ease;
}
.nav-btn:hover { background: rgba(255,255,255,0.68); color: var(--ink); }
.nav-btn.active {
  background: linear-gradient(135deg, rgba(18,58,122,0.12), rgba(31,99,183,0.2));
  color: var(--brand-deep);
  box-shadow: inset 0 0 0 1px rgba(18,58,122,0.18);
}

#workspaceSections { display: grid; gap: 1rem; }
.app-view { display: none; gap: 1rem; }
.app-view.is-active { display: grid; }

.alert-summary-item {
  display: grid;
  gap: 0.28rem;
}
.alert-summary-item .title-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  justify-content: space-between;
}
.alert-summary-item .title {
  font-weight: 700;
  font-size: 0.92rem;
}
.alert-summary-item .summary {
  font-size: 0.84rem;
  color: var(--ink);
  line-height: 1.35;
}
.alert-summary-item .meta {
  color: var(--muted);
  font-size: 0.78rem;
}
.inline-pills {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.inline-pills .mini-pill {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.7);
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.inline-pills .mini-pill.warn {
  border-color: var(--advisory-line);
  background: var(--advisory-bg);
  color: var(--advisory-ink);
}

.empty-card {
  border: 1px dashed rgba(24,32,36,0.14);
  border-radius: 12px;
  padding: 0.75rem;
  color: var(--muted);
  background: rgba(255,255,255,0.45);
}

.timeline {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.6rem;
}
.timeline-item {
  position: relative;
  padding-left: 0.95rem;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.9rem;
  bottom: 0.9rem;
  width: 2px;
  border-radius: 2px;
  background: rgba(24, 32, 36, 0.09);
}
.timeline-item::after {
  content: "";
  position: absolute;
  left: 0.14rem;
  top: 0.8rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(18,58,122,0.4);
  box-shadow: 0 0 0 3px rgba(18,58,122,0.08);
}
.timeline-item.alert::after { background: rgba(212, 118, 47, 0.65); box-shadow: 0 0 0 3px rgba(212,118,47,0.12); }
.timeline-item.storm::after { background: rgba(179, 69, 50, 0.75); box-shadow: 0 0 0 3px rgba(179,69,50,0.14); }
.timeline-item.maintenance::after { background: rgba(31,99,183,0.65); }
.timeline-header {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: flex-start;
}
.timeline-title {
  font-weight: 700;
}
.timeline-summary {
  margin-top: 0.3rem;
  font-size: 0.86rem;
  line-height: 1.35;
}
.timeline-item details {
  margin-top: 0.45rem;
}
.timeline-item details summary {
  cursor: pointer;
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 0.82rem;
}
.timeline-item details pre {
  margin: 0.5rem 0 0;
  background: rgba(18, 24, 27, 0.92);
  color: #d7f4e9;
  border-radius: 10px;
  padding: 0.55rem;
  overflow: auto;
  font-size: 0.75rem;
}

.segmented {
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.2rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.65);
  flex-wrap: wrap;
}
.segment-btn {
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  font: inherit;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.segment-btn.active {
  background: rgba(18,58,122,0.12);
  color: var(--brand-deep);
}

.notification-group {
  display: grid;
  gap: 0.55rem;
}
.notification-group + .notification-group { margin-top: 0.8rem; }
.group-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.notification-card {
  display: grid;
  gap: 0.35rem;
}
.notification-title-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
}
.notification-title {
  font-weight: 700;
}
.notification-title-trigger {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.notification-title-trigger:hover { color: var(--brand-deep); }
.notification-body {
  font-size: 0.86rem;
  line-height: 1.35;
}
.notification-helper {
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px dashed rgba(24,32,36,0.08);
  padding-top: 0.35rem;
}
.notification-decision-note {
  font-size: 0.8rem;
  color: var(--advisory-ink);
  border: 1px solid var(--advisory-line);
  background: var(--advisory-bg);
  border-radius: 10px;
  padding: 0.42rem 0.55rem;
}
.notification-decision-panel {
  border: 1px solid rgba(18,58,122,0.12);
  background: rgba(242, 251, 248, 0.9);
  border-radius: 12px;
  padding: 0.6rem;
  display: grid;
  gap: 0.45rem;
}
.notification-decision-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--brand-deep);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.notification-decision-copy {
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--ink);
}
.notification-card.storm-like {
  box-shadow: inset 0 0 0 1px rgba(212,118,47,0.07);
}

.kv-list {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.5rem;
}
.kv-row {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.62);
}
.kv-row .key { color: var(--muted); font-size: 0.82rem; }
.kv-row .value { font-weight: 700; font-size: 0.88rem; word-break: break-word; }

.placeholder-toggle {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
  background: rgba(255,255,255,0.62);
  font-size: 0.9rem;
}
.placeholder-toggle input { margin: 0; accent-color: var(--brand); }
.placeholder-toggle span {
  color: var(--muted);
  font-size: 0.78rem;
  border: 1px dashed rgba(24,32,36,0.12);
  border-radius: 999px;
  padding: 0.16rem 0.45rem;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem;
}
.choice-card {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  border: 1px solid rgba(24,32,36,0.09);
  border-radius: 14px;
  padding: 0.7rem 0.75rem;
  background: rgba(255,255,255,0.78);
  cursor: pointer;
}
.choice-card input {
  margin: 0.15rem 0 0;
  accent-color: var(--brand);
}
.choice-card span {
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.4;
}
.surface-block {
  border-radius: 18px;
  border: 1px solid rgba(24,32,36,0.08);
  background: rgba(255,255,255,0.58);
  padding: 0.9rem;
}
.surface-block h3 {
  margin: 0;
  font-size: 1rem;
}

.operator-panel summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.operator-panel summary::-webkit-details-marker { display: none; }
.operator-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
.operator-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem;
  background: rgba(255,255,255,0.55);
}
.operator-block h3 { margin: 0 0 0.6rem; font-size: 0.9rem; }

.signed-out-card {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 1rem;
  align-items: center;
}
.signed-out-side {
  display: grid;
  gap: 0.7rem;
}
.checklist {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  display: grid;
  gap: 0.35rem;
}

.house-illustration {
  position: relative;
  height: 140px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #f3fbf8 0%, #f8f2e8 100%);
  overflow: hidden;
}
.house-illustration .sun {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f0b44d;
  box-shadow: 0 0 0 8px rgba(240, 180, 77, 0.15);
}
.house-illustration .roof {
  position: absolute;
  left: 50%;
  top: 44px;
  width: 90px;
  height: 28px;
  background: var(--brand);
  transform: translateX(-50%) skewX(-24deg);
  border-radius: 4px;
}
.house-illustration .house-body {
  position: absolute;
  left: 50%;
  top: 64px;
  width: 96px;
  height: 52px;
  transform: translateX(-50%);
  background: #fffdf8;
  border: 1px solid rgba(24,32,36,0.14);
  border-radius: 8px 8px 10px 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto;
  gap: 6px;
  padding: 8px 8px 0;
}
.house-illustration .window {
  background: #dceff0;
  border: 1px solid rgba(18,58,122,0.15);
  border-radius: 4px;
}
.house-illustration .door {
  grid-column: 1 / -1;
  justify-self: center;
  width: 18px;
  height: 22px;
  background: #d3a26a;
  border-radius: 4px 4px 0 0;
}
.house-illustration .ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16px;
  background: linear-gradient(90deg, #8dcf84, #69b870);
}

.demo-toolbar { display: inline-flex; align-items: center; gap: 0.6rem; }
.demo-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: rgba(255,255,255,0.75);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}
.demo-toggle input { margin: 0; accent-color: var(--brand); }

.qr-image {
  width: min(100%, 230px);
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  object-fit: contain;
}

.startup-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(243, 239, 228, 0.86);
  backdrop-filter: blur(8px);
  transition: opacity 220ms ease, visibility 220ms ease;
}
.startup-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.startup-panel {
  width: min(520px, calc(100vw - 2rem));
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.72);
  background: rgba(255,255,255,0.9);
  box-shadow: var(--shadow);
  padding: 1rem;
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  text-align: center;
}
.startup-spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(18,58,122,0.15);
  border-top-color: var(--brand);
  border-right-color: rgba(226,143,45,0.75);
  animation: spin 900ms linear infinite;
}
.startup-title {
  margin: 0;
  font-weight: 800;
}
.startup-detail {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.auth-link-banner {
  margin-top: 0.6rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.68);
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
  display: grid;
  gap: 0.35rem;
}
.auth-link-banner.success {
  border-color: rgba(18,58,122,0.2);
  background: rgba(241, 251, 247, 0.92);
}
.auth-link-banner.warn {
  border-color: var(--advisory-line);
  background: var(--advisory-bg);
}
.auth-link-banner.info {
  border-color: rgba(18,58,122,0.14);
  background: rgba(242,251,248,0.86);
}
.auth-link-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.password-setup-card {
  margin-top: 0.7rem;
  border: 1px solid rgba(18,58,122,0.14);
  background: rgba(242,251,248,0.75);
  border-radius: 14px;
  padding: 0.75rem;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes baselineReadyPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 12px 26px rgba(18,58,122,0.22); }
  50% { transform: scale(1.05); box-shadow: 0 16px 32px rgba(18,58,122,0.3); }
}
.debug-panel {
  margin-top: 0.65rem;
}
.debug-panel summary {
  cursor: pointer;
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 0.84rem;
}

.requires-auth.is-hidden,
.dev-only.is-hidden,
.hide-in-demo.is-hidden,
.is-hidden { display: none !important; }
body:not(.dev-tools-enabled) .dev-only { display: none !important; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

body.onboarding-active #appShell {
  display: none;
}

.welcome-onboarding {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 2rem));
  margin: 1.2rem auto 3rem;
}

.welcome-onboarding-card {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 1rem;
  align-items: stretch;
}

.welcome-onboarding-rail,
.welcome-onboarding-panel {
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 20px 52px rgba(24, 32, 36, 0.12);
  backdrop-filter: blur(10px);
}

.welcome-onboarding-rail {
  padding: 1.1rem;
  background:
    linear-gradient(165deg, rgba(15, 87, 79, 0.96), rgba(10, 61, 57, 0.96)),
    radial-gradient(circle at top right, rgba(236, 184, 110, 0.28), transparent 40%);
  color: #e8f5f1;
}

.welcome-onboarding-rail h1 {
  margin: 0.35rem 0 0;
  color: #f5fbf8;
}

.welcome-home-label {
  margin-top: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  padding: 0.85rem;
  color: rgba(233, 247, 243, 0.9);
  line-height: 1.5;
}

.onboarding-step-pills {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.onboarding-step-pill {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: rgba(233, 247, 243, 0.8);
  padding: 0.42rem 0.72rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.onboarding-step-pill.is-active {
  background: rgba(255,255,255,0.2);
  color: #fffaf2;
}

.onboarding-step-pill.is-complete {
  background: rgba(222, 246, 239, 0.18);
}

.welcome-onboarding-panel {
  padding: 1.1rem;
  background: rgba(255, 252, 247, 0.9);
}

.welcome-onboarding-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.onboarding-progress-label {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 800;
}

.welcome-onboarding-head h2 {
  margin: 0.25rem 0 0;
  font-size: 2rem;
}

.onboarding-prompt-body {
  margin-top: 1rem;
  min-height: 20rem;
}

.onboarding-card-block,
.onboarding-form-stack {
  display: grid;
  gap: 0.8rem;
  border-radius: 22px;
  border: 1px solid rgba(24,32,36,0.08);
  background: rgba(255,255,255,0.74);
  padding: 1rem;
}
.onboarding-question-card {
  max-width: 720px;
  margin: 0 auto;
}
.onboarding-question-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.onboarding-question-pill {
  border-radius: 999px;
  border: 1px solid rgba(24,32,36,0.08);
  background: rgba(246, 241, 233, 0.9);
  color: var(--muted);
  padding: 0.35rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 700;
}
.onboarding-question-pill.is-active {
  border-color: rgba(18,58,122,0.2);
  background: rgba(236, 248, 244, 0.96);
  color: var(--brand-deep);
}
.onboarding-input-mode {
  width: fit-content;
  max-width: 100%;
}

.onboarding-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  color: #7b857b;
  font-weight: 800;
}

.onboarding-card-block h3 {
  margin: 0;
  font-size: 1.45rem;
  color: #162f2d;
}

.onboarding-body-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.onboarding-inline-summary {
  border-radius: 18px;
  border: 1px solid rgba(18,58,122,0.12);
  background: rgba(240, 248, 245, 0.92);
  padding: 0.85rem;
}

.onboarding-inline-summary strong {
  display: block;
  font-size: 1rem;
}

.onboarding-inline-summary p {
  margin: 0.3rem 0 0;
}
.baseline-review-card {
  border-radius: 22px;
  border: 1px solid rgba(18,58,122,0.16);
  background: linear-gradient(135deg, rgba(234,244,255,0.96), rgba(255,255,255,0.92));
  padding: 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: center;
  box-shadow: 0 14px 28px rgba(18,58,122,0.08);
}

.baseline-review-card strong {
  display: block;
  color: var(--brand-deep);
  font-size: 1.08rem;
  margin-bottom: 0.2rem;
}

.baseline-review-animation {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  position: relative;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 26px rgba(18,58,122,0.22);
}

.baseline-review-card.is-loading .baseline-review-animation {
  animation: spin 1s linear infinite;
}

.baseline-review-animation span {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.78);
  opacity: 0.75;
}

.baseline-review-animation span:nth-child(2) {
  inset: 15px;
  opacity: 0.5;
}

.baseline-review-animation span:nth-child(3) {
  inset: 22px;
  background: rgba(255,255,255,0.88);
  border: 0;
  opacity: 1;
}

.baseline-review-card.is-ready .baseline-review-animation {
  animation: baselineReadyPulse 1.6s ease-in-out infinite;
}

.baseline-review-card.is-ready .baseline-review-animation span {
  display: none;
}

.baseline-review-card.is-ready .baseline-review-animation::after {
  content: "";
  width: 20px;
  height: 11px;
  border-left: 4px solid #fff;
  border-bottom: 4px solid #fff;
  transform: rotate(-45deg) translate(1px, -2px);
}

.home-setup-callout {
  margin-top: 0.9rem;
  border-radius: 22px;
  border: 1px solid rgba(18,58,122,0.16);
  background: linear-gradient(135deg, rgba(234,244,255,0.98), rgba(255,255,255,0.94));
  box-shadow: 0 16px 34px rgba(18,58,122,0.1);
  padding: 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.9rem;
  align-items: center;
}

.setup-resume-callout {
  grid-template-columns: 1fr auto;
}

.home-setup-callout-copy {
  display: grid;
  gap: 0.35rem;
}

.home-setup-callout h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--ink);
}

.home-setup-callout-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.baseline-ready-mark {
  width: 56px;
  height: 56px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--scrub-blue), var(--brand-deep));
  position: relative;
  box-shadow: 0 14px 28px rgba(18,58,122,0.24);
}

.baseline-ready-mark::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 19px;
  width: 21px;
  height: 11px;
  border-left: 4px solid #fff;
  border-bottom: 4px solid #fff;
  transform: rotate(-45deg);
}

.baseline-score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.baseline-score-pill {
  min-width: 92px;
  border-radius: 16px;
  border: 1px solid rgba(18,58,122,0.12);
  background: rgba(255,255,255,0.72);
  padding: 0.55rem 0.65rem;
  display: grid;
  gap: 0.1rem;
}

.baseline-score-pill span,
.baseline-score-pill em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.baseline-score-pill strong {
  color: var(--brand-deep);
  font-size: 1.15rem;
}
.onboarding-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.onboarding-file-pill-row {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.onboarding-file-pill {
  border-radius: 999px;
  border: 1px solid rgba(24,32,36,0.1);
  background: rgba(255,255,255,0.88);
  padding: 0.28rem 0.58rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.photo-manager-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: flex-end;
}

.photo-manager-input {
  flex: 1 1 18rem;
}

.photo-manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.photo-manager-list {
  display: grid;
  gap: 0.65rem;
}

.photo-manager-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(24,32,36,0.08);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
}

.photo-manager-chip strong {
  display: block;
  font-size: 0.92rem;
}

.photo-manager-chip .meta {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.photo-manager-remove-btn {
  padding: 0.55rem 0.8rem;
  min-width: auto;
  white-space: nowrap;
}

.welcome-onboarding-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
}

@media (max-width: 1100px) {
  .hero, .top-grid, .lower-grid, .home-summary-grid, .history-grid, .settings-grid, .settings-layout, .activity-grid, .signed-out-card, .operator-grid, .welcome-onboarding-card {
    grid-template-columns: 1fr;
  }
  .dashboard-cards { grid-template-columns: 1fr; }
  .metric.overall { grid-column: auto; }
  .component-detail-grid, .component-detail-media-grid, .component-detail-main-grid { grid-template-columns: 1fr; }
  .home-setup-callout, .setup-resume-callout { grid-template-columns: 1fr; }
  .home-setup-callout-actions { justify-content: flex-start; }
  .setup-status-card, .settings-save-bar { display: grid; }
  .setup-status-pills { justify-content: flex-start; }
  .photo-review-compact { display: grid; }
  .photo-review-pill-row { justify-content: flex-start; min-width: 0; }
  .section-head { align-items: flex-start; }
  .demo-toolbar { align-self: flex-start; }
}

@media (max-width: 800px) {
  .shell { padding-bottom: 5.4rem; }
  .welcome-onboarding { width: min(100%, calc(100% - 1rem)); }
  .component-detail-head { display: grid; }
  .component-detail-score { width: 100%; }
  .app-nav {
    position: fixed;
    left: 0.7rem;
    right: 0.7rem;
    bottom: 0.7rem;
    top: auto;
    z-index: 10;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
  }
  .nav-btn { flex: 1; text-align: center; padding: 0.85rem 0.65rem; }
  .row.two { grid-template-columns: 1fr; }
  .kv-row { grid-template-columns: 1fr; }
  .activity-block-head, .maintenance-drawer > summary, .settings-details > summary { display: grid; }
  .settings-save-bar { position: static; }
  .photo-manager-chip { display: grid; }
  .photo-manager-remove-btn { width: fit-content; }
  .timeline-header { flex-direction: column; align-items: flex-start; }
  .welcome-onboarding-head h2 { font-size: 1.65rem; }
  .welcome-onboarding-actions { flex-wrap: wrap; justify-content: flex-start; }
  .baseline-score-pill { flex: 1 1 120px; }
}

@media (prefers-reduced-motion: no-preference) {
  .card { animation: rise 260ms ease both; }
  .card:nth-child(2) { animation-delay: 35ms; }
  .card:nth-child(3) { animation-delay: 70ms; }
  @keyframes rise {
    from { transform: translateY(8px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
}



