/* ==========================================================================
   FRONTGRADE  ·  fg2 LEGACY SKIN
   The bridge stylesheet for every page that has no redesigned template yet.
   Requires tokens.css and components.css to be loaded first.
   --------------------------------------------------------------------------
   WHAT THIS FILE IS FOR. page.html.twig now wraps every remaining page in the
   redesigned header and footer. Those two partials bring fg2-global with them,
   and fg2-global's components.css opens with a set of BARE ELEMENT rules that
   were written for pages built entirely out of fg2 markup:

       body        { background: var(--surface-base); color: var(--text-muted); }
       ul, ol      { padding: 0; list-style: none; }
       h1..h4, p,
       figure,
       blockquote  { margin: 0; }
       img, svg,
       video       { display: block; max-width: 100%; }
       hr          { border-top: 1px solid rgba(255,255,255,0.08); }

   On a page made of fg2 components that is the correct floor. On a page made
   of the site's existing markup it is a near-black page ground under dark
   body copy, bulleted lists with no bullets, and a rule that is white on
   white. This file is what stands between those two facts.

   THE SCOPE IS ONE ELEMENT AND IT IS DELIBERATE. Every rule below is written
   under .fg2-legacy-skin, which page.html.twig puts on the <main> element and
   nowhere else. The header and the footer are SIBLINGS of that element, so no
   rule in this file can reach the chrome: a legacy page and a redesigned page
   show the same header, styled by the same stylesheet, because this one
   structurally cannot touch it. The containment runs the other way too, since
   the file is attached by page.html.twig alone and the redesigned templates
   never execute that line.

   SPECIFICITY IS LOAD-ORDER INDEPENDENT. .fg2-legacy-skin scores 0-1-0, which
   beats every bare element rule in components.css (0-0-1) no matter which
   file the aggregator emits first. Where a rule only needs to undo a
   components.css reset without outranking the site's own component CSS, the
   element part is wrapped in :where() so the selector stays at 0-1-0 and any
   existing rule carrying a class and an element (0-1-1) still wins. That is
   what keeps this file from quietly restyling components it was never meant
   to touch.

   CONTRAST. Ratios are computed from the sRGB relative-luminance formula
   against the exact ground the text sits on, in the same notation the rest of
   the fg2 layer uses. The single-orange rule still holds: #e35530 is the only
   orange, and where it does not clear a threshold on a light ground the
   combination is forbidden below rather than solved with a second hue.

   WHAT THIS FILE DELIBERATELY DOES NOT TOUCH is listed at the bottom.

   --------------------------------------------------------------------------
   WHO STILL LOADS THIS, AND WHAT WOULD RETIRE IT

   The attach and the class are both gated on one boolean, computed per route
   by _frontgrade_fg2_legacy_skin_applies() in frontgrade.theme. The rule is
   not a list of paths: it reads the entity the route carries and answers no
   for the bundles that have a redesigned detail template. So the population
   below is a consequence of which bundles are converted, and it shrinks by
   itself as each one is.

   Counted on the local database on 2026-08-12, over every PUBLISHED node in
   the default language, by evaluating that same function per node
   (migration/verify/_skin-inventory.php), then spot checked over HTTP:

     bundle              published   skinned   has an alias
     adept_notification      166       166        0     reachable only at /node/NID
     person                   14        14       14     converted, awaiting wiring
     product                  59        59       59     /product/*
     product_type             74        74       74     /products/*
     product_category         91        11       11     the 11 that fail the catalog gate
     news, blog                                  0     redesigned
     interior_page, landing_page                 0     redesigned

   Plus the routes that carry no entity at all and have no page template of
   their own. Confirmed loading it over HTTP: /user/login, /user/password,
   /taxonomy/term/*, /form/*, /sitemap. Confirmed NOT loading it: the front
   page, the news hub, the events page, the two legal documents, the two
   error pages and the search page, each of which has a page__* template and
   so never executes the attach in page.html.twig.

   THE PERSON BUNDLE IS THE ONE ENTRY ABOVE THAT IS ALREADY WRONG. Those 14
   pages now render node--person--full.html.twig, which is the interior
   pattern, on the dark ground. They still answer yes to the skin test only
   because the bundle is not yet in the redesigned list in frontgrade.theme,
   and the leadership listing answers yes because it is a view and carries no
   entity for that test to read. Neither is a stylesheet decision. Until both
   are wired, interior.css outranks every rule here on specificity, which is
   what keeps those pages correct in the meantime; the one exception, the
   primary button's label colour, is stated explicitly in section 17 of
   interior.css and is measured there.

   THE RETIREMENT CONDITION. This file can be deleted, with its library and
   the class in page.html.twig, when no visitor-facing route answers yes. That
   is not the same as converting the remaining product families: the generic
   Drupal routes in the second list are Drupal's own markup on a light ground
   with no redesign behind them, and they are exactly what this file exists
   for. Retirement therefore means either giving those routes a redesigned
   page template too, or narrowing this file to them and renaming it for what
   it would then be.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. THE LIGHT GROUND
   The design system is dark and has no light half. These are the four values
   the legacy body needs to sit on a light ground while still reading as the
   same system: the type, the accent, the spacing and the sharp corners all
   still come from tokens.css.
   -------------------------------------------------------------------------- */

