:root {
  --ink: oklch(24% 0.045 176);
  --muted: oklch(47% 0.035 176);
  --soft: oklch(68% 0.025 176);
  --paper: oklch(97% 0.012 185);
  --paper-deep: oklch(92% 0.025 185);
  --surface: oklch(99% 0.01 145);
  --line: oklch(83% 0.022 176);
  --leaf: oklch(45% 0.095 174);
  --leaf-dark: oklch(35% 0.08 174);
  --sun: oklch(76% 0.13 76);
  --rose: oklch(66% 0.12 22);
  --ok: oklch(57% 0.11 152);
  --skip: oklch(61% 0.075 70);
  --shadow: 0 18px 45px oklch(35% 0.04 176 / 14%);
  --shadow-soft: 0 10px 28px oklch(35% 0.04 176 / 9%);
  --focus: 0 0 0 3px oklch(76% 0.13 76 / 42%);
  --radius: 10px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  color-scheme: light;
  font-family: Avenir Next, Avenir, Segoe UI, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, oklch(97% 0.012 185), oklch(94% 0.024 138)),
    var(--paper);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: var(--space-2xl) 0 var(--space-3xl);
}

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

h1 {
  max-width: 12ch;
  font-family: Georgia, Charter, serif;
  font-size: clamp(2.1rem, 4.2vw, 3.75rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  font-family: Georgia, Charter, serif;
  font-size: 1.45rem;
  line-height: 1.08;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-md) max(16px, calc((100vw - 1120px) / 2));
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: Georgia, Charter, serif;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.owner-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  justify-content: flex-end;
  align-items: center;
}

.owner-nav a,
.nav-button {
  min-height: 36px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.locale-form select {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--surface);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.owner-nav a:hover,
.owner-nav a.is-active,
.nav-button:hover {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface);
}

.owner-nav a.is-active {
  border-color: color-mix(in oklch, var(--leaf) 35%, var(--line));
  color: var(--leaf-dark);
  font-weight: 800;
}

.flash {
  width: min(1120px, calc(100vw - 32px));
  margin: var(--space-md) auto 0;
  padding: var(--space-md) var(--space-lg);
  border: 1px solid color-mix(in oklch, var(--leaf) 30%, var(--line));
  border-radius: var(--radius);
  background: oklch(93% 0.05 154);
  color: var(--leaf-dark);
  font-weight: 700;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-2xl);
  align-items: end;
  min-height: 320px;
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, oklch(99% 0.01 145), oklch(91% 0.05 156)),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: grid;
  gap: var(--space-lg);
}

.hero-copy p:last-child {
  max-width: 58ch;
  font-size: 1.05rem;
}

.eyebrow {
  color: var(--leaf-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-board,
.summary-panel,
.side-panel,
.visit-card,
.empty-state,
.copy-box,
.workflow-panel,
.workflow-step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.status-board {
  display: grid;
  gap: var(--space-md);
  padding: var(--space-xl);
}

.status-board strong {
  font-family: Georgia, Charter, serif;
  font-size: 2rem;
}

.workflow-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding: var(--space-md);
  border-color: transparent;
  background: color-mix(in oklch, var(--surface) 70%, var(--paper-deep));
  box-shadow: var(--shadow-soft);
}

.workflow-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: var(--space-md);
  min-height: 132px;
  padding: var(--space-lg);
}

.workflow-step strong,
.workflow-step small,
.workflow-step .text-link {
  display: block;
}

.workflow-step small {
  margin-top: var(--space-xs);
  color: var(--muted);
  line-height: 1.45;
}

.workflow-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid color-mix(in oklch, var(--leaf) 35%, var(--line));
  border-radius: 50%;
  background: var(--paper);
  color: var(--leaf-dark);
  font-weight: 900;
}

.workflow-step.is-complete .workflow-number {
  background: var(--leaf);
  color: var(--surface);
}

