/* ATOM HUB (renamed Dec 4, 2026, v1.9.155) — companion to atom-hub-2026-12-04.js;
   renamed from sun-hub-2026-12-04.css for the same cache-bypass reason: kill the
   stale cached sunburst on phones. Styles unchanged. */
/* ==========================================================================
   THE SUN HUB (Dec 4, 2026, v1.9.147) — Dev's direct order ~5:57 PM CT:
   "Take the atomic symbol from the lab and use a little button right there —
   we'll be able to hide all kinds of stuff in there later. Dark mode, light
   mode — I'm not seeing that pushed, I'm not seeing dark mode/light mode
   easily accessible. We need full accessibility. Build EVERYTHING into that
   button, as slick as possible. KILL that large ask button. Turn it into the
   sun — a small, small circle. I want that live now."

   (1) THE BUTTON: the large Ask 228 pill is gone. In its place, one small
       circle — the Lab pill's own atom mark (nucleus + three orbit ellipses
       at 0/60/120, electrons riding them, same geometry as .atom-mark) set
       as the core of a sun: twelve gold rays, alternating long/short, in
       the fleet gold. On the homepage the sun IS the old #cgOpen node,
       restyled (so the concierge binding, the bubble dodge and the footer
       Ask wiring all keep their target); on every other page the hub script
       mints a twin .sun-btn in the same corner slot.
   (2) THE HUB: tapping the sun opens one panel — Ask 228, Appearance
       (dark/light), Accessibility (text size, reduce motion, high
       contrast), Language — grouped, persisted, built to take more rows
       later (each group is a <section class="sun-group">; add one and it
       belongs).
   (3) LIGHT THEME: a real theme, token-first. html[data-theme="light"]
       redefines the design tokens and then re-skins the hardcoded dark
       surfaces (nav, topstrip, panels, inputs, footer). Brand panels that
       are dark BY DESIGN (the business cards' own art, the Moore slate)
       stay themselves — a light page around them, not an invert.
   (4) ACCESSIBILITY: html[data-text="large"] steps the root type size;
       html[data-motion="reduce"] stills animation; html[data-contrast=
       "high"] deepens ink/lines and fattens focus. All persist in
       localStorage and are applied pre-paint by the head snippet.
   ========================================================================== */

