/* Runlevel Security: site layer on top of the brand pack.
   The pack's css/tokens.css and css/runlevel.css stay untouched so a new pack can drop in.
   This file fixes the gaps found while building and adds the pieces the pack doesn't have. */

/* ---------- One column line ----------
   The pack's header and hero start 32px right of .rl-shell. Line everything up with the sections. */
.rl-header-inner,
.rl-hero-inner { max-width: calc(var(--shell-max) + 2 * var(--space-4)); }
.rl-hero-location { left: max(var(--space-4), calc((100% - var(--shell-max)) / 2)); margin: 0; }

/* ---------- Utilities ---------- */
.rl-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rl-skip { position: absolute; left: var(--space-2); top: -64px; z-index: 50; background: #fff; color: var(--midnight-navy); padding: 8px 16px; font-weight: 600; }
.rl-skip:focus { top: var(--space-2); outline: 3px solid var(--brick-red); outline-offset: 2px; }
.rl-mt-4 { margin-top: var(--space-4); }
.rl-mt-6 { margin-top: var(--space-6); }
.rl-icon { width: 1em; height: 1em; flex: none; }
.rl-card-link .rl-icon { vertical-align: -0.125em; margin-left: 4px; }
.rl-urgent a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.rl-footer a:focus-visible, .rl-dock a:focus-visible, .rl-bio a:focus-visible, .rl-person a:focus-visible,
.rl-contact-lines a:focus-visible, .rl-menu > summary:focus-visible, .rl-home:focus-visible {
  outline: 3px solid var(--focus-ring); outline-offset: 4px;
}
.rl-home { display: block; }

/* ---------- First screen ----------
   Banner, header and hero fill the whole first screen so no strip of the next section shows under it. */
.masthead--full { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: var(--midnight-navy); }
.masthead--full .rl-hero { flex: 1 0 auto; display: flex; }
/* Notch: about 30% of the composition's height, in the pack's 248:200 proportion. */
.rl-hero .rl-notch { height: 30%; width: auto; aspect-ratio: 248 / 200; }

/* Interior page heroes: a wide banner, so the notch is 45% of its height. */
.rl-hero--page { min-height: 440px; }
.rl-hero--page .rl-hero-inner { padding-block: 64px 80px; }
.rl-hero--page h1 { font-size: clamp(40px, 4.2vw, 60px); line-height: 1.12; }
.rl-hero--page .rl-notch { height: 45%; }

/* ---------- Header: menu links ----------
   Eric (11-08): bigger, cleaner menu links. On hover or keyboard focus a short red line draws in under the
   link, the same motion as the Services bars; nothing moves until someone points at a link. */
.rl-nav { gap: 40px; }
.rl-nav .rl-nav-link { position: relative; padding: 8px 0; font-size: 17px; font-weight: 500; letter-spacing: .01em; color: #e3e9ed; }
.rl-nav .rl-nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left center; transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.rl-nav .rl-nav-link:hover, .rl-nav .rl-nav-link:focus-visible { color: #fff; }
.rl-nav .rl-nav-link:hover::after, .rl-nav .rl-nav-link:focus-visible::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .rl-nav .rl-nav-link::after { transition: none; } }

/* ---------- Header: phone menu ----------
   The pack hides the nav under 820px with nothing in its place. */
.rl-header { position: relative; z-index: 10; }
.rl-menu { display: none; }
@media (max-width: 960px) and (min-width: 821px) {
  .rl-nav { gap: 28px; }
  .rl-header-inner { gap: 24px; }
}

/* ---------- Cards ---------- */
.rl-card { display: flex; flex-direction: column; }
.rl-card > p:last-child { margin-top: auto; }
.rl-card .rl-card-link { color: var(--ink); }
.rl-symbol .rl-icon { width: 18px; height: 18px; }

/* ---------- Proof line with "Meet Eric" ---------- */
.rl-proof .rl-btn { margin-left: auto; flex: none; }

/* ---------- Closing band: three levels bleeding off the right edge ---------- */
.rl-close .rl-levels--bleed { --lv-h: 32px; width: 220px; top: 50%; transform: translateY(-50%); }
.rl-close-body { position: relative; max-width: min(820px, 100% - 260px); }
.rl-close .rl-hero-actions { margin-top: 0; }

/* ---------- Services ----------
   Three equal panels, one structure: thick bar, small label, heading, services. Every panel in a row is the
   same height with the same padding, so labels, headings and first services line up across the row.
   Prepare and Recover white with a navy bar, Respond navy with a red bar. (The Personal column is parked in
   parked/personal-panel.html; Eric took it out on 2026-11-08.)
   The bars draw in once, left to right, when the section scrolls into view (site.js). */
.rl-phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); margin-top: var(--space-6); }
.rl-phase { position: relative; padding: calc(12px + var(--space-3)) var(--space-3) var(--space-4); background: var(--surface-raised); border: 1px solid var(--border); scroll-margin-top: var(--space-4); }
.rl-phase::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 12px; background: var(--levels-outer); transform-origin: left center; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.rl-phase:nth-child(2)::before { transition-delay: .3s; }
.rl-phase:nth-child(3)::before { transition-delay: .6s; }
.js .rl-phases:not(.is-in) .rl-phase::before { transform: scaleX(0); }
/* The pack's reduced-motion rule targets * and misses pseudo-elements, so switch the bars off here. */
@media (prefers-reduced-motion: reduce) {
  .rl-phase::before { transition: none; }
  .js .rl-phases:not(.is-in) .rl-phase::before { transform: none; }
}
.rl-phase--dark { background: var(--midnight-navy); border-color: var(--midnight-navy); color: #fff; }
.rl-phase--dark::before { background: var(--accent); }
.rl-phase-when { margin: 0 0 8px; font-size: 12px; line-height: 1.5; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--ink-muted); white-space: nowrap; }
.rl-phase-name { margin: 0 0 var(--space-3); font-size: clamp(26px, 2.2vw, 32px); line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; }
.rl-phase-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.rl-phase-list li { padding-top: var(--space-3); border-top: 1px solid var(--border); scroll-margin-top: var(--space-4); }
.rl-phase-list h4 { margin: 0 0 4px; font-size: 18px; line-height: 1.4; font-weight: 600; }
.rl-phase-list p { margin: 0; color: var(--ink-muted); }
.rl-svc-promise { color: var(--ink); }
@media (max-width: 860px) {
  .rl-phases { grid-template-columns: 1fr; row-gap: var(--space-6); }
}

