/* ============================================================
   ATLAS SECTION BACKGROUNDS — the cloth system
   Bob's direction 2026-11-18, design: files/atlas-section-backgrounds-design.md
   (approved "Continue", 2026-11-18).

   What this sheet does — colour and texture ONLY:
   • Three section tints in a fixed cycle (blue → green → gray), assigned
     per section in page order; the first content section is always blue.
   • One linen-blue CARD FIELD laid behind card groups on every tint.
   • One procedural Simonis-felt tile (atlas-felt-tile.png, Standard
     strength, ≈±3% luminance) lying over every tint and the field.

   Mechanics, per the design doc §2/§5:
   • A tint class and the LIGHT TOKEN SCOPE ship as one inseparable class.
     Paper text on a tint would be ~1.2:1 — never apply a background alone.
   • The background declarations carry !important because
     academy-palette-v41.css stamps .section.light (and friends) with
     background …!important and style.css stamps .section.dark with
     gradients; a converted section may come from either context and the
     tint must win in both. This is the palette sheet's own technique.
   • Load this sheet AFTER academy-palette-v41.css (house pattern: append
     as the last stylesheet link in <head>). Removing the one <link>
     reverts a page completely — no existing file is edited destructively.
   • At integration this file is renamed with the build's version
     (e.g. assets/atlas-sections-v264.css) and the felt tile ships as
     assets/atlas-felt-tile.png, byte-for-byte (md5 9c64b4f346e3347164983d021119b4e0).

   v264 INTEGRATION NOTE: the tint selectors above are written with
   the class doubled (.sec-tint-blue.sec-tint-blue) - the palette
   sheet scopes the .section.dark / .section.light / .atlas-mvp
   tokens at specificity 0,2,0, and the tint scope must tie that
   and win by loading last, on every element type the classes are
   applied to (sections, .shell blocks, <main> wrappers). At 0,1,0
   the dark scope would silently keep paper text on a light tint.
   The .card-field selector is doubled for the same reason: the
   palette sheet stamps the card containers it knows (.resource-
   grid, .desk-modules, ...) background:transparent at 0,1,1, and
   the linen field is the deliberate exception on the containers
   this build classes. Colours and tokens are exactly as approved;
   only selector weight changed, here at integration.

   Excluded by design (do NOT class these): world-map.html and the globe,
   photo heroes and image cards, form input fields (porcelain stays),
   the Donors & Sponsors Kit PDF / print surfaces.
   ============================================================ */

:root{
  --sec-blue:#D9E8F6;          /* tint 1 — from --blue opened toward --sky */
  --sec-green:#DCEEE1;         /* tint 2 — from --baize opened toward --mint */
  --sec-gray:#E9EBED;          /* tint 3 — the porcelain family, neutralised */
  --card-field:#EAF2FA;        /* the linen field — one step lighter than tint 1 */
  --atlas-felt:url("atlas-felt-tile.png");
}

/* — The tint classes: background + felt + light token scope, inseparable — */
:is(.sec-tint-blue.sec-tint-blue,.sec-tint-green.sec-tint-green,.sec-tint-gray.sec-tint-gray){
  --text:#192b43;              /* ink — 11.5–12.0:1 on every tint (AAA) */
  --subtext:#42566e;           /* body copy — 6.0–6.3:1 (AA) */
  --accent:#664075;            /* eyebrows/links — 6.6–6.9:1 (AA) */
  --surface:#fffdf8;
  color:#192b43;
  background-image:var(--atlas-felt)!important;
  background-repeat:repeat;
}
.sec-tint-blue.sec-tint-blue {background-color:var(--sec-blue)!important}
.sec-tint-green.sec-tint-green{background-color:var(--sec-green)!important}
.sec-tint-gray.sec-tint-gray {background-color:var(--sec-gray)!important}

/* — The card field: the linen cloth behind card groups, on any tint —
   Separates by colour and texture only: borderless, shadowless (standing
   rule). Padding matches the approved sample; margins stay with the
   layout context the wrapper is placed in. Never wrap text, photos or
   form fields — card groups only. */
.card-field.card-field{
  background-color:var(--card-field);
  background-image:var(--atlas-felt);
  background-repeat:repeat;
  border:0;
  border-radius:16px;
  box-shadow:none;
  padding:22px;
}

