/* Approved Charcoal & eucalyptus palette. Status colours stay page-owned. */
:root {
  --canvas: #f7f5ef;
  --section: #f7f5ef;
  --surface: #fcfbf7;
  --ink: #293431;
  --muted: #53635a;
  --line: #cddbd0;
  --border: var(--line);
  --accent: #2d7055;
  --accent-hover: #235a44;
  --tint: #e2efe5;
  --control: #6b7f71;
  --focus: var(--accent);
  /* Existing workflow components use these aliases for brand colours. */
  --green: var(--accent);
  --green-dark: var(--accent-hover);
  --forest: var(--accent);
  --coral: var(--accent);
  --teal: var(--accent);
  --teal-dark: var(--accent-hover);
  --teal-soft: var(--tint);
  --paper: var(--surface);
  --cream: var(--section);
}
body { color: var(--ink); }
:focus-visible { outline-color: var(--focus); }
.site-shell, .workspace-shell { border-color: var(--line); }
.site-shell .brand-mark, .owner-app .brand-mark,
.onboarding-page .brand-mark, .takeover-page .brand-mark { background: var(--accent); }

/* Public website and legal pages match the approved preview. */
.site-shell .primary-link { background: var(--accent); border-color: var(--accent); }
.site-shell .primary-link:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.site-shell .hero h1 span, .site-shell .text-link, .legal-main a { color: var(--accent); }
.hero-proof-list li::before { color: var(--accent); }
.services-section { background: var(--section); }
.primary-result, .legal-main .boundary { background: var(--tint); }
.primary-result strong { color: var(--accent); }
.hero-calculator, .service-list article { border-color: var(--line); }
.site-shell :is(.header-cta, .menu-button, .input-affix) { border-color: var(--control); }
.site-shell .input-affix:has([aria-invalid="true"]) { border-color: #a23f35; }
.header-cta:hover, .menu-button:hover, .calculator-info summary:hover,
.calculator-info[open] summary { background: var(--tint); }
.calculator-info summary > span { border-color: var(--control); }
.tenure-control input[type="range"] { accent-color: var(--accent); }
.legal-nav a[aria-current="page"] { color: var(--accent); }

/* Owner workspace, dialogs and account. */
.owner-app .primary-button, .profile-view .button:not(.secondary) { background: var(--accent); border-color: var(--accent); }
.owner-app .primary-button:hover, .profile-view .button:not(.secondary):hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.owner-app .text-button, .profile-view .flow-links a,
.owner-app .property-tab.active { color: var(--accent); }
.workspace-nav-link, .sidebar-property { color: var(--muted); }
.workspace-nav-link:hover, .sidebar-property:hover,
.owner-app .property-overview-summary:hover, .owner-app .setup-row-main:hover,
.owner-app .work-queue-item:hover { background: var(--section); }
.workspace-nav-link[aria-current], .sidebar-property[aria-current] { background: var(--tint); color: var(--accent); }
.owner-app .route-options label:has(input:checked),
.owner-app .tracking-mode-options > label:has(input:checked),
.owner-app .bank-connection-options label:has(input:checked) { border-color: var(--accent); background: var(--tint); }
.owner-app .route-options input, .profile-view .check input { accent-color: var(--accent); }
.owner-app .rent-confirmation-action,
.owner-app :is(.rent-period-table, .payment-table, .water-usage-table) th { background: var(--section); }
.owner-app .secondary-button, .profile-view .button.secondary,
.owner-app :is(input[type="text"], input[type="email"], input[type="date"], select, textarea),
.profile-view input:not([type="checkbox"]) { border-color: var(--control); }
.owner-app .cdr-education ul { color: var(--muted); }
.sidebar-account { border-color: var(--line); color: var(--ink); }
.sidebar-avatar { background: var(--tint); color: var(--accent); }
.sidebar-email, .sidebar-profile-arrow, .sidebar-logout { color: var(--muted); }
.sidebar-logout:hover { background: var(--section); color: var(--ink); }

/* Current property workflows. */
.property-workflow { background: var(--surface); }
.property-workflow .sidebar { background: var(--section); }
.property-workflow .brand span { color: var(--accent); }
.property-workflow .nav-link:hover { background: var(--tint); }
.property-workflow .nav-link[aria-current], .property-workflow #processNav a[aria-current] { background: var(--tint); color: var(--accent); }
.property-workflow .add, .property-workflow #processNav a { color: var(--muted); }
.property-workflow .button:not(.secondary) { background: var(--accent); border-color: var(--accent); }
.property-workflow .button:not(.secondary):hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.property-workflow .button.secondary { color: var(--ink); border-color: var(--control); }
.property-workflow .text-button { color: var(--accent); }
.property-workflow :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) { border-color: var(--control); }
.property-workflow input:is([type="checkbox"], [type="radio"]) { accent-color: var(--accent); }
.property-workflow .upload { background: var(--section); border-color: var(--control); }
.property-workflow .note:not(.waiting) { background: var(--tint); }
.property-workflow :focus-visible { outline-color: var(--focus); }

