/* THEMES (Jay, 2026-11-09: "built it as a light theme colour choice and we can add other colour choices as well").
   Every colour, radius and alignment that differs between looks is a variable. :root is "Dark", the look as it was on
   2026-11-05, value for value; [data-theme="light"] is "Light", the Essentials brief's values (section 2, from the mock).
   The renderer sets data-theme on <html> from the person's Theme setting or the page's theme_default; the server-rendered
   account and admin pages set it from the person's setting. A third theme is a third block here and a third entry in
   app.js's THEMES. No rule below names a colour of its own. */
:root, [data-theme="dark"] {
  --bg: #0f0f10;                       /* the page ground */
  --surface: rgb(20, 20, 20);          /* a tile, the rail, the controls bar */
  --surface-2: #1a1a1b;                /* a control's fill */
  --code-bg: #141415;
  --border: rgba(255, 255, 255, .06);  /* a tile's hairline */
  --line: rgba(255, 255, 255, .12);    /* a control's border, a table rule */
  --line-strong: rgba(255, 255, 255, .18);
  --line-hover: rgba(255, 255, 255, .3);
  --text: #e6e6e6;
  --text-2: #9FB3C8;                   /* secondary: labels, the header's second line */
  --note: rgba(230, 230, 230, .65);    /* a tile's note, small print */
  --faint: rgba(230, 230, 230, .5);
  --accent: #4FB3D1;
  --accent-ink: #0f0f10;               /* text on the accent */
  --title: #4FB3D1;                    /* a tile's title */
  --title-align: center;
  --card-title: #e6e6e6;
  --pill-strip: transparent;
  --pill-ink: #e6e6e6;
  --pill-on: #4FB3D1;
  --pill-on-ink: #0f0f10;
  --window-edge: var(--text-2);        /* the date range's window and handles (brief 56 b): the pale slate, since --pill-on here is the bars' own blue */
  --window-yellow: rgba(245, 212, 98, .85); --window-grip: rgba(15, 15, 16, .5);   /* brief 59 x, the yellow lighter and a touch clear since 59 aa (#E3B341 in 59 x) */
  --pill-radius: 6px;
  --radius: 8px;                       /* a tile's corner */
  --rail-bg: rgb(20, 20, 20);
  --rail-ink: #9FB3C8;
  --rail-on-bg: rgba(79, 179, 209, .14);
  --rail-on-ink: #4FB3D1;
  --sec-label-bg: rgba(79, 179, 209, .07);
  --sec-label-border: rgba(79, 179, 209, .35);
  --sec-label-ink: #4FB3D1;
  --zebra: rgba(255, 255, 255, .03);
  --drawer-shadow: -12px 0 40px rgba(0, 0, 0, .55);
  --blue: #4FB3D1;
  --gold: #D4A017;
  --green: #2FBF71;
  --red: #E04355;
  --greyblue: #9FB3C8;
  --amber: #F1C40F;
  --grey: #8a8f98;
  --good: #2FBF71;
  --bad: #E04355;
  --badge-good-bg: rgba(47, 191, 113, .14);
  --badge-good-ink: #2FBF71;
  --badge-bad-bg: rgba(224, 67, 85, .14);
  --badge-bad-ink: #E04355;
  --card-tint: #121213;                /* a figure card's text column: one quiet step darker than the card (brief 9.4 a) */
  --card-title-band: #161D20;          /* a figure card's title band: a pale step of the theme's blue over --card-tint, rgba(79,179,209,.07) on #121213 since brief 59 oo (Jay, on Dark: "make the background on the top left of the cards much more transparent ... so they don't overwhelm teh page"); .14 (#1B292E) from 9.21 b */
  --badge-flat-bg: rgba(255, 255, 255, .05);   /* a flat badge band (brief 9.4 b) */
  --tab-label-bg: rgba(79, 179, 209, .14);
  --tab-label-ink: #4FB3D1;
  --knob: #e6e6e6;                     /* a toggle's knob, off */
  --gap: 14px;                         /* the one gap: between tiles, between rows, under a section title */
}
[data-theme="light"] {
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-2: #FFFFFF;
  --code-bg: #F4F5F7;
  --border: #E3E6EA;
  --line: #E3E6EA;
  --line-strong: #D5DAE0;
  --line-hover: #B9C0C8;
  --text: #1F2933;
  --text-2: #5B6672;
  --note: #5B6672;
  --faint: #8A94A0;
  --accent: #3C7FB1;
  --accent-ink: #FFFFFF;
  --title: #1F2933;
  --title-align: left;
  --card-title: #1F2933;
  --pill-strip: #FFFFFF;
  --pill-ink: #5B6672;
  --pill-on: #2F4858;
  --pill-on-ink: #FFFFFF;
  --window-edge: var(--pill-on);       /* the date range's window and handles (brief 56 b): the selected pills' slate */
  --window-yellow: rgba(245, 212, 98, .85); --window-grip: rgba(47, 72, 88, .6);   /* brief 59 x, the yellow lighter and a touch clear since 59 aa (Jay: "a little lighter ... less mustard but also give it a little transparency"; #E3B341 in 59 x) */
  --pill-radius: 999px;
  --radius: 14px;
  --rail-bg: #FFFFFF;
  --rail-ink: #5B6672;
  --rail-on-bg: #E8F1F8;
  --rail-on-ink: #2A5577;
  --sec-label-bg: #FFFFFF;
  --sec-label-border: #E3E6EA;
  --sec-label-ink: #5B6672;
  --zebra: #F8F9FA;
  --drawer-shadow: none;
  --blue: #3C7FB1;
  --gold: #A86B12;
  --green: #1F7A4D;
  --red: #B23B3B;
  --greyblue: #5B6672;
  --amber: #B7791F;
  --grey: #6B7480;
  --good: #1F7A4D;
  --bad: #B23B3B;
  --badge-good-bg: #E3F4EA;
  --badge-good-ink: #1F6E43;
  --badge-bad-bg: #FBE6E4;
  --badge-bad-ink: #9E3B36;
  --card-tint: #F7F8FA;                /* between the card's white and the page ground #F4F5F7, visible but quiet (brief 9.4 a) */
  --card-title-band: #E8F1F8;          /* a figure card's title band: a pale step of the theme's blue #3C7FB1, quieter than the badge bands (brief 9.21 b) */
  --badge-flat-bg: #EDEFF2;
  --tab-label-bg: #E8F1F8;
  --tab-label-ink: #2A5577;
  --knob: #FFFFFF;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; font-size: 14px; }
h1, h2, h3 { font-weight: 600; }

/* the app's frame: the icon rail at the left, the page beside it (2026-11-09); at a narrow window the rail wraps above */
body.app { display: flex; align-items: flex-start; min-height: 100vh; }
.main { flex: 1 1 auto; min-width: 0; max-width: 1500px; padding: 22px 28px 40px; }
.tight-foot .main { padding-bottom: 12px; }                   /* brief 59 u: Essentials ends 12px under its last tile (54 before) */
.tight-foot #page > .sec:last-child { margin-bottom: 0; }
.rail { position: sticky; top: 0; flex: 0 0 76px; width: 76px; height: 100vh; background: var(--rail-bg); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0; overflow-y: auto; }
.rail-item { width: 64px; padding: 8px 0; border-radius: 10px; color: var(--rail-ink); text-decoration: none; display: flex; flex-direction: column;
  align-items: center; gap: 4px; font-size: 11px; font-weight: 500; text-align: center; line-height: 1.2; }
.rail-item:hover { color: var(--text); }
.rail-item.on { background: var(--rail-on-bg); color: var(--rail-on-ink); }
.rail-item.broken { color: var(--bad); }
.rail-item:focus-visible { outline: 1.5px solid var(--accent); outline-offset: -1px; }
.rail-fill { flex: 1 1 auto; }
@media (max-width: 900px) {
  body.app { flex-direction: column; }
  .rail { position: static; width: 100%; height: auto; flex: 0 0 auto; flex-direction: row; flex-wrap: wrap; justify-content: center; border-right: 0; border-bottom: 1px solid var(--border); padding: 8px; }
  .rail-fill { display: none; }
  .main { width: 100%; padding: 16px; }
}

/* header: "<club> · <title>" and the second line (scope note, data through) at the left; the owner's viewing notice right */
.top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--gap); gap: 24px; }
.hdr-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hdr-title { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.hdr-dot { color: var(--faint); font-weight: 400; }
.hdr-sub { margin: 0; color: var(--text-2); font-size: 12px; }
.hdr-user { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.hdr-user .who { color: var(--text); }
/* the page's controls on the title's line (brief 9.14; PAGE "controls_in_header"): right of the title, a step smaller, the
   label beside its pills; where the line cannot hold them they wrap as a group under the title, never over it */
.controls-in-header .hdr-left { flex: 1 1 auto; }
.hdr-line { display: flex; flex-wrap: wrap; align-items: center; column-gap: 20px; row-gap: 8px; min-width: 0; }
/* brief 59 h: the page's controls at the right of the header's line (PAGE "controls_right"), and the cards' month in the title */
.controls-right .hdr-line .controls { margin-left: auto; }
.hdr-month { font-weight: 600; }
.hdr-month:empty, .hdr-month-dot:has(+ .hdr-month:empty) { display: none; }
.hdr-line .controls { margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; gap: 8px 12px; align-items: center; flex-wrap: wrap; }
.hdr-line .ctl { flex-direction: row; align-items: center; gap: 5px; }
.hdr-line .ctl-label { font-size: 10px; }
/* brief 59 aa (Jay 2026-11-11: "when it's off a grey "OFF" Sits belwo the toggle and when you turn it on that off goes away and a blue
   "On" shows up above the toggle ... it kinda looks like show values is selcted since when the button is in the off possition it's next to
   the thing that says show values"): a header switch says its state in small capitals, OFF in the note grey under it, ON in the accent
   blue over it, standing out of the line's flow so the header keeps its height */
.hdr-line .toggle::after { content: 'OFF'; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 1px;
  font-size: 8px; line-height: 9px; font-weight: 600; letter-spacing: .08em; color: var(--note); pointer-events: none; }
.hdr-line .toggle:has(input:checked)::after { content: 'ON'; top: auto; bottom: 100%; margin: 0 0 1px; color: var(--accent); }
.hdr-line .seg button, [data-theme="light"] .hdr-line .seg button { font-size: 11.5px; padding: 5px 8px; }   /* 24px tall: still a comfortable target */
.hdr-user .viewing { color: var(--gold); font-weight: 600; }
.hdr-user form { display: inline; margin: 0; }

/* a tile is a column: head, controls, body, SQL foot pinned to the bottom so tiles in a row end level;
   it is also a size container so a card's figures scale with the tile's width (CONVENTIONS B) */
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; position: relative; min-width: 0; display: flex; flex-direction: column; container-type: inline-size; }

/* controls bar (one line, wrapping) and the tile's own controls */
.controls { display: flex; gap: 22px; align-items: flex-end; padding: 12px 18px; margin-bottom: var(--gap); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); flex-wrap: wrap; }
[data-theme="light"] .controls { background: transparent; border: 0; padding: 0 0 4px; }
.ctl { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.ctl-row { flex-direction: row; align-items: center; gap: 8px; }
.search-box { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); border-radius: 6px; padding: 3px 8px; font: inherit; font-size: 12px; width: 220px; }
.search-box.bad { border-color: var(--bad); }   /* typed text that is not on the club's list: not applied */
.ctl-label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--note); white-space: nowrap; }
.ctl-label:empty { display: none; }
.ctl-live { color: var(--accent); text-transform: none; letter-spacing: 0; margin-left: 6px; font-weight: 600; }
/* the pill strip (2026-11-09): a segment, and a select or months control of five options or fewer */
.seg { display: inline-flex; background: var(--pill-strip); border: 1px solid var(--line); border-radius: var(--pill-radius); overflow: hidden; }
[data-theme="light"] .seg { padding: 3px; gap: 2px; }
.seg button { background: transparent; color: var(--pill-ink); border: 0; padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer; border-right: 1px solid var(--line); white-space: nowrap; }
[data-theme="light"] .seg button { border-right: 0; border-radius: 999px; font-size: 12px; font-weight: 500; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--pill-on); color: var(--pill-on-ink); font-weight: 600; }
/* brief 59 cc (Jay 2026-11-11: "the pickers for venue level or club level, the measure and grain on the explorer. can we make the text of
   the selected option showt the same color blu the toggle does? so it looks more like it's selected"): on the header's pickers and
   Explorer's, the chosen option a chip lightly tinted with the switch's blue (--accent), its words in that blue and its edge a fainter
   ring of it, since blue words on the dark slate pill would not read and a plain white chip vanishes on the white strip */
