/* ==========================================================================
   Token contract + reset — Porsche Mission S concept
   The ONLY file with a color or a face in it. components.css names none.

   LIGHT BUILD. Porsche's own Mission S page is a white studio, near black
   type and one red, and the palette is theirs: we are not the ones to
   change it (Alex, 22 Oct 2026). Every value here is sampled out of their
   own press frames with _src/tools/sample.js. The red is the measured
   dominant of the TRACK dial face: #D81415 over 261 px, #E3151A over
   176 px, mean #DC1417.

   Two things the library's README warns about on a light build, both done:
   the --lift-* tokens are flipped to rgba(0,0,0,...), and --line-2 is
   re-weighted until it clears 3:1 against the canvas (.46 measures 3.23:1;
   the .14 default measures 1.1:1 here).

   The one deliberate inversion is `html.solo`, at the bottom: pressing the
   red button turns the assistance systems off and the page black. It is a
   state, not a second palette, and it is six tokens.
   ========================================================================== */

:root{
  /* ---- surfaces ----
     Their studio white, a hair off pure so raised white cards can sit on
     it and still read as raised. Never pure #fff. */
  --ink:            #F4F4F6;   /* page background                          */
  --ink-soft:       #ECEDEF;   /* banded sections, one step off the canvas */
  --surface:        #FFFFFF;   /* cards and raised panels                  */
  --surface-2:      #F8F8FA;   /* a card on hover                          */
  --surface-3:      #E6E7EA;   /* inputs, the deepest step                 */
  --void:           #050507;   /* lights out. Still not #000               */

  /* ---- glass ---- */
  --ink-glass:       rgba(244,244,246,.82);
  --ink-glass-solid: rgba(244,244,246,.97);

  /* ---- lift ----
     Flipped to black for the light canvas, as the library's README
     requires. Leaving these white is how ghost buttons vanish. */
  --lift-1:         rgba(11,12,14,.030);
  --lift-2:         rgba(11,12,14,.055);
  --lift-3:         rgba(11,12,14,.085);

  /* ---- lines ----
     --line is decorative. --line-2 borders anything interactive and clears
     3:1 composited on --ink (measured 3.23:1). */
  --line:           rgba(11,12,14,.13);
  --line-2:         rgba(11,12,14,.46);
  --line-accent:    rgba(220,20,23,.40);

  /* ---- type ---- */
  --text:           #0B0C0E;   /* their instrument black. 17.82:1 on --ink */
  --text-dim:       #5A5F66;   /*  5.86:1                                  */
  /* 5.35:1 on --ink and 5.01:1 on --ink-soft. The first pass used #686D74,
     which measured 4.75:1 on the canvas but 4.45:1 over the footer band,
     and contrast.js failed every eyebrow and the concept note on it. */
  --text-mute:      #60656C;

  /* ---- brand ----
     On a light canvas the red measures 4.60:1, so unlike the dark draft it
     would pass as text. It still is not used as one: red is the redline,
     the TRACK face, the button and the focus ring, which is how the car
     uses it. --accent-text is a half step darker for the focus ring. */
  --accent:         #DC1417;
  --accent-hover:   #B81114;   /* darker on hover, not brighter: light build */
  --accent-2:       #A30F12;
  --accent-deep:    #7A0B0D;
  --accent-ink:     #FFFFFF;   /* on --accent, 5.05:1                      */
  --accent-text:    #C81013;   /* 5.40:1 on --ink                          */
  --accent-soft:    rgba(220,20,23,.08);
  --accent-pulse:   rgba(220,20,23,.45);
  --glow:           rgba(220,20,23,.14);
  --glow-strong:    rgba(220,20,23,.30);

  /* ---- the instrument -----------------------------------------------
     The binnacle stays dark on the white page, because in the car it is a
     dark hood with lit dials in it. These do not follow the canvas. */
  --pod-bg:         #0E0F12;
  --pod-line:       rgba(237,239,242,.26);
  --pod-text:       #EDEFF2;
  --pod-dim:        #9BA3AB;
  --dial-face:      #E7E9EC;   /* NORMAL and SPORT: the white dial         */
  --dial-ink:       #0B0C0E;   /* numerals on the white dial               */
  --dial-face-trk:  #0A0A0B;   /* TRACK: the dial goes black               */
  --dial-ink-trk:   #F2F4F6;
  --dial-rim:       #33383F;

  /* ---- feedback ---- */
  --warn:           #9A6400;
  --bad:            #C81013;
  --bad-line:       rgba(200,16,19,.40);
  --bad-soft:       rgba(200,16,19,.07);
  --good:           #16794B;

  /* ---- type faces ----
     Archivo at 112% width for display: wide, engineered, and not one of
     the two faces that announce a template. Plex Sans and Plex Mono are
     siblings, so the body and the instrument numerals agree. */
  --font-display:   'Archivo', 'Archivo Expanded', system-ui, sans-serif;
  --font-body:      'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:      'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --font-label:     var(--font-mono);

  /* ---- metrics ---- */
  --max:            1180px;
  --max-narrow:     780px;
  --r-sm:           6px;
  --r:              10px;
  --r-lg:           16px;
  --r-pill:         999px;
  --pad-y:          clamp(5rem, 10vw, 9rem);

  --ease:           cubic-bezier(.25,1,.5,1);   /* the motion layer's curve */
  --t-fast:         .16s var(--ease);
  --t:              .32s var(--ease);
}

