/* Hallmark · pages: pages/security-scanner.html, pages/threat-monitor.html · hero: Workbench, a compact imageless Title hero with the tool (the scanner form, the Launch Dashboard action) on the first screen · composition only: every word, link, id and heading level as in public_html */
/* Hallmark · pre-emit critique: P4 H4 E4 S3 R5 V4 · weakest: S, neither page can show what its tool produces (a real scan result, a capture of the dashboard) until the owner supplies one, so the working form and the launch action carry the first screen */
/* Owner decisions, not waivers: the eyebrows ("Security Intelligence Tool", "Process", "FAQ" ...), the live dot's "Live Intelligence Feed" badge text, the dash in each <title>, the arrow glued to "Launch Dashboard" and the footer middle dots wait for the owner. */
/* Layout: 12 columns from 1024, everything in source order below. Colours, faces, sizes, spacing and timings all come from css/style.css :root. Every rule sits under main, so the shared header and footer stay the system's. */

/* === SHARED: left-aligned throughout; the centring classes in the markup are kept for other pages' sake === */
main .text-center,main .center{text-align:start}
main .text-center p,main .body-lg.center{margin-inline:0}
main .headline-md{margin-bottom:var(--space-4)} /* a head sits nearer its own line than the label above it (gate 71) */

/* === HERO: compact Title, no picture; the h1, the lede and the action, then the tool === */
main>.hero{padding-block:var(--space-6)}
main>.hero::before{display:none}
.scanner-hero-icon,.monitor-hero-icon{display:none} /* the icon tile pushed the h1 down (F-022, F-058) */
main>.hero .headline-md{margin-bottom:var(--space-5)}
main>.hero .body-lg{font-size:var(--text-base);line-height:var(--leading-body)}
main>.hero .mb-48{margin-bottom:var(--space-6)}
#launchNote{margin-top:var(--space-3);font-size:var(--text-sm);color:var(--color-muted)}
/* The threat monitor's live indicator: the one permitted loop (DESIGN.md, Motion); main.js pauses it off-screen */
.live-badge{display:inline-flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-3);font:500 var(--text-sm)/1.4 var(--font-body);color:var(--color-ink-2)}
.live-dot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--color-success);animation:livePulse 2s var(--ease-in-out) infinite}
@keyframes livePulse{50%{opacity:.35}}

/* === THE SCANNER: a paper-2 workbench band; the field and its button joined at 56px === */
#scanner{padding-block:var(--space-6);background:var(--color-paper-2);border-block:var(--rule-hair) solid var(--color-rule)}
#scanner::before,#scanner+.section::before{display:none} /* the band's own edges part it from its neighbours */
.scanner-form{display:flex;flex-direction:column;gap:var(--space-2)}
#domainInput{min-width:0;min-height:56px}
.scanner-form .btn{min-height:56px}
.scanner-form :focus-visible{position:relative;z-index:var(--z-raised)} /* the ring is never painted under its neighbour */
#scannerForm~p{margin-top:var(--space-4);font-size:var(--text-sm);color:var(--color-muted)} /* every note under the form: the Mozilla note and the date line */

/* short phones (under 700px of height; 404 and the A29 pages do the same): the tool's controls hold the first screen above the compact consent sheet (A17, A25). Spacing and type steps only; the threat monitor's lede is drawn after its action (order moves the picture of the text, the lede has no focus stop). */
@media (max-width:767.98px) and (max-height:700px){
  main>.hero{padding-block:var(--space-3) var(--space-4)}
  main>.hero .headline-md{margin-bottom:var(--space-3)}
  main>.hero .body-lg{font-size:var(--text-sm);line-height:1.4}
  main>.hero .mb-48{margin-bottom:var(--space-4)}
  .live-badge{margin-bottom:var(--space-2)}
  #scanner{padding-block:var(--space-4)}
  main>.hero>.container:has(>.btn-launch){display:flex;flex-direction:column}
  main>.hero>.container:has(>.btn-launch)>.sr{display:contents}
  main>.hero>.container:has(>.btn-launch) .body-lg{order:1;margin:var(--space-5) 0 0}
}

