/* generated by scripts/sync_prototype.py from the prototype: dark appearance. Do not edit. */
/* ============================================================
   KCM Trade — the dark appearance (html[data-appearance="dark"]).
   Appended last by build.py, after the generated colour twins.

   Colour only. Nothing in this file sets a size, a spacing, a
   position, a radius or a display value: the layout is the light
   layout, untouched. What changes is paint — background, border
   colour, shadow, text colour, and one filter on the wordmark.

   The look is the reference's: a near-black navy ground with blue
   light pooling at its corners, dark navy cards a step above it,
   and blue as the light. Gold stays the one action on a screen.
   The side menu and the icons are smoked liquid glass — the
   recipe's three white inner shadows, scaled for a dark pane.

   Not data-theme: the artifact viewer stamps that with the
   reader's own theme. data-appearance is the portal's switch.
   ============================================================ */

/* ---------- tokens ---------- */
html[data-appearance="dark"]{
  color-scheme:dark;
  /* a dark slate, not a near-black: pure black under white text reads as
     harsh, and the user asked for a softer, more trustworthy contrast — the
     ground sits around 7% lightness, surfaces a step above it, and the text
     is off-white rather than white (the usual dark-UI practice: no pure
     white on pure black) */
  --ground-top:#0F1218; --ground-mid:#0E1016; --ground-bot:#0D0F14;
  --surface:#171B25;
  --surface-quiet:rgba(23,27,37,.72);
  --surface-sunk:#11141C;
  --ink:#EAEDF4; --ink-2:#B3BBCE; --ink-3:#8E97AE; --ink-4:#7D869C;
  /* --ink paints text in light and fills in light; in dark those split.
     The generated twins send every --ink fill here instead */
  --ink-fill:#1C2654;
  --gold-soft:rgba(255,194,32,.12);
  --gold-deep:#F2C24A;
  --up:#3FCF8E; --down:#F0736A;
  --line:rgba(255,255,255,.06);
  --line-2:rgba(255,255,255,.09);
  /* depth is lightness and an edge of light, not a shadow — a shadow alone
     disappears on navy */
  --lift-card:inset 0 0 0 1px rgba(255,255,255,.055),inset 0 1px 0 rgba(255,255,255,.045),
              0 10px 28px -16px rgba(0,0,0,.75);
  --lift-hero:inset 0 0 0 1px rgba(255,255,255,.065),inset 0 1px 0 rgba(255,255,255,.06),
              0 24px 50px -24px rgba(0,0,0,.85);
  /* the light theme's white top-left halo would glow on navy */
  --lift-soft:inset 0 0 0 1px rgba(255,255,255,.06),inset 0 1px 0 rgba(255,255,255,.05),
              0 18px 42px -22px rgba(0,0,0,.9);
  --blue:#3B5BFF;
  /* the liquid-glass recipe, scaled for a dark pane: at the full 20% the rim
     of a large dark panel reads as a glowing border */
  --lq-in:inset 4px 4px 12px 2px rgba(255,255,255,.12),
          inset -2px -2px 15px 1px rgba(255,255,255,.08),
          inset 0 0 15px 2px rgba(120,150,255,.10);
  /* the blue-lit pill: where you are, in every navigation. A blue aurora: a
     band of blues (deep electric, royal, azure, violet) three pills wide, a
     cyan wisp along the top where the light comes in and a violet one low on
     the right. Every stop keeps white text above 4.5:1. Sizes ride in the
     token because each pill sets the background shorthand. */
  --lq-on:
    /* the fill is kept quiet — about half strength — so the pill reads by its
       lit edge (--lq-on-in) more than by what is inside it */
    radial-gradient(70% 90% at 22% -18%,rgba(70,150,255,.16) 0%,rgba(70,150,255,0) 72%) 0 0/100% 100% no-repeat,
    radial-gradient(60% 110% at 96% 118%,rgba(80,60,220,.16) 0%,rgba(80,60,220,0) 70%) 0 0/100% 100% no-repeat,
    /* deep navy-blues, the dark theme's own hue, not the electric ones */
    linear-gradient(105deg,rgba(10,20,120,.5) 0%,rgba(18,38,160,.5) 18%,rgba(14,52,150,.5) 34%,rgba(22,30,156,.5) 50%,
                    rgba(40,24,138,.5) 66%,rgba(18,38,160,.5) 82%,rgba(10,20,120,.5) 100%) 0% 50%/300% 100%;
  /* and it glows, like a lit key: light welling in from the rim (soft, never
     a drawn outline), the top edge catching it, and a blue halo spilling
     onto whatever is around the pill */
  --lq-on-in:inset 0 1px 0 rgba(220,236,255,.50),
             inset 0 0 0 1px rgba(150,195,255,.20),
             inset 0 0 10px 1px rgba(140,190,255,.42),
             inset 3px 3px 10px 1px rgba(255,255,255,.10),
             0 0 16px 1px rgba(56,110,255,.55),
             0 0 38px 4px rgba(40,80,255,.30),
             0 10px 26px -12px rgba(40,70,255,.9);
}

