/**
 * The site's spacing scale.
 *
 * ── WHERE THESE NUMBERS CAME FROM ─────────────────────────────────────────
 * They were not chosen. They were measured. Across the customer-facing pages
 * there were 2,280 rem values in padding, margin and gap declarations, spread
 * over 55 distinct numbers. Seven of them were used more than a hundred times
 * each, and those seven turned out to be an unbroken ascending scale:
 *
 *     .5   .75   1   1.25   1.5   2   2.5
 *
 * That is the site's spacing system. It already existed; nobody had written
 * it down. Everything else (.55rem, .6rem, .65rem, .85rem and the rest) is
 * drift around these values, and is deliberately left alone: replacing a
 * .65rem with a .75rem would move pixels, and this file moves none.
 *
 * ── WHY IT IS A SEPARATE FILE ─────────────────────────────────────────────
 * Every page carries its own :root block, so the palette is already written
 * out twenty times. Adding seven more variables to each of those would be
 * twenty more copies of one rule, which is the failure this codebase keeps
 * having. One file, linked by every page that uses it, and a build gate
 * (check-spacing-tokens.mjs) that fails if a page uses var(--s-*) without
 * linking this file. A page that used them without the link would lose all
 * its spacing at once.
 *
 * ── ADDING TO THIS ────────────────────────────────────────────────────────
 * Do not add a value because a design needs it once. Add one when it has
 * earned its place by being used, and say how many times in the comment.
 */

:root {
  --s-xs:  .5rem;
  --s-sm:  .75rem;
  --s-md:  1rem;
  --s-lg:  1.25rem;
  --s-xl:  1.5rem;
  --s-2xl: 2rem;
  --s-3xl: 2.5rem;
}

/**
 * The palette.
 *
 * ── WHERE THE VALUES COME FROM ────────────────────────────────────────────
 * api/_lib/palette.js, which src/App.jsx reads. A static page cannot import
 * a module, so the values are written out here a second time, and
 * check-palette-tokens.mjs fails the build if the two disagree.
 *
 * The redesign (A362): navy bands, an orange call to action, light blue as
 * the second accent and the partner's colour, a grey page with white cards,
 * and Archivo as the only typeface.
 *
 * ── THE OLD NAMES STAY ────────────────────────────────────────────────────
 * Every page reads --ink, --warm, --orange and the rest. They keep their
 * names and take the new values, so a page restyles without being edited:
 * --warm is the page grey now, --cream the white of a card, --stone the
 * divider, --indigo the light blue and --clay the lighter navy.
 *
 * ── NO PAGE OVERRIDES THESE ───────────────────────────────────────────────
 * Pages used to carry their own :root copies of some of these, and the In
 * Practice articles restated the whole palette. Those are gone: a page that
 * redeclares a colour from here is a second copy of it, and
 * check-palette-tokens refuses one.
 *
 * ── NOT HERE ON PURPOSE ───────────────────────────────────────────────────
 * admin.html, workbook-render.html and email-preview.html keep their own
 * palettes. They are a dashboard, a print renderer and an internal preview.
 */

:root {
  --hfont:  'Archivo',system-ui,sans-serif;
  --bfont:  'Archivo',system-ui,sans-serif;

  --navy:        #142447;
  --navy-light:  #2C3D66;
  --navy-deep:   #0B1744;
  --orange:      #FF8A3D;
  --orange-deep: #F07A2C;
  --orange-ink:  #C25A12;
  --blue:        #8FB8FF;
  --page:        #EEF1F6;
  --card:        #FFFFFF;
  --ink:         #0F1A33;
  --muted:       #5A6478;
  --ink-faint:   #8A93A6;
  --divider:     #E1E5EE;
  --orange-tint: #FFF1E6;
  --blue-tint:   #EAF1FF;
  --blue-ink:    #2F5FC4;
  --butter:      #FFD15C;
  --cobalt:      #2F5BEA;
  --night:       #0B1428;

  /* The old names, on the new values. */
  --text:   #0F1A33;
  --stone:  #E1E5EE;
  --warm:   #EEF1F6;
  --cream:  #FFFFFF;
  --indigo: #8FB8FF;
  --clay:   #2C3D66;
  --green:  #10b981;

  --card-shadow: 0 8px 24px rgba(20,36,71,0.08);
  --card-radius: 22px;
}

