/* Accrod Phase 6 — quality refinement layer
   Purpose: visible hierarchy, real empty states, coherent dark theme and restrained premium motion.
   All styling is local; no runtime font, animation or component service is required. */

/* Shared interaction quality */
:root {
  --focus-ring: #8994ff;
  --ease-premium: cubic-bezier(.2,.75,.25,1);
}
html { scroll-behavior: smooth; }
.btn,
.icon-btn,
.filter-tab,
.settings-tab,
.app-nav a,
.panel-link,
.subtle-action,
.profile-link,
.mock-nav,
.value-chip,
.benefit-card,
.price-card,
.pricing-page-card,
.welcome-check-card {
  transition-duration: .2s;
  transition-timing-function: var(--ease-premium);
}
.btn:focus-visible,
.icon-btn:focus-visible,
.profile-link:focus-visible,
.filter-tab:focus-visible,
.settings-tab:focus-visible,
.app-nav a:focus-visible,
.panel-link:focus-visible,
.text-link:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}
button:disabled,
.btn:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
input::placeholder,
textarea::placeholder { color: #5b6678; opacity: 1; }

/* Premium, useful empty workspace — the first visit is genuinely empty, not fake data. */
.local-preview-notice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 16px clamp(14px, 2.2vw, 30px) 0;
  padding: 12px 15px;
  border: 1px solid #dce4f3;
  border-radius: 12px;
  background: #f7f9ff;
  color: #35415b;
  box-shadow: 0 2px 8px rgba(28, 43, 82, .025);
}
.local-preview-notice[hidden] { display: none !important; }
.local-preview-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: #a26b13; box-shadow: 0 0 0 4px rgba(226, 166, 57, .14); }
.local-preview-notice > div { min-width: 0; display: grid; gap: 2px; }
.local-preview-notice strong { color: #24314a; font-size: 11px; line-height: 1.35; font-weight: 600; }
.local-preview-notice span:not(.local-preview-dot) { color: #59667d; font-size: 11px; line-height: 1.5; }
.local-preview-example { margin-left: auto; flex: 0 0 auto; color: #4656df; font-size: 11px; font-weight: 600; white-space: nowrap; }
.local-preview-example:hover { color: #3443c8; text-decoration: underline; text-underline-offset: 3px; }

.welcome-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(290px, .97fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
  min-height: 370px;
  margin: 0 0 18px;
  padding: clamp(24px, 3vw, 42px);
  border: 1px solid #dfe5f2;
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 95% 5%, rgba(107, 119, 255, .12), transparent 34%),
    radial-gradient(ellipse at 4% 100%, rgba(87, 191, 164, .07), transparent 32%),
    linear-gradient(132deg, #fff 0%, #fbfcff 64%, #f6f8ff 100%);
  box-shadow: 0 18px 55px rgba(31, 45, 91, .06), 0 2px 8px rgba(31, 45, 91, .025);
}
.welcome-copy { position: relative; z-index: 1; min-width: 0; }
.welcome-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #56627a; font-size: 11px; font-weight: 600; letter-spacing: .095em; text-transform: uppercase; }
.welcome-eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: #21a47a; box-shadow: 0 0 0 4px rgba(33, 164, 122, .12); }
.welcome-copy h2 { max-width: 540px; margin: 17px 0 12px; color: #162038; font-size: clamp(25px, 2.8vw, 36px); line-height: 1.12; letter-spacing: -.045em; font-weight: 600; }
.welcome-copy > p { max-width: 520px; margin: 0; color: #58657b; font-size: 13px; line-height: 1.75; }
.welcome-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.welcome-actions .btn { min-height: 43px; }
.welcome-copy .welcome-note { margin-top: 14px; color: #5b6678; font-size: 11px; line-height: 1.6; }
.welcome-visual { position: relative; display: grid; gap: 11px; min-width: 0; padding: 13px 0; }
.welcome-visual-glow { position: absolute; z-index: -1; inset: 4% -3% 0; border-radius: 50%; background: radial-gradient(ellipse, rgba(112, 126, 244, .14), transparent 68%); filter: blur(11px); }
.welcome-check-card { position: relative; display: grid; grid-template-columns: 43px minmax(0, 1fr) 29px; align-items: center; gap: 12px; padding: 17px 16px; border: 1px solid #e3e8f2; border-radius: 16px; background: rgba(255,255,255,.92); box-shadow: 0 7px 19px rgba(34, 47, 83, .045); animation: phase6-card-settle .7s var(--ease-premium) both; }
.welcome-check-card:nth-of-type(3) { animation-delay: 90ms; }
.welcome-check-card:nth-of-type(4) { animation-delay: 160ms; }
.welcome-check-card:hover { border-color: #ccd4fa; box-shadow: 0 12px 28px rgba(40, 52, 103, .075); transform: translateY(-2px); }
.welcome-check-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #4656df; background: #eef0ff; }
.welcome-check-icon .icon { width: 19px; height: 19px; }
.welcome-check-icon.purple { color: #6a52cf; background: #f0ebff; }
.welcome-check-icon.green { color: #137a60; background: #e6f7f0; }
.welcome-check-card > div { min-width: 0; }
.welcome-check-card strong { display: block; color: #202b43; font-size: 12px; line-height: 1.4; font-weight: 600; }
.welcome-check-card small { display: block; margin-top: 4px; color: #68758b; font-size: 11px; line-height: 1.45; }
.welcome-step-state { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid #dbe1ef; border-radius: 8px; color: #5b6678; background: #fff; font-size: 11px; font-weight: 600; }
.welcome-step-state.is-done { color: #087f5b; border-color: #bce6d7; background: #e9f8f1; }
.welcome-step-state .icon { width: 15px; height: 15px; }
.welcome-lower-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin: 0 0 22px; }
.welcome-next-card { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: start; gap: 13px; padding: 19px 20px; }
.welcome-section-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #eef0ff; color: #4656df; }
.welcome-section-icon.mint { color: #167a62; background: #e4f7ef; }
.welcome-next-card h3 { margin: 1px 0 5px; color: var(--ink); font-size: 13px; line-height: 1.45; letter-spacing: -.015em; }
.welcome-next-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.welcome-next-card .panel-link { grid-column: 2; justify-self: start; display: inline-flex; align-items: center; gap: 7px; padding: 3px 0 0; color: var(--brand); font-size: 11px; font-weight: 600; }
.welcome-next-card .panel-link:hover { gap: 10px; }
.enhanced-empty-state { padding: clamp(26px, 5vw, 50px) 24px; }
.enhanced-empty-state h3 { color: var(--ink); }
.enhanced-empty-state p { max-width: 490px; }
.enhanced-empty-state .btn { margin: 4px 5px 0 0; }
.empty-state .empty-state-actions { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* Homepage hero — slow, low-amplitude motion that demonstrates the product without distracting */
.hero { padding-top: clamp(48px, 5.3vw, 68px); padding-bottom: clamp(58px, 6vw, 76px); }
.hero-grid { gap: clamp(30px, 4vw, 52px); }
.hero-copy { animation: phase6-copy-in .72s var(--ease-premium) both; }
.hero-visual { position: relative; isolation: isolate; perspective: 1400px; }
.hero-visual::before { content: ""; position: absolute; inset: 9% -5% -2%; z-index: -2; border-radius: 50%; background: radial-gradient(ellipse, rgba(100,116,255,.24), rgba(113,201,186,.10) 43%, transparent 70%); filter: blur(21px); animation: phase6-glow-breathe 7.4s ease-in-out infinite; pointer-events: none; }
.hero-visual::after { content: ""; position: absolute; z-index: -1; inset: 5% 1% 2% -2%; border: 1px solid rgba(100,116,255,.16); border-radius: 24px; transform: rotate(1.15deg) translateY(2px); box-shadow: 0 0 0 9px rgba(100,116,255,.025); animation: phase6-frame-breathe 8s ease-in-out infinite; pointer-events: none; }
.mock-window { position: relative; z-index: 1; transform-origin: center center; transform: perspective(1200px) rotateY(calc(-1.1deg + var(--phase6-tilt-y, 0deg))) rotateX(calc(.4deg + var(--phase6-tilt-x, 0deg))); translate: 0 0; animation: phase6-window-float 6.6s ease-in-out infinite; transition: transform .38s var(--ease-premium), box-shadow .35s ease; will-change: transform, translate; }
.mock-window:hover { transform: perspective(1200px) rotateY(calc(-.4deg + var(--phase6-tilt-y, 0deg))) rotateX(calc(.2deg + var(--phase6-tilt-x, 0deg))) scale(1.002); }
.mock-app { transform-origin: center; }
.mock-app.is-updating { animation: phase6-content-change .48s var(--ease-premium) both; }
.mock-app.is-updating .mock-metric { animation: phase6-metric-refresh .42s var(--ease-premium) both; }
.mock-app.is-updating .mock-metric:nth-child(2) { animation-delay: 45ms; }
.mock-app.is-updating .mock-metric:nth-child(3) { animation-delay: 90ms; }
.mock-app.is-updating .mock-deadline { animation: phase6-row-refresh .42s var(--ease-premium) both; }
.mock-app.is-updating .mock-deadline:nth-of-type(2) { animation-delay: 45ms; }
.mock-app.is-updating .mock-deadline:nth-of-type(3) { animation-delay: 90ms; }
.mock-app.is-updating .mock-deadline:nth-of-type(4) { animation-delay: 135ms; }
.mock-preview-tab { position: relative; overflow: hidden; }
.mock-preview-tab.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 1px; height: 2px; border-radius: 2px; background: currentColor; transform: scaleX(0); transform-origin: left center; opacity: .86; }
.mock-preview-tabs.is-autoplay .mock-preview-tab.active::after { animation: phase6-tab-progress 5200ms linear both; }
.mock-nav.active { box-shadow: inset 2px 0 0 #5966eb; }
.mock-nav.active::after { content: ""; flex: 0 0 4px; width: 4px; height: 4px; margin-left: auto; border-radius: 50%; background: currentColor; animation: phase6-status-pulse 2.8s ease-in-out infinite; }
.mock-chip { animation: phase6-chip-glow 4s ease-in-out infinite; }
.visual-note { animation: phase6-note-float 6s ease-in-out infinite; }
.value-strip-inner { min-height: 76px; }
.value-chip { transition: transform .2s var(--ease-premium), border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.value-chip:hover { transform: translateY(-2px); border-color: #cbd3f8; background: #fbfbff; box-shadow: 0 6px 18px rgba(35, 48, 94, .055); }

@keyframes phase6-copy-in { from { opacity: 0; translate: 0 9px; } to { opacity: 1; translate: 0 0; } }
@keyframes phase6-window-float { 0%,100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes phase6-window-appear { from { opacity: 0; filter: blur(2px); } to { opacity: 1; filter: blur(0); } }
@keyframes phase6-glow-breathe { 0%,100% { opacity: .65; scale: .98; } 50% { opacity: 1; scale: 1.035; } }
@keyframes phase6-content-change { 0% { opacity: .84; translate: 0 4px; } 100% { opacity: 1; translate: 0 0; } }
@keyframes phase6-card-settle { from { opacity: .55; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@keyframes phase6-status-pulse { 0%,100% { opacity: .55; scale: .85; } 50% { opacity: 1; scale: 1.15; } }
@keyframes phase6-chip-glow { 0%,100% { box-shadow: 0 0 0 0 rgba(33,164,122,0); } 50% { box-shadow: 0 0 0 4px rgba(33,164,122,.06); } }
@keyframes phase6-note-float { 0%,100% { translate: 0 0; } 50% { translate: 0 -3px; } }

/* High contrast, intentional dark appearance. Avoid light chips with white text or dark text on dark surfaces. */
.workspace-body.dark-mode {
  --ink: #eff3fc;
  --ink-2: #d2daea;
  --muted: #b3bfd3;
  --muted-2: #95a4bc;
  --line: #2e3a4f;
  --line-strong: #465671;
  --bg: #0c1320;
  --surface: #141e2e;
  --surface-2: #1b293d;
  --brand: #9ba7ff;
  --brand-dark: #8390ff;
  --brand-soft: #252f59;
  --green: #72dfb8;
  --green-soft: #173a32;
  --amber: #ffd27a;
  --amber-soft: #3b301d;
  --red: #ff9f98;
  --red-soft: #40262d;
  --shadow-sm: 0 2px 6px rgba(0,0,0,.18);
  color-scheme: dark;
}
.dark-mode .app-sidebar,
.dark-mode .app-topbar { background: #111a29; border-color: #2d394d; }
.dark-mode .app-main { background: var(--bg); }
.dark-mode .workspace-label { color: #a4b1c7; }
.dark-mode .app-nav a { color: #c1cbe0; }
.dark-mode .app-nav a.active { color: #e0e5ff; background: #27315b; box-shadow: inset 3px 0 0 #9aa6ff; }
.dark-mode .app-nav a:hover { color: #f3f5ff; background: #202c40; }
.dark-mode .topbar-title { color: #e4eaf7; }
.dark-mode .topbar-title strong { color: #fff; }
.dark-mode .local-preview-notice { color: #d6e0f2; background: #18243a; border-color: #334660; }
.dark-mode .local-preview-notice strong { color: #eef3ff; }
.dark-mode .local-preview-notice span:not(.local-preview-dot) { color: #bdcbe0; }
.dark-mode .local-preview-example { color: #bdc6ff; }
.dark-mode .welcome-panel { background: radial-gradient(ellipse at 96% 3%, rgba(119,132,255,.18), transparent 34%), radial-gradient(ellipse at 4% 100%, rgba(60,176,147,.07), transparent 35%), linear-gradient(135deg,#172235 0%,#121d2e 66%,#17243a 100%); border-color: #33435b; box-shadow: 0 16px 45px rgba(0,0,0,.16); }
.dark-mode .welcome-copy h2 { color: #f1f5ff; }
.dark-mode .welcome-copy > p { color: #c0cbe0; }
.dark-mode .welcome-eyebrow { color: #c6d0e4; }
.dark-mode .welcome-copy .welcome-note { color: #aebbd1; }
.dark-mode .welcome-check-card { background: #1b293d; border-color: #35455d; box-shadow: 0 7px 20px rgba(0,0,0,.12); }
.dark-mode .welcome-check-card:hover { border-color: #6675c8; }
.dark-mode .welcome-check-card strong { color: #eff3fc; }
.dark-mode .welcome-check-card small { color: #bcc8dc; }
.dark-mode .welcome-step-state { color: #c6d0e4; background: #172337; border-color: #43536e; }
.dark-mode .welcome-step-state.is-done { color: #82e0bc; background: #173b31; border-color: #2f6e5c; }
.dark-mode .welcome-check-icon { color: #bdc6ff; background: #29345f; }
.dark-mode .welcome-check-icon.purple { color: #d4c6ff; background: #332c55; }
.dark-mode .welcome-check-icon.green { color: #8ce1c1; background: #1b4138; }
.dark-mode .welcome-section-icon { color: #bec8ff; background: #28345d; }
.dark-mode .welcome-section-icon.mint { color: #84e1bf; background: #1b4036; }
.dark-mode .welcome-next-card h3 { color: #edf2fd; }
.dark-mode .welcome-next-card p { color: #b9c6da; }
.dark-mode .welcome-next-card .panel-link { color: #b9c3ff; }
.dark-mode .enhanced-empty-state { background: var(--surface); border-color: var(--line); }
.dark-mode .enhanced-empty-state h3,
.dark-mode .enhanced-empty-state strong { color: var(--ink); }
.dark-mode .enhanced-empty-state p { color: var(--muted); }
.dark-mode .btn-secondary { color: #edf2fc; background: #1d2a3e; border-color: #455671; }
.dark-mode .btn-secondary:hover { color: #fff; background: #27364d; border-color: #627393; }
.dark-mode .btn-quiet { color: #d2daea; }
.dark-mode .pill { border: 1px solid transparent; }
.dark-mode .pill-neutral { color: #d7e0ef; background: #273449; border-color: #40506a; }
.dark-mode .pill-blue { color: #d1d7ff; background: #293361; border-color: #414c82; }
.dark-mode .pill-green { color: #9aefd0; background: #183c32; border-color: #2e6754; }
.dark-mode .pill-amber { color: #ffdc93; background: #3c311f; border-color: #6b542f; }
.dark-mode .pill-red { color: #ffb8b0; background: #42262e; border-color: #75404a; }
.dark-mode .nav-count { color: #ffbbb5; background: #42262e; border-color: #75404a; }
.dark-mode .status-chart-track,
.dark-mode .status-breakdown-track,
.dark-mode .usage-track,
.dark-mode .progress-track,
.dark-mode .trial-progress,
.dark-mode .timeline-track,
.dark-mode .progress-row .progress-track { background: #29374b; }
.dark-mode .status-chart-label,
.dark-mode .status-breakdown-label,
.dark-mode .status-chart-label span,
.dark-mode .status-breakdown-label span,
.dark-mode .status-footnote { color: #c1cde0 !important; }
.dark-mode .status-chart-label strong,
.dark-mode .status-breakdown-label strong { color: #f0f4fd !important; }
.dark-mode .status-chart-track span,
.dark-mode .usage-track span,
.dark-mode .progress-track .progress-fill { filter: saturate(.85) brightness(1.05); }
.dark-mode .billing-disclaimer { background: #332a1c; border-color: #6b5330; color: #ffda94; }
.dark-mode .billing-disclaimer > span { background: #46361e; color: #ffdc94; }
.dark-mode .billing-disclaimer strong { color: #ffe4ac; }
.dark-mode .billing-disclaimer p { color: #dccba9; }
.dark-mode .billing-empty-icon { color: #c3cbff; background: #28345b; }
.dark-mode .billing-renewal,
.dark-mode .billing-plan-price,
.dark-mode .billing-detail-row,
.dark-mode .usage-item,
.dark-mode .billing-inline-card,
.dark-mode .billing-plan-price { border-color: var(--line); }
.dark-mode .billing-inline-card { color: var(--ink); background: #18243a; }
.dark-mode .billing-plan-card { background: #151f30; border-color: #33435b; }
.dark-mode .billing-plan-card.recommended { border-color: #818dff; box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.dark-mode .billing-plan-card li { color: #c4cee0; }
.dark-mode .billing-plan-limit { color: #d0daec; }
.dark-mode .billing-terms-note { color: #b0bfd4; }
.dark-mode .overview-banner { background: #302a1f; border-color: #6a5535; }
.dark-mode .banner-copy strong { color: #fff0ca; }
.dark-mode .banner-copy p { color: #d9c9a8; }
.dark-mode .attention-date { background: #3b301e; color: #ffdc95; }
.dark-mode .attention-date.red { background: #42262e; color: #ffb8b0; }
.dark-mode .attention-date.green { background: #183c32; color: #9aefd0; }
.dark-mode .activity-mark,
.dark-mode .metric-icon,
.dark-mode .global-result-icon { color: #c4ccff; background: #29345f; }
.dark-mode .metric-icon.amber { color: #ffdc95; background: #3b301e; }
.dark-mode .metric-icon.green { color: #9aefd0; background: #183c32; }
.dark-mode .metric-icon.red { color: #ffb8b0; background: #42262e; }
.dark-mode .data-table tbody tr { background: #151f30; }
.dark-mode .data-table th { color: #bdc9dc; background: #172337; }
.dark-mode .data-table td { color: #d7e0ef; }
.dark-mode .data-table tbody tr:hover { background: #1e2a3e; }
.dark-mode .report-note,
.dark-mode .report-preview-note,
.dark-mode .inline-info-note,
.dark-mode .settings-note,
.dark-mode .table-footnote { color: #b6c4d9; }
.dark-mode .inline-info-note { background: #1b293d; border-color: #3a4b65; }
.dark-mode .field-note { color: #aebbd0; }
.dark-mode .field label { color: #dce5f4; }
.dark-mode .field input,
.dark-mode .field select,
.dark-mode .field textarea,
.dark-mode .inline-search input,
.dark-mode .searchbox input,
.dark-mode .view-toolbar select,
.dark-mode .filter-control select { background: #0f1827; color: #edf3ff; border-color: #40516a; }
.dark-mode .field input:focus,
.dark-mode .field select:focus,
.dark-mode .field textarea:focus,
.dark-mode .inline-search input:focus,
.dark-mode .searchbox input:focus,
.dark-mode .filter-control select:focus { border-color: #96a3ff; box-shadow: 0 0 0 3px rgba(135,149,255,.16); }
.dark-mode input::placeholder,
.dark-mode textarea::placeholder { color: #93a3bd; }
.dark-mode option { background: #111b2b; color: #edf3ff; }
.dark-mode .profile-link { background: #141e2e; border-color: #2e3a4f; }
.dark-mode .profile-link strong { color: #eff3fc; }
.dark-mode .profile-link small { color: #aebbd1; }
.dark-mode .settings-tab.active { color: #dbe0ff; background: #29345f; }
.dark-mode .settings-tab:hover { color: #fff; background: #202c40; }
.dark-mode .settings-row p,
.dark-mode .settings-panel > p,
.dark-mode .panel-description,
.dark-mode .page-subtitle,
.dark-mode .metric-foot,
.dark-mode .table-sub,
.dark-mode .task-copy p,
.dark-mode .activity-copy p,
.dark-mode .activity-copy small,
.dark-mode .compliance-copy p,
.dark-mode .property-address,
.dark-mode .property-metrics small,
.dark-mode .attention-main p,
.dark-mode .timeline-row > span:first-child,
.dark-mode .report-card p,
.dark-mode .task-meta small { color: #b4c2d7; }
.dark-mode [style*="color:#596579"],
.dark-mode [style*="color: #596579"] { color: #c1cde0 !important; }
.dark-mode .danger-zone { background: #302128; border-color: #66404a; }
.dark-mode .toast { color: #ecf2fc; background: #182439; border-color: #3c4b64; }

/* Phase 6.1 contrast correction: never put white text on the light lavender brand token. */
.dark-mode .btn-primary,
.dark-mode .billing-recommended {
  color: #ffffff !important;
  background: #5364d6 !important;
  border-color: #6a79ed !important;
  box-shadow: 0 5px 16px rgba(52, 70, 174, .28);
}
.dark-mode .btn-primary:hover {
  color: #ffffff !important;
  background: #4657c8 !important;
  border-color: #7e8bfb !important;
  box-shadow: 0 8px 22px rgba(52, 70, 174, .34);
}
.dark-mode .btn-primary:focus-visible,
.dark-mode .billing-recommended:focus-visible { outline-color: #c1c8ff; }
.dark-mode .status-breakdown-track,
.dark-mode .status-chart-track,
.dark-mode .progress-track,
.dark-mode .usage-track,
.dark-mode .timeline-track,
.dark-mode .trial-progress { border: 1px solid #3a4a63; }
.dark-mode .status-breakdown-track span,
.dark-mode .status-chart-track span { filter: saturate(.98) brightness(1.12); }
.dark-mode .status-footnote,
.dark-mode .table-footnote,
.dark-mode .settings-note,
.dark-mode .billing-terms-note,
.dark-mode .report-note,
.dark-mode .report-preview-note { color: #c0cde0 !important; }
.dark-mode .field-note,
.dark-mode .field small,
.dark-mode .filter-reset,
.dark-mode .table-sub,
.dark-mode .task-meta,
.dark-mode .activity-copy small { color: #bac8dd; }
.dark-mode .empty-state p,
.dark-mode .empty-state small,
.dark-mode .report-card p,
.dark-mode .billing-empty p,
.dark-mode .invoice-panel p { color: #bdc9dd; }
.dark-mode .billing-plan-price strong,
.dark-mode .billing-plan-card h3,
.dark-mode .pricing-page-price strong { color: #f1f4fd; }
.dark-mode .data-table .table-main,
.dark-mode .property-card h3,
.dark-mode .report-card h3,
.dark-mode .settings-row strong { color: #eff3fc; }
.dark-mode .profile-link:hover { background: #202d43; border-color: #50617d; }
.dark-mode .mock-preview-tab.active::after { background: #5967db; }

@keyframes phase6-frame-breathe { 0%,100% { transform: rotate(1.15deg) translateY(2px); opacity: .52; } 50% { transform: rotate(.55deg) translateY(-3px); opacity: .95; } }
@keyframes phase6-tab-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes phase6-metric-refresh { 0% { opacity: .55; translate: 0 7px; scale: .985; } 100% { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes phase6-row-refresh { 0% { opacity: .45; translate: 0 7px; } 100% { opacity: 1; translate: 0 0; } }

/* Smaller laptop and tablet layout improvements */
@media (max-width: 1120px) {
  .welcome-panel { grid-template-columns: minmax(0,1fr) minmax(270px,.9fr); gap: 26px; padding: 28px; }
  .welcome-copy h2 { font-size: clamp(24px, 2.8vw, 32px); }
  .hero-grid { grid-template-columns: minmax(0,.92fr) minmax(420px,1.08fr); }
}
@media (max-width: 900px) {
  .welcome-panel { grid-template-columns: 1fr; gap: 25px; }
  .welcome-copy h2 { max-width: 690px; }
  .welcome-copy > p { max-width: 690px; }
  .welcome-visual { grid-template-columns: 1fr; padding: 0; }
  .welcome-check-card { max-width: 100%; }
  .welcome-lower-grid { gap: 12px; }
  .local-preview-notice { margin: 12px 14px 0; }
}
@media (max-width: 680px) {
  /* Keep the local-mode disclosure readable on phones. A flex row made the
     preview link compete with the disclosure copy, creating an overly tall,
     narrow text column at 320–390px. Use a compact two-row grid instead. */
  .local-preview-notice { display: grid; grid-template-columns: 8px minmax(0,1fr); align-items: start; gap: 4px 10px; padding: 11px; }
  .local-preview-dot { grid-column: 1; grid-row: 1 / span 2; margin-top: 4px; }
  .local-preview-notice > div { grid-column: 2; min-width: 0; }
  .local-preview-example { grid-column: 2; justify-self: start; margin-left: 0; white-space: normal; }
  .welcome-panel { min-height: 0; padding: 22px 18px; border-radius: 16px; gap: 22px; }
  .welcome-copy h2 { font-size: clamp(25px, 7vw, 31px); margin-top: 13px; }
  .welcome-copy > p { font-size: 12px; line-height: 1.7; }
  .welcome-actions { align-items: stretch; flex-direction: column; margin-top: 18px; }
  .welcome-actions .btn { width: 100%; justify-content: center; }
  .welcome-check-card { grid-template-columns: 38px minmax(0,1fr) 26px; gap: 10px; padding: 12px; border-radius: 12px; }
  .welcome-check-icon { width: 36px; height: 36px; border-radius: 8px; }
  .welcome-check-card strong { font-size: 11px; }
  .welcome-check-card small { font-size: 11px; }
  .welcome-step-state { width: 25px; height: 25px; }
  .welcome-lower-grid { grid-template-columns: 1fr; }
  .welcome-next-card { padding: 16px; }
  .hero { padding-top: 37px; padding-bottom: 49px; }
  .hero-grid { gap: 33px; }
  .mock-window { animation-duration: 8s; }
  .value-strip-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 16px; gap: 10px; }
  .value-chip-list { width: 100%; }
}
@media (max-width: 380px) {
  /* All lease-state filters must remain discoverable without a clipped tab.
     Two tidy rows are easier to understand than a horizontal strip showing
     only part of the final label on the narrowest phones. */
  .lease-filter-bar .filter-tabs { overflow: visible; flex-wrap: wrap; row-gap: 4px; }
  .welcome-panel { padding: 18px 14px; }
  .welcome-check-card { grid-template-columns: 33px minmax(0,1fr) 24px; gap: 8px; padding: 10px; }
  .welcome-check-icon { width: 32px; height: 32px; }
  .welcome-check-card strong { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy,
  .motion-enabled .motion-reveal.is-visible,
  .hero-visual::before,
  .hero-visual::after,
  .mock-window,
  .mock-nav.active::after,
  .mock-chip,
  .visual-note,
  .welcome-check-card { animation: none !important; translate: none !important; }
  .mock-window { transform: none; }
  .mock-app.is-updating,
  .mock-app.is-updating .mock-metric,
  .mock-app.is-updating .mock-deadline,
  .mock-preview-tab.active::after { animation: none !important; }
  .btn,
  .icon-btn,
  .filter-tab,
  .settings-tab,
  .app-nav a,
  .panel-link,
  .subtle-action,
  .profile-link,
  .mock-nav,
  .value-chip,
  .benefit-card,
  .price-card,
  .pricing-page-card,
  .welcome-check-card { transition: none !important; }
}

/* A concise, useful reminder below the empty-state setup card. Keeps mobile onboarding focused. */
.empty-guide-strip { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-top: 16px; padding: 17px 20px; border-color: #e1e7f1; background: rgba(255,255,255,.85); box-shadow: 0 4px 14px rgba(30,45,80,.035); }
.empty-guide-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: #137a60; background: #e6f7f0; }
.empty-guide-icon .icon { width: 18px; height: 18px; }
.empty-guide-copy { min-width: 0; }
.empty-guide-copy strong { display: block; color: var(--ink); font-size: 12px; line-height: 1.4; }
.empty-guide-copy p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.empty-guide-link { display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; color: var(--brand); font-size: 11px; font-weight: 600; white-space: nowrap; }
.empty-guide-link .icon { width: 14px; height: 14px; }
.empty-guide-link:hover { gap: 10px; }
.dark-mode .empty-guide-strip { background: #141e2e; border-color: #34435a; }
.dark-mode .empty-guide-copy strong { color: #eff3fc; }
.dark-mode .empty-guide-copy p { color: #c0cbe0; }
.dark-mode .empty-guide-icon { color: #72dfb8; background: #173a32; }
@media (max-width: 680px) {
  .empty-guide-strip { grid-template-columns: 34px minmax(0,1fr); align-items: start; gap: 10px; margin-top: 12px; padding: 14px; }
  .empty-guide-icon { width: 32px; height: 32px; }
  .empty-guide-link { grid-column: 2; justify-self: start; margin-top: 2px; white-space: normal; }
}

/* Phase 6.2 — release-quality corrections from an additional responsive/contrast audit. */
/* The later responsive layer must never re-introduce a fixed-width second hero column on phones. */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .hero-copy { width: 100%; min-width: 0; max-width: 720px; }
  .hero-visual { width: min(100%, 720px); min-width: 0; margin-inline: auto; }
}
@media (max-width: 680px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .hero-copy > p { max-width: 100%; }
  .hero h1 { max-width: 100%; overflow-wrap: normal; }
}

/* The old floating note sat on top of the dashboard's final row. Keep it in the visual flow. */
.visual-note {
  position: relative;
  inset: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  max-width: 100%;
  margin: 14px 0 0 auto;
  padding: 10px 13px;
  border-color: rgba(221, 227, 240, .94);
  box-shadow: 0 8px 25px rgba(25, 36, 61, .065);
  line-height: 1.45;
}
.visual-note-mark {
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: #eef0ff;
  color: #4857d9;
  font-size: 13px;
}
.visual-note strong { display: inline-block; margin-bottom: 1px; }
@media (max-width: 680px) {
  .visual-note { margin: 11px 0 0 auto; font-size: 11px; }
}

/* Explicitly tune pale billing states for dark appearance; light-on-light was failing contrast. */
.dark-mode .trial-status-card {
  color: var(--ink);
  border-color: #35445d;
  background: radial-gradient(ellipse at 94% 4%, rgba(95, 110, 220, .12), transparent 42%), linear-gradient(115deg, #19263a 0%, #151f30 70%, #172d2b 100%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
}
.dark-mode .trial-status-icon {
  background: #202e47;
  color: #c5cdff;
  border-color: #415271;
}
.dark-mode .trial-status-copy .eyebrow { color: #bfc9ff; }
.dark-mode .trial-status-copy h2 { color: #f1f4fd; }
.dark-mode .trial-status-copy p { color: #c1cde0; }
.dark-mode .trial-progress { background: #202d43; border-color: #43536d; }
.dark-mode .trial-progress-meta { color: #bfcbdf; }
.dark-mode .trial-progress-meta strong { color: #d7dcff; }
.dark-mode .trial-fairness-note {
  background: #17352e;
  border-color: #2e6754;
}
.dark-mode .trial-fairness-note p { color: #bfdfd2; }
.dark-mode .trial-fairness-note strong { color: #9ce9cb; }
.dark-mode .trial-fairness-note > .icon,
.dark-mode .trial-fairness-note > span { color: #8ce2bd; }
.dark-mode .billing-plan-limit {
  background: #202b3e;
  color: #c9d4e7;
  border: 1px solid #34455f;
}
.dark-mode .billing-plan-card.recommended .billing-plan-limit {
  background: #282f55;
  color: #dbe0ff;
  border-color: #48548e;
}
.dark-mode .pricing-page-card .plan-capacity,
.dark-mode .plan-capacity { background: #202b3e; color: #d0daec; border: 1px solid #35455d; }
.dark-mode .plan-tier-label { background: #26334a; color: #d4deef; }

/* No hover-only information; clear keyboard focus and tap feedback on every device. */
.mock-preview-tab:focus-visible,
.site-nav a:focus-visible,
.hero-actions .btn:focus-visible,
.value-chip:focus-visible,
.benefit-card a:focus-visible {
  outline: 3px solid #8e99ff;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .hero-visual::before, .hero-visual::after, .mock-window, .visual-note { animation: none !important; }
}


/* Phase 6.3 — prevent transient low-contrast combinations during theme switches. */
.theme-switching *,
.theme-switching *::before,
.theme-switching *::after {
  transition: none !important;
}
/* Settings separators use a hard-coded light surface in the base stylesheet. */
.dark-mode .settings-divider {
  background: var(--line, #2a3547) !important;
}


/* Phase 6.4 — close audited theme, calendar-layout and billing-contrast defects.
   Scoped to workspace UI; avoids changing public marketing theme or auth story. */

/* Calendar toolbar was missing its component styles, leaving labels and controls stacked. */
.calendar-filter-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 19px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.calendar-filter-title { min-width: 160px; flex: 0 1 auto; }
.calendar-filter-title h2 { margin: 0; }
.calendar-filter-title p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.calendar-filter-controls {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) minmax(135px, .9fr) auto;
  gap: 10px;
  align-items: end;
  width: min(100%, 760px);
  min-width: 0;
}
.calendar-filter-controls .filter-control { min-width: 0; }
.calendar-filter-controls .btn { align-self: end; min-height: 40px; white-space: nowrap; }
.calendar-guidance-body { padding: 0 20px 20px; color: var(--muted); font-size: 12px; line-height: 1.7; max-width: 1100px; }

/* Do not use low-contrast pale label colors on pale filter or avatar surfaces. */
.filter-count { background: #eef1f7; color: #46536a; }
.filter-reset { transition: background .18s ease, border-color .18s ease, color .18s ease; }
.plan-scope-icon { color: #066b4d; }
.welcome-copy .welcome-note { color: #5d6b80; }
.welcome-check-card small { color: #5e6d82; }
.welcome-step-state { color: #596880; }
.contact-footnote { color: #626f84; }
.auth-legal-line { color: #657187; }
.auth-terms-checkbox small { color: #68758b; }
.auth-footer { color: #657187; }
.auth-footer a { color: #59677d; }

/* Generic empty-state class is used by several routes, not only the enhanced variant. */
.workspace-body.dark-mode .empty-state {
  background: linear-gradient(145deg, #172235 0%, #121c2c 100%);
  border-color: #40516a;
  color: var(--ink);
}
.workspace-body.dark-mode .empty-state h3 { color: #eff3fc; }
.workspace-body.dark-mode .empty-state p,
.workspace-body.dark-mode .empty-state small { color: #c1cde0; }
.workspace-body.dark-mode .empty-state .empty-icon { background: #29345f; color: #c6ceff; }

/* Lease filters in dark mode previously retained a solid white strip and pale active tab. */
.workspace-body.dark-mode .filter-bar {
  background: #151e2d;
  border-color: #2a3547;
  color: #ecf0fa;
}
.workspace-body.dark-mode .lease-filter-controls {
  background: #111a29;
  border-color: #2a3547;
}
.workspace-body.dark-mode .filter-control > span { color: #bdc9dd; }
.workspace-body.dark-mode .filter-tab { color: #c1cde0; }
.workspace-body.dark-mode .filter-tab:hover { background: #202c40; color: #f4f6ff; }
.workspace-body.dark-mode .filter-tab.active {
  background: #29345f;
  color: #e1e5ff;
  border-color: #465486;
}
.workspace-body.dark-mode .filter-count { background: #33415a; color: #e0e7f5; }
.workspace-body.dark-mode .filter-reset {
  background: #172337;
  border-color: #3a4962;
  color: #cbd5e7;
}
.workspace-body.dark-mode .filter-reset:hover:not(:disabled) {
  background: #24324a;
  border-color: #6372a6;
  color: #f4f6ff;
}
.workspace-body.dark-mode .filter-control select {
  background: #101827;
  color: #e5ebf7;
  border-color: #3a4962;
}
.workspace-body.dark-mode .inline-search .icon { color: #aab8ce; }

/* A route eyebrow should remain legible without competing with the page title. */
.workspace-body.dark-mode .page-eyebrow { color: #bdc9dd; }
.workspace-body.dark-mode .page-eyebrow .icon { color: #b9c4ff; }
.workspace-body.dark-mode .help-link { color: #b8c6dc; }
.workspace-body.dark-mode .help-link:hover { background: #202c40; color: #fff; }
.workspace-body.dark-mode .avatar {
  background: #29345f;
  color: #d0d7ff;
  border: 1px solid #455486;
}
.workspace-body.dark-mode .profile-link { background: #151e2d; border-color: #2a3547; }
.workspace-body.dark-mode .profile-copy small { color: #bdc9dd; }

/* Explicitly style the date view in both themes. */
.workspace-body.dark-mode .calendar-filter-bar {
  background: #151e2d;
  border-color: #2a3547;
}
.workspace-body.dark-mode .calendar-filter-title p { color: #aab8ce; }
.workspace-body.dark-mode .calendar-guidance-body { color: #bdc9dd; }

/* Billing empty state and capacity badges must not remain pale in dark mode. */
.workspace-body.dark-mode .trial-status-card.local-billing-empty {
  color: #ecf0fa;
  background: radial-gradient(circle at 95% 8%, rgba(119,132,255,.15), transparent 36%), linear-gradient(135deg, #18243a, #141e2e);
  border-color: #354660;
}
.workspace-body.dark-mode .local-billing-empty .trial-status-copy h2 { color: #eff3fc; }
.workspace-body.dark-mode .local-billing-empty .trial-status-copy p { color: #c2cde0; }
.workspace-body.dark-mode .local-billing-empty .eyebrow { color: #b9c4ff; }
.workspace-body.dark-mode .local-billing-empty .trial-status-icon {
  background: #29345f;
  color: #d0d6ff;
  border-color: #455486;
}
.workspace-body.dark-mode .billing-plan-limit {
  background: #202d43;
  border: 1px solid #40516a;
  color: #d9e2f2;
}
.workspace-body.dark-mode .billing-plan-card.recommended .billing-plan-limit {
  background: #27345a;
  border-color: #5665a1;
  color: #e2e6ff;
}

@media (max-width: 980px) {
  .calendar-filter-bar { align-items: stretch; flex-direction: column; gap: 13px; }
  .calendar-filter-title { min-width: 0; }
  .calendar-filter-controls { width: 100%; max-width: none; }
}
@media (max-width: 680px) {
  .calendar-filter-bar { padding: 15px 13px; gap: 13px; }
  .calendar-filter-controls { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .calendar-filter-controls .btn { width: 100%; justify-content: center; }
  .calendar-guidance-body { padding: 0 15px 16px; font-size: 11px; }
  .workspace-body.dark-mode .calendar-filter-bar { padding: 15px 13px; }
}


/* Phase 6.5 — remaining contrast and narrow-header corrections from rendered audits. */
.field-hint { color: #5c6a80; }
.table-footnote { color: #5f6d82; }
.workspace-body.dark-mode .table-footnote { color: #aab8ce; }
.workspace-body.dark-mode .compliance-stat small { color: #bdc9dd; }
/* Desktop sidebar logo is inverted in dark mode; mirror that behavior in the mobile top bar. */
.workspace-body.dark-mode .mobile-brand img { filter: brightness(0) invert(1); }


/* Pointer-responsive depth is deliberately subtle: the product preview follows the cursor,
   rather than performing a one-off tilt on hover. Touch and reduced-motion users are unaffected. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero-visual:hover .mock-window {
    transform: perspective(1300px) rotateY(calc(-.4deg + var(--phase6-tilt-y, 0deg))) rotateX(calc(.2deg + var(--phase6-tilt-x, 0deg))) translateY(-3px) scale(1.002);
  }
}
.hero-copy > .hero-kicker,
.hero-copy > h1,
.hero-copy > p,
.hero-copy > .hero-actions,
.hero-copy > .hero-footnote,
.hero-copy > .hero-proof { will-change: opacity, transform; }
.hero-copy > .hero-footnote { animation: phase6-copy-in .56s var(--ease-premium) .3s both; }
.hero-copy > .hero-proof { animation: phase6-copy-in .56s var(--ease-premium) .38s both; }
@media (prefers-reduced-motion: reduce) {
  .hero-copy > .hero-kicker, .hero-copy > h1, .hero-copy > p,
  .hero-copy > .hero-actions, .hero-copy > .hero-footnote, .hero-copy > .hero-proof {
    animation: none !important; opacity: 1 !important; transform: none !important; translate: none !important; filter: none !important; will-change: auto;
  }
  .mock-window, .hero-visual:hover .mock-window { transform: none !important; transition: none !important; }
}


/* Phase 6.6 — contrast repair from screenshot-led dark-mode inspection. */
.workspace-body.dark-mode .banner-action { color: #ffdc93; }
.workspace-body.dark-mode .banner-action:hover { color: #fff0ca; }
.workspace-body.dark-mode .sample-badge { color: #d7e0ef; background: #1b293d; border-color: #465671; }
.workspace-body.dark-mode .sample-badge:before { background: #ffd27a; }


/* Phase 6.7 — contrast repairs discovered by checking all populated routes in both themes. */
.workspace-body.dark-mode .activity-row time,
.workspace-body.dark-mode .property-foot > span { color: #bac8dd; }
/* The report scope line was borderline under normal-text contrast on its pale surface. */
.report-preview-note > span:last-child { color: #5d6a80; }
.workspace-body.dark-mode .report-preview-note > span:last-child { color: #c0cce0; }
/* The footer is a useful action note, not a repeated local-mode warning. */
.table-footnote { gap: 12px; }
.table-footnote > span { min-width: 0; }
@media (max-width: 680px) {
  .table-footnote { align-items: flex-start; flex-direction: column; gap: 5px; }
}

/* Completed tasks should read as completed, not become too faint to read. */
.workspace-body .task-row.done { opacity: 1; background: #f7f9fc; }
.workspace-body .task-row.done .task-copy strong { color: #596579; text-decoration: line-through; }
.workspace-body.dark-mode .task-row.done { background: rgba(149, 164, 188, .08); }
.workspace-body.dark-mode .task-row.done .task-copy strong { color: #c0cce0; }

/* Phase 6.8 — public-surface contrast defects found beyond the workspace. */
.cta-band p { color: #c2cde0; }
.article-main .hero-actions > .btn-primary,
.content-hero .hero-actions > .btn-primary { color: #fff; text-decoration: none; }
.article-main .hero-actions > .btn-primary:hover,
.content-hero .hero-actions > .btn-primary:hover { color: #fff; text-decoration: none; }

/* Phase 6.9 — complete the interaction states that were present in markup but lacked component styling. */
.context-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: 13px 0 0;
  padding: 13px 15px;
  border: 1px solid #dce4f4;
  border-radius: 12px;
  background: linear-gradient(110deg, #f7f9ff, #fbfcff);
}
.context-callout > span {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #4b55d1;
  background: #e9edff;
}
.context-callout > span .icon { width: 17px; height: 17px; }
.context-callout > div { min-width: 0; flex: 1; }
.context-callout strong { display: block; color: #202b43; font-size: 12px; line-height: 1.45; }
.context-callout p { margin: 3px 0 0; color: #5d6a80; font-size: 11px; line-height: 1.55; }
.context-callout > .btn { flex: 0 0 auto; }

.empty-inline-state {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: 8px 0;
  padding: 14px;
  border: 1px dashed #d8e0ed;
  border-radius: 12px;
  background: #fafbfe;
}
.empty-inline-state .empty-icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  margin: 0;
  border-radius: 12px;
  background: #edf0ff;
  color: #4b55d1;
}
.empty-inline-state .empty-icon .icon { width: 17px; height: 17px; }
.empty-inline-state > div { min-width: 0; flex: 1; }
.empty-inline-state strong { display: block; color: #25314a; font-size: 11px; line-height: 1.45; }
.empty-inline-state p { margin: 3px 0 0; color: #5d6a80; font-size: 11px; line-height: 1.55; }

/* Task counts are small summary cards; the note gets its own full-width line. */
.task-summary-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 14px;
}
.task-summary-strip > div:not(.task-summary-note) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid #e1e7f1;
  border-radius: 12px;
  background: #fff;
}
.task-summary-strip > div:not(.task-summary-note) span {
  color: #5d6a80;
  font-size: 11px;
  font-weight: 600;
}
.task-summary-strip > div:not(.task-summary-note) strong {
  color: #202b43;
  font-size: 22px;
  line-height: 1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.task-summary-note {
  grid-column: 1 / -1;
  padding: 9px 12px;
  border: 1px solid #e6eaf2;
  border-radius: 8px;
  background: #f7f9fc;
  color: #5e6a80;
  font-size: 11px;
  line-height: 1.55;
}

/* Detail panels use the same rhythm as the main workspace cards. */
.entity-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 2px 0 20px;
}
.entity-detail-grid .detail-cell { min-width: 0; background: #fbfcfe; }
.entity-detail-grid .detail-cell strong { overflow-wrap: anywhere; line-height: 1.45; }
.entity-linked-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px 0;
  border-top: 1px solid #e8ecf3;
}
.entity-linked-row > div { min-width: 0; flex: 1; }
.entity-linked-row strong { display: block; color: #25314a; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.entity-linked-row small { display: block; margin-top: 3px; color: #5d6a80; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.entity-linked-row > .btn { flex: 0 0 auto; }
.task-action-panel { display: grid; gap: 4px; }
.task-action-status { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 0 0 12px; color: #5d6a80; font-size: 11px; }
.task-action-status > span:last-child { font-variant-numeric: tabular-nums; }
.entity-action-row { width: 100%; text-align: left; }
.entity-action-row > span { min-width: 0; flex: 1; }
.entity-action-row > .icon { flex: 0 0 17px; width: 17px; height: 17px; }
.destructive-confirm { padding: 4px 0 0; }
.confirm-icon { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 0 14px; border: 1px solid #f2d1ce; border-radius: 12px; background: #fff0ee; color: #b42318; }
.confirm-icon .icon { width: 20px; height: 20px; }
.destructive-confirm > p { margin: 10px 0; color: #505d72; font-size: 12px; line-height: 1.65; }
.destructive-confirm > p strong { color: #202b43; }
.destructive-confirm > ul { margin: 10px 0 14px; padding-left: 19px; color: #505d72; font-size: 11px; line-height: 1.7; }
.form-error { margin: 12px 0 0; padding: 10px 12px; border: 1px solid #f1cdca; border-radius: 8px; background: #fff4f3; color: #a12620; font-size: 11px; line-height: 1.55; }
.form-error[hidden] { display: none !important; }
.document-title-cell { display: flex; align-items: flex-start; gap: 9px; min-width: 190px; }
.document-title-cell > .icon { width: 17px; height: 17px; margin-top: 2px; color: #6875d9; }
.document-title-cell > span { min-width: 0; }
.selected-plan-note { margin: 0; padding: 10px 12px; border: 1px solid #dfe5ff; border-radius: 8px; background: #f5f7ff; color: #46516d; font-size: 11px; line-height: 1.55; }

.workspace-body.dark-mode .context-callout { background: linear-gradient(110deg, #182438, #1a2639); border-color: #354760; }
.workspace-body.dark-mode .context-callout > span { color: #c6ceff; background: #29345f; }
.workspace-body.dark-mode .context-callout strong,
.workspace-body.dark-mode .empty-inline-state strong,
.workspace-body.dark-mode .task-summary-strip > div:not(.task-summary-note) strong,
.workspace-body.dark-mode .entity-linked-row strong,
.workspace-body.dark-mode .destructive-confirm > p strong { color: #edf2fc; }
.workspace-body.dark-mode .context-callout p,
.workspace-body.dark-mode .empty-inline-state p,
.workspace-body.dark-mode .task-summary-strip > div:not(.task-summary-note) span,
.workspace-body.dark-mode .task-summary-note,
.workspace-body.dark-mode .entity-linked-row small,
.workspace-body.dark-mode .task-action-status,
.workspace-body.dark-mode .destructive-confirm > p,
.workspace-body.dark-mode .destructive-confirm > ul { color: #b7c4d9; }
.workspace-body.dark-mode .empty-inline-state { background: #141f30; border-color: #35445b; }
.workspace-body.dark-mode .empty-inline-state .empty-icon { background: #29345f; color: #c6ceff; }
.workspace-body.dark-mode .task-summary-strip > div:not(.task-summary-note) { background: #151f2e; border-color: #344158; }
.workspace-body.dark-mode .task-summary-note { background: #182336; border-color: #344158; }
.workspace-body.dark-mode .entity-detail-grid .detail-cell { background: #131d2b; border-color: #344158; }
.workspace-body.dark-mode .entity-linked-row { border-color: #344158; }
.workspace-body.dark-mode .confirm-icon { background: #3a242b; border-color: #62404b; color: #ffb4ac; }
.workspace-body.dark-mode .form-error { color: #ffc1ba; background: #3a242b; border-color: #68414b; }
.workspace-body.dark-mode .document-title-cell > .icon { color: #aab5ff; }

@media (max-width: 680px) {
  .context-callout { align-items: flex-start; flex-wrap: wrap; }
  .context-callout > div { flex-basis: calc(100% - 48px); }
  .context-callout > .btn { margin-left: 46px; }
  .task-summary-strip { gap: 8px; }
  .task-summary-strip > div:not(.task-summary-note) { padding: 10px 11px; }
  .task-summary-strip > div:not(.task-summary-note) span { font-size: 11px; }
  .task-summary-strip > div:not(.task-summary-note) strong { font-size: 20px; }
  .entity-detail-grid { gap: 8px; }
  .entity-detail-grid .detail-cell { padding: 10px; }
  .entity-linked-row { align-items: flex-start; }
  .entity-linked-row > .btn { max-width: 120px; white-space: normal; }
}
@media (max-width: 360px) {
  .task-summary-strip { grid-template-columns: minmax(0, 1fr); }
  .task-summary-note { grid-column: auto; }
  .entity-detail-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Phase 6.10 — keep inline actions genuinely inline and make calendar metadata feel intentional. */
.subtle-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  white-space: nowrap;
  line-height: 1.35;
}
.subtle-action .icon { display: block; width: 13px; height: 13px; flex: 0 0 auto; }
.event-type-dot {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-left: 5px;
  padding: 2px 6px;
  border: 1px solid #dfe5f1;
  border-radius: 999px;
  background: #f7f9fd;
  color: #5b6880;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  vertical-align: middle;
  white-space: nowrap;
}
.optional-label { color: #5b6678; font-size: 11px; font-weight: 600; }
.calendar-guidance { margin-top: 16px; }
.calendar-guidance .panel-head { border-bottom: 1px solid var(--line); }
.calendar-guidance-body { max-width: none; padding: 15px 20px 18px; color: #5d6a80; font-size: 11px; line-height: 1.75; }
.workspace-body.dark-mode .event-type-dot { color: #c3cee0; background: #182437; border-color: #3a4960; }
.workspace-body.dark-mode .optional-label { color: #b5c0d3; }
.workspace-body.dark-mode .calendar-guidance-body { color: #bac7db; }
@media (max-width: 680px) {
  .calendar-guidance-body { padding: 12px 15px 15px; font-size: 11px; }
  .event-type-dot { margin-left: 3px; font-size: 11px; }
}


/* Phase 7 — theme-safe dynamic copy. Keep text colors in the design system,
   not hard-coded into template HTML, so light/dark surfaces stay consistent. */
.tenant-count-meta { margin-top: 3px; color: var(--muted); font-size: 11px; }
.detail-note { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.detail-history-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.field-optional { color: var(--muted); font-size: inherit; font-weight: 500; }
.workspace-body.dark-mode .drawer-section-title { color: #bac6d9; }
.workspace-body.dark-mode .danger-zone h3 { color: #ffb4ab; }
.workspace-body.dark-mode .danger-zone p { color: #c1ccdd; }
.workspace-body.dark-mode .btn-danger { color: #ffb4ab; background: #35232b; border-color: #69414b; }
.workspace-body.dark-mode .btn-danger:hover { background: #452832; border-color: #80515d; }

/* Phase 7.1 — honest, useful first-run team access state. */
.team-next-steps {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 16px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(120deg, var(--surface-2), var(--surface));
}
.team-next-steps-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--brand);
  background: var(--brand-soft);
}
.team-next-steps-icon .icon { width: 20px; height: 20px; }
.team-next-steps h3 { margin: 1px 0 5px; font-size: 13px; line-height: 1.4; }
.team-next-steps p { margin: 0; max-width: 720px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.team-next-steps-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.local-owner-card { margin: 14px 0 16px; }
.local-owner-card .team-member-copy small { max-width: 100%; }
.inline-info-note strong { display: inline-block; margin-bottom: 3px; color: var(--ink); }
.workspace-body.dark-mode .team-next-steps {
  background: linear-gradient(120deg, #172338, #131e2e);
  border-color: var(--line-strong);
}
.workspace-body.dark-mode .team-next-steps-icon { color: #b9c2ff; background: rgba(113, 126, 255, .16); }
.workspace-body.dark-mode .inline-info-note strong { color: var(--ink); }
@media (max-width: 560px) {
  .team-next-steps { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 13px; }
  .team-next-steps-icon { width: 34px; height: 34px; border-radius: 8px; }
  .team-next-steps-actions { align-items: stretch; }
  .team-next-steps-actions .btn { flex: 1 1 100%; justify-content: center; }
}


/* Phase 7 — correct the cascade so the entrance remains explicit and the ongoing motion
   enhances depth without moving interactive click targets around the page. */
.hero-visual .mock-window {
  animation: phase6-window-appear .7s .12s both,
             phase7-window-breathe 6.6s .82s ease-in-out infinite;
  will-change: opacity, filter, box-shadow;
}
@keyframes phase7-window-breathe {
  0%, 100% { box-shadow: 0 24px 60px rgba(32,44,83,.13), 0 3px 10px rgba(32,44,83,.045); }
  50% { box-shadow: 0 30px 68px rgba(32,44,83,.17), 0 5px 14px rgba(32,44,83,.065); }
}
.hero-visual .mock-window:hover,
.hero-visual .mock-window:focus-within { animation-play-state: paused, paused; }

/* Give the autoplaying product preview a real user control, not animation that can only be
   interrupted by hovering over it. The control is hidden by JS when reduced motion is on. */
.mock-preview-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex: 0 0 auto; }
.mock-autoplay-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 27px; padding: 4px 7px; border: 1px solid #e1e6f0; border-radius: 7px;
  background: rgba(255,255,255,.92); color: #596579; font: inherit; font-size: 9px;
  font-weight: 750; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.mock-autoplay-toggle:hover { color: var(--brand); border-color: #cbd2fa; background: #f8f9ff; }
.mock-autoplay-toggle:active { transform: scale(.97); }
.mock-autoplay-toggle:focus-visible { outline: 3px solid #9ba5ff; outline-offset: 2px; }
.mock-autoplay-toggle[hidden] { display: none !important; }
.mock-autoplay-toggle .icon { width: 12px; height: 12px; }
.nav-trial-label, .nav-cta-label { display: inline-flex; white-space: nowrap; }
.nav-trial-short, .nav-cta-short { display: none; }
@media (max-width: 380px) {
  .nav-trial-full, .nav-cta-full { display: none; }
  .nav-trial-short, .nav-cta-short { display: inline; }
  .site-actions > .btn { white-space: nowrap; }
  .mock-preview-actions .mock-chip { display: none; }
  .mock-autoplay-toggle { min-height: 25px; padding: 4px 6px; font-size: 8px; }
}
@media (max-width: 680px) {
  .mock-preview-actions { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-visual .mock-window { animation: none !important; will-change: auto; }
}


/* Phase 7.2 — preserve pricing intent across the sign-up journey without implying a purchase. */
.plan-interest-note { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: start; gap: 12px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: linear-gradient(115deg,var(--brand-soft),var(--surface)); }
.plan-interest-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--brand); background: var(--surface); }
.plan-interest-note strong { display: block; color: var(--ink); font-size: 12px; line-height: 1.45; }
.plan-interest-note p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.workspace-body.dark-mode .plan-interest-note { background: linear-gradient(115deg,#1a2541,#141f30); border-color: var(--line-strong); }
.workspace-body.dark-mode .plan-interest-icon { color: #b9c2ff; background: rgba(113,126,255,.14); }
@media (max-width: 640px) { .plan-interest-note { grid-template-columns: 30px minmax(0,1fr); } .plan-interest-note > .btn { grid-column: 2; justify-self: start; } }


/* Phase 9 — commercial honesty: distinguish the price hypothesis from a live offer. */
.pricing-status-note { display:flex; align-items:flex-start; gap:12px; margin:0 0 22px; padding:14px 16px; border:1px solid #d8def4; border-radius:12px; background:linear-gradient(110deg,#f5f6ff 0%,#fff 78%); color:#4c5870; font-size:12px; line-height:1.65; }
.pricing-status-note strong { display:block; margin:0 0 3px; color:#25304a; font-size:12px; line-height:1.45; }
.pricing-status-note p { margin:0; max-width:900px; }
@media (max-width:640px) { .pricing-status-note { padding:12px 13px; margin-bottom:16px; font-size:11px; } }

/* Phase 14 — international audience and workspace preferences */
.audience-section { background: #fbfcff; border-top: 1px solid #edf0f7; border-bottom: 1px solid #edf0f7; }
.audience-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.audience-grid .benefit-card { padding: 22px 20px 23px; }
.audience-grid .benefit-icon { margin-bottom: 17px; }
.audience-grid .benefit-card h3 { font-size: 16px; line-height: 1.35; }
.audience-grid .benefit-card p { font-size: 13px; line-height: 1.65; }
.global-workflow-note { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 22px; padding: 20px 22px; border: 1px solid #e3e8f2; border-radius: 12px; background: #fff; }
.global-workflow-note > div { min-width: 0; }
.global-workflow-note strong { display: block; color: var(--ink); font-size: 14px; }
.global-workflow-note p { max-width: 820px; margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.global-workflow-note .text-link { flex: 0 0 auto; white-space: nowrap; }
.mini-calculator select { width: 100%; min-height: 43px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; padding: 0 12px; color: var(--ink); font: inherit; font-size: 13px; }
.mini-calculator input:focus, .mini-calculator select:focus { border-color: var(--brand); outline: 3px solid rgba(70,86,223,.13); }
@media (max-width: 1080px) {
  .audience-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .audience-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .audience-grid .benefit-card { padding: 20px; }
  .global-workflow-note { align-items: flex-start; flex-direction: column; gap: 10px; padding: 17px; }
  .global-workflow-note .text-link { white-space: normal; padding-left: 0; }
}

/* Phase 16 — longer ISO-currency values need breathing room in compact desktop/tablet layouts.
   Two metric columns are clearer than shrinking monetary values or clipping the final digits. */
@media (min-width: 681px) and (max-width: 1130px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .metric-value strong { font-size: clamp(18px, 6.2vw, 25px); }
}

/* Phase 16 — clearly identify a previously saved amount that cannot be resaved at the selected currency precision. */
.field-note-warning { color: #965600; font-weight: 600; }
.dark-mode .field-note-warning { color: #f0bf69; }


/* Phase 18: evidence-led workflow story and useful resource entry point. */
.hero-tool-link { display:inline-flex; align-items:center; gap:7px; margin-top:13px; color:#414fb8; font-size:12px; font-weight:600; text-underline-offset:4px; }
.hero-tool-link:hover { text-decoration:underline; }
.hero-tool-link:focus-visible { outline:2px solid var(--brand); outline-offset:4px; border-radius:4px; }
.renewal-flow-card { min-width:0; padding:clamp(18px,2.5vw,25px); border-radius:16px; background:linear-gradient(150deg,#fff 0%,#f7f8fe 100%); border-color:#e1e5f2; box-shadow:0 18px 46px rgba(30,43,76,.075); }
.renewal-flow-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; padding-bottom:14px; border-bottom:1px solid #e6e9f2; }
.renewal-flow-head > span:last-child { color:#5b6678; font-size:11px; }
.renewal-flow-title { padding:19px 0 13px; }
.renewal-flow-title > small { color:#5967c3; font-size:11px; font-weight:600; letter-spacing:.13em; }
.renewal-flow-title h3 { margin:7px 0 7px; color:#25304a; font-size:clamp(20px,2vw,25px); line-height:1.18; letter-spacing:-.04em; }
.renewal-flow-title p { margin:0; color:#5c687e; font-size:12px; line-height:1.65; }
.renewal-flow-list { display:grid; gap:9px; list-style:none; padding:0; margin:0; }
.renewal-flow-list li { display:grid; grid-template-columns:30px minmax(0,1fr) auto; gap:11px; align-items:start; padding:13px 12px; border:1px solid #e5e9f2; border-radius:12px; background:#fff; }
.renewal-flow-step { display:grid; place-items:center; width:29px; height:29px; border-radius:8px; background:#eef0ff; color:#4554c0; font-size:11px; font-weight:600; }
.renewal-flow-list strong { display:block; color:#28324a; font-size:12px; line-height:1.45; }
.renewal-flow-list p { margin:4px 0 0; color:#68748a; font-size:11px; line-height:1.6; }
.renewal-flow-list .pill { margin-top:2px; font-size:11px; }
.renewal-flow-note { display:flex; gap:8px; align-items:flex-start; margin-top:13px; padding-top:12px; border-top:1px solid #e6e9f2; color:#69758a; font-size:11px; line-height:1.55; }
.renewal-flow-note .icon { width:15px; height:15px; color:#8b6e2c; }
@media(max-width:640px) { .renewal-flow-card { padding:15px; border-radius:12px; } .renewal-flow-list li { grid-template-columns:28px minmax(0,1fr); gap:9px; padding:11px 9px; } .renewal-flow-list li .pill { grid-column:2; justify-self:start; margin-top:2px; } .renewal-flow-step { width:27px; height:27px; } }
@media(prefers-reduced-motion:reduce) { .hero-tool-link { transition:none; } }

/* Phase 19 · Contextual follow-up actions and workflow clarity */
.drawer-task-count {
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--surface-2, #f3f5fa);
  color: var(--muted, #596579);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  vertical-align: middle;
}
.drawer-task-list { display: grid; gap: 8px; margin: 0 0 12px; }
.drawer-linked-task {
  display: grid;
  grid-template-columns: 28px minmax(0,1fr) 30px;
  align-items: center;
  gap: 9px;
  padding: 10px 8px 10px 10px;
  border: 1px solid var(--line, #e0e5ef);
  border-radius: 8px;
  background: var(--surface, #fff);
}
.drawer-linked-task-state {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand-soft, #edf0ff);
  color: var(--brand, #4b55d1);
}
.drawer-linked-task.is-done .drawer-linked-task-state {
  background: var(--green-soft, #e7f7ef);
  color: var(--green, #087f5b);
}
.drawer-linked-task-copy { min-width: 0; display: grid; gap: 3px; }
.drawer-linked-task-copy strong { font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.drawer-linked-task-copy small { color: var(--muted, #596579); font-size: 11px; line-height: 1.4; }
.drawer-linked-task.is-done .drawer-linked-task-copy strong { color: var(--muted, #596579); text-decoration: line-through; text-decoration-thickness: 1px; }
.drawer-related-empty { margin: 0 0 12px; padding: 12px; color: var(--muted, #596579); background: var(--surface-2, #f7f8fc); border-radius: 8px; font-size: 11px; line-height: 1.55; }
.drawer-create-task { width: 100%; justify-content: center; }
.drawer-related-note { margin-top: 7px; color: var(--muted, #596579); font-size: 11px; line-height: 1.5; }
.dark-mode .drawer-task-count { background: #283345; color: #b2bdcf; }
.dark-mode .drawer-linked-task { background: var(--surface, #171d2b); border-color: var(--line, #333c4e); }
.dark-mode .drawer-related-empty { background: #111a29; }
@media (prefers-reduced-motion: reduce) {
  .drawer-linked-task, .drawer-create-task { transition: none !important; }
}
.field select:disabled { opacity: .76; cursor: not-allowed; background: var(--surface-2, #f3f5fa); }
.field-note a { color: var(--brand, #4b55d1); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }

/* Phase 50: the long header call-to-action ("Explore sample workspace") needs about 408px of
   viewport. The short label previously applied only at 380px and below, so the homepage header
   overflowed the viewport at 381-391px and sat against the screen edge up to ~407px (recent
   iPhone widths). Use the short label up to 410px. Verified by qa/phase50_header_width_sweep.py. */
@media (min-width: 381px) and (max-width: 410px) {
  .nav-trial-full, .nav-cta-full { display: none; }
  .nav-trial-short, .nav-cta-short { display: inline; }
}