.hdr-line .seg button.on, .pickers-small .tile-ctls .seg button.on,
[data-theme="light"] .hdr-line .seg button.on, [data-theme="light"] .pickers-small .tile-ctls .seg button.on {
  background: color-mix(in srgb, var(--accent) 13%, var(--surface)); color: var(--accent); font-weight: 700;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
select { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font: inherit; font-size: 13px; }
select:focus, .seg button:focus-visible { outline: 1px solid var(--accent); }
.ctl-slider { min-width: 260px; }
input[type=range] { width: 240px; accent-color: var(--accent); }
.toggle { position: relative; display: inline-block; width: 34px; height: 18px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; background: var(--line-strong); border-radius: 18px; cursor: pointer; transition: background .15s; }
.toggle span::before { content: ""; position: absolute; width: 14px; height: 14px; left: 2px; top: 2px; background: var(--knob); border-radius: 50%; transition: transform .15s; }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::before { transform: translateX(16px); background: var(--accent-ink); }
/* tile controls: one line at the right of the title bar; the title stays where the theme puts it.
   When a title would run into them the renderer adds .ctls-below and the line drops under the title. */
.tile-ctls { position: absolute; right: 18px; top: 10px; display: flex; gap: 14px; white-space: nowrap; }
.tile-ctls:empty { display: none; }
.tile-ctls .ctl { flex-direction: row; align-items: center; gap: 8px; }
.tile-ctls select { padding: 3px 8px; font-size: 12px; }
.tile-ctls .seg button { padding: 3px 10px; font-size: 12px; }
.ctls-below .tile-ctls { position: static; justify-content: center; margin: 2px 0 6px; flex-wrap: wrap; row-gap: 8px; }   /* many controls (Billing History's five) wrap to a second line rather than run off the tile */
.strip-in-head.ctls-below .tile-ctls { justify-content: var(--title-align); margin: 6px 0 4px; }   /* brief 9.23: the pickers dropped under the title as one group, in the title's alignment, above the sentence */
/* brief 59 i: a tile's pickers small and close (`"pickers": "small"`, Essentials' Explorer): 10.5px words, 6px a side, no gap between
   pills, so its name and both pickers share one line at 1440 */
.pickers-small .tile-ctls { gap: 12px; }
.pickers-small .tile-ctls .ctl { gap: 6px; }
.pickers-small .tile-ctls .seg, [data-theme="light"] .pickers-small .tile-ctls .seg { padding: 2px; gap: 0; }
.pickers-small .tile-ctls .seg button, [data-theme="light"] .pickers-small .tile-ctls .seg button { font-size: 11px; padding: 2px 5px; }   /* 11px since brief 59 ll (Jay: "can we make the text for theexplorer picker a little larger?"; 10.5px with 6px a side from 59 i), the most that keeps one line at 1440 */
/* the series_set strip: Superset's "Hide values | Show values" strip, under the title, never re-querying */
.tile-strip { display: flex; justify-content: var(--title-align); margin: 0 0 8px; }
.tile-strip .seg button { padding: 3px 10px; font-size: 12px; }

/* sections: the label stands on the left, read bottom to top; the rows fill the rest (Jay, 2026-10-30). The label column is
   28px, the gap after it 10px */
.sec { margin-bottom: var(--gap); }
.sec.has-label { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; align-items: stretch; }
.sec-label { position: relative; border-radius: 6px; background: var(--sec-label-bg); border: 1px solid var(--sec-label-border); }
.sec-label span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(180deg); writing-mode: vertical-rl;
  color: var(--sec-label-ink); font-size: 14px; font-weight: 600; letter-spacing: .06em; white-space: nowrap; }
