:root {
  --ink: #241a12;
  --muted: #5f5245;   /* darkened 2026-09-19 for sunlight readability: 7.0:1 on the page background */
  --line: #ece2d3;
  --brand: #c2410c;
  --brand-dark: #9a3412;
  --safety-yellow: #f5b800;
  --good-bg: #eaf6ec;
  --good-ink: #1f7a3d;
  --pending-bg: #fef3c7;
  --pending-ink: #92600a;
  --bg: #faf6ef;
  --card-bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4ece1;
    --muted: #cbbaa6;  /* lightened 2026-09-19: 9.5:1 on the dark background */
    --line: #3a2f24;
    --brand: #fb923c;
    --brand-dark: #f97316;
    --safety-yellow: #f5b800;
    --good-bg: #16301f;
    --good-ink: #6ee7a0;
    --pending-bg: #3a2c10;
    --pending-ink: #f5b942;
    --bg: #1c1611;
    --card-bg: #26201a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.topbar {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--card-bg);
}
.brand { font-size: 1.25rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand span { color: var(--brand); }
.tagline { color: var(--muted); font-size: 0.85rem; }

.wrap { max-width: 900px; margin: 0 auto; padding: 32px 20px 80px; }

.foot { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 24px; }

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
}
.hero h1 { font-size: 2.1rem; line-height: 1.25; margin-bottom: 8px; }
.lead { color: var(--muted); font-size: 1.12rem; line-height: 1.55; max-width: 620px; }
.cta-row { margin: 24px 0; }
.hint { color: var(--muted); font-size: 0.9rem; }

.hero-media { text-align: center; }
.hero-media img {
  width: 100%;
  max-width: 420px;
  border-radius: 18px;
  border: 4px solid var(--card-bg);
  box-shadow: 0 12px 30px rgba(36, 26, 18, 0.18);
}
.hero-media .caption {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.hero-media .caption .dot { color: var(--safety-yellow); }

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  background: var(--brand);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--brand-dark); }
.btn.full { width: 100%; margin-top: 16px; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}
.card.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.error { color: #c0392b; font-weight: 600; }

label { display: block; margin: 14px 0; font-weight: 600; font-size: 0.9rem; }
input[type=text], input[type=email], input[type=tel], input[type=number], select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 1rem;
}