/* ---------- the ground: dark, with blue light pooling at the corners ---------- */
html[data-appearance="dark"] body{
  background:
    /* light for the menu's glass to refract: clear glass over a flat dark ground
       reads as nothing but an outline, so a blue and a violet pool sit behind it */
    /* orbs of out-of-focus light behind the menu, each set across one of its
       edges. Glass is only seen through what it changes: a curved edge that is
       sharp outside the pane, softened inside it, and bent at the rim. A smooth
       glow gives it nothing to change, so the pane would read as a lighter panel */
    radial-gradient(circle 74px at calc(var(--edge) + 226px) 150px,rgba(96,130,255,.50) 0%,rgba(96,130,255,.32) 56%,rgba(96,130,255,0) 72%),
    radial-gradient(circle 48px at calc(var(--edge) + 18px) 292px,rgba(146,104,255,.44) 0%,rgba(146,104,255,.26) 56%,rgba(146,104,255,0) 72%),
    radial-gradient(circle 96px at calc(var(--edge) + 176px) 56vh,rgba(62,98,255,.38) 0%,rgba(62,98,255,.22) 56%,rgba(62,98,255,0) 72%),
    radial-gradient(22vw 58vh at calc(var(--edge) + 120px) 34%,rgba(70,104,255,.30) 0%,rgba(70,104,255,0) 70%),
    radial-gradient(18vw 42vh at calc(var(--edge) + 70px) 86%,rgba(132,90,255,.24) 0%,rgba(132,90,255,0) 70%),
    radial-gradient(1100px 640px at 90% -10%,rgba(59,91,255,.22) 0%,rgba(59,91,255,0) 62%),
    radial-gradient(900px 680px at -8% 106%,rgba(96,74,255,.14) 0%,rgba(96,74,255,0) 60%),
    radial-gradient(760px 520px at 50% 118%,rgba(40,80,255,.10) 0%,rgba(40,80,255,0) 60%),
    #0E1016;
  background-attachment:fixed;
}

/* ---------- the brand: the logo's own dark lockup, a gold mark (core.js swaps
   it in), KCMTrade in gold and PRO in white ---------- */