.fg2-legacy-skin {
  /* Surfaces. */
  --fgl-surface:        #ffffff;   /* page ground                            */
  --fgl-surface-raised: #f4f6f8;   /* zebra rows, inputs, inert wells        */

  /* Text.
       --fgl-ink   #16202b  on #ffffff 16.46:1 · on #f4f6f8 15.19:1     AAA
       --fgl-muted #4a5666  on #ffffff  7.46:1 · on #f4f6f8  6.89:1     AAA
     Both values now live in tokens.css as --text-ink-on-light and
     --text-muted-on-light, because a dark page can host a legacy component
     that paints its own light panel and needs the same two values there. The
     names below are kept because the rest of this file reads them, and they
     point at the tokens rather than restating the hexes so the pair cannot
     drift apart. The measured ratios are unchanged.                       */
  --fgl-ink:   var(--text-ink-on-light);
  --fgl-muted: var(--text-muted-on-light);

  /* Boundaries.
     --fgl-hairline is decorative and carries no minimum. --fgl-border-ui
     identifies a control and must clear 3:1, which #6b7a94 does at 4.34:1 on
     white. It is --stroke-quiet from tokens.css, reused rather than invented. */
  --fgl-hairline:  #d9dee5;   /* 1.35:1, decorative separator only          */
  --fgl-border-ui: #6b7a94;   /* 4.34:1 on white, control boundaries        */

  /* THE ORANGE ON A LIGHT GROUND.
     #e35530 measures 3.74:1 on #ffffff and 3.46:1 on #f4f6f8. It therefore
     clears the 3:1 threshold for large text and for non-text UI, and it does
     NOT clear the 4.5:1 threshold for normal text. Below it is used for
     underlines, rules, marks and fills, and never as a body-size text colour.
     Link text is ink with an orange underline for exactly this reason. */
}


/* --------------------------------------------------------------------------
   2. THE CONTENT AREA
   -------------------------------------------------------------------------- */

.fg2-legacy-skin {
  position: relative;
  background: var(--fgl-surface);
  color: var(--fgl-ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);

  /* A short page (a 404, a login form) would otherwise show the dark page
     ground between the messages band and the footer. The floor keeps the
     light area reading as the body of the page. */
  min-height: 42vh;
}


/* --------------------------------------------------------------------------
   3. UNDO THE fg2 ELEMENT RESETS THE EXISTING MARKUP DEPENDS ON
   Each rule here restores what the browser did before fg2-global reached
   these pages. Every one is at 0-1-0 so the site's own component CSS, which
   is all class-scoped, continues to win wherever it has an opinion.
   -------------------------------------------------------------------------- */

/* LISTS. components.css strips the marker and the indent so fg2 menus can be
   marked up as lists. Editorial copy is full of real bulleted and numbered
   lists, and without this they render as unindented run-on lines. */
