/* =========================================================================
   grader.css — Free HVAC Website Grader · Foundation stylesheet
   Black n Orange (USA / en) design system.

   Loads the brand tokens (colors, type scale, squiggle gradient, shadows,
   spacing, radii, motion) from the canonical source of truth, fixes the font
   paths so Fraunces + Inter actually load, restates the BnO base (header,
   footer, buttons, cards, sections, scroll-reveal), and adds the tool-specific
   components: score gauge, pillar score cards, URL input group, spinner and
   the report layout.

   A grader page only needs to link THIS file.
   ========================================================================= */

/* 1) Pull in the canonical brand tokens + utilities + element defaults.
   (@import must precede all style rules; @font-face below is allowed after.) */
@import "brand/colors_and_type.css";

/* 2) Font-path fix. colors_and_type.css references fonts at "fonts/..." which,
   from assets/brand/, resolves to assets/brand/fonts/ (does not exist). These
   @font-face rules are resolved relative to grader.css (assets/grader.css), so
   "fonts/..." correctly points at assets/fonts/. This is what actually loads
   the typefaces for grader pages. See design-system.md §10. */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/Fraunces-VariableFont_SOFT_WONK_opsz_wght.ttf") format("truetype-variations"),
       url("fonts/Fraunces-VariableFont_SOFT_WONK_opsz_wght.ttf") format("truetype");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/Fraunces-Italic-VariableFont_SOFT_WONK_opsz_wght.ttf") format("truetype-variations"),
       url("fonts/Fraunces-Italic-VariableFont_SOFT_WONK_opsz_wght.ttf") format("truetype");
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-VariableFont_opsz_wght.ttf") format("truetype-variations"),
       url("fonts/Inter-VariableFont_opsz_wght.ttf") format("truetype");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Italic-VariableFont_opsz_wght.ttf") format("truetype-variations"),
       url("fonts/Inter-Italic-VariableFont_opsz_wght.ttf") format("truetype");
  font-weight: 100 900; font-style: italic; font-display: swap;
}

/* =========================================================================
   TOOL TOKENS — layered on top of the brand palette
   ========================================================================= */
:root {
  /* Layout — mirrors the live /en/ page. */
  --page-max: 1180px;
  --header-h: 76px;
  --gutter: max(20px, calc((100vw - var(--page-max)) / 2));

  /* Live-page aliases (the en.css names, re-expressed on brand vars so the
     copied header/footer/card rules read identically). */
  --en-orange: var(--bno-fiery-orange);
  --en-yellow: var(--bno-mellow-yellow);
  --en-gray:   var(--bno-cool-gray);
  --en-black:  var(--bno-slack-black);
  --en-white:  var(--bno-paper);
  --en-muted:  rgba(0, 0, 0, 0.66);
  --en-line:   rgba(0, 0, 0, 0.14);
  --en-soft-orange: rgba(254, 131, 1, 0.14);
  --en-soft-yellow: rgba(255, 237, 2, 0.22);
  --en-shadow: 0 0 14px rgba(0, 0, 0, 0.045), 0 4px 10px rgba(0, 0, 0, 0.026);
  --en-card-glow: rgba(254, 131, 1, 0.28);

  /* Grade bands — red → amber → green. NOT brand colors (palette has no
     semantic red/green); tuned to live beside fiery-orange. See §1 of spec. */
  --grade-poor:  #E5484D;   /*  0–49  */
  --grade-fair:  #F76808;   /* 50–69  */
  --grade-good:  #FFB224;   /* 70–84  */
  --grade-great: #3E9B4F;   /* 85–100 */

  --grade-poor-soft:  rgba(229, 72, 77, 0.12);
  --grade-fair-soft:  rgba(247, 104, 8, 0.12);
  --grade-good-soft:  rgba(255, 178, 36, 0.14);
  --grade-great-soft: rgba(62, 155, 79, 0.12);

  /* Darkened "ink" variants for small text on the soft washes (chips, labels).
     The bright bands above are kept for bars + large numerals only. AA-legible. */
  --grade-poor-ink:  #C2282C;
  --grade-fair-ink:  #B44A05;
  --grade-good-ink:  #7A4A00;
  --grade-great-ink: #2E7D40;

  /* Motion (from the en.css motion layer). */
  --en-motion-ease: cubic-bezier(0.23, 1, 0.32, 1);
  --en-motion-fast: 180ms;
  --en-card-line: conic-gradient(
    from 0deg, transparent 0deg 216deg,
    rgba(255, 237, 2, 0.96) 232deg, rgba(254, 131, 1, 0.98) 254deg,
    rgba(237, 139, 250, 0.9) 276deg, transparent 296deg 360deg);
}