.dash-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.stat-box { background: var(--card-bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 20px; text-align: right; }
.stat-num { font-size: 1.6rem; font-weight: 700; color: var(--brand); }
.stat-label { font-size: 0.78rem; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

.qr { width: 160px; height: 160px; border-radius: 10px; border: 1px solid var(--line); }
.join-link { display: block; word-break: break-all; background: var(--bg); padding: 8px 10px; border-radius: 8px; margin-top: 6px; font-size: 0.85rem; }
.topic-title { font-size: 1.3rem; font-weight: 700; margin: 4px 0 0; }

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
th { color: var(--muted); font-weight: 600; }

.badge { padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.badge.good { background: var(--good-bg); color: var(--good-ink); }
.badge.pending { background: var(--pending-bg); color: var(--pending-ink); }
.badge.role { background: var(--bg); color: var(--brand); border: 1px solid var(--line); }

.role-topic { padding: 10px 0; border-bottom: 1px solid var(--line); }
.role-topic:last-of-type { border-bottom: none; }
.small-title { font-size: 1rem; margin: 6px 0 0; }

.notice { padding: 16px; border-radius: 10px; margin: 16px 0; }
.notice.good { background: var(--good-bg); color: var(--good-ink); }

.quiz-q { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 14px 0; }
.quiz-q legend { font-weight: 600; padding: 0 6px; }
.option { font-weight: 400; display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.option input { width: auto; }

.cert { border: 3px solid var(--brand); border-radius: 16px; padding: 6px; }
.cert-inner { border: 1px solid var(--line); border-radius: 12px; padding: 40px; text-align: center; background: var(--card-bg); }
.cert-eyebrow { color: var(--brand); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.8rem; }
.cert-inner h1 { margin: 10px 0 0; }
.cert-line { color: var(--muted); margin: 4px 0; }
.cert-inner h2 { margin: 4px 0; }
.cert-meta { display: flex; justify-content: center; gap: 40px; margin-top: 24px; font-size: 0.9rem; }

@media print {
  .topbar, .foot, .no-print { display: none !important; }
  body { background: white; }
}

/* --- Marketing site + blog additions (r-safety-hub-website) --- */

.topbar { justify-content: space-between; flex-wrap: wrap; }
.topbar-left { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 600; }
.nav-links a:hover { color: var(--brand); }
.nav-links a.cta { color: white; background: var(--brand); padding: 8px 16px; border-radius: 8px; }
.nav-links a.cta:hover { background: var(--brand-dark); }

.blog-list { display: grid; gap: 20px; }
.blog-card { background: var(--card-bg); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; }
.blog-card h2 { margin: 0 0 6px; font-size: 1.25rem; }
.blog-card h2 a { color: var(--ink); text-decoration: none; }
.blog-card h2 a:hover { color: var(--brand); }
.blog-card .post-meta { color: var(--muted); font-size: 0.82rem; margin-bottom: 10px; }
.blog-card .dek { color: var(--muted); margin: 0; }

.post-header { margin-bottom: 28px; }
.post-header h1 { margin: 0 0 8px; font-size: 1.9rem; }
.post-meta { color: var(--muted); font-size: 0.85rem; }
.post-hero { width: 100%; max-width: 100%; border-radius: 14px; margin: 18px 0; }
.post-body { line-height: 1.65; font-size: 1.02rem; }
.post-body h2 { margin-top: 32px; }
.post-body p { margin: 0 0 16px; }

.empty-state { text-align: center; color: var(--muted); padding: 60px 20px; }

/* --- Homepage rebuild 2026-09-18 (design brought in line with the Owner Dashboard concept:
       cream background, orange accent, cards; hero copy from the class prototype) --- */

.wrap { max-width: 1040px; }

.hero { padding: 8px 0 28px; }
.eyebrow {
  display: inline-block;
  background: var(--card-bg);
  border: 1px solid var(--line);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 0 16px;
}
.hero-copy { max-width: 560px; }
.hero h1 { font-size: 2.55rem; line-height: 1.12; letter-spacing: -0.01em; margin-top: 0; }
.hero h1 .accent { color: var(--brand); }
@media (max-width: 760px) { .hero h1 { font-size: 2rem; } }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn.primary { background: var(--brand); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.ghost:hover { background: var(--card-bg); color: var(--brand); }

.hazard-stripe {
  height: 10px;
  border-radius: 999px;
  margin: 28px 0 44px;
  background: repeating-linear-gradient(
    135deg,
    var(--safety-yellow) 0 18px,
    #241a12 18px 36px      /* fixed dark, not var(--ink): in dark mode --ink is near-white,
                              which turned the hazard stripe into yellow-and-cream */
  );
  opacity: 0.85;
}

section { margin-bottom: 56px; }
section h2 { font-size: 1.6rem; margin: 0 0 8px; }
.section-sub { margin-top: 0; }

.video-band { text-align: center; }
.video-frame {
  margin: 20px auto 0;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(36, 26, 18, 0.12);
}
.video-frame iframe, .video-frame video { width: 100%; height: 100%; border: 0; display: block; }
.video-frame.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-style: dashed;
  border-width: 2px;
  box-shadow: none;
}
.video-frame.placeholder p { margin: 0; font-weight: 700; color: var(--muted); }

.problem { max-width: 720px; }
.problem p, .portable p { font-size: 1.05rem; line-height: 1.6; }
.big-quote {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--brand);
  margin: 10px 0 14px;
  line-height: 1.15;
}

.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.steps li {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
  position: relative;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  margin-bottom: 10px;
}
.steps h3 { margin: 0 0 6px; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--muted); }

.feature-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); margin-top: 20px; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 14px;
  padding: 22px 24px;
}
.feature-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.feature-card p { margin: 0; color: var(--muted); }

.price-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); margin: 20px 0 14px; }
@media (max-width: 760px) { .price-grid { grid-template-columns: 1fr; } }
.price-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
}
.price-card h3 { margin: 0 0 10px; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.price { font-size: 2rem; font-weight: 800; margin: 0 0 10px; color: var(--ink); }
.price-note { display: block; font-size: 0.82rem; font-weight: 600; color: var(--muted); letter-spacing: 0; text-transform: none; }
.price-card p:last-child { margin-bottom: 0; color: var(--muted); }

.portable { max-width: 720px; }
.blog-cta { text-align: center; }
.blog-cta h2 { margin-top: 0; }

/* Logo mark in the header — Cliff's stamp, added 2026-09-18 */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 48px; height: 48px; display: block; }
.brand span { color: var(--ink); }
.topbar { align-items: center; }
.topbar-left { align-items: center; }
@media (max-width: 760px) { .brand-mark { width: 40px; height: 40px; } }

/* One-price band — Cliff set the company price at $1 + tax per view, 2026-09-18 */
.price-band {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  margin: 20px 0 18px;
}
.price-big { font-size: 3.2rem; font-weight: 800; margin: 0; line-height: 1; }
.price-big span { font-size: 1.1rem; font-weight: 600; color: var(--muted); }
.price-line { margin: 10px 0 0; font-size: 1.1rem; color: var(--muted); }
.price-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .price-notes { grid-template-columns: 1fr; } .price-big { font-size: 2.6rem; } }
.price-notes h3 { margin: 0 0 6px; font-size: 1.05rem; }
.price-notes p { margin: 0; color: var(--muted); }

/* --- Inner pages: Product, Pricing, About, Get started (2026-09-19) --- */