.fg2-legacy-skin :where(ul, ol) {
  padding-inline-start: 40px;
  list-style: revert;
}

/* A list that the site's own CSS has already taken over keeps its own
   treatment: those selectors carry a class and therefore outrank the rule
   above. The two below are the generic Drupal wrappers, which are lists only
   as a markup convenience and must stay unmarked. */
.fg2-legacy-skin :where(.tabs, .menu, .links, .pager__items, .breadcrumb, .field__items) {
  padding-inline-start: 0;
  list-style: none;
}

/* FIGURES. The only element in the components.css margin reset that the
   existing stylesheets do not already re-declare through a `body figure`
   compound, so it is the only one that actually lost its spacing. */
.fg2-legacy-skin :where(figure) { margin: 1em 40px; }

/* REPLACED ELEMENTS. components.css makes every image a block so fg2 cards
   can stack cleanly. In body copy that turns an inline logo or icon into its
   own line. `revert` returns them to the browser default, and any existing
   rule that deliberately blocks an image scores 0-1-1 and still wins. */
.fg2-legacy-skin :where(img, svg, video) { display: revert; }
.fg2-legacy-skin :where(img, svg, video) { max-width: 100%; }


/* --------------------------------------------------------------------------
   4. TYPOGRAPHY
   Mapped to the new stack and the new scale. Fonts come from tokens.css and
   are already on the page: this file introduces no font loading of its own.

   TWO THINGS ARE DELIBERATELY NOT MAPPED.
   Headings are not uppercased. The design sets display type in caps, but
   these headings are existing content, including part numbers and product
   names where capitalisation carries meaning, and text-transform would
   rewrite all of it sight unseen.
   Heading margins are not set. The existing stylesheet declares them as
   `body h1` compounds, which score 0-0-2 and therefore survive the
   components.css margin reset intact. Leaving them alone keeps the vertical
   rhythm of every existing page exactly where it is.
   -------------------------------------------------------------------------- */

.fg2-legacy-skin :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  color: var(--fgl-ink);
  letter-spacing: var(--ls-h2);
  text-wrap: balance;
}

.fg2-legacy-skin h1 { font-size: var(--fs-h1); line-height: var(--lh-heading); letter-spacing: var(--ls-h1); }
.fg2-legacy-skin h2 { font-size: var(--fs-h2); line-height: var(--lh-heading); }
.fg2-legacy-skin h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--ls-h3); }
.fg2-legacy-skin h4 { font-size: var(--fs-h4); line-height: var(--lh-tight); letter-spacing: 0; font-family: var(--font-body); font-weight: var(--fw-semibold); }
.fg2-legacy-skin h5,
.fg2-legacy-skin h6 { font-size: var(--fs-body); line-height: var(--lh-tight); letter-spacing: 0; font-family: var(--font-body); font-weight: var(--fw-semibold); }

/* Body copy. The existing rule sets 20px/1.75; the design's reading size is
   16 to 17px on the same leading, which is what the redesigned pages use. */
.fg2-legacy-skin p {
  font-family: var(--font-body);
  font-size: var(--fs-prose);
  line-height: var(--lh-prose);
  color: var(--fgl-ink);
}

/* The lead paragraph class the existing templates already emit. */
.fg2-legacy-skin p.intro-text {
  font-size: var(--fs-lede);
  line-height: var(--lh-lede);
  font-weight: var(--fw-medium);
  color: var(--fgl-muted);
}

.fg2-legacy-skin :where(li, dd, dt, td, th) {
  font-family: var(--font-body);
  line-height: var(--lh-body);
}

.fg2-legacy-skin small,
.fg2-legacy-skin .field--name-field-caption,
.fg2-legacy-skin figcaption {
  font-size: var(--fs-small);
  color: var(--fgl-muted);
}

/* Quotes. The design has no serif, so the existing serif setting is replaced
   by the display face at section size, marked with the accent rule the rest
   of the system uses to open a block. */
.fg2-legacy-skin blockquote {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  color: var(--fgl-ink);
  border-left: 2px solid var(--accent);
  padding-inline-start: var(--space-6);
}

