:root {
  --bg: #F7F4EE;
  --bg-elevated: #FFFFFF;
  --bg-card: #FFFFFF;
  --border: #E6E0D4;
  --text: #1C1917;
  --muted: #57534E;
  --primary: #1F6B4A;
  --primary-hover: #185A3E;
  --primary-soft: rgba(31, 107, 74, 0.12);
  --secondary: #E8E2D6;
  --secondary-text: #1C1917;
  --danger: #B91C1C;
  --success: #1F6B4A;
  --warning: #B45309;
  --warning-bg: #FEF3C7;
  --radius: 18px;
  --radius-sm: 12px;
  --tap: 56px;
  --shadow: 0 4px 24px rgba(28, 25, 23, 0.06), 0 1px 3px rgba(28, 25, 23, 0.04);
  --shadow-lift: 0 10px 36px rgba(28, 25, 23, 0.1), 0 2px 8px rgba(31, 107, 74, 0.08);
  --forest-deep: #0F3D2C;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;

  overflow-x: hidden;
}
body {
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
}
.hidden { display: none !important; }
.view {
  padding: 16px 18px 110px;
  animation: fadeIn 0.22s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--text);
}
h1.brand, .brand-sm {
  font-family: var(--font-display);
  color: var(--primary);
}
.brand-sm { font-size: 1.35rem; }
h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 10px;
}
.lead { font-size: 1.05rem; margin: 8px 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.center { text-align: center; }
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 58vw;
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.label {
  font-weight: 600;
  margin: 22px 0 12px;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.subhead {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 16px 0 8px;
  font-family: var(--font);
}
.disclaimer {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 12px 0 0;
  line-height: 1.4;
}
.price {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--primary);
  margin: 8px 0 14px;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: var(--tap);
  margin-bottom: 10px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(var(--bg) 75%, transparent);
  padding: 8px 0 14px;
}
.topbar-actions { display: flex; gap: 6px; align-items: center; }
.topbar-home {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-left: -4px;
  margin-right: -4px;
  padding-left: 4px;
  padding-right: 4px;
  border-bottom: 1px solid transparent;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.topbar-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow);
  background: #fff;
  flex-shrink: 0;
}
.topbar-brand-text { min-width: 0; }
.role-chip {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-brand-text {
  min-width: 0;
  max-width: calc(100vw - 140px);
}
@media (max-width: 380px) {
  .role-chip { font-size: 0.72rem; max-width: 11rem; }
  .topbar-brand-text .brand-sm, .topbar-brand-text h1 { font-size: 1.05rem; }
}
.badge-pro-soft {
  background: var(--primary-soft) !important;
  color: var(--primary) !important;
  font-size: 0.7rem !important;
  padding: 4px 8px !important;
}
.lang-compact select {
  min-height: 48px;
  width: auto;
  min-width: 64px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  box-shadow: var(--shadow);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.ho-tip-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(31, 107, 74, 0.08);
  color: var(--forest-deep);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(31, 107, 74, 0.12);
}
.spacer { width: var(--tap); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 20px;
  border: none;
  border-radius: 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
  color: inherit;
  width: 100%;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-text);
}
.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border);
}
.btn-lg {
  min-height: 56px;
  font-size: 1.08rem;
  margin-bottom: 10px;
  border-radius: 16px;
}
.icon-btn {
  width: var(--tap);
  height: var(--tap);
  border: none;
  background: var(--bg-card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.icon-btn.danger { color: var(--danger); }
.danger-text { color: var(--danger) !important; border-color: transparent; }
.fab {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(20px + var(--safe-bottom));
  z-index: 30;
  min-height: 56px;
  padding: 0 28px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 8px 28px rgba(31, 107, 74, 0.35);
  cursor: pointer;
  max-width: calc(100% - 36px);
}
.row-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.row-actions .btn { width: auto; flex: 1; }
.row-actions.wrap { flex-wrap: wrap; }
.row-actions.wrap .btn { min-width: calc(50% - 5px); }

/* Cards & fields */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid rgba(230, 224, 212, 0.6);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
}
.field input, .field select, .select-label select,
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select {
  font: inherit;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 48px;
  padding: 0 14px;
  width: 100%;
}
.field input:focus, .field select:focus, select:focus, input:focus {
  outline: 2px solid var(--primary-soft);
  border-color: var(--primary);
}

/* Onboarding — premium first-run */
.onboard-card {
  padding: 20px 6px 48px;
  text-align: center;
}
.onboard-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 12px auto 18px;
}
.onboard-mark {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-lift);
  background: #fff;
}
.onboard-wordmark {
  display: block;
  height: 28px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}
