/* Token layer for the site-style account pages (theme port, Nov 27 2026): the Cockpit invite page (/invite) now,
   and the sign-in and setup pages in PR 4. These pages share styles.css and brand.css with the marketing site, so
   their native look lives here instead, linked after brand.css. Since PR 5 the marketing pages load it too, followed
   by rc-site.css for their own cards and panels.

   Values come from public/rc-tokens.css (copied from apps/ios Theme.swift): page #f5f5f7 / #000, cards #fff / #1c1c1e
   radius 20 with a hairline and no shadow, accent #0b7d5e / #82dfcb, buttons radius 14 and at least 44px tall,
   system font. The page follows the device's light or dark setting, or the Appearance choice saved on the device.
   Look only: no copy, layout or behavior. */

/* ---- The site's own variables follow the tokens, in both themes ---- */
:root:is(html) {
  --bg: var(--ios-bg); --bg-raise: var(--ios-bg-2); --card: var(--ios-card); --line: var(--ios-separator);
  --text: var(--ios-label); --muted: var(--ios-label-2); --teal: var(--ios-accent-ink); --ink: var(--ios-on-accent);
  --serif: var(--ios-font-display); --sans: var(--ios-font);
  --rc-font: var(--ios-font);
  --rc-bg: var(--ios-bg); --rc-surface: var(--ios-card); --rc-surface-2: var(--ios-bg-3);
  --rc-line: var(--ios-hairline); --rc-line-strong: var(--ios-separator);
  --rc-text: var(--ios-label); --rc-body: var(--ios-label); --rc-muted: var(--ios-label-2);
  --rc-accent: var(--ios-accent-ink); --rc-accent-hover: var(--ios-accent-pressed); --rc-on-accent: var(--ios-on-accent);
  --rc-grad: var(--ios-accent); --rc-grad-hover: var(--ios-accent-pressed); --rc-btn-glow: none;
  --rc-card: var(--ios-card); --rc-card-shadow: none; --rc-glass: var(--ios-material);
  --rc-glow-bg: none; --rc-radius: var(--ios-r-card); --rc-radius-sm: var(--ios-r-button);
}

/* ---- Page: plain background, system font, no glow ---- */
:root:is(html) :is(body.site, body.is-dashboard) {
  background: var(--ios-bg) !important; background-image: none !important; color: var(--ios-label);
  font-family: var(--ios-font);
}
:root:is(html) :is(body.site, body.is-dashboard) h1, :root:is(html) :is(body.site, body.is-dashboard) h2, :root:is(html) :is(body.site, body.is-dashboard) h3 {
  font-family: var(--ios-font-display) !important; color: var(--ios-label);
}
:root:is(html) :is(body.site, body.is-dashboard) .lede { color: var(--ios-label-2); }
:root:is(html) :is(body.site, body.is-dashboard) .eyebrow { color: var(--ios-label-2) !important; font-size: var(--ios-footnote, .8125rem); letter-spacing: .06em; }
:root:is(html) :is(body.site, body.is-dashboard) .text-link, :root:is(html) :is(body.site, body.is-dashboard) .auth-note { color: var(--ios-accent-ink); }

/* ---- Top bar: the iOS material bar ---- */
:root:is(html) :is(body.site, body.is-dashboard) .site-header {
  background: var(--ios-material-bar, var(--ios-material)); border-bottom: 1px solid var(--ios-hairline);
  -webkit-backdrop-filter: var(--ios-blur); backdrop-filter: var(--ios-blur); box-shadow: none;
}
:root:is(html) :is(body.site, body.is-dashboard) .header-link, :root:is(html) :is(body.site, body.is-dashboard) .phone { color: var(--ios-label); }
:root:is(html) :is(body.site, body.is-dashboard) .brand img { box-shadow: none; }
:root:is(html) :is(body.site, body.is-dashboard) .site-menu { background: var(--ios-bg); color: var(--ios-label); }
:root:is(html) :is(body.site, body.is-dashboard) .site-menu a:hover, :root:is(html) :is(body.site, body.is-dashboard) .site-menu a[aria-current="page"] {
  background: var(--ios-fill-3); color: var(--ios-label);
}

/* ---- Buttons: one solid accent primary (radius 14, 44px+), the rest outline ---- */
:root:is(html) :is(body.site, body.is-dashboard) .button {
  border-radius: var(--ios-r-button) !important; min-height: 44px;
  background: var(--ios-accent) !important; color: var(--ios-on-accent) !important;
  box-shadow: none !important; border: 0; font-family: var(--ios-font);
}
:root:is(html) :is(body.site, body.is-dashboard) .button:hover { background: var(--ios-accent-pressed) !important; }
:root:is(html) :is(body.site, body.is-dashboard) .button.button-ghost, :root:is(html) :is(body.site, body.is-dashboard) .button.button-secondary,
:root:is(html) :is(body.site, body.is-dashboard) .button.button-outline {
  background: transparent !important; color: var(--ios-accent-ink) !important;
  box-shadow: inset 0 0 0 1px var(--ios-separator) !important;
}
:root:is(html) :is(body.site, body.is-dashboard) .button.button-ghost:hover { background: var(--ios-fill-3) !important; }

