/*
  RecMgrX website styles.
  Every colour comes from tokens.css (generated from packages/design-tokens) — no hex values here
  (enforced by tests/site.test.mjs). Mixes use color-mix() over token variables.
*/

/* ---------- Website layer: semantic aliases over shared tokens ---------- */
:root {
  --maroon: var(--rmx-palette-maroon);
  --maroon-pressed: var(--rmx-color-primary-pressed);
  --rose: var(--rmx-palette-glow-rose);
  --blush: var(--rmx-palette-glow-blush);
  --charcoal: var(--rmx-palette-charcoal);
  --steel: var(--rmx-palette-steel-grey);
  --silver: var(--rmx-palette-light-silver);
  --white: var(--rmx-palette-white);
  --maroon-lit: color-mix(in srgb, var(--maroon) 72%, var(--rose));
  --night: color-mix(in srgb, var(--charcoal) 82%, var(--maroon));
  --on-dark-muted: color-mix(in srgb, var(--silver) 88%, var(--maroon));
  --focus-color: var(--maroon);

  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;

  /* Fluid type scale (website only; mobile uses packages/design-tokens typography). */
  --fs-hero: clamp(2.5rem, 1.6rem + 4.2vw, 4.6rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.8vw, 2.75rem);
  --fs-h3: 1.125rem;
  --fs-lede: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-tiny: 0.75rem;

  --gutter: var(--rmx-space-lg);
  --header-h: 68px;
  --container: 1160px;
}

@media (min-width: 768px) {
  :root { --gutter: var(--rmx-space-xl); }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--rmx-space-lg)); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--rmx-color-text-primary);
  background: var(--rmx-color-background);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 var(--rmx-space-md); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); font-weight: 800; text-wrap: balance; }
h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 var(--rmx-space-lg); }
a { color: var(--maroon); text-underline-offset: 3px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
small { font-size: inherit; }

:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
  border-radius: var(--rmx-radius-sm);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: var(--rmx-space-lg); top: -100px; z-index: 100;
  background: var(--white); color: var(--maroon); font-weight: 700;
  padding: var(--rmx-space-md) var(--rmx-space-lg); border-radius: var(--rmx-radius-md);
}
.skip-link:focus { top: var(--rmx-space-md); }

/* ---------- Buttons: luminous maroon-to-rose with silver highlight ---------- */
.btn {
  --btn-h: 48px;
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--rmx-space-sm);
  min-height: var(--btn-h); padding: 0 var(--rmx-space-xl);
  border-radius: var(--rmx-radius-pill); border: 1px solid transparent;
  font: 700 var(--fs-body)/1 var(--font-sans); letter-spacing: 0.01em; text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: background-color 120ms ease, box-shadow 160ms ease, transform 120ms ease, border-color 120ms ease;
}
.btn-sm { --btn-h: 44px; padding: 0 var(--rmx-space-lg); font-size: var(--fs-small); }
.btn-lg { --btn-h: 54px; padding: 0 var(--rmx-space-xxl); font-size: 1.0625rem; }

.btn-primary {
  color: var(--rmx-color-on-primary);
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon) 35%, var(--maroon-lit) 100%);
  border-color: color-mix(in srgb, var(--rose) 50%, var(--maroon));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--silver) 60%, transparent),
    inset 0 -2px 0 color-mix(in srgb, var(--charcoal) 25%, transparent),
    var(--rmx-shadow-glow-primary);
}
/* silver sheen across the top half */
.btn-primary::before {
  content: ""; position: absolute; inset: 1px 1px 50% 1px; z-index: -1;
  border-radius: var(--rmx-radius-pill) var(--rmx-radius-pill) 40% 40% / var(--rmx-radius-pill) var(--rmx-radius-pill) 100% 100%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--silver) 34%, transparent), transparent);
  pointer-events: none;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-lit) 60%, var(--maroon-lit) 100%);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--silver) 70%, transparent),
    inset 0 -2px 0 color-mix(in srgb, var(--charcoal) 25%, transparent),
    var(--rmx-shadow-glow-primary-peak);
}
.btn-primary:active {
  background: var(--maroon-pressed);
  box-shadow: inset 0 2px 4px color-mix(in srgb, var(--charcoal) 40%, transparent), var(--rmx-shadow-glow-primary-pressed);
  transform: translateY(1px);
}
.btn-primary:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
  border-radius: var(--rmx-radius-pill);
}

.btn-ghost {
  color: var(--white);
  background: color-mix(in srgb, var(--white) 8%, transparent);
  border-color: color-mix(in srgb, var(--silver) 45%, transparent);
}
.btn-ghost:hover { background: color-mix(in srgb, var(--white) 16%, transparent); border-color: var(--silver); }
.btn-outline {
  color: var(--maroon); background: color-mix(in srgb, var(--white) 75%, transparent);
  border-color: var(--maroon);
}
.btn-outline:hover { background: var(--white); box-shadow: var(--rmx-shadow-glow-primary-pressed); }
.btn-ghost:focus-visible, .btn-outline:focus-visible { border-radius: var(--rmx-radius-pill); }

