/* ==========================================================================
   Covered — 2026 brand system. Loaded after styles.css and revb.css.
   Retokens the v1.4 Swiss system to the system locked 18 and 20 Nov 2026:
   four grounds, three Adobe Fonts faces, Dawn as the action colour.
   Two colours are derived, not locked: the hairline and the secondary text
   grey are Ink at 14% and 62%. The locked palette has no neutral for either.
   ========================================================================== */

:root {
  --night:   #0E0D10;
  --warm:    #F4F3EF;
  --gold:    #F3CA8C;
  --ink:     #0A0908;
  --dawn:    #E4572E;
  --sodium:  #F2A93B;
  --ember:   #A63A17;
  --teal:    #1F6F6B;
  --sea:     #4DB3A8;

  /* retokens of the v1.4 palette so every existing rule follows the system */
  --white:  #F4F3EF;
  --paper:  #F4F3EF;
  --petrol: #003B46;
  --petrol-dark: #002A33;
  --grid:   rgba(10, 9, 8, .14);
  --muted:  rgba(10, 9, 8, .62);

  /* Type locked 20 Nov 2026. Four roles, four faces, Adobe Fonts kit nch6nrd.
     Statement: All Round Gothic. Body: Univia Pro. Label: Oxanium. Data and the
     ASCII sky: IBM Plex Mono, unchanged, so the sunrise is untouched. */
  --f-display: 'all-round-gothic', Helvetica, Arial, sans-serif;
  --f-sans: 'univia-pro', Helvetica, Arial, sans-serif;
  --f-wide: 'oxanium', Helvetica, Arial, sans-serif;
  --f-mono: 'ibm-plex-mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html { scroll-behavior: auto; }
body { letter-spacing: 0; }

/* ---------- statement type: Neue Haas Unica Regular, uppercase ---------- */
.tagline, .rb-h1, .rb-h2, h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -.012em;
  text-transform: uppercase;
}
.tagline { font-size: clamp(40px, 6.4vw, 92px); line-height: .95; }
.tagline__l1, .tagline__l2 { font-weight: 400; display: block; }
.rb-h2 { font-weight: 400; font-size: clamp(30px, 3.9vw, 50px); line-height: 1; letter-spacing: -.012em; }
.rb-h1 { font-weight: 400; letter-spacing: -.012em; }
.subhead { font-size: clamp(16px, 1.35vw, 19px); line-height: 1.55; letter-spacing: 0; }