/* Default band → poor; each element overrides --band via data-band.
   --band     = bright color (bars, large numerals)
   --band-ink = darkened color (small chip/label text — AA on the soft wash) */
[data-band]            { --band: var(--grade-poor);  --band-soft: var(--grade-poor-soft);  --band-ink: var(--grade-poor-ink); }
[data-band="poor"]     { --band: var(--grade-poor);  --band-soft: var(--grade-poor-soft);  --band-ink: var(--grade-poor-ink); }
[data-band="fair"]     { --band: var(--grade-fair);  --band-soft: var(--grade-fair-soft);  --band-ink: var(--grade-fair-ink); }
[data-band="good"]     { --band: var(--grade-good);  --band-soft: var(--grade-good-soft);  --band-ink: var(--grade-good-ink); }
[data-band="great"]    { --band: var(--grade-great); --band-soft: var(--grade-great-soft); --band-ink: var(--grade-great-ink); }

/* =========================================================================
   BASE / RESET  (the brand css styles tags; this adds the page-level reset)
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
:root { color-scheme: light; }   /* pin native control rendering (no dark UA chrome) */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--color-fg);
  background: var(--color-bg);
  font-family: var(--font-sans);
  font-size: var(--size-body);
  line-height: 1.5;
}
body.mobile-nav-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:where(button) { font: inherit; }

/* Shared content column. */
.container { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-inline: 20px; }

/* Section rhythm — 104px desktop, centered to --page-max (matches .section-pad). */
.section-pad { position: relative; padding: 104px var(--gutter); }
.bg-ink   { background: var(--bno-slack-black); color: var(--color-fg-invert); }
.bg-cool  { background: var(--bno-cool-gray); }

/* =========================================================================
   EYEBROW + SECTION HEAD  (signature orange dash before the label)
   ========================================================================= */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
  font: 900 11px/1 var(--font-sans);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--bno-fiery-orange);
}
.eyebrow::before {
  content: ""; width: 34px; height: 7px; border-radius: var(--radius-pill);
  background: var(--bno-fiery-orange);
}
@media (prefers-reduced-motion: no-preference) {
  .eyebrow::before { background-size: 180% 100%; animation: en-accent-slide 5.8s ease-in-out infinite alternate; }
}