/* ---------- Build 008: consistent maroon/rose glow on hover, keyboard focus and active ----------
   The glow is decorative: every state is also shown by fill, border or the 3px focus outline,
   so it never carries meaning on its own. With reduced motion the glow appears without transition. */
:root {
  --glow-soft: 0 0 0 1px color-mix(in srgb, var(--rose) 55%, transparent), 0 0 14px color-mix(in srgb, var(--rose) 55%, transparent), 0 0 28px color-mix(in srgb, var(--blush) 35%, transparent);
}
.btn-primary:focus-visible {
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--silver) 70%, transparent),
    inset 0 -2px 0 color-mix(in srgb, var(--charcoal) 25%, transparent),
    var(--rmx-shadow-glow-primary-peak);
}
.btn-ghost:hover, .btn-ghost:focus-visible { box-shadow: var(--glow-soft); }
.btn-ghost:active { background: color-mix(in srgb, var(--white) 22%, transparent); box-shadow: var(--rmx-shadow-glow-primary-pressed); transform: translateY(1px); }
.btn-outline:hover, .btn-outline:focus-visible { background: var(--white); box-shadow: var(--rmx-shadow-glow-primary); }
.btn-outline:active { background: var(--rmx-color-primary-tint); box-shadow: var(--rmx-shadow-glow-primary-pressed); transform: translateY(1px); }
.menu-toggle:hover, .menu-toggle:focus-visible, .menu-toggle[aria-expanded="true"] { box-shadow: var(--glow-soft); border-color: var(--silver); }
.nav-link:focus-visible { color: var(--white); text-shadow: 0 0 12px color-mix(in srgb, var(--blush) 70%, transparent); }
.dialog-close:hover, .dialog-close:focus-visible { box-shadow: var(--glow-soft); }
.support-card:focus-visible { border-color: var(--rose); box-shadow: var(--rmx-shadow-glow-primary); }
.support-card:active { box-shadow: var(--rmx-shadow-glow-primary-pressed); }

.preview-tag {
  font-size: var(--fs-tiny); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px var(--rmx-space-sm); border-radius: var(--rmx-radius-pill);
  background: color-mix(in srgb, var(--white) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--white) 35%, transparent);
}