/* Rules. components.css sets a white hairline, which is invisible here. */
.fg2-legacy-skin hr {
  border: 0;
  border-top: var(--border-hairline-w) solid var(--fgl-hairline);
  margin-block: var(--space-9);
}

.fg2-legacy-skin :where(code, pre, kbd, samp) {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  background: var(--fgl-surface-raised);
}

/* Selection follows the design. --text-on-accent on --accent is 5.22:1. */
.fg2-legacy-skin ::selection {
  background: var(--accent);
  color: var(--text-on-accent);
}


/* --------------------------------------------------------------------------
   5. LINKS
   INK, NOT ORANGE, AND THE REASON IS MEASURED. #e35530 on white is 3.74:1,
   short of the 4.5:1 a link at body size has to clear. Recolouring the orange
   is forbidden by the single-orange rule, so the brand is carried by the
   underline, which is non-text UI and only has to clear 3:1. Hover keeps the
   ink colour and thickens the underline rather than swapping to the orange,
   because a hover state is text too and would fail the same threshold.
   -------------------------------------------------------------------------- */

.fg2-legacy-skin a {
  color: var(--fgl-ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: var(--t-color), text-decoration-thickness var(--dur-fast) var(--ease-standard);
}

.fg2-legacy-skin a:hover {
  color: var(--fgl-ink);
  text-decoration-thickness: 2px;
}

/* An image or a card wrapped in a link must not carry a text underline. */
.fg2-legacy-skin a:has(> img),
.fg2-legacy-skin a:has(> picture),
.fg2-legacy-skin a:has(> svg) { text-decoration: none; }


/* --------------------------------------------------------------------------
   6. FORM CONTROLS
   Generic controls only: the search form, the login form, exposed filters and
   anything else Drupal renders without a component stylesheet of its own.
   The webform styling is anchored on #block-frontgrade-content and on the
   .webform-submission-form class, which score above everything here, so a
   built webform keeps its existing appearance untouched. That is intentional:
   the webforms are the most heavily configured layouts on the site and are
   the wrong place for a blanket restyle.
   -------------------------------------------------------------------------- */

.fg2-legacy-skin :where(input[type="text"], input[type="email"], input[type="tel"],
                        input[type="url"], input[type="number"], input[type="password"],
                        input[type="search"], input[type="date"], textarea, select) {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-tight);
  color: var(--fgl-ink);
  background: var(--fgl-surface);
  border: 1px solid var(--fgl-border-ui);   /* 4.34:1, clears the 3:1 minimum */
  border-radius: var(--radius-1);           /* the system has no rounded corners */
  padding: var(--space-3) var(--space-4);
  transition: var(--t-color);
}

/* The native select keeps its own arrow: appearance is deliberately not
   reset, because the site's custom select wrapper supplies an arrow only
   where it is applied and a bare select would otherwise lose its affordance. */

.fg2-legacy-skin :where(input, textarea, select):hover { border-color: var(--fgl-ink); }
.fg2-legacy-skin :where(input, textarea, select)::placeholder { color: var(--fgl-muted); opacity: 1; }
.fg2-legacy-skin :where(input, textarea, select):disabled {
  background: var(--fgl-surface-raised);
  color: var(--fgl-muted);
  cursor: not-allowed;
}

.fg2-legacy-skin :where(label, .form-item__label) {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--fgl-ink);
}
.fg2-legacy-skin :where(.form-item__description, .description) {
  font-size: var(--fs-small);
  color: var(--fgl-muted);
}
.fg2-legacy-skin .form-required::after { color: var(--accent); }

/* Accent the native controls so a checkbox and a radio read as brand. */
.fg2-legacy-skin :where(input[type="checkbox"], input[type="radio"]) { accent-color: var(--accent); }

/* SUBMIT ACTIONS ONLY. Matching a bare <button> would repaint the carousel
   tabs, the table-of-contents triggers and every other in-page control as a
   primary call to action, so the selector is limited to the classes Drupal
   puts on a form action.
   --text-on-accent on --accent is 5.22:1, and the fill does not darken on
   hover for the reason set out on .fg-btn--primary in components.css. */
