/* UI polish: contrast and component standards */
:root {
  color-scheme: dark;
  --ui-bg: #06131b;
  --ui-bg-2: #0a2230;
  --ui-panel: #fffaf0;
  --ui-panel-2: #f1e8d8;
  --ui-ink: #101820;
  --ui-muted: #4e5b62;
  --ui-soft: #eef7f6;
  --ui-line-dark: rgba(238, 248, 249, 0.16);
  --ui-line-warm: rgba(16, 24, 32, 0.14);
  --ui-teal: #116e68;
  --ui-copper: #d4772f;
  --ui-copper-dark: #9a4e1c;
  --ui-brass: #e2b75b;
  --ui-red: #d92d20;
  --ui-red-dark: #7a1712;
  --ui-green: #248a63;
  --ui-blue: #2b6f91;
  --ui-radius: 8px;
  --ui-shadow-panel: 0 18px 42px rgba(6, 19, 27, 0.18);
  --ui-shadow-deep: 0 24px 64px rgba(0, 0, 0, 0.34);
}

body.portal-body {
  color: var(--ui-ink);
  background-color: var(--ui-bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(180deg, #06131b 0%, #0a2230 48%, #07171f 100%);
  background-size: 42px 42px, 42px 42px, auto;
}

@supports (padding-top: env(safe-area-inset-top)) {
  body.portal-body {
    padding-top: env(safe-area-inset-top);
  }
}

.site-shell {
  width: min(1380px, calc(100% - 32px));
}

.site-header,
.site-footer {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: linear-gradient(135deg, rgba(6, 19, 27, 0.98), rgba(12, 43, 56, 0.96));
  box-shadow: var(--ui-shadow-deep);
}

.site-nav a,
.site-header .action-link {
  border-color: rgba(238, 248, 249, 0.13);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(238, 248, 249, 0.86);
}

.site-nav a:hover,
.site-nav a.is-active,
.site-header .action-link:hover {
  border-color: rgba(226, 183, 91, 0.32);
  background: rgba(226, 183, 91, 0.14);
  color: #fff;
}

.site-header .site-menu .site-nav a,
.site-header .site-menu .site-actions .action-link {
  color: rgba(238, 248, 249, 0.86);
}

.site-header .site-menu .site-nav a.is-active {
  color: #fff;
}

.site-header .site-menu .site-actions .action-link-notice {
  color: #171109;
}

.site-header .action-link-notice,
.site-header .action-link-accent:not(.action-link-paused) {
  border-color: rgba(226, 183, 91, 0.42);
  background: linear-gradient(135deg, #f0bd66, var(--ui-copper));
  color: #171109;
  box-shadow: 0 14px 30px rgba(212, 119, 47, 0.22);
}

.closed-banner {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 16px;
  border-color: rgba(255, 128, 115, 0.24);
  border-left: 4px solid var(--ui-red);
  background: linear-gradient(135deg, rgba(22, 24, 27, 0.98), rgba(10, 34, 48, 0.96));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

.closed-banner strong {
  color: #ff766c;
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  line-height: 1.1;
  text-shadow: none;
  white-space: normal;
}

.closed-banner span {
  color: rgba(255, 244, 235, 0.86);
  font-size: 0.96rem;
  font-weight: 620;
}

.closed-banner-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(255, 244, 235, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
}

.closed-banner-link:hover {
  border-color: rgba(226, 183, 91, 0.38);
  background: rgba(226, 183, 91, 0.14);
}

.primary-button:not(.closed-primary),
button.primary-button:not(.closed-primary) {
  border: 1px solid rgba(226, 183, 91, 0.36);
  background: linear-gradient(135deg, #f0bd66, var(--ui-copper));
  color: #171109;
  box-shadow: 0 16px 34px rgba(212, 119, 47, 0.22);
}

.primary-button:not(.closed-primary):hover,
button.primary-button:not(.closed-primary):hover {
  filter: saturate(1.06);
}

.secondary-button:not(.closed-secondary),
button.secondary-button:not(.closed-secondary) {
  border: 1px solid rgba(238, 248, 249, 0.24);
  background: rgba(255, 255, 255, 0.085);
  color: #fff;
  box-shadow: none;
}

.auth-card-premium .secondary-button,
.auth-card-premium .ghost-button,
.booking-panel .secondary-button,
.summary-panel .secondary-button,
.account-command-center .secondary-button,
.closed-lead-form .secondary-button {
  border-color: var(--ui-line-warm);
  background: #fff;
  color: var(--ui-ink);
}

.closed-primary,
.action-link-paused {
  min-height: 42px;
  padding-inline: 13px;
  border-color: rgba(255, 128, 115, 0.36) !important;
  background: linear-gradient(135deg, var(--ui-red), var(--ui-red-dark)) !important;
  color: #fff !important;
  font-size: 0.92rem;
  font-weight: 850;
  text-transform: none;
  box-shadow: 0 12px 28px rgba(217, 45, 32, 0.2) !important;
}

.section-kicker,
.eyebrow,
.service-badge {
  color: var(--ui-brass);
  font-weight: 900;
}

.closed-lead-panel .section-kicker,
.closed-lead-copy .section-kicker,
.auth-card-premium .section-kicker,
.booking-panel .section-kicker,
.summary-panel .section-kicker,
.account-command-center .section-kicker {
  color: var(--ui-teal);
}

.section-copy,
.panel-copy,
.page-section .hero-lead {
  color: rgba(238, 248, 249, 0.78);
}

.hero-lead,
.page-hero .hero-lead,
.dashboard-hero .hero-lead,
.auth-copy-premium p {
  color: rgba(247, 252, 252, 0.88);
}

.choice-bubble,
.contact-choice-card,
.closed-info-card,
.lean-step-card,
.micro-proof-pill,
.detail-card,
.metric-box,
.timeline-card,
.compact-cta-card,
.booking-card,
.auth-role-card,
.auth-step-card,
.empty-card,
.status-box,
.confidence-box,
.account-command-center,
.booking-panel,
.summary-panel,
.auth-card-premium,
.closed-lead-panel {
  border-color: var(--ui-line-warm);
  background: linear-gradient(180deg, var(--ui-panel), var(--ui-panel-2));
  color: var(--ui-ink);
  box-shadow: var(--ui-shadow-panel);
}

.quick-choice-section {
  padding-top: clamp(30px, 5vw, 64px);
}

.quick-choice-section .section-header h2,
.quick-choice-section .section-copy {
  color: rgba(247, 252, 252, 0.92);
}

.quick-choice-section .section-copy {
  color: rgba(238, 248, 249, 0.76);
}

.quick-choice-section .section-kicker {
  color: var(--ui-brass);
}

.choice-bubble {
  min-height: 186px;
  align-content: start;
  gap: 12px;
}

.choice-bubble::after,
.contact-choice-card::after,
.compact-cta-card::after {
  height: 3px;
  background: linear-gradient(90deg, var(--ui-copper), var(--ui-teal));
}

.choice-bubble strong,
.contact-choice-card strong,
.closed-info-card strong,
.compact-cta-card strong,
.detail-card strong,
.micro-proof-pill strong,
.lean-step-card strong,
.auth-role-card strong,
.auth-step-card strong,
.empty-card h3 {
  color: var(--ui-ink);
}

.choice-bubble p,
.contact-choice-card p,
.closed-info-card p,
.compact-cta-card p,
.detail-card p,
.micro-proof-pill p,
.auth-role-card p,
.auth-step-card p,
.field-help,
.auth-muted,
.card-panel .panel-copy,
.booking-panel .panel-copy,
.summary-panel .panel-copy,
.account-command-center .panel-copy,
.auth-card-premium .panel-copy {
  color: var(--ui-muted);
}

.choice-label,
.choice-bubble span,
.choice-bubble em,
.contact-choice-card span,
.contact-choice-card em,
.closed-info-card span,
.compact-cta-card span,
.detail-card span,
.micro-proof-pill span,
.lean-step-card span {
  color: var(--ui-teal);
}

.choice-bubble > .choice-label {
  color: #6a4d2c;
}

.choice-bubble em {
  color: var(--ui-copper-dark);
}

.service-icon {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(16, 24, 32, 0.16);
  border-radius: 12px;
  background:
    linear-gradient(180deg, #fffdf8, #eadfce);
  color: var(--ui-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 10px 24px rgba(6, 19, 27, 0.12);
}

.choice-bubble .service-icon {
  color: var(--ui-ink);
}

.service-icon::before,
.service-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.service-icon-engine::before {
  width: 24px;
  height: 28px;
  border: 3px solid currentColor;
  border-radius: 6px 6px 10px 10px;
  background:
    linear-gradient(90deg, transparent 0 9px, rgba(16, 24, 32, 0.18) 9px 12px, transparent 12px 100%);
  transform: translateY(-2px);
}

.service-icon-engine::after {
  width: 28px;
  height: 10px;
  border: 3px solid var(--ui-copper-dark);
  border-top: 0;
  border-radius: 0 0 999px 999px;
  background: transparent;
  transform: translateY(16px);
}

.service-icon-diagnostic::before {
  width: 30px;
  height: 30px;
  border: 3px solid currentColor;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, currentColor 0 2px, transparent 2px),
    conic-gradient(from 220deg, transparent 0 70deg, rgba(154, 78, 28, 0.3) 70deg 110deg, transparent 110deg 360deg);
}

.service-icon-diagnostic::after {
  width: 17px;
  height: 3px;
  border-radius: 999px;
  background: var(--ui-copper-dark);
  transform-origin: 2px 50%;
  transform: rotate(-32deg) translate(5px, 2px);
}

.service-icon-wrench::before {
  width: 32px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-34deg);
}

.service-icon-wrench::after {
  width: 15px;
  height: 15px;
  border: 3px solid var(--ui-copper-dark);
  border-right-color: transparent;
  border-radius: 50%;
  background: transparent;
  transform: translate(-12px, -10px) rotate(-34deg);
}

.service-icon-battery::before {
  width: 32px;
  height: 20px;
  border: 3px solid currentColor;
  border-radius: 5px;
  background:
    linear-gradient(90deg, transparent 0 42%, currentColor 42% 50%, transparent 50% 100%);
}

.service-icon-battery::after {
  width: 7px;
  height: 12px;
  border-radius: 0 4px 4px 0;
  background: var(--ui-copper-dark);
  transform: translateX(21px);
}

.service-icon-hydraulic::before {
  width: 34px;
  height: 10px;
  border: 3px solid currentColor;
  border-radius: 999px;
  background: transparent;
  transform: rotate(-22deg);
}

.service-icon-hydraulic::after {
  width: 20px;
  height: 20px;
  border: 3px solid var(--ui-copper-dark);
  border-radius: 5px;
  background: transparent;
  transform: translate(10px, -8px) rotate(-22deg);
}

.service-icon-mount::before {
  width: 30px;
  height: 24px;
  border-left: 4px solid currentColor;
  border-bottom: 4px solid currentColor;
  border-radius: 0 0 0 5px;
  background:
    radial-gradient(circle at 20px 5px, var(--ui-copper-dark) 0 3px, transparent 3px),
    radial-gradient(circle at 20px 17px, var(--ui-copper-dark) 0 3px, transparent 3px);
}

.service-icon-mount::after {
  width: 30px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-35deg) translate(0, 8px);
}

.service-icon-season::before {
  width: 30px;
  height: 24px;
  border: 3px solid currentColor;
  border-top-width: 7px;
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 0 7px, rgba(16, 24, 32, 0.14) 7px 10px, transparent 10px 100%),
    linear-gradient(0deg, transparent 0 8px, rgba(16, 24, 32, 0.14) 8px 11px, transparent 11px 100%);
}

.service-icon-season::after {
  width: 14px;
  height: 14px;
  border: 3px solid var(--ui-copper-dark);
  border-left-color: transparent;
  border-radius: 50%;
  background: transparent;
  transform: translate(10px, 9px) rotate(-35deg);
}

.service-icon-cooling::before {
  width: 27px;
  height: 27px;
  border: 3px solid currentColor;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 5px, rgba(16, 24, 32, 0.12) 5px 7px, transparent 7px);
}

.service-icon-cooling::after {
  width: 28px;
  height: 10px;
  border: 3px solid var(--ui-copper-dark);
  border-top: 0;
  border-radius: 0 0 999px 999px;
  background: transparent;
  transform: translateY(16px);
}

.service-icon-urgent::before {
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 31px solid var(--ui-copper-dark);
  transform: translateY(-3px);
}

.service-icon-urgent::after {
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: #fffaf0;
  box-shadow: 0 11px 0 -1px #fffaf0;
  transform: translateY(3px);
}

.contact-choice-card-muted {
  border-color: rgba(217, 45, 32, 0.22);
  background: linear-gradient(180deg, #fff7ef, #f1e2d6);
}

.contact-choice-card-muted strong,
.contact-choice-card-muted em {
  color: var(--ui-red-dark);
}

.closed-lead-copy p {
  color: var(--ui-muted);
}

.closed-lead-note-grid span {
  border-color: rgba(17, 110, 104, 0.18);
  background: rgba(17, 110, 104, 0.08);
  color: var(--ui-teal);
}

.closed-lead-form {
  border-color: var(--ui-line-warm);
  background: rgba(255, 255, 255, 0.62);
}

input,
select,
textarea {
  border-color: rgba(16, 24, 32, 0.18);
  background: #fffdf8;
  color: var(--ui-ink);
}

input::placeholder,
textarea::placeholder {
  color: #7a858b;
}

label,
.field label,
.auth-card-premium .field label {
  color: #24333d;
  font-weight: 760;
}

.auth-copy-premium .section-kicker {
  color: var(--ui-brass);
}

.auth-copy-premium .secondary-button {
  border-color: rgba(255, 250, 240, 0.28);
  background: rgba(255, 250, 240, 0.08);
  color: #fff;
}

.auth-role-card {
  border-color: rgba(255, 250, 240, 0.18);
  background: rgba(6, 19, 27, 0.34);
  box-shadow: none;
}

.auth-role-card span {
  color: rgba(255, 250, 240, 0.76);
}

.auth-role-card strong {
  color: #fff;
}

.auth-role-card p {
  color: rgba(255, 250, 240, 0.78);
}

.site-footer p,
.site-footer small,
.footer-links a {
  color: rgba(238, 248, 249, 0.78);
}

.footer-paused-link {
  color: #ffd2cc;
  font-weight: 850;
}

.footer-paused-link:hover {
  color: #fff;
}

@media (max-width: 920px) {
  .site-header {
    top: max(10px, env(safe-area-inset-top));
  }

  .site-shell {
    margin-top: max(10px, calc(env(safe-area-inset-top) + 8px));
  }

  .closed-banner {
    grid-template-columns: 1fr;
  }

  .closed-banner-link {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: calc(100% - 16px);
  }

  .closed-banner {
    gap: 8px;
    padding: 12px;
  }

  .closed-banner strong {
    font-size: 0.98rem;
    line-height: 1.18;
  }

  .closed-banner span {
    font-size: 0.92rem;
    line-height: 1.38;
  }

  .closed-banner-link {
    min-height: 38px;
  }

  .service-icon {
    width: 54px;
    height: 54px;
  }
}

/* Phase 5.2: shared product UI layer */
html {
  color-scheme: dark;
}

body.portal-body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent 220px),
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(180deg, #06131b 0%, #0a2230 44%, #07171f 100%);
}

.site-header,
.site-footer,
.portal-hero,
.page-hero,
.dashboard-hero,
.auth-shell-premium,
.choice-bubble,
.contact-choice-card,
.closed-info-card,
.lean-step-card,
.micro-proof-pill,
.detail-card,
.metric-box,
.timeline-card,
.compact-cta-card,
.booking-card,
.auth-role-card,
.auth-step-card,
.empty-card,
.status-box,
.confidence-box,
.account-command-center,
.booking-panel,
.summary-panel,
.auth-card-premium,
.closed-lead-panel,
.attention-card,
.calendar-day-card {
  border-radius: var(--ui-radius);
}

.site-header {
  overflow: hidden;
}

.site-header::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(226, 183, 91, 0.7), transparent);
  pointer-events: none;
}