.page-head { margin-bottom: 44px; max-width: 760px; }
.page-head h1 { font-size: 2.3rem; line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.01em; }
@media (max-width: 760px) { .page-head h1 { font-size: 1.9rem; } }

.narrow-page { max-width: 640px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 18px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.two-col h3 { margin: 0 0 6px; font-size: 1.1rem; }
.two-col p { margin: 0 0 12px; color: var(--muted); }

.plain-list { margin: 12px 0 28px; padding-left: 20px; }
.plain-list li { margin-bottom: 10px; color: var(--muted); line-height: 1.5; }
.plain-list li strong { color: var(--ink); }

.pricing .price-band { margin-top: 0; }

/* "Opening soon" tag — for things that are real and built but not yet wired to the site
   (Cliff, 2026-09-19: an honest placeholder beats either a dead link or silence) */
.soon {
  display: inline-block;
  background: var(--safety-yellow);
  color: #241a12;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  vertical-align: middle;
}
.soon-note { font-size: 0.86rem; }

/* --- Blog pages brought in line with the rest of the site, 2026-09-19 --- */

.blog-list { display: grid; gap: 18px; }
.blog-card {
  border-top: 4px solid var(--brand);
  padding: 22px 26px;
}
.blog-card .post-meta { margin: 0 0 6px; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
.blog-card h2 { margin: 0 0 8px; font-size: 1.3rem; line-height: 1.25; }
.blog-card .dek { color: var(--muted); margin: 0 0 12px; line-height: 1.5; }
.read-on { margin: 0; }
.read-on a { color: var(--brand); font-weight: 700; text-decoration: none; font-size: 0.92rem; }
.read-on a:hover { text-decoration: underline; }

.post { max-width: 720px; margin: 0 auto; }
.back-link { margin: 0 0 18px; }
.back-link a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.back-link a:hover { color: var(--brand); }
.post-header h1 { font-size: 2.1rem; line-height: 1.18; margin: 4px 0 12px; }
.post-header .post-meta { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; margin: 0; }
.post-body { line-height: 1.7; font-size: 1.05rem; }
.post-body h2 { margin-top: 36px; font-size: 1.35rem; }
.post-foot { margin-top: 44px; text-align: center; }
.post-foot h2 { font-size: 1.2rem; margin-top: 0; }

.empty-state.card { text-align: center; }

/* Phone header — "How it works" was wrapping onto three lines and squeezing the button (2026-09-19) */
@media (max-width: 760px) {
  .topbar { padding: 12px 16px; gap: 8px; }
  .topbar-left { width: 100%; }
  .tagline { display: none; }          /* the logo and wordmark already say it */
  .nav-links { width: 100%; flex-wrap: wrap; gap: 14px; row-gap: 10px; }
  .nav-links a { font-size: 0.9rem; white-space: nowrap; }
  .nav-links a.cta { margin-left: auto; padding: 9px 16px; }
  .wrap { padding-top: 24px; }
}

/* --- Outdoor readability, 2026-09-19 -----------------------------------------
   Cliff works in the field and reads his phone in direct sun; he runs his
   devices in dark mode for exactly that reason. Two real problems were measured
   and fixed here rather than guessed at:

   1. Body text in light mode sat at 5.9:1 against the page. Fine indoors, thin
      in glare. The muted colour above is now 7.0:1 — the AAA level for body text.
   2. In DARK mode the buttons were white text on light orange: 2.26:1, which is
      barely legible on any screen. Button text in dark mode is now near-black on
      that orange: 7.9:1.
   ------------------------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
  .btn, .nav-links a.cta { color: #1c1611; }
  .btn.ghost { color: var(--ink); }
  .step-num { color: #1c1611; }
  .hazard-stripe { opacity: 1; }
  .video-frame.placeholder p { color: var(--ink); }
}

/* Slightly heavier body text everywhere — thin type is the first thing to
   disappear in glare. */
.lead, .muted, .steps p, .feature-card p, .price-notes p, .two-col p, .plain-list li {
  font-weight: 450;
}

/* --- English / Español switch, 2026-09-26 (draft, hidden until SPANISH_ENABLED) ---------------
   Outlined in the page's own ink colour so it clears the 7:1 outdoor standard in light and dark,
   and reads as a switch rather than one more menu link. */
.nav-links a.lang-toggle {
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.85rem;
}
.nav-links a.lang-toggle:hover { color: var(--brand); border-color: var(--brand); }

/* --- Privacy link in the footer, 2026-10-01 ---------------------------------------------------
   Inherits the footer's own --muted colour rather than the brand orange, so it keeps the
   measured 7.0:1 (light) / 9.5:1 (dark) contrast the rest of the footer already clears.
   Underlined so it still reads as a link without relying on colour alone. */
.foot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.foot a:hover { color: var(--brand); text-decoration-thickness: 2px; }
.foot-sep { margin: 0 8px; opacity: 0.6; }