.section-head { max-width: 920px; margin: 0 0 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { margin-inline: auto; }
.section-head h2 { margin: 0 0 20px; font-size: clamp(34px, 4vw, 58px); line-height: 0.98; }
.section-head p:not(.eyebrow) { color: var(--color-fg-muted); font-size: 18px; }
.bg-ink .section-head h2 { color: var(--color-fg-invert); }
.bg-ink .section-head p:not(.eyebrow) { color: rgba(255, 255, 255, 0.74); }

/* Thin squiggle rule — the footer-accent flourish, reusable as a divider. */
.squiggle-rule {
  width: min(100%, 520px); height: 2px; border: 0; border-radius: var(--radius-pill);
  background-image: linear-gradient(90deg, var(--bno-fiery-orange), var(--bno-mellow-yellow));
}

/* =========================================================================
   BUTTONS  (the signature black pill; orange on hover, lifts 1px)
   Overrides the brand .btn sizing with the live /en/ 48px pill spec.
   ========================================================================= */
.btn {
  min-height: 48px; padding: 0 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  border: 1.5px solid var(--bno-slack-black); border-radius: var(--radius-pill);
  font: 850 14px/1 var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform var(--en-motion-fast) ease, background var(--en-motion-fast) ease,
              color var(--en-motion-fast) ease, border-color var(--en-motion-fast) ease;
}
.btn:hover, .btn:focus-visible { transform: translateY(-1px); outline: none; }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary { color: var(--bno-paper); background: var(--bno-slack-black); }
.btn-secondary, .btn-light { color: var(--bno-slack-black); background: var(--bno-paper); }
.btn-primary:hover, .btn-primary:focus-visible,
.btn-secondary:hover, .btn-secondary:focus-visible,
.btn-light:hover, .btn-light:focus-visible {
  color: var(--bno-slack-black); background: var(--bno-fiery-orange); border-color: var(--bno-fiery-orange);
}
.btn-accent { color: var(--bno-slack-black); background: var(--bno-fiery-orange); }
.btn-accent:hover { background: var(--bno-mellow-yellow); border-color: var(--bno-mellow-yellow); }
.btn-block { width: 100%; }

/* Accessible focus ring (brand-tinted). */
:where(a, button, input, textarea, select, .btn):focus-visible {
  outline: 2.5px solid var(--bno-fiery-orange); outline-offset: 2px; border-radius: var(--radius-sm);
}

/* =========================================================================
   CARD / PANEL  (white, 1.5px black outline, 8px radius — the live spec)
   ========================================================================= */
.panel {
  background: var(--bno-paper);
  border: 1.5px solid var(--bno-slack-black);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--en-shadow);
}
.panel-soft   { background: var(--en-soft-orange); }
.panel-cool   { background: var(--bno-cool-gray); }
.panel-dark   { color: var(--bno-paper); background: var(--bno-slack-black); }
.panel-dark h1, .panel-dark h2, .panel-dark h3 { color: var(--bno-paper); }