.text-link {
  display: inline-flex;
  width: fit-content;
  margin-top: var(--space-sm);
  color: var(--leaf-dark);
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklch, var(--leaf) 35%, transparent);
  text-underline-offset: 3px;
}

.status-label,
small {
  color: var(--muted);
}

.split-layout,
.page-grid,
.summary-grid,
.action-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
  align-items: start;
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.summary-grid article,
.summary-panel,
.side-panel {
  padding: var(--space-xl);
}

.summary-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.summary-grid article h2,
.summary-grid article p + p {
  margin-top: var(--space-lg);
}

.photo-grid,
.report-summary {
  display: grid;
  gap: var(--space-md);
}

.photo-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.photo-grid small,
.report-summary small {
  display: block;
  color: var(--muted);
}

.report-summary + .report-summary {
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--line);
}

.complete-card .summary-panel {
  margin-top: var(--space-sm);
}

.section-heading {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.section-heading.with-action {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.section-heading p {
  max-width: 68ch;
}

.room-strip,
.list-stack,
.room-groups,
.room-list,
.task-table,
.form-stack,
.action-panels {
  display: grid;
  gap: var(--space-md);
}

.room-strip {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.split-layout .room-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-card,
.room-preview,
.list-row,
.task-row,
.room-link {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--surface) 92%, var(--paper-deep));
}

.compact-card,
.room-preview {
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-lg);
}

.compact-card span {
  margin-top: var(--space-xs);
  color: var(--leaf-dark);
  font-size: 0.85rem;
  font-weight: 800;
}

a.compact-card,
.button,
.icon-button,
.owner-nav a,
.nav-button,
.text-link {
  transition: background-color 180ms ease-out, border-color 180ms ease-out, color 180ms ease-out, box-shadow 180ms ease-out, transform 180ms ease-out;
}

a.compact-card:hover,
.room-link:hover,
.list-row:hover {
  border-color: color-mix(in oklch, var(--leaf) 38%, var(--line));
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

a.compact-card:hover {
  transform: translateY(-1px);
}


.list-row,
.task-row,
.room-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-lg);
}

.task-row {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.task-row p {
  max-width: 72ch;
  margin-top: var(--space-xs);
}

.cleaner-task {
  grid-template-columns: 34px minmax(0, 1fr);
}

.important-row {
  background: color-mix(in oklch, var(--sun) 18%, var(--surface));
  border-color: color-mix(in oklch, var(--sun) 45%, var(--line));
}

.check-dot {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid var(--soft);
  border-radius: 50%;
  color: var(--surface);
  font-weight: 800;
}

.check-dot.done {
  border-color: var(--ok);
  background: var(--ok);
}

.check-dot.skipped {
  border-color: var(--skip);
  background: var(--skip);
}

.muted-dot {
  opacity: 0.4;
}

.row-actions,
.button-row,
.utility-row,
.flag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.utility-row {
  margin-top: var(--space-xl);
}

.flag-row {
  margin-top: var(--space-sm);
}

.flag-row span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--leaf-dark);
  background: var(--paper);
  font-size: 0.78rem;
  font-weight: 700;
}

.button,
.icon-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 800;
}

.icon-button {
  min-height: 36px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.84rem;
}

.button.primary {
  border-color: var(--leaf);
  background: var(--leaf);
  color: var(--surface);
}

.button.primary:hover,
.button.primary:focus-visible {
  border-color: var(--leaf-dark);
  background: var(--leaf-dark);
  box-shadow: var(--shadow-soft);
}

.button.secondary:hover,
.icon-button:hover,
.button.quiet:hover {
  border-color: color-mix(in oklch, var(--leaf) 36%, var(--line));
  background: var(--surface);
  color: var(--ink);
}