/* The cabin. The page opens inside the binnacle (the hero), and chapter 03
   goes back into it, so the words on both, the concept ribbon above the
   hero and the header while either is under it read light on dark. A scope, not a second palette:
   the same values the blackout below uses for type, and nothing else. */
.ignition,
.binnacle-run,
.concept-bar,
.site-header.on-dark{
  --ink:            var(--void);
  --ink-soft:       #0A0A0C;
  --ink-glass:      rgba(5,5,7,.82);
  --line:           rgba(242,244,246,.11);
  --line-2:         rgba(242,244,246,.42);
  --text:           #F2F4F6;
  --text-dim:       #B9BFC6;
  --text-mute:      #8A929B;
  --accent-text:    #FF4438;
}

/* A section sized 100lvh is the window with a phone's toolbars away, and at
   the top of a page they are not away. This is the gap, as a property, so a
   headless check can hand it a real phone's value. */
:root{--fold:calc(100lvh - 100svh);}

/* The one inversion. Chapter 05's red button turns the assistance systems
   off and the lights with them. Six tokens, and the whole page follows. */
html.solo{
  --ink:            var(--void);
  --ink-soft:       #0A0A0C;
  --surface:        #121317;
  --surface-2:      #181A1F;
  --surface-3:      #1E2126;
  --ink-glass:      rgba(5,5,7,.82);
  --lift-1:         rgba(242,244,246,.03);
  --lift-2:         rgba(242,244,246,.055);
  --lift-3:         rgba(242,244,246,.085);
  --line:           rgba(242,244,246,.11);
  --line-2:         rgba(242,244,246,.42);
  --text:           #F2F4F6;
  --text-dim:       #B9BFC6;
  --text-mute:      #8A929B;
  --accent-text:    #FF4438;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

*,*::before,*::after{box-sizing:border-box;}

html{
  scroll-behavior:smooth;
  scroll-padding-top:6rem;
  -webkit-text-size-adjust:100%;
}

body{
  margin:0;
  background:var(--ink);
  color:var(--text);
  font-family:var(--font-body);
  font-size:1rem;
  line-height:1.66;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
  transition:background-color .9s var(--ease),color .9s var(--ease);
}

h1,h2,h3,h4{
  font-family:var(--font-display);
  font-weight:700;
  font-stretch:112%;
  margin:0;
  /* 1.02 clipped the ascenders inside the motion layer's line masks, which
     pad .16em and no more. 1.07 is still tight and never cuts a glyph. */
  line-height:1.07;
  letter-spacing:-.018em;
  text-transform:uppercase;
  text-wrap:balance;
}
h1{font-size:clamp(2.4rem,5.4vw,4.6rem);}
h2{font-size:clamp(1.95rem,4.6vw,3.5rem);}
h3{font-size:clamp(1.1rem,1.9vw,1.35rem);letter-spacing:-.01em;line-height:1.16;}
h4{font-size:.98rem;letter-spacing:0;line-height:1.3;font-weight:600;}

p{margin:0;}
p + p{margin-top:1rem;}

a{color:inherit;text-decoration:none;}

img,svg{display:block;max-width:100%;}

/* ol as well as ul: the library only ever reset ul, and this build uses
   ordered lists for the three readings, the five markers and the five
   details, so the browser's own "1." turned up beside every one of them. */
ul,ol{margin:0;padding:0;list-style:none;}

strong{font-weight:500;color:var(--text);}

::selection{background:var(--accent);color:var(--accent-ink);}

:focus-visible{
  outline:2px solid var(--accent-text);
  outline-offset:3px;
  border-radius:3px;
}

/* Fixed, not absolute: on a scrolled page an absolutely placed skip link
   takes focus off screen. Found by the Sapphire build's keyboard pass,
   20 Oct 2026, and fixed here too rather than left for the next build. */
.skip-link{
  position:fixed;left:-9999px;top:0;z-index:300;
  background:var(--accent);color:var(--accent-ink);
  padding:.8rem 1.3rem;border-radius:0 0 var(--r-sm) 0;
  font-weight:600;font-size:.9rem;
}
.skip-link:focus{left:0;}

.visually-hidden{
  position:absolute;width:1px;height:1px;
  padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;border:0;
}

[hidden]{display:none !important;}

.honeypot{display:none !important;}

@media (pointer:coarse){
  .btn,.nav a,.faq-q{
    min-height:44px;
    display:inline-flex;align-items:center;justify-content:center;
  }
  .faq-q{display:flex;justify-content:space-between;}
}

@media (prefers-reduced-motion:reduce){
  body{transition:none;}
}