/**
 * ── HEADINGS DO NOT ITALICISE ─────────────────────────────────────────────
 * Every page hero was written as a plain half and an <em> half, which the
 * browser renders in italic serif and which several pages also coloured. It
 * read as two voices in one sentence.
 *
 * The <em> tags are left in the markup because they are how each headline is
 * broken, and pulling twelve of them out by hand is twelve chances to drop a
 * word. This turns off the styling instead, in one place, so a new page cannot
 * reintroduce it by copying an old one.
 *
 * Body prose keeps its italics. This is scoped to headings.
 */
h1 em,
h2 em,
h3 em {
  font-style: normal;
  color: inherit;
}

/**
 * ── THE REDESIGN LAYER ────────────────────────────────────────────────────
 * What every static page shares in the new look, written once instead of
 * into thirty-five <style> blocks. Selectors start at `html body` so they
 * outrank a page's own `nav{...}` or `body{...}` without !important, even
 * though this file loads first.
 *
 * The page is grey and the cards on it are white; the nav is a navy band
 * with the white mark and wordmark; the mark is navy on a light ground and
 * white on a dark one.
 */
html body{background:var(--page)}

.attune-mark{color:var(--navy);display:block;flex-shrink:0}
.logo-text{font-stretch:125%;font-weight:800;letter-spacing:-.005em;white-space:nowrap}

html body > nav{background:var(--navy);border-bottom-color:transparent;backdrop-filter:none}
html body > nav .attune-mark,
html body > nav .logo-text{color:#FFFFFF}
html body > nav .nav-center > li > a,
html body > nav .nav-dropdown-toggle,
html body > nav .nav-signin{color:rgba(255,255,255,.74)}
html body > nav .nav-center > li > a:hover,
html body > nav .nav-center > li > a.active,
html body > nav .nav-dropdown-toggle:hover,
html body > nav .nav-dropdown-toggle.active,
html body > nav .nav-signin:hover{color:#FFFFFF}
html body > nav .hamburger span{background:#FFFFFF}
/* The bar's height and the lockup's sizes, at every width: public/lockup.css. */
html body > nav .cart-btn{color:#FFFFFF;border-color:rgba(255,255,255,.28)}
html body > nav .cart-btn:hover{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.5)}

.sf-brand .attune-mark{color:#FFFFFF}

/**
 * The navy band: a page's opening block, with the two decorative circles
 * bleeding off its top right corner, the lighter navy one large and the
 * orange one small. A page opts in with class="attune-band" on the block
 * and <span class="band-circles" aria-hidden="true"></span> inside it.
 *
 * The circles are the span's pseudo-elements rather than the band's, because
 * several bands already use their own ::before and ::after for the rules at
 * their edges. The span is its own clipping layer at z-index -1 inside the
 * band's stacking context: over the band's ground, under everything in it,
 * and with no pointer events, so a circle can never cover a control. It\n * starts 58px down, under the fixed nav, so the circles bleed off the top of\n * what a reader sees as the band rather than vanishing behind the nav. The
 * sizes are src/band-circles.jsx's, which draws the same pair in React.
 */
.attune-band{background:var(--navy);color:#FFFFFF;position:relative;isolation:isolate}
.band-circles{position:absolute;inset:58px 0 0 0;overflow:hidden;pointer-events:none;z-index:-1}
.band-circles::before,
.band-circles::after{content:'';position:absolute;border-radius:50%}
.band-circles::before{width:380px;height:380px;top:-175px;right:-122px;background:var(--navy-light)}
.band-circles::after{width:132px;height:132px;top:-58px;right:160px;background:var(--orange);opacity:.92}
@media(max-width:640px){
  .band-circles::before{width:150px;height:150px;top:-69px;right:-60px}
  .band-circles::after{width:54px;height:54px;top:-24px;right:70px}
}
html body .attune-band h1,
html body .attune-band h2,
html body .attune-band .page-title{color:#FFFFFF}
html body .attune-band p{color:rgba(255,255,255,.78)}