/* Optional breathing glow on the single most important action; static when reduce-motion is on. */
@media (prefers-reduced-motion: no-preference) {
  .btn-breathe { animation: breathe 2400ms ease-in-out infinite; }
  @keyframes breathe {
    0%, 100% { box-shadow: inset 0 1px 0 color-mix(in srgb, var(--silver) 60%, transparent), inset 0 -2px 0 color-mix(in srgb, var(--charcoal) 25%, transparent), var(--rmx-shadow-glow-primary); }
    50% { box-shadow: inset 0 1px 0 color-mix(in srgb, var(--silver) 70%, transparent), inset 0 -2px 0 color-mix(in srgb, var(--charcoal) 25%, transparent), var(--rmx-shadow-glow-primary-peak); }
  }
  .btn-breathe:hover, .btn-breathe:active { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

/* ---------- Header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--rmx-color-header); color: var(--rmx-color-on-header);
  box-shadow: var(--rmx-shadow-header);
  --focus-color: var(--white);
}
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--silver) 55%, transparent), transparent);
}
.header-inner { display: flex; align-items: center; gap: var(--rmx-space-lg); min-height: var(--header-h); flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: var(--rmx-space-sm); color: inherit; text-decoration: none; min-height: 44px; }
.brand-mark { width: 38px; height: 38px; color: var(--white); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--rose) 55%, transparent)); }
.brand-word { font: italic 900 1.45rem/1 var(--font-display); letter-spacing: -0.02em; }
.brand-word span { color: var(--silver); font-weight: 600; }

.menu-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; align-items: center; justify-content: center;
  color: var(--white); background: transparent; border: 1px solid color-mix(in srgb, var(--silver) 40%, transparent);
  border-radius: var(--rmx-radius-md); cursor: pointer;
}
.menu-toggle .icon { width: 24px; height: 24px; }

.site-nav { display: flex; align-items: center; gap: var(--rmx-space-lg); margin-left: auto; flex-wrap: wrap; }
.nav-list { display: flex; flex-wrap: wrap; gap: var(--rmx-space-xxs); }
.nav-link {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 var(--rmx-space-md); border-radius: var(--rmx-radius-md);
  color: var(--on-dark-muted); text-decoration: none; font-weight: 600; font-size: 0.9375rem;
  transition: color 120ms ease, background-color 120ms ease;
}
.nav-link:hover { color: var(--white); background: color-mix(in srgb, var(--white) 8%, transparent); }
/* Selected navigation illumination */
.nav-link::after {
  content: ""; position: absolute; left: var(--rmx-space-md); right: var(--rmx-space-md); bottom: 6px; height: 3px;
  border-radius: var(--rmx-radius-pill); background: var(--blush);
  box-shadow: 0 0 8px var(--rose), 0 0 16px color-mix(in srgb, var(--blush) 60%, transparent);
  opacity: 0; transform: scaleX(0.4); transition: opacity 160ms ease, transform 160ms ease;
}
.nav-link[aria-current="true"] { color: var(--white); text-shadow: 0 0 12px color-mix(in srgb, var(--blush) 70%, transparent); }
.nav-link[aria-current="true"]::after { opacity: 1; transform: scaleX(1); }
.nav-actions { display: flex; gap: var(--rmx-space-sm); align-items: center; }

@media (max-width: 1099px) { /* Build 008B: hamburger below 1100px so the header never wraps */
  .js .menu-toggle { display: inline-flex; }
  .js .site-nav {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    padding: var(--rmx-space-sm) 0 var(--rmx-space-lg); gap: var(--rmx-space-md);
  }
  .js .site-nav.is-open { display: flex; }
  .js .nav-list { flex-direction: column; }
  .js .nav-link { width: 100%; }
  .js .nav-link::after { left: 0; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; transform: scaleY(0.4); }
  .js .nav-link[aria-current="true"]::after { transform: scaleY(1); }
  .js .nav-actions { flex-direction: column; align-items: stretch; }
  .site-nav { margin-left: 0; }
}

/* ---------- Hero (Build 008B — approved mockup: compact panoramic hero;
   horizontal lockup on the left, slogan on the right, misty mountain lake behind) ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  color: var(--charcoal); background: var(--silver);
  --focus-color: var(--maroon);
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(45% 70% at 76% 42%, color-mix(in srgb, var(--white) 80%, transparent), transparent 72%),
    url("/assets/hero-landscape-light.svg") center 62% / cover no-repeat;
}
.container-hero { max-width: 1480px; }
.hero-inner {
  display: grid; gap: var(--rmx-space-md); align-items: center; justify-items: center;
  padding-block: var(--rmx-space-lg) calc(var(--rmx-space-xl) + 96px); /* clears the category-band wave */
}
.hero-brand { display: flex; justify-content: center; min-width: 0; width: 100%; }
.hero-brand picture { display: block; width: 100%; }
.hero-lockup {
  display: block; margin-inline: auto; width: min(76%, 300px); height: auto;
  filter: drop-shadow(0 14px 22px color-mix(in srgb, var(--charcoal) 22%, transparent));
}
.hero-copy { position: relative; min-width: 0; text-align: center; }
.hero-title {
  font-style: italic; font-weight: 900; text-transform: uppercase; color: var(--charcoal);
  font-size: clamp(1.9rem, 1.2rem + 1.7vw, 2.6rem); line-height: 0.98; letter-spacing: -0.01em; margin: 0;
}
.hero-rule {
  display: block; width: min(100%, 320px); height: 4px; margin: var(--rmx-space-md) auto;
  border-radius: var(--rmx-radius-pill); transform: skewX(-24deg);
  background: linear-gradient(90deg, var(--maroon), var(--maroon) 62%, color-mix(in srgb, var(--maroon) 0%, transparent));
}
.hero-sub {
  font-size: clamp(0.85rem, 0.78rem + 0.35vw, 1.1rem); font-weight: 500; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--charcoal); margin: 0 0 var(--rmx-space-lg);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--rmx-space-sm); justify-content: center; }
.hero-status {
  display: inline-flex; align-items: center; gap: var(--rmx-space-sm); margin: var(--rmx-space-md) 0 0;
  font-size: var(--fs-small); font-weight: 600; color: var(--charcoal);
}
.status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--maroon); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rose) 40%, transparent);
}
.status-pill {
  display: inline-flex; align-items: center; gap: var(--rmx-space-sm);
  padding: var(--rmx-space-xs) var(--rmx-space-md);
  font-size: var(--fs-small); font-weight: 600; color: var(--charcoal);
  background: color-mix(in srgb, var(--white) 85%, transparent);
  border: 1px solid color-mix(in srgb, var(--steel) 35%, transparent); border-radius: var(--rmx-radius-pill);
}
@media (min-width: 700px) {
  .hero-lockup { width: min(100%, 560px); }
}
@media (min-width: 960px) {
  .hero-inner { grid-template-columns: 1.35fr 0.65fr; gap: var(--rmx-space-xxl); justify-items: stretch; min-height: 0; }
  .hero-lockup { width: min(100%, 780px); margin-inline: 0 auto; }
  .hero-copy { text-align: left; padding-left: var(--rmx-space-xl); }
  /* thin diagonal divider between the lockup and the slogan (approved mockup) */
  .hero-copy::before {
    content: ""; position: absolute; left: 0; top: 4%; bottom: 4%; width: 2px; transform: skewX(-14deg);
    background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--steel) 70%, transparent) 25%, color-mix(in srgb, var(--steel) 70%, transparent) 75%, transparent);
  }
  .hero-rule { margin-inline: 0; }
  .hero-ctas { justify-content: flex-start; }
}
@media (max-width: 479px) {
  .hero-ctas .btn { width: 100%; }
}