/* Shared card hover lift + orbiting gradient border (the premium flourish). */
@media (hover: hover) and (pointer: fine) {
  .lift { transition: transform var(--en-motion-fast) var(--en-motion-ease),
                      box-shadow var(--en-motion-fast) var(--en-motion-ease),
                      border-color var(--en-motion-fast) var(--en-motion-ease); }
  .lift:hover { transform: translateY(-5px) scale(1.012);
                box-shadow: 0 24px 52px -24px var(--en-card-glow), var(--en-shadow); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .orbit { position: relative; isolation: isolate; overflow: hidden; }
  .orbit::after {
    content: ""; position: absolute; inset: 0; z-index: 2; padding: 2px; border-radius: inherit;
    background: var(--en-card-line); opacity: 0; pointer-events: none;
    transition: opacity 220ms var(--en-motion-ease);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
  }
  .orbit:hover::after { opacity: 1; animation: en-card-line-orbit 3.8s linear infinite; }
}

/* =========================================================================
   HEADER  (sticky, translucent, blur — slim version of the site header)
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 60;
  min-height: var(--header-h);
  max-width: calc(var(--page-max) + 48px); margin: 0 auto;
  padding: 14px 24px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--en-line);
  backdrop-filter: blur(18px);
}
.brand-link { display: inline-flex; align-items: center; gap: 10px; color: var(--bno-slack-black);
              text-decoration: none; font-weight: 900; white-space: nowrap; }
.brand-link img { width: 34px; height: 34px; }
.brand-link span { font-size: 17px; }
.header-actions { display: inline-flex; align-items: center; gap: 12px; justify-self: end; }
.language-switch { display: inline-flex; align-items: center; gap: 7px; font-weight: 900; }
.language-switch a {
  width: 32px; height: 32px; display: inline-grid; place-items: center;
  border: 1px solid var(--en-line); border-radius: var(--radius-pill);
  background: var(--bno-paper); text-decoration: none; font-size: 19px; line-height: 1;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.language-switch a:hover { background: var(--bno-fiery-orange); border-color: var(--bno-fiery-orange); transform: translateY(-1px); }

/* =========================================================================
   FOOTER  (reuse of the site footer: proof + brand bar with italic tagline)
   ========================================================================= */
.site-footer { background: var(--bno-cool-gray); color: var(--bno-slack-black); border-top: 1px solid var(--en-line); }
.footer-main { max-width: var(--page-max); margin: 0 auto; padding: 64px 24px 56px;
               display: grid; grid-template-columns: minmax(300px, 0.94fr) minmax(0, 1.56fr); gap: 56px; }
.footer-proof { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.footer-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 24px; text-decoration: none; color: var(--bno-slack-black); }
.footer-logo img { width: 46px; height: 46px; }
.footer-proof p { max-width: 36ch; margin: 0; color: var(--en-muted); font-size: 18px; font-weight: 650; line-height: 1.45; }
.footer-map { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 34px); }
.footer-column { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 11px; }
.footer-column h3 { margin: 0 0 8px; font: 750 22px/1.05 var(--font-display); }
.footer-column a, .footer-column p { margin: 0; color: rgba(0, 0, 0, 0.72); text-decoration: none; font: 700 15px/1.35 var(--font-sans); overflow-wrap: anywhere; }
.footer-column a:hover { color: var(--bno-fiery-orange); }
.footer-brand-bar { min-height: 96px; padding: 22px 24px; display: grid;
                    grid-template-columns: minmax(100px, 1fr) auto minmax(100px, 1fr);
                    align-items: center; gap: 24px; background: var(--bno-paper); border-top: 1px solid var(--en-line); }