html[data-appearance="dark"] :is(.brand-word,.rail-word){--bw-name:#F5C500;--bw-pro:#FFFFFF}

/* ---------- the side menu and the account bar: smoked liquid glass ---------- */
/* Real liquid glass: mostly clear, so the light pooled behind the menu shows
   through it, softened. The pane itself is only a whisper of tint; what makes
   it read as glass is the edge — a crisp 1px rim, a brighter line along the
   top where light strikes a curved pane, and the recipe's inner glow, which
   brightens the band just inside the rim the way a thick edge bends light.
   The blur sits on the panel itself, not on a pseudo-element: the panel
   scrolls, and a layer inside it would scroll away from its own edge. */
html[data-appearance="dark"] :is(.rail-panel,.hbar,.grp-btn:not(.is-on):not([aria-current]),.tabbar,.dock,.sheet),
/* every box on Home wears the menu's glass as well — the gold Deposit action
   included, which is then lit gold from inside (see Deposit, below) */
html[data-appearance="dark"] body[data-page="Home"] :is(.promo,.qrow,.qtile,.qsq,.qmore,.panel,.card-quiet,.mcard,.linkcard){
  /* A slab of glass, not a film. Two parts, from the edge in: a band
     14–16px wide where light gathers at the rim and fades inward, smoothly,
     and a smoked interior, darker than the page around it. No line is drawn
     on the edge: the box ends where its frost stops, and the bright band
     against the darker middle is what reads as thickness. */
  /* the smoked interior only: the edge is a hairline of light (below), as on
     a phone's own glass, not a set of gradients */
  background:var(--glass-smoke,rgba(5,6,10,.28));
  -webkit-backdrop-filter:blur(var(--glass-blur,1.5px)) saturate(var(--glass-sat,100%)) brightness(var(--glass-bri,.95));
          backdrop-filter:blur(var(--glass-blur,1.5px)) saturate(var(--glass-sat,100%)) brightness(var(--glass-bri,.95));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.17),       /* the highlight along the top edge, where the light comes from */
    inset 0 0 0 1px rgba(255,255,255,.06),     /* a hairline round the rest */
    inset 0 0 30px 4px rgba(0,0,0,.30),        /* depth past the rim */
    0 30px 60px -30px rgba(0,0,0,.9);
  /* the rim is the edge now; a drawn border would cut across it */
  border-color:transparent;
}
/* With the lens drawing (glass.js) the canvas under the box is the glass:
   the real clip, bent at the rim and frosted across the face. The painted
   edge light, the smoke and the blur step aside; the box keeps its edge. */
html[data-appearance="dark"] :is(.rail.glass-live .rail-panel:not(.panel-ghost),
  .glass-live:is(.hbar,.grp-btn,.tabbar,.dock,.promo,.qrow,.qtile,.qsq,.qmore,.panel,.card-quiet,.mcard,.linkcard)){
  background:transparent;
  -webkit-backdrop-filter:none;
          backdrop-filter:none;
  box-shadow:
    inset 0 0 3px 3px rgba(170,200,255,.06),
    inset 0 0 30px 4px rgba(0,0,0,.24),
    0 30px 60px -30px rgba(0,0,0,.9);
}
/* the open menu box is lit from its foot, after the tiles the user showed
   (black rounded tiles on a blue ground, each with a hard line of near-white
   light along its bottom edge, a short intense bloom above it, black above
   that, and a halo of the same light on the ground beneath). In the
   brand's yellow. Two kinds of paint, because they do different jobs:
   - two overlays (::before and ::after, below) for the light on the edge
     itself: a glow that follows the box's radius round the bottom corners
     and climbs the lower sides, and the hard line on the bottom edge — as
     the tiles' light does ("the light will go up a bit with the box
     curve", "it's not an outline");
   - background-image for the band of light rising off the edge: a
     full-width band, strongest at the foot and gone a fifth of the way
     up (it reached a third, then half with the edge glow, and the user
     said "the yellow is too much"), with a brighter centre so the light
     has a source. A bowed top edge — higher at the sides, lower in the
     middle, after a curve the user drew — was tried twice on 2026-09-16
     and undone ("undo two time").
   The band is painted on the box itself, after the lens rule that clears
   the slab's background, so it sits over the lens canvas where the lens
   draws and over the painted slab where it does not; and on the box, not
   its content, so it stays put while the list scrolls. The depth shadow
   inside the rim is offset downward so it does not dim the edge. The tiles'
   halo on the ground beneath is not here: the user asked it off twice
   ("remove the yellow drop shadow"). */