/* 320 x 568 class (A29's recipe): the 85px sheet starts at y 483, so the scanner steps down once more (its 56px field and button stay) */
@media (max-width:359.98px) and (max-height:600px){
  main>.hero:has(#scannerHeading){padding-block:var(--space-2) var(--space-3)}
  main>.hero:has(#scannerHeading) .hero-eyebrow{margin-bottom:var(--space-2)}
  main>.hero:has(#scannerHeading) .headline-md{margin-bottom:var(--space-2);font-size:var(--text-2xl)}
  #scanner{padding-block:var(--space-3)}
}

/* Progress, error and results. scanner.js sets display on these three, so only their children are laid out. */
#scanProgress{margin-top:var(--space-6)}
.scan-progress-track{max-width:25rem;height:4px;margin-bottom:var(--space-3);overflow:hidden;background:var(--color-rule);border-radius:var(--radius-control)}
.scan-progress-fill,.score-bar-fill{height:100%;transform:scaleX(0);transform-origin:left;transition:transform var(--dur-slow) var(--ease-out)}
.scan-progress-fill{background:var(--color-accent)}
.scan-progress-label{font-size:var(--text-sm);color:var(--color-ink-2)}
.scan-indicator{display:none} /* a second, decorative loading loop: the bar, the live label and the busy button already say it */
.scan-error{margin-top:var(--space-5);padding:var(--space-3) var(--space-4);border:var(--rule-hair) solid var(--color-danger);border-radius:var(--radius-control);font-size:var(--text-sm);color:var(--color-danger)}
#scanResults{margin-top:var(--space-7);transition:opacity var(--dur-slow) var(--ease-out)}

/* The readout: the grade large beside the score, its bar and the counts */
.results-header{
  display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:var(--space-6);align-items:center;
  grid-template-areas:"label label" "domain domain" "grade score" "grade bar" "grade stats" "note note" "link link";
}
.results-header>.eyebrow{grid-area:label}
.results-header>h2{grid-area:domain;font-size:var(--text-xl)}
#gradeValue{grid-area:grade}
#scoreValue{grid-area:score}
.results-header>.score-bar-track{grid-area:bar}
.results-header>.results-stats{grid-area:stats}
.results-header>.body-md{grid-area:note;margin-top:var(--space-5);font-size:var(--text-sm)}
#fullReport{grid-area:link}
.grade-badge{min-width:1.5ch;font:700 var(--text-title)/1 var(--font-display);letter-spacing:var(--tracking-display);color:var(--color-ink)}
.grade-a,.grade-b{color:var(--color-success)}
.grade-c,.grade-d{color:var(--color-warning)}
.grade-f{color:var(--color-danger)}
.score-value{margin-bottom:var(--space-2);font:600 var(--text-lg)/1.3 var(--font-body);font-variant-numeric:lining-nums tabular-nums;color:var(--color-ink)}
.score-bar-track{max-width:18.75rem;height:6px;margin-bottom:var(--space-3);overflow:hidden;background:var(--color-rule);border-radius:var(--radius-control)}
.score-bar-fill{background:var(--color-ink-2)}
.results-stats{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-5)}
.results-stats>span{display:inline-flex;align-items:center;gap:var(--space-2);font-size:var(--text-sm);color:var(--color-ink-2)}
.results-stats svg{flex:none;width:16px;height:16px;stroke-width:1.5}
.results-stats>span:first-child svg{color:var(--color-success)}
.results-stats>span:last-child svg{color:var(--color-danger)}
/* The offer under a result: a ruled row, not a card inside the band; its button steps back to secondary so the report link stays the one primary */
.scanner-cta-box{margin-top:var(--space-7);padding-top:var(--space-6);border-top:var(--rule-hair) solid var(--color-rule)}
.scanner-cta-box h3{margin-bottom:var(--space-2);font-size:var(--text-lg);letter-spacing:0;line-height:1.3}
.scanner-cta-box p{margin-bottom:var(--space-5);color:var(--color-ink-2)}
.scanner-cta-box .btn-gold{background:transparent;color:var(--color-ink);border-color:var(--color-rule-strong)}
@media (hover:hover){.scanner-cta-box .btn-gold:hover{background:var(--color-paper-3);color:var(--color-ink);border-color:var(--color-ink-2)}}

/* === THREAT MONITOR FIGURES (A5): on the ground, no boxes; a hairline before each figure after the first in its row. The value and captions come from style.css === */
.monitor-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-7) 0}
.monitor-stat{min-width:0;padding-inline:var(--space-5);border-inline-start:var(--rule-hair) solid var(--color-rule)}
.monitor-stat:nth-child(2n+1){padding-inline:0 calc(2 * var(--space-5) + var(--rule-hair));border-inline-start:0} /* the first figure of each row starts on the container edge; its end padding takes the start padding and hairline it lacks, so every content box is one width and the cqi cap sizes every value, and so every label, alike */
.monitor-stat-num{--stat-cap:43cqi} /* the widest value, "435+", runs 2.11em, 2.26em in the fallback; the cap never acts under style.css's 40px floor (A12) */
/* one per line under 17.75rem: at the 40px floor "435+" is 91px in the fallback, so two across needs 140px cells (A12) */
@container fig (width < 17.75rem){
  .monitor-stats>.monitor-stat:nth-child(n){grid-column:1/-1;padding:var(--space-5) 0 0;border-inline-start:0;border-block-start:var(--rule-hair) solid var(--color-rule)}
  .monitor-stats>.monitor-stat:first-child{padding-block-start:0;border-block-start:0}
}
.monitor-stats+p{margin-top:var(--space-6);font-size:var(--text-sm);color:var(--color-muted)}