.brand-mark {
  align-items: center;
}

.brand-logo-image {
  padding: 3px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.95), rgba(232, 222, 208, 0.9));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.brand-copy strong,
.brand-copy small {
  letter-spacing: 0;
}

.site-menu-toggle {
  border-radius: var(--ui-radius);
  border-color: rgba(238, 248, 249, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.portal-hero,
.page-hero,
.dashboard-hero {
  border-color: rgba(238, 248, 249, 0.15);
}

.hero-side-panel,
.page-hero-side,
.lean-side-panel,
.minimal-signal-panel,
.closed-side-panel {
  background:
    linear-gradient(180deg, rgba(6, 19, 27, 0.88), rgba(7, 25, 34, 0.92));
}

.signal-row,
.summary-row {
  position: relative;
  padding-left: 18px;
}

.signal-row::before,
.summary-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ui-brass);
  box-shadow: 0 0 0 4px rgba(226, 183, 91, 0.12);
}

.signal-row:nth-child(2)::before,
.summary-row:nth-child(2)::before {
  background: var(--ui-teal);
  box-shadow: 0 0 0 4px rgba(17, 110, 104, 0.16);
}

.signal-row:nth-child(3)::before,
.summary-row:nth-child(3)::before {
  background: var(--ui-red);
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.14);
}

