/* Runlevel Security — components (R identity, IBM-influenced: 8px grid, square corners, Plex Sans + Mono)
   Load order: fonts/fonts.css → css/tokens.css → css/runlevel.css
   Class prefix: rl-. Everything reads the tokens, so a section with data-theme="dark" turns navy automatically. */

:root { --button-y: 15px; --button-x: 24px; --header-height: 96px; --logo-width: 200px; }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
img, svg { max-width: 100%; }
a { color: inherit; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Layout */
.rl-shell { width: min(var(--shell-max), 100% - 2 * var(--space-4)); margin: 0 auto; }
.rl-section { position: relative; overflow: hidden; background: var(--surface); color: var(--ink); padding: var(--space-11) 0; }
.rl-section--soft { background: var(--surface-soft); }
.rl-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.rl-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
@media (max-width: 820px) {
  .rl-shell { width: calc(100% - 2 * var(--space-2)); }
  .rl-section { padding: 56px 0; }
  .rl-grid-2, .rl-grid-3 { grid-template-columns: 1fr; }
}

/* Type */
.rl-display { font-size: clamp(42px, 5vw, 72px); line-height: 1.1; font-weight: 300; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.rl-h2 { font-size: clamp(31px, 3.4vw, 44px); line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 var(--space-2); text-wrap: balance; }
.rl-quote { font-size: clamp(28px, 3vw, 38px); line-height: 1.25; font-weight: 300; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
.rl-display strong, .rl-quote strong { font-weight: 600; }
.rl-lead { font-size: 19px; line-height: 1.55; font-weight: 300; color: var(--ink-muted); max-width: 760px; margin: 0; }
.rl-data { font-family: var(--font-mono); font-size: 13px; line-height: 1.6; color: var(--ink-muted); }

/* Three levels: Prepare / Respond / Recover. The secondary device, from the original three-bar mark.
   Outer bars navy on light, slate on dark; the middle (Respond) bar is always brick-red. */
.rl-levels { --lv-h: 24px; display: flex; flex-direction: column; gap: calc(var(--lv-h) * 0.58); width: 240px; }
.rl-levels > span { display: block; height: var(--lv-h); background: var(--levels-outer); }
.rl-levels > span:nth-child(2) { background: var(--accent); }
.rl-levels--bleed { position: absolute; right: 0; }
@media (max-width: 820px) { .rl-levels--bleed { display: none; } }
.rl-levels--sm { --lv-h: 6px; width: 40px; }
.rl-level-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.rl-level-list li { display: grid; grid-template-columns: 56px 1fr; gap: var(--space-3); align-items: start; padding-top: var(--space-3); border-top: 1px solid var(--border); }
.rl-level-list li::before { content: ""; height: 12px; margin-top: 8px; background: var(--levels-outer); }
.rl-level-list li:nth-child(2)::before { background: var(--accent); }
.rl-level-list h3 { font-size: 22px; line-height: 1.25; font-weight: 600; margin: 0 0 8px; }
.rl-level-list p { margin: 0; color: var(--ink-muted); }


body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.rl-row { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; padding: var(--space-2); }

/* Button */
.rl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; border-radius: var(--radius-none); border: 1px solid transparent; font-family: inherit; font-size: 14px; line-height: 1.25; font-weight: 600; padding: var(--button-y) var(--button-x); min-height: var(--control-height); cursor: pointer; transition: background .15s, color .15s; box-sizing: border-box; }
.rl-btn:focus-visible, .rl-link:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
.rl-btn-primary { color: var(--on-accent); background: var(--accent); }
.rl-btn-primary:hover { background: var(--accent-hover); }
.rl-btn-outline { border-color: rgba(255,255,255,.7); color: #fff; background: transparent; }
.rl-btn-outline:hover { background: rgba(255,255,255,.1); }
.rl-btn-dark { background: var(--midnight-navy); color: #fff; }
.rl-btn-line { color: var(--ink); border-color: var(--ink); background: transparent; }
.rl-btn-text { padding-left: 0; padding-right: 0; color: var(--ink); background: transparent; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.rl-btn-block { width: 100%; }

/* Kicker, slash, full stop, Rule */
.rl-kicker { margin: 0 0 16px; color: var(--ink); font-size: 12px; line-height: 1.5; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.rl-kicker.rl-kicker-red { color: var(--kicker); }
.rl-slash { color: var(--accent); padding: 0 .35em; }
.rl-stop { color: var(--accent); }
.rl-rule { width: var(--rule-width); height: var(--rule-thickness); background: var(--accent); margin: 24px 0; border: 0; }

/* The notch: the R's red cut, mirrored into a corner. Decorative. */
.rl-notch { position: absolute; right: 0; bottom: 0; background: var(--accent); clip-path: polygon(100% 0, 70.2% 0, 0 87%, 10.5% 100%, 100% 100%); pointer-events: none; }

/* Card */
.rl-card { position: relative; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-none); padding: var(--space-4); color: var(--ink); box-sizing: border-box; }
.rl-card p { color: var(--ink-muted); margin: 0 0 16px; }
.rl-card p:last-child { margin-bottom: 0; }
.rl-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.rl-card-kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--kicker); }
.rl-card-title { font-size: 22px; line-height: 1.25; font-weight: 600; margin: 0 0 16px; }
.rl-symbol { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); font-size: 18px; color: var(--accent); line-height: 1; flex: 0 0 auto; }
.rl-card-link { font-weight: 600; color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.rl-card-callout { background: var(--midnight-navy); color: #fff; border-color: var(--midnight-navy); }
.rl-card-callout p { color: #b6c8d2; }
.rl-card-callout .rl-card-kicker { color: #f3a291; }
.rl-card-callout .rl-symbol { border-color: #36536e; }

/* Step */
.rl-step { padding: 24px 24px 32px; background: var(--surface-raised); border-top: 2px solid var(--accent); min-height: 208px; box-sizing: border-box; color: var(--ink); }
.rl-step-number { font-family: var(--font-mono); color: var(--kicker); font-size: 12px; letter-spacing: .04em; margin-bottom: 24px; }
.rl-step-title { font-size: 20px; line-height: 1.25; font-weight: 600; margin: 0 0 8px; }
.rl-step p { font-size: 14px; color: var(--ink-muted); line-height: 1.5; margin: 0; }
.rl-steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--space-2); }
@media (max-width: 820px) { .rl-steps { grid-template-columns: repeat(2, minmax(0,1fr)); } .rl-step { min-height: 184px; } }
@media (max-width: 480px) { .rl-steps { grid-template-columns: 1fr; } .rl-step { min-height: 0; } }

/* NumberedList */
.rl-numbered { list-style: none; padding: 0; margin: 24px 0 0; }
.rl-numbered li { position: relative; padding: 0 0 24px 48px; margin: 0; border-left: 1px solid var(--border); left: 16px; }
.rl-numbered li:last-child { border-left-color: transparent; }
.rl-num { position: absolute; left: -16px; top: 0; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); width: 32px; height: 32px; border-radius: var(--radius-round); font-family: var(--font-mono); font-size: 11px; font-weight: 500; }
.rl-numbered h3 { font-size: 20px; line-height: 1.25; font-weight: 600; margin: 0 0 8px; padding-top: 4px; }
.rl-numbered p { margin: 0; color: var(--ink); }

/* Note */
.rl-note { border-left: 4px solid var(--accent); background: #f9f9f6; padding: 16px 24px; color: var(--ink); font-size: 14px; line-height: 1.5; }
[data-theme="dark"] .rl-note { background: var(--navy-raised); color: #edf3f6; }

/* ProofLine */
.rl-proof { display: flex; gap: 24px; align-items: center; padding: 24px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--ink-muted); font-size: 14px; }
.rl-proof strong { color: var(--ink); font-size: 16px; font-weight: 600; }
@media (max-width: 820px) { .rl-proof { flex-direction: column; align-items: flex-start; gap: 4px; } }

/* UrgentBar */
.rl-urgent { background: var(--red-urgent); color: #fff; padding: 12px 16px; text-align: center; font-size: 14px; }
.rl-urgent a { font-weight: 700; color: #fff; }

/* SiteHeader */
.rl-header { background: var(--navy-header); color: #fff; border-bottom: 1px solid rgba(255,255,255,.12); }
.rl-header-inner { min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 0 var(--space-4); max-width: var(--shell-max); margin: 0 auto; box-sizing: border-box; }
.rl-header .rl-logo { display: block; width: var(--logo-width); height: auto; }
.rl-nav { display: flex; align-items: center; gap: 32px; }
.rl-nav-link { font-size: 14px; text-decoration: none; font-weight: 500; color: #e3e9ed; white-space: nowrap; }
.rl-nav-link:hover, .rl-nav-link[aria-current=page] { color: #fff; }
.rl-nav-link[aria-current=page] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 10px; text-decoration-thickness: 2px; }
.rl-mobile-call { display: none; }
@media (max-width: 820px) {
  .rl-header-inner { min-height: 80px; gap: 8px; padding: 0 var(--space-2); }
  .rl-header .rl-logo { width: 160px; }
  .rl-nav { display: none; }
  .rl-mobile-call { display: inline-flex; align-items: center; color: #fff; background: var(--accent); font-size: 12px; font-weight: 600; min-height: 40px; padding: 8px 12px; text-decoration: none; margin-left: auto; white-space: nowrap; }
}

/* Hero */
.rl-hero { position: relative; display: flex; align-items: center; overflow: hidden; color: #fff; background-color: var(--midnight-navy); background-size: cover; background-position: center 55%; min-height: 560px; }
.rl-hero-inner { position: relative; z-index: 2; padding: 64px var(--space-4) 80px; max-width: var(--shell-max); margin: 0 auto; width: 100%; box-sizing: border-box; }
.rl-hero .rl-kicker { color: #fff; }
.rl-hero h1 { font-size: clamp(42px, 5vw, 72px); font-weight: 300; line-height: 1.1; letter-spacing: -.02em; max-width: 840px; margin: 24px 0; text-wrap: balance; }
.rl-hero h1 strong { font-weight: 600; }
.rl-hero-text { max-width: 640px; color: #d4e0e7; font-size: 19px; font-weight: 300; line-height: 1.55; margin: 0; }
.rl-hero-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: 32px; }
.rl-hero-location { position: absolute; left: calc(max(0px, (100% - var(--shell-max)) / 2) + var(--space-4)); bottom: 24px; z-index: 2; font-family: var(--font-mono); font-size: 13px; color: #b6c8d2; }
.rl-hero .rl-notch { width: 248px; height: 200px; z-index: 1; }
.rl-hero-photo { display: none; }
@media (max-width: 820px) {
  .rl-hero { min-height: 0; display: block; }
  .rl-hero h1 { font-size: clamp(35px, 7.6vw, 47px); line-height: 1.15; }
  .rl-hero-text { font-size: 16px; line-height: 1.6; }
  .rl-hero .rl-notch { width: 112px; height: 90px; }
  .rl-hero-location { display: none; }
}

/* SiteFooter */
.rl-footer { background: var(--navy-deep); color: #d3dfe4; padding: 64px var(--space-4) 32px; }
.rl-footer-grid { display: grid; grid-template-columns: 1.3fr .8fr .65fr; gap: 48px; max-width: var(--shell-max); margin: 0 auto; }
.rl-footer .rl-logo { width: var(--logo-width); display: block; margin-bottom: 24px; }
.rl-footer p { font-size: 14px; line-height: 1.6; color: #b6c8d2; margin: 0; }
.rl-footer h3 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #fff; font-weight: 600; margin: 0 0 16px; }
.rl-footer ul { list-style: none; margin: 0; padding: 0; font-family: var(--font-mono); font-size: 13px; line-height: 2; }
.rl-footer a { color: #d3dfe4; text-underline-offset: 4px; }
.rl-footer-legal { font-family: var(--font-mono); font-size: 12px; color: #8da1ae; margin: 48px auto 0; border-top: 1px solid #36536e; padding-top: 24px; max-width: var(--shell-max); }
@media (max-width: 820px) { .rl-footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; } .rl-footer-grid > div:first-child { grid-column: 1 / -1; } }