/* ---------- Phone previews ---------- */
.phone {
  --phone-w: 236px;
  width: var(--phone-w); aspect-ratio: 9 / 19; padding: 10px;
  background: linear-gradient(160deg, var(--steel), var(--charcoal) 45%, var(--charcoal));
  border-radius: 40px;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--silver) 40%, transparent),
    0 24px 48px color-mix(in srgb, var(--charcoal) 35%, transparent),
    0 0 32px color-mix(in srgb, var(--rose) 14%, transparent);
}
.phone-screen {
  position: relative; height: 100%; overflow: hidden; display: flex; flex-direction: column;
  background: var(--rmx-color-surface-muted); color: var(--rmx-color-text-primary);
  border-radius: 31px; font-size: 11px; line-height: 1.35;
}
.sample-note {
  margin: var(--rmx-space-xl) 0 0; text-align: center;
  font-size: var(--fs-small); color: var(--rmx-color-text-secondary);
}

.app-bar {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  padding: 30px 26px 11px; background: var(--rmx-color-header); color: var(--white);
}
/* status-bar time (decorative) */
.app-bar::before { content: "9:41"; position: absolute; top: 8px; left: 20px; font-size: 9px; font-weight: 700; color: var(--white); }
/* back chevron on every screen except the home (My Garage) screen */
.app-bar:not(.app-bar-brand)::after {
  content: ""; position: absolute; left: 13px; top: 36px; width: 6px; height: 6px;
  border-left: 2px solid var(--white); border-bottom: 2px solid var(--white); transform: rotate(45deg);
}
/* camera notch (decorative) */
.phone-screen::before {
  content: ""; position: absolute; z-index: 3; top: 7px; left: 50%; transform: translateX(-50%);
  width: 62px; height: 15px; border-radius: var(--rmx-radius-pill); background: var(--charcoal);
}
.app-bar-title { font-weight: 800; font-size: 14px; }
.app-bar-sub { font-size: 10px; color: var(--on-dark-muted); }
.app-brand { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; }
.app-emblem { width: 20px; height: 20px; color: var(--white); }
.app-body { flex: 1; display: flex; flex-direction: column; gap: 7px; padding: 10px; overflow: hidden; }
.app-section { margin: 4px 2px 0; font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--steel); }
.app-hero-tile {
  height: 74px; display: grid; place-items: center; border-radius: 12px; color: var(--white);
  background: linear-gradient(135deg, var(--maroon), var(--maroon-lit));
}
.app-hero-tile .icon { width: 40px; height: 40px; stroke-width: 1.4; }
.meter-card, .task-row, .mini-card, .sched-row, .field, .doc-row {
  background: var(--white); border-radius: 10px; box-shadow: var(--rmx-shadow-card);
}
.meter-card { display: flex; flex-direction: column; padding: 8px 10px; }
.meter-label, .meter-note { font-size: 9px; color: var(--steel); }
.meter-value { font-size: 18px; font-weight: 800; }
.meter-value small, .equip-meter small { font-size: 0.65em; font-weight: 600; color: var(--steel); }
.task-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 7px 9px; font-weight: 600; }
.mini-card { display: flex; align-items: center; gap: 8px; padding: 7px 8px; }
.mini-icon {
  width: 30px; height: 30px; display: grid; place-items: center; flex: none;
  border-radius: 8px; background: var(--rmx-color-primary-tint); color: var(--maroon);
}
.mini-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mini-text small { color: var(--steel); font-size: 9.5px; }
.app-fab {
  margin-top: auto; align-self: center; padding: 8px 14px; border-radius: var(--rmx-radius-pill);
  background: var(--maroon); color: var(--white); font-weight: 700; box-shadow: var(--rmx-shadow-glow-primary);
}
.app-tabs {
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; text-align: center;
  padding: 6px 4px 14px; background: var(--white); border-top: 1px solid var(--silver);
  font-size: 9px; font-weight: 700; color: var(--steel);
}
.app-tabs .is-active { color: var(--maroon); }
.tab-cam {
  justify-self: center; width: 34px; height: 34px; margin-top: -18px; display: grid; place-items: center;
  border-radius: 50%; color: var(--white); background: var(--maroon);
  border: 3px solid var(--white); box-shadow: var(--rmx-shadow-glow-primary);
}
.tab-cam .icon { width: 16px; height: 16px; }
.app-wordmark { font-style: italic; font-weight: 900; font-size: 15px; letter-spacing: -0.02em; }
.app-row { display: flex; justify-content: space-between; align-items: center; padding: 2px 2px 0; font-size: 12px; font-weight: 800; }
.app-plus {
  width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px;
  background: var(--maroon); color: var(--white); font-weight: 800;
}
.seg {
  display: grid; grid-template-columns: 1fr 1fr; padding: 2px; border-radius: 8px;
  background: var(--silver); text-align: center; font-size: 9.5px; font-weight: 700;
}
.seg span { padding: 4px; }
.seg .is-active { border-radius: 6px; background: var(--maroon); color: var(--white); }
.ov-tabs {
  display: flex; justify-content: space-between; padding: 0 2px 4px;
  border-bottom: 1px solid var(--silver); font-size: 8.5px; font-weight: 700; color: var(--steel);
}
.ov-tabs .is-active { color: var(--maroon); box-shadow: 0 2px 0 var(--maroon); }
.chip {
  flex: none; padding: 2px 7px; border-radius: var(--rmx-radius-pill);
  font-size: 9px; font-weight: 700; white-space: nowrap;
}
.chip-ok { background: var(--rmx-color-success-tint); color: var(--rmx-color-success); }
.chip-warn { background: var(--rmx-color-warning-tint); color: var(--rmx-color-warning); }
.chip-bad { background: var(--rmx-color-danger-tint); color: var(--rmx-color-danger); }
.chip-verified { background: var(--rmx-color-success-tint); color: var(--rmx-color-success); }
.chip-pending { background: var(--rmx-color-warning-tint); color: var(--rmx-color-warning); }
.chip-custom { background: var(--rmx-color-info-tint); color: var(--rmx-color-info); }
.sched-row { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 10px; }
.sched-row small { color: var(--steel); font-size: 9.5px; }
.sched-row .cite { font-style: italic; }
.field { display: flex; flex-direction: column; padding: 6px 10px; }
.field small { font-size: 9px; color: var(--steel); }
.field span { font-weight: 600; }
.field-attach { flex-direction: row; align-items: center; gap: 6px; color: var(--maroon); }
.app-btn {
  margin-top: auto; text-align: center; padding: 9px; border-radius: var(--rmx-radius-pill);
  background: var(--maroon); color: var(--white); font-weight: 700; box-shadow: var(--rmx-shadow-glow-primary);
}
.doc-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; }
.doc-row .icon { color: var(--maroon); margin-top: 1px; }
.doc-row span { display: flex; flex-direction: column; }
.doc-row small { color: var(--steel); font-size: 9.5px; }