.choice-bubble-grid {
  align-items: stretch;
}

.choice-bubble {
  display: grid;
  grid-template-rows: auto auto minmax(2.4em, 1fr) auto;
  padding: clamp(17px, 2vw, 22px);
  border-color: rgba(16, 24, 32, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.99), rgba(235, 225, 209, 0.98));
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.choice-bubble:hover {
  border-color: rgba(154, 78, 28, 0.35);
}

.choice-bubble::after,
.contact-choice-card::after,
.compact-cta-card::after {
  background: linear-gradient(90deg, var(--ui-copper-dark), var(--ui-brass), var(--ui-teal));
}

.choice-bubble strong {
  align-self: end;
  font-size: clamp(1.26rem, 2.2vw, 1.7rem);
  line-height: 1.05;
}

.choice-bubble em {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-style: normal;
}

.choice-bubble em::after {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 8px 0 0 -5px currentColor;
}

.service-icon {
  position: relative;
  flex: 0 0 auto;
  color: var(--ui-ink);
}

.service-icon::before,
.service-icon::after {
  left: 50%;
  top: 50%;
}

.service-icon::before {
  transform-origin: center;
}

.service-icon-engine::before,
.service-icon-battery::before,
.service-icon-season::before,
.service-icon-cooling::before {
  transform: translate(-50%, -52%);
}