/* ---------- kickers, nav, labels: Roc Grotesk ExtraWide ---------- */
.eyebrow, .navlink, .footer-col__label, .nav-menu__toggle {
  font-family: var(--f-wide);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.eyebrow { color: var(--ember); font-size: 11px; }
.navlink { font-size: 11px; }

/* ---------- data and furniture: IBM Plex Mono ---------- */
.rb-steps li::before, .site-footer .footer-col span, .rb-small { font-family: var(--f-mono); letter-spacing: .04em; }
.rb-steps li::before { color: var(--ember); }

/* ---------- action colour is Dawn, not petrol ---------- */
.btn { font-family: var(--f-wide); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; border-radius: 0; }
.btn--primary { background: var(--dawn); color: var(--night); }
.btn--primary:hover { background: var(--ember); color: var(--warm); }
.btn--secondary { border: 1px solid currentColor; background: transparent; color: inherit; }
.btn--secondary:hover { background: var(--ink); color: var(--warm); }
.text-link { font-family: var(--f-wide); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- bands are separated by a rule, not a second fill ---------- */
.section--paper { border-top: 1px solid var(--grid); }
.rb-chips li { border-color: var(--grid); font-family: var(--f-wide); font-weight: 400; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- header: nav left, lockup held top right ---------- */
.site-header { background: transparent; border-bottom: 1px solid var(--grid); }
.site-header__inner { flex-direction: row-reverse; }
.brand { display: block; line-height: 0; }
.brand__lockup { display: block; width: clamp(132px, 15vw, 196px); height: auto; }
.brand__lockup path, .brand__lockup rect, .brand__lockup g { fill: var(--ink); }
.brand__tm { display: none; }

/* ---------- Petrol: the technical and product ground ---------- */
body.ground-petrol { background: var(--petrol); color: var(--warm); }
body.ground-petrol { --ink: #F4F3EF; --grid: rgba(244,243,239,.22); --muted: rgba(244,243,239,.72); }
body.ground-petrol .section--white, body.ground-petrol .section--paper { background: transparent; }
body.ground-petrol .eyebrow, body.ground-petrol .rb-steps li::before { color: var(--sodium); }
body.ground-petrol .btn--primary { color: var(--night); }

/* ==========================================================================
   The Daybreak page. One ASCII sky behind everything; the sun is the only
   thing that moves. Colours come from daybreak.js, which also decides when
   text flips white to ink.
   ========================================================================== */
body.daybreak { background: var(--night); color: var(--db-txt, #F4F3EF); }
body.daybreak { --ink: var(--db-txt, #F4F3EF); --grid: var(--db-rule, rgba(244,243,239,.2)); --muted: var(--db-mute, rgba(244,243,239,.7)); }
body.daybreak .section--white, body.daybreak .section--paper { background: transparent; }
body.daybreak .site-header { background: transparent; border-bottom: 0; position: fixed; top: 0; left: 0; right: 0; z-index: 4; }
body.daybreak .site-footer { background: transparent; border-top: 1px solid var(--grid); }
body.daybreak .eyebrow { color: var(--db-acc, #F2A93B); }
body.daybreak .rb-steps li::before { color: var(--db-acc, #F2A93B); }
body.daybreak main { position: relative; z-index: 2; }
body.daybreak .site-footer { position: relative; z-index: 2; }

#db-sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* The hero is the locked moment: kicker, first half, then the question one screen down. */
.db-hero { min-height: 100svh; display: flex; align-items: flex-end; padding-bottom: 7vh; }
.db-ask  { min-height: 100svh; display: flex; align-items: flex-end; padding-bottom: 7vh; }
.db-hero .eyebrow, .db-ask .eyebrow { display: block; margin-bottom: 1.1rem; }

/* Statement type carries the locked gold drop-shadow on the dark stretch only. */
body.daybreak.is-dark .tagline { text-shadow: 3px 3px 0 var(--gold); }

@media (max-width: 720px) {
  .site-header__inner { flex-direction: row-reverse; }
  .db-hero, .db-ask { min-height: 92svh; padding-bottom: 10vh; }
  .tagline { font-size: clamp(32px, 9.2vw, 56px); }
}

/* No scroll-driven sky for anyone who asked for less motion: the page settles
   on the warm white end state and stays there. */
@media (prefers-reduced-motion: reduce) {
  #db-sky { opacity: .5; }
  body.daybreak.is-dark .tagline { text-shadow: none; }
}

/* ==========================================================================
   Corrections after the first render.
   ========================================================================== */

/* v1.4 set the second tagline line italic, smaller and petrol. The locked
   statement type is one size, one weight, uppercase: neutralise the child rules. */
.tagline__l1, .tagline__l2 {
  display: block; font-family: inherit; font-weight: 400; font-style: normal;
  font-size: inherit; line-height: inherit; letter-spacing: inherit; color: inherit;
}

/* Header: nav left, lockup flush to the top and right edges, one row. */
.site-header__inner { align-items: flex-start; }
.nav { flex-wrap: nowrap; gap: 20px; }
.site-header .btn { padding: 11px 20px; }
body.daybreak .site-header__inner { max-width: none; padding: 18px 2.2vw; }
body.daybreak .nav { justify-content: flex-start; }

/* The locked hero: statement bottom left, generous left margin, no centred frame. */
body.daybreak .db-hero .section__inner,
body.daybreak .db-ask .section__inner { max-width: none; padding-left: 4.6vw; padding-right: 4.6vw; }
body.daybreak .db-hero .content,
body.daybreak .db-ask .content { max-width: none; }
.db-hero .tagline, .db-ask .tagline { font-size: clamp(44px, 7.2vw, 104px); margin: 0; }

/* The gold drop-shadow is a rule for still pieces. The Daybreak page carries
   no shadow: the sky is already doing that work. */
body.daybreak.is-dark .tagline { text-shadow: none; }

@media (max-width: 860px) {
  .nav { flex-wrap: wrap; }
  body.daybreak .site-header__inner { padding: 14px 5vw; }
  body.daybreak .db-hero .section__inner,
  body.daybreak .db-ask .section__inner { padding-left: 5vw; padding-right: 5vw; }
}

/* The locked study set the statement at ~4.5vw (72px on a 1600px page), which
   keeps the text clear of the sun's core. Larger type rides up into the glow and
   the kicker stops reading, so the hero follows L1's proportion rather than
   filling the width. */
.db-hero .tagline, .db-ask .tagline { font-size: clamp(34px, 4.6vw, 76px); }
.db-hero, .db-ask { padding-bottom: 6vh; }

/* .section__inner carries margin:0 auto from v1.4; inside a flex hero that
   centres the whole block. The locked hero is left-aligned. */
body.daybreak .db-hero .section__inner,
body.daybreak .db-ask .section__inner { margin: 0; width: 100%; }

/* ---------- Footer ----------
   v1.4 set the footer to var(--ink). The ground classes flip --ink, which would
   turn the footer warm-white-on-white. Pin it to Night instead, and let the
   Daybreak page keep the sky behind it. */
.site-footer { background: var(--night); color: rgba(244, 243, 239, .72); }
.site-footer a { color: rgba(244, 243, 239, .72); }
.site-footer a:hover { color: var(--warm); }
.site-footer__inner { border-top-color: rgba(244, 243, 239, .18); }
.footer-col__label { color: var(--sodium); font-family: var(--f-wide); font-size: 10px; letter-spacing: .14em; }

body.daybreak .site-footer { background: transparent; color: var(--db-txt, #F4F3EF); }
body.daybreak .site-footer a { color: var(--db-txt, #F4F3EF); opacity: .78; }
body.daybreak .site-footer a:hover { opacity: 1; }
body.daybreak .site-footer__inner { border-top-color: var(--grid); }
body.daybreak .footer-col__label { color: var(--db-acc, #F2A93B); }

/* ---------- Mobile header ----------
   At <=720px v1.4 switches .site-header__inner to grid, so flex ordering no
   longer applies and the lockup fell to the left. Place it explicitly, and
   stop the Menu toggle inheriting a ground colour as its own background. */
@media (max-width: 720px) {
  .site-header__inner { grid-template-columns: 1fr auto; align-items: center; }
  .nav-menu { grid-column: 1; grid-row: 1; margin: 0; }
  .brand { grid-column: 2; grid-row: 1; justify-self: end; }
  .nav-menu__toggle {
    margin-left: 0; background: transparent; border-color: currentColor;
    color: inherit; font-family: var(--f-wide); font-weight: 400; letter-spacing: .14em;
  }
  .site-header .navlink, .site-header .nav { border-color: var(--grid); }

  /* The kicker is 11px and the sun's core is wide on a narrow screen. Smaller
     statement type and less bottom padding drop the whole block below the glow. */
  .db-hero .tagline, .db-ask .tagline { font-size: clamp(30px, 8.4vw, 44px); }
  .db-hero, .db-ask { padding-bottom: 4vh; }
}

/* ---------- Hero legibility scrim ----------
   Claude's call, not a locked decision. The kicker is 11px and the sun's core
   crosses it, measuring 3.00:1 against the brightest ASCII behind it — under the
   4.5:1 the system sets for small text. Rather than move the sun or resize the
   statement, the sky itself is dimmed under the hero block. Every locked colour
   and the sun's path are untouched; the scrim fades out as the page brightens. */
body.daybreak .db-hero, body.daybreak .db-ask { position: relative; }
body.daybreak .db-hero::before, body.daybreak .db-ask::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 62%;
  z-index: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(14, 13, 16, .86) 8%, rgba(14, 13, 16, .55) 42%, rgba(14, 13, 16, 0) 100%);
  opacity: var(--db-scrim, 1);
}
body.daybreak .db-hero .section__inner,
body.daybreak .db-ask .section__inner { position: relative; z-index: 1; }

/* ==========================================================================
   Overrides against v1.4 rules that outrank this layer or break on a dark
   ground. !important is used only where a v1.4 class selector wins on
   specificity; everything else is plain cascade.
   ========================================================================== */

/* Statement weight: v1.4 sets several heading rules to 600/700 from class
   selectors. The locked face is Neue Haas Unica Regular. */
h1, h2, h3, .tagline, .tagline__l1, .tagline__l2, .rb-h1, .rb-h2 { font-weight: 400 !important; }
h3 { font-family: var(--f-display); letter-spacing: -.008em; }

/* Links: v1.4 colours inline links Petrol, which disappears on the Petrol
   ground and on the dark half of the Daybreak scroll. Inherit instead, and
   keep the underline so they are still identifiable as links. */
body.ground-petrol a:not(.btn):not(.navlink):not(.brand),
body.daybreak a:not(.btn):not(.navlink):not(.brand) { color: inherit; }
body.ground-petrol a:not(.btn):not(.navlink):not(.brand):hover,
body.daybreak a:not(.btn):not(.navlink):not(.brand):hover { color: var(--sodium); }
body.ground-petrol .navlink:hover, body.daybreak .navlink:hover { color: var(--sodium); }
body.ground-petrol .text-link, body.daybreak .text-link { color: inherit; border-bottom-color: currentColor; }

/* Nav: ExtraWide is a wide face and the labels were breaking mid-word. */
.navlink, .btn, .text-link { white-space: nowrap; }
.site-header__inner { max-width: 1280px; }

/* ---------- Weights actually in kit mlr5wam ----------
   Univia Pro 400/600/700 · All Round Gothic 400/600 · IBM Plex Mono 400/600 ·
   Oxanium 400/500. v1.4 asks for 600 on several elements that are now Oxanium,
   which the browser would silently snap down. Pin them to 500 — the heaviest
   Oxanium in the kit — so the intent is explicit rather than accidental. */
.eyebrow, .navlink, .btn, .text-link, .nav-menu__toggle, .footer-col__label, .rb-chips li { font-weight: 500; }

/* ---------- Inside Covered on the Petrol ground (24 Nov 2026) ----------
   Andrew moved this page to Petrol. v1.4 gave it its own light chapter fills,
   dark-grey body text and Petrol accents, all of which vanish or clash on the
   Petrol ground. Chapters are separated by a rule instead of a fill. The
   screenshots are light, so they stay in light frames with real ink in the
   title bar. */
body.ground-petrol .inside-hero { background: linear-gradient(90deg, transparent 49.9%, rgba(244,243,239,.08) 50%, transparent 50.1%); }
body.ground-petrol .inside-chapter--paper,
body.ground-petrol .inside-chapter--sage,
body.ground-petrol .inside-chapter--blue,
body.ground-petrol .inside-chapter--sand,
body.ground-petrol .inside-close { background: transparent; border-top: 1px solid var(--grid); }
body.ground-petrol .inside-hero__copy h1 em, body.ground-petrol .inside-close h2 em,
body.ground-petrol .inside-chapter__number, body.ground-petrol .inside-story__label,
body.ground-petrol .inside-estimator-note span, body.ground-petrol .inside-ledger__number { color: var(--sodium); }
body.ground-petrol .inside-hero__copy p, body.ground-petrol .inside-chapter__heading > p,
body.ground-petrol .inside-story__copy p, body.ground-petrol .inside-growth-card p,
body.ground-petrol .inside-ledger p, body.ground-petrol .inside-close p { color: var(--muted); }
body.ground-petrol .inside-index { background: var(--night); color: var(--warm); }
body.ground-petrol .inside-estimator-note, body.ground-petrol .inside-estimator-note span + span,
body.ground-petrol .inside-points, body.ground-petrol .inside-points li,
body.ground-petrol .inside-story--profit, body.ground-petrol .inside-ledger,
body.ground-petrol .inside-ledger__item { border-color: var(--grid); }
body.ground-petrol .inside-growth-card { background: rgba(244,243,239,.06); border-color: var(--grid); }
body.ground-petrol .inside-growth-card--dark { background: var(--night); }
body.ground-petrol .inside-frame { border-color: rgba(244,243,239,.22); box-shadow: 12px 14px 0 rgba(14,13,16,.35); }
body.ground-petrol .inside-frame:hover { box-shadow: 16px 20px 0 rgba(14,13,16,.42); }
body.ground-petrol .inside-ledger .inside-frame { box-shadow: 10px 12px 0 rgba(14,13,16,.3); }
body.ground-petrol .inside-growth-card .inside-frame { box-shadow: none; }
body.ground-petrol .inside-frame__bar { color: rgba(10,9,8,.62); border-bottom-color: rgba(10,9,8,.13); }
body.ground-petrol .inside-frame__bar span:first-child { color: #0A0908; }

/* ---------- Contrast fixes found 24 Nov 2026 (measured, not eyeballed) ----------
   1. v1.4 colours the arrow in a text link Petrol: invisible on the Petrol
      ground (1.00:1) and dim on the Daybreak sky (1.58:1). It now follows the
      link colour.
   2. v1.4 sets the skip link to background var(--ink) with white text. The
      Petrol and Daybreak grounds flip --ink to warm white, so keyboard users
      got white on white (1.00:1). Pinned to Night and warm white.
   3. "Follow the work" on the Inside Covered index bar measured 4.08:1 at
      10px, under the 4.5:1 the system sets for small text. */
body.ground-petrol .text-link span, body.daybreak .text-link span { color: inherit; }
.skip-link { background: var(--night); color: var(--warm); }
body.ground-petrol .inside-index span { color: rgba(244,243,239,.62); }

/* ---------- Product overview on the Petrol ground (fix, 24 Nov 2026) ----------
   Found broken on 24 Nov: the page has carried body.ground-petrol since 20 Nov,
   but every band kept its v1.4 light fill (paper, white, and an ink band that
   the ground flips to warm white), so the warm white text sat on near-white and
   measured 1.00:1. Bands go clear onto the Petrol and are separated by a rule.
   The dashboard mock is a light screen, like the Inside Covered screenshots, so
   it keeps its light fill and real ink inside it. */
body.ground-petrol .overview-hero { background: linear-gradient(90deg, transparent calc(50% - .5px), rgba(244,243,239,.08) 50%, transparent calc(50% + .5px)); }
body.ground-petrol .feature-band--control,
body.ground-petrol .feature-band--money,
body.ground-petrol .feature-band--records { background: transparent; color: var(--warm); border-top: 1px solid var(--grid); }
body.ground-petrol .overview-hero__copy h1 em,
body.ground-petrol .feature-band--control .eyebrow,
body.ground-petrol .feature-list article > span { color: var(--sodium); }
body.ground-petrol .feature-list { border-top-color: var(--grid); }
body.ground-petrol .feature-list article,
body.ground-petrol .control-grid,
body.ground-petrol .control-grid article { border-color: var(--grid); }
body.ground-petrol .control-grid p { color: var(--muted); }
body.ground-petrol .product-window { --ink: #0A0908; --grid: rgba(10,9,8,.14); --muted: rgba(10,9,8,.62); color: #0A0908; box-shadow: 22px 26px 0 rgba(14,13,16,.35); }
body.ground-petrol .product-window:hover { box-shadow: 15px 18px 0 rgba(14,13,16,.42); }

/* ---------- Homepage four points (fix, 24 Nov 2026) ----------
   v1.4 hard-sets .canada-features p to #565149 and its rules to dark ink, so on
   the Daybreak sky the four points under "Why Covered" measured 1.09:1 over the
   rust. They now take the page's full text colour and rule, which daybreak.js
   sets as the sky brightens. The secondary grey (--db-mute) was tried first and
   still measured 3.34:1 over the middle of the sky. */
body.daybreak .canada-features p { color: inherit; }
body.daybreak .canada-features article,
body.daybreak .canada-features article:nth-child(even) { border-color: var(--grid); }

/* ---------- Text plates on the Daybreak sky (25 Nov 2026) ----------
   Andrew, 25 Nov: "the text, as it transitions into the orange, needs a
   background to help it stand out; it's still getting washed out."
   Each block of text, and the header links, sit on a plate in the colour
   opposite the text: Night behind warm white, warm white behind ink.
   daybreak.js sets --db-plate. It is clear at the black start and the warm
   white end, and fills in only while the sky is mid-tone, so the page looks
   as locked at either end. The plate is a background plus a box-shadow
   spread, so no text moves. */
body.daybreak main section:not(.db-hero):not(.db-ask) :is(.eyebrow, .rb-h2, .subhead, .rb-tagline, .rb-points, .rb-chips, .rb-steps, .hero__cta, .text-link) {
  background: var(--db-plate, transparent);
  box-shadow: 0 0 0 10px var(--db-plate, transparent);
}
/* The menu keeps its plate all the way: at either end it matches the sky, so it
   only dims the ASCII behind the links. Both plates are 50% at full (Andrew,
   25 Nov, 8:35 pm: "about a 50% opacity"); the strength is set in daybreak.js. */
body.daybreak .site-header .site-header__inner > .nav {
  background: var(--db-plate-nav, transparent);
  box-shadow: 0 0 0 10px var(--db-plate-nav, transparent);
}
/* On a phone the menu is the dropdown: the Menu button gets the plate as its
   fill, and the open list sits on one plate. The list's plate stops at its own
   right edge (the clip) so it never runs under the logo beside it. */
@media (max-width: 720px) {
  body.daybreak .nav-menu__toggle { background: var(--db-plate-nav, transparent); }
  body.daybreak .nav-menu > .nav {
    background: var(--db-plate-nav, transparent);
    box-shadow: 0 0 0 10px var(--db-plate-nav, transparent);
    clip-path: inset(-10px 0 -10px -10px);
  }
}
body.daybreak main section:not(.db-hero):not(.db-ask) :is(.eyebrow, .hero__cta, .text-link) { width: fit-content; }