/* ---------- Category band (approved mockup: maroon wave, eight equipment types) ---------- */
.category-band {
  position: relative; z-index: 1; margin-top: -56px; padding: 30px 0 var(--rmx-space-md);
  overflow-x: clip; /* the wave (::before) extends past the edges; clip sideways only */
  color: var(--white); background: linear-gradient(180deg, var(--maroon), var(--maroon-pressed));
}
.category-band::before {
  content: ""; position: absolute; z-index: -1; left: -8%; right: -8%; top: -40px; height: 90px;
  border-radius: 62% 38% 0 0 / 100% 100% 0 0; background: var(--maroon);
  box-shadow: 0 -4px 0 color-mix(in srgb, var(--silver) 90%, transparent);
}
.category-list {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--rmx-space-lg) 0;
  text-align: center; font-weight: 700;
}
.category-list li { display: flex; flex-direction: column; align-items: center; gap: var(--rmx-space-xs); padding-inline: 2px; font-size: 0.8125rem; white-space: nowrap; }
@media (min-width: 480px) { .category-list li { font-size: 0.9375rem; } }
.category-list .cat-icon { width: 60px; height: 30px; fill: var(--white); }
@media (min-width: 900px) { .category-list .cat-icon { width: 72px; height: 36px; } }
@media (min-width: 900px) {
  .category-list { grid-template-columns: repeat(8, minmax(0, 1fr)); font-size: 1.0625rem; }
  .category-list li + li { border-left: 1px solid color-mix(in srgb, var(--white) 30%, transparent); }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(var(--rmx-space-xxxl), 8vw, 112px); }
.section-muted { background: var(--rmx-color-surface-muted); border-block: 1px solid var(--rmx-color-divider); }
.section-dark {
  color: var(--white); --focus-color: var(--white);
  background:
    radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--maroon) 85%, transparent), transparent 70%),
    var(--night);
}
.section-head { max-width: 760px; margin-bottom: var(--rmx-space-xxxl); }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--rmx-space-sm);
  margin-bottom: var(--rmx-space-md); font-size: var(--fs-small); font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--maroon);
}
.eyebrow::before { content: ""; width: 24px; height: 3px; border-radius: var(--rmx-radius-pill); background: linear-gradient(90deg, var(--maroon), var(--rose)); }
.eyebrow-light { color: var(--silver); }
.section-lede { font-size: var(--fs-lede); color: var(--rmx-color-text-secondary); }
.section-dark .section-lede { color: var(--on-dark-muted); }