.onboard-headline {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--forest-deep);
  margin: 0 0 6px;
  line-height: 1.2;
}
.onboard-sub {
  margin: 0 auto 22px;
  max-width: 34ch;
  font-size: 1.02rem;
  line-height: 1.45;
}
.onboard-card .field { text-align: left; }
.onboard-card .btn { margin-top: 4px; }

.role-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 4px 0 20px;
  text-align: left;
}
.role-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 18px 18px 16px;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  min-height: 88px;
}
.role-card:hover, .role-card:focus-visible {
  border-color: var(--primary);
  box-shadow: var(--shadow-lift);
  outline: none;
}
.role-card:active { transform: scale(0.985); }
.role-card-pro {
  border-color: rgba(31, 107, 74, 0.35);
  background: linear-gradient(180deg, #fff 0%, #F3F8F5 100%);
}
.role-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.role-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}
.role-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--primary-soft);
  color: var(--primary);
  flex-shrink: 0;
}
.role-card-badge.badge-pro,
.badge-pro {
  background: var(--primary);
  color: #fff;
}
.role-card-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.35;
}

.trust-strip {
  list-style: none;
  margin: 8px 0 14px;
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  background: rgba(31, 107, 74, 0.06);
  border-radius: 14px;
  border: 1px solid rgba(31, 107, 74, 0.1);
}
.trust-strip li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--forest-deep);
  letter-spacing: 0.01em;
}
.trust-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
.privacy-line {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Empty — premium */
.empty-state {
  text-align: center;
  padding: 28px 8px 40px;
}
.empty-icon { font-size: 2.5rem; margin-bottom: 8px; }
.premium-empty .empty-panel {
  background: var(--bg-card);
  border: 1px solid rgba(230, 224, 212, 0.85);
  border-radius: 22px;
  box-shadow: var(--shadow-lift);
  padding: 28px 20px 24px;
  position: relative;
  overflow: hidden;
}
.premium-empty .empty-panel::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #3D9B6E);
}
.empty-brand {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
}
.empty-brand img { width: 100%; height: 100%; object-fit: cover; display: block; }
.premium-empty h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0 0 8px;
  color: var(--forest-deep);
}
.premium-empty .muted {
  margin: 0 auto 20px;
  max-width: 32ch;
}
.empty-cta {
  margin: 0 0 22px;
  box-shadow: 0 8px 20px rgba(31, 107, 74, 0.28);
}
.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.how-steps li {
  position: relative;
  padding: 10px 12px 10px 44px;
  background: var(--bg);
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
  counter-increment: how;
}
.how-steps { counter-reset: how; }
.how-steps li::before {
  content: counter(how);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Project list */
.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.project-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 12px 12px 10px;
  cursor: pointer;
  border: 1px solid rgba(230, 224, 212, 0.6);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.1s;
}
.project-card:hover, .project-card:focus-visible {
  box-shadow: var(--shadow-lift);
  outline: none;
}
.project-card:active { transform: scale(0.99); }
.project-card-accent {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--primary);
  border-radius: 4px 0 0 4px;
}
.project-card .thumb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(145deg, var(--primary-soft), var(--secondary));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}
.project-card .meta { flex: 1; min-width: 0; }
.project-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font);
}
.project-card p { margin: 2px 0 0; font-size: 0.85rem; color: var(--muted); }
.project-card-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.project-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary);
}
.project-peek {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--secondary);
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.badge.onfile, .badge.active, .badge.verified {
  background: var(--primary-soft);
  color: var(--primary);
}
.badge.expiring {
  background: var(--warning-bg);
  color: var(--warning);
}
.badge.expired {
  background: #FEE2E2;
  color: var(--danger);
}
.badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.badge-row h2 { margin: 0; }