html[data-appearance="dark"] .rail-panel:not(.panel-ghost),
html[data-appearance="dark"] .rail.glass-live .rail-panel:not(.panel-ghost){
  background-image:
    radial-gradient(70% 34px at 50% 100%,rgba(255,246,200,.75) 0%,rgba(255,224,90,.35) 55%,rgba(245,197,0,0) 100%),
    linear-gradient(to top,rgba(255,212,40,.80) 0%,rgba(255,196,16,.50) 4%,rgba(250,182,0,.22) 9%,rgba(245,176,0,.07) 15%,rgba(245,197,0,0) 20%);
  background-repeat:no-repeat;
  /* room under the last row, so it sits above the brightest part of the band */
  padding-bottom:26px}
html[data-appearance="dark"] .rail-panel:not(.panel-ghost){
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.17),inset 0 0 0 1px rgba(255,255,255,.06),
    inset 0 10px 30px -4px rgba(0,0,0,.30),
    0 30px 60px -30px rgba(0,0,0,.9)}
html[data-appearance="dark"] .rail.glass-live .rail-panel:not(.panel-ghost){
  box-shadow:
    inset 0 0 3px 3px rgba(170,200,255,.06),
    inset 0 10px 30px -4px rgba(0,0,0,.24),
    0 30px 60px -30px rgba(0,0,0,.9)}
/* the light on the edge, as two overlays on the box (position:relative
   above), each a box-shadow drawn inward from the box's own rounded
   outline and faded upward by a mask — so the light follows the curve of
   the corners and climbs the sides as a glow, not a line ("it's not an
   outline"):
   - ::before is the glow: a soft band of gold along the edge, brightest on
     the bottom, wrapping the corners and a little way up the sides, gone a
     fifth of the way up;
   - ::after is the hard line of near-white light: full on the bottom edge
     and round the corners, then gone a tenth of the way up.
   They sit over the rows, at the edge only, and take no clicks. (An
   absolute child of a scrolling box scrolls with it; the panel scrolls
   only on a very short window.) */
