/* Page-colour picker (theme_v3.js) and the pastel ("bg-light") overrides
   that keep every text, line, frame and animation visible on light colours. */

/* ── picker ── */
.th{position:relative}
.th-btn{display:inline-flex;align-items:center;gap:.5rem;height:2.6rem;padding:0 .95rem 0 .55rem;border-radius:999px;border:1px solid var(--line-d);
  background:transparent;color:inherit;font:500 .85rem var(--text);cursor:pointer;transition:background .3s,border-color .3s}
.th-btn:hover{border-color:currentColor}
.th-dot{width:1.45rem;height:1.45rem;border-radius:50%;box-shadow:0 0 0 2px rgba(255,255,255,.85),inset 0 0 0 1px rgba(0,0,0,.15)}
.th-pop{position:absolute;right:0;top:calc(100% + 10px);z-index:1700;width:276px;padding:14px;border-radius:18px;background:#fff;color:#121317;
  box-shadow:0 30px 60px -24px rgba(0,0,0,.45),0 0 0 1px rgba(0,0,0,.06);animation:thIn .35s cubic-bezier(.16,1,.3,1)}
@keyframes thIn{from{opacity:0;transform:translateY(-6px)}}
.th-h{margin:0 0 4px;font-weight:600;font-size:.95rem}
.th-g{margin:10px 0 6px;font-weight:500;font-size:.66rem;letter-spacing:.12em;text-transform:uppercase;color:#5f6577}
.th-row{display:flex;flex-wrap:wrap;gap:7px}
.th-sw{width:30px;height:30px;padding:0;border:0;border-radius:9px;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(0,0,0,.14);transition:transform .2s}
.th-sw:hover{transform:scale(1.08)}
.th-sw.on{box-shadow:0 0 0 2px #fff,0 0 0 4px #1f4cca}
.th-name{margin:12px 0 0;font-weight:600;font-size:.88rem}
.th-reset{margin-top:8px;padding:0;border:0;background:none;font:500 .8rem var(--text);color:#5f6577;text-decoration:underline;cursor:pointer}
@media (max-width:1080px){.th-btn span{display:none}.th-btn{padding:0 .55rem}}
@media (max-width:420px){.th-pop{position:fixed;left:16px;right:16px;top:74px;width:auto}}

/* ── pastel themes: dark text and lines on the coloured sections ── */
html.bg-light{--ash-d:#55596a;--line-d:rgba(18,19,23,.14);--frame:#121317;--frame-ink:#ffffff}
html.bg-light #hx{--hx-mute:#4b4f5e;--hx-line:rgba(18,19,23,.14)}
html.bg-light body,html.bg-light #hx,html.bg-light .tr,html.bg-light main .night,html.bg-light .nav{color:var(--ink)}
html.bg-light .nav-logo,html.bg-light .nav-links a:hover,html.bg-light .nav-links a.is-here,
html.bg-light .reach-stats b,html.bg-light #coordCity,html.bg-light .aw-sub,html.bg-light .w-tally b,html.bg-light .wh-weighs li{color:var(--ink)}
html.bg-light .hx-lede,html.bg-light .body,html.bg-light .lede,html.bg-light .wh-lede,html.bg-light .fd-quote-more{color:#3d4252}
html.bg-light .hx-btn{background:var(--ink);color:#fff}
html.bg-light .hx-btn:hover{background:#000}
html.bg-light .pill-line{color:var(--ink);border-color:rgba(18,19,23,.22)}
html.bg-light .pill-line:hover{background:var(--ink);color:#fff;border-color:var(--ink)}
html.bg-light .nav-burger{border-color:rgba(18,19,23,.22)}
html.bg-light .nav-burger span{background:var(--ink)}
html.bg-light .menu-open .nav-burger span{background:var(--ink)}
html.bg-light .hx-switch{background:rgba(255,255,255,.92);box-shadow:inset 0 0 0 1px rgba(18,19,23,.1),0 20px 40px -20px rgba(0,0,0,.25)}
html.bg-light .hx-switch button{color:#55596a}
html.bg-light .hx-switch button:hover{color:var(--ink)}
html.bg-light .hx-switch button.on{background:var(--ink);color:#fff}
html.bg-light .mob-menu{color:var(--ink)}
html.bg-light .mm-row,html.bg-light .mm-chips a,html.bg-light .mm-social a,html.bg-light .mm-label,html.bg-light .mm-k,html.bg-light .mm-signin{color:var(--ink)}
html.bg-light .hx1-row span{color:rgba(18,19,23,.72)}
html.bg-light .hx1-row span em{color:rgba(18,19,23,.45)}
html.bg-light .hx1-grid{opacity:.35}
html.bg-light .hx1-panel::before{background-image:radial-gradient(rgba(18,19,23,.16) 1px,transparent 1.3px)}
html.bg-light .hx2-badge{color:#4b4f5e}
html.bg-light .grain{opacity:.035}
/* the particle world, the Command wireframe globe and the Why Us dot field are
   drawn in light dots: invert them to dark (orange stays orange) */
html.bg-light #gl,html.bg-light .hx2-globe,html.bg-light #dots{filter:invert(1) hue-rotate(180deg)}
/* the hover card over the globe stays dark so it reads on any colour */
html.bg-light #globeTip .gt-in{background:#14151a}
/* the footer stays black, so its text stays light */
html.bg-light .foot{--ash-d:#a4a9bd;--line-d:rgba(236,230,218,.16);color:var(--bone)}
html.bg-light .foot .nav-logo,html.bg-light .foot a{color:var(--bone)}
/* on pastels the beige sheets sit too close to the page colour: lift them to white */
html.bg-light .bone{background:#fff}
/* workflow diagram and "under the hood" panels: dark lines and labels */
html.bg-light .flow .fl-pill rect{fill:rgba(18,19,23,.03);stroke:rgba(18,19,23,.22)}
html.bg-light .flow .fl-pill text{fill:var(--ink)}
html.bg-light .flow .fl-path{stroke:rgba(18,19,23,.22)}
html.bg-light .integ-pnl{background:rgba(255,255,255,.5)}
html.bg-light .integ-pnl:hover{background:rgba(255,255,255,.8)}
html.bg-light .ip-bub{background:rgba(18,19,23,.06)}
html.bg-light .ip-code{background:#14151a;color:var(--bone)}
html.bg-light .app-dots i{background:rgba(18,19,23,.2)}
html.bg-light .mm-chips a{border-color:rgba(18,19,23,.16)}
/* the Departures board and the Command search bar stay dark, so their labels stay light */
html.bg-light .hx3-board,html.bg-light .hx2-bar,html.bg-light .hx2-res{--hx-mute:#a9b0c8;--hx-line:rgba(236,230,218,.14);color:var(--bone)}
/* White (the default): the beige sheets turn a soft grey so sections still
   separate, and boxed panels get a hairline instead of a tint */
html[data-theme="white"] .bone{background:#f4f5f9}
html[data-theme="white"] .hx1-panel{box-shadow:inset 0 0 0 1px rgba(18,19,23,.08)}
html[data-theme="white"] .au-brand{background:#f2f3f7}
/* Snow (the default): warm off-white sheets and panels to match */
html[data-theme="snow"] .bone{background:#f8f1ef}
/* Snow: the hero box is a soft charcoal card, so everything inside it goes light again */
html[data-theme="snow"] .hx1-panel{background:#000000;color:var(--bone);box-shadow:0 40px 80px -40px rgba(20,10,5,.35);
  --hx-mute:#b4b6c2;--hx-line:rgba(236,230,218,.14);--frame:#ffffff;--frame-ink:#000000}
html[data-theme="snow"] .hx1-panel .hx-lede{color:#cfd0d8}
html[data-theme="snow"] .hx1-panel .hx-btn{background:var(--bone);color:#121317}
html[data-theme="snow"] .hx1-panel .hx-btn:hover{background:#fff}
html[data-theme="snow"] .hx1-panel .hx-tlink{color:var(--bone)}
html[data-theme="snow"] .hx1-panel .tc-essay{box-shadow:inset 0 0 0 1px rgba(236,230,218,.12)}
html[data-theme="snow"] .au-brand{background:#f6f0ef}
html[data-theme="snow"] .hx1-panel .tc-essay{background:#1c1c1f}

/* ── accent visibility ── theme_v3.js picks the page-level blue for the chosen
   colour; dark islands that sit on light page colours (the black hero box, the
   dark boards, code panel, globe card, footer) use a lighter step of the logo
   blue so it never sinks into the black */
html.bg-light .hx1-panel,html.bg-light .hx3-board,html.bg-light .hx2-bar,html.bg-light .hx2-res,
html.bg-light .ip-code,html.bg-light #globeTip,html.bg-light .foot,html.bg-light .pg-dark{
  --signal:#4d72e8;--signal-ink:#4d72e8;--signal-rgb:77,114,232;--on-signal:#ffffff}
/* when the accent turns very light (deep blue page colours), what sits on it turns dark */
html.sig-light .faq-item2[open] summary::after{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 2v8M2 6h8' stroke='%23121317' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E")}
html.sig-light .mm-feature .mm-k{color:rgba(18,19,23,.62)}
html.sig-light .mm-feature small{color:rgba(18,19,23,.72)}

/* Black, and Midnight purple (#100a12, the homepage default): the page is dark and
   the hero box flips to white, so everything inside the box goes dark */
html:is([data-theme="black"],[data-theme="plum"],[data-theme="abyss"]) .hx1-panel{background:#ffffff;color:#121317;box-shadow:none;
  --hx-mute:#55596a;--hx-line:rgba(18,19,23,.12);--frame:#121317;--frame-ink:#ffffff;
  --signal:#1f4cca;--signal-ink:#1f4cca;--signal-rgb:31,76,202;--on-signal:#ffffff}
html:is([data-theme="black"],[data-theme="plum"],[data-theme="abyss"]) .hx1-panel .hx-lede{color:#3d4252}
html:is([data-theme="black"],[data-theme="plum"],[data-theme="abyss"]) .hx1-panel .hx-btn{background:#121317;color:#ffffff}
html:is([data-theme="black"],[data-theme="plum"],[data-theme="abyss"]) .hx1-panel .hx-btn:hover{background:#000000}
html:is([data-theme="black"],[data-theme="plum"],[data-theme="abyss"]) .hx1-panel .hx-tlink{color:#121317}
html:is([data-theme="black"],[data-theme="plum"],[data-theme="abyss"]) .hx1-panel .tc-resume{box-shadow:inset 0 0 0 1px rgba(18,19,23,.1)}
/* the beige sheets go pure white, and the hero switcher becomes a white pill */
html:is([data-theme="plum"],[data-theme="abyss"]) .foot{background:var(--page)}
html:is([data-theme="black"],[data-theme="plum"],[data-theme="abyss"]) .bone{background:#ffffff;
  --signal:#1f4cca;--signal-ink:#1f4cca;--signal-rgb:31,76,202;--on-signal:#ffffff}
html:is([data-theme="black"],[data-theme="plum"],[data-theme="abyss"]) .hx-switch{background:#ffffff;box-shadow:0 20px 40px -20px rgba(0,0,0,.6)}
html:is([data-theme="black"],[data-theme="plum"],[data-theme="abyss"]) .hx-switch button{color:#55596a}
html:is([data-theme="black"],[data-theme="plum"],[data-theme="abyss"]) .hx-switch button:hover{color:#121317}
html:is([data-theme="black"],[data-theme="plum"],[data-theme="abyss"]) .hx-switch button.on{background:#121317;color:#ffffff}

/* ── readable on every page colour ── */
/* the light sheets (.bone) always carry the logo blue, whatever the page colour;
   the dark cards inside them go back to a lighter blue */
html .bone{--signal:#1f4cca;--signal-ink:#1f4cca;--signal-rgb:31,76,202;--on-signal:#ffffff}
html .bone :is(.pg-dark,.st-card:nth-child(2n)){--signal:#7d9bff;--signal-ink:#7d9bff;--signal-rgb:125,155,255;--on-signal:#121317}
/* the tool numbers on the beige sheet */
.bone .t-n{color:#6f6a62}
/* Why Us: the crossed-out list on light page colours */
html.bg-light .rf-no,html.bg-light .rf-yes{color:var(--ink)}
html.bg-light .rf.done .rf-no s{color:#7c8090}
/* the homepage heroes (Gravity, Orbit, fanned cards) on light page colours: dark text, the logo blue */
html.bg-light :is(.hg,.hf,.hn){color:var(--ink);--hg-blue:#1f4cca;--hf-blue:#1f4cca;--hn-blue:#1f4cca;--hg-mute:#55596a;--hf-mute:#55596a;--hn-mute:#55596a;--hn-line:rgba(18,19,23,.14)}
html.bg-light :is(.hg-btn,.hf-btn,.hn-btn){background:#121317;color:#ffffff}
html.bg-light :is(.hg-btn,.hf-btn,.hn-btn):hover{background:#000000}
html.bg-light :is(.hg-btn,.hf-btn,.hn-btn) i{background:#ffffff;color:#121317}
html.bg-light .hg-tag{box-shadow:inset 0 0 0 1px rgba(18,19,23,.32);color:var(--ink)}
html.bg-light .hg-tag-w{background:#121317;color:#ffffff;box-shadow:none}
html.bg-light .hn-arrow{color:var(--ink)}
html.bg-light .hn-arrow:hover{background:#121317;color:#ffffff;border-color:#121317}
html.bg-light .ld-num,html.bg-light .ld-ver-in{color:var(--ink)}