/* Tabs — centered row + centered labels */
.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  background: var(--secondary);
  padding: 6px;
  border-radius: 14px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  text-align: center;
}
.tab {
  flex: 0 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  min-height: 48px;
  border-radius: 12px;
  cursor: pointer;
  padding: 0 14px;
  white-space: nowrap;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tab.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(28, 25, 23, 0.08);
}
.tab-panel { animation: fadeIn 0.18s ease; }
.panel-toolbar { margin-bottom: 12px; }
.panel-toolbar .btn { width: auto; display: inline-flex; }

/* Segmented */
.segmented {
  display: flex;
  background: var(--secondary);
  border-radius: 12px;
  padding: 3px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}
.seg {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--muted);
  min-height: 48px;
  border-radius: 10px;
  cursor: pointer;
}
.seg.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.08);
}

/* Photos */
.photos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.photo-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(230, 224, 212, 0.5);
}
.photo-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: var(--secondary);
}
.photo-card .info { padding: 10px; }
.photo-card .kind {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
}
.photo-card .kind.before { background: #FEF3C7; color: #92400E; }
.photo-card .kind.after { background: var(--primary-soft); color: var(--primary); }
.photo-card .room { font-weight: 600; font-size: 0.9rem; }
.photo-card .cap, .photo-card .when {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}
.photo-card .del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(28, 25, 23, 0.55);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.timeline {
  margin-bottom: 14px;
}
.timeline-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-left: 2px solid var(--border);
  margin-left: 8px;
  padding-left: 14px;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}
.timeline-item .t-meta { font-size: 0.8rem; color: var(--muted); }
.timeline-item .t-title { font-weight: 600; font-size: 0.95rem; }

