/* Design tokens: look direction A, "Night Shift" (../../brand/LOOK.md). Agent, 2026-11-25.
   NOT CONFIRMED: Valera has not picked a direction yet. The whole look is this file plus theme.css; to try
   direction B or C, replace those two files. No markup, script or styles.css change is needed.

   Two parts:
   1. THE PALETTE: the direction's own tokens, lifted as they are from brand/tokens/a-night-shift.css
      (plus one colour its page uses without naming, marked below, and the shadow's offset given a name so
      every shadowed box can be set in by exactly that much).
   2. WHAT THE PAGE READS: the names styles.css uses, each pointed at the palette. A new direction brings
      its own part 1 and re-points part 2.

   Fonts: the one request this page makes to another host, and it never holds the page up. Their stylesheet
   is named below in --font-stylesheet, and fonts.js adds it once the page is there. It is not an import
   here: that would keep the page blank while that host answers. Until the faces land, or if they never do,
   or with JavaScript off, the page is set in the fallback faces below, cut to the same widths so no line
   breaks differently and nothing moves when the real ones swap in. A look with no web fonts leaves
   --font-stylesheet out. (The address is written with %3B for each semicolon, so the value holds none of its
   own.) Self-hosting later means @font-face rules here, the token gone, and the two preconnect lines in
   scripts/render.js deleted. */

/* Fallback faces, matched to the real ones by width (measured in a browser on one long line of the page's own
   copy: Plex Sans 400 is 100.6% of Arial and 600 is 97.2% of Arial Bold, Plex Mono is Courier New's width,
   and the pixel face, a full em per letter, is 164.5% of a system mono). Ascent and descent are the real
   faces', so a line stands the same. A device with none of the named faces uses its own defaults. */
@font-face{
  font-family:"Pixel Fallback"; src:local("Courier New"), local("Cousine"), local("Liberation Mono"), local("Droid Sans Mono");
  size-adjust:164.5%; ascent-override:60.8%; descent-override:0%; line-gap-override:0%;
}
@font-face{
  font-family:"Plex Sans Fallback"; font-weight:400; src:local("Arial"), local("Helvetica"), local("Liberation Sans");
  size-adjust:100.6%; ascent-override:101.4%; descent-override:26.8%; line-gap-override:0%;
}
@font-face{
  font-family:"Plex Sans Fallback"; font-weight:600; src:local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Liberation Sans Bold");
  size-adjust:97.2%; ascent-override:105%; descent-override:27.8%; line-gap-override:0%;
}
@font-face{
  font-family:"Plex Mono Fallback"; src:local("Courier New"), local("Cousine"), local("Liberation Mono"), local("Droid Sans Mono");
  size-adjust:100%; ascent-override:102%; descent-override:27%; line-gap-override:0%;
}