.footer-brand-bar img { width: 44px; height: 44px; justify-self: center; }
.footer-brand-bar p { margin: 0; text-align: center; color: var(--bno-slack-black); font: 650 clamp(20px, 2.2vw, 28px)/1.15 var(--font-display); }
.footer-brand-bar em { font-style: italic; }
.footer-social { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.footer-social a { color: rgba(0, 0, 0, 0.72); text-decoration: none; font: 750 14px/1.2 var(--font-sans); }
.footer-social a:hover { color: var(--bno-fiery-orange); }

/* =========================================================================
   SCROLL-REVEAL  (data-reveal pattern — armed by the JS hook adding
   .reveal-ready to <html>; see design-system.md §8 for the hook script)
   ========================================================================= */
.reveal-ready [data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity 520ms ease, transform 520ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal-ready [data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* =========================================================================
   TOOL COMPONENT — URL / form input group
   ========================================================================= */
.grader-form { display: grid; gap: 12px; width: 100%; max-width: 640px; }
.input-group {
  display: flex; align-items: stretch; gap: 8px;
  padding: 6px; border: 1.5px solid var(--bno-slack-black); border-radius: var(--radius-pill);
  background: var(--bno-paper); box-shadow: var(--en-shadow);
}
.input-group:focus-within { border-color: var(--bno-fiery-orange); }
.input-group .input-icon { display: grid; place-items: center; padding-left: 12px; color: var(--color-fg-subtle); }
.input-group input[type="url"],
.input-group input[type="text"] {
  flex: 1 1 auto; min-width: 0; border: 0; background: transparent;
  font: 600 16px/1 var(--font-sans); color: var(--color-fg); padding: 0 8px;
}
.input-group input::placeholder { color: var(--color-fg-subtle); }
.input-group input:focus { outline: none; }
.input-group .btn { flex: 0 0 auto; }       /* "Grade my site" pill sits inside */
.field-hint { font-size: 13px; color: var(--color-fg-muted); padding-inline: 16px; }
.field-error { font-size: 13px; color: var(--grade-poor); font-weight: 700; padding-inline: 16px; }

/* Stacked variant for narrow viewports. */
@media (max-width: 560px) {
  .input-group { flex-direction: column; border-radius: var(--radius-lg); padding: 10px; }
  .input-group .input-icon { display: none; }
  .input-group input { padding: 12px; }
  .input-group .btn { width: 100%; }
}

/* =========================================================================
   TOOL COMPONENT — Loading / spinner state
   ========================================================================= */
.grader-loading { display: grid; place-items: center; gap: 18px; padding: 64px 24px; text-align: center; }
.spinner {
  width: 56px; height: 56px; border-radius: 50%;
  border: 5px solid var(--en-line);
  border-top-color: var(--bno-fiery-orange);
  border-right-color: var(--bno-mellow-yellow);
  animation: grader-spin 0.9s linear infinite;
}
.grader-loading p { margin: 0; color: var(--color-fg-muted); font-weight: 650; }
.grader-loading .loading-step { font-weight: 800; color: var(--color-fg); font-size: 17px; transition: opacity 180ms ease; min-height: 1.4em; }
.loading-progress { width: min(260px, 80%); height: 6px; margin-top: 6px; border-radius: var(--radius-pill); background: var(--en-line); overflow: hidden; }
.loading-progress > span { display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--bno-mellow-yellow), var(--bno-fiery-orange)); animation: grader-loadbar 75s cubic-bezier(0.18, 0.7, 0.15, 1) forwards; }
@keyframes grader-loadbar { to { width: 92%; } }
@media (prefers-reduced-motion: reduce) { .loading-progress > span { animation-duration: 90s; } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* Inline skeleton shimmer (for placeholder cards while scoring). */
.skeleton {
  background: linear-gradient(90deg, var(--bno-cool-gray) 25%, #f3f2f0 37%, var(--bno-cool-gray) 63%);
  background-size: 400% 100%; border-radius: var(--radius-sm); animation: grader-shimmer 1.4s ease infinite;
}
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* =========================================================================
   TOOL COMPONENT — Score gauge (big circular 0–100, color by band)
   Pure CSS conic-gradient ring. Drive it with two custom props:
     style="--score: 73"            (number 0–100, sets the arc fill)
     data-band="good"               (sets --band color)
   ========================================================================= */
.score-gauge {
  --size: 240px;
  --track: 18px;                       /* ring thickness */
  --score: 0;                          /* 0–100, set inline */
  --_deg: calc(var(--score) * 3.6deg); /* 0–360 */
  position: relative;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  display: grid; place-items: center;
  background:
    conic-gradient(var(--band) var(--_deg), rgba(0, 0, 0, 0.12) 0) border-box;
  /* mask out the middle to leave a ring */
  -webkit-mask: radial-gradient(farthest-side, transparent calc(50% - var(--track)), #000 calc(50% - var(--track) + 1px));
          mask: radial-gradient(farthest-side, transparent calc(50% - var(--track)), #000 calc(50% - var(--track) + 1px));
  transition: background 600ms var(--en-motion-ease);
}
/* The number + label sit in a sibling so the mask doesn't clip them. */
.score-gauge-wrap { position: relative; width: var(--size, 240px); display: inline-grid; place-items: center; }
.score-gauge-wrap .score-gauge { grid-area: 1 / 1; }
.score-gauge-center { grid-area: 1 / 1; display: grid; place-items: center; text-align: center; gap: 2px; z-index: 1; }
.score-gauge-center .score-num {
  font: 450 clamp(48px, 7vw, 72px)/0.9 var(--font-display);
  color: var(--band, var(--bno-slack-black)); font-variant-numeric: tabular-nums;
}
.score-gauge-center .score-den { font: 700 14px/1 var(--font-sans); color: var(--color-fg-muted); }
.score-gauge-center .score-grade {
  margin-top: 6px; padding: 4px 12px; border-radius: var(--radius-pill);
  font: 800 12px/1 var(--font-sans); text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--band-ink); background: var(--band-soft);
}
/* Small inline gauge variant (e.g. in summary rows). */
.score-gauge.is-sm { --size: 120px; --track: 11px; }
.score-gauge-wrap.is-sm { --size: 120px; }
.score-gauge-wrap.is-sm .score-num { font-size: 34px; }

/* =========================================================================
   TOOL COMPONENT — Pillar score card
   (score number, colored bar, verdict, action list)
   ========================================================================= */
.pillar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pillar-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 24px; background: var(--bno-paper);
  border: 1.5px solid var(--bno-slack-black); border-radius: 8px; box-shadow: var(--en-shadow);
}
.pillar-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pillar-card__name { margin: 0; font: 650 24px/1.05 var(--font-display); }
.pillar-card__score {
  font: 450 40px/0.9 var(--font-display); color: var(--band);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pillar-card__score small { font: 700 14px/1 var(--font-sans); color: var(--color-fg-subtle); }
/* Colored progress bar. Drive with style="--score: 73". */
.pillar-bar { height: 10px; border-radius: var(--radius-pill); background: var(--en-line); overflow: hidden; }
.pillar-bar > span {
  display: block; height: 100%; width: calc(var(--score, 0) * 1%);
  background: var(--band); border-radius: inherit;
  transition: width 700ms var(--en-motion-ease);
}
.pillar-card__verdict { margin: 0; color: var(--color-fg-muted); font-size: 15px; line-height: 1.45; }
/* Status chip on the verdict. */
.verdict-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--radius-pill);
  font: 800 11px/1 var(--font-sans); text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--band-ink); background: var(--band-soft);
}
.verdict-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--band); }
/* Action list — what to fix. */
.action-list { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.action-list li { position: relative; padding-left: 26px; font-size: 14px; line-height: 1.4; color: var(--color-fg); }
.action-list li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--band-soft);
  /* small arrow/check mark drawn with a clip — keeps it dependency-free */
  box-shadow: inset 0 0 0 2px var(--band);
}