html[data-appearance="dark"] .rail-panel:not(.panel-ghost){position:relative}
html[data-appearance="dark"] .rail-panel:not(.panel-ghost)::before,
html[data-appearance="dark"] .rail-panel:not(.panel-ghost)::after{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none}
html[data-appearance="dark"] .rail-panel:not(.panel-ghost)::before{
  box-shadow:inset 0 0 30px 4px rgba(255,218,70,.62),inset 0 0 8px 1px rgba(255,238,160,.50);
  -webkit-mask-image:linear-gradient(to top,#000 0%,#000 5%,rgba(0,0,0,.55) 11%,rgba(0,0,0,0) 20%);
          mask-image:linear-gradient(to top,#000 0%,#000 5%,rgba(0,0,0,.55) 11%,rgba(0,0,0,0) 20%)}
html[data-appearance="dark"] .rail-panel:not(.panel-ghost)::after{
  box-shadow:inset 0 0 0 2px #FFFBE6;
  -webkit-mask-image:linear-gradient(to top,#000 0%,#000 3%,rgba(0,0,0,0) 10%);
          mask-image:linear-gradient(to top,#000 0%,#000 3%,rgba(0,0,0,0) 10%)}
html[data-appearance="dark"] .rail.is-open .nav-item:hover{background:rgba(255,255,255,.05)}
/* the row you are on, after the reference the user gave (a video app's
   sidebar): a quiet grey pill a step lighter than the panel with a hairline
   of light along its top, a short yellow bar standing at the panel's edge
   beside it, and a chevron at its right — no aurora, no glow */
html[data-appearance="dark"] .rail.is-open .nav-item.is-on,
html[data-appearance="dark"] .rail-brand.is-on,
html[data-appearance="dark"] .rail-brand.is-on:has(.rail-home:hover){
  position:relative;color:#fff;
  /* the pane is the menu's glass, and the bar's yellow light spills into it
     from the left, fading out by the middle of the row */
  background:
    radial-gradient(70% 140% at 0% 50%,rgba(245,197,0,.26) 0%,rgba(245,197,0,.08) 45%,rgba(245,197,0,0) 70%),
    rgba(255,255,255,.07);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10),inset 0 0 0 1px rgba(255,255,255,.05)}
html[data-appearance="dark"] .rail.is-open .nav-item.is-on::before,
html[data-appearance="dark"] .rail-brand.is-on::before{
  content:'';position:absolute;left:-10px;top:9px;bottom:9px;width:4px;border-radius:0 3px 3px 0;
  background:#F5C500;box-shadow:0 0 10px 1px rgba(245,197,0,.55),0 0 22px 2px rgba(245,197,0,.25)}
html[data-appearance="dark"] .rail.is-open .nav-item.is-on::after{
  content:'';position:absolute;right:14px;top:50%;width:6px;height:6px;margin-top:-4px;
  border-right:1.6px solid rgba(255,255,255,.7);border-bottom:1.6px solid rgba(255,255,255,.7);transform:rotate(-45deg)}
html[data-appearance="dark"] .rail-brand:has(.rail-home:hover){background:rgba(255,255,255,.05)}
/* the collapsed rail's circles are the menu's glass, as beads: the slab rule
   above paints them and glass.js draws them, and that rule outranks the light
   layer's hover, so no white fill or inset edge comes back with it. Only the
   icon's colour is set here. */
html[data-appearance="dark"] .grp-btn{color:#DCE5FF}
/* the current circle is lit from below, after the card the user showed: a
   pool of the brand's yellow rising from the foot of the circle and fading
   out by its middle, a hairline of light along its top, and a soft spill of
   the same light onto the rail beneath it — no aurora, no blue */
html[data-appearance="dark"] .grp-btn.is-on,
html[data-appearance="dark"] .grp-btn[aria-current]{
  background:
    radial-gradient(85% 75% at 50% 112%,rgba(245,197,0,.62) 0%,rgba(245,197,0,.22) 42%,rgba(245,197,0,0) 72%),
    rgba(255,255,255,.07);
  color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),inset 0 0 0 1px rgba(255,255,255,.05),
             0 10px 22px -8px rgba(245,197,0,.55)}
/* the aurora drifts through the menu's own pills, slowly, once they have
   arrived: not while the panel bursts open (its rows slide in then) or shuts.
   The switch and the tab bar keep it still; their pills already travel. */
@media (prefers-reduced-motion:no-preference){
  @keyframes lq-aurora{from{background-position:0 0,0 0,0% 50%}to{background-position:0 0,0 0,100% 50%}}
  html[data-appearance="dark"] .tab-ind > i{animation:lq-aurora 14s ease-in-out infinite alternate}
}
/* what the lit pill holds glows with it: the label a pale blue, the gold
   icon gold, the collapsed circle's white icon blue-white */
html[data-appearance="dark"] .grp-btn:is(.is-on,[aria-current]) svg{filter:none}

/* ---------- the icons: liquid beads ---------- */
html[data-appearance="dark"] :is(.qsq .qa-i,.qm-i,.qtile .qa-i,.qrow .qa-i,.plink-i,.linkcard-i,
  .dep-into-i,.dhead-plate,.chan .qa-i,.move-i){
  background:
    radial-gradient(90% 60% at 30% 4%,rgba(255,255,255,.20) 0%,rgba(255,255,255,0) 58%),
    radial-gradient(80% 60% at 70% 110%,rgba(110,150,255,.18) 0%,rgba(110,150,255,0) 60%),
    linear-gradient(150deg,rgba(66,110,255,.22) 0%,rgba(16,34,110,.20) 100%),
    #121A34;
  box-shadow:var(--lq-in),0 8px 18px -10px rgba(0,0,0,.85);
  color:#DCE5FF}
/* the risk and the danger rows keep their red, as a bead */
html[data-appearance="dark"] :is(.plink.is-risk,.plink.is-danger) .plink-i{
  background:radial-gradient(90% 60% at 30% 4%,rgba(255,255,255,.14) 0%,rgba(255,255,255,0) 58%),
             linear-gradient(150deg,rgba(240,115,106,.26) 0%,rgba(120,30,30,.22) 100%),#1A1424;
  color:var(--down)}

/* ---------- Deposit: the same glass, lit gold from inside ----------
   The one action keeps its colour, but as light rather than paint. The box is
   the menu's glass (the slab rule above, and the lens), and inside it two
   blurred gold layers drift on the aurora keyframes the gold buttons already
   use: a white-gold bloom that swells at the bottom-left corner, and a deeper
   amber crossing it the other way, slower. They sit between the lens and the
   label: the box is its own stacking context, its children ride above. The
   phone square gets the two layers here; the desktop row already has them,
   and here they are re-tuned for glass and blended plainly. Position with no
   offset, isolation and the clip move nothing. */
html[data-appearance="dark"] body[data-page="Home"] :is(.qsq,.qrow).is-gold{
  position:relative;overflow:hidden;isolation:isolate;color:#fff}
html[data-appearance="dark"] body[data-page="Home"] :is(.qsq,.qrow).is-gold > *:not(.glass-gl){position:relative;z-index:1}
html[data-appearance="dark"] body[data-page="Home"] :is(.qsq,.qrow).is-gold::before,
html[data-appearance="dark"] body[data-page="Home"] :is(.qsq,.qrow).is-gold::after{
  content:'';position:absolute;inset:-45%;z-index:0;pointer-events:none;mix-blend-mode:normal;will-change:transform}
html[data-appearance="dark"] body[data-page="Home"] :is(.qsq,.qrow).is-gold::before{
  background:
    radial-gradient(42% 60% at 22% 88%,rgba(255,246,210,.88) 0%,rgba(255,206,64,.55) 38%,rgba(255,190,40,0) 72%),
    radial-gradient(36% 52% at 76% 30%,rgba(255,200,60,.36),transparent 72%);
  filter:blur(14px);opacity:1;
  animation:aurora-a 13s cubic-bezier(.45,0,.55,1) infinite alternate}
html[data-appearance="dark"] body[data-page="Home"] :is(.qsq,.qrow).is-gold::after{
  background:
    radial-gradient(46% 62% at 72% 78%,rgba(255,150,0,.46),transparent 70%),
    radial-gradient(38% 54% at 20% 24%,rgba(255,214,90,.42),transparent 74%);
  filter:blur(18px);opacity:.9;
  animation:aurora-b 19s cubic-bezier(.45,0,.55,1) infinite alternate}
html[data-appearance="dark"] body[data-page="Home"] :is(.qsq,.qrow).is-gold b{color:#fff}
html[data-appearance="dark"] body[data-page="Home"] .qrow.is-gold .qa-note{color:rgba(255,255,255,.72)}
/* the icon plate is the gold itself, a bead */
html[data-appearance="dark"] body[data-page="Home"] :is(.qsq,.qrow).is-gold .qa-i{
  background:linear-gradient(160deg,#FFE27A 0%,#FFC930 45%,#F2AE0C 100%);color:var(--gold-ink);
  box-shadow:inset 3px 3px 10px 1px rgba(255,255,255,.45),inset -2px -2px 12px 1px rgba(150,90,0,.25),
             0 8px 16px -10px rgba(120,70,0,.7)}
@media (prefers-reduced-motion:reduce){
  html[data-appearance="dark"] body[data-page="Home"] :is(.qsq,.qrow).is-gold::before,
  html[data-appearance="dark"] body[data-page="Home"] :is(.qsq,.qrow).is-gold::after{animation:none}
}

/* ---------- switches: a recessed track, a liquid pill ---------- */
/* the metric switch is left to its generated twin: on a phone it is a text
   switch with no track, and a track here painted a box behind the words */
html[data-appearance="dark"] .mode{
  background:rgba(0,0,0,.34);
  box-shadow:inset 0 1px 2px rgba(0,0,0,.55),inset 0 -1px 0 rgba(255,255,255,.05)}
html[data-appearance="dark"] .segind > i{
  background:linear-gradient(150deg,rgba(255,255,255,.17) 0%,rgba(255,255,255,.05) 100%);
  box-shadow:inset 2px 2px 8px 1px rgba(255,255,255,.14),inset -1px -1px 8px rgba(255,255,255,.07),
             0 4px 12px -6px rgba(0,0,0,.85)}
html[data-appearance="dark"] .mode.is-gold .segind > i{background:var(--lq-on);box-shadow:var(--lq-on-in)}

/* ---------- the phone bar, the dock and the More sheet ----------
   The menu's glass, by the slab rule above. The bar and the dock are drawn by
   the lens as well (glass.js); the sheet scrolls, so it keeps the painted slab. */
html[data-appearance="dark"] .tab-ind > i{background:var(--lq-on);box-shadow:var(--lq-on-in)}

/* ---------- things that float: a step lighter than the cards ---------- */
html[data-appearance="dark"] :is(.umenu,.langpop,.dd-menu){
  background:#151C36;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),inset 0 1px 0 rgba(255,255,255,.06),
             0 26px 60px -18px rgba(0,0,0,.9)}
/* the picker of a native select is the same menu (style.css, base-select):
   the same step lighter, rows lit by a wash of white, the check in dark's gold */
html[data-appearance="dark"] ::picker(select){background:#151C36;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),inset 0 1px 0 rgba(255,255,255,.06),
             0 26px 60px -18px rgba(0,0,0,.9)}
html[data-appearance="dark"] select option:hover,
html[data-appearance="dark"] select option:focus-visible{background:rgba(255,255,255,.06);color:var(--ink)}
html[data-appearance="dark"] select option:active{background:rgba(255,255,255,.10)}
html[data-appearance="dark"] select option::checkmark{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F2C24A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")}

/* ---------- the moving light ----------
   Dark's ground is a field of dots, drawn on the .bgfield canvas by
   dot-matrix/animation.js (core.js starts it, with the page's own navy
   near-black as its ground and soft off-white dots): waves of brightness
   travel through the grid, leaning to the left and centre, and the glass
   lens (glass.js) reads that canvas as the light behind every pane. The
   painted ground and its orbs stay underneath as the fallback wherever the
   field cannot run. The clip below is kept for a page that still carries one
   in dark (has-bgv), dimmed and shaded as it always was. */
html[data-appearance="dark"].has-bgv .bgv{--bgv-dim:.85;display:block;opacity:.88;
  filter:brightness(calc(var(--bgv-dim) * var(--bgv-fade,1)))}
/* the shade over a clip, from both ends: black at the foot of the screen, gone
   by --shade-h of the way up, and black at the top, gone by --shade-th of the
   way down. glass.js reads the four numbers and shades its copy the same. The
   dot field carries its own vignette, so the shade stands down over it. */
html[data-appearance="dark"] .bgv-shade{--shade-h:.62;--shade-a:.88;--shade-th:.50;--shade-ta:.88;display:block;
  background:
    linear-gradient(to bottom,rgba(0,0,0,var(--shade-ta)) 0%,rgba(0,0,0,0) calc(var(--shade-th) * 100%)),
    linear-gradient(to top,rgba(0,0,0,var(--shade-a)) 0%,rgba(0,0,0,0) calc(var(--shade-h) * 100%))}
html[data-appearance="dark"].has-field .bgv-shade{display:none}

/* ---------- twins that came out wrong, put right by hand ----------
   darkgen maps each colour of a gradient on its own, so a gradient that runs
   from near-white to white, or from a mid grey to a dark one, can come out as
   two different kinds of surface. These re-state the few that matter. */
/* the switch knob's night face: mid grey to dark, all of it kept */
html[data-appearance="dark"] .tsw-k::before{background:linear-gradient(160deg,#5A6274 0%,#3A4153 55%,#252B3A 100%)}
/* the brand tile on the open menu: one navy plate, not opaque at one corner
   and clear at the other */
html[data-appearance="dark"] .rail-tile{background:transparent}
/* a border set with --ink is the fill's own colour in light (navy on navy);
   in dark --ink is text, so these take the fill's dark twin instead */
html[data-appearance="dark"] :is(.move-gold,.chan.is-pri,.linkcard.is-pri){border-color:var(--ink-fill)}

/* ---------- the More sheet's rise ---------- */
/* the grip band is sticky over the sheet's top: clear, so the glass shows
   through it (the handle itself is its ::before) */
html[data-appearance="dark"] .sheet-grip{background:transparent}
/* the light layer keeps the blur off the sheet until it has settled, so the
   blur is never recomputed over a moving panel; the slab rule outranks that,
   so it is said again here for dark */
html[data-appearance="dark"] .sheet-wrap:not(.is-still) .sheet{-webkit-backdrop-filter:none;backdrop-filter:none}

/* ---------- Deposit on desktop Home: lit at rest ---------- */
/* the gold wipe's ink cover would sit over the lens and the gold light until
   a hover; the row is lit glass already, so the cover is clear and the wipe
   has nothing to reveal */
html[data-appearance="dark"] body[data-page="Home"] .qrow.is-gold .gw{background:transparent}

/* ---------- the gold buttons start gold ----------
   In light a gold button rests under its ink cover and wipes to gold on
   hover. In dark the cover is clear, so Deposit is gold from the start —
   the one warm thing on the screen — with the dark ink on it, and a hover
   brightens it since the wipe has nothing left to reveal. A disabled button
   keeps its cover, so it still reads as inactive. */
html[data-appearance="dark"] .btn-gold:not([disabled]) .gw{background:transparent}
html[data-appearance="dark"] .btn-gold:not([disabled]){color:var(--gold-ink)}
html[data-appearance="dark"] .btn-gold:not([disabled]):hover{filter:brightness(1.06)}

/* ---------- Home's actions: the first thing after a login ----------
   The action stack (Deposit, Withdraw, Transfer, the two open-an-account
   tiles; on a phone the squares, the shortcut band and the tiles) is what a
   client comes for, so it stands off the black page as lit glass: the lens
   tints these boxes towards navy (--glass-lift, glass.js) and the painted
   slab smokes them navy rather than black; their notes are a step lighter.
   And on arrival a light passes across the stack once, left to right, so the
   eye lands there first. */
html[data-appearance="dark"] body[data-page="Home"] :is(.qrow,.qtile,.qsq,.qmore):not(.is-gold){
  --glass-lift:.34;--glass-smoke:rgba(40,42,52,.5)}
html[data-appearance="dark"] body[data-page="Home"] :is(.qrow,.qtile) .qa-note{color:var(--ink-2)}
html[data-appearance="dark"] body[data-page="Home"] .qstack{position:relative}
html[data-appearance="dark"] body[data-page="Home"] .qstack::after{
  content:'';position:absolute;inset:-6px;z-index:3;pointer-events:none;border-radius:22px;
  background:linear-gradient(105deg,transparent 30%,rgba(255,255,255,.14) 46%,rgba(255,220,120,.24) 50%,rgba(255,255,255,.14) 54%,transparent 70%);
  background-size:220% 100%;background-repeat:no-repeat;background-position:120% 0;
  mix-blend-mode:screen;opacity:0;
  animation:home-sweep 1.5s cubic-bezier(.4,0,.2,1) .45s 1 both}
@keyframes home-sweep{
  0%  {background-position:120% 0;opacity:0}
  12% {opacity:1}
  88% {opacity:1}
  100%{background-position:-120% 0;opacity:0}}
@media (prefers-reduced-motion:reduce){
  html[data-appearance="dark"] body[data-page="Home"] .qstack::after{display:none}
}

/* ---------- the circles answer a hover and a press ---------- */
/* the slab outranks the light layer's hover and press paint: the glass
   clears a little instead, and the icon goes white */
html[data-appearance="dark"] .grp-btn:is(:hover,:active):not(.is-on):not([aria-current]){
  --glass-smoke:rgba(20,30,64,.26);color:#fff}