.service-icon-engine::after,
.service-icon-cooling::after {
  transform: translate(-50%, 14px);
}

.service-icon-diagnostic::before {
  transform: translate(-50%, -50%);
}

.service-icon-diagnostic::after {
  transform: translate(-50%, -50%) rotate(-32deg) translate(9px, 3px);
}

.service-icon-wrench::before {
  transform: translate(-50%, -50%) rotate(-34deg);
}

.service-icon-wrench::after {
  transform: translate(-86%, -94%) rotate(-34deg);
}

.service-icon-battery::after {
  transform: translate(11px, -50%);
}

.service-icon-hydraulic::before {
  transform: translate(-50%, -50%) rotate(-22deg);
}

.service-icon-hydraulic::after {
  transform: translate(-8%, -84%) rotate(-22deg);
}

.service-icon-mount::before {
  transform: translate(-48%, -48%);
}

.service-icon-mount::after {
  transform: translate(-50%, -8%) rotate(-35deg);
}

.service-icon-season::after {
  transform: translate(-8%, 2%) rotate(-35deg);
}

.service-icon-urgent::before {
  transform: translate(-50%, -54%);
}

.service-icon-urgent::after {
  transform: translate(-50%, -42%);
}

.metrics-row {
  align-items: stretch;
  gap: clamp(12px, 1.6vw, 18px);
}