/* =========================================================================
   REPORT LAYOUT — hero score + 5 pillar sections + CTA block
   ========================================================================= */
.report-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 48px;
  padding: 56px var(--gutter);
  background:
    linear-gradient(90deg, rgba(254, 131, 1, 0.08) 0 1px, transparent 1px),
    linear-gradient(180deg, var(--bno-paper), #f8f7f5);
  background-size: 34px 34px, auto;
  border-bottom: 1px solid var(--en-line);
}
.report-hero__copy { min-width: 0; }
.report-hero__url { font-weight: 800; color: var(--bno-fiery-orange); overflow-wrap: anywhere; }
.report-hero h1 { font-size: clamp(32px, 4.4vw, 56px); line-height: 0.96; margin: 0 0 16px; }
.report-hero__summary { color: var(--color-fg-muted); font-size: clamp(17px, 2vw, 21px); line-height: 1.4; max-width: 52ch; }

.report-section { padding: 56px var(--gutter); }
.report-section + .report-section { border-top: 1px solid var(--en-line); }

/* Final CTA — the inverted black block, matching the site's cta-final. */
.report-cta { color: var(--bno-paper); background: var(--bno-slack-black); padding: 88px var(--gutter); }
.report-cta__inner { max-width: 820px; }
.report-cta h2 { color: var(--bno-paper); font-size: clamp(32px, 4vw, 54px); line-height: 0.98; margin: 0 0 16px; }
.report-cta p { color: rgba(255, 255, 255, 0.82); font-size: 18px; }
.report-cta .hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* =========================================================================
   KEYFRAMES
   ========================================================================= */