.button:active,
.icon-button:active,
.nav-button:active,
.owner-nav a:active {
  transform: translateY(1px);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.button.secondary {
  background: var(--surface);
  color: var(--leaf-dark);
}

.button.quiet {
  background: transparent;
  color: var(--muted);
}

.demo-reset {
  margin-left: auto;
}

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

.danger {
  color: oklch(45% 0.12 24);
}

.narrow-page {
  display: grid;
  gap: var(--space-lg);
  max-width: 720px;
  margin: 0 auto;
}

.summary-page {
  display: grid;
  gap: var(--space-xl);
}

.form-stack label {
  display: grid;
  gap: var(--space-sm);
  color: var(--ink);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.switch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--space-sm);
}

.switch {
  display: flex !important;
  min-height: 48px;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-sm) !important;
  padding: var(--space-md);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.switch input {
  width: 18px;
  min-height: 18px;
}

.form-note {
  font-size: 0.9rem;
}

.empty-state {
  display: grid;
  gap: var(--space-md);
  padding: var(--space-2xl);
}

.visit-card {
  display: grid;
  gap: var(--space-xl);
  padding: var(--space-xl);
}

.visit-card-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-lg);
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in oklch, var(--line) 70%, var(--surface));
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--leaf);
  transition: width 180ms ease-out;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--line);
}

.copy-box {
  overflow-wrap: anywhere;
  padding: var(--space-lg);
}

.cleaner-shell main {
  width: min(760px, calc(100vw - 24px));
}

.cleaner-home {
  display: grid;
  gap: var(--space-xl);
}

.cleaner-home h1 {
  max-width: 10ch;
}

.cleaner-progress {
  display: grid;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.room-link {
  grid-template-columns: minmax(0, 1fr) auto;
}

.room-link small {
  grid-column: 1 / -1;
}

.sticky-actions {
  position: sticky;
  bottom: var(--space-md);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.sticky-actions .primary {
  grid-column: 1 / -1;
}

.back-link {
  display: inline-flex;
  margin-bottom: var(--space-xl);
  color: var(--leaf-dark);
  font-weight: 800;
}

.task-detail {
  display: grid;
  gap: var(--space-lg);
}

.instruction-card {
  display: grid;
  gap: var(--space-sm);
  padding: var(--space-xl);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.instruction-card p {
  color: var(--ink);
  font-size: 1.05rem;
}

.media-card {
  display: grid;
  gap: var(--space-sm);
  margin: 0;
  padding: var(--space-md);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.media-picker {
  display: grid;
  gap: var(--space-md);
  padding: var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--surface) 92%, var(--paper-deep));
}

.asset-gallery,
.asset-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: var(--space-md);
}

.asset-choice {
  display: grid !important;
  gap: var(--space-sm) !important;
  padding: var(--space-sm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.asset-choice input {
  width: 18px;
  min-height: 18px;
}

.media-card img,
.media-preview {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--paper-deep);
}

.media-card figcaption {
  color: var(--muted);
  font-size: 0.9rem;
}

.requirement {
  padding: var(--space-md);
  border: 1px solid color-mix(in oklch, var(--sun) 55%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--sun) 20%, var(--surface));
  color: var(--ink);
  font-weight: 800;
}

q {
  color: var(--muted);
}

@media (max-width: 820px) {
  main {
    width: min(100vw - 24px, 760px);
    padding-top: var(--space-xl);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: var(--space-md);
  }

  .owner-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-xs);
  }

  .hero-panel,
  .workflow-panel,
  .split-layout,
  .page-grid,
  .action-panels,
  .section-heading.with-action {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: auto;
    padding: var(--space-xl);
  }

  .list-row,
  .task-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .list-row {
    grid-template-columns: 1fr;
  }

  .row-actions {
    grid-column: 1 / -1;
  }

  .task-row .row-actions {
    padding-left: 42px;
  }

  .visit-card-head {
    display: grid;
  }

  .sticky-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 2.25rem;
  }

  .button-row,
  .utility-row {
    align-items: stretch;
    flex-direction: column;
  }

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

  .workflow-step {
    min-height: auto;
  }

  .split-layout .room-strip {
    grid-template-columns: 1fr;
  }

  .button,
  .icon-button {
    width: 100%;
  }

  .task-row .row-actions {
    padding-left: 0;
  }
}

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