/* ---- Footer and social tiles: quiet, on the grouped background ---- */
:root:is(html) :is(body.site, body.is-dashboard) .site-footer { background: transparent; color: var(--ios-label-2); border-top: 1px solid var(--ios-hairline); }
:root:is(html) :is(body.site, body.is-dashboard) .site-footer a { color: var(--ios-label); }
:root:is(html) :is(body.site, body.is-dashboard) .socials .social-icon, :root:is(html) :is(body.site, body.is-dashboard) .header-socials a, :root:is(html) :is(body.site, body.is-dashboard) .menu-socials div a {
  background: var(--ios-card) !important; color: var(--ios-label) !important; box-shadow: inset 0 0 0 1px var(--ios-hairline) !important;
}

:focus-visible { outline-color: var(--ios-accent); }
::selection { background: var(--ios-accent-soft); }
@media (prefers-reduced-motion: reduce) { :root:is(html) :is(body.site, body.is-dashboard) .button { transition: none; } }

/* No glow: styles.css draws a mint radial behind the page with body::before. */
:root:is(html) :is(body.site, body.is-dashboard)::before { display: none; }

/* ---- The setup page after checkout (body.site.ob, /buy/setup): onboarding.css's --ob-* names follow the tokens.
   Gold is only for money, so the current step and status chips use the primary label instead. ---- */
:root:is(html) body.ob {
  --ob-black: var(--ios-bg); --ob-surface: var(--ios-card); --ob-mint: var(--ios-accent-ink); --ob-ink: var(--ios-on-accent);
  --ob-gold: var(--ios-label); --ob-text: var(--ios-label); --ob-body: var(--ios-label-2); --ob-dim: var(--ios-label-2);
  --ob-line: var(--ios-hairline); --muted: var(--ios-label-2);
}
:root:is(html) body.ob .ob-rail { background: var(--ios-material-bar, var(--ios-material)); -webkit-backdrop-filter: var(--ios-blur); backdrop-filter: var(--ios-blur); border-bottom-color: var(--ios-hairline); }
:root:is(html) body.ob .ob-steps li::before { background: var(--ios-fill); }
:root:is(html) body.ob .ob-steps li.is-done::before { background: var(--ios-accent); }
:root:is(html) body.ob .ob-steps li.is-now::before { background: var(--ios-label); }
:root:is(html) body.ob .ob-chip { border-color: var(--ios-separator); background: var(--ios-fill-3); }
:root:is(html) body.ob .ob-help a, :root:is(html) body.ob .ob-help button { text-decoration-color: var(--ios-separator); }

/* ---- Header menu controls (the dashboard setup pages don't load theme-light.css, so they're set here for both) ---- */
:root:is(html) :is(body.site, body.is-dashboard) .menu-close {
  color: var(--ios-label); border: 1px solid var(--ios-separator); background: transparent; border-radius: var(--ios-r-button); min-height: 44px;
}
:root:is(html) :is(body.site, body.is-dashboard) .menu-close:hover { background: var(--ios-fill-3); color: var(--ios-label); }
:root:is(html) :is(body.site, body.is-dashboard) .menu-toggle { background: var(--ios-card); border-color: var(--ios-separator); }
:root:is(html) :is(body.site, body.is-dashboard) .menu-toggle span { background: var(--ios-label); }
:root:is(html) :is(body.site, body.is-dashboard) .site-menu { border-left: 1px solid var(--ios-hairline); box-shadow: var(--ios-shadow-float, none); }
:root:is(html) :is(body.site, body.is-dashboard) .site-menu-bar p { color: var(--ios-label-2); }

/* ---- Kept dashboard pages (/dashboard/setup, setup-live, setup-self-serve, jobs): a plain page like the app (no
   workshop photo behind it) and flat cards: radius 20, hairline, no shadow. ---- */
:root:is(html) body.is-dashboard .dash-bg { display: none; }
:root:is(html) body.is-dashboard .frost {
  background: var(--ios-card); border: 1px solid var(--ios-hairline); border-radius: var(--ios-r-card);
  box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}

/* Phone links: 44px tap height */
:root:is(html) :is(body.site, body.is-dashboard) a.phone,
:root:is(html) :is(body.site, body.is-dashboard) a.text-link[href^="tel:"]{display:inline-flex;align-items:center;min-height:44px}
@media (max-width:1279px){:root:is(html) :is(body.site, body.is-dashboard) .header-actions a.phone{display:none}}

/* Contrast: .lv-n is dark text on teal (2.88:1 in light); use the on-accent color */
:root:is(html) body.is-dashboard .lv-n{color:var(--ios-on-accent,#fff)}

/* Tap target: dashboard brand link is 44px tall */
:root:is(html) body.is-dashboard .brand{min-height:44px}