/* ---------- (1) the sun button ---------- */
.cg-open.sun-on,
.sun-btn{
  width:52px;height:52px;min-width:52px;
  border-radius:50%;
  padding:0;gap:0;
  display:flex;align-items:center;justify-content:center;
  background:radial-gradient(circle at 50% 38%,#13253f,#0b1424 78%);
  border:1px solid rgba(125,211,252,.55);
  box-shadow:0 14px 34px rgba(0,0,0,.5),
             inset 0 0 0 1px rgba(237,230,214,.07),
             inset 0 1px 0 rgba(237,230,214,.10);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.cg-open.sun-on:hover,.sun-btn:hover{
  border-color:rgba(125,211,252,.9);
  background:radial-gradient(circle at 50% 38%,#173357,#0c1729 78%);
}
.cg-open.sun-on:focus-visible,.sun-btn:focus-visible{
  outline:2px solid var(--accent,#38bdf8);outline-offset:3px;
}
.cg-open.sun-on>span{display:none!important}
.cg-open.sun-on svg.sun-mark,.sun-btn svg.sun-mark{
  width:40px;height:40px;flex:0 0 auto;display:block;
}
/* subpage twin: same corner discipline as the homepage bubble */
.sun-btn{
  position:fixed;right:14px;bottom:calc(10px + env(safe-area-inset-bottom,0px));
  z-index:1200;color:#f2f7fc;
  font-family:var(--font-d,"Archivo",system-ui,sans-serif);
}
@media (min-width:861px){.sun-btn{right:22px;bottom:16px}}

/* electrons ride their orbits, exactly like the Lab pill's atoms */
.sun-spin{transform-box:view-box;transform-origin:center;animation:sun-orbit 3.4s linear infinite}
.sun-spin.o2{animation-duration:4.3s;animation-delay:-1.4s}
.sun-spin.o3{animation-duration:5.2s;animation-delay:-2.9s}
@keyframes sun-orbit{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion: reduce){.sun-spin{animation:none}}

/* ---------- (2) the hub panel ---------- */
.sun-hub{
  position:fixed;right:14px;z-index:1300;
  bottom:calc(74px + env(safe-area-inset-bottom,0px));
  width:min(320px,calc(100vw - 28px));
  background:linear-gradient(180deg,#101d33,#0b1424);
  color:#eef2f7;
  border:1px solid rgba(125,211,252,.45);
  border-radius:16px;
  box-shadow:0 24px 60px rgba(0,0,0,.55),inset 0 1px 0 rgba(237,230,214,.08);
  padding:14px 16px 10px;
  font-family:var(--font-d,"Archivo",system-ui,sans-serif);
}
@media (min-width:861px){.sun-hub{right:22px;bottom:80px}}
body.ps-show .sun-hub{bottom:calc(138px + env(safe-area-inset-bottom,0px))}
@media (min-width:861px){body.ps-show .sun-hub{bottom:80px}}
.sun-hub[hidden]{display:none!important}
.sun-hub-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 4px}
.sun-hub-title{font-weight:800;letter-spacing:.04em;font-size:1rem;margin:0}
.sun-hub-close{
  background:transparent;border:1px solid transparent;border-radius:8px;
  color:#aeb9c6;font-size:1.25rem;line-height:1;width:36px;height:36px;cursor:pointer;
}
.sun-hub-close:hover{color:#eef2f7;border-color:#26334a}
.sun-hub-close:focus-visible{outline:2px solid var(--accent,#38bdf8);outline-offset:2px}
.sun-group{border-top:1px solid #26334a;padding:10px 0 12px}
.sun-group:first-of-type{border-top:none}
.sun-group h4{
  margin:0 0 8px;font-size:.72rem;font-weight:700;letter-spacing:.14em;
  text-transform:uppercase;color:#8a9bae;
}
.sun-row{display:flex;gap:8px;flex-wrap:wrap}
.sun-ask{
  width:100%;display:flex;align-items:center;gap:10px;
  background:rgba(56,189,248,.12);color:#eef2f7;
  border:1px solid rgba(125,211,252,.5);border-radius:10px;
  padding:11px 13px;font:inherit;font-weight:700;cursor:pointer;text-align:left;
}
.sun-ask:hover{background:rgba(56,189,248,.2)}
.sun-ask:focus-visible{outline:2px solid var(--accent,#38bdf8);outline-offset:2px}
.sun-ask svg{width:22px;height:22px;flex:0 0 auto}
.sun-ask small{display:block;font-weight:500;color:#aeb9c6;font-size:.78rem}
.sun-chip{
  flex:1 1 auto;min-height:44px;
  background:transparent;color:#aeb9c6;
  border:1px solid #26334a;border-radius:10px;
  padding:9px 10px;font:inherit;font-size:.9rem;font-weight:600;cursor:pointer;
}
.sun-chip:hover{color:#eef2f7;border-color:rgba(125,211,252,.6)}
.sun-chip[aria-pressed="true"]{
  color:#062033;background:#38bdf8;border-color:#38bdf8;
}
.sun-chip:focus-visible{outline:2px solid var(--accent,#38bdf8);outline-offset:2px}
.sun-lang .sun-chip{flex:1 1 21%}

/* ---------- (3) the light theme ---------- */
html[data-theme="light"]{
  --gold:#8a6d2f; --ivory:#2b2118; --bluegray:#5a6b7d;
  --bg:#f2f5f9; --bg2:#e8eef5; --panel:#ffffff; --panel2:#eef3f9;
  --ink:#101c2c; --ink-dim:#3d4f66; --ink-faint:#5f7288;
  --line:#c3d2e2;
  --accent:#0369a1; --accent-ink:#ffffff;
  --cyan:#0369a1;
  color-scheme:light;
}
html[data-theme="light"] body{background:#f2f5f9;color:#101c2c}
html[data-theme="light"] nav.mainnav{background:rgba(242,245,249,.92);border-color:#c3d2e2}
html[data-theme="light"] .cg-panel{background:#ffffff;color:#101c2c;border-color:#c3d2e2}
html[data-theme="light"] .cg-sub{color:#3d4f66}
html[data-theme="light"] input,html[data-theme="light"] textarea,html[data-theme="light"] select{
  background:#ffffff;color:#101c2c;border-color:#9db4cc;
}
html[data-theme="light"] .sun-hub{
  background:linear-gradient(180deg,#ffffff,#eef3f9);color:#101c2c;
  border-color:#9db4cc;box-shadow:0 24px 60px rgba(16,28,44,.25);
}
html[data-theme="light"] .sun-group{border-top-color:#c3d2e2}
html[data-theme="light"] .sun-group h4{color:#5f7288}
html[data-theme="light"] .sun-chip{color:#3d4f66;border-color:#9db4cc}
html[data-theme="light"] .sun-chip:hover{color:#101c2c}
html[data-theme="light"] .sun-ask{background:rgba(3,105,161,.08);color:#101c2c;border-color:#0369a1}
html[data-theme="light"] .sun-ask small{color:#3d4f66}
html[data-theme="light"] .sun-hub-close{color:#3d4f66}
html[data-theme="light"] .cg-open.sun-on,html[data-theme="light"] .sun-btn{
  background:radial-gradient(circle at 50% 38%,#ffffff,#dbe7f3 78%);
  border-color:#0369a1;box-shadow:0 14px 34px rgba(16,28,44,.25);
}

/* hardcoded dark surfaces that must follow the theme (brand card art
   stays dark by design and is deliberately NOT listed here) */
html[data-theme="light"] .faq-ask,
html[data-theme="light"] .faq-item,
html[data-theme="light"] .rd-form,
html[data-theme="light"] .rd-done,
html[data-theme="light"] .rd-sec .rd-card{background:#ffffff;border-color:#c3d2e2}
html[data-theme="light"] .faq-ask-input,
html[data-theme="light"] .faq-mic,
html[data-theme="light"] .rd-input,
html[data-theme="light"] .rd-sec .rd-chip{background:#eef3f9;color:#101c2c;border-color:#9db4cc}
html[data-theme="light"] .fq-row.a .fq-bubble{
  background:#eef3f9;border-color:#c3d2e2;color:#101c2c;
}
html[data-theme="light"] .cg-backdrop{background:rgba(230,238,246,.7)}

/* ---------- (4) accessibility controls ---------- */
html[data-text="large"]{font-size:112.5%}
html[data-text="large"] body{line-height:1.6}
html[data-motion="reduce"] *,html[data-motion="reduce"] *::before,html[data-motion="reduce"] *::after{
  animation:none!important;transition:none!important;scroll-behavior:auto!important;
}
html[data-contrast="high"]{
  --ink:#ffffff; --ink-dim:#dbe7f3; --ink-faint:#b9c9da;
  --line:#4a6a8c; --accent:#7dd3fc;
}
html[data-theme="light"][data-contrast="high"]{
  --ink:#000000; --ink-dim:#1d2f47; --ink-faint:#31465e;
  --line:#5f7a96; --accent:#024e74;
}
html[data-contrast="high"] :focus-visible{outline-width:3px!important}

@media (prefers-reduced-motion: reduce){
  .cg-open.sun-on,.sun-btn{transition:none}
}

/* ==========================================================================
   FLAW-HUNT FIXES — Dec 4, 2026 (~/workspace/flaw-hunt-2026-12-04/REPORT.md)
   F1: hero tagline hardcoded #fff — invisible in light theme.
   F2: card CTA buttons / domain links styled for dark cards washed out on
       the light theme's white cards.
   F3: market pages' brass tokens (--brass / --brass-bright, pale gold) were
       never redefined for light — pale tan on white.
   ========================================================================== */
html[data-theme="light"] .hero .hero-copy p.tagline{color:#101c2c}
html[data-theme="light"]{--brass:#8a6d2f;--brass-bright:#8a6d2f}
html[data-theme="light"] .card-link.check-visit,
html[data-theme="light"] .card-link.coast-visit{background:#101c2c;color:#ffffff;border-color:#101c2c}
html[data-theme="light"] .project-card .card-link{color:#0369a1}
html[data-theme="light"] .project-card h3 a.link-check{color:#9a3412}
html[data-theme="light"] .project-card h3 a.link-coast{color:#0f766e}
html[data-theme="light"] .project-card h3 a.link-paw{color:#101c2c}
html[data-theme="light"] .project-card h3 a.link-hana{color:#9a3412}
html[data-theme="light"] .kc-cascade .kc-l1,
html[data-theme="light"] .kc-cascade .kc-l2{color:#8a6d2f}
html[data-theme="light"] .pw-cascade .pw-l1{color:#0369a1}

/* --- Golden Ticket founder counter (Dev, Dec 4, 2026) ----------------------
   The count is NOT hardcoded truth: the number renders from
   assets/founder-count-2026-12-04.json, the published mirror of
   CLAIM-LEDGER.md (the source of truth). The markup's 5 is the fallback
   matching the ledger state on the day this shipped (0 claimed). */
.founder-note{font-family:var(--font-d);font-weight:700;color:var(--gold);letter-spacing:.01em;margin:14px 0 0}
.founder-note-sm{font-size:.92rem}
.golden-ticket{
  display:inline-flex;align-items:center;gap:12px;margin:12px 0 2px;
  padding:10px 20px 10px 16px;color:#2a1503;
  background:linear-gradient(115deg,#ffd970 0%,#f5b93f 45%,#fa6b12 130%);
  border:1.5px solid #b97e14;border-radius:10px;
  box-shadow:0 0 0 1px rgba(250,107,18,.35),0 0 22px rgba(250,107,18,.45),0 10px 24px rgba(0,0,0,.35);
  font-family:var(--font-d);
  -webkit-mask:radial-gradient(circle 7px at 0 50%,transparent 6.5px,#000 7px) left/51% 100% no-repeat,radial-gradient(circle 7px at 100% 50%,transparent 6.5px,#000 7px) right/51% 100% no-repeat;
          mask:radial-gradient(circle 7px at 0 50%,transparent 6.5px,#000 7px) left/51% 100% no-repeat,radial-gradient(circle 7px at 100% 50%,transparent 6.5px,#000 7px) right/51% 100% no-repeat;
  animation:gt-wave 3.4s ease-in-out infinite alternate;
  transform-origin:50% 60%;
}
.golden-ticket .gt-num{font-size:2rem;font-weight:900;line-height:1;color:#2a1503;text-shadow:0 0 14px rgba(250,107,18,.65)}
.golden-ticket .gt-label{font-weight:800;letter-spacing:.04em;text-transform:uppercase;font-size:.82rem;line-height:1.25}
@keyframes gt-wave{from{transform:rotate(-1.7deg) translateY(0)}to{transform:rotate(1.7deg) translateY(-3px)}}
.golden-ticket.gt-paused{animation-play-state:paused}
html[data-motion="reduce"] .golden-ticket{animation:none}
@media (prefers-reduced-motion: reduce){.golden-ticket{animation:none}}

/* --- SEO note (Dev, Dec 4, 2026 — ai-access patch): one quiet centered
       section directly above the footer, same register as the stats
       grounded line. Homepage only. */
.seo-note-sec{padding:34px 20px 6px;text-align:center}
.ai-note{max-width:44rem;margin:0 auto;color:var(--ink-dim);font-size:.98rem;line-height:1.65}
/* F2b (found in the ticket's own light proof shot): the Founder Clique line
   under the deal was pale ice-blue #d8e2ec on the light theme's cream card. */
html[data-theme="light"] .handoff-founder{color:#3d4f66}
/* F2c (uncapped re-sample after F2b): the FAQ block, the VBS lines and
   bare sky links kept their dark-theme pale colors on light grounds —
   FAQ summaries #eef4fb / answers #c3d4e6 on the white faq cards were
   effectively invisible in light theme. */
html[data-theme="light"] .faq-item summary{color:#101c2c}
html[data-theme="light"] .faq-a{color:#3d4f66}
html[data-theme="light"] .faq-group-h{color:#8a6d2f}
html[data-theme="light"] .faq-group-h a{color:#8a6d2f}
html[data-theme="light"] .vbs-tag{color:#0369a1;border-color:rgba(3,105,161,.5);background:rgba(3,105,161,.07)}
html[data-theme="light"] .vbs-note{color:rgba(3,105,161,.85)}
html[data-theme="light"] .__cf_email__{color:#0369a1}
html[data-theme="light"] .k{color:#8a6d2f}
/* F2d (Ask 228 panel + FAQ controls, by-eye proof shots4/fix-ask-light.png):
   chips, category buttons and voice toggles kept dark-theme pale-sky text
   on the light panel — barely readable. Muted notes bumped to ink-dim. */
html[data-theme="light"] .fq-chip{color:#0369a1;border-color:rgba(3,105,161,.55);background:rgba(3,105,161,.06)}
html[data-theme="light"] .faq-cat-btn{color:#0369a1;border-color:rgba(3,105,161,.45)}
html[data-theme="light"] .faq-cat-btn.is-xmas{color:#8a6d2f;border-color:rgba(138,109,47,.5)}
html[data-theme="light"] h3.faq-group-h,
html[data-theme="light"] .faq-group-h{color:#8a6d2f}
html[data-theme="light"] .cg-voice-note,
html[data-theme="light"] .faq-disc{color:#3d4f66}
html[data-theme="light"] .lab-vr a{color:#0369a1}
/* specificity: .faq-group.is-xmas .faq-group-h (0,3,0) beat the plainer
   light rule above — match it and add the theme attribute. */
html[data-theme="light"] .faq-group.is-xmas .faq-group-h{color:#8a6d2f}
html[data-theme="light"] .faq-group .faq-group-h{color:#101c2c}
html[data-theme="light"] #cgTitle{color:#101c2c}