.metric-box {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 148px;
  overflow: hidden;
  padding: 20px;
  border-color: rgba(238, 248, 249, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.99), rgba(235, 225, 210, 0.98));
}

.metric-box::before {
  content: "";
  position: absolute;
  right: 16px;
  top: 16px;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(16, 24, 32, 0.2);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 0 45%, rgba(16, 24, 32, 0.22) 45% 55%, transparent 55% 100%),
    linear-gradient(0deg, transparent 0 45%, rgba(16, 24, 32, 0.22) 45% 55%, transparent 55% 100%);
  opacity: 0.85;
}

.metric-box::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--ui-copper);
}

.metric-box span {
  max-width: calc(100% - 46px);
  color: #5d6870;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-box strong {
  color: var(--ui-ink);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.92;
}

.metric-box small {
  display: block;
  margin-top: 2px;
  color: var(--ui-muted);
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.35;
}

.metric-progress {
  height: 7px;
  margin-top: auto;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 24, 32, 0.11);
}

.metric-progress i {
  display: block;
  width: var(--metric-progress, 0%);
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ui-copper-dark), var(--ui-brass));
}

.metric-new::after,
.metric-new .metric-progress i,
.attention-priority::before {
  background: linear-gradient(180deg, var(--ui-red), var(--ui-red-dark));
}