.sec-rows { min-width: 0; }
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); align-items: stretch; }
.row:last-child { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }   /* a column: tiles one above another in one grid column span */
/* a row a column holds (brief 9.12): its own grid on the column's columns, taking the column's leftover height so the bands
   end level; equal heights come from the layout, never from heights typed per tile */
.stack > .row-inner { margin: 0; flex: 1 1 auto; }
.stack > .t-figure_card { flex: 1 1 0; }                       /* the cards share the column's height equally */
/* brief 59 f: a column of rows of one height (`"rows": "equal"`): each entry a grid row of 1fr, so each is as tall as the tallest
   needs, or an equal share of the height the page's row gives the column; an unseen heading line (`heading_room`) first, so the
   tiles start level with a neighbour's tiles under its heading. A tile that fills (`fill`) gives its body what is left of it */
.stack.stack-equal { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: minmax(0, 1fr); gap: var(--gap); }
.stack.stack-equal > * { grid-column: 1 / -1 !important; }   /* a tile's own span (its width in the page's columns) makes no columns here */
.stack.stack-equal:has(> .stack-heading) { grid-template-rows: auto; }
.stack-heading.room { visibility: hidden; }
/* brief 59 p: a tile's title standing on its left, read upward, centred down the tile (`"title_side": true`; Jay 2026-11-11: "put the
   title of the heat map on the left side vertically since we have more space on the sides than up and down"), as the sections' labels
   stand (.sec-label); the body takes the rest of the width and the tile's whole height */
.tile.title-side { flex-direction: row; align-items: stretch; }
.tile.title-side > .tile-head { writing-mode: vertical-rl; transform: rotate(180deg); margin: 0 0 0 10px; text-align: center; flex: 0 0 auto; }
.tile.title-side > .tile-head h2 { white-space: nowrap; }
.tile.title-side > .body { flex: 1 1 0; min-width: 0; }
.tile.title-side > .tile-ctls:empty, .tile.title-side > .err:empty { display: none; }
.tile.title-side > .loading { position: absolute; top: 0; left: 0; right: 0; margin: 0; }
/* the "i" upright above the side title, its box reading across (brief 59 s, Jay 2026-11-11: "the information pop up on the heat map reads
   sideways. that i should be horixontal above the title and read horizontal as well"): turned back by the head's own half turn */
.tile.title-side > .tile-head .info-mark { writing-mode: horizontal-tb; transform: rotate(180deg); margin: 6px 0 0 0; }
.tile.title-side > .tile-head { position: relative; z-index: 5; }   /* its open box over the cells, not under them */
.stack.stack-equal > .row-inner { margin: 0; }
.tile.fills > .body { height: auto; flex: 1 1 0; min-height: 0; contain: size; }
.tile.t-mixed.fills > .body { min-height: 160px; }
.row-inner > .stack > .tile.compact { flex: 1 1 0; }            /* the small tiles share the heat map's height */
.row-inner > .stack > .tile.compact > .body { height: auto !important; min-height: 70px; flex: 1 1 auto; contain: size; }
@media (max-width: 900px) {   /* where the rail wraps, a layout of columns stacks in reading order (brief 9.12 d) */
  .row:has(> .stack), .row-inner { grid-template-columns: minmax(0, 1fr) !important; }
  .row:has(> .stack) > *, .row-inner > * { grid-column: 1 / -1 !important; }
  /* brief 59 f: stacked, the rows of one height are rows of their own heights again, and a filling chart keeps a plot to read */
  .stack.stack-equal { grid-auto-rows: auto; }
  .stack-heading.room { display: none; }
  .tile.t-mixed.fills > .body { min-height: 260px; }
}

/* tile head: the title (centred in the accent on Dark, left in the text colour on Light); the i and the gear hang after the
   title without moving it; the note under it */
.tile-head { text-align: var(--title-align); margin-bottom: 6px; }
.tile-head h2 { color: var(--title); font-size: 15px; font-weight: 600; margin: 0; line-height: 20px; }
.tile-head .ttl { position: relative; display: inline-block; cursor: pointer; }   /* the title opens the inspector drawer */
.tile-head .icons { position: absolute; left: 100%; top: 0; margin-left: 2px; white-space: nowrap; }
.tile-head .note { font-size: 12px; color: var(--note); margin-top: 3px; line-height: 15px; }
.info, .gear, .inspect { background: none; border: 0; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; padding: 0 2px; vertical-align: 1px; }
.info:hover, .gear:hover, .inspect:hover { color: var(--text); }
.gear, .inspect { font-size: 12px; }
.body { width: 100%; }
.t-text { padding: 8px 18px; }
.small-print { font-size: 12px; color: var(--note); text-align: center; }
.empty { color: var(--faint); font-size: 12px; text-align: center; padding: 20px; }