/* === SECTION BODIES (phones first) === */
/* Steps: a sequence hanging from one hairline, in source order; no numerals drawn in CSS */
.scanner-steps,.monitor-steps{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--space-6)}
.scanner-step,.monitor-step{padding-top:var(--space-4);border-top:var(--rule-hair) solid var(--color-rule)}
:is(.scanner-step,.monitor-step) h3{margin-bottom:var(--space-2);font-size:var(--text-xl);letter-spacing:0;line-height:1.3}
:is(.scanner-step,.monitor-step) p,.check-item p,.monitor-feat p{color:var(--color-ink-2)}

/* How to read your result: ruled rows, the term beside its explanation from 768 */
#read-result .grid-2{grid-template-columns:minmax(0,1fr);gap:0;border-bottom:var(--rule-hair) solid var(--color-rule)}
#read-result .check-item{padding-block:var(--space-5);border-top:var(--rule-hair) solid var(--color-rule)}
#read-result .check-item h3{margin-bottom:var(--space-2)}
#read-result .container>.body-lg{margin-top:var(--space-7);font-size:var(--text-base);line-height:var(--leading-body);max-width:var(--measure)}

/* Checks and coverage: cells joined by 1px seams, the icon inline beside its title */
.check-grid,.monitor-features{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--rule-hair);background:var(--color-rule);border:var(--rule-hair) solid var(--color-rule)}
.check-grid .check-item,.monitor-feat{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:var(--space-3);align-content:start;padding:var(--space-6) var(--space-5);background:var(--color-paper-2)}
.check-icon,.monitor-feat-icon{grid-row:1;margin-top:var(--space-1);color:var(--color-ink-2)}
:is(.check-icon,.monitor-feat-icon) svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5}
.check-grid .check-item>:not(.check-icon),.monitor-feat>:not(.monitor-feat-icon){grid-column:2}
:is(.check-grid .check-item,.monitor-feat) h3{margin-bottom:var(--space-2);font-size:var(--text-xl);letter-spacing:0;line-height:1.3}

/* The FAQ runs in the body column, not centred */
main .faq-list{margin-inline:0;max-width:none}