.metric-planned::after,
.metric-planned .metric-progress i,
.attention-plan::before {
  background: linear-gradient(180deg, var(--ui-blue), var(--ui-teal));
}

.metric-open::after,
.metric-open .metric-progress i,
.attention-capacity::before {
  background: linear-gradient(180deg, var(--ui-green), var(--ui-teal));
}

.metric-closed::after,
.metric-closed .metric-progress i,
.attention-waitlist::before {
  background: linear-gradient(180deg, var(--ui-brass), var(--ui-copper-dark));
}

.attention-grid {
  align-items: stretch;
}

.attention-card {
  position: relative;
  display: grid;
  gap: 8px;
  overflow: hidden;
  padding: 20px 20px 22px;
  border-color: rgba(16, 24, 32, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(236, 228, 215, 0.96));
}

.attention-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
}

.attention-card span {
  color: #6a4d2c;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.attention-card strong {
  color: var(--ui-ink);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 0.95;
}

.attention-card p {
  color: var(--ui-muted);
  line-height: 1.45;
}

.status-pill,
.status-chip {
  border-radius: 999px;
  border: 1px solid rgba(16, 24, 32, 0.12);
  font-weight: 850;
}

.status-pill.status-open,
.status-chip.status-open {
  border-color: rgba(36, 138, 99, 0.24);
  background: rgba(36, 138, 99, 0.11);
  color: #176748;
}

.status-pill.status-full,
.status-chip.status-full {
  border-color: rgba(217, 45, 32, 0.24);
  background: rgba(217, 45, 32, 0.1);
  color: var(--ui-red-dark);
}

.status-pill.status-neutral,
.status-chip.status-neutral,
.status-pill.status-pending,
.status-chip.status-pending {
  border-color: rgba(154, 78, 28, 0.2);
  background: rgba(226, 183, 91, 0.14);
  color: #6f4218;
}

.calendar-day-card,
.booking-card,
.slot-admin-card,
.slot-admin-create,
.account-status-grid > article,
.status-timeline-grid > article {
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.99), rgba(236, 227, 212, 0.97));
}

.calendar-slot-pill {
  border-radius: 8px;
}

.dashboard-hero {
  align-items: end;
}

.dashboard-meta {
  align-content: end;
}

.badge-live {
  border-radius: 999px;
  border-color: rgba(238, 248, 249, 0.18);
  background: rgba(255, 250, 240, 0.1);
  color: rgba(255, 250, 240, 0.9);
}

@media (min-width: 1181px) {
  .metrics-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .metrics-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .site-header {
    padding: 11px;
  }

  .site-menu-toggle {
    min-height: 42px;
    padding-inline: 12px;
  }

  .brand-logo-image {
    width: 78px;
    max-width: 26vw;
  }

  .metrics-row,
  .attention-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-box {
    min-height: 128px;
  }

  .page-hero,
  .lean-page-hero,
  .lean-service-hero,
  .dashboard-hero,
  .portal-hero,
  .minimal-hero {
    padding: 22px;
  }
}

@media (max-width: 560px) {
  .brand-logo-image {
    width: 68px;
    max-width: 24vw;
  }

  .brand-copy small {
    display: none;
  }

  .closed-banner {
    border-left-width: 4px;
  }

  .page-hero,
  .lean-page-hero,
  .lean-service-hero,
  .dashboard-hero,
  .portal-hero,
  .minimal-hero {
    padding: 18px;
  }

  .page-hero h1,
  .portal-hero h1,
  .dashboard-hero h1 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .hero-lead,
  .page-hero .hero-lead,
  .dashboard-hero .hero-lead {
    font-size: 1rem;
  }

  .choice-bubble-grid {
    gap: 10px;
  }

  .choice-bubble {
    min-height: 148px;
    padding: 15px;
  }

  .choice-bubble strong {
    font-size: 1.16rem;
  }

  .choice-label {
    font-size: 0.76rem;
  }

  .metrics-row,
  .attention-grid {
    grid-template-columns: 1fr;
  }

  .metric-box,
  .attention-card {
    min-height: 0;
  }
}