/* Features */
.feature-grid { display: grid; gap: var(--rmx-space-lg); }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature-card-wide { grid-column: span 3; }
}
.feature-card {
  position: relative; padding: var(--rmx-space-xl); background: var(--rmx-color-surface);
  border: 1px solid var(--rmx-color-border); border-radius: var(--rmx-radius-lg); box-shadow: var(--rmx-shadow-card);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.feature-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--rose) 45%, var(--silver)); }
.feature-card p { margin: 0; color: var(--rmx-color-text-secondary); }
.feature-card-wide { background: linear-gradient(135deg, var(--white), var(--rmx-color-primary-tint)); }
.feature-icon {
  display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: var(--rmx-space-lg);
  border-radius: var(--rmx-radius-md); color: var(--white);
  background: linear-gradient(135deg, var(--maroon), var(--maroon-lit));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--silver) 50%, transparent), 0 6px 16px color-mix(in srgb, var(--maroon) 30%, transparent);
}
.feature-icon .icon { width: 24px; height: 24px; }
.feature-icon-img { width: 28px; height: 28px; }

/* Garage */
.garage-layout { display: grid; gap: var(--rmx-space-xxxl); align-items: center; }
@media (min-width: 960px) { .garage-layout { grid-template-columns: 0.85fr 1.15fr; } }
.tick-list { display: grid; gap: var(--rmx-space-md); }
.tick-list li { display: flex; gap: var(--rmx-space-sm); align-items: flex-start; font-weight: 600; }
.tick-list .icon { color: var(--maroon); margin-top: 3px; }
.garage-panel {
  margin: 0; overflow: hidden; background: var(--white);
  border-radius: var(--rmx-radius-xl); border: 1px solid var(--rmx-color-border);
  box-shadow: 0 24px 60px color-mix(in srgb, var(--charcoal) 14%, transparent);
}
.garage-panel-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--rmx-space-md);
  padding: var(--rmx-space-lg) var(--rmx-space-xl); background: var(--rmx-color-header); color: var(--white);
}
.garage-panel-head .app-brand { font-size: 1.125rem; }
.garage-panel-head .app-emblem { width: 28px; height: 28px; }
.garage-summary { display: flex; gap: var(--rmx-space-lg); font-size: var(--fs-small); color: var(--on-dark-muted); }
.garage-summary b { color: var(--white); }
.garage-list { display: grid; gap: var(--rmx-space-sm); padding: var(--rmx-space-lg); background: var(--rmx-color-surface-muted); }
.equip-card {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "icon main main" "icon meter badge";
  gap: var(--rmx-space-xxs) var(--rmx-space-md); align-items: center;
  padding: var(--rmx-space-md) var(--rmx-space-lg); background: var(--white);
  border: 1px solid var(--rmx-color-border); border-radius: var(--rmx-radius-md); box-shadow: var(--rmx-shadow-card);
}
@media (min-width: 560px) {
  .equip-card { grid-template-columns: auto 1fr auto auto; grid-template-areas: "icon main meter badge"; }
}
.equip-icon {
  grid-area: icon; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: var(--rmx-radius-md); background: var(--rmx-color-primary-tint); color: var(--maroon);
}
.equip-icon .icon { width: 24px; height: 24px; }
.equip-main { grid-area: main; display: flex; flex-direction: column; min-width: 0; }
.equip-main small { font-size: var(--fs-small); color: var(--rmx-color-text-secondary); }
.equip-meter { grid-area: meter; font-weight: 800; font-variant-numeric: tabular-nums; }
.sample-caption { padding: var(--rmx-space-md) var(--rmx-space-xl); font-size: var(--fs-tiny); color: var(--rmx-color-text-secondary); border-top: 1px solid var(--rmx-color-divider); }

.badge {
  grid-area: badge; justify-self: end;
  display: inline-flex; align-items: center; gap: var(--rmx-space-xs);
  padding: var(--rmx-space-xs) var(--rmx-space-md); border-radius: var(--rmx-radius-pill);
  font-size: var(--fs-tiny); font-weight: 800; letter-spacing: 0.02em; white-space: nowrap;
}
.badge .icon { width: 14px; height: 14px; }
.badge-ok, .badge-verified { background: var(--rmx-color-success-tint); color: var(--rmx-color-success); }
.badge-warn, .badge-pending { background: var(--rmx-color-warning-tint); color: var(--rmx-color-warning); }
.badge-bad { background: var(--rmx-color-danger-tint); color: var(--rmx-color-danger); }
.badge-custom { background: var(--rmx-color-info-tint); color: var(--rmx-color-info); }
.badge-general { background: var(--silver); color: var(--charcoal); }