/* ---------- 1. The palette (direction A) ---------- */
:root{
  --bg:#060A1C;            /* deep navy, the dim room */
  --surface:#0C1433;       /* panels and cards */
  --surface-2:#121D47;     /* raised panels, hard shadows */
  --line:#24347A;          /* borders and grid lines */
  --line-bright:#3A4FA8;   /* dividers that must show */
  --ink:#DCE8FF;           /* body text */
  --ink-dim:#A9BBEA;       /* secondary text */
  --ink-bright:#F2FAFF;    /* headlines (used by the direction's page as a literal; named here) */
  --cyan:#5CE6FF;          /* the glow: primary action, highlights */
  --cyan-hi:#8FF0FF;       /* primary hover */
  --cyan-lo:#3CCBE8;       /* primary pressed */
  --cyan-deep:#0E8FB3;     /* the lip under the primary button */
  --blue:#1F4FD6;          /* secondary action, fills */
  --blue-hi:#2459E6;       /* secondary hover */
  --blue-deep:#122C8A;     /* the lip under the secondary button, headline offset */
  --on-cyan:#04122B;       /* text on cyan */
  --on-blue:#EAF2FF;       /* text on blue */

  --lip:6px;                                   /* button travel when pressed */
  --shadow-offset:8px;                         /* how far a hard shadow stands off its box */
  --shadow-offset-lg:12px;
  --shadow-hard:var(--shadow-offset) var(--shadow-offset) 0 var(--surface-2);          /* hard offset, never soft */
  --shadow-hard-lg:var(--shadow-offset-lg) var(--shadow-offset-lg) 0 var(--surface-2);
  --glow:0 0 28px rgba(92, 230, 255, 0.38);    /* the only soft effect, kept for lit things */
  --glow-strong:0 0 44px rgba(92, 230, 255, 0.6);
  --glow-dim:0 0 14px rgba(92, 230, 255, 0.3);
  --glow-blue:0 0 48px rgba(36, 89, 230, 0.5);
  --glow-blue-strong:0 0 28px rgba(36, 89, 230, 0.7);
  --grid:32px;                                 /* background grid pitch */
  --grid-line:rgba(92, 230, 255, 0.055);       /* the grid's lines */
  --grid-wash:rgba(36, 89, 230, 0.22);         /* the blue pool of light behind the hero */
  --scanline:rgba(4, 7, 20, 0.38);             /* the lines across a lit screen */
  --key-light:rgba(255, 255, 255, 0.5);        /* a key's lit edge (primary) */
  --key-light-hover:rgba(255, 255, 255, 0.6);
  --key-light-soft:rgba(255, 255, 255, 0.22);  /* a key's lit edge (secondary) */
  --key-light-soft-hover:rgba(255, 255, 255, 0.3);
  --key-shade:rgba(4, 18, 43, 0.22);           /* a key's shaded edge */
  --key-shade-deep:rgba(4, 18, 43, 0.3);
  --key-shade-press:rgba(4, 18, 43, 0.4);
  --well:rgba(0, 0, 0, 0.45);                  /* the inset shadow of a field */
  --headline-glow:rgba(92, 230, 255, 0.45);
}