.fg2-legacy-skin :where(input[type="submit"], input[type="button"], input[type="reset"],
                        .form-submit, .button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  line-height: 1;
  letter-spacing: var(--ls-btn);
  text-decoration: none;
  padding: 12px 26px;
  cursor: pointer;
  background: var(--accent);
  color: var(--text-on-accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-1);
  -webkit-appearance: none;
  appearance: none;
  transition: var(--t-color), transform var(--dur-fast) var(--ease-out-quart);
}
.fg2-legacy-skin :where(input[type="submit"], input[type="button"], input[type="reset"],
                        .form-submit, .button):hover {
  background: var(--accent);
  border-color: var(--fgl-ink);
  color: var(--text-on-accent);
  transform: translateY(-1px);
}
.fg2-legacy-skin :where(input[type="submit"], input[type="button"], input[type="reset"],
                        .form-submit, .button):active { transform: translateY(0); }


/* --------------------------------------------------------------------------
   7. TABLES
   The existing rules already set the header weight, the zebra and the cell
   padding through `body table th` compounds. This adds the system's type and
   its hairline, and leaves the structure alone.
   -------------------------------------------------------------------------- */

.fg2-legacy-skin :where(table) {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--fs-small);
}
.fg2-legacy-skin :where(th) {
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-chip);
  text-transform: uppercase;
  color: var(--fgl-ink);
  text-align: left;
  border-bottom: 2px solid var(--fgl-ink);
}
.fg2-legacy-skin :where(td) {
  color: var(--fgl-ink);
  border-bottom: var(--border-hairline-w) solid var(--fgl-hairline);
}
.fg2-legacy-skin :where(tbody tr:nth-child(even)) { background: var(--fgl-surface-raised); }
.fg2-legacy-skin :where(caption) {
  font-size: var(--fs-small);
  color: var(--fgl-muted);
  text-align: left;
  padding-bottom: var(--space-2);
}


/* --------------------------------------------------------------------------
   8. CARDS AND PANELS
   Only the generic Drupal wrappers. Every named component family on the site
   is left alone; the list is at the bottom of this file.
   -------------------------------------------------------------------------- */

.fg2-legacy-skin :where(details) {
  border: var(--border-hairline-w) solid var(--fgl-hairline);
  border-radius: var(--radius-1);
  padding: var(--space-4);
}
.fg2-legacy-skin :where(summary) {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  color: var(--fgl-ink);
  cursor: pointer;
}

/* The editor furniture. The local task tabs and the local actions are in the
   content region, which means they are inside this scope on every node page
   an editor opens. They get the system's type and the accent on the active
   tab, and nothing structural. */
.fg2-legacy-skin :where(.tabs) {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  border-bottom: var(--border-hairline-w) solid var(--fgl-hairline);
}
.fg2-legacy-skin :where(.tabs a) { text-decoration: none; }
.fg2-legacy-skin :where(.tabs .is-active a, .tabs a.is-active) {
  color: var(--fgl-ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}


/* --------------------------------------------------------------------------
   9. FOCUS ON A LIGHT GROUND
   components.css draws a WHITE 2px outline with a dark shadow filling the
   offset. That ring was measured against the dark surfaces and disappears
   against this one. The two tones are swapped here: ink outline, white gap,
   accent halo outside it. The selector scores 0-2-0 against the 0-1-0 of the
   rule it replaces, so it wins wherever this scope applies and nowhere else.
     --fgl-ink on --fgl-surface  16.46:1
     --fgl-ink on --accent        4.40:1   clears the 3:1 non-text minimum
   -------------------------------------------------------------------------- */

.fg2-legacy-skin :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: var(--focus-ring-width) solid var(--fgl-ink);
  outline-offset: var(--focus-ring-offset);
  box-shadow:
    0 0 0 var(--focus-ring-offset) var(--fgl-surface),
    0 0 0 5px var(--focus-ring-halo);
}


/* --------------------------------------------------------------------------
   10. FORCED COLORS
   Everything above is colour. In forced-colors mode the user's palette has to
   win, so the surfaces, the borders and the fills hand back to the system
   keywords rather than being overpainted. The focus indicator is restated
   because an outline colour is the one thing the mode keeps honouring.
   -------------------------------------------------------------------------- */