/* Trust */
.trust-grid { display: grid; gap: var(--rmx-space-lg); }
@media (min-width: 640px) { .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .trust-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.trust-card { padding: var(--rmx-space-xl); border-radius: var(--rmx-radius-lg); border: 1px solid var(--rmx-color-border); background: var(--white); }
.trust-card .badge { margin-bottom: var(--rmx-space-md); white-space: normal; border-radius: var(--rmx-radius-md); line-height: 1.3; }
.trust-card p { margin: 0; color: var(--rmx-color-text-secondary); }

/* How it works */
.steps { display: grid; gap: var(--rmx-space-lg); counter-reset: step; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.step {
  position: relative; padding: var(--rmx-space-xl); border-radius: var(--rmx-radius-lg);
  background: color-mix(in srgb, var(--white) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--silver) 18%, transparent);
}
.step h3 { display: flex; align-items: center; gap: var(--rmx-space-sm); }
.step h3 .icon { stroke: var(--blush); }
.step p { margin: 0; color: var(--on-dark-muted); }
.step-num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: var(--rmx-space-lg);
  border-radius: 50%; font-weight: 800; color: var(--white);
  background: linear-gradient(135deg, var(--maroon), var(--maroon-lit));
  border: 1px solid color-mix(in srgb, var(--rose) 60%, var(--maroon));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--silver) 55%, transparent), var(--rmx-shadow-glow-primary);
}
/* ---------- Seven-screen gallery (approved mockup) ---------- */
.screens-section { background: linear-gradient(180deg, var(--white), var(--rmx-color-surface-muted)); }
.container-wide { max-width: 1480px; }
.section-head-center { margin-inline: auto; text-align: center; }
/* Build 008/008B: no horizontal scrolling at any width.
   ≥ 1400 px: the approved mockup's seven phones side by side.
   600–1399 px: wrapped, centred rows. < 600 px: one legible column.
   Each screen keeps its 236 px layout and is scaled with zoom so text wraps identically. */
.screen-gallery {
  --item-w: 260px; --phone-zoom: 1;
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--rmx-space-xxl) var(--rmx-space-lg);
  max-width: 1060px; margin: 0 auto; padding: 0;
}
.screen-item { width: var(--item-w); display: flex; flex-direction: column; align-items: center; text-align: center; }
.screen-item .phone { zoom: var(--phone-zoom); text-align: left; }
.screen-caption {
  align-self: stretch; margin: var(--rmx-space-md) 0 var(--rmx-space-xs); padding: 6px 10px; border-radius: 10px;
  font-size: 0.9375rem; font-weight: 700; line-height: 1.25; color: var(--white);
  background: linear-gradient(135deg, var(--maroon), var(--maroon-lit));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--silver) 45%, transparent), var(--rmx-shadow-glow-primary-pressed);
}
.screen-desc { margin: 0; font-size: var(--fs-small); line-height: 1.4; color: var(--rmx-color-text-secondary); }
@media (min-width: 600px) {
  .screen-gallery { --item-w: 200px; --phone-zoom: 0.8; gap: var(--rmx-space-xl) var(--rmx-space-lg); }
  .screen-caption { font-size: 0.875rem; }
}
@media (min-width: 1200px) {
  .screen-gallery { --item-w: 232px; --phone-zoom: 0.9; gap: var(--rmx-space-xxl) var(--rmx-space-xl); }
}
@media (min-width: 1400px) {
  .screens-section .container-wide { max-width: none; }
  .screen-gallery {
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px;
    max-width: 1504px; --phone-zoom: 0.76;
  }
  .screen-item { width: auto; }
  .screen-caption { font-size: 0.8125rem; padding: 5px 6px; }
  .screen-desc { font-size: 0.8125rem; }
}
@media (min-width: 1536px) {
  /* edge-to-edge row as in the approved mockup: 7 columns of ~204 px at 1536 */
  .screens-section .container-wide { padding-inline: 12px; }
  .screen-gallery { --phone-zoom: 0.86; max-width: none; }
  .screen-caption { font-size: 0.875rem; margin-top: 18px; }
}
.screens-section { padding-top: var(--rmx-space-xl); }
.screens-intro { max-width: 760px; margin: var(--rmx-space-xxxl) auto 0; text-align: center; }
.screens-intro .eyebrow { justify-content: center; }
.screens-statement { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 800; line-height: 1.1; margin: 0 0 var(--rmx-space-md); color: var(--charcoal); }
.scan-frame {
  position: relative; height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: 12px; color: var(--white); text-align: center;
  background: linear-gradient(160deg, var(--steel), var(--charcoal));
}
.scan-frame .icon { width: 30px; height: 30px; stroke: var(--blush); }
.scan-frame small { font-size: 9.5px; color: var(--silver); }
.scan-corners {
  position: absolute; inset: 14px; border-radius: 8px;
  border: 2px dashed color-mix(in srgb, var(--silver) 55%, transparent);
}
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.06em; }
.muted { color: var(--steel); font-weight: 500; }
.chip-block { align-self: flex-start; padding: 4px 9px; }
.section-note { font-size: var(--fs-small); color: var(--rmx-color-text-secondary); margin: calc(-1 * var(--rmx-space-sm)) 0 0; }