@keyframes grader-spin { to { transform: rotate(360deg); } }
@keyframes grader-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes en-accent-slide { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes en-card-line-orbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* =========================================================================
   RESPONSIVE  (mobile-first base above; these adapt the multi-col layouts)
   Breakpoints: 1280/1440 share desktop; 768 = tablet; 390 = phone.
   ========================================================================= */
@media (max-width: 980px) {
  .footer-main { grid-template-columns: 1fr; gap: 42px; }
  .report-hero { grid-template-columns: 1fr; gap: 32px; }
  .pillar-grid { grid-template-columns: 1fr; }
  .footer-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .section-pad, .report-section { padding: 76px 20px; }
  .report-hero, .report-cta { padding: 56px 20px; }
  .site-header { min-height: auto; padding: 12px 14px; }
  .brand-link span { display: none; }
  .footer-map { grid-template-columns: 1fr; }
  .footer-brand-bar { grid-template-columns: 1fr; text-align: center; }
  .score-gauge, .score-gauge-wrap { --size: 200px; }
}
@media (max-width: 420px) {
  .score-gauge, .score-gauge-wrap { --size: 168px; }
}

/* =========================================================================
   HOME PAGE LAYOUT — hero + form, steps, what-we-grade, CTAs, footer extras
   (the landing page links only grader.css, so its layout lives here too)
   ========================================================================= */
.hero { padding-top: 40px; padding-bottom: 72px; }
.hero-grid {
  max-width: var(--page-max); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: clamp(32px, 5vw, 72px); align-items: start;
}
.hero-copy h1 { margin: 0 0 18px; font-size: clamp(25px, 3.6vw, 46px); line-height: 1.0; }
.hero-sub { margin: 0 0 26px; max-width: 54ch; color: var(--color-fg-muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.45; }
.value-bullets { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.value-bullets li { position: relative; padding-left: 32px; font-size: 16px; line-height: 1.4; font-weight: 600; }
.value-bullets li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bno-fiery-orange);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9.55 17.6 4 12l1.4-1.4 4.15 4.15L18.6 5.3 20 6.7z'/%3E%3C/svg%3E") center/15px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9.55 17.6 4 12l1.4-1.4 4.15 4.15L18.6 5.3 20 6.7z'/%3E%3C/svg%3E") center/15px no-repeat;
}

/* Report preview (hero) — a live mini-mockup of the real report */
.report-preview {
  margin: 18px 0 0; max-width: 460px;
  border: 1.5px solid var(--bno-slack-black); border-radius: 14px;
  background: var(--bno-paper); box-shadow: var(--en-shadow); overflow: hidden;
}
.preview-tag {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-bottom: 1px solid var(--en-line);
  background: var(--bno-cool-gray);
  font: 800 11px/1 var(--font-sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-fg-muted);
}
.preview-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bno-fiery-orange); box-shadow: 0 0 0 3px rgba(254,131,1,0.18); }
.preview-body { padding: 18px; display: grid; gap: 16px; }
.preview-score { display: flex; align-items: center; gap: 16px; }
.report-preview .score-gauge-wrap.is-sm, .report-preview .score-gauge.is-sm { --size: 96px; --track: 9px; }
.report-preview .score-num { color: var(--color-fg); font-size: 30px; }
.preview-score-meta { display: grid; gap: 2px; }
.preview-score-meta strong { font: 450 30px/0.9 var(--font-display); }
.preview-score-meta strong small { font: 700 13px/1 var(--font-sans); color: var(--color-fg-subtle); }
.preview-score-meta span { font-size: 14px; font-weight: 650; color: var(--color-fg-muted); }
.preview-pillars { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.preview-pillars li { display: grid; grid-template-columns: 92px 1fr 28px; align-items: center; gap: 10px; }
.preview-pillars .pp-name { font-size: 12.5px; font-weight: 700; color: var(--color-fg-muted); }
.preview-pillars .pillar-bar { height: 8px; }
.preview-pillars b { font: 800 13px/1 var(--font-sans); color: var(--band-ink); text-align: right; font-variant-numeric: tabular-nums; }
.preview-fix { margin: 0; padding-top: 14px; border-top: 1px dashed var(--en-line); font-size: 13.5px; line-height: 1.45; color: var(--color-fg-muted); }
.preview-fix strong { color: var(--color-fg); }

/* Form card */
.hero-form-wrap { position: sticky; top: calc(var(--header-h) + 16px); }
.form-card { padding: 28px; }
.form-title { margin: 0 0 6px; font-size: clamp(24px, 3vw, 30px); line-height: 1.02; }
.form-intro { margin: 0 0 20px; color: var(--color-fg-muted); font-size: 15px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font: 800 12px/1 var(--font-sans); text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-fg-muted); }
.field input, .field select {
  width: 100%; min-height: 46px; padding: 0 14px;
  border: 1.5px solid var(--en-line); border-radius: var(--radius-md, 10px);
  background: var(--bno-paper); font: 600 15px/1 var(--font-sans); color: var(--color-fg);
  transition: border-color var(--en-motion-fast) ease;
}
.field select { appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23575555' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; }
.field input::placeholder { color: var(--color-fg-subtle); }
.field input:focus, .field select:focus { outline: none; border-color: var(--bno-fiery-orange); }
.field input:user-invalid { border-color: var(--grade-poor); }
.form-submit { margin-top: 6px; min-height: 52px; font-size: 16px; }
.form-micro { margin: 14px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--color-fg-subtle); }

