/* =====================================================================
   hub-theme.css: the hub's look for the page, shared by the Content Studio and the Video Hub.
   Source of truth: InterLinc-ContentStudio/showcase/site/shared/v1/ (the Video Hub vendors a copy).
   Reference: Unified-Hub/demo/hub-demo.html, Unified-Hub/backgrounds/. Pairs with hub-backgrounds.css/js
   (the six wallpapers) and hub-theme.js (the mode, remembered in "hub.theme.v1").

   <html data-theme="light|dark"> is the PAGE's mode; <html data-hr-theme> is the sidebar's, set separately
   (hub-rail.css), so the two can be mixed. This file only does the page:
     1. the wallpaper sits behind everything and the page is transparent over it;
     2. the glass: translucent cards over the wallpaper, in a light and a dark recipe (tokens below);
     3. the ink for text laid straight on the wallpaper (measured on every pixel of all six, README in
        Unified-Hub/backgrounds: 4.5:1 or better);
     4. the Appearance panel (.ht-*).
   An app wires its own surfaces to the tokens; the Studio's sheet does that for its pages.
   ===================================================================== */

/* 0. the type scale (owner 2026-10-16: "lighter type everywhere, so it reads elegant"). Every font-weight in the portal's interface
   (the Studio's sheets in build.py, the modules' injected sheets, the sidebar, the sign-in screen, the chart kit, /video/) is one of
   these tokens, with its value as the var() fallback for a page that does not load this file. Gotham Book (400) is the body,
   Gotham Medium (500) is every emphasis: titles, labels, buttons, figures. Nothing in the interface is Bold (700) or Black any more;
   the interface-only faces 'GK Black' and 'GK XLight' (build.py) and /video/'s 'Gotham Bold'/'Gotham Black' rules point at Medium.
   Light (300) is only for display text of 28px and up, never for body or small text.
   An element whose weight came from the browser (b, strong, h1-h6, th) gets --fw-strong too, at zero specificity, so any rule of the
   page still wins; designs drawn in the page (.dsn, the catalog's #dc-root) are left alone. */