/* ---------- 2. What the page reads ---------- */
:root{
  color-scheme:dark;                 /* native controls (select menus, scrollbars) follow the theme */

  /* Colour: grounds */
  --color-bg:var(--bg);              /* the page */
  --color-bg-alt:var(--surface);     /* alternate sections */
  --color-surface:var(--surface-2);  /* cards */
  --color-panel:var(--surface);      /* the form panel, FAQ rows, the table */
  --color-field:var(--bg);           /* inputs */

  /* Colour: text */
  --color-text:var(--ink);
  --color-text-muted:var(--ink-dim);
  --color-heading:var(--ink-bright);
  --color-title:var(--cyan);         /* section titles */

  /* Colour: lines */
  --color-line:var(--line);          /* quiet dividers */
  --color-border:var(--line-bright); /* card and panel edges */
  --color-border-control:var(--cyan-deep);   /* field edges. The direction draws them in line-bright, which is
                                                2.4:1 on a panel; a field's edge needs 3:1, so it takes the
                                                palette's deep cyan (4.8:1) */

  /* Colour: action */
  --color-accent:var(--cyan);        /* the primary button, links, icons */
  --color-accent-strong:var(--cyan-hi);
  --color-accent-press:var(--cyan-lo);
  --color-on-accent:var(--on-cyan);
  --color-accent-soft:var(--surface-2);
  --color-secondary:var(--blue);     /* the secondary button */
  --color-secondary-strong:var(--blue-hi);
  --color-on-secondary:var(--on-blue);
  --color-ours:var(--cyan);          /* our column in the comparison: the light accent, */
  --color-ours-strong:var(--cyan-lo);/* its cell in a decision row, */
  --color-on-ours:var(--on-cyan);    /* its words (13:1 on the cyan), */
  --color-ours-line:var(--cyan-deep);/* and the lines inside its card */
  --color-highlight:var(--cyan);     /* the TBC marker, the picked chip */
  --color-on-highlight:var(--on-cyan);
  --color-badge:var(--on-cyan);      /* a plan's badge: its own dark ground, so it stands off the lit bar */
  --color-on-badge:var(--cyan);
  --color-focus:var(--cyan-hi);
  --color-shadow:var(--surface-2);

  /* Colour: state. The direction names none; these keep 4.5:1 on every ground. */
  --color-success:#6EE7A8;
  --color-success-soft:#10301F;
  --color-error:#FF9B9B;
  --color-error-soft:#3A1420;

  /* Type: the pixel face for headlines, titles, buttons and prices only; a mono for labels; a plain face to read */
  --font-stylesheet:"https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400%3B500&family=IBM+Plex+Sans:wght@400%3B600&family=Press+Start+2P&display=swap";
  --font-preconnect:"https://fonts.gstatic.com";   /* where that stylesheet's font files live: connected to early, and only when the stylesheet is named */
  --font-display:"Press Start 2P","Pixel Fallback","Courier New",monospace;
  --font-label:"IBM Plex Mono","Plex Mono Fallback",ui-monospace,"SFMono-Regular",Menlo,monospace;
  --font-body:"IBM Plex Sans","Plex Sans Fallback",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --weight-body:400;
  --weight-strong:600;
  --weight-display:400;              /* the pixel face has one weight */
  --weight-label:500;
  --display-ligatures:none;          /* the pixel face joins "fi" into one cell, so "wifi" misreads: ligatures off */
  --display-features:"liga" 0, "clig" 0, "calt" 0;

  /* The pixel face is drawn on a grid of 8, so it is only sharp at sizes that are multiples of 8px (in px,
     not rem, so they stay on the grid). No fluid sizes: each steps at a breakpoint further down.
     The direction sets the headline at 52px for an 11-character line; the working headline is 41
     characters, so it steps 16, 24, 32, 40 here. See README, "The look". */
  --fs-display:16px;                 /* the h1: phones (24px on tall phones, 32px tablets, 40px wide: below) */
  --fs-2xl:16px;                     /* section titles (24px from 768) */
  --fs-xl:24px;                      /* prices */
  --fs-lg:16px;                      /* card, plan, step and form titles */
  --fs-button:16px;                  /* buttons */
  --fs-brand:16px;                   /* the brand in the header and footer, step numbers */
  /* The header's small button is set in the label face: the pixel face has no sharp size small enough for it */
  --font-button-sm:var(--font-label);
  --fs-button-sm:.8125rem;
  --weight-button-sm:500;
  --tracking-button-sm:.08em;
  /* Read at length: the plain face */
  --fs-md:clamp(1rem, .95rem + .3vw, 1.1875rem);        /* 16-19 lead */
  --fs-base:1.0625rem;                                  /* 17 body, inputs (16 or more keeps iOS from zooming a focused field) */
  --fs-sm:.9375rem;                                     /* 15 captions, small text */
  --fs-xs:.8125rem;                                     /* 13 labels, fine print */

  --leading-tight:1.4;               /* the pixel face needs air */
  --leading-heading:1.5;
  --leading-body:1.6;
  --tracking-display:0;
  --tracking-label:.08em;
  --tracking-button:0;
  --case-label:uppercase;            /* labels and badges */
  --case-button:uppercase;

  /* Spacing: one 4px scale */
  --space-1:.25rem;
  --space-2:.5rem;
  --space-3:.75rem;
  --space-4:1rem;
  --space-5:1.25rem;
  --space-6:1.5rem;
  --space-7:2rem;
  --space-8:2.5rem;

  /* Layout */
  --gutter:clamp(1rem, .3rem + 3vw, 3rem);
  --section-y:clamp(3rem, 2rem + 5vw, 6rem);
  --container:1200px;
  --container-narrow:760px;
  --measure:62ch;
  --header-h:60px;                   /* the sticky bar: anchors clear it */
  --control-h:56px;                  /* buttons */
  --control-h-sm:44px;
  --field-h:52px;                    /* inputs */

  /* Shape: square */
  --radius-sm:0px;
  --radius-md:0px;
  --radius-lg:0px;

  /* Borders */
  --border-width:2px;
  --border-width-heavy:3px;          /* lit frames */
  --border-line:1px solid var(--color-line);
  --border-card:var(--border-width) solid var(--color-border);
  --border-control:var(--border-width) solid var(--color-border-control);
  --border-button:0 solid transparent;                                /* a key has no outline: its edges are light and shade */
  --border-accent:var(--border-width) solid var(--color-accent);
  --border-frame:var(--border-width-heavy) solid var(--color-accent); /* the lit screen, the featured plan */
  --border-plan:var(--border-width-heavy) solid var(--color-border);  /* every other plan: the same width, so rows line up */

  /* Shadows: hard and offset. Glow only on things that are lit. */
  --shadow-card:var(--shadow-hard);
  --shadow-panel:var(--shadow-hard-lg);
  --shadow-inset-card:var(--shadow-offset);      /* a shadowed box is set in by its shadow, so box and shadow */
  --shadow-inset-panel:var(--shadow-offset-lg);  /* together end on the column's edge */
  --shadow-frame:var(--shadow-hard-lg), var(--glow-blue);
  --shadow-field:inset 4px 4px 0 var(--well);
  --shadow-field-focus:inset 4px 4px 0 var(--well), var(--glow);
  --shadow-none:0 0 0 0 transparent;
  /* The key: lit from above, standing on a lip; pressed, it travels down onto the lip */
  --button-lip:var(--lip);           /* room kept under a button for its lip */
  --button-hover-x:0px; --button-hover-y:0px;
  --button-press-x:0px; --button-press-y:var(--lip);
  --shadow-button:inset 4px 4px 0 var(--key-light), inset -4px -4px 0 var(--key-shade), 0 var(--lip) 0 var(--cyan-deep), var(--glow);
  --shadow-button-hover:inset 4px 4px 0 var(--key-light-hover), inset -4px -4px 0 var(--key-shade), 0 var(--lip) 0 var(--cyan-deep), var(--glow-strong);
  --shadow-button-press:inset 4px 4px 0 var(--key-shade-deep), 0 0 0 var(--cyan-deep), var(--glow-dim);
  --shadow-button-2:inset 4px 4px 0 var(--key-light-soft), inset -4px -4px 0 var(--key-shade-deep), 0 var(--lip) 0 var(--blue-deep);
  --shadow-button-2-hover:inset 4px 4px 0 var(--key-light-soft-hover), inset -4px -4px 0 var(--key-shade-deep), 0 var(--lip) 0 var(--blue-deep), var(--glow-blue-strong);
  --shadow-button-2-press:inset 4px 4px 0 var(--key-shade-press), 0 0 0 var(--blue-deep);

  /* Icons */
  /* Marks the theme paints. Their sizes are tokens, so the theme itself never moves a box. */
  --icon-tile-size:48px;             /* a feature card's icon tile, */
  --icon-tile-pad:10px;              /* the room around the icon inside it, */
  --border-icon-tile:var(--border-accent);   /* and its edge */
  --check-size:8px;                  /* the square that marks a plan's line */
  --check-drop:.6em;                 /* how far it sits below the line's top */
  --brand-mark-size:16px;            /* the square before the brand (20px from 768: below); 0 leaves it out */
  --screen-overlay:repeating-linear-gradient(0deg, var(--scanline) 0 1px, transparent 1px 3px);   /* scan lines over the hero photo; none for a look without */
  --icon-stroke:2;
  --icon-cap:square;
  --icon-join:miter;

  /* Focus */
  --focus-width:2px;
  --focus-offset:4px;

  /* Motion */
  --dur-fast:90ms;
  --dur-base:200ms;
  --ease:cubic-bezier(.2,0,0,1);

  /* Layers */
  --z-sticky:50;
}

/* Phones: every shadow is the small one, and the smallest screens (all 2x or sharper, where 12px is on the
   pixel face's grid) take the smaller button face so three-word labels hold one line. */
@media (max-width:767px){
  :root{ --shadow-offset-lg:8px; }
}
@media (max-width:359px){
  :root{ --fs-button:12px; }
}
@media (min-width:375px) and (max-width:767px) and (min-height:700px){
  :root{ --fs-display:24px; }       /* a phone that is tall and wide enough has room for the larger headline */
}
@media (min-width:768px){
  :root{ --fs-display:32px; --fs-2xl:24px; --brand-mark-size:20px; }
}
@media (min-width:1024px){
  :root{ --header-h:72px; }
}
@media (min-width:1280px){
  :root{ --fs-display:40px; }
}

@media (prefers-reduced-motion: reduce){
  :root{ --dur-fast:0ms; --dur-base:0ms; }
}