/* cards, form 3: title and month note centred over the tile; the i and the magnifier sit at the tile's top right,
   absolutely, so they never push the title off centre (Jay, 2026-10-30: "centred, like on the Main Hub");
   then YOY (left) | big number (centred) | MOM (right), vertically centred.
   Sizes scale with the tile (cqi) and stop at the house maximums: number 40px, side lines 13px, tag 9px (CONVENTIONS B). */
.card .tile-head { text-align: center; margin-bottom: 0; padding: 0 8px; }
.card .tile-head h2 { color: var(--card-title); font-size: clamp(13px, 5.5cqi, 17px); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* 17px on a 3-wide card; a 2-wide audit card steps down rather than wrapping, so every number in the row sits level */
.card .tile-head .ttl { position: static; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }   /* static: the icons' containing block is the tile */
.card .tile-head .icons { left: auto; right: 10px; top: 3px; margin: 0; line-height: 1; }   /* the tile's top-right corner, above the title line, so a 2-wide audit title keeps the whole width */
.card .body { flex: 1 1 auto; display: flex; flex-direction: column; }
.card-note { font-size: 12px; color: var(--note); margin: 2px 0 0; min-height: 14px; line-height: 14px; text-align: center; }
.card-grid { display: grid; grid-template-columns: minmax(25%, max-content) minmax(0, 1fr) minmax(25%, max-content); align-items: center; flex: 1 1 auto; min-height: 64px; }   /* a side is a quarter, and grows for "↑ 350.0%" on a 2-wide card rather than cutting it */
.card .big { font-size: clamp(26px, 13cqi, 40px); font-weight: 600; text-align: center; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; overflow: hidden; }
.card .big.long { font-size: clamp(22px, 11cqi, 34px); }
.card .big .share { font-size: .35em; font-weight: 500; opacity: .7; vertical-align: .55em; margin-left: .1em; }
.card .side { font-size: clamp(10px, 4.2cqi, 13px); font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; }
.card .side.l { text-align: left; }
.card .side.r { text-align: right; }
.card .side .tag { display: block; font-size: clamp(7px, 2.9cqi, 9px); letter-spacing: .14em; opacity: .7; font-weight: 600; margin-bottom: 2px; }
.card .side .amt { display: block; font-size: clamp(9px, 3.6cqi, 11px); font-weight: 600; margin-top: 1px; }   /* the signed change, in the arrow's colour */
.card .side .amt.muted { color: var(--note); font-weight: 500; }                                                 /* "from N" under a net number */
.card .side .amt:empty { display: none; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.flat { color: var(--text); }

/* the inspector drawer (the page contract, "The inspector"): 520px, right-hand, over the page, scrolls on its own */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 520px; z-index: 20; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--drawer-shadow); font-size: 13px; line-height: 1.45; overflow-y: auto; transform: translateX(105%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
.drawer.open { transform: none; visibility: visible; transition: transform .2s ease; }
.dr-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 18px 10px; background: var(--surface); border-bottom: 1px solid var(--border); }
.dr-head-text { min-width: 0; }
.dr-title { color: var(--title); font-size: 15px; font-weight: 600; line-height: 20px; }
.dr-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.dr-close { background: none; border: 0; color: var(--text-2); font: inherit; font-size: 20px; line-height: 20px; cursor: pointer; padding: 0 2px; }
.dr-close:hover { color: var(--text); }
.dr-sec { border-bottom: 1px solid var(--border); }
.dr-sec summary { cursor: pointer; padding: 9px 18px; font-size: 11px; letter-spacing: .08em; font-variant-caps: all-small-caps; text-transform: lowercase; font-weight: 600; color: var(--text-2); list-style: none; display: flex; align-items: center; gap: 8px; }
.dr-sec summary::-webkit-details-marker { display: none; }
.dr-sec summary::before { content: "\25B8"; font-size: 10px; opacity: .7; transition: transform .15s; }
.dr-sec[open] summary::before { transform: rotate(90deg); }
.dr-sec summary:hover { color: var(--text); }
.dr-sec.landed summary { color: var(--accent); }
.dr-sec-body { padding: 0 18px 14px; }
.dr-lead { margin: 0 0 10px; color: var(--text-2); }
.dr-lead b { color: var(--text); font-weight: 600; }
.dr-note { font-size: 12px; color: var(--note); margin: 8px 0 0; }
.dr-sub-title { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--note); margin: 12px 0 4px; }
.dr-view { margin-bottom: 10px; }
.dr-view-name { color: var(--text); font-weight: 600; }
.dr-view-def { color: var(--text-2); font-size: 12px; margin-bottom: 4px; }
.dr-view dl { margin: 0; }
.dr-view dt { color: var(--accent); font-weight: 600; margin-top: 5px; }
.dr-view dd { margin: 0; color: var(--note); font-size: 12px; }
.missing { color: var(--faint); font-style: italic; }
.drawer code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--text); background: var(--code-bg); padding: 0 4px; border-radius: 4px; }
.dr-kv { border-collapse: collapse; font-size: 13px; margin: 0 0 6px; }
.dr-kv th { text-align: left; font-weight: 500; color: var(--text-2); padding: 3px 14px 3px 0; white-space: nowrap; vertical-align: top; border: 0; font-size: 12px; font-variant-caps: normal; letter-spacing: 0; opacity: 1; }
.dr-kv td { padding: 3px 0; border: 0; white-space: normal; }
.dr-tab { width: 100%; border-collapse: collapse; font-size: 12px; margin: 6px 0; }
.dr-tab th { font-size: 11px; letter-spacing: .04em; font-variant-caps: all-small-caps; color: var(--note); font-weight: 600; text-align: left; padding: 4px 8px 4px 0; border-bottom: 1px solid var(--border); white-space: nowrap; }
.dr-tab td { padding: 4px 8px 4px 0; border-bottom: 1px solid var(--border); white-space: normal; vertical-align: top; }
.dr-tab tr:last-child td { border-bottom: 0; }
.dr-tab td.cur { color: var(--accent); font-weight: 600; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 2px; border: 1px solid var(--line); }
.dr-sql { font-family: ui-monospace, Menlo, monospace; font-size: 12px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; margin: 0; padding: 10px; background: var(--code-bg); border: 1px solid var(--border); border-radius: 6px; }
.dr-sql .var { color: var(--gold); font-weight: 600; }
.dr-sql.asrun { opacity: .75; }
.dr-file { margin-bottom: 6px; }
.dr-tools { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.dr-tools button, .dp-foot button { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.dr-tools button:hover, .dp-foot button:hover { border-color: var(--accent); }
.dr-strip { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.dr-strip .seg button { padding: 3px 10px; font-size: 12px; }
/* the display controls, in the drawer's Display section */
.display-panel { display: flex; flex-direction: column; gap: 6px; max-width: 300px; font-size: 12px; }
.display-panel label { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-transform: capitalize; }
.display-panel select { padding: 3px 6px; font-size: 12px; min-width: 140px; }
.dp-row { justify-content: flex-start !important; }
.dp-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.dp-foot .dr-note { margin: 0; }

/* loading bar, error text, SQL foot (pinned to the tile's bottom) */
.loading { height: 2px; margin: 0 -18px 6px; background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 40% 100%; animation: slide 1s linear infinite; visibility: hidden; }
.busy .loading { visibility: visible; }
@keyframes slide { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.err { color: var(--bad); font-size: 12px; white-space: pre-wrap; display: none; margin-bottom: 6px; }
.err:not(:empty) { display: block; }
details.sql { margin-top: auto; padding-top: 8px; font-size: 11px; }
details.sql summary { cursor: pointer; color: var(--faint); font-size: 11px; }
details.sql pre { font-family: ui-monospace, Menlo, monospace; font-size: 11px; line-height: 1.4; white-space: pre-wrap; margin: 6px 0 0; padding: 8px; background: var(--code-bg); border: 1px solid var(--border); border-radius: 6px; }
.broken-page h2 { color: var(--bad); font-size: 16px; margin: 0 0 8px; }
.broken-page pre { white-space: pre-wrap; font-size: 12px; color: var(--note); }

/* tables: numbers centred under centred headers in tabular figures (Jay, 2026-11-05), text left, small-caps header stacked
   on two lines when it has two or more words, zebra rows, a flagged row tinted */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { vertical-align: bottom; line-height: 1.15; white-space: normal; }   /* a header may wrap further when its column is narrower than its two lines; cells never wrap */
td.num, th.num { text-align: center; font-variant-numeric: tabular-nums; }
td.txt, th.txt { text-align: left; }
td.txt { white-space: normal; min-width: 4.5em; }   /* a long word cell wraps before the table would scroll; a number never wraps */
th { font-size: 11px; letter-spacing: .04em; font-variant-caps: all-small-caps; color: var(--note); font-weight: 600; }
tbody tr:nth-child(even) td { background: var(--zebra); }
tr:last-child td { border-bottom: 0; }
tr.totals td { border-top: 1px solid var(--line); font-weight: 600; }
td.c-gold { color: var(--gold); }
td.c-blue { color: var(--blue); }
td.c-green { color: var(--green); }
td.c-red { color: var(--red); }
tr.flag td { background: rgba(224,67,85,.10) !important; }
tr.flag td:first-child { border-left: 3px solid var(--red); padding-left: 7px; }
tr.flag-green td { background: rgba(47,191,113,.10) !important; }
tr.flag-green td:first-child { border-left-color: var(--green); }
tr.flag-gold td { background: rgba(212,160,23,.10) !important; }
tr.flag-gold td:first-child { border-left-color: var(--gold); }
tr.flag-amber td { background: rgba(241,196,15,.10) !important; }
tr.flag-amber td:first-child { border-left-color: var(--amber); }
tr.flag-blue td { background: rgba(79,179,209,.10) !important; }
tr.flag-blue td:first-child { border-left-color: var(--blue); }

/* main hub cards: a linked title and thirteen small bars under the number */
.card-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--line-hover); }
.card-link:hover { color: var(--accent); }
.spark { height: 34px; margin-top: 8px; flex: 0 0 auto; }
/* the trend card (the page contract): the big number, ONE line of change in the arrow's colour, the comparison in muted words, then
   the bars; everything centred; the same sizes as the form-3 card so the two forms sit level in a column */
.card .line { font-size: clamp(11px, 4.4cqi, 14px); font-weight: 600; text-align: center; line-height: 1.3; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.card .line .muted { color: var(--note); font-weight: 500; }
.card .cmp { font-size: 11px; color: var(--faint); text-align: center; line-height: 14px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .body > .big:first-child { margin-top: 8px; }

/* tabs (Jay, 2026-10-30): the strip of outlined buttons, the chosen one in the accent; one pane shows */
.tabs { display: flex; justify-content: center; gap: 8px; margin: 2px 0 var(--gap); }
.tabs button { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--pill-radius); padding: 7px 18px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tabs button:hover { border-color: var(--line-hover); }
.tabs button.on { color: var(--accent); outline: 1.5px solid var(--accent); outline-offset: -1px; }
[data-theme="light"] .tabs button.on { background: var(--pill-on); color: var(--pill-on-ink); outline: 0; border-color: var(--pill-on); }
.sec.pane { display: none; }
.sec.pane.on { display: block; }

/* table pager (Jay, 2026-10-30): the count, prev / next and the per-page pick in one small line under the table */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 8px; font-size: 11px; color: var(--note); }
.pager button { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); border-radius: 4px; padding: 1px 8px; font: inherit; font-size: 13px; cursor: pointer; }
.pager button:disabled { opacity: .35; cursor: default; }
.pager select { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); border-radius: 4px; font: inherit; font-size: 11px; padding: 1px 4px; margin-left: 4px; }

/* ---------- the sign-in, account and admin pages the server renders (step 1, 2026-11-05): their own header, no rail ---------- */
body.form-page { padding: 18px 24px 40px; max-width: 1500px; margin: 0 auto; }
body.form-page .top { align-items: center; }
body.form-page .hdr-left { flex-direction: row; align-items: center; gap: 18px; }
.pg { color: var(--text); text-decoration: none; font-size: 12px; padding: 4px 9px; white-space: nowrap; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.pg:hover { border-color: var(--line-hover); }
.hdr-user a { color: var(--text-2); }
/* the Sign out and Back to my club POSTs look like the underlined links of the Superset header */
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--text-2); text-decoration: underline; cursor: pointer; }
.link-button:hover, .hdr-user a:hover { color: var(--accent); }
.form-main { display: flex; flex-direction: column; align-items: center; gap: var(--gap); }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; width: 100%; max-width: 420px; }
.form-card.sign-in { margin-top: 12vh; }
.form-card.wide { max-width: none; }
.form-card h1 { font-size: 20px; font-weight: 600; margin: 0 0 14px; }
.form-card h2 { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.form-card form { display: flex; flex-direction: column; gap: 12px; }
.form-card label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.form-card input, .form-card select { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 10px; font: inherit; font-size: 14px; text-transform: none; letter-spacing: 0; }
.form-card input:focus, .form-card select:focus { outline: 1.5px solid var(--accent); outline-offset: -1px; }
.form-button { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 6px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.form-button.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); }
.form-button.small { padding: 3px 10px; font-size: 12px; font-weight: 500; }
.form-message { font-size: 13px; margin: 0 0 12px; }
.form-message.error { color: var(--bad); }
.form-message.ok { color: var(--good); }
.form-note { font-size: 12px; color: var(--text-2); margin: 4px 0 8px; }
.form-link { color: var(--accent); }
.dev-users { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.dev-users form { gap: 0; }
.admin-club { width: 100%; }
.admin-club h2 { display: flex; align-items: center; gap: 14px; }
.admin-club h2 .muted { font-weight: 400; font-size: 13px; color: var(--text-2); }
.admin-club h2 form { margin-left: auto; }
.admin-table td form { display: inline-flex; flex-direction: row; gap: 6px; align-items: center; margin: 0; }
.admin-table td input { padding: 3px 6px; font-size: 12px; width: 140px; }
.form-card form.admin-add { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.form-card form.admin-add .form-button { align-self: end; }
.form-card form.theme-form { flex-direction: row; align-items: flex-end; gap: 12px; }

/* a text tile filled from a query: one sentence, a little larger than small print (Activity's "this month" line, 2026-11-05) */
.text-line { font-size: 14px; text-align: center; color: var(--text); }

/* ---------- the figure card (Essentials, 2026-11-09; brief 9.4 the same night, after the Superstore Performance Overview): the
   text column on a slightly darker ground (--card-tint) from the card's top edge to its bottom and from its left edge to the
   column's right, the plain small label at its top, the period line and the figure in the space between, the badge as a band
   across the column's whole foot; the chart at the right on the card's own ground. The four columns of one stack share one
   width, set by the renderer (alignFigureColumns). The label tab of 2026-11-09 stays reachable as one class, fc-tab (the
   tile key "label_style": "tab"). ---------- */
.t-figure_card { padding: 0; }
.t-figure_card > .body { flex: 1 1 auto; display: flex; }       /* the card's body fills the card's share of the column (brief 9.12) */
.t-figure_card > .loading { position: absolute; top: 0; left: 0; right: 0; margin: 0; z-index: 2; }   /* over the edge, so the tint starts at the card's top */
.fc-grid { flex: 1 1 auto; display: flex; align-items: stretch; min-height: 140px; }
.fc-left { flex: 0 0 auto; box-sizing: content-box; padding: 12px 14px 0; display: flex; flex-direction: column; cursor: default;
  background: var(--card-tint); border-radius: calc(var(--radius) - 1px) 0 0 calc(var(--radius) - 1px); }
.fc-left .tile-head { position: static; margin: -12px -14px 0; padding: 12px 14px 10px; background: var(--card-title-band);
  border-radius: calc(var(--radius) - 1px) 0 0 0; text-align: left; white-space: nowrap; }   /* the title band (brief 9.21 b, Manager 4's
  reading of Jay 2026-11-10: "just the top part as the background for the card title"; back with brief 9.42 b, Jay 2026-11-11: "Make
  that back to what it was ... when the width of that grey section and tne labels were not wrapped and stacked"): flush with the card's
  top and left edges and the column's right, the top-left corner rounded, the label on one line; the column below keeps --card-tint.
  From brief 9.35 f to 9.42 b it was a box as wide as its label's widest line, its bottom-right corner rounded, the label on the
  lines the tile declared (`label_lines`); git keeps it at f21c644 */
.fc-left .tile-head h2 { color: var(--tab-label-ink); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; line-height: 14px; }
/* the figure and its caption as one block, centred between the label and the band with clear air above and below (brief 9.18);
   the caption grows downward, and the stack's captions share one height (alignFigureColumns), so the figures stand level */
.fc-block { margin: auto 0; padding: 12px 0; }
.fc-figure { white-space: nowrap; font-size: 32px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fc-period { color: var(--text-2); font-size: 11.5px; line-height: 1.3; margin-top: 4px; white-space: pre; }   /* the period the figure covers, its caption (brief 9.9 d, 9.18); its lines break where its words say and nowhere else (brief 9.4 f) */
.fc-period:empty { display: none; }
/* the line under the figure (brief 9.35 f): the change in the measure's own unit and last year's value, in the colour of the move */
.fc-change { font-size: 12px; font-weight: 600; line-height: 1.3; margin-top: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fc-change:empty { display: none; }
.fc-change-text.good { color: var(--good); }
.fc-change-text.bad { color: var(--bad); }
.fc-change-text.flat { color: var(--note); font-weight: 500; }
/* a column's heading (brief 9.35 e): the cards' month, once, over the four */
.stack-heading { flex: 0 0 auto; font-size: 13px; font-weight: 600; line-height: 18px; color: var(--text); padding: 0 2px; }
.stack-heading:empty { display: none; }
.fc-badge-slot { margin: 0 -14px; }   /* the band: flush with the column's left, right and bottom edges (brief 9.4 b) */
.fc-badge { display: block; text-align: center; font-size: 12.5px; font-weight: 600; padding: 6px 8px; border-radius: 0 0 0 calc(var(--radius) - 1px); white-space: nowrap; }
.fc-badge.good { background: var(--badge-good-bg); color: var(--badge-good-ink); }
.fc-badge.bad { background: var(--badge-bad-bg); color: var(--badge-bad-ink); }
.fc-badge.flat { background: var(--badge-flat-bg); color: var(--note); font-weight: 500; }
/* brief 59 m (Jay 2026-11-11: "Make the main number ... a bit larger", "the change at the bottom in the color could be larger too"): the
   figure 32px (28 until then), the band's words 12.5px (11.5). With `change_in_band` last year's words in the band are the flat grey
   ("vs PY (141)"); with `"band": "foot"` the band runs across the card's whole foot, its two bottom corners rounded; with
   `label_wrap` the label may take two lines */
.fc-py { color: var(--note); font-weight: 500; }
/* brief 59 o: the band at the text column's foot holds the move and last year's words on two lines, each as wide as its words and
   centred, in 13.5px; the band taller by the second line, the bars keeping the card's full height */
.fc-badge.fc-two-line { font-size: 13.5px; line-height: 1.35; padding: 7px 8px; }
.fc-badge.fc-two-line > span { display: block; width: max-content; margin: 0 auto; }
.fc-badge.fc-two-line > .fc-py { font-size: 12px; }
/* brief 59 p (Jay 2026-11-11): the percent 15.5px beside the count's 13.5 ("just bump it up a little"); the figure centred across and
   down the space between the label and the band ("center the big number on the left middle of the card vertically and horizontally"),
   its block's air 4px so a shorter card keeps the label and the band at their size and gives up only the middle */
.fc-band-pct { font-size: 15.5px; }
/* brief 59 bb: Explorer's tooltip in the card's words and colours: the period, the measure small and grey, the value large, the move in
   the colour of the move with its percent a step larger, last year's value in grey */
.tt-card { min-width: 130px; line-height: 1.3; }
.tt-period { font-weight: 600; margin-bottom: 4px; }
.tt-head { display: flex; align-items: center; gap: 8px; margin: 1px 0 3px; }   /* brief 59 ee: the value, the measure's name at its right */
.tt-measure { font-size: 11px; line-height: 1.25; color: var(--note); white-space: normal; max-width: 92px; text-align: left; }
.tt-figure { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tt-move { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tt-move.good { color: var(--good); } .tt-move.bad { color: var(--bad); } .tt-move.flat { color: var(--note); font-weight: 500; }
.tt-move .tt-pct { font-size: 14.5px; }
.tt-py { font-size: 12px; color: var(--note); font-variant-numeric: tabular-nums; }
.fc-centred .fc-block { text-align: center; padding: 4px 0; }
/* brief 59 q (Jay 2026-11-11: "would borrowing a tiny bit of padding from the left and right of the charts get us there"): on these
   cards the chart side's margins 10px a side (14 elsewhere), so the text column can hold every label on one line with its "i" and the
   bars give up less of their width */
.fc-centred .fc-right { margin-left: 10px; margin-right: 10px; }
/* brief 59 kk (Jay 2026-11-11: "the labels in the top left of the small cards lets center that too. center the text then put the i icon
   superscript a little just to the right of the centered text"): the label centred in its band, the "i" smaller and raised just after it,
   standing out of the flow so the words stay centred */
.fc-centred .fc-left .tile-head { text-align: center; }
.fc-centred .fc-left .tile-head .ttl { position: relative; }
.fc-centred .fc-left .tile-head .info-mark { position: absolute; left: 100%; top: -5px; margin-left: 3px; width: 12px; height: 12px; }
.fc-centred .fc-left .tile-head .info-glyph { font-size: 8.5px; }
/* brief 59 v (Jay 2026-11-11: "move lead time and prev year to the right side instead of left and make them the slightest bit bigger on
   each small card"): the key over the bars at the right, 11.5px (10.5), its swatches a pixel larger */
.fc-centred .fc-key-slot .mark-key { justify-content: flex-end; font-size: 11.5px; line-height: 16px; }
.fc-centred .fc-key-slot .mk-bar { width: 14px; height: 8px; }
.t-figure_card.fc-band-foot > .body { flex-direction: column; }
.fc-badge-slot.fc-foot { margin: 0; flex: 0 0 auto; }
.fc-band-foot .fc-badge { border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px); }
.fc-band-foot .fc-left { border-radius: calc(var(--radius) - 1px) 0 0 0; padding-bottom: 0; }
.fc-label-wrap .fc-left .tile-head { white-space: normal; }
/* the chart side (brief 9.35 i): the card's key of its marks over its bars, then the bars taking the rest of the height */
.fc-right { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; margin: 8px 14px 10px 14px; }
.fc-key-slot:empty { display: none; }
.fc-key-slot .mark-key { margin: 0 0 4px; font-size: 10.5px; line-height: 15px; gap: 2px 9px; }
.fc-key-slot .mk-bar { width: 13px; height: 7px; }
.fc-chart { flex: 1 1 auto; min-width: 0; min-height: 80px; align-self: stretch; contain: size; }
/* "12-mo 870" under the change line while the card's Trend is on (brief 9.35 i); kept, hidden, while off, so nothing moves */
.fc-also { font-size: 11px; line-height: 15px; margin-top: 2px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fc-also:empty { display: none; }
.fc-also.off { visibility: hidden; }   /* the bars grow with the card (brief 9.12 a); size containment so the canvas drawn at the last size never holds the card at it */
/* the tab, as built on 2026-11-09 and kept to be put back (brief 9.4 d) */
.t-figure_card.fc-tab .fc-left { padding-top: 34px; }
.t-figure_card.fc-tab .tile-head { position: absolute; top: -1px; left: -1px; margin: 0; padding: 6px 14px; background: var(--tab-label-bg);
  border-radius: var(--radius) 0 12px 0; text-align: left; z-index: 1; }
.t-figure_card.fc-tab .tile-head h2 { color: var(--tab-label-ink); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; line-height: 14px; }

/* a compact line's own control on its title's row (brief 9.25): no taller than the title's 17px line, the words as written
   ("Show:", "Months"), the pills a step smaller; where the row cannot hold it, it drops under the title at the left */
.tile.compact .tile-ctls { top: 12px; right: 16px; }
.tile.compact .tile-ctls .ctl { gap: 5px; }
.tile.compact .tile-ctls .ctl-label { font-size: 11px; line-height: 17px; text-transform: none; letter-spacing: 0; }
.tile.compact .tile-ctls .seg, [data-theme="light"] .tile.compact .tile-ctls .seg { padding: 0; gap: 0; }
.tile.compact .tile-ctls .seg button, [data-theme="light"] .tile.compact .tile-ctls .seg button { font-size: 10.5px; line-height: 15px; padding: 0 6px; }
.tile.compact.ctls-below .tile-ctls { justify-content: flex-start; margin: 2px 0 4px; }
/* a compact line (2026-11-09): a small title, the latest value printed once above a short line, no legend, no y axis */
.tile.compact { padding: 12px 16px 8px; }
.tile.compact .tile-head { text-align: left; margin-bottom: 2px; }
.tile.compact .tile-head h2 { font-size: 13px; line-height: 17px; color: var(--title); }
.tile.compact .tile-head .note { font-size: 11px; line-height: 14px; }
.compact-figure { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.compact-figure:empty { display: none; }
.compact-badge { font-size: 11.5px; font-weight: 600; letter-spacing: 0; padding: 2px 7px; border-radius: 6px; vertical-align: 4px; margin-left: 6px; }
.compact-badge.good { background: var(--badge-good-bg); color: var(--badge-good-ink); }
.compact-badge.bad { background: var(--badge-bad-bg); color: var(--badge-bad-ink); }
.compact-badge.flat { background: var(--code-bg); color: var(--note); }

/* the info box (brief 9.5 b): a small quiet "i" in a ring (a "?" until brief 59 l) after a tile's title or label, the page's one sentence in a box in the theme's
   tooltip look on hover, focus or tap; the tile holding an open box is lifted over its neighbours */
.info-mark { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px;
  margin-left: 6px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--text-2); font-size: 9.5px; font-weight: 600;
  line-height: 1; letter-spacing: 0; text-transform: none; vertical-align: 1px; cursor: help; outline: none; }
.info-mark:hover, .info-mark:focus-visible, .info-mark.open { border-color: var(--text-2); color: var(--text); }
.info-glyph { font-family: Georgia, "Times New Roman", serif; font-size: 10px; font-weight: 700; font-style: normal; }   /* the information "i" (brief 59 l) */
.info-box { display: none; position: absolute; top: calc(100% + 6px); left: -10px; z-index: 30; width: max-content; max-width: 240px;
  padding: 6px 10px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  font-size: 12px; font-weight: 400; line-height: 1.4; letter-spacing: 0; text-transform: none; text-align: left; white-space: normal; }
.info-mark:hover .info-box, .info-mark:focus .info-box, .info-mark.open .info-box { display: block; }
.tile:has(.info-mark:hover), .tile:has(.info-mark:focus), .tile:has(.info-mark.open) { z-index: 25; }

/* the small second figure on a compact tile (brief 9.28: "12-mo 7.5%" while the trend toggle is on); it keeps to itself, so where
   the figure's line cannot hold it, it drops whole to a line of its own */
.compact-also { display: inline-block; font-size: 11px; font-weight: 500; color: var(--text-2); margin-left: 6px; white-space: nowrap; }
/* a compact tile's toggle on its title's row (brief 9.28), the same step as its picker */
.tile.compact .tile-ctls .toggle { width: 28px; height: 15px; }   /* within the title's 17px line */
.tile.compact .tile-ctls .toggle span::before { width: 11px; height: 11px; }
.tile.compact .tile-ctls .toggle input:checked + span::before { transform: translateX(13px); }

/* a tile's key of its marks (brief 9.32): one line in the head where the sentence stood, a swatch of each mark and its word, a
   switch after the item it shows and hides; the item faded while its mark is hidden */
.mark-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 3px; font-size: 11.5px; line-height: 17px; color: var(--text-2); }
.mk-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; transition: opacity .15s; }
.mk-item.mk-off { opacity: .4; }
.mk-swatch { display: inline-block; }
.mk-bar { width: 16px; height: 8px; border-radius: 4px; }
.mk-tick { width: 12px; height: 0; border-top: 2px solid; }
/* the year earlier drawn as a line (brief 52 f): its dots 1.5px with 2.5px between (the short mark across the middle from 52 e to 55) */
.mk-tick.mk-prior-line { width: 16px; height: 3px; border-top: 0;
  background: repeating-linear-gradient(90deg, currentColor 0 1.5px, transparent 1.5px 4px) left center / 100% 1.5px no-repeat; }
.mk-line { width: 18px; height: 0; border-top: 2px dotted; }
.mark-key .toggle { width: 28px; height: 15px; margin-left: -6px; }
.mark-key .toggle span::before { width: 11px; height: 11px; }
.mark-key .toggle input:checked + span::before { transform: translateX(13px); }

/* a chart's date range (brief 9.37 b; since brief 56 a window over a miniature of the whole history): a strip of small bars, one per
   period held, those inside the window in the bar colour and those outside pale; over it the window, a thin border with a heavier
   handle at each side and no tint inside; the first and last period drawn under it. Two range inputs laid over the strip, only their
   (unseen) handles taking the pointer, each placed so its handle stands on the window's edge. Until 56 a rail with two round handles
   and the run between them in the pill's colour; git keeps it at 7971b51 */
.range-slider { box-sizing: border-box; display: flex; flex-direction: column; justify-content: flex-start; }
.rs-rail { position: relative; height: 24px; }
.rs-strip { position: absolute; inset: 0; }
.rs-bar { position: absolute; bottom: 0; border-radius: 1px 1px 0 0; }
.rs-bar.rs-out { background: var(--line-strong); }
/* brief 59 z (Jay 2026-11-11: "maybe we make those a bit more transparent as well so they don't look like continuations of the ones
   above"): the bars inside the window at 55% opacity, their colours the chart's (59 j) */
.rs-bar:not(.rs-out) { opacity: .55; }
.rs-window { position: absolute; top: 0; bottom: 0; border: 1px solid var(--window-edge); border-radius: 2px; box-sizing: border-box; pointer-events: none; }
/* the window's handles (brief 59 k, Jay 2026-11-11, on a picture of a timeline range slider: "how the selctor has those little handles on
   it. That's what i want the date range selctor to do"): a small rounded grip standing on each edge, centred on it, the card's ground
   with the window's edge colour for its border and a short grip line down its middle. Until 59 k a 3px bar in the edge colour */
.rs-window::before, .rs-window::after { content: ''; position: absolute; top: 50%; width: 8px; height: 18px; transform: translateY(-50%);
  box-sizing: border-box; background: var(--surface) linear-gradient(var(--window-edge), var(--window-edge)) center / 1px 8px no-repeat;
  border: 1px solid var(--window-edge); border-radius: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.rs-window::before { left: -5px; }
.rs-window::after { right: -5px; }
/* brief 59 x (Jay 2026-11-11: "lets see what the date range selector looks like with the outline in yellow and the handlebar fill in
   yellow too"): the window's outline 1.5px and the handles filled in --window-yellow, their grip line in --window-grip; --window-edge
   (56 b) stays for the keyboard focus ring */
.rs-window { border: 1.5px solid var(--window-yellow); }
.rs-window::before, .rs-window::after { background: var(--window-yellow) linear-gradient(var(--window-grip), var(--window-grip)) center / 1px 8px no-repeat;
  border-color: var(--window-yellow); }
.range-slider input[type=range] { position: absolute; left: 0; top: 0; width: 100%; height: 24px; margin: 0; padding: 0;
  background: transparent; pointer-events: none; -webkit-appearance: none; appearance: none; z-index: 2; }
.range-slider input[type=range].rs-top { z-index: 3; }
.range-slider input[type=range]::-webkit-slider-runnable-track { background: transparent; height: 24px; }
.range-slider input[type=range]::-moz-range-track { background: transparent; }
.range-slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; pointer-events: auto; cursor: ew-resize;
  width: 12px; height: 24px; margin-top: 0; border: 0; background: transparent; }
.range-slider input[type=range]::-moz-range-thumb { pointer-events: auto; cursor: ew-resize; width: 12px; height: 24px; border: 0; background: transparent; }
.range-slider input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--window-edge); outline-offset: 1px; }
.rs-words { height: 16px; font-size: 11px; line-height: 16px; color: var(--text-2); text-align: center; white-space: nowrap; position: relative; }
.rs-words > span { position: absolute; top: 0; }   /* brief 59 jj: the first period under the left handle, the last under the right */

/* a measure chart (briefs 9.37 f, 9.40 c, 9.41 c): the tile's body holds the chosen measure's chart; its head one line, the measure and
   grouping ("Bookings by month"), its figure for the latest full period with the change line and the period's name, its key with its
   own Trend switch at the right */
.has-measure-chart > .body { display: flex; flex-direction: column; }
.measure-chart { flex: none; }
.measure-chart .mc-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; text-align: left; margin: 0; padding: 2px 12px 0; }
.measure-chart .mc-head h2 { font-size: 13px; line-height: 18px; color: var(--title); }
.measure-chart .mc-head .ttl { cursor: default; }
.mc-figure { font-size: 16px; font-weight: 600; line-height: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.mc-change { font-size: 11.5px; font-weight: 600; line-height: 18px; }
.mc-period { font-size: 11px; line-height: 18px; color: var(--text-2); }
.mc-key { margin-left: auto; align-self: center; }
.mc-key .mark-key { margin-top: 0; }
/* the big chart's "Line:" choice (brief 9.42 e) in the measure chart's head, after its key, a step smaller than the tile's controls; a form
   the measure does not offer dimmed */
.mc-line { align-self: center; }
.mc-line .ctl { flex-direction: row; align-items: center; gap: 5px; }
.mc-line .ctl-label { font-size: 10px; }
.mc-line .seg button { padding: 2px 8px; font-size: 11px; }
.mc-line .seg button:disabled { opacity: .35; cursor: default; }
/* a key entry that toggles its mark (brief 9.49 c: "Prev Yr" on Essentials History hides and shows last year's line) */
.mk-item.mk-toggle { cursor: pointer; border-radius: 4px; }
.mk-item.mk-toggle:hover .mk-word { text-decoration: underline; }
.mk-item.mk-toggle:focus-visible { outline: 2px solid var(--pill-on); outline-offset: 2px; }