@media (forced-colors: active) {
  .fg2-legacy-skin {
    background: Canvas;
    color: CanvasText;
  }
  .fg2-legacy-skin :where(input, textarea, select, table, td, th, details, .tabs) {
    border-color: CanvasText;
  }
  .fg2-legacy-skin :where(tbody tr:nth-child(even)) { background: Canvas; }
  .fg2-legacy-skin :where(input[type="submit"], input[type="button"], input[type="reset"],
                          .form-submit, .button) {
    background: ButtonFace;
    color: ButtonText;
    border-color: ButtonText;
  }
  .fg2-legacy-skin a { color: LinkText; }
  .fg2-legacy-skin :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid Highlight;
    outline-offset: 2px;
    box-shadow: none;
  }
}


/* --------------------------------------------------------------------------
   11. REDUCED MOTION
   tokens.css already collapses every duration to 1ms under this query, so the
   transitions declared above resolve to nothing on their own. They are named
   here as well so the intent survives a future change to the token block, and
   so nothing in this file can animate for a visitor who asked it not to.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .fg2-legacy-skin a,
  .fg2-legacy-skin :where(input, textarea, select),
  .fg2-legacy-skin :where(input[type="submit"], input[type="button"], input[type="reset"],
                          .form-submit, .button) {
    transition: none;
  }
  .fg2-legacy-skin :where(input[type="submit"], input[type="button"], input[type="reset"],
                          .form-submit, .button):hover { transform: none; }
}


/* --------------------------------------------------------------------------
   12. INTERIM · THE LEGACY DARK HERO

   THIS IS A LEGIBILITY PATCH, NOT A REDESIGN, AND IT IS DELIBERATELY SMALL.
   The pages below keep the page head they have. Two things on it are unread-
   able, both of them caused by a rule from somewhere else landing on this
   component, and this section undoes exactly those two and nothing more.
   Redesigning this head is a separate decision and is not taken here.

   WHERE IT APPLIES, MEASURED OVER HTTP RATHER THAN INFERRED.
   templates/node/_interior-hero.html.twig emits
   <div class="interior-page-hero theme-dark"> and is included by
   node--product-type--full.html.twig and node--product-category--full.html.twig.
   Those two bundles yield 80 published, aliased candidates
   (migration/verify/_legacy-hero-inventory.php, 2026-08-12). The candidate
   count is not the answer: a page carries this defect only when the served
   HTML holds BOTH markers, the hero's own class and the skin class that
   overrides its heading colour. Requesting all 80 and grepping for both:

     product_type       74 of 74 carry both markers
     product_category    0 of  6 carry either one, so they are served by some
                                 other page template and are not affected
     ----------------------------------------------
     74 published aliased pages, all product_type

   The gate function _frontgrade_fg2_legacy_skin_applies() answers TRUE for
   those six, so the template layer and the gate disagree about them. That gap
   is recorded rather than chased, because it is a live-route question and not
   a stylesheet one. The curl loop that produced the split is in the inventory
   script's docblock.

   The audit sampled three of the seventy four (/products/memory/sram,
   /products/rf-solutions/amplifiers and
   /products/microprocessors-microcontrollers/armr-microcontrollers).

   ---- DEFECT ONE · the page title, measured at 1.28:1 ----------------------

   The title computed rgb(22,32,43) inside a hero whose ground computes
   rgb(0,0,0). Both of the rules in play score (0,1,1):

     node-interior-page-full.css   .interior-page-hero h1        { color: #fff }
     legacy-skin.css:211           .fg2-legacy-skin :is(h1,...)  { color: var(--fgl-ink) }

   so the winner is decided by which sheet the aggregator emits last, and this
   file is weighted after it. --fgl-ink is #16202b, the ink for the white
   ground this file exists to restore, and on a black hero it is 1.28:1.

   The repair is to withdraw this file from that component rather than to pick
   a colour for it. `color: inherit` hands the decision back to the hero, which
   states its own light heading treatment and inherits rgb(232,232,232) from
   .theme-dark: 20.4:1 on the hero's black ground, against 1.28:1 before. The
   scope class plus the two component classes score (0,3,1), which beats both
   rules above outright rather than relying on order. No other heading on these
   pages moves, because nothing outside this hero matches.               */

