@custom-variant dark (&:is(.dark *));

:root {
  --background: #fafafa;
  --foreground: #09090b;
  --card: #ffffff;
  --card-foreground: #09090b;
  --popover: #ffffff;
  --popover-foreground: #09090b;

  /* Safety Orange for High Urgency */
  /* ROADMAP-1039: #c2410c passes WCAG AA for white text on orange and orange
   * text on the light pages; the brighter #ea580c comes back on dark sections. */
  --primary: #c2410c;
  --primary-foreground: #ffffff;

  /* Dark Zinc for contrast sections */
  --secondary: #18181b;
  --secondary-foreground: #fafafa;

  --muted: #f4f4f5;
  --muted-foreground: #52525b;
  --accent: #fff7ed;
  --accent-foreground: #9a3412;
  --destructive: #dc2626;
  --destructive-foreground: #ffffff;
  --border: #e4e4e7;
  --input: #e4e4e7;
  --ring: #c2410c;
  --radius: 0px; /* Brutalist/sharp edges */
}

/* ROADMAP-1039 (accessibility): orange text stays bright on the dark sections,
 * orange buttons keep the darker shade so white text on them passes AA, and
 * grey helper text on dark backgrounds is lifted to a readable shade. */
.bg-black,
.bg-secondary,
.bg-zinc-900 {
  --primary: #ea580c;
}
.bg-zinc-800 {
  --primary: #f97316;
}
.bg-primary,
.hover\:bg-primary:hover {
  --primary: #c2410c;
}
/* An orange band holding both white and black text (about-page stats). */
.bg-primary:has(.text-black) {
  --primary: #d0470c;
}
.bg-zinc-200 .text-red-600 {
  color: #b91c1c;
}
.bg-zinc-200 .text-zinc-500 {
  color: #52525b;
}
.bg-black .text-zinc-500,
.bg-secondary .text-zinc-500,
.bg-zinc-900 .text-zinc-500,
.bg-zinc-800 .text-zinc-500,
.bg-black .text-zinc-600,
.bg-secondary .text-zinc-600,
.bg-zinc-900 .text-zinc-600 {
  color: #a1a1aa;
}
/* Tinted orange chips on light pages need the deeper orange for their text. */
.bg-primary\/20.text-primary {
  color: #9a3412;
}
.bg-black .bg-primary\/20.text-primary,
.bg-secondary .bg-primary\/20.text-primary,
.bg-zinc-900 .bg-primary\/20.text-primary {
  color: var(--primary);
}

/* ROADMAP-1039: decorative watermark numbers are drawn from data-rl-num so
 * contrast checkers don't read them as (low-contrast) text. */
[data-rl-num]::before {
  content: attr(data-rl-num);
}

@layer base {
  /* ROADMAP-230: mobile safety net. `overflow-x: clip` blocks horizontal
   * scroll from any element that escapes the viewport without breaking
   * `position: sticky`. Both html and body covered for Safari < 16. */
  html,
  body {
    overflow-x: clip;
  }
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  span,
  a,
  li {
    overflow-wrap: anywhere;
    word-wrap: break-word;
  }

  body {
    background-color: var(--background);
    color: var(--foreground);
  }

  .grayscale-map {
    filter: grayscale(100%) contrast(120%) invert(90%) hue-rotate(180deg);
  }
}

/* Rank and rent edits: referral pages, disclaimer, call bar spacing */
body { padding-bottom: 84px; }
.rr-disclaimer { border-top: 1px solid #27272a; padding: 20px 0 4px; }
.rr-disclaimer p { color: #d4d4d8; font-size: 14px; line-height: 1.6; max-width: 960px; }
.rr-disclaimer strong { color: #fff; }
.rr-wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }
.rr-hero { background: #18181b; color: #fafafa; padding: 170px 0 70px; border-bottom: 8px solid #c2410c; }
.rr-hero h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 900; text-transform: uppercase; line-height: 1.05; margin: 12px 0 20px; letter-spacing: -0.02em; }
.rr-kicker { display: inline-block; background: #c2410c; color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; padding: 4px 12px; }
.rr-lead { font-size: 19px; line-height: 1.6; color: #d4d4d8; margin-bottom: 28px; }
.rr-btn { display: inline-block; background: #c2410c; color: #fff; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; padding: 16px 28px; }
.rr-btn:hover { background: #9a3412; }
.rr-btn-dark { background: #000; }
.rr-block { padding: 64px 0; background: var(--background); }
.rr-alt { background: var(--muted); }
.rr-block h2, .rr-cta h2 { font-size: clamp(24px, 3.4vw, 36px); font-weight: 900; text-transform: uppercase; letter-spacing: -0.01em; margin-bottom: 18px; }
.rr-block p { font-size: 17px; line-height: 1.7; color: #3f3f46; margin-bottom: 14px; }
.rr-block a { color: #c2410c; text-decoration: underline; }
.rr-steps { list-style: none; padding: 0; display: grid; gap: 16px; counter-reset: s; }
.rr-steps li { background: #fff; border: 2px solid #000; padding: 20px 22px 18px 70px; position: relative; counter-increment: s; }
.rr-steps li::before { content: counter(s); position: absolute; left: 20px; top: 18px; width: 34px; height: 34px; background: #c2410c; color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.rr-steps h3 { font-weight: 900; text-transform: uppercase; font-size: 17px; margin-bottom: 6px; }
.rr-steps p { margin: 0; font-size: 16px; }
.rr-cta { background: #c2410c; color: #fff; padding: 60px 0; text-align: center; }
.rr-cta p { font-size: 18px; margin-bottom: 24px; }

/* Final CTA: two call buttons on every page */
.rr-cta-btns{display:flex;flex-wrap:wrap;gap:24px;justify-content:center;align-items:center;margin-top:8px}
.rr-cta-btns.rr-left{justify-content:flex-start}
.rr-cta-note{font-size:17px;color:#52525b;margin-bottom:24px;line-height:1.6}
.rr-cbtn{display:inline-flex;align-items:center;justify-content:center;font-weight:900;text-transform:uppercase;letter-spacing:.14em;padding:18px 38px;font-size:18px;line-height:1;text-decoration:none;transition:transform .15s}
.rr-cbtn:hover{transform:translate(-2px,-2px)}
.rr-cbtn-solid{background:#000;color:#fff;box-shadow:8px 8px 0 0 rgba(194,65,12,.35)}
.bg-primary .rr-cbtn-solid,.rr-cta .rr-cbtn-solid{box-shadow:8px 8px 0 0 rgba(255,255,255,.3)}
.rr-cbtn-outline{background:transparent;color:#c2410c;border:3px solid #c2410c;font-size:16px;padding:17px 34px}
.bg-primary .rr-cbtn-outline,.rr-cta .rr-cbtn-outline,.bg-black .rr-cbtn-outline,.bg-secondary .rr-cbtn-outline,.bg-zinc-900 .rr-cbtn-outline{color:#fff;border-color:#fff}
.bg-primary .rr-cbtn-outline:hover,.rr-cta .rr-cbtn-outline:hover{background:#fff;color:#c2410c}
@media (max-width:640px){.rr-cbtn{width:100%}}