/* Request fix: readable status and calm navy wave background */
body.portal-body {
  background-color: #061727;
  background-image:
    linear-gradient(180deg, rgba(3, 13, 23, 0.78) 0%, rgba(6, 23, 39, 0.5) 42%, rgba(3, 13, 23, 0.86) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='760' height='180' viewBox='0 0 760 180'%3E%3Cpath d='M-20 76 C 45 28 115 124 180 76 S 315 28 380 76 S 515 124 580 76 S 715 28 780 76' fill='none' stroke='%231d5b78' stroke-width='2' stroke-opacity='.34'/%3E%3Cpath d='M-20 120 C 45 72 115 168 180 120 S 315 72 380 120 S 515 168 580 120 S 715 72 780 120' fill='none' stroke='%23e2b75b' stroke-width='1.4' stroke-opacity='.16'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #041321 0%, #08263d 48%, #04131f 100%);
  background-position: center top, center 76px, center top;
  background-repeat: repeat, repeat, no-repeat;
  background-size: auto, 760px 180px, auto;
}

.minimal-signal-panel .signal-stack {
  display: grid;
  gap: 10px;
}

.minimal-signal-panel .signal-row,
.page-hero-side .summary-row,
.lean-side-panel .summary-row,
.closed-side-panel .summary-row,
.process-status-panel .summary-row {
  display: grid;
  gap: 5px;
  padding: 13px 14px 13px 34px;
  border: 1px solid rgba(238, 248, 249, 0.14);
  border-radius: var(--ui-radius);
  background: rgba(255, 250, 240, 0.08);
}

.minimal-signal-panel .signal-row span,
.page-hero-side .summary-row span,
.lean-side-panel .summary-row span,
.closed-side-panel .summary-row span,
.process-status-panel .summary-row span {
  color: rgba(238, 248, 249, 0.68);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.minimal-signal-panel .signal-row strong,
.page-hero-side .summary-row strong,
.lean-side-panel .summary-row strong,
.closed-side-panel .summary-row strong,
.process-status-panel .summary-row strong {
  color: #fffaf0;
  font-size: 0.98rem;
  line-height: 1.25;
}

.minimal-signal-panel .signal-row:nth-child(3) strong,
.closed-side-panel .summary-row:first-child strong,
.process-status-panel .summary-row:first-child strong {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 126, 114, 0.32);
  border-radius: 7px;
  background: linear-gradient(135deg, #d92d20, #7a1712);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(217, 45, 32, 0.2);
}

.process-flow-section .process-step-card {
  min-height: 184px;
}

.process-flow-section .process-step-card p {
  margin: 0;
  color: var(--ui-muted);
  line-height: 1.48;
}

.detail-disclosure {
  border-color: var(--ui-line-warm);
  border-radius: var(--ui-radius);
  background: linear-gradient(180deg, var(--ui-panel), var(--ui-panel-2));
  color: var(--ui-ink);
  box-shadow: var(--ui-shadow-panel);
}

.detail-disclosure summary {
  min-height: 64px;
}

.detail-disclosure summary span {
  color: var(--ui-ink);
  font-weight: 900;
}

.detail-disclosure summary strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(154, 78, 28, 0.18);
  border-radius: 7px;
  background: rgba(226, 183, 91, 0.14);
  color: var(--ui-copper-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.detail-disclosure .flow-step span {
  color: var(--ui-copper-dark);
  font-weight: 900;
}

.detail-disclosure .flow-step p,
.detail-disclosure .subtle-list li {
  color: var(--ui-muted);
}

.process-cta {
  border: 1px solid rgba(238, 248, 249, 0.14);
  border-radius: var(--ui-radius);
  background:
    linear-gradient(135deg, rgba(6, 19, 27, 0.94), rgba(8, 38, 61, 0.88));
}

.clean-final-cta {
  border: 1px solid rgba(238, 248, 249, 0.14);
  border-radius: var(--ui-radius);
  background:
    linear-gradient(135deg, rgba(6, 19, 27, 0.96), rgba(8, 38, 61, 0.9));
  color: #fffaf0;
  box-shadow: var(--ui-shadow-deep);
}

.clean-final-cta h2 {
  color: #fffaf0;
  max-width: 18ch;
  line-height: 1.04;
}

.clean-final-cta .section-kicker {
  color: var(--ui-brass);
}

.clean-final-cta .secondary-button {
  border-color: rgba(255, 250, 240, 0.24);
  background: rgba(255, 250, 240, 0.1);
  color: #fff;
}

.platform-section {
  display: grid;
  gap: clamp(18px, 3vw, 28px);
}

.platform-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.platform-filter-row span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(226, 183, 91, 0.22);
  border-radius: 999px;
  background: rgba(226, 183, 91, 0.1);
  color: var(--ui-brass);
  font-size: 0.82rem;
  font-weight: 850;
}

.platform-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 18px);
}