@media (min-width:480px){
  .check-grid,.monitor-features{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:768px){
  main>.hero{padding-block:var(--space-7)}
  main>.hero .body-lg{font-size:var(--text-lg);line-height:1.55}
  .scanner-form{flex-direction:row;gap:0}
  #domainInput{flex:1 1 auto;border-start-end-radius:0;border-end-end-radius:0}
  .scanner-form .btn{flex:none;border-start-start-radius:0;border-end-start-radius:0}
  #read-result .check-item{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);column-gap:var(--col-gap)}
  #read-result .check-item h3{margin-bottom:0}
}

/* === THE BRIEF LAYOUT, from 1024 (DESIGN.md): the head on columns 1 to 4, sticky beside the body on 6 to 12 === */
@media (min-width:1024px){
  main>.hero{padding-block:var(--space-6) var(--space-7)}
  #scanner .container{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--col-gap);align-items:start}
  #scanner .container>*{grid-column:1/span 7}
  #scanner .container>#scannerForm~p{grid-column:9/-1;grid-row:2} /* the date line sits under the note, so the results still start on row 2 beside it */
  #scanner .container>#scannerForm+p{grid-row:1;margin-top:0}
  .monitor-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
  .monitor-stat:nth-child(2n+1){padding-inline:var(--space-5);border-inline-start:var(--rule-hair) solid var(--color-rule)}
  .monitor-stat:nth-child(4n+1){padding-inline:0 calc(2 * var(--space-5) + var(--rule-hair));border-inline-start:0}

  :where(main .section)>:is(.container,.container-md):has(>.sr:first-child){display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--col-gap);align-items:start}
  :where(main .section)>:is(.container,.container-md):has(>.sr:first-child)>*{grid-column:6/-1}
  :where(main .section)>:is(.container,.container-md)>.sr:first-child{grid-column:1/span 4;grid-row:1/span 2;position:sticky;top:calc(var(--nav-h) + var(--space-6));margin-bottom:0}
  /* the head's own intro rides with it in the 4-column head, a step down so its lines stay readable */
  :where(main .section)>:is(.container,.container-md)>.sr:first-child>.body-lg{font-size:var(--text-base);line-height:var(--leading-body)}
  /* A section that is only its head (a statement, the close): the head on 1 to 4, its text and action on 6 to 12 */
  :where(main .section)>:is(.container,.container-md)>.sr:only-child:has(>.body-lg){
    grid-column:1/-1;grid-row:auto;position:static;
    display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--col-gap);align-items:start;
  }
  :where(main .section)>:is(.container,.container-md)>.sr:only-child:has(>.body-lg)>*{grid-column:6/-1}
  :where(main .section)>:is(.container,.container-md)>.sr:only-child:has(>.body-lg)>.eyebrow{grid-column:1/span 4;grid-row:1}
  :where(main .section)>:is(.container,.container-md)>.sr:only-child:has(>.body-lg)>h2{grid-column:1/span 4;grid-row:2/span 2}
  :where(main .section)>:is(.container,.container-md)>.sr:only-child:has(>.body-lg)>.body-lg{grid-row:2;font-size:var(--text-lg);line-height:1.55}
  :where(main .section)>:is(.container,.container-md)>.sr:only-child:has(>.body-lg)>.btn{grid-row:3;justify-self:start}
  /* How it works: the head above, the three steps across all twelve columns from one hairline */
  :where(main .section)>.container:has(>:is(.scanner-steps,.monitor-steps))>.sr:first-child{grid-row:auto;position:static;margin-bottom:var(--space-6)}
  :where(main .section)>.container:has(>.sr:first-child)>:is(.scanner-steps,.monitor-steps){grid-column:1/-1}
  .scanner-steps,.monitor-steps{grid-template-columns:repeat(3,minmax(0,1fr));column-gap:var(--col-gap);padding-top:var(--space-5);border-top:var(--rule-hair) solid var(--color-rule)}
  .scanner-step,.monitor-step{padding-top:0;border-top:0}
}

/* === REDUCED MOTION: the live dot holds still; the bars and the results appear at once (style.css ends every transition) === */
@media (prefers-reduced-motion:reduce){
  .live-dot{animation:none}
}