/* ---------- About ---------- */
.rl-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-6); align-items: start; }
.rl-person { border-top: 2px solid var(--accent); padding-top: var(--space-3); }
.rl-person p { margin: 0; }
.rl-person-name { font-size: 22px; line-height: 1.25; font-weight: 600; margin-bottom: 8px !important; }
.rl-person .rl-data { margin-bottom: 16px; }
.rl-person a, .rl-bio a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.rl-person-links { display: flex; gap: var(--space-3); margin-top: 8px !important; font-weight: 500; }
.rl-bio { max-width: 680px; }
.rl-bio > p { margin: 0 0 var(--space-3); }
.rl-bio .rl-lead { color: var(--ink); }
.rl-bio .rl-hl { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
/* Eric (11-08): no underline on the "open-source tooling" link in the bio; it shows on hover, and focus keeps its outline. */
.rl-bio > p a { text-decoration: none; }
.rl-bio > p a:hover { text-decoration: underline; }
/* Press mention: the pack's note (red bar on the left, faint tint) so it stands out lightly from the bio. */
.rl-press-note { margin-top: var(--space-4); max-width: 640px; text-wrap: pretty; }
.rl-press-note p { margin: 0 0 4px; color: var(--ink-muted); }
.rl-press-note a { font-size: 16px; line-height: 1.5; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.rl-press-note a:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
.rl-press-note .rl-icon { width: 13px; height: 13px; margin-left: 6px; color: var(--accent); vertical-align: -1px; }
.rl-about .rl-h2 { margin-bottom: var(--space-4); }
.rl-person-role { color: var(--ink-muted); margin-bottom: 16px !important; }

/* Contact lines */
.rl-contact-lines { margin: var(--space-4) 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px var(--space-3); font-family: var(--font-mono); font-size: 15px; line-height: 1.6; }
.rl-contact-lines dt { color: var(--ink-muted); }
.rl-contact-lines dd { margin: 0; }
.rl-contact-lines a { color: var(--ink); text-underline-offset: 4px; }
.rl-close .rl-lead { margin-top: var(--space-2); }

/* ---------- Footer: one slim line ----------
   Contact details live in the Contact section just above, so the footer doesn't repeat them. */
.rl-footer { padding: var(--space-4); border-top: 1px solid #36536e; }
.rl-footer-bar { max-width: var(--shell-max); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.rl-footer .rl-footer-bar .rl-logo { width: 160px; margin: 0; }
.rl-footer .rl-footer-bar p { font-size: 16px; color: var(--ink-muted); }
.rl-keep { white-space: nowrap; }  /* phrases that shouldn't split across lines */

/* ---------- Docked footer bar ----------
   Slides up once the visitor scrolls and steps aside while the footer or closing band is on screen.
   site.js toggles .is-shown, so without JS it never appears. */
.rl-dock { position: fixed; inset: auto 0 0 0; z-index: 20; background: var(--navy-deep); color: #d3dfe4; border-top: 1px solid #36536e; transform: translateY(100%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
.rl-dock.is-shown { transform: none; visibility: visible; transition: transform .25s ease; }
.rl-dock-inner { max-width: calc(var(--shell-max) + 2 * var(--space-4)); margin: 0 auto; padding: var(--space-2) var(--space-4) calc(var(--space-2) + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.rl-dock .rl-logo { width: 120px; height: auto; display: block; }
.rl-dock ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px var(--space-4); font-family: var(--font-mono); font-size: 13px; line-height: 1.6; }
.rl-dock a { color: #d3dfe4; text-underline-offset: 4px; }
.rl-dock-short { display: none; }

/* ---------- Hero with the incident panel (live site layout) ---------- */
.rl-hero-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: var(--space-8); align-items: start; }
.rl-hero-grid h1 { font-size: clamp(40px, 4vw, 58px); max-width: none; }
.rl-incident { margin-top: 56px; background: var(--navy-raised); border-top: 2px solid var(--accent); padding: var(--space-4); }
.rl-incident h2 { font-size: 20px; line-height: 1.25; font-weight: 600; margin: 0 0 8px; }
.rl-incident p { margin: 0 0 var(--space-3); color: var(--ink-muted); }
.rl-incident a:not(.rl-btn) { color: #fff; font-weight: 600; text-underline-offset: 4px; overflow-wrap: anywhere; }
.rl-incident a:not(.rl-btn):focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
@media (max-width: 1023px) {
  .rl-hero-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .rl-incident { margin-top: 0; max-width: 560px; }
}

/* ---------- Our approach: chevron flow ----------
   Rebuilt in HTML/CSS from the designer's "Our approach" infographic (option A2, navy band; Eric's pick) so the text
   stays live and sharp. Each chevron overlaps the next by (--d - --g), leaving a --g gap along the arrow edge, like the
   source SVG. The steps share row heights (subgrid): titles sit on one row and descriptions on the next, so all four line up
   even when a title wraps (tablet widths). */
.rl-flow { --d: 48px; --g: 12px; list-style: none; margin: var(--space-6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rl-flow > li { display: grid; grid-template-rows: subgrid; grid-row: span 3; min-width: 0; margin-left: calc(var(--g) - var(--d)); --c: #1e4466; }
.rl-flow > li:first-child { margin-left: 0; }
.rl-flow > li:nth-child(2) { --c: #2d5878; }
.rl-flow > li:nth-child(3) { --c: #46708f; }
.rl-flow > li:nth-child(4) { --c: var(--brick-red); }
.rl-chev { display: grid; place-items: center; height: 160px; padding-right: var(--d); color: #fff; background: var(--c); clip-path: polygon(0 0, calc(100% - var(--d)) 0, 100% 50%, calc(100% - var(--d)) 100%, 0 100%, var(--d) 50%); }
.rl-flow > li:first-child .rl-chev { clip-path: polygon(0 0, calc(100% - var(--d)) 0, 100% 50%, calc(100% - var(--d)) 100%, 0 100%); }
.rl-flow > li + li .rl-chev { padding-left: calc(var(--d) - var(--g)); }
.rl-flow-icon { display: block; width: 76px; height: 76px; fill: none; stroke: currentColor; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
/* The text under each chevron is centred on the chevron's body (notch and tip excluded). A title that wraps
   grows upward, so each title stays right above its description. */
.rl-flow h3, .rl-flow p { text-align: center; text-wrap: balance; }
.rl-flow > li + li h3, .rl-flow > li + li p { margin-left: calc(var(--d) - var(--g)); }
.rl-flow h3 { align-self: end; margin: var(--space-3) var(--d) 0 0; font-size: clamp(18px, 1.6vw, 23px); line-height: 1.25; font-weight: 600; color: #fff; }
.rl-flow p { margin: 6px var(--d) 0 0; font-size: 16px; line-height: 1.45; color: var(--ink-muted); }

@media (max-width: 1023px) {
  .rl-flow { --d: 32px; --g: 8px; }
  .rl-chev { height: 120px; }
  .rl-flow-icon { width: 52px; height: 52px; }
  .rl-flow p { font-size: 14px; }
}

/* ---------- Readability ----------
   Eric (11-08): the pack's intro text (Plex Light 300 in grey-blue) read faint. Intro paragraphs are Regular 400 in the
   main ink, and the secondary grey-blue is darker on light and lighter on navy, everywhere it is used.
   Light: #34495d is 8.3:1 on ivory, 9.3:1 on white (was 5.7 / 6.3). Navy: #d4e0e7 is 10.9:1 (was 8.5). */
:root, [data-theme="light"] { --ink-muted: #34495d; }
[data-theme="dark"] { --ink-muted: #d4e0e7; }
.rl-lead, .rl-hero-text { font-weight: 400; color: var(--ink); text-wrap: pretty; }
[data-theme="dark"] .rl-lead, .rl-hero-text { color: #e3e9ed; }

/* ---------- Footer, docked bar and contact lines in Plex Sans ----------
   Eric: the mono face didn't suit the link lists. */
.rl-footer ul, .rl-footer-legal, .rl-dock ul, .rl-contact-lines { font-family: var(--font-sans); }
.rl-footer ul { font-size: 15px; line-height: 1.5; }
.rl-footer li { margin-bottom: 10px; }
.rl-footer a, .rl-dock a { text-decoration-color: rgba(211, 223, 228, .45); text-underline-offset: 5px; }
.rl-footer a:hover, .rl-dock a:hover { color: #fff; text-decoration-color: currentColor; }
.rl-footer-legal { font-size: 13px; }
.rl-dock ul { font-size: 15px; }
.rl-contact-lines { font-size: 17px; }
.rl-contact-lines dt { font-size: 15px; padding-top: 2px; }

/* ---------- Big screens ----------
   Eric (11-09): on large monitors the page sat in a narrow 1216px column with a mostly empty first screen.
   The layout is tuned for laptop screens (about 1440x830 of browser window), so bigger windows show that
   same composition, enlarged: zoom = min(width / 1440, height / 830), in steps, up to 2. Laptops (13" and
   14") stay at 1. Every breakpoint above is below the zoomed layout width, so none of them changes.
   Zoom goes on the content blocks, not on <html>: browsers multiply 100vh by the zoom, and the first screen
   relies on min-height: 100svh to fill exactly one screen. Browsers without zoom show the page unscaled. */
@media (min-width: 1584px) and (min-height: 913px)  { :root { --zoom: 1.1; } }
@media (min-width: 1728px) and (min-height: 996px)  { :root { --zoom: 1.2; } }
@media (min-width: 1872px) and (min-height: 1079px) { :root { --zoom: 1.3; } }
@media (min-width: 2016px) and (min-height: 1162px) { :root { --zoom: 1.4; } }
@media (min-width: 2160px) and (min-height: 1245px) { :root { --zoom: 1.5; } }
@media (min-width: 2304px) and (min-height: 1328px) { :root { --zoom: 1.6; } }
@media (min-width: 2592px) and (min-height: 1494px) { :root { --zoom: 1.8; } }
@media (min-width: 2880px) and (min-height: 1660px) { :root { --zoom: 2; } }
.rl-header, .rl-hero-inner, .rl-section, .rl-footer, .rl-dock { zoom: var(--zoom, 1); }

/* ---------- Tablet and phone ---------- */
@media (max-width: 1100px) and (min-width: 821px) {
  .rl-dock-extra { display: none; }
}
@media (max-width: 820px) {
  .rl-hero-inner { padding-inline: var(--space-2); }
  .rl-footer { padding-inline: var(--space-2); }

  .masthead--full .rl-hero-inner { padding-bottom: 112px; }
  .rl-hero .rl-notch { width: 112px; height: 90px; }
  .rl-hero--page { min-height: 0; }
  .rl-hero--page .rl-hero-inner { padding-block: 48px 112px; }
  .rl-hero--page h1 { font-size: clamp(32px, 7.6vw, 44px); line-height: 1.15; }

  /* Menu */
  .rl-menu { display: block; margin-left: auto; }
  .rl-menu > summary { list-style: none; display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border: 1px solid rgba(255,255,255,.7); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; }
  .rl-menu > summary::-webkit-details-marker { display: none; }
  .rl-menu[open] > summary { background: rgba(255,255,255,.1); }
  .rl-menu-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--navy-header); border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid #36536e; box-shadow: var(--shadow-menu); padding: 8px var(--space-2) var(--space-3); }
  .rl-menu-panel .rl-nav-link { display: block; padding: 16px 0; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .rl-menu-panel .rl-nav-link[aria-current=page] { text-underline-offset: 6px; }
  .rl-menu-panel .rl-btn { width: 100%; margin-top: var(--space-3); }

  .rl-proof .rl-btn { margin: 16px 0 0; }
  .rl-close-body { max-width: none; }

  .rl-about { grid-template-columns: 1fr; gap: var(--space-4); }

  .rl-dock-inner { justify-content: center; padding-inline: var(--space-2); }
  .rl-dock .rl-home { display: none; }
  .rl-dock-extra, .rl-dock-full { display: none; }
  .rl-dock-short { display: inline; }
  .rl-dock a { display: inline-block; padding-block: 4px; }
}

@media (max-width: 640px) {
  /* "Our approach" stays off phones (Eric's call on the old site). */
  .rl-phone-hide, .rl-menu-panel .rl-phone-hide { display: none; }  /* the second selector beats the phone menu's display: block */
  .rl-phone-hide + .rl-proof { margin-top: 0; }
  /* The level list already carries the bars; the big decorative set only adds length here. */
  .rl-section--soft .rl-levels:not(.rl-levels--bleed) { display: none; }
}

@media (max-width: 480px) {
  .rl-contact-lines { grid-template-columns: 1fr; gap: 0; }
  .rl-contact-lines dd { margin-bottom: 8px; }
  .rl-hero-actions .rl-btn { width: 100%; }
}

@media print {
  .rl-dock, .rl-menu, .rl-urgent, .rl-notch, .rl-levels { display: none !important; }
}