/* Compare */
.compare-controls { margin-bottom: 12px; }
.compare-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  box-shadow: var(--shadow);
  touch-action: none;
  user-select: none;
}
.compare-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.compare-after, .compare-before {
  position: absolute;
  inset: 0;
}
.compare-before {
  width: 50%;
  overflow: hidden;
  border-right: 2px solid #fff;
}
.compare-before img { width: 100%; max-width: none; height: 100%; object-fit: cover; }
#cmp-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 5;
}
.cmp-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #fff;
  z-index: 4;
  pointer-events: none;
  transform: translateX(-50%);
}
.cmp-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  border: 3px solid var(--primary);
}
.cmp-label {
  position: absolute;
  bottom: 10px;
  z-index: 3;
  background: rgba(28, 25, 23, 0.65);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cmp-label.left { left: 10px; }
.cmp-label.right { right: 10px; }
.compare-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.compare-side figure {
  margin: 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.compare-side img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.compare-side figcaption {
  text-align: center;
  padding: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
}
.trust-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

/* Insurance */
.validity-card {
  margin: 12px 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.validity-label { font-weight: 700; }
.ins-summary {
  margin: 8px 0 14px;
  font-size: 0.95rem;
}
.ins-summary dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
}
.ins-summary dt { color: var(--muted); font-size: 0.85rem; }
.ins-summary dd { margin: 0; font-weight: 600; }

/* Share */
.share-box {
  background: var(--bg);
  border-radius: 12px;
  padding: 14px;
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text);
}
.invitees-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.invitees-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.invitees-list .invitee-main { flex: 1; min-width: 0; }
.invitees-list .name { font-weight: 600; }
.invitees-list .meta { font-size: 0.8rem; color: var(--muted); }
.invitees-list .invite-reshare-btn { flex-shrink: 0; }

/* Banner & portfolio */
.banner {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 14px;
  font-size: 0.92rem;
  font-weight: 500;
}
.banner.warn {
  background: var(--warning-bg);
  color: #92400E;
}
.portfolio-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.portfolio-strip .port-item {
  flex: 0 0 120px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}
.portfolio-strip img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  display: block;
}
.portfolio-strip .port-cap {
  font-size: 0.72rem;
  padding: 6px 8px;
  font-weight: 600;
  color: var(--muted);
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(28, 25, 23, 0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
}
.modal-sheet {
  background: var(--bg-card);
  border-radius: 22px 22px 18px 18px;
  padding: 24px 20px 20px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(28, 25, 23, 0.2);
  animation: sheetUp 0.25s ease;
}
@keyframes sheetUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.modal-sheet h2 { margin-bottom: 8px; }

/* Toast */
.toast {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

.pro-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pro-header h2 { margin: 0; }

@media (min-width: 520px) {
  .modal { align-items: center; }
  .modal-sheet { border-radius: 22px; }
}

/* P0: status bar, checklists, change orders, pro benefits */
.project-status-bar {
  margin-bottom: 12px;
  padding: 14px 16px;
}
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.label-inline {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-actions { margin-top: 8px; }
.status-actions .btn { width: auto; flex: 1 1 auto; min-width: 120px; }
.save-status { margin: 8px 0 0; min-height: 1.2em; }
.checklist-progress {
  margin: 8px 0;
}
.checklist-progress .cl-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 0.88rem;
  font-weight: 600;
}
.checklist-progress .cl-bar {
  height: 8px;
  background: var(--secondary);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
}
.checklist-progress .cl-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
  transition: width 0.25s ease;
}
.checklist-progress ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.checklist-progress li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  padding: 4px 0;
  color: var(--muted);
}
.checklist-progress li.done {
  color: var(--primary);
  font-weight: 600;
}
.checklist-progress .cl-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.checklist-progress li.done .cl-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.banner.info {
  background: var(--primary-soft);
  color: var(--primary);
}
.banner.danger {
  background: #FEE2E2;
  color: var(--danger);
}
.badge.draft { background: var(--secondary); color: var(--muted); }
.badge.active { background: var(--primary-soft); color: var(--primary); }
.badge.complete { background: #DCFCE7; color: #166534; }
.photo-card .kind.during { background: #E0E7FF; color: #3730A3; }
.photo-card .stage-tag {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}
.change-orders-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.change-orders-list li {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  background: var(--bg);
}
.change-orders-list .co-title {
  font-weight: 700;
  margin: 0 0 4px;
}
.change-orders-list .co-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.change-orders-list .co-thumb {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 8px;
}
.change-orders-list .co-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.change-orders-list .co-actions .btn {
  width: auto;
  min-height: 48px;
  padding: 0 14px;
  font-size: 0.88rem;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0;
  font-size: 0.95rem;
  cursor: pointer;
}
.check-row input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}
.pro-benefits {
  margin: 0 0 12px;
  padding-left: 1.2em;
  color: var(--text);
  font-size: 0.92rem;
}
.pro-benefits li { margin-bottom: 4px; }
.project-card .meta .status-line {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.photo-card .stage-tag {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}
.btn:disabled, .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.status-actions .btn.hidden { display: none; }

.photo-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}
.photo-add-row .btn {
  margin: 0;
}

.upload-legal {
  margin: 12px 0 4px;
  padding: 12px 14px;
  background: #F3EFE6;
  border: 1px solid var(--border, #E6E0D4);
  border-radius: 14px;
}
.upload-legal .disclaimer {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted, #78716C);
}
.upload-legal .check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  font-weight: 600;
}
.upload-legal .check-row input {
  margin-top: 2px;
}

.photo-quota {
  margin-left: auto;
  align-self: center;
  white-space: nowrap;
}
.storage-banner {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  border-radius: 14px;
}
.storage-banner.warn-full {
  background: #FEE2E2;
  border-color: #EF4444;
}
.storage-banner .disclaimer { margin: 0; color: #78350F; }
.storage-banner.warn-full .disclaimer { color: #7F1D1D; }
.photo-add-row.is-capped .btn { opacity: 0.55; pointer-events: none; }

/* —— Homeowner P0 —— */
.ho-home-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px;
}
.ho-home-hero {
  padding: 16px;
  border: 1.5px solid rgba(31, 107, 74, 0.18);
  box-shadow: var(--shadow-lift);
  background: linear-gradient(180deg, #fff 0%, #F5F9F6 100%);
}
.ho-home-label {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  text-align: center;
}
.ho-home-strip .btn {
  justify-content: center;
  text-align: center;
}
.ho-home-strip .btn-lg {
  margin-bottom: 0;
  min-height: 56px;
  font-size: 1.02rem;
  width: 100%;
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.04);
}
.ho-home-strip .btn-primary.btn-lg {
  box-shadow: 0 6px 16px rgba(31, 107, 74, 0.22);
}

.home-invite-card {
  margin-bottom: 12px;
  padding: 14px;
}
.home-invite-card .badge-row {
  margin-bottom: 4px;
}
.home-invite-card h2 {
  margin: 0;
  font-size: 1.05rem;
}
.home-invite-card .field {
  margin-bottom: 8px;
}
.ho-home-strip #btn-home-invite {
  grid-column: 1 / -1;
}

.soft-start-banner {
  position: relative;
  padding-right: 40px;
  margin-bottom: 10px;
}
.soft-start-helpful {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #EEF6F1 !important;
  border: 1px solid rgba(31, 107, 74, 0.2) !important;
  color: var(--forest-deep);
  border-radius: 16px;
  padding: 14px 40px 14px 14px;
}
.soft-start-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 0.95rem;
}
.soft-start-body { flex: 1; min-width: 0; }
.soft-start-title {
  margin: 0 0 4px !important;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--primary);
}
.soft-start-banner p { margin: 0 0 8px; }
.soft-start-banner .btn-sm,
.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.88rem;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#btn-soft-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 36px;
  padding: 0;
  width: 36px;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.chip {
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  min-height: 44px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.chip:hover, .chip:focus {
  border-color: var(--primary);
  color: var(--primary);
}
.simple-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
.simple-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  background: var(--bg);
}
.simple-item .si-title {
  font-weight: 700;
  margin: 0 0 4px;
}
.simple-item .si-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.simple-item .si-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.simple-item .si-actions .btn {
  width: auto;
  min-height: 48px;
  padding: 0 14px;
  font-size: 0.88rem;
}
.simple-item.is-fixed {
  opacity: 0.72;
}
.warn-chip, .ok-chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  margin-top: 4px;
}
.warn-chip {
  background: #FEF3C7;
  color: #92400E;
}
.ok-chip {
  background: var(--primary-soft);
  color: var(--primary);
}
.warn-text { color: #92400E; }
.field-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin: -8px 0 10px;
}
.money-total {
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
}
.device-banner {
  margin-bottom: 10px;
  padding: 8px 12px;
  font-size: 0.88rem;
}
.dispute-kit-card .btn-lg { margin-bottom: 10px; }
.dispute-kit-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.dispute-kit-panel .btn { width: 100%; }
.dispute-next-list {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.95rem;
}
.dispute-next-list li { margin-bottom: 8px; }
.visit-form { margin-top: 12px; }
.change-orders-list .co-actions .btn.co-decide {
  min-height: 48px;
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
}
#btn-photo-more-kinds {
  margin: 8px 0 12px;
  width: auto;
}
#project-tabs.tabs,
.tabs {
  flex-wrap: wrap;
  justify-content: center;
}
.tabs .tab {
  text-align: center;
  justify-content: center;
}