/* About */
.about-layout { display: grid; gap: var(--rmx-space-xxl); align-items: start; }
@media (min-width: 960px) { .about-layout { grid-template-columns: 1.3fr 0.7fr; } }
.about-layout p { color: var(--rmx-color-text-secondary); font-size: 1.0625rem; }
.status-card {
  padding: var(--rmx-space-xl); border-radius: var(--rmx-radius-lg);
  background: var(--rmx-color-primary-tint); border: 1px solid color-mix(in srgb, var(--rose) 40%, var(--silver));
}
.status-card h3 { display: flex; align-items: center; gap: var(--rmx-space-sm); color: var(--maroon); }
.status-card .status-dot { background: var(--maroon); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rose) 45%, transparent); }
.status-card p { font-size: var(--fs-body); color: var(--rmx-color-text-primary); }
.status-card p:last-child { margin: 0; }
.status-card:target { box-shadow: 0 0 0 3px var(--rose); }

/* Support */
.support-layout { display: grid; gap: var(--rmx-space-xl); align-items: center; }
@media (min-width: 860px) { .support-layout { grid-template-columns: 1fr auto; } }
.support-layout .section-lede { margin: 0; }
.support-card {
  display: flex; align-items: center; gap: var(--rmx-space-lg); min-width: 0;
  padding: var(--rmx-space-lg) var(--rmx-space-xl); border-radius: var(--rmx-radius-lg);
  background: var(--white); border: 1px solid var(--rmx-color-border); box-shadow: var(--rmx-shadow-card);
  color: var(--rmx-color-text-primary); text-decoration: none;
  transition: box-shadow 160ms ease, border-color 160ms ease;
}
.support-card:hover { border-color: var(--rose); box-shadow: var(--rmx-shadow-glow-primary); }
.support-card .feature-icon { margin: 0; flex: none; }
.support-card span { display: flex; flex-direction: column; min-width: 0; }
.support-card small { font-size: var(--fs-small); color: var(--rmx-color-text-secondary); }
.support-card b { font-size: clamp(1rem, 0.9rem + 0.6vw, 1.25rem); color: var(--maroon); overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: var(--on-dark-muted); --focus-color: var(--white); }
.site-footer a { color: var(--white); }
.footer-inner {
  display: grid; gap: var(--rmx-space-xl); padding-block: var(--rmx-space-xxxl) var(--rmx-space-xl);
}
@media (min-width: 860px) { .footer-inner { grid-template-columns: 1fr auto auto; align-items: center; } }
.footer-brand p { margin: var(--rmx-space-sm) 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--rmx-space-xs) var(--rmx-space-lg); }
.footer-links a, .footer-contact a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; }
.footer-links a:hover, .footer-contact a:hover { text-decoration: underline; }
.footer-contact { margin: 0; }
.footer-legal { padding-block: var(--rmx-space-lg) var(--rmx-space-xl); border-top: 1px solid color-mix(in srgb, var(--silver) 15%, transparent); font-size: var(--fs-small); }
.footer-legal p { margin: 0; }

/* ---------- Preview dialog ---------- */
.preview-dialog {
  width: min(440px, calc(100vw - 2 * var(--rmx-space-lg))); padding: 0; border: 0;
  border-radius: var(--rmx-radius-xl); color: var(--rmx-color-text-primary); background: var(--white);
  box-shadow: 0 30px 80px color-mix(in srgb, var(--charcoal) 45%, transparent);
}
.preview-dialog::backdrop { background: color-mix(in srgb, var(--charcoal) 65%, transparent); }
.dialog-body { position: relative; padding: var(--rmx-space-xxl) var(--rmx-space-xl) var(--rmx-space-xl); }
.dialog-body h2 { font-size: 1.5rem; }
.dialog-body p { color: var(--rmx-color-text-secondary); }
.dialog-body .btn { width: 100%; margin-top: var(--rmx-space-sm); }
.dialog-close {
  position: absolute; top: var(--rmx-space-md); right: var(--rmx-space-md);
  width: 44px; height: 44px; display: grid; place-items: center;
  background: transparent; border: 0; border-radius: var(--rmx-radius-md); color: var(--steel); cursor: pointer;
}
.dialog-close:hover { background: var(--rmx-color-surface-muted); color: var(--charcoal); }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding-block: var(--rmx-space-xxxl); }
.notfound p { color: var(--rmx-color-text-secondary); }

/* ---------- Local preview ribbon (preview builds only; removed by `build --release`) ---------- */
.preview-ribbon {
  position: relative; z-index: 60; margin: 0; padding: var(--rmx-space-xs) var(--gutter);
  text-align: center; font-size: var(--fs-tiny); font-weight: 700; letter-spacing: 0.04em;
  color: var(--charcoal); background: var(--rmx-color-warning-tint);
  border-bottom: 1px solid color-mix(in srgb, var(--rmx-color-warning) 35%, transparent);
}