:root{--fw-light:300;--fw-regular:400;--fw-medium:500;--fw-strong:500;--fw-display:500;--fw-label:500}
:where(html[data-theme]) :where(b,strong,h1,h2,h3,h4,h5,h6,th,dt,legend):not(:where(.dsn *,#dc-root *,.sc-host *,.cxhh,svg *)){
  font-weight:var(--fw-strong,500)}

/* 0a. while Gotham loads. The interface faces ('Gotham' and 'GK', build.py) are font-display:swap and the site's files are fetched
   fresh, so a slow network draws the page in the next face of the stack first and again when Gotham lands. That face used to be
   whatever the device had (Liberation Sans or DejaVu Sans on Linux, SF on a Mac): narrower than Gotham and with a taller line box,
   so when Gotham landed every sentence near the end of its line took one more line and everything under it moved (a 360 px phone:
   the Social hero's lede and the profile band's NMLS line went from two lines to three, the dashboard 39 px down; CI run 42165308108).
   'Gotham Fallback' is the local Arial (Liberation Sans and Arimo are metric-identical; Helvetica has Arial's widths; Roboto is the
   last resort) resized to Gotham's widths and given Gotham's line box, so the late swap changes the glyphs and almost nothing else.
   Every interface stack names it right after its Gotham family (page_speed.py adds it to the generated sheets; hub-movara.css,
   hub-charts.js and the modules name it themselves). Once Gotham has loaded it is never used: nothing looks different then.
   size-adjust: the width of the portal's own interface text (923 distinct runs from Home, the Studio, Create, Social, the Inbox, My
   Business, Catalog, Approvals, Co-branding, Plan, Account, Compliance at 1440 and 390) set in that Gotham weight, over the same text in Arial
   (Medium and Bold against Arial Bold, whose proportions follow Medium's: the run-to-run spread is 1.3% against 3.1% with Arial
   Regular). ascent/descent: Gotham's own overrides (78% + 22%: a line box of exactly 1em) divided by size-adjust, because the
   overrides are scaled with it. unicode-range: exactly the 225 code points the Gotham files map (the same in every weight), so a
   character Gotham does not have (×, →, ✓, −) skips this face and is drawn by the stack's next face, as it always was: with
   Gotham loaded nothing is drawn differently. 'Gotham Fallback Medium' is the same for 'GK Black' and 'GK XLight', which are
   Gotham Medium at any weight. */
@font-face{font-family:'Gotham Fallback';font-weight:300;font-style:normal;size-adjust:110%;ascent-override:70.91%;descent-override:20%;line-gap-override:0%;
  unicode-range:U+20-7E,U+A0-A5,U+A7-AB,U+AE-B1,U+B4-B8,U+BA-BB,U+BF-D6,U+D8-F6,U+F8-FF,U+131,U+141-142,U+152-153,U+160-161,U+178,U+17D-17E,U+192,U+2C6-2C7,U+2C9,U+2D8-2DD,U+3A9,U+3BC,U+3C0,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2122,U+2215,U+221A,U+2248,U+F8FF,U+FB01-FB02;
  src:local('Arial'),local('ArialMT'),local('Liberation Sans'),local('LiberationSans'),local('Arimo'),local('Helvetica'),local('Roboto')}
@font-face{font-family:'Gotham Fallback';font-weight:400;font-style:normal;size-adjust:111%;ascent-override:70.27%;descent-override:19.82%;line-gap-override:0%;
  unicode-range:U+20-7E,U+A0-A5,U+A7-AB,U+AE-B1,U+B4-B8,U+BA-BB,U+BF-D6,U+D8-F6,U+F8-FF,U+131,U+141-142,U+152-153,U+160-161,U+178,U+17D-17E,U+192,U+2C6-2C7,U+2C9,U+2D8-2DD,U+3A9,U+3BC,U+3C0,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2122,U+2215,U+221A,U+2248,U+F8FF,U+FB01-FB02;
  src:local('Arial'),local('ArialMT'),local('Liberation Sans'),local('LiberationSans'),local('Arimo'),local('Helvetica'),local('Roboto')}
@font-face{font-family:'Gotham Fallback';font-weight:400;font-style:italic;size-adjust:110.9%;ascent-override:70.33%;descent-override:19.84%;line-gap-override:0%;
  unicode-range:U+20-7E,U+A0-A5,U+A7-AB,U+AE-B1,U+B4-B8,U+BA-BB,U+BF-D6,U+D8-F6,U+F8-FF,U+131,U+141-142,U+152-153,U+160-161,U+178,U+17D-17E,U+192,U+2C6-2C7,U+2C9,U+2D8-2DD,U+3A9,U+3BC,U+3C0,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2122,U+2215,U+221A,U+2248,U+F8FF,U+FB01-FB02;
  src:local('Arial Italic'),local('Arial-ItalicMT'),local('Liberation Sans Italic'),local('LiberationSans-Italic'),local('Arimo Italic'),local('Helvetica Oblique'),local('Roboto Italic')}
@font-face{font-family:'Gotham Fallback';font-weight:500;font-style:normal;size-adjust:105.6%;ascent-override:73.86%;descent-override:20.83%;line-gap-override:0%;
  unicode-range:U+20-7E,U+A0-A5,U+A7-AB,U+AE-B1,U+B4-B8,U+BA-BB,U+BF-D6,U+D8-F6,U+F8-FF,U+131,U+141-142,U+152-153,U+160-161,U+178,U+17D-17E,U+192,U+2C6-2C7,U+2C9,U+2D8-2DD,U+3A9,U+3BC,U+3C0,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2122,U+2215,U+221A,U+2248,U+F8FF,U+FB01-FB02;
  src:local('Arial Bold'),local('Arial-BoldMT'),local('Liberation Sans Bold'),local('LiberationSans-Bold'),local('Arimo Bold'),local('Helvetica Bold'),local('Roboto Bold')}
@font-face{font-family:'Gotham Fallback';font-weight:700;font-style:normal;size-adjust:107.2%;ascent-override:72.76%;descent-override:20.52%;line-gap-override:0%;
  unicode-range:U+20-7E,U+A0-A5,U+A7-AB,U+AE-B1,U+B4-B8,U+BA-BB,U+BF-D6,U+D8-F6,U+F8-FF,U+131,U+141-142,U+152-153,U+160-161,U+178,U+17D-17E,U+192,U+2C6-2C7,U+2C9,U+2D8-2DD,U+3A9,U+3BC,U+3C0,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2122,U+2215,U+221A,U+2248,U+F8FF,U+FB01-FB02;
  src:local('Arial Bold'),local('Arial-BoldMT'),local('Liberation Sans Bold'),local('LiberationSans-Bold'),local('Arimo Bold'),local('Helvetica Bold'),local('Roboto Bold')}
@font-face{font-family:'Gotham Fallback Medium';font-weight:100 900;font-style:normal;size-adjust:105.6%;ascent-override:73.86%;descent-override:20.83%;line-gap-override:0%;
  unicode-range:U+20-7E,U+A0-A5,U+A7-AB,U+AE-B1,U+B4-B8,U+BA-BB,U+BF-D6,U+D8-F6,U+F8-FF,U+131,U+141-142,U+152-153,U+160-161,U+178,U+17D-17E,U+192,U+2C6-2C7,U+2C9,U+2D8-2DD,U+3A9,U+3BC,U+3C0,U+2013-2014,U+2018-201A,U+201C-201E,U+2020-2022,U+2026,U+2030,U+2039-203A,U+2122,U+2215,U+221A,U+2248,U+F8FF,U+FB01-FB02;
  src:local('Arial Bold'),local('Arial-BoldMT'),local('Liberation Sans Bold'),local('LiberationSans-Bold'),local('Arimo Bold'),local('Helvetica Bold'),local('Roboto Bold')}

/* 0b. density: one compact, minimal card system (owner 2026-10-16: "las tarjetas las veo muy grandes ... optimicemos el espacio"). Every card
   family of the portal (the boards' cards and rows, the chart kit's tiles and chart cards, /video/'s cards, tiles, folds, metrics, tables)
   takes its padding, gaps, corner, title and body size from these tokens, so the whole portal tightens or loosens as one. --hub-density is
   the Appearance drawer's "Card size" slider (85%-115%, step 5, 100% = this compact default), remembered per browser in
   localStorage "hub.density.v1" and put on <html> by the BOOT script before the first paint (no layout jump).
   Second compact pass (owner 2026-10-19, "más compactas"): 100% is tighter again (pad 16->13, pad-x 20->16, head 12->10, gap 14->12,
   radius 14->12, title 15->14, icon 28->24, tile pad 14->11, row 9->7), and the page head (--page-title-size, 24->19; --page-lede-size,
   14->12.5) and the stat tiles' figures (--stat-fig-max 40->30, --stat-fig-sm-max 26->21) join the scale. Every type token has an
   11px floor (max()), so the slider's 85% never puts a card's text under 11px. */
:root{--hub-density:1;
  --card-pad:calc(13px * var(--hub-density));--card-pad-x:calc(16px * var(--hub-density));--card-head-pad:calc(10px * var(--hub-density));
  --card-gap:calc(12px * var(--hub-density));--page-gap:calc(14px * var(--hub-density));
  --card-radius:calc(12px * var(--hub-density));--tile-radius:calc(10px * var(--hub-density));
  --card-title-size:max(11px,calc(14px * var(--hub-density)));--card-body-size:max(11px,calc(13px * var(--hub-density)));
  --card-icon:calc(24px * var(--hub-density));--tile-pad:calc(11px * var(--hub-density));--row-pad:calc(7px * var(--hub-density));
  --page-title-size:max(16px,calc(19px * var(--hub-density)));--page-lede-size:max(11px,calc(12.5px * var(--hub-density)));
  --stat-fig-max:calc(30px * var(--hub-density));--stat-fig-sm-max:calc(21px * var(--hub-density))}

/* 1. the wallpaper: html holds the wallpaper's own first colour for the first paint and for the bounce past either end of a
   page (--hub-canvas, set per preset and mode by hub-backgrounds.css; Coral's colours are the fallbacks), .bg (five blurred
   shapes) sits at the back. Nothing else may paint html or the body: the body stays transparent over .bg. */
html{background:var(--hub-canvas,#f8f4ee)}
html[data-theme=dark]{background:var(--hub-canvas,#101a20)}
html[data-theme=light]{color-scheme:light}
html[data-theme=dark]{color-scheme:dark}
html[data-theme] body{background:transparent}
html[data-theme] .bg{z-index:-1}

/* 2. the glass: ONE recipe for the whole portal (the Studio and the Video Hub both read this file, and nothing else defines a blur).
   A CARD (a panel, a tile, a row, a stat, a chart card) is a translucent fill over the wallpaper, a hairline of light on its edge and
   a soft shadow: --glass / --glass-tile / --glass-edge / --glass-shadow. It has NO backdrop-filter. Measured: a blur on every card
   (up to 132 per page) cost 14-44 frames over 17 ms in a 10 s scroll on a machine without GPU compositing (a remote desktop, a VM,
   an old laptop) and nothing measurable with one; the wallpaper behind a card is a smooth field of colour, so the blur added almost
   nothing to the look and the fill does the same job.
   A FLOATING LAYER (the sidebar's flyouts and account menu, the Appearance drawer, a side panel, a toast, a modal's scrim, the one sticky
   bar) overlaps other content, so there the blur earns its cost. It comes only through the tokens below, which are `none` below 901 px,
   in a browser without backdrop-filter, and under prefers-reduced-transparency; the layer's fill (--glass-float, --ht-bar) is nearly
   solid exactly when the blur is off. Two blurred surfaces are never nested: a modal's scrim blurs, the sheet inside it does not. */
html[data-theme=light]{
  --glass:rgba(255,255,255,.8);--glass-strong:rgba(255,255,255,.92);--glass-edge:rgba(255,255,255,.72);
  --glass-rule:rgba(19,48,66,.1);--glass-tile:rgba(255,255,255,.62);
  --glass-shadow:var(--hub-shadow);
  --glass-float:rgba(255,255,255,.97);--ht-bar:rgba(246,241,234,.97);--ht-scrim:rgba(19,48,66,.28)}
html[data-theme=dark]{
  --glass:rgba(15,40,56,.8);--glass-strong:rgba(13,33,46,.94);--glass-edge:rgba(255,255,255,.1);
  --glass-rule:rgba(255,255,255,.1);--glass-tile:rgba(255,255,255,.06);
  --glass-shadow:var(--hub-shadow);
  --glass-float:rgba(13,33,46,.97);--ht-bar:rgba(8,22,32,.97);--ht-scrim:rgba(0,0,0,.5)}
/* the blur gate: the ONLY place a blur is defined. --glass-blur is for layers, --glass-scrim-blur for the full-screen scrim behind a
   modal, --ht-bar-blur for the sticky bar (a 90% fill over a 20px blur: a thinner fill let the content that scrolls under the bar show
   through as a pale ghost that slides behind the title). */
:root{--glass-blur:none;--glass-scrim-blur:none;--ht-bar-blur:none}
@media (min-width:901px){
  @supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
    :root{--glass-blur:blur(24px) saturate(140%);--glass-scrim-blur:blur(6px);--ht-bar-blur:blur(20px) saturate(1.2)}
    html[data-theme=light]{--glass-float:rgba(255,255,255,.8);--ht-bar:rgba(246,241,234,.90)}
    html[data-theme=dark]{--glass-float:rgba(13,33,46,.8);--ht-bar:rgba(8,22,32,.90)}
  }
}
@media (prefers-reduced-transparency:reduce){
  :root{--glass-blur:none;--glass-scrim-blur:none;--ht-bar-blur:none}
  html[data-theme=light]{--glass-float:rgba(255,255,255,.97);--ht-bar:rgba(246,241,234,.97)}
  html[data-theme=dark]{--glass-float:rgba(13,33,46,.97);--ht-bar:rgba(8,22,32,.97)}
}

/* 2b. the glass over a SOLID background (White, Off white, Bone; owner 2026-10-16). A flat colour has nothing for the glass to be
   glass against: a white fill with a light edge disappears on white. Over a solid the card is an (almost) opaque surface with a navy
   hairline and a low, soft shadow; the tile and the rule are a touch firmer (the chart kit's stat tile, --hc-tile, a 55% white
   that vanishes on a white card, takes the same tile tint, and the
   kit's 'bad' ink steps from #b83d34 to #ad3830 so a red delta badge on that tinted tile stays above 4.5:1 on Bone: 4.87 vs 4.39); the sticky bar and the floating layers take the page's own
   colour. Dark: neutral graphite surfaces (no navy cast over a charcoal page), a white hairline at 9%. --card-shadow and --dk-surface are
   the Studio's names for the same two things (build.py, theme_sheet.py), so they follow. Specificity (0,2,1) beats the per-mode recipe
   above and the Studio's dark sheet, whatever the order the sheets load in. */
html[data-theme=light]:is([data-bg=white],[data-bg=offwhite],[data-bg=bone]){
  --glass:#ffffff;--glass-strong:#ffffff;--glass-edge:rgba(19,48,66,.11);--glass-rule:rgba(19,48,66,.1);--glass-tile:rgba(19,48,66,.035);
  --glass-shadow:var(--hub-shadow);--card-shadow:var(--hub-shadow);
  --glass-float:rgba(255,255,255,.98);--ht-bar:rgba(255,255,255,.94);--ht-scrim:rgba(19,48,66,.22);
  --hc-tile:var(--glass-tile);--hc-bad:#ad3830}
html[data-theme=light][data-bg=offwhite]{--ht-bar:rgba(247,246,242,.94)}
html[data-theme=light][data-bg=bone]{--glass:#fbf9f5;--glass-strong:#fdfcf9;--ht-bar:rgba(236,229,216,.94);--glass-float:rgba(253,252,249,.98);
  --canvas-muted:#4f6262}
/* --canvas-muted: muted ink set straight on the page canvas (the area tabs). Bone is the darkest light canvas: #586c6c on #ece5d8 is
   4.44:1, under 4.5, so there it steps down to #4f6262 (5.15:1). Undefined everywhere else, so the rule's own fallback (and, in dark,
   the Studio dark sheet's mapped fallback) applies. */
html[data-theme=dark]:is([data-bg=white],[data-bg=offwhite],[data-bg=bone]){
  --glass:#1d1f22;--glass-strong:#212327;--glass-edge:rgba(255,255,255,.09);--glass-rule:rgba(255,255,255,.1);--glass-tile:rgba(255,255,255,.05);
  --glass-shadow:var(--hub-shadow);--card-shadow:var(--hub-shadow);
  --dk-surface:#1d1f22;--dk-surface-2:rgba(255,255,255,.06);
  --glass-float:rgba(29,31,34,.98);--ht-bar:rgba(19,20,22,.95);--ht-scrim:rgba(0,0,0,.55)}
html[data-theme=dark][data-bg=offwhite]{--glass:#26282b;--glass-strong:#2a2c30;--dk-surface:#26282b;--glass-float:rgba(38,40,43,.98);--ht-bar:rgba(28,29,31,.95)}
html[data-theme=dark][data-bg=bone]{--glass:#2a2520;--glass-strong:#2e2924;--dk-surface:#2a2520;--glass-float:rgba(42,37,32,.98);--ht-bar:rgba(32,28,24,.95)}

/* 2c. THE card shadow (owner 2026-11-08: "un dropshadow a todas las fichas, sutil y no tan difuminado"). ONE token pair for every card of
   the portal, both halves, the sidebar's panel included: --hub-shadow (a card, a panel, a stat), --hub-shadow-sm (a tile, a small
   button or chip that stands on a card), and --hub-drop, the same shadow as a filter for a shape a box-shadow cannot follow (the folder
   cards: the tab and its S-curve shoulder). A hairline, a 2px contact shadow and one short fall of 10px: no haze, no glow. Light,
   dark, and over a solid (White, Off white, Bone) the hairline is a touch firmer so a white card holds on white. Every older recipe
   (--glass-shadow, --card-shadow, the Movara --mv-shadow / --mv-fold, the Video Hub's --cg-shadow and --card-sh, the chart kit's
   --hc-card-shadow, Create's --bx-drop, the sidebar's --hr-sh-panel) points here. The floating layers (menus, drawers, modals, toasts)
   keep a larger shadow of their own: they float, a card does not. */
:root{
  --hub-shadow:0 0 0 1px rgba(19,32,42,.05),0 1px 2px rgba(19,32,42,.07),0 4px 10px -3px rgba(19,32,42,.14);
  --hub-shadow-sm:0 0 0 1px rgba(19,32,42,.05),0 1px 2px rgba(19,32,42,.08);
  --hub-drop:drop-shadow(0 0 .5px rgba(19,32,42,.22)) drop-shadow(0 1px 1.5px rgba(19,32,42,.07)) drop-shadow(0 4px 5px rgba(19,32,42,.09))}
html[data-theme=dark]{
  --hub-shadow:0 0 0 1px rgba(255,255,255,.05),0 1px 2px rgba(0,0,0,.45),0 5px 12px -3px rgba(0,0,0,.5);
  --hub-shadow-sm:0 0 0 1px rgba(255,255,255,.06),0 1px 2px rgba(0,0,0,.4);
  --hub-drop:drop-shadow(0 0 .5px rgba(255,255,255,.16)) drop-shadow(0 1px 1.5px rgba(0,0,0,.4)) drop-shadow(0 5px 6px rgba(0,0,0,.38))}
html[data-theme=light]:is([data-bg=white],[data-bg=offwhite],[data-bg=bone]){
  --hub-shadow:0 0 0 1px rgba(19,48,66,.09),0 1px 2px rgba(19,32,42,.07),0 4px 10px -3px rgba(19,32,42,.12);
  --hub-shadow-sm:0 0 0 1px rgba(19,48,66,.08),0 1px 2px rgba(19,32,42,.07);
  --hub-drop:drop-shadow(0 0 .5px rgba(19,48,66,.36)) drop-shadow(0 1px 1.5px rgba(19,32,42,.07)) drop-shadow(0 4px 5px rgba(19,32,42,.08))}
html[data-theme=dark]:is([data-bg=white],[data-bg=offwhite],[data-bg=bone]){
  --hub-shadow:0 0 0 1px rgba(255,255,255,.07),0 1px 2px rgba(0,0,0,.4),0 5px 12px -3px rgba(0,0,0,.5);
  --hub-shadow-sm:0 0 0 1px rgba(255,255,255,.07),0 1px 2px rgba(0,0,0,.35);
  --hub-drop:drop-shadow(0 0 .5px rgba(255,255,255,.3)) drop-shadow(0 1px 1.5px rgba(0,0,0,.4)) drop-shadow(0 5px 6px rgba(0,0,0,.36))}

/* 3. ink: text straight on the wallpaper (the sidebar and the cards carry their own) */
html[data-theme=light]{--ht-ink:#0d2330;--ht-wall:rgba(19,48,66,.8);--ht-body:rgba(19,48,66,.8);--ht-muted:rgba(19,48,66,.75);--ht-accent:#98291f}
html[data-theme=dark]{--ht-ink:#fff;--ht-wall:rgba(255,255,255,.88);--ht-body:rgba(255,255,255,.66);--ht-muted:#a9c0c0;--ht-accent:#ff8d84}

/* 3a. buttons (owner rule 2026-10-14: no button is coral; buttons are navy, or sage when a second colour is needed).
   Every clickable in the portal (button, button-styled link, segmented control, selectable chip or card, FAB, sheet or modal action)
   reads its colour from these tokens; coral stays only on things that are not clickable (accents, rules, badges, alerts, the loader).
   primary   = navy fill, white text (dark: a lifted navy, so the fill still reads on the dark glass; white text 7.0:1)
   secondary = deep sage fill, white text (5.1:1; the brand sage #7e9898 is only 3.1:1 with white)
   ghost     = transparent, navy text and edge (dark: white)
   --btn-edge = the ring of a selected chip/card/tab and a hovered outline; --btn-hover-edge/--btn-hover-tint = the quiet hover;
   --btn-focus = the keyboard ring (navy on light, white on dark). Destructive actions use ghost or primary plus a confirm, never red.
   A lift (translate/shadow) belongs only inside @media (hover:hover) and (pointer:fine); these tokens change colour only. */
:root,html[data-theme=light]{
  --btn-primary-bg:#133042;--btn-primary-hover:#1e4058;--btn-primary-active:#0d2330;--btn-primary-ink:#fff;
  --btn-secondary-bg:#587373;--btn-secondary-hover:#4f6a6a;--btn-secondary-ink:#fff;
  --btn-ghost-ink:#133042;--btn-ghost-edge:rgba(19,48,66,.55);--btn-ghost-hover-bg:rgba(19,48,66,.06);
  --btn-edge:#133042;--btn-hover-edge:rgba(19,48,66,.42);--btn-hover-tint:rgba(19,48,66,.05);--btn-glow:rgba(19,48,66,.26);
  --btn-focus:#133042;--btn-focus-halo:rgba(19,48,66,.14);--btn-disabled-bg:rgba(19,48,66,.12);--btn-disabled-ink:rgba(19,48,66,.5);--btn-link:#133042}
html[data-theme=dark]{
  --btn-primary-bg:#2f5d7c;--btn-primary-hover:#386886;--btn-primary-active:#2b5876;--btn-primary-ink:#fff;
  --btn-secondary-bg:#587373;--btn-secondary-hover:#4f6a6a;--btn-secondary-ink:#fff;
  --btn-ghost-ink:#fff;--btn-ghost-edge:rgba(255,255,255,.6);--btn-ghost-hover-bg:rgba(255,255,255,.08);
  --btn-edge:#fff;--btn-hover-edge:rgba(255,255,255,.45);--btn-hover-tint:rgba(255,255,255,.06);--btn-glow:rgba(0,0,0,.34);
  --btn-focus:#fff;--btn-focus-halo:rgba(255,255,255,.18);--btn-disabled-bg:rgba(255,255,255,.1);--btn-disabled-ink:rgba(255,255,255,.5);--btn-link:#d6e4e4}

/* 3b. a page that scrolls under a still pointer: hover is instant, never animated. html.is-scrolling is set by hub-theme.js (and by the
   chart kit) from the first scroll event to 140 ms after the last. Every card, tile, row, chip and button that slides under the
   pointer would otherwise start (and then reverse) a colour transition, and each of those restyles and repaints a blurred layer
   for its whole length: 25-70 frames over 17 ms in a 10 s scroll on a page of calendar chips or file tiles. The sidebar and the
   Appearance panel are not in the list (they do not move while the page does). */
html.is-scrolling :is(a,button,summary,label,[role=button],[tabindex],.card,.tile,.fold,.metric,.cat,.use,.pcard,.hn-card,.hn-post,.hn-row,
  .cal-chip,.cal-day,.bank-card,.link-card,.sbd-card,.vp-card,.rv-card,.acc-h,.hc-press,.hc-row,.hc-dl):not(.hr-scope *,.ht-wrap *){transition:none!important}

/* 4. the Appearance panel */
.ht-wrap{--htp:var(--glass-float,#fff);font-family:'Inter','Segoe UI',system-ui,-apple-system,Arial,sans-serif}
.ht-scrim{position:fixed;inset:0;background:var(--ht-scrim,rgba(19,48,66,.28));opacity:0;transition:opacity .2s;z-index:1200}
.ht-panel{position:fixed;top:0;right:0;bottom:0;width:min(400px,94vw);z-index:1201;overflow:auto;padding:26px 24px 32px;
  background:var(--htp);-webkit-backdrop-filter:var(--glass-blur,none);backdrop-filter:var(--glass-blur,none);
  border-left:1px solid var(--glass-edge,rgba(255,255,255,.6));color:var(--ht-ink,#0d2330);
  box-shadow:-24px 0 60px rgba(13,35,48,.22);transform:translateX(100%);transition:transform .32s cubic-bezier(.42,0,.58,1)}
.ht-wrap.in .ht-scrim{opacity:1}
.ht-wrap.in .ht-panel{transform:none}
.ht-panel header{display:flex;gap:12px;align-items:flex-start}
.ht-panel header>div{flex:1}
.ht-panel em{font-style:normal;font-size:11px;letter-spacing:2px;text-transform:uppercase;color:var(--ht-muted,#586c6c)}
.ht-panel h3{margin:6px 0 0;font-size:22px;font-weight:var(--fw-strong,500);color:var(--ht-ink,#0d2330)}
.ht-panel header p{margin:8px 0 0;font-size:13px;line-height:1.5;color:var(--ht-body,#586c6c)}
.ht-x{border:0;background:none;color:var(--ht-body,#586c6c);cursor:pointer;padding:4px;border-radius:8px}
.ht-h{margin:24px 0 10px;font-size:11px;font-weight:var(--fw-strong,500);letter-spacing:1.6px;text-transform:uppercase;color:var(--ht-muted,#586c6c)}
.ht-seg{display:flex;gap:4px;padding:4px;border-radius:14px;background:var(--glass-tile,rgba(19,48,66,.06));
  box-shadow:inset 0 0 0 1px var(--glass-rule,rgba(19,48,66,.1))}
.ht-seg button{flex:1;border:0;border-radius:10px;padding:9px 8px;font:inherit;font-size:13px;font-weight:var(--fw-medium,500);cursor:pointer;
  background:none;color:var(--ht-body,#586c6c)}
.ht-seg button:hover{color:var(--ht-ink,#0d2330)}
.ht-seg button[aria-pressed=true]{background:var(--btn-primary-bg,#133042);color:var(--btn-primary-ink,#fff);font-weight:var(--fw-strong,500)}
.ht-sws{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.ht-sw{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 6px 10px;border:0;border-radius:14px;cursor:pointer;
  background:var(--glass-tile,rgba(19,48,66,.06));box-shadow:inset 0 0 0 1px var(--glass-rule,rgba(19,48,66,.1));
  font:inherit;color:var(--ht-body,#586c6c)}
.ht-sw b{font-size:12.5px;font-weight:var(--fw-medium,500)}
.ht-sw .bg-swatch{width:44px;height:44px}
@media (hover:hover) and (pointer:fine){.ht-sw:hover{box-shadow:inset 0 0 0 1px var(--ht-body,#586c6c)}}
.ht-sw[aria-pressed=true]{color:var(--ht-ink,#0d2330);box-shadow:inset 0 0 0 2px var(--btn-edge,#133042)}
.ht-sw[aria-pressed=true] b{font-weight:var(--fw-strong,500)}
.ht-panel button:focus-visible{outline:2px solid var(--btn-focus,#133042);outline-offset:2px}
@media (prefers-reduced-motion:reduce){.ht-scrim,.ht-panel{transition:none}}
/* the "Card size" slider (density): a native range, so arrows, Page Up/Down, Home and End work; the value is read out as a percentage */
.ht-dens{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:14px;background:var(--glass-tile,rgba(19,48,66,.06));
  box-shadow:inset 0 0 0 1px var(--glass-rule,rgba(19,48,66,.1))}
.ht-dens input{flex:1;min-width:0;margin:0;accent-color:var(--btn-primary-bg,#133042);height:28px;cursor:pointer}
.ht-dens output{flex:none;min-width:44px;text-align:right;font-size:13px;font-weight:var(--fw-medium,500);font-variant-numeric:tabular-nums;color:var(--ht-ink,#0d2330)}
.ht-dens button{flex:none;border:1px solid var(--btn-ghost-edge,rgba(19,48,66,.55));background:none;color:var(--btn-ghost-ink,#133042);border-radius:100px;
  height:30px;padding:0 12px;font:inherit;font-size:12.5px;font-weight:var(--fw-medium,500);cursor:pointer}
.ht-dens button:disabled{opacity:.45;cursor:default}
@media (hover:hover) and (pointer:fine){.ht-dens button:not(:disabled):hover{background:var(--btn-ghost-hover-bg,rgba(19,48,66,.06))}}
.ht-dens input:focus-visible{outline:2px solid var(--btn-focus,#133042);outline-offset:2px;border-radius:6px}
.ht-dens-note{margin:8px 2px 0;font-size:12px;line-height:1.45;color:var(--ht-body,#586c6c)}