.fg2-legacy-skin .interior-page-hero.theme-dark :is(h1, h2, h3, h4, h5, h6) {
  color: inherit;
}

/* ---- DEFECT TWO · the Home crumb, measured at font-size 0 ----------------

   The trail on these pages opened with an empty gap: the first crumb's anchor
   computed font-size 0px and its text measured 2 by 0 px inside an 18 by 18
   box, so the rendered trail read "/ Products / Memory / SRAM" with nothing in
   front of the first separator. The rule is component.css replacing the link's
   text with a mask image:

     .breadcrumb-item:first-child > a[href="/"]  and its :link and :visited arms

   whose strongest arm scores (0,4,1). There is no mask image on these pages,
   only the font-size 0 that was meant to make room for one, so the whole
   declaration is undone here exactly as page-header.css and interior.css
   already undo it inside their own bands.

   THE SELECTOR IS LONG ON PURPOSE. It has to beat (0,4,1) rather than tie it,
   so the scope class and the two container classes take it to (0,6,1). The
   reset is held inside this hero, so the same glyph anywhere else on a legacy
   page is untouched. font-size: inherit puts the crumb back on the 13px its
   three siblings already use, and white on the hero's black ground measures
   21:1.                                                                  */

.fg2-legacy-skin .interior-page-hero .breadcrumb .breadcrumb-item:first-child > a[href="/"],
.fg2-legacy-skin .interior-page-hero .breadcrumb .breadcrumb-item:first-child > a[href="/"]:link,
.fg2-legacy-skin .interior-page-hero .breadcrumb .breadcrumb-item:first-child > a[href="/"]:visited {
  -webkit-mask-image: none;
  mask-image: none;
  background-color: transparent;
  background-image: none;
  width: auto;
  height: auto;
  font-size: inherit;
  line-height: inherit;
  vertical-align: baseline;
  text-indent: 0;
  display: inline;
}




/* --------------------------------------------------------------------------
   13. INTERIM · A LEGACY COMPONENT THAT BRINGS ITS OWN DARK SECTION

   Section 12 handles one instance of this, the legacy dark hero. The same
   shape occurs again on the unconverted product-type pages: component.css
   gives a paragraph component the .theme-dark class, which paints the section
   #000000 and sets its own text to #e8e8e8. That is correct on its own terms,
   and this file then overrides one half of it, because section 4 sets every
   heading to --fgl-ink for the white page around it.

   MEASURED BEFORE, on /products/single-board-computers/sbc-gen8:
     .component-switchback__heading > div   #16202b on #000000    1.27:1
     .custom-select-wrap select             #727272 on #000000    4.37:1

   THE HEADING TAKES `inherit` rather than a token, for the reason section 12
   gives at the hero: the section has already set a colour that measures, and
   inheriting it keeps one source rather than two. #e8e8e8 on #000000 measures
   17.14:1. The scope class plus the theme class plus the element take the rule
   to (0,2,1), which beats section 4 at (0,1,1) outright rather than on order,
   and nothing outside a .theme-dark section moves.

   THE SELECT is the one control component.css colours for itself, at
   .webform-submission-form .custom-select-wrap select (0,2,1), and the
   wrapper rule knocks its own background out so the section's black shows
   through. --text-muted is the system's one quiet tone and measures 5.98:1 on
   #000000. The arm is scoped to .custom-select-wrap, which is the wrapper
   that removes the fill: a select outside it keeps the bridge's own white
   field and its dark ink, which already measures 16.46:1.
   -------------------------------------------------------------------------- */

.fg2-legacy-skin .theme-dark :is(h1, h2, h3, h4, h5, h6),
.fg2-legacy-skin .theme-dark :is(h1, h2, h3, h4, h5, h6) > div {
  color: inherit;
}