/* ============================================================
   CONVERSION REPAIRS (v264, added at integration): components
   that carry their own dark ground inside a tinted section keep
   their own scope - the palette sheet's own technique (its card
   families carry their tokens with them). The site's lettering
   is token-driven (the palette's body * {color:var(--text)
   !important}), so restoring a dark component's tokens restores
   its lettering exactly; nothing here recolours the design.
   - .sp-card / .sp-tier: the sponsors/support dark green-gold
     panels (their headings and copy take the section's tokens).
   - .surprise-orb: the homepage's dark ball on the curiosity
     tint (its lettering takes the section's tokens).
   - .ft-btn: the directory search button (dark baize ground,
     token lettering).
   - .ft-card: the Find a Table venue cards (dark panels whose
     lettering took the section's tokens; the city-page room
     rows are a different, light component and are untouched).
   - .dave-source-note a: fixed sky link (#b7d8ff !important in
     its own sheet, written for the dark section) -> the light
     scope's accent.
   - .dna-action inside a tinted section: the .dark-context
     pale variant -> the base DNA teal the element carries on
     light ground. (The contributors title's .dna-action is NOT
     repaired: it sits on that section's own dark masthead,
     where the pale variant is correct - verified from the
     screenshot, against the first repair draft.)
   - .purpose-resource small: fixed pale footnote (#d3deea
     !important, written for the dark section) -> subtext ink.
   ============================================================ */
:is(.sec-tint-blue,.sec-tint-green,.sec-tint-gray) :is(.sp-card,.sp-tier){--text:#f6f3ec;--subtext:#ddd6c2;--accent:#cfa64f}
:is(.sec-tint-blue,.sec-tint-green,.sec-tint-gray) .surprise-orb{--text:#fffdf8;--subtext:#e1e8f2;--accent:#b7d8ff}
:is(.sec-tint-blue,.sec-tint-green,.sec-tint-gray) .ft-btn{--text:#faf7ee}
:is(.sec-tint-blue,.sec-tint-green,.sec-tint-gray) .ft-card{--text:#f6f3ec;--subtext:#c9d5e5;--accent:#b7d8ff}
:is(.sec-tint-blue,.sec-tint-green,.sec-tint-gray) .dave-source-note a{color:#664075!important}
:is(.sec-tint-blue,.sec-tint-green,.sec-tint-gray) .dna-action{color:#286a78!important}
.purpose-resource:is(.sec-tint-gray,.sec-tint-green) small{color:#42566e!important}

/* ============================================================
   PANEL INSET REPAIR (2026-11-26, Bob's iPad report on /directors):
   a tint class can sit on a full-bleed <section> (the band form —
   copy inside an inner .shell, untouched here) or on the .shell
   container itself (the PANEL form: /directors' <main>, the plain
   panels on /credits). In the panel form no sheet owned the inset:
   .shell sets width only, the tint sets background only, and the
   form sheet (.submission-main) sets vertical padding only — so
   copy rendered flush against the panel's visible edges (on
   /directors the eyebrow lost its leading F at the panel edge,
   the back-link arrow was half off the linen, and the headline
   touched both sides), and the form sheet's 920px max-width —
   written for text on the dark ground — shrank the visible panel
   well inside the shell it sits in. The panel now owns its inset
   in this sheet, with the tint: horizontal padding at every width,
   vertical breathing room for <section> panels (the <main> panel
   keeps the form sheet's vertical rhythm), and the shell's full
   1180px measure. Components that carry their own padding
   (.dave-library, .geometry-resource) are excluded — their
   insets are theirs.
   ============================================================ */
.shell:is(.sec-tint-blue,.sec-tint-green,.sec-tint-gray):not(.dave-library):not(.geometry-resource){
  max-width:1180px;
  padding-left:44px;
  padding-right:44px;
}
section.shell:is(.sec-tint-blue,.sec-tint-green,.sec-tint-gray):not(.dave-library):not(.geometry-resource){
  padding-top:36px;
  padding-bottom:36px;
}
@media(max-width:650px){
  .shell:is(.sec-tint-blue,.sec-tint-green,.sec-tint-gray):not(.dave-library):not(.geometry-resource){
    padding-left:22px;
    padding-right:22px;
  }
}