/* Ordered RBO guidance; shared by Settings and property setup. */
.rbo-registration-steps { list-style: none; padding: 0; margin: 24px 0 0; }
.rbo-registration-step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 16px; padding: 24px 0; }
.rbo-registration-step:first-child { padding-top: 0; }
.rbo-registration-step + .rbo-registration-step { border-top: 1px solid var(--line); }
.rbo-step-number { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--tint); color: var(--accent); font-weight: 650; }
.rbo-step-content h3 { margin: 2px 0 8px; font-size: 18px; line-height: 1.5; }
.rbo-step-content > p { margin: 0 0 8px; }
.rbo-step-content > :last-child { margin-bottom: 0; }
.rbo-step-content .actions { margin-top: 16px; }
.rbo-step-complete h3 { color: var(--accent); }
.rbo-step-pending .rbo-step-number { background: var(--section); color: var(--muted); border: 1px solid var(--line); }
.rbo-step-pending p { color: var(--muted); }
.rbo-step-content .rbo-picture-guides { margin-top: 8px; }
.rbo-form-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
.rbo-form-links > a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.rbo-code-form { display: flex; flex-wrap: nowrap; align-items: flex-end; gap: 12px; border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
.rbo-code-form .field { flex: 0 1 160px; width: 160px; min-width: 0; margin: 0; }
.rbo-code-form .button { flex: 0 0 auto; margin: 0; }
.rbo-code-form :disabled { cursor: not-allowed; opacity: .6; }
.rbo-download-link { appearance: none; border: 0; background: none; color: var(--accent); font: inherit; padding: 10px 0; min-height: 44px; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rbo-download-link:disabled { cursor: progress; opacity: .7; }
.rbo-download-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.rbo-picture-guides { margin-top: 22px; }
.rbo-picture-guides .flow-links { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; text-decoration: none; font-size: 14px; }
.rbo-guide-language { display: inline-flex; align-items: center; gap: 4px; }
.rbo-guide-language > span { margin-right: 4px; }
.rbo-picture-guides a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.rbo-picture-guides a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
@media (max-width: 600px) {
  .rbo-registration-step { gap: 12px; padding: 20px 0; }
  .rbo-step-content .actions .button { max-width: 100%; white-space: normal; }
}

/* Preserved legacy drafts use the same palette with their original workflow structure. */
.onboarding-page, .takeover-page {
  --onboarding-accent-text: var(--muted);
  --takeover-ink: var(--ink);
  --takeover-muted: var(--muted);
  --takeover-line: var(--line);
  --takeover-panel: var(--surface);
  --takeover-green: var(--accent);
  --takeover-pale: var(--section);
  --takeover-accent-text: var(--muted);
  --takeover-focus: var(--focus);
  border-color: var(--line);
}
html:has(.onboarding-page), html:has(.takeover-page) { background: var(--canvas); }
.onboarding-page .continue-button { background: var(--accent); border-color: var(--accent); }
.onboarding-page .continue-button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.signup-progress li.current button, .workspace-nav button.current,
.onboarding-page .route-option:has(input:checked) { background: var(--tint); color: var(--accent); }
.onboarding-page .route-option:has(input:checked) { border-color: var(--accent); }
.onboarding-page .route-option input { accent-color: var(--accent); }
.onboarding-page .document-uploader, .delete-setup-section, .workflow-panel { background: var(--section); }
.onboarding-page :is(.form-grid input:not([type="checkbox"]), .form-grid select, textarea),
.workspace-grid :is(input:not([type="checkbox"]), select, textarea) { border-color: var(--control); }