.fg2-legacy-skin .theme-dark .custom-select-wrap select {
  color: var(--text-muted);
}


/* --------------------------------------------------------------------------
   14. THE LEGACY SECOND ORANGE AS TEXT ON THE LIGHT GROUND

   Section 1 states the rule for the brand accent on a light ground: #e35530
   measures 3.74:1 on white, clears 3:1 for large text and non-text UI, and is
   never a body-size text colour here. The site carries a SECOND orange the
   token contract does not have, #ce401c, and the product-type table module
   uses it for the part-number links in its table:

     .component-product-type-table__table-container td a { color: #ce401c }
       in modules/custom/esd_components/.../esd_component_product_type_table

   MEASURED. #ce401c is 4.80:1 on the table body (#ffffff) and 4.48:1 on the
   even rows, which component.css paints #f7f7f7. It therefore fails 4.5:1 by
   0.02 on every alternate row, on 16 pages and 37 nodes in the sweep, and it
   fails on nothing else.

   THE VALUE IS THE NEAREST ONE THAT PASSES. Swapping in --accent would make it
   worse, at 3.49:1 on #f7f7f7, and the single-orange rule is about the token
   system rather than about a legacy hex that already exists outside it. So the
   legacy value is nudged rather than replaced or re-hued: #cc3f1c is the
   closest colour to #ce401c, at an RGB distance of 2.24, that clears 4.5:1 on
   all three light grounds this file can put under it.

     --fgl-legacy-orange #cc3f1c   #ffffff 4.89:1 · #f7f7f7 4.56:1
                                   #f4f6f8 4.51:1
     for comparison      #ce401c   #ffffff 4.80:1 · #f7f7f7 4.48:1
                                   #f4f6f8 4.43:1

   The alternative is #c33d1a, one further step down, which measures
   5.25 / 4.90 / 4.84 and carries visible headroom instead of 0.01 on the
   third ground. The nearer value is used because it is the smaller change to
   an existing brand colour; the other is a one-line swap if more margin is
   wanted.

   The module's stylesheet is not edited. The override is scoped to the light
   ground, so the dark-ground copy of the same component keeps the treatment
   section 21 of components.css gives it.
   -------------------------------------------------------------------------- */

.fg2-legacy-skin {
  --fgl-legacy-orange: #cc3f1c;
}

.fg2-legacy-skin .component-product-type-table__table-container td a,
.fg2-legacy-skin .commerce-product-page__table-container td a {
  color: var(--fgl-legacy-orange);
}

/* ==========================================================================
   DELIBERATELY NOT TOUCHED
   Every family below has its own stylesheet, its own layout maths, or both,
   and each one is load-bearing on pages that are not being redesigned in this
   pass. Restyling them from here would be changing a layout blind. They keep
   their current appearance under the new chrome, which is the interim look
   the migration expects, and each becomes a redesign task in its own right.

     Paragraph components
       .component-hero-landing*      .component-hero-space*
       .component-call-to-action*    .component-table-grid*
       .component-table-grid-images* .component-file-attachments*
       .component-two-columns        .component-social-media-grid*
       .table-card*                  .table-image-card*
       .social-feed*                 .space-carousel*
       .paragraph--type--*           and the ESD module components those
                                     templates attach their own libraries for

     Product and commerce
       everything reached by commerce-product-page.css and
       node-product-full.css, including the specification tables, the part
       number blocks and the product call to action

     Listings and search
       .views-element-container  .views-row  .views-exposed-form
       .node--view-mode-grid     .cards--light
       and everything in search-page.css and search-results.css

     Webforms
       .webform-submission-form and everything under it, including the
       multi-step progress bar, the composite fields, the custom select
       wrapper and the multiple-value tables

     Page furniture outside this scope
       the messages band, the accessibility widget, the back-to-top button
       and the cookie banner are all outside <main> and therefore outside
       this file by construction

     Layout primitives
       .lb-container-normal  .lb-container-extra  .layout--onecol
       and the legacy grid mixins, which set the page measure on every
       existing page and are the fastest way to break one
   ========================================================================== */