/* Punch / Mark fixed polish */
.punch-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.punch-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}
.punch-badge-open {
  background: #FEF3C7;
  color: #92400E;
}
.punch-badge-fixed {
  background: #DCFCE7;
  color: #166534;
}
.punch-thumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 6px;
  flex-wrap: wrap;
}
.punch-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.punch-thumb img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--secondary);
}
.punch-thumb-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}
.punch-thumb-arrow {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
}
.simple-item.is-fixed {
  opacity: 0.92;
  background: #faf8f3;
}
.warn-chip-btn {
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  margin-top: 6px;
}
.warn-chip-btn:hover, .warn-chip-btn:focus {
  outline: 2px solid #92400E;
  outline-offset: 1px;
}
.mark-fixed-item-title {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--primary);
  margin: 0 0 8px;
}


/* Contractor onboarding details */
.onboard-contractor-fields {
  margin: 14px 0 8px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.role-card.selected {
  outline: 2px solid var(--primary);
  box-shadow: var(--shadow-lift);
}
.err-toast { color: var(--danger); font-weight: 600; }
#pro-cta-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
#pro-cta-banner .btn-sm { padding: 8px 12px; font-size: 0.85rem; min-height: auto; }
#profile-plan-card .btn { margin-top: 8px; text-decoration: none; }


/* Accessibility: larger tap targets for limited dexterity */
.icon-btn svg, .icon-btn img {
  width: 26px;
  height: 26px;
}
.home-actions .btn {
  min-height: 58px;
  font-size: 1.08rem;
}
.tabs {
  gap: 6px;
  padding: 8px;
}
.tab {
  min-height: 48px;
}