/* Confirmation state */
.confirm { display: grid; gap: 14px; text-align: left; }
.confirm p { margin: 0; color: var(--color-fg-muted); line-height: 1.5; }
.confirm-mark {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grade-great-soft); color: var(--grade-great); font-size: 30px; font-weight: 800;
}
.confirm .btn { margin-top: 6px; justify-self: start; }

/* Steps */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { display: grid; gap: 12px; align-content: start; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bno-slack-black); color: var(--bno-paper); font: 800 18px/1 var(--font-sans);
}
.step h3 { margin: 0; font: 650 22px/1.05 var(--font-display); }
.step p { margin: 0; color: var(--color-fg-muted); line-height: 1.5; }

/* What we grade */
.grade-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grade-item { display: grid; gap: 10px; align-content: start; }
.grade-item h3 { margin: 0; font: 650 23px/1.04 var(--font-display); }
.grade-item p { margin: 0; color: var(--color-fg-muted); line-height: 1.5; font-size: 15.5px; }

/* Narrow content + lede */
.container.narrow { max-width: 860px; }
.lede { margin: 0; font-size: clamp(18px, 2.1vw, 22px); line-height: 1.55; color: var(--color-fg); }

/* CTA cards */
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cta-card { display: grid; gap: 12px; align-content: start; }
.cta-card h3 { margin: 0; font: 650 26px/1.04 var(--font-display); }
.cta-card p { margin: 0 0 6px; color: var(--color-fg-muted); line-height: 1.5; }
.cta-card .btn { justify-self: start; }

/* hero actions inside the dark final CTA already styled via .report-cta */
.report-cta .hero-actions { margin-top: 28px; }

/* Footer legal line */
.legal { display: block; max-width: var(--page-max); margin: 0 auto; padding: 22px 24px 40px;
         font-size: 12.5px; line-height: 1.5; color: var(--en-muted); }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-form-wrap { position: static; }
  .steps-grid { grid-template-columns: 1fr; }
  .grade-grid { grid-template-columns: 1fr 1fr; }
  .cta-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grade-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* =========================================================================
   REDUCED MOTION — kill the lifts, orbits and slides
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  .reveal-ready [data-reveal] { transition-delay: 0ms; }
  .lift:hover { transform: none; }
  .pillar-bar > span, .score-gauge { transition: none; }
  .eyebrow::before { animation: none !important; }
}