.platform-project-card,
.platform-insight-card {
  min-height: 228px;
}

.platform-project-card em {
  display: block;
  margin-top: auto;
  color: var(--ui-copper-dark);
  font-style: normal;
  font-weight: 820;
  line-height: 1.45;
}

.industrial-page-hero .hero-lead {
  max-width: 48ch;
}

@media (max-width: 560px) {
  .minimal-signal-panel .signal-row,
  .page-hero-side .summary-row,
  .lean-side-panel .summary-row,
  .closed-side-panel .summary-row,
  .process-status-panel .summary-row {
    padding: 12px 12px 12px 30px;
  }

  .minimal-signal-panel .signal-row:nth-child(3) strong,
  .closed-side-panel .summary-row:first-child strong,
  .process-status-panel .summary-row:first-child strong {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .platform-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Uniformity audit pass: compact desktop header and clearer premium cards */
@media (min-width: 921px) {
  .site-header {
    grid-template-columns: minmax(290px, 320px) minmax(0, 1fr);
    gap: 12px;
    padding: 14px 16px;
  }

  .brand-block,
  .brand-mark,
  .brand-copy {
    min-width: 0;
  }

  .brand-mark {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    width: 100%;
    gap: 10px;
    overflow: hidden;
  }

  .brand-logo-image {
    width: clamp(70px, 6vw, 86px);
    padding: 4px;
  }

  .brand-copy {
    max-width: 190px;
  }

  .brand-copy strong,
  .brand-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-copy strong {
    font-size: 0.88rem;
    line-height: 1.12;
  }

  .brand-copy small {
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .site-menu {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .site-nav {
    gap: 5px;
    justify-content: flex-end;
  }

  .site-actions {
    gap: 5px;
    min-width: max-content;
  }

  .site-nav a,
  .site-header .action-link {
    min-height: 40px;
    padding-inline: 9px;
    border-radius: 8px;
    font-size: 0.86rem;
  }
}

@media (min-width: 1400px) {
  .site-header {
    grid-template-columns: minmax(310px, 340px) minmax(0, 1fr);
    padding: 16px 20px;
  }

  .brand-logo-image {
    width: clamp(86px, 7vw, 108px);
  }

  .brand-copy {
    max-width: 210px;
  }

  .site-nav a,
  .site-header .action-link {
    padding-inline: 12px;
    font-size: 0.9rem;
  }
}

@media (min-width: 921px) and (max-width: 1180px) {
  .site-header {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .brand-copy {
    display: none;
  }

  .site-nav a,
  .site-header .action-link {
    padding-inline: 8px;
    font-size: 0.82rem;
  }
}

.auth-copy-premium .auth-role-card {
  border-color: rgba(255, 250, 240, 0.16) !important;
  background: linear-gradient(180deg, rgba(6, 19, 27, 0.78), rgba(8, 38, 50, 0.68)) !important;
  color: #fffaf0;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.auth-copy-premium .auth-role-card span {
  color: var(--ui-brass) !important;
}

.auth-copy-premium .auth-role-card strong {
  color: #fffaf0 !important;
}

.auth-copy-premium .auth-role-card p {
  color: rgba(247, 252, 252, 0.78) !important;
}

.auth-copy-premium .auth-support-strip {
  padding: 10px;
  border: 1px solid rgba(255, 250, 240, 0.14);
  border-radius: var(--ui-radius);
  background: rgba(6, 19, 27, 0.46);
}

.auth-copy-premium .auth-support-strip span {
  color: rgba(255, 250, 240, 0.82);
}
