/* Studio look. Every colour is a role filled in by the user's scheme; nothing below names a colour directly
   except the brand yellow, which is the same in every scheme. Source: the mySafety.plus system kit. */
:root, [data-scheme="lemorne"] {
  --bg-ground: #ECEEEE; --bg-panel: #FFFFFF; --bg-panel-soft: #F5F6F6; --text: #1B2224; --text-on: #FFFFFF; --text-muted: #566366;
  --line: #DFE4E4; --line-strong: #748286; --accent: #0F6F76; --accent-on: #FFFFFF; --accent-soft: #E3F1F2;
  --menu-bg: #1B2224; --menu-line: #1B2224; --menu-text: #F2F5F5; --menu-muted: #B4BFC1; --menu-active: #33403F;
  --layer-bg: #232B2D; --layer-text: #F2F5F5; --layer-muted: #B4BFC1; --layer-line: #3D4A4C; --layer-field: #2E383A;
  --brand: #FFC000; --brand-on: #1B2224;
  --font-heading: "Outfit", "Inter", system-ui, sans-serif; --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow-card: 0 1px 2px rgba(27,34,36,.06), 0 10px 24px rgba(27,34,36,.08);
  --shadow-raised: 0 8px 16px rgba(27,34,36,.18), 0 28px 48px rgba(27,34,36,.30);
  --shadow-overlay: 0 8px 16px rgba(27,34,36,.10), 0 24px 56px rgba(27,34,36,.16);
  --tile-highlight: rgba(255,255,255,.18); --shadow-strong: rgba(27,34,36,.32);
  --raised-row: inset 0 1.5px 0 var(--tile-highlight), 0 4px 7px var(--shadow-strong);
  --shadow-tile: 0 1px 2px rgba(27,34,36,.10), 0 4px 8px -4px rgba(27,34,36,.16);
  --shadow-tray: 0 2px 4px rgba(27,34,36,.06), 0 12px 20px -10px rgba(27,34,36,.22);
  --shadow-button: inset 0 1.5px 0 rgba(255,255,255,.18), 0 4px 7px rgba(27,34,36,.26), 0 12px 18px -8px rgba(27,34,36,.40);
  --amber: #F9A826; --tray-light-h: 27px; --tray-gap-h: 45px; --tray-light-o: .6;
  /* The one light colour: whatever lights up (a chosen icon, a pressed button's icon, a tick, a toggle that is on) uses it.
     It is one of the scheme's three colours (Pravin, 24 Nov 2026). */
  --glow: #1CCFE6; --glow-halo: drop-shadow(0 0 3px color-mix(in srgb, var(--glow) 85%, transparent)) drop-shadow(0 0 8px color-mix(in srgb, var(--glow) 45%, transparent));
  /* Buttons (soft material, 24 Nov 2026): b1 = Primary, b2 = Secondary. Light version. */
  --b2-bg: linear-gradient(180deg, #FFFFFF 0%, #ECEEEC 100%); --b2-fg: var(--text); --b2-edge: rgba(27,34,36,.16); --b2-sh: inset 0 1px 0 #FFFFFF, 0 2px 3px rgba(27,34,36,.16), 0 6px 10px -4px rgba(27,34,36,.22);
  --b2-in: linear-gradient(180deg, #D9DCDA 0%, #E3E5E3 100%); --b2-in-fg: #3E484B; --b2-in-sh: inset 0 2px 5px rgba(27,34,36,.25), 0 1px 0 #FFFFFF;
  --b1-bg: linear-gradient(180deg, #3A3F42 0%, #1E2325 100%); --b1-fg: #F2F5F5; --b1-edge: rgba(0,0,0,.6); --b1-sh: inset 0 1px 0 rgba(255,255,255,.14), 0 2px 3px rgba(27,34,36,.30), 0 6px 10px -4px rgba(27,34,36,.40);
  --b1-in: linear-gradient(180deg, #15191A 0%, #22272A 100%); --b1-in-fg: #C9D0D2; --b1-in-sh: inset 0 2px 5px rgba(0,0,0,.6), 0 1px 0 #FFFFFF;
  --b2-off: #E0E2E0; --b2-off-fg: #9AA2A4; --b1-off: #C9CDCC; --b1-off-fg: #8A9395;
  --sw-groove: linear-gradient(180deg, #D3D6D4 0%, #DEE1DF 100%); --sw-groove-sh: inset 0 2px 4px rgba(27,34,36,.22), inset 0 0 0 1px rgba(27,34,36,.08), 0 1px 0 #FFFFFF;
  --menu-sel: linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(0,0,0,.28) 100%), var(--menu-active); --menu-sel-hi: rgba(255,255,255,.10);
  --menu-sel-shadow: 0 4px 8px -3px rgba(0,0,0,.8), 0 1px 2px rgba(0,0,0,.6); --menu-light: rgba(255,255,255,.36);
  --tray-bar: linear-gradient(180deg, #FFFFFF 0%, #F1F2EF 100%); --tray-edge: rgba(27,34,36,.09); --tray-hi: #FFFFFF;
  --tray-light: rgba(255,255,255,.52); --tray-grain: .10; --tray-sel: linear-gradient(180deg, #F3F4F2 0%, #E2E5E3 100%);
  --tray-sel-hi: #FFFFFF; --tray-sel-shadow: 0 2px 6px -2px rgba(17,23,24,.22), 0 0 0 1px rgba(27,34,36,.08); --tray-sel-text: var(--text);
  --radius-control: 6px; --radius-tray: 7px;
  --shadow-soft: rgba(27,34,36,.14); --picture-frame: #FFFFFF; --scrim: rgba(18,24,25,.72); --scrim-on: #FFFFFF; --status-review: #FFE9A8; --status-review-on: #4A3800;
  /* Plan (26 Nov 2026): one colour per kind of date, on the calendar and in the lists. */ --plan-due: #E2A900; --plan-training: #7C5CD6; --plan-work: #2F9E68;
  --control: 31px; --menu-narrow: 76px; --outline-width: 232px; --layer-width: 266px;
}
:is([data-scheme="basalt"], [data-scheme="sugarcane"]) {
  --b2-bg: linear-gradient(180deg, #3B3F43 0%, #2D3034 100%); --b2-fg: #E9ECEC; --b2-edge: rgba(0,0,0,.55); --b2-sh: inset 0 1px 0 rgba(255,255,255,.09), 0 2px 3px rgba(0,0,0,.45), 0 6px 10px -4px rgba(0,0,0,.5);
  --b2-in: linear-gradient(180deg, #24272A 0%, #2A2D30 100%); --b2-in-fg: #B9C0C2; --b2-in-sh: inset 0 2px 5px rgba(0,0,0,.65), inset 0 0 0 1px rgba(0,0,0,.25), 0 1px 0 rgba(255,255,255,.06);
  --b1-bg: linear-gradient(180deg, #F6F8F8 0%, #DADFE0 100%); --b1-fg: #16191B; --b1-edge: rgba(0,0,0,.55); --b1-sh: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 3px rgba(0,0,0,.45), 0 6px 10px -4px rgba(0,0,0,.5);
  --b1-in: linear-gradient(180deg, #CDD2D3 0%, #DDE1E2 100%); --b1-in-fg: #16191B; --b1-in-sh: inset 0 2px 5px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.06);
  --b2-off: #2E3134; --b2-off-fg: #6E7579; --b1-off: #3A3E41; --b1-off-fg: #7C8386;
  --sw-groove: linear-gradient(180deg, #202325 0%, #282B2E 100%); --sw-groove-sh: inset 0 2px 4px rgba(0,0,0,.6), inset 0 0 0 1px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.06);
  --menu-light: rgba(255,255,255,.115);
  --tray-bar: linear-gradient(180deg, #2A2D2F 0%, #151718 100%); --tray-edge: rgba(255,255,255,.09); --tray-hi: rgba(255,255,255,.12);
  --tray-light: rgba(255,255,255,.165); --tray-grain: .22; --tray-sel: linear-gradient(180deg, #3A3E41 0%, #222527 100%);
  --tray-sel-hi: rgba(255,255,255,.16); --tray-sel-shadow: 0 4px 8px -3px rgba(0,0,0,.8), 0 1px 2px rgba(0,0,0,.6); --tray-sel-text: #EDEFEF;
  --shadow-soft: rgba(0,0,0,.40); --picture-frame: #F2F5F5; --scrim: rgba(0,0,0,.72); --status-review: #5A4A14; --status-review-on: #FFE9A8; --plan-due: #F2C230; --plan-training: #A58BF0; --plan-work: #4CC08A;
  --shadow-tile: 0 1px 2px rgba(0,0,0,.40), 0 4px 8px -4px rgba(0,0,0,.50); --shadow-tray: 0 2px 4px rgba(0,0,0,.30), 0 12px 20px -10px rgba(0,0,0,.60);
  --shadow-button: inset 0 1.5px 0 rgba(255,255,255,.10), 0 4px 7px rgba(0,0,0,.45), 0 12px 18px -8px rgba(0,0,0,.60);
  --bg-ground: #121819; --bg-panel: #1B2224; --bg-panel-soft: #232B2D; --text: #F2F5F5; --text-on: #121819; --text-muted: #B4BFC1;
  --line: #33403F; --line-strong: #7E8C8E; --accent: #35B5BD; --accent-on: #10201F; --accent-soft: #1F3A3C;
  --menu-bg: #0C1112; --menu-line: #232B2D; --menu-active: #2A3436; --tile-highlight: rgba(255,255,255,.10); --shadow-strong: rgba(0,0,0,.70); --layer-bg: #2A3436; --layer-line: #445154; --layer-field: #354043;
}
[data-scheme="chamarel"] {
  --picture-frame: #FFFDF8; --scrim: rgba(22,41,43,.72); --status-review: #F8DF9A;
  --bg-ground: #EFEAE0; --bg-panel: #FBF8F2; --bg-panel-soft: #F4EFE6; --text: #16292B; --text-muted: #4A5C5E; --line: #E2DACB; --line-strong: #857E6F;
  --accent: #0F4B50; --accent-soft: #DCE9EA; --menu-bg: #0F4B50; --menu-line: #0F4B50; --menu-text: #FFFFFF; --menu-muted: #C5DADB; --menu-active: #1D6166; --tile-highlight: rgba(255,255,255,.20); --shadow-strong: rgba(52,40,18,.34);
  --layer-bg: #16292B; --layer-text: #F6F2EA; --layer-muted: #B9C7C8; --layer-line: #33494B; --layer-field: #22383A;
}

/* The four colour schemes (Pravin, 24 Nov 2026, board S3). Each is three colours: Base (page, panels, lines and text are its shades),
   Brand (menu and accent) and Light (--glow, what lights up). Le Morne is the default. Basalt and Sugarcane also take the dark material above. */
[data-scheme="lemorne"] {
  --bg-ground: #E8ECF0;
  --bg-panel: #FFFFFF;
  --bg-panel-soft: #F2F4F7;
  --text: #28333F;
  --text-on: #FFFFFF;
  --text-muted: #5A6572;
  --line: #D6DBE1;
  --line-strong: #788391;
  --accent: #295B85;
  --accent-on: #FFFFFF;
  --accent-soft: #E1EAF3;
  --menu-bg: #1F3E5C;
  --menu-line: #1F3E5C;
  --menu-text: #F3F5F8;
  --menu-muted: #B7C7D7;
  --menu-active: #2C5579;
  --layer-bg: #24384D;
  --layer-line: #38506A;
  --layer-field: #2D445C;
  --b1-bg: linear-gradient(180deg, #33658F 0%, #214766 100%);
  --b1-fg: #F3F5F8;
  --b1-in: linear-gradient(180deg, #183550 0%, #214766 100%);
  --b1-in-fg: #C9D3DE;
  --glow: #1CCFE6;
}
[data-scheme="chamarel"] {
  --bg-ground: #ECEFE8;
  --bg-panel: #FBFCF8;
  --bg-panel-soft: #F2F4EE;
  --text: #252E28;
  --text-on: #FFFFFF;
  --text-muted: #55605A;
  --line: #DCE1D5;
  --line-strong: #768886;
  --accent: #10383A;
  --accent-on: #FFFFFF;
  --accent-soft: #DEE9E6;
  --menu-bg: #10383A;
  --menu-line: #10383A;
  --menu-text: #F4F6EF;
  --menu-muted: #B7C6C0;
  --menu-active: #1D4B4C;
  --layer-bg: #10383A;
  --layer-line: #2A5153;
  --layer-field: #1B4547;
  --b1-bg: linear-gradient(180deg, #1F5254 0%, #0D2F31 100%);
  --b1-fg: #F4F6EF;
  --b1-in: linear-gradient(180deg, #0A2627 0%, #10383A 100%);
  --b1-in-fg: #C8D6CF;
  --glow: #2FD36B;
}
[data-scheme="sugarcane"] {
  --bg-ground: #0F1B17;
  --bg-panel: #1D302C;
  --bg-panel-soft: #253A35;
  --text: #E2EADF;
  --text-on: #031C04;
  --text-muted: #A3B5B1;
  --line: #2F4440;
  --line-strong: #6B8383;
  --accent: #87C53A;
  --accent-on: #031C04;
  --accent-soft: #22381E;
  --menu-bg: #031C04;
  --menu-line: #0F2A12;
  --menu-text: #E2EADF;
  --menu-muted: #9FB2AE;
  --menu-active: #1D302C;
  --layer-bg: #243935;
  --layer-line: #435559;
  --layer-field: #2E4440;
  --tile-highlight: rgba(255,255,255,.08);
  --b2-bg: linear-gradient(180deg, #2C423D 0%, #21352F 100%);
  --b2-fg: #E2EADF;
  --b2-in: linear-gradient(180deg, #172824 0%, #1D2F2A 100%);
  --b2-in-fg: #BFCFC9;
  --b1-bg: linear-gradient(180deg, #F4F8EF 0%, #D8E2D2 100%);
  --b1-fg: #031C04;
  --b1-in: linear-gradient(180deg, #CBD6C4 0%, #DCE4D6 100%);
  --b1-in-fg: #031C04;
  --sw-groove: linear-gradient(180deg, #13221F 0%, #1A2B27 100%);
  --glow: #A6F08C;
}
[data-scheme="basalt"] {
  --bg-ground: #1F2124;
  --bg-panel: #272A2E;
  --bg-panel-soft: #2F3337;
  --text: #D9DCDF;
  --text-on: #1B1D20;
  --text-muted: #9BA1A7;
  --line: #383D42;
  --line-strong: #6E757C;
  --accent: #9DB0C0;
  --accent-on: #1B1D20;
  --accent-soft: #2E353C;
  --menu-bg: #18191B;
  --menu-line: #18191B;
  --menu-text: #D9DCDF;
  --menu-muted: #9BA1A7;
  --menu-active: #2A2D31;
  --layer-bg: #2C3034;
  --layer-line: #41464C;
  --layer-field: #353A3F;
  --tile-highlight: rgba(255,255,255,.07);
  --b2-bg: linear-gradient(180deg, #363A3F 0%, #2B2F33 100%);
  --b2-fg: #D9DCDF;
  --b2-in: linear-gradient(180deg, #212427 0%, #282B2F 100%);
  --b2-in-fg: #B4B9BE;
  --b1-bg: linear-gradient(180deg, #DCDFE2 0%, #BEC3C8 100%);
  --b1-fg: #1B1D20;
  --b1-in: linear-gradient(180deg, #B2B7BC 0%, #C4C8CC 100%);
  --b1-in-fg: #1B1D20;
  --sw-groove: linear-gradient(180deg, #1A1C1E 0%, #212326 100%);
  --glow: #FFD43B;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg-ground); color: var(--text); font: 400 12px/17px var(--font-ui); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
#app { height: 100%; }
.loading { margin: 0; padding: 34px; color: var(--text-muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Shared pieces */
/* Buttons: two kinds only, Primary (.btn) and Secondary (.btn.light), in the soft material. The version follows the ground (scheme tokens; dark panels below).
   Pressed sinks in and its icon glows amber; a click sound plays (dom.js). Disabled is flat and muted. */
.btn, .linkbtn, .add-row, .add-block { height: var(--control); padding: 0 14px; border-radius: var(--radius-control); border: 1px solid var(--b1-edge); background: var(--b1-bg); color: var(--b1-fg); box-shadow: var(--b1-sh); font: 600 12px/16px var(--font-ui); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; cursor: pointer; text-decoration: none; transition: box-shadow .12s ease, background .12s ease, color .12s ease; }
.btn.light, .btn.small, .linkbtn, .add-row, .add-block { border-color: var(--b2-edge); background: var(--b2-bg); color: var(--b2-fg); box-shadow: var(--b2-sh); }
.btn:active:not(:disabled), .btn.down, .btn[aria-pressed="true"] { background: var(--b1-in); color: var(--b1-in-fg); box-shadow: var(--b1-in-sh); }
.btn.light:active:not(:disabled), .btn.light.down, .btn.light[aria-pressed="true"], .btn.small:active:not(:disabled), .btn.small.down, .linkbtn:active:not(:disabled), .linkbtn.down, .add-row:active, .add-row.down, .add-block:active, .add-block.down { background: var(--b2-in); color: var(--b2-in-fg); box-shadow: var(--b2-in-sh); }
.btn:active:not(:disabled) svg, .btn.down svg, .btn[aria-pressed="true"] svg, .linkbtn.down svg, .add-row.down svg, .add-block.down svg { color: var(--glow); filter: drop-shadow(0 0 3px color-mix(in srgb, var(--glow) 85%, transparent)) drop-shadow(0 0 8px color-mix(in srgb, var(--glow) 45%, transparent)); }
.btn.round { width: var(--control); padding: 0; justify-content: center; }
.btn:disabled, .linkbtn:disabled { background: var(--b1-off); color: var(--b1-off-fg); border-color: transparent; box-shadow: none; cursor: default; }
.btn.light:disabled, .btn.small:disabled, .linkbtn:disabled { background: var(--b2-off); color: var(--b2-off-fg); }
@media (prefers-reduced-motion: reduce) { .btn, .linkbtn, .add-row, .add-block { transition: none; } }
.tag { height: 18px; padding: 0 7px; border-radius: 699px; background: var(--bg-panel-soft); color: var(--text-muted); font: 600 12px/18px var(--font-ui); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.tag.accent { background: var(--accent-soft); color: var(--accent); }
.tag.brand { background: var(--brand); color: var(--brand-on); }
.tag.dark { background: var(--layer-bg); color: var(--layer-text); }
.tray { position: relative; display: inline-flex; align-items: center; gap: 3px; padding: 4px; border-radius: var(--radius-tray); background: var(--tray-bar); border: 1px solid var(--tray-edge);
  box-shadow: inset 0 1px 0 var(--tray-hi), 0 1px 0 rgba(0,0,0,.25); }
/* Tray: a soft block with a fine grain. A strip light hidden under it falls onto the page below: nothing above, brightest at its bottom edge, fading slowly, ends soft and opening out. */
.tray::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: var(--tray-grain); mix-blend-mode: overlay; pointer-events: none; }
.tray::after { content: ""; position: absolute; left: -16px; right: -16px; top: 100%; height: var(--tray-light-h); z-index: -1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), var(--tray-light); background-blend-mode: overlay; clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 100%, 0 100%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent), linear-gradient(180deg, #000, rgba(0,0,0,.6) 18%, rgba(0,0,0,.25) 50%, rgba(0,0,0,.07) 80%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent), linear-gradient(180deg, #000, rgba(0,0,0,.6) 18%, rgba(0,0,0,.25) 50%, rgba(0,0,0,.07) 80%, transparent); mask-composite: intersect; }
/* Room under a tray for its light: about 80% of the light's height before the next element. */
.page > .tray, .page > :has(> .tray), .mbar:has(> .tray) { margin-bottom: calc(var(--tray-gap-h) * .8 - var(--page-gap, 13px)); }
.pill { height: 28px; padding: 0 11px; border-radius: 5px; border: 0; background: transparent; color: var(--text-muted); font: 600 12px/16px var(--font-ui); }
.tray .pill { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 6px; transition: color .18s ease; }
/* The chosen tile is a layer under the label, so it can fade and press. */
.tray .pill::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; background: var(--tray-sel); box-shadow: inset 0 1px 0 var(--tray-sel-hi), var(--tray-sel-shadow); opacity: 0; transition: opacity .18s ease; }
.tray .pill[aria-pressed="true"] { background: transparent; color: var(--tray-sel-text); box-shadow: none; }
.tray .pill[aria-pressed="true"]::before { opacity: 1; }
.tray .tis { display: inline-grid; } .tray .ti { grid-area: 1 / 1; display: inline-flex; transition: opacity .18s ease; }
.tray .ti.on { opacity: 0; } .tray .pill[aria-pressed="true"] .ti.on { opacity: 1; } .tray .pill[aria-pressed="true"] .ti.off { opacity: 0; }
.tray .ti.on svg { color: var(--glow); filter: drop-shadow(0 0 3px color-mix(in srgb, var(--glow) 85%, transparent)) drop-shadow(0 0 8px color-mix(in srgb, var(--glow) 45%, transparent)); }
/* Press: the new choice clicks down, the old one clicks back up. */
.tray .pill.down { animation: tray-down .24s ease; } .tray .pill.up { animation: tray-up .24s ease; }
@keyframes tray-down { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(1px) scale(.94); } 100% { transform: none; } }
@keyframes tray-up { 0% { transform: translateY(1px) scale(.97); } 50% { transform: translateY(-1px) scale(1.02); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .tray .pill, .tray .pill::before, .tray .ti { transition: none; } .tray .pill.down, .tray .pill.up { animation: none; } }
.title { margin: 0; font: 300 28px/32px var(--font-heading); }
.title span { color: var(--text-muted); }
.field { height: var(--control); padding: 0 10px; border-radius: var(--radius-control); border: 1px solid var(--line-strong); background: var(--bg-panel); width: 100%; }
.mark { width: 39px; height: 39px; flex: none; display: block; }

/* Sign-in: a full picture, the logo top left, underlined fields, one soft button */
.signin { position: relative; min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 22px; overflow: hidden; background: #2A1F16; }
.signin-picture { position: absolute; inset: -17px; background: #2A1F16 url("/img/signin.jpg") center / cover no-repeat; filter: blur(14px); transform: scale(1.05); }
.signin-shade { position: absolute; inset: 0; background: rgba(20, 14, 10, .45); }
.signin-card { position: relative; width: min(784px, 100%); min-height: min(476px, calc(100vh - 45px)); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; color: #FFFFFF;
  background: linear-gradient(rgba(20,14,10,.30), rgba(20,14,10,.45)), #2A1F16 url("/img/signin.jpg") center 40% / cover no-repeat; box-shadow: 0 30px 80px rgba(10,6,4,.55); }
.signin-top { display: flex; align-items: flex-start; justify-content: space-between; padding: 25px 31px 0; }
.wordmark { display: block; width: 154px; height: auto; margin: -24px 0 -4px -7px; }
.signin-where { font: 500 12px/17px var(--font-ui); opacity: .92; }
.signin-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 17px; text-align: center; }
.signin-panel { display: flex; flex-direction: column; align-items: center; padding: 25px 31px 28px; border-radius: 12px; background: rgba(20, 14, 10, .58); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 20px 50px rgba(10,6,4,.35); }
.signin-title { margin: 0; font: 300 28px/32px var(--font-heading); }
.signin-lead { margin: 6px 0 20px; max-width: 294px; font: 400 12px/17px var(--font-ui); color: #E6EEEE; }
.signin-form { width: min(280px, 100%); display: flex; flex-direction: column; gap: 10px; }
.signin-field { display: flex; align-items: center; gap: 8px; height: 39px; border-bottom: 1.5px solid rgba(255,255,255,.75); }
.signin-field:focus-within { border-bottom-color: var(--brand); }
.signin-icon { display: flex; flex: none; }
.signin-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: #FFFFFF; font: 400 13px/17px var(--font-ui); }
.signin-field input::placeholder { color: #E6EEEE; opacity: 1; }
.signin-eye { width: 31px; height: 31px; border: 0; border-radius: 15px; background: transparent; color: #FFFFFF; display: flex; align-items: center; justify-content: center; flex: none; }
.signin-note { min-height: 15px; margin: 0; font: 600 12px/16px var(--font-ui); color: var(--brand); }
.signin-button { height: 39px; border: 1px solid rgba(255,255,255,.5); border-radius: 8px; background: rgba(255,255,255,.22); color: #FFFFFF; font: 600 12px/17px var(--font-ui); backdrop-filter: blur(6px); transition: background .2s; }
.signin-button:hover, .signin-button:focus-visible { background: rgba(255,255,255,.32); }
.signin-link { align-self: center; height: 31px; border: 0; background: transparent; color: #FFFFFF; text-decoration: underline; font: 500 12px/16px var(--font-ui); }
.signin-foot { padding: 0 31px 20px; font: 400 12px/16px var(--font-ui); color: #E6EEEE; }

/* Studio shell: menu, then the work area */
.shell { height: 100%; display: flex; overflow: hidden; }
.menu { position: relative; width: var(--menu-narrow); flex: none; background: var(--menu-bg); border-right: 1px solid var(--menu-line); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 11px 0 11px 4px; z-index: 6; }
.menu .mark { margin-bottom: 8px; }
.menu-item { position: relative; width: calc(100% - 8px); height: 48px; padding: 0 4px; border: 0; border-radius: 7px; background: transparent; color: var(--menu-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: 500 11px/13px var(--font-ui); letter-spacing: .01em; }
/* One highlight for "you are here" in every menu and list: a soft raised tile in the panel's own tone. */
.menu-item[aria-expanded="true"] { background: linear-gradient(180deg, var(--tile-highlight), transparent 62%), var(--menu-active); box-shadow: var(--raised-row); color: var(--menu-text); font-weight: 600; }
/* The menu is a vertical tray: soft grain, and a strip light behind its right edge falling onto the page. Its chosen item is the raised tile with the filled amber icon, and it plays the same press as a tray. */
.menu::before { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: var(--tray-grain); mix-blend-mode: overlay; pointer-events: none; }
.menu > * { position: relative; }
.menu-item { isolation: isolate; transition: color .18s ease; }
.menu-item::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; background: var(--menu-sel); box-shadow: inset 0 1px 0 var(--menu-sel-hi), var(--menu-sel-shadow); opacity: 0; transition: opacity .18s ease; }
.menu-item[aria-current="true"] { color: var(--menu-text); font-weight: 600; }
.menu-item[aria-current="true"]::before { opacity: 1; }
.menu-item .tis { display: inline-grid; } .menu-item .ti { grid-area: 1 / 1; display: inline-flex; transition: opacity .18s ease; }
.menu-item .ti.on { opacity: 0; } .menu-item[aria-current="true"] .ti.on { opacity: 1; } .menu-item[aria-current="true"] .ti.off { opacity: 0; }
.menu-item .ti.on svg { color: var(--glow); filter: drop-shadow(0 0 3px color-mix(in srgb, var(--glow) 85%, transparent)) drop-shadow(0 0 8px color-mix(in srgb, var(--glow) 45%, transparent)); }
.menu-item.down { animation: tray-down .24s ease; } .menu-item.up { animation: tray-up .24s ease; }
.shell { isolation: isolate; }
.work::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--tray-light-h); z-index: -1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), var(--menu-light); background-blend-mode: overlay; -webkit-mask-image: linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent), linear-gradient(90deg, #000, rgba(0,0,0,.6) 18%, rgba(0,0,0,.25) 50%, rgba(0,0,0,.07) 80%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent), linear-gradient(90deg, #000, rgba(0,0,0,.6) 18%, rgba(0,0,0,.25) 50%, rgba(0,0,0,.07) 80%, transparent); mask-composite: intersect; }
@media (prefers-reduced-motion: reduce) { .menu-item, .menu-item::before, .menu-item .ti { transition: none; } .menu-item.down, .menu-item.up { animation: none; } }
.menu-item .soon { position: absolute; top: 4px; right: 6px; width: 6px; height: 6px; border-radius: 3px; background: var(--menu-muted); opacity: .5; }
.menu-gap { flex: 1; }
.menu .build { font: 500 11px/13px var(--font-ui); color: var(--menu-muted); opacity: .7; letter-spacing: .02em; margin-bottom: 2px; }
.work { flex: 1; min-width: 0; display: flex; position: relative; }
.page { --page-gap: 17px; flex: 1; min-width: 0; overflow: auto; padding: 25px; display: flex; flex-direction: column; gap: var(--page-gap); }
.page-head { display: flex; align-items: flex-end; gap: 17px; flex-wrap: wrap; }
.page-head .grow { flex: 1; min-width: 140px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.toolbar.tray { display: inline-flex; flex-wrap: wrap; gap: 3px; align-self: flex-start; }
.search { position: relative; width: 210px; }
.search .field { padding-left: 29px; }
.search svg { position: absolute; left: 10px; top: 8px; color: var(--text-muted); }

/* Popover: account and scheme */
.pop { position: absolute; left: calc(var(--menu-narrow) + 6px); bottom: 11px; width: 196px; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-overlay); padding: 11px; display: flex; flex-direction: column; gap: 8px; z-index: 20; }
.pop h2 { margin: 0; font: 400 15px/20px var(--font-heading); }
.pop p { margin: 0; font: 400 12px/16px var(--font-ui); color: var(--text-muted); }
.pop .pills { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
/* A colour scheme is a list choice: the soft raised tile, like the other rows of the account menu (DECISIONS: one highlight for "you are here"). */
.pop .pills .pill { color: var(--text); font-weight: 500; text-align: left; padding: 0 7px; }
.pop .pills .pill[aria-pressed="true"] { background: linear-gradient(180deg, var(--tile-highlight), transparent 62%), var(--bg-panel-soft); color: var(--text); font-weight: 600; box-shadow: var(--shadow-tile); }
.pop .pill { padding: 0 6px; }

/* Courses */
.folder { display: flex; flex-direction: column; gap: 10px; }
.folder h2 { margin: 0; font: 400 15px/20px var(--font-heading); display: flex; align-items: center; gap: 10px; }
.folder .fold { all: unset; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; border-radius: 6px; padding: 2px 4px 2px 0; }
.folder .fold:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.folder .fold svg { color: var(--text-muted); transition: transform .2s; }
.folder .fold[aria-expanded="false"] svg { transform: rotate(-90deg); }
.folder h2 .counts { display: inline-flex; gap: 4px; }
.folder h2 .count { height: 20px; padding: 0 7px 0 5px; border-radius: 10px; display: inline-flex; align-items: center; gap: 3px; font: 600 12px/16px var(--font-ui); color: var(--text-muted); background: var(--bg-panel); border: 1px solid var(--line); }
.folder h2 .count b { font-weight: 600; color: var(--text); }
.folder h2 .count.done { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.folder h2 .count.done b { color: var(--accent); }
.cards[hidden] { display: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 21px 14px; align-items: stretch; padding: 10px 0 0 10px; }
/* Course cards in the cover style (board P6b, Pravin 24 Nov 2026): a dark card in the scheme's menu colour, the photo fading in,
   white text, the type as a small lit label. What is built or ready lights in the scheme's Light colour; the Masterclass keeps its amber. */
.course { --cv: var(--menu-bg); --cv-text: #FFFFFF; --cv-muted: rgba(255,255,255,.72); --cv-line: rgba(255,255,255,.18); --cv-glass: rgba(255,255,255,.10);
  --built: var(--glow); --lab: var(--glow); position: relative; isolation: isolate; background: var(--cv); color: var(--cv-text); border-radius: 13px; display: flex; text-align: left; touch-action: pan-y;
  box-shadow: 0 1px 2px var(--shadow-soft), 0 16px 30px -14px var(--shadow-strong); transition: transform .2s, box-shadow .2s; }
.course::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3; box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 1px rgba(255,255,255,.07); }
.course:hover, .course:focus-within { transform: translateY(-3px); box-shadow: 0 2px 4px var(--shadow-soft), 0 22px 36px -14px var(--shadow-strong); }
.course .pic { position: absolute; z-index: 0; overflow: hidden; background: var(--cv-glass); }
.course .pic.empty { border: 0; border-radius: 0; padding: 0; display: block; }
.course .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course .pic::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.course .pic .add { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: 600 12px/16px var(--font-ui); color: var(--cv-muted); }
.course .over { position: absolute; z-index: 1; left: 9px; right: 9px; top: 9px; display: flex; align-items: center; gap: 4px; }
.course .over .grow { flex: 1; }
.course .chip-on { height: 22px; padding: 0 8px; border-radius: 11px; background: rgba(10,20,30,.40); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.24); color: #FFFFFF; display: inline-flex; align-items: center; gap: 4px; font: 600 11px/14px var(--font-ui); white-space: nowrap; }
.course .chip-on.badge { background: var(--glow); border-color: var(--glow); color: #0E1A24; }
.course .needs { display: flex; gap: 4px; }
.course .need { position: relative; z-index: 2; width: 22px; height: 22px; padding: 0; border-radius: 11px; border: 1px solid rgba(255,255,255,.24); background: rgba(10,20,30,.40); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; cursor: help; }
.course .need::before { content: ""; position: absolute; inset: -6px -2px; }
.course .need[aria-expanded="true"]::after, .course .need:hover::after { content: attr(aria-label); position: absolute; top: calc(100% + 6px); left: 0; padding: 4px 8px; border-radius: 6px; background: rgba(10,20,30,.88); color: #FFFFFF; font: 600 12px/16px var(--font-ui); white-space: nowrap; pointer-events: none; z-index: 3; }
.course .info { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.course .label { display: flex; align-items: center; gap: 4px; min-width: 0; font: 700 11px/14px var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--lab); white-space: nowrap; overflow: hidden; }
.course .label svg { flex: none; }
.course .label .lref { overflow: hidden; text-overflow: ellipsis; color: var(--cv-muted); font-weight: 600; letter-spacing: .04em; }
.course h3 { margin: 6px 0 0; font: 400 17px/21px var(--font-heading); color: var(--cv-text); }
.course .open { all: unset; cursor: pointer; }
.course .open::after { content: ""; position: absolute; inset: 0; border-radius: 13px; }
.course .open:focus-visible { outline: none; }
.course:has(.open:focus-visible) { outline: 3px solid var(--glow); outline-offset: 3px; }
.course .head { margin-top: 6px; display: flex; }
.course .counts { display: flex; flex-wrap: wrap; gap: 4px 11px; }
.course .meta { display: inline-flex; align-items: center; gap: 4px; font: 500 12px/16px var(--font-ui); color: var(--cv-muted); white-space: nowrap; }
.course .needchips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.course .needchip { height: 22px; padding: 0 8px 0 6px; border-radius: 11px; border: 1px solid var(--cv-line); background: var(--cv-glass); display: inline-flex; align-items: center; gap: 4px; font: 600 11px/14px var(--font-ui); color: var(--cv-muted); white-space: nowrap; }
.course .zone { margin-top: 8px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.course .zone .grow { flex: 1; }
.course .about { margin: 0; font: 400 12px/17px var(--font-ui); color: var(--cv-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course .about.none { font-style: italic; }
.course .built { display: flex; align-items: center; gap: 9px; font: 600 12px/16px var(--font-ui); color: var(--cv-muted); white-space: nowrap; }
.course .built i { flex: 1; max-width: 130px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.16); }
.course .built b { display: block; height: 100%; background: var(--built); border-radius: 2px; box-shadow: 0 0 8px var(--built); }
.course .foot { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.course .status { height: 20px; padding: 0 8px; border-radius: 10px; display: inline-flex; align-items: center; gap: 3px; font: 600 11px/14px var(--font-ui); white-space: nowrap; border: 1px solid var(--cv-line); color: var(--cv-muted); background: var(--cv-glass); }
.course .status.review { background: var(--status-review); color: var(--status-review-on); border-color: var(--status-review); }
.course .status.published { color: var(--cv-text); background: var(--cv-glass); border-color: var(--cv-line); padding-left: 6px; }
.course .status.published svg { color: var(--glow); }
.course .flip { position: relative; z-index: 2; height: 26px; padding: 0 10px 0 8px; border-radius: 9px; border: 1px solid rgba(255,255,255,.22); background: var(--cv-glass); color: var(--cv-text); display: inline-flex; align-items: center; gap: 5px; font: 600 12px/16px var(--font-ui); white-space: nowrap; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.course .flip:hover { background: rgba(255,255,255,.16); }
.course .flip::before { content: ""; position: absolute; inset: -9px -6px; }
.course .flip:focus-visible { outline: 3px solid var(--glow); outline-offset: 2px; }
/* Quick Bite: narrow, the photo on top fading into the card. */
.course.qb { flex-direction: column; min-height: 290px; }
.course.qb .pic { left: 0; right: 0; top: 0; height: 168px; border-radius: 13px 13px 0 0; }
.course.qb .pic .add { padding-bottom: 46px; }
.course.qb .pic::after { background: linear-gradient(180deg, transparent 22%, color-mix(in srgb, var(--cv) 70%, transparent) 62%, var(--cv) 90%); }
.course.qb :is(.label, h3) { text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.course.qb .info { padding: 122px 12px 12px; }
.course.qb .zone { min-height: 30px; }
/* Deep Dive, Masterclass and Pathway: wide, the photo fading in from the right. */
.course.dd, .course.mc, .course.pw { grid-column: span 2; min-height: 200px; }
:is(.course.dd, .course.mc, .course.pw) .pic { top: 0; right: 0; bottom: 0; width: 58%; border-radius: 0 13px 13px 0; }
:is(.course.dd, .course.mc, .course.pw) .pic::after { background: linear-gradient(90deg, var(--cv) 0%, color-mix(in srgb, var(--cv) 82%, transparent) 30%, color-mix(in srgb, var(--cv) 12%, transparent) 100%); }
:is(.course.dd, .course.mc, .course.pw) .pic .add { left: 30%; }
:is(.course.dd, .course.mc, .course.pw) .info { padding: 15px 14px 12px 16px; }
:is(.course.dd, .course.mc, .course.pw) .info > :not(.foot) { max-width: 72%; }
:is(.course.dd, .course.mc, .course.pw) h3 { font-size: 21px; line-height: 25px; }
.course.mc { --lab: var(--amber); --built: var(--amber); }
.course.mc::after { box-shadow: inset 0 0 0 1.5px var(--amber), inset 0 1px 0 rgba(255,255,255,.14); }
@media (max-width: 720px) {
  .course.dd, .course.mc, .course.pw { grid-column: auto; flex-direction: column; min-height: 290px; }
  :is(.course.dd, .course.mc, .course.pw) .pic { left: 0; right: 0; bottom: auto; width: auto; height: 168px; border-radius: 13px 13px 0 0; }
  :is(.course.dd, .course.mc, .course.pw) .pic::after { background: linear-gradient(180deg, transparent 22%, color-mix(in srgb, var(--cv) 70%, transparent) 62%, var(--cv) 90%); }
  :is(.course.dd, .course.mc, .course.pw) .pic .add { left: 0; padding-bottom: 46px; }
  :is(.course.dd, .course.mc, .course.pw) :is(.label, h3) { text-shadow: 0 1px 8px rgba(0,0,0,.45); }
  :is(.course.dd, .course.mc, .course.pw) .info { padding: 122px 12px 12px; }
  :is(.course.dd, .course.mc, .course.pw) .info > :not(.foot) { max-width: none; }
}
.empty { border: 1.5px dashed var(--line-strong); border-radius: 10px; padding: 34px; text-align: center; color: var(--text-muted); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.empty h2 { margin: 0; font: 300 22px/27px var(--font-heading); color: var(--text); }

/* Dialog */
.veil { position: fixed; inset: 0; background: rgba(18,24,25,.45); display: flex; align-items: center; justify-content: center; z-index: 40; padding: 17px; }
.dialog { width: min(392px, 100%); background: var(--bg-panel); border-radius: 12px; box-shadow: var(--shadow-overlay); padding: 20px; display: flex; flex-direction: column; gap: 13px; }
.dialog h2 { margin: 0; font: 300 22px/27px var(--font-heading); }
.dialog label:not(.alabel) { display: flex; flex-direction: column; gap: 4px; font: 600 12px/16px var(--font-ui); color: var(--text-muted); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice button { border: 1.5px solid var(--line-strong); border-radius: 8px; background: var(--bg-panel); padding: 11px; text-align: left; display: flex; flex-direction: column; gap: 3px; color: var(--text); }
.choice button[aria-pressed="true"] { background: linear-gradient(180deg, var(--tile-highlight), transparent 62%), var(--text); color: var(--text-on); border-color: var(--text); box-shadow: var(--shadow-button); }
.choice b { font: 400 15px/20px var(--font-heading); }
.choice span { font: 400 12px/16px var(--font-ui); opacity: .85; }
.dialog .row { display: flex; justify-content: flex-end; gap: 6px; align-items: center; }
.dialog .note { flex: 1; margin: 0; color: var(--status-review-on); font: 600 12px/16px var(--font-ui); }

/* Editor: outline, stage, layers */
.outline { width: var(--outline-width); flex: none; background: var(--bg-panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.outline-head { padding: 14px 11px 8px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line); }
.outline-head h2 { margin: 0; font: 400 15px/20px var(--font-heading); outline: 0; border-radius: 4px; }
.outline-head .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.outline-list { flex: 1; overflow: auto; padding: 8px 6px; display: flex; flex-direction: column; gap: 3px; }
.orow { min-height: var(--control); border: 0; border-radius: 5px; background: transparent; padding: 4px 6px; display: flex; align-items: center; gap: 7px; text-align: left; font: 500 12px/16px var(--font-ui); color: var(--text); width: 100%; }
.orow .num { width: 20px; height: 20px; flex: none; border-radius: 4px; background: var(--bg-panel-soft); color: var(--text-muted); font: 600 12px/20px var(--font-ui); text-align: center; }
.orow .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; outline: 0; }
.orow .count { font: 400 12px/16px var(--font-ui); color: var(--text-muted); }
.orow.module { background: var(--bg-panel-soft); font-weight: 600; }
.orow.lesson { margin-left: 14px; width: calc(100% - 14px); }
.orow[aria-current="true"] { background: linear-gradient(180deg, var(--tile-highlight), transparent 62%), var(--bg-panel-soft); box-shadow: var(--raised-row); font-weight: 600; }
.add-row { width: auto; margin: 4px 3px; }
.meter { padding: 0 11px 8px; display: flex; flex-direction: column; gap: 4px; font: 400 12px/16px var(--font-ui); color: var(--text-muted); }
.meter i { display: block; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.meter i b { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.meter.flat { padding: 0; }
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; position: relative; }
.stage-head { padding: 17px 25px 8px; display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.stage-head .title { font-size: 22px; line-height: 27px; flex: 1; min-width: 168px; }
.saved { font: 500 12px/16px var(--font-ui); color: var(--text-muted); display: inline-flex; align-items: center; gap: 4px; }
.stage-body { flex: 1; min-height: 0; overflow: auto; padding: 8px 25px 17px; display: flex; flex-direction: column; align-items: center; gap: 11px; }
.stage-body > * { flex: none; }
.fit { font: 500 12px/16px var(--font-ui); color: var(--accent); display: inline-flex; align-items: center; gap: 4px; }
.fit.over { color: var(--status-review-on); }
.strip { display: inline-flex; gap: 3px; align-items: center; flex-wrap: wrap; justify-content: center; padding: 4px; border-radius: var(--radius-tray); background: var(--bg-panel); border: 1px solid var(--line); box-shadow: var(--shadow-tray); }
.strip button { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 5px; border: 0; background: transparent; color: var(--text-muted); font: 600 12px/16px var(--font-ui); display: inline-flex; align-items: center; justify-content: center; }
.strip button[aria-current="true"] { background: linear-gradient(180deg, var(--tile-highlight), transparent 62%), var(--bg-panel-soft); color: var(--text); font-weight: 700; box-shadow: var(--shadow-tile); }
.askbar { margin: 0 25px 14px; height: 39px; border-radius: 20px; background: var(--bg-panel); box-shadow: var(--shadow-overlay); display: flex; align-items: center; gap: 8px; padding: 0 6px 0 14px; color: var(--text-muted); flex: none; }
.askbar span { flex: 1; font: 400 12px/16px var(--font-ui); }
.block-wrap { position: relative; border-radius: 7px; outline: 2px solid transparent; outline-offset: 6px; transition: outline-color .15s; }
.block-wrap:hover { outline-color: var(--line); }
.block-wrap.sel { outline-color: var(--accent); }
.block-tools { position: absolute; right: calc(-1 * var(--pad) - 42px); top: 0; display: none; flex-direction: column; align-items: center; gap: 3px; padding: 3px; border-radius: 9px; background: #232B2D; box-shadow: var(--shadow-overlay); z-index: 5; }
.block-wrap.sel .block-tools { display: flex; }
.block-tools button { width: 25px; height: 25px; border: 0; border-radius: 13px; background: transparent; color: var(--layer-text) !important; display: flex; align-items: center; justify-content: center; }
.block-tools button:hover { background: var(--layer-line); }
.block-tools .tag { display: none; }
.add-block { align-self: stretch; }
.dim { position: absolute; inset: 0; background: rgba(18,24,25,.35); z-index: 4; }
.library { position: absolute; left: 0; top: 0; bottom: 0; width: 252px; background: var(--bg-panel); box-shadow: var(--shadow-overlay); z-index: 5; display: flex; flex-direction: column; animation: slide-right .28s cubic-bezier(.2,.7,.2,1) both; }
.library-head { padding: 17px 14px 8px; display: flex; align-items: center; gap: 8px; }
.library-head h2 { flex: 1; margin: 0; font: 300 22px/27px var(--font-heading); }
.library-list { flex: 1; overflow: auto; padding: 0 14px 17px; display: flex; flex-direction: column; gap: 13px; }
.library-list h3 { margin: 0 0 6px; font: 600 12px/16px var(--font-ui); color: var(--text-muted); }
.library-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lib-card { min-height: 45px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-panel); padding: 6px 8px; text-align: left; display: flex; flex-direction: column; justify-content: center; gap: 2px; font: 600 12px/16px var(--font-ui); color: var(--text); }
.lib-card:hover, .lib-card:focus-visible { background: var(--layer-bg); color: var(--layer-text); border-color: var(--layer-bg); box-shadow: var(--shadow-raised); }
.lib-card small { font: 400 12px/16px var(--font-ui); opacity: .75; }
.lib-card:disabled { opacity: .45; cursor: default; background: var(--bg-panel-soft); color: var(--text-muted); box-shadow: none; border-color: var(--line); }
.layer { position: absolute; right: 0; top: 0; bottom: 0; width: var(--layer-width); background: var(--layer-bg); color: var(--layer-text); box-shadow: var(--shadow-raised); z-index: 5; display: flex; flex-direction: column; border-radius: 12px 0 0 12px; animation: slide-left .28s cubic-bezier(.2,.7,.2,1) both; }
.layer-head { padding: 17px 17px 8px; display: flex; align-items: center; gap: 8px; }
.layer-head h2 { flex: 1; margin: 0; font: 300 22px/27px var(--font-heading); color: var(--brand); }
.layer-body { flex: 1; overflow: auto; padding: 6px 17px 17px; display: flex; flex-direction: column; gap: 14px; }
.layer h3 { margin: 0 0 6px; font: 600 12px/16px var(--font-ui); color: var(--layer-muted); }
.layer .opts { display: flex; flex-wrap: wrap; gap: 6px; }
.layer .opt { min-height: var(--control); padding: 0 11px; border-radius: var(--radius-control); border: 1px solid var(--layer-line); background: var(--layer-field); color: var(--layer-text); font: 500 12px/16px var(--font-ui); }
.layer .opt[aria-pressed="true"] { background: var(--layer-text); color: var(--layer-bg); border-color: var(--layer-text); font-weight: 600; }
.layer .opt:disabled { opacity: .45; cursor: default; }
.layer label.opt { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-weight: 600; }
.layer label.opt.on { background: var(--layer-text); color: var(--layer-bg); border-color: var(--layer-text); }
.layer label.opt:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.picture-pick { display: flex; flex-direction: column; gap: 7px; }
.picture-pick .now { height: 105px; border-radius: 8px; border: 3px solid var(--picture-frame); overflow: hidden; }
.picture-pick .now img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picture-pick .now.empty { border: 2px dashed var(--layer-line); color: var(--layer-muted); display: flex; align-items: center; justify-content: center; }
.picture-pick .now.empty span { display: flex; flex-direction: column; align-items: center; gap: 4px; font: 600 12px/16px var(--font-ui); }
.layer .switch { display: flex; align-items: center; gap: 8px; min-height: var(--control); font: 500 12px/16px var(--font-ui); width: 100%; border: 0; background: transparent; color: var(--layer-text); text-align: left; padding: 0; }
.layer .switch span { flex: 1; }
.layer .lfield { width: 100%; min-height: var(--control); padding: 7px 8px; border-radius: 5px; border: 1px solid var(--layer-line); background: var(--layer-field); color: var(--layer-text); }
.layer p { margin: 0; font: 400 12px/16px var(--font-ui); color: var(--layer-muted); }
.layer-foot { padding: 11px 17px 17px; display: flex; flex-wrap: wrap; gap: 6px; } /* three buttons no longer push Save out of the panel (27 Nov 2026) */
.layer-foot .btn { flex: 1; justify-content: center; }
@keyframes slide-left { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slide-right { from { transform: translateX(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-width: 720px) { .signin { padding: 0; } .signin-card { border-radius: 0; min-height: 100vh; } .signin-top { padding: 17px 17px 0; } .signin-foot { padding: 0 17px 14px; } }

/* Shared small pieces for Media and Reviews */
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 7px; }
.tip { display: inline-flex; vertical-align: middle; color: var(--text-muted); cursor: help; margin-left: 3px; }
.layer .tip { color: var(--layer-muted); }
.layer h3 { display: flex; align-items: center; gap: 2px; }
.pill .n, .btn .n { opacity: .75; font-weight: 500; margin-left: 4px; }
.note { margin: 0; font: 400 12px/16px var(--font-ui); color: var(--text-muted); }
.chip { height: 20px; padding: 0 7px; border-radius: 10px; border: 1px solid var(--line-strong); display: inline-flex; align-items: center; gap: 4px; font: 600 12px/16px var(--font-ui); white-space: nowrap; }
.layer .chip { border-color: var(--layer-line); color: var(--layer-text); }
.status { height: 18px; padding: 0 7px; border-radius: 9px; display: inline-flex; align-items: center; gap: 3px; font: 600 12px/16px var(--font-ui); white-space: nowrap; border: 1px solid var(--line-strong); color: var(--text-muted); background: var(--bg-panel); }
.status.review { background: var(--status-review); color: var(--status-review-on); border-color: var(--status-review); }
.status.published { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }
.status.back { background: var(--text); color: var(--text-on); border-color: var(--text); }
.tchip { height: 17px; padding: 0 7px 0 5px; border-radius: 8px; display: inline-flex; align-items: center; gap: 3px; font: 700 12px/17px var(--font-ui); white-space: nowrap; background: var(--accent); color: var(--accent-on); }
.tchip.t-dd { background: var(--text); color: var(--text-on); } .tchip.t-mc { background: var(--brand); color: var(--brand-on); }
.menu-item .badge { position: absolute; top: 3px; right: 8px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--accent-on); font: 700 12px/15px var(--font-ui); box-sizing: border-box; }

/* Media library */
.mscreen { flex: 1; min-width: 0; display: flex; position: relative; overflow: hidden; }
.mside { width: 174px; flex: none; background: var(--bg-panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; padding: 15px 11px; overflow: auto; }
.slabel { display: flex; align-items: center; font: 600 12px/16px var(--font-ui); color: var(--text-muted); padding: 0 3px; margin-top: 4px; }
.slist { display: flex; flex-direction: column; }
.srow { width: 100%; height: 31px; border: 0; border-radius: 5px; background: transparent; color: var(--text-muted); display: flex; align-items: center; gap: 7px; padding: 0 8px; font: 500 12px/16px var(--font-ui); text-align: left; }
.srow .count { font-size: 12px; }
.srow[aria-current="true"] { background: linear-gradient(180deg, var(--tile-highlight), transparent 62%), var(--bg-panel-soft); box-shadow: var(--raised-row); color: var(--text); font-weight: 600; }
.snote { margin: 0; padding: 0 3px; font: 400 12px/16px var(--font-ui); color: var(--text-muted); }
.tagcloud { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 2px; }
.tagbtn { height: 22px; padding: 0 7px; border-radius: 4px; border: 1px solid var(--line); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-tile); font: 600 12px/16px var(--font-ui); display: inline-flex; align-items: center; gap: 4px; }
.tagbtn span { opacity: .7; font-weight: 500; }
.tagbtn[aria-pressed="true"] { border-color: transparent; background: linear-gradient(180deg, var(--tile-highlight), transparent 62%), var(--text); color: var(--text-on); box-shadow: var(--shadow-button); }
.storage { margin-top: auto; padding: 8px 3px 0; display: flex; flex-direction: column; gap: 3px; font: 400 12px/16px var(--font-ui); color: var(--text-muted); }
.storage b { color: var(--text); font-weight: 600; }
.mmain { position: relative; flex: 1; min-width: 0; overflow: auto; padding: 20px 20px 22px 22px; display: flex; flex-direction: column; gap: 11px; }
.mbar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.mbar .search { width: auto; }
.sortbox { height: 31px; padding: 0 8px; border-radius: var(--radius-control); border: 1px solid var(--line); background: var(--bg-panel); box-shadow: var(--shadow-tile); display: inline-flex; align-items: center; gap: 6px; font: 500 12px/16px var(--font-ui); color: var(--text-muted); }
.sortbox select { border: 0; background: transparent; font: 600 12px/16px var(--font-ui); color: var(--text); }
.suggest { position: absolute; left: 0; top: 35px; width: min(266px, 100%); z-index: 8; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-overlay); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.suggest .shead { font: 700 12px/16px var(--font-ui); letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); padding: 4px 7px 2px; }
.sopt { height: 28px; border: 0; border-radius: 4px; background: transparent; display: flex; align-items: center; gap: 7px; padding: 0 7px; font: 500 12px/16px var(--font-ui); color: var(--text); text-align: left; }
.sopt svg { color: var(--accent); position: static; }
.sopt:hover, .sopt:focus-visible { background: var(--bg-panel-soft); }
.sopt .count { font-size: 12px; color: var(--text-muted); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fchip { height: 22px; padding: 0 3px 0 7px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; gap: 4px; font: 600 12px/16px var(--font-ui); white-space: nowrap; }
.fchip .k { font-weight: 500; opacity: .8; }
.fchip button { width: 17px; height: 17px; border: 0; border-radius: 3px; background: transparent; color: inherit; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.mgrid, .fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 15px 13px; }
.mlist { display: flex; flex-direction: column; gap: 6px; }
.mlist .mtile { flex-direction: row; align-items: center; gap: 10px; }
.mlist .thumb { width: 67px; height: 45px; flex: none; }
.mtile { border: 0; padding: 0; background: transparent; text-align: left; display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--text); }
.thumb { position: relative; display: block; height: 90px; border-radius: 7px; border: 3px solid var(--picture-frame); overflow: hidden; background: var(--bg-panel-soft); box-shadow: 0 6px 14px var(--shadow-strong); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.k-video { background: var(--layer-field); color: var(--layer-text); } .thumb.k-audio { background: var(--accent-soft); color: var(--accent); }
.thumb .ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.thumb .ph b { font: 700 12px/16px var(--font-ui); letter-spacing: .04em; }
.thumb .scrim { position: absolute; right: 4px; bottom: 4px; height: 17px; padding: 0 6px; border-radius: 8px; background: var(--scrim); color: var(--scrim-on); font: 400 12px/17px var(--font-ui); }
.thumb .badge { position: absolute; left: 4px; top: 4px; height: 15px; padding: 0 6px; border-radius: 8px; background: var(--bg-panel); color: var(--text); font: 700 12px/16px var(--font-ui); }
.thumb .tick { position: absolute; right: 4px; top: 4px; width: 17px; height: 17px; border-radius: 8px; background: var(--accent); color: var(--accent-on); display: flex; align-items: center; justify-content: center; }
.mtile[aria-pressed="true"] .thumb { outline: 3px solid var(--accent); outline-offset: 3px; }
.mname { font: 600 12px/16px var(--font-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.mmeta { font: 400 12px/16px var(--font-ui); color: var(--text-muted); padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lsub { margin: 0; font: 400 12px/16px var(--font-ui); color: var(--layer-muted); }
.lsub a { color: var(--layer-text); }
.lpreview { width: 100%; height: 119px; object-fit: cover; border-radius: 8px; border: 3px solid var(--picture-frame); box-shadow: 0 8px 18px rgba(0,0,0,.35); background: #000; flex: none; }
.laudio { width: 100%; }
.lhint { display: block; margin-top: 4px; font: 400 12px/16px var(--font-ui); color: var(--layer-muted); }
.ltags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ltag { height: 20px; padding: 0 3px 0 7px; border-radius: 4px; background: var(--layer-field); border: 1px solid var(--layer-line); display: inline-flex; align-items: center; gap: 3px; font: 600 12px/16px var(--font-ui); }
.ltag button { width: 14px; height: 14px; border: 0; border-radius: 2px; background: transparent; color: var(--layer-muted); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.taginput { height: 20px; min-width: 63px; flex: 1; border: 1px dashed var(--layer-line); border-radius: 4px; background: transparent; color: var(--layer-text); padding: 0 7px; font: 500 12px/16px var(--font-ui); }
.luses { display: flex; flex-direction: column; gap: 6px; }
.luse { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 5px; background: var(--layer-field); border: 1px solid var(--layer-line); color: var(--layer-text); text-decoration: none; }
.luse b { display: block; font: 600 12px/16px var(--font-ui); } .luse span span, .luse .grow span { display: block; font: 400 12px/16px var(--font-ui); color: var(--layer-muted); }
.uicon { width: 22px; height: 22px; flex: none; border-radius: 4px; background: var(--accent); color: var(--accent-on); display: flex; align-items: center; justify-content: center; }
.linfo { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font: 400 12px/16px var(--font-ui); }
.linfo dt { color: var(--layer-muted); } .linfo dd { margin: 0; color: var(--layer-text); }
.lnote { display: flex; align-items: center; gap: 6px; }
.checkpanel, .uptray { position: absolute; left: 22px; right: 20px; bottom: 17px; z-index: 6; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-overlay); padding: 15px 17px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100% - 98px); overflow: auto; }
.checkpanel h2, .uptray h2 { margin: 0; font: 300 17px/21px var(--font-heading); }
.uptray h2 { font-size: 13px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.flabel { display: flex; align-items: center; font: 600 12px/16px var(--font-ui); color: var(--text-muted); margin-bottom: 4px; }
.tagbox { min-height: 31px; padding: 4px 6px; border-radius: var(--radius-control); border: 1px solid var(--line-strong); background: var(--bg-panel); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tagbox input { flex: 1; min-width: 63px; border: 0; outline: none; background: transparent; font: 400 12px/16px var(--font-ui); }
.checklist { display: flex; flex-direction: column; gap: 7px; }
.crow, .uprow { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 7px; border: 1px solid var(--line); }
.uprow { border: 0; padding: 3px 0; align-items: center; }
.crow p, .uprow p { margin: 0; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font: 400 12px/16px var(--font-ui); }
.crow p span, .uprow p .count { font-size: 12px; color: var(--text-muted); }
.uprow .count.err { color: var(--text); font-weight: 600; }
.cicon { width: 25px; height: 25px; flex: none; border-radius: 4px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.verdict { margin-top: 3px !important; align-items: flex-start !important; }
.vmark { width: 15px; height: 15px; flex: none; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-on); }
.v-advise .vmark { background: var(--status-review); color: var(--status-review-on); } .v-stop .vmark { background: var(--text); color: var(--text-on); }
.bar { display: block; height: 4px; margin-top: 4px; border-radius: 2px; background: var(--line); overflow: hidden; } .bar b { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width .2s; }
.fnote { display: flex; align-items: center; gap: 6px; } .fnote svg { color: var(--accent); }
.fgrid .thumb { height: 98px; }
.fgrid .badge { white-space: nowrap; }

/* Reviews */
.rnote { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.rlist { display: flex; flex-direction: column; gap: 10px; }
.rrow { display: flex; align-items: center; gap: 13px; padding: 11px 13px; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow-tray); }
.rrow h3 { margin: 3px 0; font: 400 14px/18px var(--font-heading); }
.rrow .ref { font: 400 12px/16px var(--font-ui); color: var(--text-muted); }
.rmeta { flex-wrap: wrap; gap: 10px; font: 400 12px/16px var(--font-ui); color: var(--text-muted); }
.rmeta .cmt { display: inline-flex; align-items: center; gap: 4px; }
.rpic { width: 78px; height: 59px; flex: none; border-radius: 6px; border: 3px solid var(--picture-frame); overflow: hidden; box-shadow: 0 6px 14px var(--shadow-strong); background: var(--accent-soft); box-sizing: border-box; }
.rpic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.abox { border: 1px solid var(--line); border-radius: 8px; background: var(--bg-panel); padding: 10px 13px; }
.abox summary { font: 600 12px/16px var(--font-ui); cursor: pointer; display: flex; align-items: center; }
.alist { display: flex; flex-direction: column; gap: 3px; margin-top: 7px; }
.alist .switch { display: flex; align-items: center; gap: 8px; min-height: var(--control); width: 100%; border: 0; background: transparent; text-align: left; font: 500 12px/16px var(--font-ui); color: var(--text); padding: 0; }
.alist .switch span { flex: 1; } .alist small { color: var(--text-muted); }
.cpane { position: static; width: 294px; flex: none; border-radius: 12px 0 0 12px; animation: none; }
.lsub2 { margin: 0; font: 400 12px/16px var(--font-ui); color: var(--text-muted); }
.legend { padding: 8px 11px 11px; display: flex; flex-direction: column; gap: 4px; font: 400 12px/16px var(--font-ui); color: var(--text-muted); }
.legend span { display: flex; align-items: center; gap: 6px; }
.cdot { width: 7px; height: 7px; flex: none; border-radius: 4px; box-sizing: border-box; }
.cdot.open { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cdot.resolved { border: 2px solid var(--line-strong); }
.strip button .cdot { margin-right: 4px; }
.pinframe { position: relative; flex: none; }
.pincatch { position: absolute; inset: 0; cursor: crosshair; z-index: 3; border-radius: 12px; }
.pin { position: absolute; z-index: 4; width: 21px; height: 21px; margin: -10px 0 0 -10px; border-radius: 10px 10px 10px 2px; border: 2px solid var(--picture-frame); background: var(--accent); color: var(--accent-on); font: 700 12px/18px var(--font-ui); text-align: center; padding: 0; box-shadow: 0 4px 10px var(--shadow-strong); cursor: pointer; }
.pin.changed { background: var(--status-review); color: var(--status-review-on); }
.pin.resolved { background: var(--line-strong); }
.pin.new { background: var(--text); color: var(--text-on); pointer-events: none; }
.composer { display: flex; gap: 6px; align-items: flex-start; }
.composer textarea { flex: 1; }
.ccard { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 7px; background: var(--layer-field); border: 1px solid var(--layer-line); }
.ccard p { color: var(--layer-text) !important; }
.ccard.resolved { flex-direction: row; align-items: center; background: transparent; border-style: dashed; font: 400 12px/16px var(--font-ui); color: var(--layer-muted); }
.ccard.resolved .who { flex: 1; }
.chead { display: flex; align-items: center; gap: 6px; font: 400 12px/16px var(--font-ui); color: var(--layer-muted); }
.chead b { font: 600 12px/16px var(--font-ui); color: var(--layer-text); }
.pinmini { width: 15px; height: 15px; border-radius: 8px 8px 8px 2px; background: var(--accent); color: var(--accent-on); font: 700 12px/16px var(--font-ui); text-align: center; flex: none; }
.pinmini.changed { background: var(--status-review); color: var(--status-review-on); }
.creply { margin-left: 20px; font: 400 12px/16px var(--font-ui); color: var(--layer-muted); }
.creply b { color: var(--layer-text); font-size: 12px; }
.cacts { display: flex; gap: 6px; justify-content: flex-end; }
.cacts .btn { flex: none; }
.rmark { display: inline-flex; align-items: center; gap: 3px; }
.checks { display: flex; flex-direction: column; gap: 7px; }
.check { display: flex !important; align-items: center; gap: 7px; color: var(--layer-text) !important; }
.check.no .vmark { background: var(--status-review); color: var(--status-review-on); }
.layer-foot.col { flex-direction: column; align-items: stretch; }
.layer-foot .row .btn { flex: 1; }
.sentback { margin: 0 25px; display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 7px; background: var(--status-review); color: var(--status-review-on); font: 500 12px/16px var(--font-ui); }
.statusbox { display: flex; flex-direction: column; gap: 7px; }
.suggest[hidden], .checkpanel[hidden] { display: none; }
.layer-foot.wrap { flex-wrap: wrap; }
.layer-foot.wrap .btn.brand { flex-basis: 100%; }

/* Library picker */
.pdim { z-index: 9; }
.picker { position: absolute; right: 0; top: 0; bottom: 0; width: min(574px, 100%); z-index: 10; background: var(--bg-panel); border-radius: 12px 0 0 12px; box-shadow: var(--shadow-raised); display: flex; flex-direction: column; animation: slide-left .28s cubic-bezier(.2,.7,.2,1) both; }
.picker > * { padding-left: 17px; padding-right: 17px; }
.picker .phead { padding-top: 17px; align-items: flex-start; }
.picker .phead h2 { margin: 2px 0 0; font: 300 21px/25px var(--font-heading); }
.picker > .mbar { padding-top: 11px; }
.pfilters { padding-top: 8px; }
.flabel.inline { margin: 0 0 0 4px; }
.pgrid { flex: 1; min-height: 0; overflow: auto; padding-top: 13px; padding-bottom: 13px; display: grid; grid-template-columns: repeat(auto-fill, minmax(119px, 1fr)); gap: 14px 11px; align-content: start; }
.pgrid .thumb { height: 78px; }
.pgrid .empty { grid-column: 1 / -1; }
.pfoot { display: flex; align-items: center; gap: 10px; padding-top: 11px; padding-bottom: 13px; border-top: 1px solid var(--line); }
.pfoot .col { display: flex; flex-direction: column; gap: 3px; }
.pfoot .note { display: flex; align-items: center; gap: 3px; }
.pthumb { width: 50px; height: 36px; flex: none; border-radius: 4px; border: 3px solid var(--picture-frame); overflow: hidden; box-shadow: 0 4px 10px var(--shadow-strong); background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pickrow { display: flex; flex-direction: column; gap: 6px; }
.layer .pickbtn { justify-content: center; background: var(--layer-field); color: var(--layer-text); border-color: var(--layer-line); }
/* The learner card on the stage is a preview: shown smaller, measured at its real size (the fit check reads unscaled sizes). */
.stage-body > .ms-page, .stage-body .pinframe > .ms-page { zoom: .8; }

/* Course settings: the dark panel with folding sections (board 21) */
.layer.settings { width: max(var(--layer-width), 360px); }
.settings .layer-head { flex-direction: column; align-items: stretch; gap: 10px; }
.settings .layer-head .row { display: flex; align-items: flex-start; gap: 8px; }
.settings .layer-head .sub { font: 400 12px/16px var(--font-ui); color: var(--layer-muted); }
.settings .grow { flex: 1; min-width: 0; }
.settings .col { display: flex; flex-direction: column; }
.settings .stepper { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--layer-field); border: 1px solid var(--layer-line); }
.settings .stepper span { flex: 1 1 auto; min-width: 0; padding: 0 6px; height: 25px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font: 500 11.5px/16px var(--font-ui); overflow: hidden; color: var(--layer-muted); white-space: nowrap; }
.settings .stepper span i { width: 9px; height: 9px; border-radius: 5px; border: 1.5px solid var(--layer-muted); box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; }
.settings .stepper span.past i { background: var(--layer-muted); }
.settings .stepper span.on { background: var(--accent); color: var(--accent-on); font-weight: 700; }
.settings .stepper span.on i { width: 11px; height: 11px; border: 0; background: var(--accent-on); color: var(--accent); }
.settings .sec { border: 1px solid var(--layer-line); border-radius: 11px; flex: none; }
.settings .sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 10px 11px; border-radius: 11px; }
.settings .sec > summary::-webkit-details-marker { display: none; }
.settings .sec > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.settings .sec .chev { display: inline-flex; color: var(--layer-muted); transition: transform .2s; }
.settings .sec[open] .chev { transform: rotate(90deg); }
.settings .sec .st { font: 600 13px/17px var(--font-ui); color: var(--layer-text); white-space: nowrap; }
.settings .sec .medal { display: inline-flex; color: var(--brand); }
.settings .sec .sum { flex: 1; min-width: 0; text-align: right; font: 400 12px/16px var(--font-ui); color: var(--layer-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings .sec[open] .sum { visibility: hidden; }
.settings .secbody { border-top: 1px solid var(--layer-line); padding: 11px; display: flex; flex-direction: column; gap: 10px; }
.settings .secbody h3 { display: flex; align-items: center; gap: 4px; }
.settings .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.settings .row { display: flex; gap: 6px; align-items: center; }
.settings .mono { font-family: ui-monospace, Menlo, monospace; }
.settings .lfield:disabled, .settings select:disabled { opacity: .7; border-style: dashed; }
.settings p { margin: 0; }
.settings .snote:empty { display: none; }
.settings .snote { color: var(--status-review); }
.settings .opt[aria-pressed="true"] { background: var(--layer-text); color: var(--layer-bg); border-color: var(--layer-text); }
.settings .switch { align-items: center; min-height: 34px; }
.settings .switch b { display: flex; align-items: center; gap: 4px; font: 600 13px/17px var(--font-ui); }
.settings .switch small { display: block; font: 400 12px/16px var(--font-ui); color: var(--layer-muted); }
.settings .msel { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 4px; border-radius: 6px; border: 1px solid var(--layer-line); background: var(--layer-field); }
.settings .mchip { height: 22px; padding: 0 3px 0 8px; border-radius: 7px; background: var(--layer-bg); border: 1px solid var(--layer-line); display: inline-flex; align-items: center; gap: 3px; font: 600 12px/16px var(--font-ui); }
.settings .mchip button { all: unset; cursor: pointer; display: inline-flex; color: var(--layer-muted); }
.settings .msel .add { width: auto; flex: 1; min-width: 120px; min-height: 24px; padding: 2px 4px; border: 0; background: transparent; color: var(--layer-muted); }
.settings .hintbox { display: flex; gap: 6px; align-items: center; padding: 7px 8px; border-radius: 8px; border: 1px dashed var(--layer-line); background: var(--layer-field); color: var(--layer-muted); }
.settings .hintbox svg { color: var(--layer-text); flex: none; }
.settings .lrows { display: flex; flex-direction: column; gap: 6px; }
.settings .lrow { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 10px; background: var(--layer-field); border: 1px solid var(--layer-line); }
.settings .lrow.bad { border-color: var(--status-review); }
.settings .lrow b { font: 600 12px/16px var(--font-ui); }
.settings .lrow small, .settings .hit small { font: 400 12px/16px var(--font-ui); color: var(--layer-muted); }
.settings .lic { width: 24px; height: 24px; flex: none; border-radius: 7px; background: var(--layer-line); display: inline-flex; align-items: center; justify-content: center; }
.settings .lic.req { background: var(--accent); color: var(--accent-on); }
.settings .lrow .part { margin-top: 2px; min-height: 22px; border-radius: 5px; border: 1px solid var(--layer-line); background: var(--layer-bg); color: var(--layer-text); font: 400 12px/16px var(--font-ui); }
.settings .kind { height: 20px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--layer-line); background: transparent; color: var(--layer-text); font: 600 12px/16px var(--font-ui); white-space: nowrap; cursor: pointer; }
.settings .kind.req { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.settings .x { all: unset; cursor: pointer; display: inline-flex; color: var(--layer-muted); padding: 2px; }
.settings .lresults { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.settings .lresults:empty { display: none; }
.settings .hit { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; padding: 6px 7px; border-radius: 7px; cursor: pointer; }
.settings .hit:hover:not(:disabled) { background: var(--layer-field); }
.settings .hit:disabled { opacity: .55; cursor: default; }
.settings .hit b { font: 600 12px/16px var(--font-ui); }
.settings .why { display: inline-flex; align-items: center; gap: 3px; font: 600 12px/16px var(--font-ui); color: var(--layer-muted); white-space: nowrap; }
.settings .why.ok, .settings .okline { color: var(--layer-text); }
.settings .okline, .settings .badline { display: inline-flex; align-items: center; gap: 4px; font: 600 12px/16px var(--font-ui); }
.settings .badline { color: var(--status-review); }
.settings .pchips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.settings .pchip { height: 22px; padding: 0 8px 0 6px; border-radius: 11px; background: var(--layer-field); border: 1px solid var(--layer-line); display: inline-flex; align-items: center; gap: 4px; font: 600 12px/16px var(--font-ui); }
.settings hr { border: 0; border-top: 1px solid var(--layer-line); margin: 2px 0; width: 100%; }
.settings .wcard { height: 45px; border-radius: 10px; background: var(--accent); color: var(--accent-on); display: flex; align-items: center; gap: 8px; padding: 0 11px; }
.settings .wcard > span { flex: 1; display: flex; flex-direction: column; }
.settings .wcard small { display: inline-flex; align-items: center; gap: 4px; font: 600 12px/14px var(--font-ui); opacity: .85; }
.settings .wcard b { font: 600 13px/17px var(--font-ui); }
.settings .wcard i { width: 22px; height: 22px; border-radius: 4px; background: var(--accent-soft); }
.settings .crit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.settings .crit li { display: flex; gap: 7px; align-items: flex-start; }
.settings .crit .box { width: 14px; height: 14px; flex: none; margin-top: 2px; border-radius: 4px; border: 1.5px solid var(--layer-muted); box-sizing: border-box; }
.settings .crit b { font: 600 12px/16px var(--font-ui); }
.settings .crit small { font: 400 12px/16px var(--font-ui); color: var(--layer-muted); }
.settings .crit .who { flex: none; font: 600 12px/16px var(--font-ui); color: var(--layer-muted); border: 1px solid var(--layer-line); border-radius: 8px; padding: 0 6px; }
.settings .btn.wide { width: 100%; justify-content: center; }

/* Pathways (boards 6, 22, 22b) */
.course.pw { margin-bottom: 12px; }
.course.pw .sheets, .course.pw .sheets::after { position: absolute; left: 12px; right: 12px; bottom: -6px; height: 30px; border-radius: 0 0 13px 13px; background: var(--cv); opacity: .5; z-index: -1; }
.course.pw .sheets::after { content: ""; left: 12px; right: 12px; bottom: -6px; opacity: .6; }
.course .stepstrip { justify-content: flex-start; gap: 12px; align-self: flex-start; }
.course .stepstrip::before { border-top: 1px solid var(--cv-line); }
.course .stepstrip .mark, .course .stepstrip .mark.qb, .course .stepstrip .mark.dd, .course .stepstrip .mark.mc { width: 24px; height: 24px; border-radius: 12px; border: 1px solid rgba(255,255,255,.26); background: color-mix(in srgb, var(--cv) 70%, #FFFFFF 14%); color: #FFFFFF; }
.course .stepstrip .mark.todo { outline: 1.5px dashed var(--cv-muted); outline-offset: 2px; color: var(--cv-muted); }
.course .stepstrip .mark.award { height: 24px; padding: 0 9px; border-radius: 12px; background: color-mix(in srgb, var(--cv) 70%, #FFFFFF 14%); border-color: rgba(255,255,255,.26); color: #FFFFFF; font: 600 11px/14px var(--font-ui); }
.stepstrip { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.stepstrip::before { content: ""; position: absolute; left: 8px; right: 8px; top: 50%; border-top: 1.5px solid var(--line); }
.stepstrip .mark { position: relative; width: 20px; height: 20px; flex: none; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; border: 1px solid var(--line-strong); background: var(--bg-panel); color: var(--text); }
.stepstrip .mark.qb { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.stepstrip .mark.dd { background: var(--text); border-color: var(--text); color: var(--text-on); }
.stepstrip .mark.mc { background: var(--brand); border-color: var(--brand); color: var(--brand-on); }
.stepstrip .mark.todo { outline: 1.5px dashed var(--line-strong); outline-offset: 2px; }
.stepstrip .mark.award { width: auto; padding: 0 6px; gap: 3px; background: var(--pathway, #0F4B50); border-color: var(--pathway, #0F4B50); color: #FFFFFF; font: 600 12px/16px var(--font-ui); }
.pwside { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; }
.pwside .tag.pwtag { background: var(--pathway, #0F4B50); color: #FFFFFF; }
.pwside .sidehead { margin: 8px 0 0; display: flex; align-items: center; gap: 4px; font: 600 12px/16px var(--font-ui); color: var(--text-muted); }
.pwside .tray.small .pill { flex: 1; }
.pwside .addsteps { display: flex; flex-direction: column; gap: 6px; }
.pwside .addstep { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-panel); color: var(--text); text-align: left; cursor: pointer; }
.pwside .addstep:hover { border-color: var(--line-strong); }
.pwside .addstep .ic { width: 26px; height: 26px; border-radius: 7px; background: var(--text); color: var(--text-on); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pwside .addstep b { font: 600 13px/17px var(--font-ui); }
.pwside .addstep small { font: 400 12px/16px var(--font-ui); color: var(--text-muted); }
.pwside .col, .pwstage .col { display: flex; flex-direction: column; }
.pwside .grow, .pwstage .grow { flex: 1; min-width: 0; }
.wcard.big { height: 70px; border-radius: 12px; background: var(--pathway, #0F4B50); color: #FFFFFF; display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.wcard.big > span { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.wcard.big small { display: inline-flex; align-items: center; gap: 4px; font: 600 12px/14px var(--font-ui); opacity: .85; }
.wcard.big b { font: 600 15px/19px var(--font-ui); }
.wcard.big i { width: 22px; height: 22px; border-radius: 4px; background: #E6EEEE; }
.pwbody { flex: 1; overflow: auto; padding: 4px 4px 30px; display: flex; flex-direction: column; gap: 14px; }
.pwhead { display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.pwhead .title { margin: 0; }
.pwhead .info { display: flex; flex-wrap: wrap; gap: 5px; }
.pwhead .chip, .stepcard .chip { height: 20px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-panel); display: inline-flex; align-items: center; gap: 3px; font: 600 12px/16px var(--font-ui); color: var(--text); }
.pwhead .chip.ok { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.stepcard .chip.warn { background: var(--status-review); color: var(--status-review-on); border-color: transparent; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.steps .empty { padding: 20px; }
.stepli { position: relative; display: flex; align-items: center; gap: 12px; }
.stepli:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 50%; height: calc(100% + 8px); border-left: 1.5px solid var(--line-strong); }
.stepli .num { position: relative; width: 25px; height: 25px; flex: none; border-radius: 13px; border: 1.5px solid var(--line-strong); background: var(--bg-ground); display: inline-flex; align-items: center; justify-content: center; font: 600 12px/16px var(--font-ui); }
.stepli .num.on { border-color: var(--text); color: var(--text); font-weight: 700; }
.stepcard { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; background: var(--bg-panel); border: 1px solid var(--line); box-shadow: 0 1px 2px var(--shadow-soft); cursor: pointer; }
.stepcard.on { background: linear-gradient(180deg, var(--tile-highlight), transparent 62%), var(--bg-panel-soft); color: var(--text); border-color: var(--line); box-shadow: var(--raised-row); }
.stepcard.todo:not(.on) { border-style: dashed; }
.stepcard small { font: 400 12px/16px var(--font-ui); color: var(--text-muted); }
.stepcard b { font: 400 15px/20px var(--font-heading); }
.stepcard .chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.stepcard .sic { width: 34px; height: 34px; flex: none; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--bg-panel-soft); color: var(--text); }
.stepcard .sic.qb { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.stepcard .sic.dd { background: var(--text); color: var(--text-on); }
.stepcard .sic.mc { background: var(--brand); color: var(--brand-on); border-color: transparent; }
.stepcard .moves { display: flex; flex-direction: column; }
.stepcard .mv { all: unset; cursor: pointer; display: inline-flex; padding: 2px; border-radius: 5px; color: inherit; opacity: .7; }
.stepcard .mv:disabled { opacity: .25; cursor: default; }
.settings .secbody.bare { border: 0; padding: 0; }
.settings .now img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; border: 2px solid var(--picture-frame); display: block; }
.pwside { padding: 14px 12px; box-sizing: border-box; }
.pwstage .tray .pill, .pwside .tray .pill { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.pwside .tray.small { display: flex; }
.pwhead .stepstrip { justify-content: flex-start; gap: 16px; align-self: flex-start; }
.pwside .tray.small { flex-direction: row; flex-wrap: nowrap; } .pwside .tray.small .pill { padding: 0 8px; }

/* ---------- Admin (Screens canvas, page "Admin") and the account menu ---------- */
.menu-tag { height: 15px; padding: 0 6px; border-radius: 8px; background: var(--menu-active); color: var(--menu-text); font: 700 11px/15px var(--font-ui); letter-spacing: .06em; margin: -4px 0 4px; }
.pop.acct { width: 252px; gap: 6px; }
.acct-who { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.avatar { width: 28px; height: 28px; flex: none; border-radius: 14px; background: var(--text); color: var(--text-on); display: inline-flex; align-items: center; justify-content: center; font: 700 12px/1 var(--font-ui); }
.acct-label { margin: 4px 0 0; font: 700 12px/16px var(--font-ui) !important; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.acct-row { min-height: 34px; border: 0; border-radius: 6px; background: transparent; display: flex; align-items: center; gap: 8px; padding: 3px 7px; text-align: left; color: var(--text); }
.acct-row .grow { flex: 1; display: flex; flex-direction: column; }
.acct-row b { font: 600 12px/16px var(--font-ui); }
.acct-row small { font: 400 12px/16px var(--font-ui); color: var(--text-muted); }
.acct-row[aria-current="true"] { background: linear-gradient(180deg, var(--tile-highlight), transparent 62%), var(--bg-panel-soft); box-shadow: var(--shadow-tile); }
.acct-row:disabled { opacity: .5; cursor: default; }
.page.admin { --page-gap: 13px; }
.work:has(.apanel) .page.admin { padding-right: calc(max(var(--layer-width), 360px) + 25px); }
.page.admin > .tray, .toolbar > .tray { align-self: flex-start; }
.atop { display: flex; align-items: center; gap: 10px; }
.atop .grow, .row .grow, .toolbar .grow { flex: 1; }
.cwrap { position: relative; }
.cbar { height: var(--control); padding: 0 8px 0 4px; border-radius: var(--radius-control); border: 1px solid var(--line); background: var(--bg-panel); box-shadow: var(--shadow-tile); display: inline-flex; align-items: center; gap: 7px; color: var(--text); }
.cbar b { font: 600 12px/16px var(--font-ui); }
.cbar small { font: 500 12px/16px var(--font-ui); color: var(--text-muted); }
.cbar:disabled { cursor: default; }
.clogo { min-width: 25px; height: 25px; padding: 0 3px; border-radius: 6px; background: var(--text); color: var(--text-on); display: inline-flex; align-items: center; justify-content: center; font: 800 12px/1 var(--font-ui); letter-spacing: .02em; }
.pop.cpop { position: absolute; left: 0; top: calc(var(--control) + 6px); bottom: auto; width: 266px; }
.agrid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 13px; align-items: start; }
.agrid.wide2 { grid-template-columns: 1fr 1.45fr; }
.col { display: flex; flex-direction: column; }
.col.gap { gap: 13px; }
.acard { background: var(--bg-panel); border: 1px solid var(--line); border-radius: 14px; padding: 15px; display: flex; flex-direction: column; gap: 11px; box-shadow: var(--shadow-card); }
.acard h2 { margin: 0; display: flex; align-items: center; gap: 4px; font: 400 15px/20px var(--font-heading); }
.acard .note { margin-top: 2px; }
.arow { display: flex; gap: 8px; }
.arow > * { flex: 1; min-width: 0; }
.afield { display: flex; flex-direction: column; gap: 4px; }
.alabel { display: flex; align-items: center; gap: 2px; font: 500 12px/16px var(--font-ui); color: var(--text); }
.field:disabled { background: var(--bg-panel-soft); border-style: dashed; border-color: var(--line); color: var(--text-muted); }
select.field { appearance: auto; }
.note.warn { color: var(--status-review-on); }
.big { display: flex; align-items: baseline; gap: 7px; }
.big b { font: 300 26px/30px var(--font-heading); }
.big span { color: var(--text-muted); }
.achecklist { max-height: 260px; overflow: auto; }
.sub3 { margin: 4px 0 0; font: 700 12px/16px var(--font-ui); color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.hist { display: flex; gap: 10px; font: 400 12px/17px var(--font-ui); }
.hist span:first-child { width: 80px; flex: none; color: var(--text-muted); }
/* Notes are plain text, never boxed (house rule): an icon and one or two lines. Muted for information; amber-brown
   and a little heavier for something to act on now. */
.notebox { display: flex; gap: 6px; align-items: flex-start; padding: 0; font: 400 12px/17px var(--font-ui); color: var(--text-muted); }
.notebox svg { flex: none; width: 16px; height: 16px; margin-top: 0; }
.notebox.warn { color: var(--status-review-on); font-weight: 600; }
.atable { background: var(--bg-panel); border: 1px solid var(--line); border-radius: 12px; overflow: auto; }
.atable table { width: 100%; border-collapse: collapse; }
.atable th { text-align: left; padding: 7px 8px; font: 700 12px/16px var(--font-ui); letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.atable td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.atable tr:last-child td { border-bottom: 0; }
.atable .empty { border: 0; }
.atable tr.click { cursor: pointer; }
.atable tr.click:hover, .atable tr.click:focus-visible { background: var(--accent-soft); }
.atable tr.bad { background: var(--bg-panel-soft); }
.muted { color: var(--text-muted); }
.who { display: flex; align-items: center; gap: 7px; }
.pills-wrap { display: flex; gap: 3px; flex-wrap: wrap; }
.search.wide { width: 280px; }
.selwrap .field { width: auto; }
.acard .switch { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 0; text-align: left; color: var(--text); }
.acard .switch span { flex: 1; display: flex; flex-direction: column; }
.acard .switch b { font: 600 12px/16px var(--font-ui); display: inline-flex; align-items: center; }
.acard .switch small, .apanel .switch small { font: 400 12px/16px var(--font-ui); color: var(--text-muted); }
.apanel .switch small { color: var(--layer-muted); }
.apanel .switch span { display: flex; flex-direction: column; }
.apanel .switch b { font: 600 12px/16px var(--font-ui); }
.apanel .opt[aria-pressed="true"] { background: var(--layer-text); color: var(--layer-bg); border-color: var(--layer-text); }
.alrow { display: flex; gap: 6px; }
.alrow > * { flex: 1; min-width: 0; }
.lgroup { gap: 6px; }
.lgroup h3 { margin: 0; }
.lgroup h3 label { font: inherit; color: inherit; }
.lstats { display: flex; gap: 6px; }
.lstats span { flex: 1; padding: 7px; border-radius: 8px; background: var(--layer-field); border: 1px solid var(--layer-line); display: flex; flex-direction: column; color: var(--layer-muted); font: 400 12px/16px var(--font-ui); }
.lstats b { font: 300 18px/22px var(--font-heading); color: var(--layer-text); }
.pwho { display: flex; align-items: center; gap: 8px; }
.pwho .avatar { width: 39px; height: 39px; border-radius: 20px; font-size: 14px; background: var(--accent); color: var(--accent-on); } /* the initials showed dark on dark (27 Nov 2026) */
.mlist { display: flex; flex-direction: column; gap: 4px; }
.mrow { display: flex; align-items: center; gap: 7px; padding: 5px 6px; border-radius: 8px; background: var(--layer-field); border: 1px solid var(--layer-line); }
.mrow .grow { display: flex; flex-direction: column; }
.mrow small { color: var(--layer-muted); }
.mrow .avatar { width: 24px; height: 24px; font-size: 12px; background: var(--accent); color: var(--accent-on); }
.layer .chip .x { border: 0; background: transparent; color: inherit; padding: 0; display: inline-flex; }
.secrets { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 10px; background: var(--bg-panel-soft); }
.secrets div { display: flex; justify-content: space-between; gap: 10px; }
.secrets b { font: 700 15px/20px var(--font-ui); letter-spacing: .04em; }
.row.end { justify-content: flex-end; }
.progstep { list-style: none; margin: 0; padding: 10px 13px; display: flex; align-items: center; gap: 8px; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 13px; }
.progstep li { display: flex; align-items: center; gap: 6px; font: 500 12px/16px var(--font-ui); color: var(--text-muted); white-space: nowrap; }
.progstep li + li::before { content: ""; width: 34px; height: 2px; background: var(--line); margin-right: 2px; }
.progstep .dot { width: 20px; height: 20px; border-radius: 10px; border: 1.5px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; font: 700 12px/1 var(--font-ui); }
.progstep li.done { color: var(--text); }
.progstep li.done .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.progstep li.done + li::before { background: var(--accent); }
.progstep li.now { color: var(--text); font-weight: 600; }
.progstep li.now .dot { background: var(--brand); border-color: var(--brand); color: var(--brand-on); }
.mapgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.prog { display: flex; flex-direction: column; gap: 3px; min-width: 150px; }
.pbar { height: 6px; border-radius: 3px; background: var(--bg-panel-soft); overflow: hidden; display: flex; }
.pbar .d { background: var(--accent); } .pbar .i { background: var(--accent-soft); } .pbar .l { background: var(--text); }
.prog small { color: var(--text-muted); font: 400 12px/16px var(--font-ui); }
.ticon { width: 23px; height: 23px; flex: none; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-on); }
.ticon.t-deep_dive { background: var(--text); color: var(--text-on); }
.slips { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.slip { padding: 10px; border: 1px dashed var(--line-strong); margin: -0.5px; display: flex; flex-direction: column; gap: 2px; break-inside: avoid; }
.slip-co { display: flex; align-items: center; gap: 5px; font: 600 12px/16px var(--font-ui); margin-bottom: 3px; }
.slip b { font-weight: 700; }
.slip small { color: var(--text-muted); }
.empty.solo { margin: 60px auto; max-width: 420px; }
@media print {
  body { background: #FFFFFF; }
  .menu, .atop, .pgtop, .pghead, .title, .stats, .acard, .notebox, .page.admin > .row, .apanel, .progstep, .stepsbar { display: none !important; }
  .shell, .work, .page { display: block !important; overflow: visible !important; height: auto !important; padding: 0 !important; }
  .slips { border: 0; padding: 0; }
  .slip { height: 64mm; }
  .slip:nth-child(8n) { break-after: page; }
}
.clogo.img { width: auto; max-width: 70px; min-width: 0; padding: 0; background: transparent; object-fit: contain; }
.logos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.logotile { display: flex; flex-direction: column; gap: 6px; font: 500 12px/16px var(--font-ui); }
.logotile .row { align-items: center; gap: 6px; }
.logobox { height: 70px; border-radius: 10px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 8px; color: var(--text-muted); }
.logotile.light .logobox { background: var(--picture-frame); color: var(--text-muted); }
.logotile.dark .logobox { background: var(--layer-bg); color: var(--layer-muted); border-color: var(--layer-line); }
.logobox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logotile label.btn { cursor: pointer; }
.logotile label.btn:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
/* My profile (board A12) */
.phead { display: flex; gap: 14px; align-items: center; }
.pphoto { width: 70px; height: 70px; flex: none; border-radius: 35px; object-fit: cover; background: var(--text); color: var(--text-on); display: inline-flex; align-items: center; justify-content: center; font: 300 24px/1 var(--font-heading); box-shadow: 0 0 0 3px var(--bg-panel), 0 0 0 4px var(--line); }
.pname { font: 400 18px/23px var(--font-heading); }
.col.gap6 { gap: 6px; }
.schemes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.scheme { padding: 7px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-panel); color: var(--text); display: flex; flex-direction: column; gap: 6px; font: 600 12px/16px var(--font-ui); }
.scheme[aria-pressed="true"] { background: linear-gradient(180deg, var(--tile-highlight), transparent 62%), var(--bg-panel-soft); box-shadow: var(--shadow-tile); }
.sw { display: flex; height: 18px; border-radius: 5px; overflow: hidden; border: 1px solid var(--line); }
.sw i { flex: 1; } .sw .m { background: var(--menu-bg); } .sw .p { background: var(--bg-panel); } .sw .a { background: var(--accent); }
.sigbox { height: 110px; border-radius: 10px; border: 1px dashed var(--line-strong); background: var(--picture-frame); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sigbox img { max-height: 100%; max-width: 100%; object-fit: contain; }
.sigpad { width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
/* Reports (board A11) and the report template (A13) */
.sentline { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font: 600 12px/16px var(--font-ui); }
.rwrap { overflow: auto; padding: 4px 2px 20px; }
.rsheet { width: 600px; max-width: 100%; margin: 0 auto; background: var(--r-paper); color: var(--r-ink); box-shadow: var(--shadow-card); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; font: 400 12px/17px "Inter", var(--font-ui); }
.rsheet.wide { width: 860px; }
.rsheet.outfit .rtitle b, .rsheet.outfit .ntile b { font-family: "Outfit", var(--font-heading); }
.rband { height: 8px; background: var(--r-main); }
.rhead { display: flex; align-items: center; gap: 12px; padding: 16px 24px 12px; border-bottom: 2px solid var(--r-second); }
.rlogo { max-height: 36px; max-width: 110px; object-fit: contain; }
.rlogo.code { height: 32px; min-width: 32px; padding: 0 6px; border-radius: 7px; background: var(--r-main); color: var(--r-paper); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.rtitle { flex: 1; display: flex; flex-direction: column; }
.rtitle b { font-size: 16px; line-height: 21px; color: var(--r-main); }
.rtitle span { color: var(--r-muted); }
.rbrand { height: 46px; width: auto; flex: none; object-fit: contain; }
.rtable { margin: 4px 24px 14px; width: calc(100% - 48px); border-collapse: collapse; }
.rtable th { background: var(--r-main); color: var(--r-paper); text-align: left; padding: 6px; font-size: 12px; font-weight: 700; }
.rtable td { padding: 5px 6px; border-bottom: 1px solid var(--r-line); }
.rtable tbody tr:nth-child(even) td { background: var(--r-rows); }
.rnone { margin: 14px 24px; color: var(--r-muted); }
.rfoot { margin-top: auto; padding: 10px 24px; border-top: 1px solid var(--r-line); display: flex; color: var(--r-muted); font-size: 12px; }
.rfoot span:first-child { flex: 1; }
.tplgrid { display: grid; grid-template-columns: 1fr; gap: 13px; }
.swrow { display: flex; gap: 10px; }
.swpick { display: flex; flex-direction: column; align-items: center; gap: 4px; font: 500 12px/16px var(--font-ui); color: var(--layer-muted); cursor: pointer; }
.swpick input { width: 36px; height: 36px; padding: 0; border: 2px solid var(--layer-line); border-radius: 9px; background: transparent; cursor: pointer; }
@media print {
  .page.admin > .atop, .page.admin > .pgtop, .page.admin > .pghead, .page.admin > .toolbar { display: none !important; }
  .rwrap { overflow: visible; padding: 0; }
  .rsheet { width: auto; box-shadow: none; border-radius: 0; }
  .rtable thead { display: table-header-group; }
  .rtable tr { break-inside: avoid; }
  @page { size: A4; margin: 12mm; }
  .rsheet.wide { page: wide; }
  @page wide { size: A4 landscape; margin: 12mm; }
}
/* The person's photo in the menu bar's Account button and the account menu */
.face { width: 25px; height: 25px; flex: none; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--menu-text); color: var(--menu-bg); font: 700 11px/1 var(--font-ui); box-shadow: 0 0 0 1.5px var(--menu-text); }
.face.big { width: 34px; height: 34px; font-size: 13px; background: var(--text); color: var(--text-on); box-shadow: 0 0 0 2px var(--bg-panel), 0 0 0 3px var(--line); }
.menu-item.account[aria-current="true"] .face { box-shadow: 0 0 0 2px var(--brand); }

/* The standard Checkbox (design system, agreed 23 Nov 2026) */
.cbx { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: var(--control); cursor: pointer; font: 600 12px/16px var(--font-ui); color: var(--text); }
.cbx input:focus-visible + .cbx-box { outline: 3px solid var(--accent); outline-offset: 2px; }
.achecks { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.aline { border-bottom: 1px solid var(--line); }

/* NumberTile (standard, 24 Nov 2026; left edge removed 26 Nov 2026): the number in light heading type, the label muted under it, on a soft fill. No bar on any side. */
.ntiles { display: flex; gap: 8px; }
.ntile { flex: 1; min-width: 0; padding: 10px 11px; border-radius: 8px; background: var(--bg-panel-soft); display: flex; flex-direction: column; }
.ntile b { font: 300 22px/26px var(--font-heading); }
.ntile span { color: var(--text-muted); }
/* On a report page the tiles take the report's colours. */
.rsheet .ntiles { padding: 12px 24px; }
.rsheet .ntile { padding: 8px; border-radius: 6px; background: var(--r-rows); }
.rsheet .ntile.first b { color: var(--r-main); }
.rsheet .ntile span { color: var(--r-muted); }
/* RecordCard (standard, 24 Nov 2026): optional small heading, icon and title, one line of description, chips, a foot line, links. */
.recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.rec { text-align: left; padding: 11px 12px; border-radius: 13px; background: var(--bg-panel); border: 1px solid var(--line); box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 6px; color: var(--text); font: inherit; }
button.rec { cursor: pointer; } button.rec:hover { border-color: var(--line-strong); }
.rec.later { opacity: .62; box-shadow: none; }
.rec-kicker { font: 700 12px/16px var(--font-ui); letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.rec-head { display: flex; align-items: center; gap: 7px; }
.rec-head b { font: 400 15px/20px var(--font-heading); }
.rec-icon { width: 25px; height: 25px; border-radius: 8px; background: var(--bg-panel-soft); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.rec-desc { flex: 1; margin: 0; }
.rec small { font: 400 12px/16px var(--font-ui); }
.rec small.muted { color: var(--text-muted); }
.rec-links { gap: 12px; }

/* In a dark panel, buttons take the dark version. */
.layer { --b2-bg: linear-gradient(180deg, #3E4A4C 0%, #313B3D 100%); --b2-fg: var(--layer-text); --b2-edge: rgba(0,0,0,.45); --b2-sh: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 3px rgba(0,0,0,.4), 0 6px 10px -4px rgba(0,0,0,.45);
  --b2-in: linear-gradient(180deg, #273032 0%, #2D3638 100%); --b2-in-fg: #B9C3C5; --b2-in-sh: inset 0 2px 5px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.06);
  --b1-bg: linear-gradient(180deg, #F6F8F8 0%, #DADFE0 100%); --b1-fg: #16191B; --b1-edge: rgba(0,0,0,.5); --b1-sh: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 3px rgba(0,0,0,.4), 0 6px 10px -4px rgba(0,0,0,.45);
  --b1-in: linear-gradient(180deg, #CDD2D3 0%, #DDE1E2 100%); --b1-in-fg: #16191B; --b1-in-sh: inset 0 2px 5px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.06);
  --b2-off: #303A3C; --b2-off-fg: #7E8B8E; --b1-off: #3C4749; --b1-off-fg: #869295;
  --sw-groove: linear-gradient(180deg, #232B2D 0%, #2B3436 100%); --sw-groove-sh: inset 0 2px 4px rgba(0,0,0,.55), inset 0 0 0 1px rgba(0,0,0,.3), 0 1px 0 rgba(255,255,255,.06); }

/* Toggle and checkbox (soft material, 24 Nov 2026, board P5). One style everywhere; the dark version in dark panels.
   Toggle: a groove with a raised knob; on, the knob slides right and a small light comes on in the scheme's light colour.
   Checkbox: a small Secondary square; ticked, it sinks in and its tick lights up. Disabled is flat and muted. */
.switch { cursor: pointer; }
.switch i { width: 34px; height: 20px; box-sizing: border-box; border-radius: 10px; border: 0; background: var(--sw-groove); box-shadow: var(--sw-groove-sh); position: relative; flex: none; }
.switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; box-sizing: border-box; border-radius: 8px; background: var(--b2-bg); border: 1px solid var(--b2-edge); box-shadow: var(--b2-sh); transition: transform .2s ease; }
.switch i::before { content: ""; position: absolute; left: 7px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 3px; background: var(--glow); box-shadow: 0 0 4px var(--glow), 0 0 9px var(--glow); opacity: 0; transition: opacity .2s ease; }
.switch[aria-pressed="true"] i::after { transform: translateX(14px); }
.switch[aria-pressed="true"] i::before { opacity: 1; }
.switch:disabled { cursor: default; }
.switch:disabled i { opacity: .55; } .switch:disabled i::after { box-shadow: none; }
.cbx-box { width: 22px; height: 22px; flex: none; box-sizing: border-box; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: var(--b2-bg); border: 1px solid var(--b2-edge); box-shadow: var(--b2-sh); color: transparent; transition: box-shadow .12s ease, background .12s ease; }
.cbx input:checked + .cbx-box { background: var(--b2-in); box-shadow: var(--b2-in-sh); color: var(--glow); }
.cbx input:checked + .cbx-box svg { filter: drop-shadow(0 0 3px color-mix(in srgb, var(--glow) 85%, transparent)) drop-shadow(0 0 8px color-mix(in srgb, var(--glow) 45%, transparent)); }
.cbx.off { cursor: default; color: var(--text-muted); }
.cbx.off .cbx-box { background: var(--b2-off); box-shadow: none; border-color: transparent; }
.cbx.off input:checked + .cbx-box { background: var(--b2-off); box-shadow: none; color: var(--b2-off-fg); }
.cbx.off input:checked + .cbx-box svg { filter: none; }
@media (prefers-reduced-motion: reduce) { .switch i::after, .switch i::before, .cbx-box { transition: none; } }


/* Pills you click have the button material (Pravin, 24 Nov 2026): option rows, the scheme pills in the account menu, tag filters and
   removable chips. Raised in the surface colour; chosen, it sinks in and a thin line of the scheme's light colour lights under it.
   Pills that only show information (status badges, info chips) stay flat so they do not look clickable. */
:is(.layer, .settings, .apanel, body) .opt, .pop .pills .pill, .tagbtn {
  background: var(--b2-bg); color: var(--b2-fg); border: 1px solid var(--b2-edge); box-shadow: var(--b2-sh); font-weight: 600;
  transition: box-shadow .12s ease, background .12s ease; }
:is(.layer, .settings, .apanel, body) .opt[aria-pressed="true"], .pop .pills .pill[aria-pressed="true"], .tagbtn[aria-pressed="true"] {
  background: var(--b2-in); color: var(--b2-fg); border-color: var(--b2-edge); box-shadow: var(--b2-in-sh), inset 0 -2px 0 var(--glow); }
:is(.layer, .settings, .apanel, body) .opt:disabled, .tagbtn:disabled { background: var(--b2-off); color: var(--b2-off-fg); box-shadow: none; border-color: transparent; }
.chips .chip, .fchip, .ltag, .settings .mchip { background: var(--b2-bg); color: var(--b2-fg); border: 1px solid var(--b2-edge); box-shadow: var(--b2-sh); }
@media (prefers-reduced-motion: reduce) { .opt, .pop .pills .pill, .tagbtn { transition: none; } }

/* Pill text is 11 px (Pravin, 24 Nov 2026): option pills, tag filters, chips, status badges and tags. Trays keep 12 px. */
:is(.layer, .settings, .apanel, body) .opt, .pop .pills .pill, .tagbtn, .chip, .fchip, .ltag, .settings .mchip, .status, .course .status, .course .chip-on, .tag { font-size: 11px; }

/* Course cards: one height for every card, a little shorter, smaller chips (Pravin, 24 Nov 2026). Titles keep to one line (the full title shows on hover),
   descriptions to two, and a card shows at most two chips. */
.course { --card-h: 228px; height: var(--card-h); }
.course h3 { margin-top: 3px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course .head { margin-top: 3px; }
.course .needchips { margin-top: 7px; flex-wrap: nowrap; overflow: hidden; gap: 4px; }
.course .needchip { height: 18px; padding: 0 6px 0 5px; border-radius: 9px; gap: 3px; flex: none; }
.course .needchip.more { padding: 0 6px; }
.course .zone { margin-top: 7px; min-height: 0; overflow: hidden; gap: 8px; }
.course .about { line-height: 16px; }
.course .foot { margin-top: 9px; }
.course .flip { height: 24px; }
.course .status { height: 18px; padding: 0 7px; }
.course.qb { min-height: 0; }
.course.qb .pic { height: 110px; }
.course.qb .info { padding: 57px 12px 11px; }
.course.qb .zone { min-height: 0; }
.course.qb h3 { font-size: 16px; line-height: 20px; }
.course.pw { margin-bottom: 0; }
:is(.course.dd, .course.mc, .course.pw) { min-height: 0; }
:is(.course.dd, .course.mc, .course.pw) .info { padding: 13px 13px 11px 15px; }
:is(.course.dd, .course.mc, .course.pw) h3 { font-size: 20px; line-height: 24px; }
.course .stepstrip { flex: none; }
@media (max-width: 720px) {
  .course { --card-h: 296px; }
  .course h3, :is(.course.dd, .course.mc, .course.pw) h3 { font-size: 16px; line-height: 20px; }
  .course .counts { flex-wrap: nowrap; overflow: hidden; }
  .course .about { -webkit-line-clamp: 1; }
  .course.qb .pic, :is(.course.dd, .course.mc, .course.pw) .pic { height: 150px; }
  .course.qb .info, :is(.course.dd, .course.mc, .course.pw) .info { padding: 100px 12px 11px; }
}

/* Tray and menu light 40% less bright and 40% less spread (Pravin, 24 Nov 2026, board P7). The space below a tray stays as before (--tray-gap-h). */
.tray::after, .work::before { opacity: var(--tray-light-o); }

/* The page header for every page (board P8, option B, Pravin 24 Nov 2026). The top bar stays at the top while the page scrolls,
   so search and the main action are always at hand. */
.page:has(> .pgtop), .mmain:has(> .pgtop) { padding-top: 0; }
.pgtop { position: sticky; top: 0; z-index: 4; flex: none; margin: 0 -25px; padding: 9px 25px; min-height: 52px; box-sizing: border-box; display: flex; align-items: center; gap: 8px;
  background: color-mix(in srgb, var(--bg-ground) 82%, var(--bg-panel)); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.mmain > .pgtop { margin: 0 -20px 0 -22px; padding: 9px 20px 9px 22px; }
.pgtop .grow { flex: 1; }
.pgtop .search { width: 320px; }
.pgtop .tray::after { display: none; }
.pgwhere { display: flex; align-items: center; min-width: 0; }
.crumbs { display: flex; align-items: center; gap: 7px; font: 500 12px/16px var(--font-ui); color: var(--text-muted); white-space: nowrap; }
.crumbs > span:last-child { color: var(--text); font-weight: 600; }
.crumbs .sep { color: var(--line-strong); font-weight: 400; }
.pghead { margin-top: 6px; display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.pghead .grow { flex: 1; min-width: 20px; }
.pgtitle { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pgabout { margin: 0; font: 400 12px/17px var(--font-ui); color: var(--text-muted); }
.pghead > .tray, .pghead > .toolbar { align-self: flex-end; }
.mmain > :has(> .tray) { margin-bottom: calc(var(--tray-gap-h) * .8 - 11px); }
.mbar:empty { display: none; }
@media (max-width: 720px) { .pgtop .search { width: auto; flex: 1; min-width: 0; } .pgtop .grow { display: none; } }

/* The logo leads the top bar: mySafety+ in the Studio, the company in Admin. */
.pgbrand { display: inline-flex; align-items: center; flex: none; }
.pgbrand img { height: 30px; width: auto; max-width: 150px; object-fit: contain; display: block; }
.pgbrand .on-dark { display: none; }
:is([data-scheme="basalt"], [data-scheme="sugarcane"]) .pgbrand .on-light { display: none; }
:is([data-scheme="basalt"], [data-scheme="sugarcane"]) .pgbrand .on-dark { display: block; }
.pgwhere { gap: 11px; }
.pgdiv { width: 1px; height: 20px; background: var(--line); flex: none; }

.pgbrand { min-width: 30px; min-height: 30px; }
.pgswitch { gap: 4px; padding: 2px 6px 2px 2px; margin-left: -2px; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); cursor: pointer; }
.pgswitch:hover:not(:disabled) { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.pgswitch:disabled { cursor: default; }
.pgcode { height: 26px; min-width: 30px; padding: 0 6px; box-sizing: border-box; border-radius: 7px; background: var(--text); color: var(--text-on); display: inline-flex; align-items: center; justify-content: center; font: 700 12px/16px var(--font-ui); }

/* Top bar alignment (Pravin, 24 Nov 2026): the company switch is a flex box so no line gap sits under it; the logo, the arrow,
   the divider and the path share one centre line, and the bar is the same height on every page. */
.pgtop .cwrap { display: flex; align-items: center; }
.pgtop { height: 52px; min-height: 0; }
.pgswitch { height: 34px; display: inline-flex; align-items: center; }
.pgtitle .title .tsep { display: inline-flex; vertical-align: middle; margin: 0 4px 4px; color: var(--line-strong); }

/* ---------- The editor (Pravin, 25 Nov 2026): the standard top bar, add blocks anywhere, a clearer block toolbar, the screen strip ---------- */
.stage > .pgtop { margin: 0; flex: none; }
.stage > .pgtop .crumbs a { color: inherit; text-decoration: none; }
.stage > .pgtop .crumbs a:hover { color: var(--text); text-decoration: underline; }
.stage > .pgtop .crumbs > span:last-child { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.stage > .pgtop .saved { margin-right: 4px; }
.stage-head { padding: 14px 25px 4px; }
.sendslot { display: contents; }
/* Editable words show they can be edited. */
.stage-body .ms-editing [contenteditable]:not([contenteditable="false"]) { cursor: text; border-radius: 3px; transition: box-shadow .12s; }
.stage-body .ms-editing [contenteditable]:not([contenteditable="false"]):hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.stage-body .ms-editing [contenteditable]:not([contenteditable="false"]):focus { outline: 0; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent); }
/* The block toolbar: larger, with a drag handle and names on hover. */
.block-tools { right: calc(-1 * var(--pad) - 58px); gap: 2px; padding: 4px; border-radius: 12px; }
.block-tools button { width: 38px; height: 38px; border-radius: 10px; }
.block-tools button.danger:hover { background: #7A2E2E; }
.block-tools .bdrag { cursor: grab; color: var(--layer-muted) !important; }
.block-tools .bdrag:active { cursor: grabbing; }
.block-wrap.sel::before { content: attr(data-name); position: absolute; left: -6px; top: -27px; height: 18px; padding: 0 7px; border-radius: 9px; background: var(--accent); color: var(--accent-on); font: 600 11px/18px var(--font-ui); white-space: nowrap; z-index: 4; pointer-events: none; }
.block-wrap.dragging { opacity: .45; }
.block-wrap.drop-before { box-shadow: 0 -4px 0 var(--glow); }
.block-wrap.drop-after { box-shadow: 0 4px 0 var(--glow); }
/* Add a block exactly here: a thin "+" above each block, shown on hover. */
.block-wrap > .ins { position: absolute; left: 50%; top: -17px; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg-panel); color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; opacity: 0; z-index: 4; box-shadow: var(--shadow-tile); transition: opacity .12s; }
.block-wrap:hover > .ins, .block-wrap > .ins:focus-visible { opacity: 1; }
.block-wrap > .ins:hover { color: var(--accent-on); background: var(--accent); border-color: var(--accent); }
/* The quick picker and the library list. */
.qpick { position: fixed; bottom: auto; z-index: 60; display: flex; flex-direction: column; gap: 6px; padding: 10px; overflow: hidden; }
.qpick .chooser { display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 1; }
.qpick .library-list { padding: 0; overflow: auto; }
.chooser .search { width: auto; }
.library .chooser { display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1; padding: 0 14px; }
.library .chooser .library-list { padding: 0 0 17px; }
.library { width: 300px; }
.library-note { margin: 0 14px 6px; font: 400 12px/16px var(--font-ui); color: var(--text-muted); }
.chooser .library-note { margin: 4px 0 0; }
.lib-card { flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
.lib-card .bt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bic { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--bg-panel-soft); color: var(--text); display: inline-flex; align-items: center; justify-content: center; }
.lib-card:hover .bic, .lib-card:focus-visible .bic { background: rgba(255,255,255,.12); color: var(--glow); }
.pick-rows { display: flex; flex-direction: column; gap: 1px; }
.pick-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-align: left; font: 600 12px/16px var(--font-ui); }
.pick-row .bic { width: 26px; height: 26px; border-radius: 7px; }
.pick-row:hover, .pick-row:focus-visible { background: var(--bg-panel-soft); }
.pick-row:hover .bic { color: var(--accent); }
.chooser h3 { margin: 6px 0 4px; font: 600 11px/14px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
/* When a page is too tall: where it ends, and the blocks below the line. */
.stage-body .ms-page { position: relative; }
.cutline { position: absolute; left: -14px; right: -14px; height: 0; border-top: 2px dashed var(--status-review-on); z-index: 3; pointer-events: none; }
.cutline span { position: absolute; right: 0; top: -20px; padding: 1px 7px; border-radius: 9px; background: var(--status-review); color: var(--status-review-on); font: 600 11px/16px var(--font-ui); }
.block-wrap.past > :not(.block-tools):not(.ins) { opacity: .55; }
.fit .btn.small { margin-left: 8px; height: 26px; }
/* The Quick Bite time: about a minute per bite, aim for 15, at most 25. */
.meter.qbm i { position: relative; overflow: visible; }
.meter.qbm i b.long { background: var(--status-review-on); }
.meter.qbm i b.over { background: #B5482F; }
.meter.qbm i u { position: absolute; top: -3px; width: 2px; height: 10px; border-radius: 1px; background: var(--line-strong); }
.meter.qbm b { color: var(--text); font-weight: 600; }
/* The outline: add a lesson from its module, drag to reorder. */
.orow.module { position: relative; }
.orow .oadd { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: var(--bg-panel); color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; opacity: 0; }
.orow.module:hover .oadd, .orow .oadd:focus-visible { opacity: 1; }
.orow .oadd:hover { background: var(--bg-panel); color: var(--text); }
.orow[draggable="true"] { cursor: grab; }
.orow.dragging { opacity: .45; }
.orow.drop-before { box-shadow: 0 -3px 0 var(--glow); }
.orow.drop-after { box-shadow: 0 3px 0 var(--glow); }
/* The screen strip: every screen of the lesson as a small card. */
.strip.thumbs { gap: 6px; padding: 6px; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; justify-content: flex-start; }
.strip.thumbs .thumb { width: 112px; height: 74px; flex: none; padding: 6px 7px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-panel); display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 3px; text-align: left; overflow: hidden; }
.strip.thumbs .thumb b { font: 700 12px/14px var(--font-ui); color: var(--text-muted); }
.strip.thumbs .thumb[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-tile); }
.strip.thumbs .thumb[aria-current="true"] b { color: var(--accent); }
.strip.thumbs .thumb.drop-before { box-shadow: -4px 0 0 var(--glow); }
.strip.thumbs .thumb.drop-after { box-shadow: 4px 0 0 var(--glow); }
.thumb .tb { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.thumb .tbk { display: flex; align-items: center; gap: 4px; font: 500 11px/13px var(--font-ui); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb .tbk svg { flex: none; }
.thumb .tbk.none, .thumb .tbk.more { font-style: italic; }
.strip.thumbs .thumb.add { align-items: center; justify-content: center; border-style: dashed; color: var(--text-muted); font: 600 12px/16px var(--font-ui); }
.strip.thumbs .thumb.add:hover { color: var(--text); border-color: var(--line-strong); }

/* The New menu and dialog (Pravin, 25 Nov 2026, after Rise's "Start from blank"). */
.newmenu hr { margin: 4px 8px; border: 0; border-top: 1px solid var(--line); }
.ntext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ntext b { display: flex; align-items: center; gap: 6px; font: 600 14px/19px var(--font-ui); }
.ntext > span { font: 400 12px/17px var(--font-ui); color: var(--text-muted); }
.ntext .soon { height: 18px; padding: 0 7px; border-radius: 9px; background: var(--bg-panel-soft); border: 1px solid var(--line); color: var(--text-muted); font: 600 11px/16px var(--font-ui); }
.ndialog { max-width: 460px; }
.nhead { display: flex; align-items: center; gap: 12px; }
.nhead h2 { margin: 0; }
.nhead .nsub { margin: 2px 0 0; font: 400 12px/17px var(--font-ui); color: var(--text-muted); }

/* Soft menus (Pravin, 25 Nov 2026): menus are made of the same soft material as the trays. The panel has the tray's grain;
   a row lifts into the raised tile on hover and sinks when pressed; its icon sits on a small Secondary tile and lights up
   (Fill, in the scheme's Light colour) when the row is pointed at or chosen. Used by the New menu and the block picker. */
.smenu { position: fixed; left: auto; bottom: auto; z-index: 60; isolation: isolate; background: var(--tray-bar); border: 1px solid var(--tray-edge); border-radius: 16px;
  box-shadow: inset 0 1px 0 var(--tray-hi), 0 4px 10px rgba(0,0,0,.10), 0 22px 44px -14px rgba(0,0,0,.38); }
.smenu::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: var(--tray-grain); mix-blend-mode: overlay; pointer-events: none; z-index: -1; }
.newmenu { width: 290px; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.newsub { width: 360px; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.srow.top { padding: 8px 10px; }
.srow.top .ntext { flex: 1; }
.srow .caret { color: var(--text-muted); display: inline-flex; }
.srow[aria-expanded="true"]::before { opacity: 1; }
.srow[aria-expanded="true"] .stile .ti.on { opacity: 1; } .srow[aria-expanded="true"] .stile .ti.off { opacity: 0; }
.stile.ai { background: linear-gradient(135deg, color-mix(in srgb, var(--glow) 22%, var(--b2-bg)), var(--b2-bg)); }
.newmenu hr { margin: 4px 10px; border: 0; border-top: 1px solid var(--tray-edge); }
.srow { height: auto; flex: none; position: relative; isolation: isolate; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--text); text-align: left; transition: transform .12s ease; }
.srow::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; background: var(--tray-sel); box-shadow: inset 0 1px 0 var(--tray-sel-hi), var(--tray-sel-shadow); opacity: 0; transition: opacity .16s ease; }
.srow:hover:not(:disabled)::before, .srow:focus-visible::before { opacity: 1; }
.srow:active:not(:disabled) { transform: translateY(1px); }
.srow:active:not(:disabled)::before { background: var(--b2-in); box-shadow: var(--b2-in-sh); }
.srow:disabled { cursor: default; }
.srow:disabled .stile, .srow:disabled .ntext { opacity: .55; }
.srow:focus-visible { outline: none; }
.stile { width: 42px; height: 42px; flex: none; border-radius: 12px; display: inline-grid; place-items: center; background: var(--b2-bg); border: 1px solid var(--b2-edge); box-shadow: var(--b2-sh); color: var(--b2-fg); }
.stile.sm { width: 30px; height: 30px; border-radius: 9px; }
.stile .tis, .stile > svg { grid-area: 1 / 1; }
.stile .tis { display: inline-grid; } .stile .ti { grid-area: 1 / 1; display: inline-flex; transition: opacity .16s ease; }
.stile .ti.on { opacity: 0; }
.stile .ti.on svg { color: var(--glow); filter: drop-shadow(0 0 3px color-mix(in srgb, var(--glow) 85%, transparent)) drop-shadow(0 0 8px color-mix(in srgb, var(--glow) 45%, transparent)); }
.srow:hover:not(:disabled) .stile .ti.on, .srow:focus-visible .stile .ti.on, .stile.lit .ti.on { opacity: 1; }
.srow:hover:not(:disabled) .stile .ti.off, .srow:focus-visible .stile .ti.off, .stile.lit .ti.off { opacity: 0; }
.srow:hover:not(:disabled) .stile > svg, .srow:focus-visible .stile > svg { color: var(--glow); filter: drop-shadow(0 0 3px color-mix(in srgb, var(--glow) 85%, transparent)); }
.srow:active:not(:disabled) .stile { background: var(--b2-in); box-shadow: var(--b2-in-sh); }
.ntext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ntext b { display: flex; align-items: center; gap: 6px; font: 600 14px/19px var(--font-ui); }
.ntext > span { font: 400 12px/17px var(--font-ui); color: var(--text-muted); }
.ntext .soon { height: 18px; padding: 0 7px; border-radius: 9px; background: var(--b2-bg); border: 1px solid var(--b2-edge); color: var(--text-muted); font: 600 11px/16px var(--font-ui); }
.qpick.smenu { padding: 10px; }
.qpick .pick-row { gap: 10px; padding: 5px 6px; font: 600 12px/16px var(--font-ui); }
.qpick .pick-row:hover { background: transparent; }
/* The Blocks panel cards: the icon on a Secondary tile, lit when pointed at. */
.lib-card { background: var(--b2-bg); border-color: var(--b2-edge); box-shadow: var(--b2-sh); }
.lib-card:hover, .lib-card:focus-visible { background: var(--b2-bg); color: var(--text); border-color: var(--b2-edge); box-shadow: var(--b2-sh), 0 0 0 1px color-mix(in srgb, var(--glow) 55%, transparent); }
.lib-card:active { background: var(--b2-in); box-shadow: var(--b2-in-sh); }
.lib-card .stile { background: transparent; border: 0; box-shadow: none; }
.lib-card:hover .stile svg, .lib-card:focus-visible .stile svg { color: var(--glow); filter: drop-shadow(0 0 3px color-mix(in srgb, var(--glow) 85%, transparent)); }
/* Editor controls in the standard material: "+" and the module "+" are Secondary; the block toolbar is a dark tray whose
   icons light up when pressed; screen cards are Secondary tiles, the open one sunk with the Light line, like a chosen pill. */
.block-wrap > .ins, .orow .oadd { background: var(--b2-bg); border: 1px solid var(--b2-edge); box-shadow: var(--b2-sh); color: var(--b2-fg); }
.block-wrap > .ins:hover, .orow .oadd:hover { background: var(--b2-bg); color: var(--b2-fg); border-color: var(--b2-edge); }
.block-wrap > .ins:hover svg, .orow .oadd:hover svg { color: var(--glow); filter: drop-shadow(0 0 3px color-mix(in srgb, var(--glow) 85%, transparent)); }
.block-wrap > .ins:active, .orow .oadd:active { background: var(--b2-in); box-shadow: var(--b2-in-sh); }
.block-tools { background: linear-gradient(180deg, #2A2D2F 0%, #151718 100%); border: 1px solid rgba(255,255,255,.09); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 24px -8px rgba(0,0,0,.55); }
.block-tools button { transition: background .12s, box-shadow .12s; }
.block-tools button:hover { background: linear-gradient(180deg, #3A3E41 0%, #222527 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 2px 4px rgba(0,0,0,.6); }
.block-tools button:active { background: #121415; box-shadow: inset 0 2px 5px rgba(0,0,0,.7); }
.block-tools button:active svg, .block-tools button.down svg { color: var(--glow); filter: drop-shadow(0 0 3px color-mix(in srgb, var(--glow) 85%, transparent)); }
.block-tools button.danger:hover { background: linear-gradient(180deg, #5A2B2B 0%, #3A1C1C 100%); }
.strip.thumbs { background: var(--tray-bar); border: 1px solid var(--tray-edge); box-shadow: inset 0 1px 0 var(--tray-hi), 0 6px 14px -8px rgba(0,0,0,.3); }
.strip.thumbs .thumb { background: var(--b2-bg); border: 1px solid var(--b2-edge); box-shadow: var(--b2-sh); }
.strip.thumbs .thumb[aria-current="true"] { background: var(--b2-in); border-color: var(--b2-edge); box-shadow: var(--b2-in-sh), inset 0 -2px 0 var(--glow); }
.strip.thumbs .thumb[aria-current="true"] b { color: var(--text); }
.strip.thumbs .thumb:active { background: var(--b2-in); box-shadow: var(--b2-in-sh); }
.strip.thumbs .thumb.add { border-style: solid; }

/* The outline's head (Pravin, 25 Nov 2026: it was too squeezed): the type and Ref ID on one line, the name, the status. */
.outline-head { padding: 16px 14px 12px; gap: 6px; }
.outline-head h2 { font: 400 18px/23px var(--font-heading); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.olabel { display: flex; align-items: center; gap: 4px; min-width: 0; font: 700 11px/14px var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); white-space: nowrap; overflow: hidden; }
.olabel.mc { color: color-mix(in srgb, var(--amber) 70%, var(--text)); }
.olabel svg { flex: none; }
.olabel .lref { overflow: hidden; text-overflow: ellipsis; color: var(--text-muted); font-weight: 600; letter-spacing: .03em; }
.ostatus { display: flex; }
.meter.qbm { padding: 10px 14px 12px; gap: 6px; border-bottom: 1px solid var(--line); }
.meter.qbm .qbrow { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; white-space: nowrap; }
.meter.qbm .qbrow > span { font-size: 11px; }

/* ---------- The text formatting toolbar (textbar.js, board L18): the block toolbar's dark tray, above the text being edited ---------- */
.textbar { position: fixed; z-index: 70; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; white-space: nowrap;
  background: linear-gradient(180deg, #2A2D2F 0%, #151718 100%); border: 1px solid rgba(255,255,255,.09); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 24px -8px rgba(0,0,0,.55); }
.textbar[hidden] { display: none; }
.textbar::after { content: ""; position: absolute; left: 22px; bottom: -6px; width: 10px; height: 10px; transform: rotate(45deg); background: #151718; border-right: 1px solid rgba(255,255,255,.09); border-bottom: 1px solid rgba(255,255,255,.09); }
.textbar.below::after { bottom: auto; top: -6px; background: #2A2D2F; border: 0; border-left: 1px solid rgba(255,255,255,.09); border-top: 1px solid rgba(255,255,255,.09); }
.textbar .tbtn { height: 32px; min-width: 32px; padding: 0 7px; border: 0; border-radius: 8px; background: transparent; color: rgba(255,255,255,.86) !important; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font: 600 13px/16px var(--font-ui); transition: background .12s, box-shadow .12s; }
.textbar .tbtn:hover { background: linear-gradient(180deg, #3A3E41 0%, #222527 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 2px 4px rgba(0,0,0,.6); }
.textbar .tbtn[aria-pressed="true"], .textbar .tbtn.on, .textbar .tbtn[aria-expanded="true"] { background: #121415; box-shadow: inset 0 2px 5px rgba(0,0,0,.7), inset 0 -2px 0 var(--glow); }
.textbar .tbtn[aria-pressed="true"] svg, .textbar .tbtn.on svg, .textbar .tbtn[aria-expanded="true"] svg, .textbar .tbtn:active svg { color: var(--glow); filter: var(--glow-halo); }
.textbar .tsep2 { width: 1px; height: 18px; margin: 0 3px; background: rgba(255,255,255,.16); }
.textbar .tai { padding: 0 10px 0 8px; margin-left: 2px; background: color-mix(in srgb, var(--glow) 12%, transparent); border: 1px solid color-mix(in srgb, var(--glow) 35%, transparent); color: #FFFFFF !important; cursor: default; }
.textbar .tai svg { color: var(--glow); filter: var(--glow-halo); }
.textbar .tai:hover { background: color-mix(in srgb, var(--glow) 12%, transparent); box-shadow: none; }
.textbar .tcount { padding: 0 8px 0 6px; font: 600 12px/16px var(--font-ui); color: rgba(255,255,255,.55); }
.textbar .tcount.over { color: #FFB547; }
.textbar .tcount[hidden] { display: none; }
.imenu { width: 400px; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.imenu .ntext { flex: 1; }
.imenu .isample { flex: none; font: 600 13px/20px "Figtree", sans-serif; }
.imenu .srow[aria-current="true"] .stile svg { color: var(--glow); filter: var(--glow-halo); }
.tlink { position: fixed; z-index: 71; width: 320px; padding: 12px; gap: 10px; border-radius: 14px; }
.tlink b { font: 600 13px/16px var(--font-ui); color: var(--text); }
.tlink .row { display: flex; justify-content: flex-end; gap: 8px; }
.tlink .tnote:empty { display: none; }
.imenu .ms-k-term { background: #ECE1CD; color: #16292B; padding: 0 5px; border-radius: 5px; } .imenu .ms-k-remember { background: #DCE9EA; color: #0F4B50; padding: 0 5px; border-radius: 5px; }
.imenu .ms-k-warning { color: #6B4A00; box-shadow: inset 0 -2.5px 0 #F9A826; } .imenu .ms-k-rule { background: #16292B; color: #FFFFFF; padding: 0 5px; border-radius: 5px; }

/* ---------- The cover in the editor (board L18): first in the outline, all its elements in place ---------- */
.orow.cover .num svg { display: block; }
.orow.cover[aria-current="true"] .num svg { color: var(--glow); filter: var(--glow-halo); }
.orow.cover .count.needs { color: var(--status-review-on); }
.stage-body .coverwrap { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0 40px; }
.coverwrap .fit { align-self: center; }
/* Legends in the outline (25 Nov 2026): small muted headings that say what each part is. */
.outline .olegend { display: block; font: 600 12px/16px var(--font-ui); letter-spacing: .04em; color: var(--text-muted); }
.outline .meter .olegend { margin-bottom: 2px; }
.outline .olegend.list { padding: 12px 14px 4px; }

/* ---------- Preview at different screen sizes (preview.js, board L19) ---------- */
.pgtop .pvbar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; }
.pgtop .pvbar[hidden] { display: none; }
.pgtop { position: sticky; }
.devtray .pill { width: 40px; padding: 0; justify-content: center; }
.devtray .pill.rot .tis { transform: rotate(90deg); }
.pvsize { font: 500 12px/16px var(--font-ui); color: var(--text-muted); white-space: nowrap; }
.stage-body .pvstage { display: flex; justify-content: center; align-items: flex-start; padding: 8px 0 28px; }
.pvwrap { flex: none; position: relative; }
.pvframe { position: absolute; left: 0; top: 0; transform-origin: 0 0; padding: 14px; border-radius: 34px; background: #0E1414; box-shadow: 0 24px 50px -22px rgba(0,0,0,.5); }
.pvframe.pv-phone, .pvframe.pv-phone-land { border-radius: 44px; }
.pvframe.pv-laptop { padding: 12px; border-radius: 18px 18px 6px 6px; }
.pvframe .pvbase { position: absolute; left: -50px; right: -50px; bottom: -14px; height: 14px; border-radius: 0 0 14px 14px; background: linear-gradient(180deg, #C9CDD0, #9EA3A7); }
.pvscreen { position: relative; overflow: hidden; border-radius: 22px; background: #16292B; }
.pv-laptop .pvscreen { border-radius: 6px; } .pv-phone .pvscreen, .pv-phone-land .pvscreen { border-radius: 32px; }
.pvscreen.ivory { background: #EDE7DC; }
.pvscreen .pvbg { position: absolute; inset: -30px; background: center / cover no-repeat; filter: blur(22px) brightness(.55); }
.pvscreen .pvbg.none { filter: none; inset: 0; background: radial-gradient(circle at 70% 20%, #2D5154, #16292B 70%); }
.pvscreen .pvhold { position: absolute; left: 50%; top: 50%; transform-origin: 50% 50%; }
.pvscreen .pvhold > .ms-page, .pvscreen .pvhold > .ms-cover { box-shadow: 0 30px 60px -24px rgba(0,0,0,.55); }
.pvscreen.fill > .ms-cover { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
.stage-head .pvbar { display: flex; align-items: center; gap: 10px; position: static; transform: none; margin-left: auto; margin-right: 10px; }
.stage-head .pvbar .pvsize { order: -1; }

/* ---------- Tooltips for every titled element and icon-only button (dom.js, 25 Nov 2026) ---------- */
.hovertip { position: fixed; z-index: 100; max-width: 280px; padding: 5px 9px; border-radius: 7px; background: var(--text); color: var(--bg-panel); font: 600 12px/16px var(--font-ui); box-shadow: 0 6px 16px -6px rgba(0,0,0,.45); pointer-events: none; animation: tipin .12s ease-out; }
@keyframes tipin { from { opacity: 0; transform: translateY(-2px); } }

/* ---------- Editor top bar, board P9 option A: one small group of icon tools, one labelled main button ---------- */
.tgroup { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 11px; background: var(--bg-ground); border: 1px solid var(--line); box-shadow: inset 0 1px 2px rgba(0,0,0,.08); }
.tgroup[hidden] { display: none; }
.tgroup > .btn.light { position: relative; width: 34px; min-width: 34px; height: 30px; padding: 0; justify-content: center; }
.tgroup > .btn.light .badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #FFFFFF; font: 700 11px/17px var(--font-ui); text-align: center; }
.pgtop .pvbar .devtray .pill { width: 36px; height: 28px; }
/* Zoom and the screen strip stay in view at the foot of the stage. */
.stage-body > .stagefoot { position: sticky; bottom: -17px; z-index: 6; width: 100%; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 0 12px; margin-top: auto; background: linear-gradient(180deg, transparent, var(--bg-ground) 28%); }
.stagefoot .strip.thumbs { max-width: 100%; }
.hovertip .k { margin-left: 2px; color: color-mix(in srgb, var(--bg-panel) 62%, transparent); font-weight: 500; letter-spacing: .02em; }
/* Zoom: one small round button floating at the page's lower left, just above the strip; it opens a soft menu above it
   (Pravin, 25 Nov 2026, after his reference). */
.stage > .zoomctl { position: absolute; z-index: 3; touch-action: none; }
.stage > .zoomctl[hidden] { display: none; }
.zoomctl.dragging .zfab { cursor: grabbing; box-shadow: var(--shadow-tile), 0 14px 28px -10px rgba(0,0,0,.45); transform: scale(1.04); }
.zoomctl.down .zmenu { bottom: auto; top: calc(100% + 8px); }
.zoomctl .zfab { height: 34px; min-width: 34px; padding: 0 11px 0 9px; border-radius: 17px; gap: 5px; box-shadow: var(--shadow-tile), 0 6px 14px -8px rgba(0,0,0,.4); }
.zoomctl .zfab[aria-expanded="true"] { background: var(--bg-ground); box-shadow: inset 0 2px 5px rgba(0,0,0,.22), inset 0 -2px 0 var(--glow); }
.zoomctl .zfab[aria-expanded="true"] svg { color: var(--glow); filter: var(--glow-halo); }
.zoomctl .zread { font: 600 12px/16px var(--font-ui); color: var(--text); }
.zoomctl .zmenu { position: absolute; left: 0; bottom: calc(100% + 8px); width: 236px; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.zoomctl .zmenu[hidden] { display: none; }
.zoomctl .zmenu .ntext { flex: 1; }
.zoomctl .zkey { font: 500 12px/16px var(--font-ui); color: var(--text-muted); }
/* At rest the zoom button is see-through, so it stays out of the way; it comes back in full when pointed at, used or moved (Pravin, 25 Nov 2026). */
.stage > .zoomctl .zfab { opacity: .45; background: color-mix(in srgb, var(--bg-panel) 55%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: opacity .18s ease, background .18s ease; }
.stage > .zoomctl:hover .zfab, .stage > .zoomctl .zfab:focus-visible, .stage > .zoomctl .zfab[aria-expanded="true"], .stage > .zoomctl.dragging .zfab { opacity: 1; background: var(--b2-bg, var(--bg-panel)); }
.stage > .zoomctl .zfab[aria-expanded="true"] { background: var(--bg-ground); }
/* A button asking for a second press (pressTwice in dom.js): its question in amber-brown, the problem colour of notes. */
.btn.armed { color: var(--status-review-on) !important; }
.layer.steady { animation: none; }
/* Stacking in the editor (25 Nov 2026): the page is its own layer, so nothing on it (cover buttons, the photo mover,
   the screen strip) can rise above a panel. Above the page, in order: the zoom button (3), the dim (4), side panels (5),
   the picker (9, 10). Menus, the text toolbar and tooltips stay on top of everything. */
.stage-body { isolation: isolate; }
.switch small:empty { display: none; }
textarea.field { height: auto; min-height: 62px; padding-top: 6px; padding-bottom: 6px; line-height: 18px; resize: vertical; }

/* ---------- Board P10 (25 Nov 2026): Dropdown, Date field, one-question dialog ---------- */
/* Dropdown: the native select stays hidden and keeps the value; a Field-shaped button opens the soft menu. */
select.ddnative { display: none !important; }
.dd { display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; font: inherit; font-size: 13px; color: var(--text); }
.lfield.dd { color: var(--layer-text); }
.dd .ddtext { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd.placeholder .ddtext { color: var(--text-muted); }
.lfield.dd.placeholder .ddtext { color: var(--layer-muted); }
.dd .ddcaret, .dd .ddcal { display: inline-flex; color: var(--text-muted); flex: none; transition: transform .16s ease; }
.lfield.dd .ddcaret, .lfield.dd .ddcal { color: var(--layer-muted); }
.dd[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.dd[aria-expanded="true"] .ddcaret { transform: rotate(180deg); color: var(--accent); }
.dd:disabled { cursor: default; opacity: .7; }
.ddmenu { min-width: 180px; max-width: 420px; padding: 6px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.ddmenu .ddlist { overflow: auto; display: flex; flex-direction: column; gap: 1px; min-height: 0; }
.ddmenu .ddopt { height: 32px; padding: 0 10px; gap: 8px; border-radius: 9px; font: 400 13px/16px var(--font-ui); }
.ddmenu .ddopt[aria-selected="true"] { font-weight: 600; }
.ddmenu .ddopt[aria-selected="true"]::before { opacity: 1; }
.ddmenu .ddopt:disabled { opacity: .5; }
.ddtick { width: 16px; flex: none; display: inline-flex; color: var(--accent); }
.ddgroup { margin: 6px 10px 2px; font: 700 11px/14px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.ddsearchwrap { display: flex; align-items: center; gap: 6px; padding: 2px 8px 6px; color: var(--text-muted); border-bottom: 1px solid var(--tray-edge); }
.ddsearchwrap .ddsearch { flex: 1; height: 32px; border: 0; background: transparent; padding: 0; box-shadow: none; }
.ddsearchwrap .ddsearch:focus { outline: 0; }
/* Date picker: the soft menu with ready-made periods on the left and the months on the right. */
.dpick { padding: 0; display: flex; flex-direction: column; overflow: auto; }
.dpick .dbody { display: flex; }
.dpresets { width: 150px; padding: 8px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--tray-edge); }
.dpresets .dpreset { height: 34px; padding: 0 10px; gap: 8px; border-radius: 9px; font: 400 13px/16px var(--font-ui); }
.dpresets .dpreset[aria-selected="true"] { font-weight: 600; }
.dpresets .dpreset[aria-selected="true"]::before { opacity: 1; }
.dmain { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.dnav { display: flex; align-items: center; gap: 6px; }
.dnav .dd { width: auto; min-width: 0; height: 30px; padding: 0 10px; font-weight: 600; }
.dcals { display: flex; gap: 26px; }
.dmonth { width: 252px; display: flex; flex-direction: column; gap: 6px; }
.dtitle { text-align: center; font: 600 13px/18px var(--font-ui); color: var(--text); }
.dweek, .dgrid { display: grid; grid-template-columns: repeat(7, 34px); gap: 2px; }
.dweek span { text-align: center; font: 600 11px/14px var(--font-ui); color: var(--text-muted); }
.dday { height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: 400 13px/16px var(--font-ui); cursor: pointer; }
.dday.blank { pointer-events: none; }
.dday:hover:not(:disabled):not(.sel) { background: var(--bg-panel-soft); }
.dday.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.dday.between { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); }
.dday.sel { background: linear-gradient(180deg, color-mix(in srgb, #FFFFFF 14%, var(--accent)), var(--accent)); color: var(--accent-on, #FFFFFF); font-weight: 600; box-shadow: 0 2px 5px -1px rgba(0,0,0,.35); }
.dday:disabled { opacity: .35; cursor: default; }
.dfoot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--tray-edge); }
.drange { display: inline-flex; align-items: center; gap: 6px; font: 400 13px/16px var(--font-ui); color: var(--text-muted); }
.drange b { color: var(--text); font-weight: 600; }
.dlong { margin-left: 6px; padding: 2px 8px; border-radius: 10px; background: var(--bg-panel-soft); font: 600 11px/14px var(--font-ui); color: var(--text-muted); }
/* The one-question dialog: soft material, an icon tile, the question as the title, Cancel left and the action right. */
.askdlg { width: min(440px, 100%); padding: 22px 24px; border-radius: 16px; display: flex; flex-direction: column; gap: 16px; position: relative; isolation: isolate;
  background: var(--tray-bar); border: 1px solid var(--tray-edge); box-shadow: inset 0 1px 0 var(--tray-hi), 0 4px 10px rgba(0,0,0,.10), 0 26px 52px -16px rgba(0,0,0,.42); }
.askhead { display: flex; gap: 14px; align-items: flex-start; }
.asktile { width: 42px; height: 42px; flex: none; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--accent);
  background: linear-gradient(180deg, var(--tile-highlight), transparent 62%), var(--bg-panel-soft); box-shadow: var(--shadow-tile); }
.askhead h2 { margin: 0; font: 300 22px/27px var(--font-heading); color: var(--text); }
.askhead p { margin: 4px 0 0; font: 400 13px/19px var(--font-ui); color: var(--text-muted); }
.askfoot { display: flex; gap: 8px; align-items: center; }
/* Empty state (P10 option A): icon tile, title, one line, Secondary actions, in the dashed outline. */
.empty .etile { width: 56px; height: 56px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; color: var(--accent);
  background: linear-gradient(180deg, var(--tile-highlight), transparent 62%), var(--bg-panel-soft); box-shadow: var(--shadow-tile); margin-bottom: 2px; }
.empty p { max-width: 560px; margin: 0; }
.empty .eacts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
/* Form card (P10 option A): icon tile, heading and description, "Saved" on the right. */
.acard .chead { display: flex; align-items: center; gap: 10px; }
.acard .chead .col { display: flex; flex-direction: column; gap: 1px; }
.acard .chead .note { margin: 0; }
.acard .ctile { width: 32px; height: 32px; flex: none; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: var(--accent);
  background: linear-gradient(180deg, var(--tile-highlight), transparent 62%), var(--bg-panel-soft); box-shadow: var(--shadow-tile); }
.acard .cstatus { align-self: flex-start; font: 500 12px/16px var(--font-ui); color: var(--text-muted); white-space: nowrap; }
.acard h2 { font-size: 17px; line-height: 22px; }
/* Step strip (P10 option B): a bar over each name; done in the accent with a tick, now lit with the light colour. */
.stepsbar { list-style: none; margin: 0; padding: 14px 18px; display: flex; gap: 10px; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 13px; }
.stepsbar li { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; font: 400 13px/16px var(--font-ui); color: var(--text-muted); }
.stepsbar .sbar { display: block; height: 4px; border-radius: 2px; background: var(--line-strong); opacity: .55; }
.stepsbar .sname { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepsbar .sdot { width: 16px; height: 16px; flex: none; box-sizing: border-box; border-radius: 8px; border: 1.5px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; color: var(--accent-on, #FFFFFF); }
.stepsbar li.done, .stepsbar li.now { color: var(--text); font-weight: 600; }
.stepsbar li.done .sbar { background: var(--accent); opacity: 1; }
.stepsbar li.done .sdot { background: var(--accent); border-color: var(--accent); }
.stepsbar li.now .sbar { background: var(--glow); opacity: 1; box-shadow: 0 0 6px color-mix(in srgb, var(--glow) 70%, transparent); }
.stepsbar li.now .sdot { border: 5px solid var(--accent); }
.pop.dpick, .pop.ddmenu { width: max-content; }
.pop.ddmenu { max-width: 420px; }
.acard .chead h2 { color: var(--text); }

/* ---------- The navigation rail (Pravin's specification, 25 Nov 2026) ----------
   A light top tray holding one long dark pill (logo, two groups of buttons, 78 px of empty pill below the last one), then a
   faint divider and the product name written upwards; a small bottom tray with the build, and a short dark pill with the side
   panel button and the account. Every colour, size, radius and shadow is a token, so the schemes can change them. */
:root {
  --rail-w: 64px; --rail-edge: 16px; --rail-gap: 10px;
  --brand-name-inset: 24px; /* MYSAFETY+ name: where it starts, from the start edge of its strip or bar (left on a strip, bottom on a vertical bar; Pravin, 27 Nov 2026) */
  --rail-tray-pad: 9px; --rail-tray-r: 12px; --rail-pill-r: 7px; --rail-pill-tail: 234px; /* 78 px in the specification, then 50% longer (Pravin, 25 Nov 2026) */
  --rail-btn-w: 34px; --rail-btn-h: 32px; --rail-btn-r: 8px; --rail-icon: 18px; --rail-btn-gap: 2px; --rail-avatar: 32px;
  --rail-div-w: 22px; --rail-div-c: rgba(255,255,255,.14); --rail-div-m: 6px;
  --rail-faint-w: 26px; --rail-faint-c: rgba(2,50,70,.16); --rail-name-size: 10px; --rail-name-track: .16em; --rail-name-c: rgba(2,50,70,.34); --rail-name-strong: rgba(2,50,70,.55); --rail-name-press: rgba(255,255,255,.75);
  --rail-page: #E3E7EA;
  --rail-tray-bg: linear-gradient(180deg, #FFFFFF 0%, #F4F6F7 100%);
  --rail-tray-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 0 0 1px rgba(2,50,70,.06), 0 8px 16px -8px rgba(2,50,70,.28), 0 2px 4px -2px rgba(2,50,70,.14);
  --rail-foot-bg: var(--rail-tray-bg); --rail-foot-shadow: var(--rail-tray-shadow); --rail-foot-text: rgba(2,50,70,.45); --rail-foot-faint: var(--rail-faint-c);
  --rail-pill-bg: linear-gradient(180deg, #0B4560 0%, #022C3E 100%); --rail-pill-ring: #022C3E;
  --rail-pill-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 -1px 0 rgba(0,0,0,.40), 0 0 0 1px rgba(2,30,45,.10), 0 1px 1px rgba(2,30,45,.35), 0 3.5px 6px -3px rgba(2,30,45,.40), 0 14px 24px -6px rgba(2,30,45,.45);
  --rail-icon-rest: rgba(255,255,255,.60); --rail-icon-on: #FFFFFF; --rail-hover-bg: rgba(255,255,255,.08);
  --rail-sel-bg: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.09)); --rail-sel-shadow: inset 0 1px 0 rgba(255,255,255,.20), 0 2px 6px -2px rgba(0,0,0,.45);
  --rail-logo-bg: linear-gradient(180deg, #FFFFFF 0%, #E8EEF1 100%); --rail-logo-ink: #1B2224; --rail-logo-plus: #FFC000;
  --rail-badge-bg: var(--accent); --rail-badge-text: #FFFFFF;
}
[data-scheme="sugarcane"], [data-scheme="basalt"] {
  --rail-page: var(--bg-ground);
  --rail-tray-bg: linear-gradient(180deg, #D9DDE2 0%, #C3C8CF 100%);
  --rail-tray-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 0 0 1px rgba(0,0,0,.20), 0 8px 16px -8px rgba(0,0,0,.55), 0 2px 4px -2px rgba(0,0,0,.35);
  --rail-pill-bg: linear-gradient(180deg, #2A323E 0%, #1E242E 100%); --rail-pill-ring: #1E242E;
  --rail-sel-bg: linear-gradient(180deg, #5A6880 0%, #465269 100%);
  --rail-faint-c: rgba(20,24,31,.22); --rail-name-c: rgba(20,24,31,.42); --rail-name-strong: rgba(20,24,31,.62); --rail-name-press: rgba(255,255,255,.55);
  --rail-foot-bg: linear-gradient(180deg, #1B2029 0%, #14181F 100%); --rail-foot-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 1px rgba(0,0,0,.35), 0 8px 16px -8px rgba(0,0,0,.6);
  --rail-foot-text: rgba(255,255,255,.45); --rail-foot-faint: rgba(255,255,255,.14);
}
.shell { --menu-narrow: calc(var(--rail-w) + 2 * var(--rail-edge)); background: var(--rail-page); }
.rail { width: var(--rail-w); flex: none; margin: var(--rail-edge); height: calc(100% - 2 * var(--rail-edge)); display: flex; flex-direction: column; gap: var(--rail-gap); position: relative; z-index: 6; }
.rtray { display: flex; flex-direction: column; align-items: center; padding: var(--rail-tray-pad); border-radius: var(--rail-tray-r); background: var(--rail-tray-bg); box-shadow: var(--rail-tray-shadow); box-sizing: border-box; }
.rtray.top { flex: 1; min-height: 0; overflow: hidden; }
.rtray.foot { background: var(--rail-foot-bg); box-shadow: var(--rail-foot-shadow); gap: 7px; }
.rpill { align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: var(--rail-btn-gap); padding: 6px 0 var(--rail-pill-tail); border-radius: var(--rail-pill-r); background: var(--rail-pill-bg); box-shadow: var(--rail-pill-shadow); }
.rpill.short { padding: 6px 0; }
.rdiv { display: block; flex: none; width: var(--rail-div-w); height: 1px; margin: var(--rail-div-m) 0; background: var(--rail-div-c); }
.rfaint { display: block; flex: none; width: var(--rail-faint-w); height: 1px; margin-top: 15px; background: var(--rail-faint-c); }
.rfaint.small { margin: 0; background: var(--rail-foot-faint); }
.rname .rplus { color: var(--glow); font-weight: 800; filter: drop-shadow(0 0 2px color-mix(in srgb, var(--glow) 80%, transparent)) drop-shadow(0 0 6px color-mix(in srgb, var(--glow) 45%, transparent)); }
.rname b { margin-inline-start: .8em; font-weight: 800; color: var(--rail-name-strong); }
.rname { margin-top: 21px; writing-mode: vertical-rl; transform: rotate(180deg); font: 600 var(--rail-name-size)/1 var(--font-ui); letter-spacing: var(--rail-name-track); color: var(--rail-name-c); white-space: nowrap; }
.rail .build { font: 500 10px/12px var(--font-ui); color: var(--rail-foot-text); margin: 0; opacity: 1; }
/* Buttons: rest 60% white, hover 8% white with a full white icon, selected raised with the Fill icon. */
.rail .rbtn, .rail .rlogo { all: unset; box-sizing: border-box; position: relative; width: var(--rail-btn-w); height: var(--rail-btn-h); flex: none; border-radius: var(--rail-btn-r); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--rail-icon-rest); transition: background-color .15s ease, color .15s ease; }
.rail .rbtn::before { display: none; }
.rail .rbtn:hover { background: var(--rail-hover-bg); color: var(--rail-icon-on); }
.rail .rbtn[aria-current="true"], .rail .rbtn[aria-pressed="true"], .rail .rbtn[aria-expanded="true"] { background: var(--rail-sel-bg); box-shadow: var(--rail-sel-shadow); color: var(--rail-icon-on); }
.rail .rbtn:focus-visible, .rail .rlogo:focus-visible, .rail .rface:focus-visible { outline: 2px solid var(--rail-icon-on); outline-offset: 1px; }
.rail .rbtn svg { width: var(--rail-icon); height: var(--rail-icon); }
.rail .rbtn .ti.on svg { color: var(--rail-icon-on); filter: none; }
.rail .rbtn .soon { position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 3px; background: var(--rail-icon-rest); opacity: .7; }
.rail .rbtn .badge { position: absolute; top: -5px; right: -7px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: var(--rail-badge-bg); color: var(--rail-badge-text);
  font: 700 10px/16px var(--font-ui); text-align: center; box-shadow: 0 0 0 2px var(--rail-pill-ring); }
.rail .rlogo { background: var(--rail-logo-bg); box-shadow: inset 0 1px 0 #FFFFFF, 0 1px 2px rgba(0,0,0,.3); }
.rmark { display: inline-flex; align-items: flex-start; font: 900 17px/1 var(--font-ui); color: var(--rail-logo-ink); letter-spacing: -.02em; }
.rmark i { font-style: normal; font-weight: 900; font-size: 13px; color: var(--rail-logo-plus); margin: -3px 0 0 0; }
.rail .rface { all: unset; box-sizing: border-box; width: var(--rail-avatar); height: var(--rail-avatar); border-radius: 50%; display: inline-flex; cursor: pointer; margin-top: 2px; }
.rail .rface .face { width: var(--rail-avatar); height: var(--rail-avatar); }
/* The side panel button hides the page's own side panel (course outline, pathway steps, media filters). */
.shell.side-hidden .outline, .shell.side-hidden .mside { display: none !important; }
.rsub { width: max-content; min-width: 190px; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.rsub .srow { height: 34px; padding: 0 10px; gap: 9px; border-radius: 9px; font: 500 13px/16px var(--font-ui); }
.rsub .srow[aria-current="true"]::before { opacity: 1; }
.rsub .acct-label { margin: 2px 10px 4px; }
.rnamebox { flex: 1; min-height: 0; align-self: stretch; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; padding-bottom: var(--brand-name-inset); box-sizing: border-box; }
.rnamebox .rname { margin-top: 0; }
/* The name starts at the bottom, --brand-name-inset from the tray's own edge (the tray padding does not count), as the strip's name starts at its left (27 Nov 2026); and the long pill gives way on short windows so the
   name always fits: its empty tail shrinks from 234 px to no less than 12 px. */
.rnamebox { margin-bottom: calc(-1 * var(--rail-tray-pad)); }
.rpill:not(.short) { padding-bottom: min(var(--rail-pill-tail), max(12px, calc(100vh - 680px))); }
/* The logo button shows the real mySafety app icon (Pravin, 25 Nov 2026), filling the button with its own corners. */
.rail .rlogo { background: transparent; box-shadow: 0 1px 2px rgba(0,0,0,.35), 0 3px 6px -2px rgba(0,0,0,.35); overflow: hidden; }
.rail .rlogo .rlogoimg { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
/* The top bar (Pravin, 25 Nov 2026): the page's own colour, no band or line of its own, and its controls start on the same
   line as the top of the rail's trays (16 px from the top). Everything in it sits in one 32 px band: search, selects and
   buttons fill it; the logo, path and tools are centred in it. */
.pgtop { --topband: 32px; height: auto; min-height: 0; padding-top: var(--rail-edge, 16px); padding-bottom: 10px; align-items: flex-start;
  background: var(--rail-page); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 0; }
.mmain > .pgtop { padding-top: var(--rail-edge, 16px); padding-bottom: 10px; }
.pgtop > * { min-height: var(--topband); display: flex; align-items: center; }
.pgtop > .grow { min-height: 0; }
.pgtop .pvbar { top: calc(var(--rail-edge, 16px) + var(--topband) / 2); }
/* Side panels beside the rail (Pravin, 25 Nov 2026): the course outline, pathway steps, review outline and media filters
   start on the line of the rail's trays and end 16 px above the bottom, as a light tray with the rail's corners and depth. */
.shell .outline, .shell .mside { align-self: flex-start; height: calc(100% - 2 * var(--rail-edge)); margin: var(--rail-edge) 6px var(--rail-edge) 0; box-sizing: border-box;
  border-right: 0; border-radius: var(--rail-tray-r); background: var(--rail-tray-bg); box-shadow: var(--rail-tray-shadow); overflow: hidden; }
.shell .mside { overflow: auto; }
[data-scheme="sugarcane"] .shell .outline, [data-scheme="sugarcane"] .shell .mside, [data-scheme="basalt"] .shell .outline, [data-scheme="basalt"] .shell .mside { background: var(--bg-panel); box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 8px 16px -8px rgba(0,0,0,.55); }
/* An action in a tray (Add a company): after a thin vertical divider, never pressed, its icon in the accent. */
.tray .tdiv { display: block; flex: none; align-self: stretch; width: 1px; margin: 6px 4px; background: var(--tray-edge); }
.tray .pill.tact svg { color: var(--accent); }
/* The editor's working bar as one tray (Pravin, 25 Nov 2026): devices | Saved | tools | Send for review. The pieces inside
   lose their own frames; the tray gives the one frame, and thin vertical dividers set the parts apart. */
.pgtop .etray { display: inline-flex; align-items: center; gap: 4px; padding: 4px; }
.pgtop .etray .pvbar { position: static; transform: none; display: flex; }
.pgtop .etray .pvbar .tray, .pgtop .etray .tgroup { background: none; border: 0; box-shadow: none; padding: 0; }
.pgtop .etray .pvbar .tray::after, .pgtop .etray .pvbar .tray::before { display: none; }
.pgtop .etray .tdiv { margin: 4px 4px; }
.pgtop .etray .saved { padding: 0 6px; margin: 0; }
.pgtop .etray .btn:not(.light) { height: 32px; }
.pgtop .etray .tgroup > .btn.light { background: transparent; box-shadow: none; border: 0; }
.pgtop .etray .tgroup > .btn.light:hover { background: var(--tray-sel); }
.pgtop .etray .tdiv[hidden], .pgtop .etray [hidden] { display: none; }
/* The working tray, thin, on the line of the page heading (Pravin, 25 Nov 2026): 28 px controls, 16 px icons, 2 px padding. */
.stage-head .etray { display: inline-flex; align-items: center; gap: 2px; padding: 2px; margin-left: auto; flex: none; }
.stage-head .etray .pvbar { position: static; transform: none; display: flex; margin: 0; }
.stage-head .etray .pvbar .tray, .stage-head .etray .tgroup { background: none; border: 0; box-shadow: none; padding: 0; gap: 2px; }
.stage-head .etray .pvbar .tray::after, .stage-head .etray .pvbar .tray::before { display: none; }
.stage-head .etray .pill, .stage-head .etray .tgroup > .btn.light { height: 28px; min-height: 28px; padding: 0 8px; min-width: 32px; width: auto; }
.stage-head .etray .tgroup > .btn.light { background: transparent; box-shadow: none; border: 0; }
.stage-head .etray .tgroup > .btn.light:hover { background: var(--tray-sel); }
.stage-head .etray svg { width: 16px; height: 16px; }
.stage-head .etray .tdiv { margin: 5px 3px; }
.stage-head .etray .saved { padding: 0 6px; margin: 0; font-size: 12px; }
.stage-head .etray .btn:not(.light) { height: 28px; min-height: 28px; padding: 0 12px; font-size: 13px; gap: 6px; }
.stage-head .etray [hidden] { display: none; }
/* ---------- The work area as a third pane (Pravin, 25 Nov 2026) ----------
   Three panes side by side: the rail, the side panel (where a page has one) and the work area, each framed, 10 px apart
   and 16 px from the window's edges. The work area holds everything being done: top bar, heading, tools, the page. */
:root { --work-bg: linear-gradient(180deg, #FBFCFC 0%, #F3F6F7 100%); --work-bg-solid: #F8FAFA; }
[data-scheme="sugarcane"], [data-scheme="basalt"] { --work-bg: color-mix(in srgb, #FFFFFF 4%, var(--bg-ground)); --work-bg-solid: color-mix(in srgb, #FFFFFF 4%, var(--bg-ground)); }
.shell { --menu-narrow: calc(var(--rail-w) + var(--rail-edge) + var(--rail-gap)); }
.rail { margin-right: var(--rail-gap); }
.shell .outline, .shell .mside { margin-right: var(--rail-gap); }
.work > .page, .work > .stage, .mscreen > .mmain {
  align-self: flex-start; height: calc(100% - 2 * var(--rail-edge)); margin: var(--rail-edge) var(--rail-edge) var(--rail-edge) 0; box-sizing: border-box;
  border-radius: var(--rail-tray-r); background: var(--work-bg); box-shadow: var(--rail-tray-shadow); }
.work > .stage { overflow: hidden; }
[data-scheme="sugarcane"] .work > .page, [data-scheme="sugarcane"] .work > .stage, [data-scheme="sugarcane"] .mscreen > .mmain,
[data-scheme="basalt"] .work > .page, [data-scheme="basalt"] .work > .stage, [data-scheme="basalt"] .mscreen > .mmain { box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 8px 16px -8px rgba(0,0,0,.55); }
/* Inside the pane the top bar takes the pane's colour and starts a little below the pane's top edge. */
.work .pgtop { background: var(--work-bg-solid); padding-top: 12px; }
.mscreen { overflow: visible; }

/* ----- The block strip (Pravin, 25 Nov 2026, board L22c): the menu bar's tray, divider and dark pill at the foot of the work area.
   The tray is 95% of the work area wide; MYSAFETY+ STUDIO and its divider stay on its left; the pill keeps to its right and changes
   length with what it shows. Every value is a menu bar token (--rail-*). */
:root { --rail-well-bg: rgba(0,0,0,.28); --rail-well-shadow: inset 0 2px 4px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.25), 0 1px 0 rgba(255,255,255,.08); --strip-w: 95%; --strip-open: .25s; }
.stage-body > .stagefoot { width: calc(100% + 50px); margin-inline: -25px; padding: 10px 0 14px; }
.bstrip { width: var(--strip-w); box-sizing: border-box; display: flex; align-items: center; gap: 16px; padding: 7px 7px 7px var(--brand-name-inset); border-radius: var(--rail-tray-r); background: var(--rail-tray-bg); box-shadow: var(--rail-tray-shadow); }
.bname { flex: none; display: inline-flex; align-items: center; gap: 9px; font: 600 var(--rail-name-size)/1 var(--font-ui); font-size: 11px; letter-spacing: var(--rail-name-track); color: var(--rail-name-c); white-space: nowrap; }
.bname b { font-weight: 800; color: var(--rail-name-strong); }
.bname .rplus { color: var(--glow); font-weight: 800; filter: drop-shadow(0 0 2px color-mix(in srgb, var(--glow) 80%, transparent)) drop-shadow(0 0 6px color-mix(in srgb, var(--glow) 45%, transparent)); }
.bdiv { display: block; flex: none; width: 1px; height: 26px; background: var(--rail-faint-c); }
.bpill { margin-left: auto; min-width: 0; display: inline-flex; align-items: center; padding: 4px 5px; border-radius: var(--rail-pill-r); background: var(--rail-pill-bg); box-shadow: var(--rail-pill-shadow); transition: padding-inline-start var(--strip-open) ease; }
.bsep { display: block; flex: none; width: 1px; height: 18px; margin: 0 3px; background: var(--rail-div-c); }
.bpill button { all: unset; box-sizing: border-box; flex: none; cursor: pointer; color: var(--rail-icon-rest); border-radius: var(--rail-btn-r); transition: background-color .15s ease, color .15s ease; }
.bpill button:hover { background: var(--rail-hover-bg); color: var(--rail-icon-on); }
.bpill button:focus-visible { outline: 2px solid var(--rail-icon-on); outline-offset: 1px; }
.bpill .bfam { height: var(--rail-btn-h); padding: 0 10px; display: inline-flex; align-items: center; gap: 7px; font: 500 12px/16px var(--font-ui); white-space: nowrap; }
.bpill .bfam svg { width: 16px; height: 16px; } .bpill .bfam svg:last-child { width: 10px; height: 10px; opacity: .55; }
.bpill .bfam[aria-expanded="true"] { background: var(--rail-sel-bg); box-shadow: var(--rail-sel-shadow); color: var(--rail-icon-on); font-weight: 600; }
.btrack { flex: none; display: inline-flex; gap: 2px; padding: 3px; margin: 0 2px 0 4px; border-radius: 9px; background: var(--rail-well-bg); box-shadow: var(--rail-well-shadow); overflow: hidden; }
.btrack.opening { animation: bopen var(--strip-open) cubic-bezier(.2,.8,.2,1); }
@keyframes bopen { from { max-width: 0; opacity: 0; padding-inline: 0; margin-left: 0; } to { max-width: 900px; opacity: 1; } }
.bcell { position: relative; display: inline-flex; }
.bpill .bblk { width: 58px; height: 42px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 500 10px/12px var(--font-ui); white-space: nowrap; }
.bpill .bblk svg { width: 17px; height: 17px; }
.bpill .bvar { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; opacity: .6; }
.bpill .bvar svg { width: 9px; height: 9px; }
.bpill .bvar:hover, .bpill .bvar[aria-expanded="true"] { opacity: 1; background: var(--rail-sel-bg); color: var(--rail-icon-on); }
.bstrip.tight .bfam:not([aria-expanded="true"]) .blab, .bstrip.tight .bfam:not([aria-expanded="true"]) svg:last-child { display: none; }
.bstrip.tight .bfam:not([aria-expanded="true"]) { padding: 0 9px; }
.bstrip.tighter .bname, .bstrip.tighter .bdiv { display: none; }
.bstrip.tighter { padding-left: 7px; }
.bvarmenu { width: 220px; }
.bvarmenu .srow { width: 100%; }
.bvarnote { margin: 6px 10px 4px; font: 400 12px/16px var(--font-ui); color: var(--text-muted); }
@media (prefers-reduced-motion: reduce) { .btrack.opening { animation: none; } .bpill { transition: none; } }

/* The full tree: the open lesson lists its screens; the open bite or screen has a remove button. */
.orow.screen { margin-left: 28px; width: calc(100% - 28px); }
.add-row.sub { margin-left: 30px; height: 26px; }
.orowbox { position: relative; }
.orowbox > .orow { padding-right: 34px; }
.odel { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.odel:hover { color: var(--danger, #B42318); background: var(--bg-panel-soft); }

/* Favourites on the block strip: each saved page as a small card with the icons of its first blocks and its name. */
.bpill .bfav { width: 92px; height: 42px; padding: 4px 6px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.bfavpic { display: inline-flex; gap: 3px; opacity: .9; } .bfavpic svg { width: 12px; height: 12px; }
.bfavname { max-width: 80px; font: 500 10px/12px var(--font-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bfavnote { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 10px; font: 500 11px/14px var(--font-ui); color: var(--rail-icon-rest); white-space: nowrap; }
.bfavnote svg { width: 12px; height: 12px; }
.favask { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.favname { display: flex; flex-direction: column; gap: 5px; font: 600 12px/16px var(--font-ui); color: var(--text); }
.favrep { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow: auto; }
.favrep .srow[aria-checked="true"] { background: var(--bg-panel-soft); font-weight: 600; }
.favnote { font: 400 12px/16px var(--font-ui); color: var(--text-muted); margin: 0; }

/* The small-screen note's drawing: an app window squeezed between two arrows (Phosphor icons), squashing gently. */
.sqtext { display: flex; flex-direction: column; gap: 10px; }
.squeeze { display: flex; align-items: center; justify-content: center; gap: 2px; height: 64px; color: var(--text-muted); }
.squeeze .sqwin { display: inline-flex; color: var(--accent); animation: sqsquash 1.6s ease-in-out infinite; transform-origin: center; }
.squeeze .sqpush { display: inline-flex; animation: sqpushl 1.6s ease-in-out infinite; }
.squeeze .sqpush.r { animation-name: sqpushr; }
@keyframes sqsquash { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(.62, 1.12); } }
@keyframes sqpushl { 0%, 100% { transform: translateX(-6px); } 50% { transform: translateX(10px); } }
@keyframes sqpushr { 0%, 100% { transform: translateX(6px); } 50% { transform: translateX(-10px); } }
@media (prefers-reduced-motion: reduce) { .squeeze .sqwin, .squeeze .sqpush { animation: none; } .squeeze .sqwin { transform: scale(.72, 1.08); } }

/* Block tools (25 Nov 2026): the dark tray sits inside the selected block, at its top right, so no device size can hide it
   (the page's scroll area clipped it when it hung outside the page). */
.block-wrap > .block-tools { top: 6px; right: 6px; flex-direction: row; gap: 2px; padding: 3px; border-radius: 11px; }
.block-wrap > .block-tools button { width: 30px; height: 30px; border-radius: 8px; }
.block-wrap > .block-tools button[aria-expanded="true"] { background: var(--layer-line); }
.bpill .bbg[aria-pressed="true"] { background: var(--rail-sel-bg); box-shadow: var(--rail-sel-shadow); color: var(--rail-icon-on); }
.bvarmenu .srow[aria-checked="true"] { background: var(--bg-panel-soft); font-weight: 600; }

/* ----- Depth (board P12, Pravin's brief, 25 Nov 2026): three surface levels on the work area and panels, never the menu bar.
   Raised: what you look at or have selected (the work sheet, the side panel, cards, tiles, the selected row).
   Flat: ordinary rows and text inside a panel. Recessed (wells): what you fill in or adjust (fields, search, pills, switcher
   tracks, the box holding the course tree). Shadows are the brand's darkest navy mixed 60% with black (--om); --depth-k sets
   how strong raised shadows are, --depth-r how deep wells are. Every value is a token. */
:root, [data-scheme="lemorne"], [data-scheme="chamarel"] {
  --om: 9 20 30; --depth-k: 1.65; --depth-r: .95; --depth-hi: rgb(255 255 255 / .95); --depth-edge: rgb(9 20 30 / .06);
  --page-bg: #DFE3E6; --sheet-bg: #F3F6F7; --card-bg: #FFFFFF; --well-bg: #F1F3F4; --tree-bg: #D7DCDF; --count-bg: #EBEDEE;
  --raise: inset 0 1px 0 var(--depth-hi), 0 0 0 1px var(--depth-edge), 0 1px 1px rgb(var(--om) / calc(.10 * var(--depth-k))), 0 3px 6px -2px rgb(var(--om) / calc(.16 * var(--depth-k))), 0 12px 22px -10px rgb(var(--om) / calc(.26 * var(--depth-k)));
  --raise-sm: inset 0 1px 0 var(--depth-hi), 0 0 0 1px var(--depth-edge), 0 1px 2px rgb(var(--om) / calc(.14 * var(--depth-k))), 0 4px 8px -4px rgb(var(--om) / calc(.22 * var(--depth-k)));
  --well: inset 0 1px 2px rgb(var(--om) / calc(.16 * var(--depth-r))), inset 0 0 0 1px rgb(var(--om) / calc(.07 * var(--depth-r))), 0 1px 0 var(--depth-hi);
}
[data-scheme="chamarel"] { --page-bg: color-mix(in srgb, var(--bg-ground), #0A1A26 6%); --sheet-bg: color-mix(in srgb, var(--bg-ground), #FFFFFF 45%); --well-bg: color-mix(in srgb, var(--bg-ground), #FFFFFF 30%); --tree-bg: color-mix(in srgb, var(--bg-ground), #0A1A26 9%); --count-bg: color-mix(in srgb, var(--bg-ground), #0A1A26 4%); }
[data-scheme="basalt"], [data-scheme="sugarcane"] {
  --depth-k: 1.25; --depth-r: .65; --depth-hi: rgb(255 255 255 / .13); --depth-edge: rgb(255 255 255 / .07);
  --page-bg: #21262F; --sheet-bg: #272E38; --card-bg: #343D4A; --well-bg: #1A1F27; --tree-bg: #1A1F27; --count-bg: #2C343F;
  --raise: inset 0 1px 0 var(--depth-hi), 0 0 0 1px var(--depth-edge), 0 1px 1px rgb(0 0 0 / calc(.30 * var(--depth-k))), 0 4px 8px -2px rgb(0 0 0 / calc(.34 * var(--depth-k))), 0 16px 28px -10px rgb(0 0 0 / calc(.42 * var(--depth-k)));
  --raise-sm: inset 0 1px 0 var(--depth-hi), 0 0 0 1px var(--depth-edge), 0 1px 2px rgb(0 0 0 / calc(.32 * var(--depth-k))), 0 5px 10px -4px rgb(0 0 0 / calc(.38 * var(--depth-k)));
  --well: inset 0 2px 4px rgb(0 0 0 / calc(.50 * var(--depth-r))), inset 0 0 0 1px rgb(0 0 0 / calc(.35 * var(--depth-r))), 0 1px 0 rgb(255 255 255 / .07);
}
[data-scheme="sugarcane"] { --page-bg: color-mix(in srgb, var(--bg-ground), #FFFFFF 6%); --sheet-bg: color-mix(in srgb, var(--bg-ground), #FFFFFF 10%); --card-bg: color-mix(in srgb, var(--bg-ground), #FFFFFF 17%); --well-bg: color-mix(in srgb, var(--bg-ground), #000000 18%); --tree-bg: color-mix(in srgb, var(--bg-ground), #000000 18%); --count-bg: color-mix(in srgb, var(--bg-ground), #FFFFFF 13%); }

/* Step 1: the page, the side panel and the work sheet. The menu bar keeps its own look. */
:root, [data-scheme] { --rail-page: var(--page-bg); --work-bg: var(--sheet-bg); --work-bg-solid: var(--sheet-bg); }
html .shell .work > .page, html .shell .work > .stage, html .shell .mscreen > .mmain { background: var(--sheet-bg); box-shadow: var(--raise); border-radius: 18px; }
html .shell .outline, html .shell .mside { background: var(--sheet-bg); box-shadow: var(--raise); border-radius: 18px; }
.outline .outline-list { margin: 0 8px 10px; padding: 4px; border-radius: 14px; background: var(--tree-bg); box-shadow: var(--well); }
.outline .orow[aria-current="true"] { background: var(--card-bg); box-shadow: var(--raise-sm); }
.outline .orow .count { min-height: 20px; padding: 0 7px; border-radius: 10px; background: var(--count-bg); line-height: 20px; white-space: nowrap; }
.outline .orow .count.needs { color: var(--text); }

/* Depth, step 2: what you fill in or adjust is recessed. Fields, search and dropdowns are wells (a field with focus comes up
   to the card colour with a soft accent ring); switchers (trays in the work area and side panels) are a well track with the
   chosen option raised; tag filters are wells, the chosen one solid. Trays keep their grain; wells cast no light. */
.shell .work .field, .shell .outline .field, .shell .mside .field { border-color: transparent; background: var(--well-bg); box-shadow: var(--well); }
.shell .work .field:focus, .shell .work .field:focus-visible, .shell .outline .field:focus, .shell .mside .field:focus { outline: 0; background: var(--card-bg); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.shell .work .field:disabled { box-shadow: none; border-color: var(--line); background: transparent; }
.shell :is(.work, .outline, .mside) .tray:not(.etray) { border-color: transparent; background: var(--well-bg); box-shadow: var(--well); }
.shell :is(.work, .outline, .mside) .tray:not(.etray)::after { display: none; }
.shell :is(.work, .outline, .mside) .tray:not(.etray) .pill::before { background: var(--card-bg); box-shadow: var(--raise-sm); }
.shell :is(.work, .outline, .mside) .tray:not(.etray) .pill[aria-pressed="true"] { color: var(--text); }
.shell :is(.work, .mside) .tagbtn { border-color: transparent; background: var(--well-bg); box-shadow: var(--well); }
.shell :is(.work, .mside) .tagbtn[aria-pressed="true"] { background: var(--accent); color: var(--accent-on, #FFFFFF); box-shadow: var(--raise-sm); }

/* Depth, step 3: cards and record cards are raised on the card colour; their icon tiles and the number tiles are wells;
   the side panel forms and the settings panel (the inspector) rise above the work sheet. Report pages keep their own colours. */
.shell .work .acard, .shell .work .rec:not(.later) { background: var(--card-bg); border-color: transparent; box-shadow: var(--raise-sm); }
.shell .work .rec.later { background: transparent; border-color: var(--line); }
.shell .work :is(.ctile, .rec-icon) { background: var(--well-bg); box-shadow: var(--well); }
.shell .work .ntiles:not(.rsheet .ntiles) .ntile { background: var(--well-bg); box-shadow: var(--well); }
.shell .layer, .apanel { box-shadow: var(--raise); }

/* Nested corners (25 Nov 2026, Pravin's report): an item inside a box has the box's radius minus the gap between them,
   so the corners run parallel. Tree box 14 px with 4 px padding: rows 10 px. Switcher tracks 10 px around 5 px options
   with 4 px padding and a 1 px edge. The block strip's track 9 px with 3 px padding: blocks 6 px. */
.outline .outline-list .orow, .outline .outline-list .orowbox { border-radius: 10px; }
.shell :is(.work, .outline, .mside) .tray:not(.etray) { border-radius: 10px; }
.bpill .btrack .bblk, .bpill .btrack .bfav { border-radius: 6px; }

/* The Cover row's icon sits in the middle of its tile (25 Nov 2026): in the corner it looked like a picture that failed to load. */
.orow.cover .num { display: inline-flex; align-items: center; justify-content: center; }
.orow.cover .num svg { width: 13px; height: 13px; }

/* The open family's blocks keep the pill's height (25 Nov 2026, Pravin): icon and name side by side, the track exactly as tall
   as a family button (3 px padding around 26 px blocks), the variations caret beside the block instead of over it. */
.bpill .btrack { padding: 3px; }
.bpill .btrack .bcell { align-items: center; gap: 0; }
.bpill .btrack .bblk, .bpill .btrack .bfav { width: auto; height: calc(var(--rail-btn-h) - 6px); padding: 0 8px; flex-direction: row; gap: 6px; font: 500 11px/14px var(--font-ui); }
.bpill .btrack .bblk svg { width: 14px; height: 14px; }
.bpill .btrack .bvar { position: static; width: 14px; height: calc(var(--rail-btn-h) - 6px); margin-left: -2px; border-radius: 5px; }
.bpill .btrack .bfav .bfavpic svg { width: 11px; height: 11px; }
.bpill .btrack .bfavnote { height: calc(var(--rail-btn-h) - 6px); }

/* Grabbing a row in the course structure (25 Nov 2026, Pravin): the number tile is the handle, made as wide as the space
   before the title (the comments dot now sits on its corner). On hover it shows grip dots in place of the number. */
.outline .orow { position: relative; }
.outline .orow[draggable="true"] .num { width: 30px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; cursor: grab; transition: background-color .12s ease; }
.outline .orow[draggable="true"] .num:active { cursor: grabbing; }
.outline .orow[draggable="true"]:hover .num { color: transparent; background-color: var(--well-bg, var(--bg-panel-soft));
  background-image: radial-gradient(circle, var(--text-muted) 1.2px, transparent 1.6px); background-size: 6px 6px; background-repeat: repeat; background-origin: content-box; background-clip: content-box; padding: 7px 9px; box-sizing: border-box; }
.outline .orow > .cdot { position: absolute; left: 3px; top: 5px; z-index: 1; }

/* The + in MYSAFETY+ is the logo's own mark (Pravin, 25 Nov 2026): the logo's orange-gold in every scheme, with a gold glow.
   It is the logo, an agreed fixed colour, not the amber of "you are here". */
:root { --brand-plus: #FFC000; }
.rname .rplus, .bname .rplus { color: var(--brand-plus); filter: drop-shadow(0 0 2px color-mix(in srgb, var(--brand-plus) 70%, transparent)) drop-shadow(0 0 6px color-mix(in srgb, var(--brand-plus) 35%, transparent)); }

/* ----- The settings panel frame (boards P13 option B and P14, Pravin, 25 Nov 2026), spanel.js. Every side panel of the Studio
   and Admin. Open: the menu bar's light tray holding a dark pill head and a light body. Collapsed: the menu bar's shape, the
   name written upwards, each section icon opening a callout. Values are menu bar and depth tokens. */
:root { --spanel-w: 312px; --spanel-edge: 16px; }
.layer.spanel {
  --layer-bg: transparent; --layer-text: var(--text); --layer-muted: var(--text-muted); --layer-line: var(--line); --layer-field: var(--well-bg); --layer-accent: var(--accent); --layer-accent-on: var(--accent-on);
  top: var(--spanel-edge); right: var(--spanel-edge); bottom: var(--spanel-edge); width: var(--spanel-w); padding: var(--rail-tray-pad); gap: 10px;
  border-radius: var(--rail-tray-r); background: var(--rail-tray-bg); box-shadow: var(--rail-tray-shadow); color: var(--text); z-index: 7; }
[data-scheme="sugarcane"] .layer.spanel, [data-scheme="basalt"] .layer.spanel {
  --text: #1B1F24; --text-muted: #4B5560; --line: rgba(20,24,31,.16); --line-strong: rgba(20,24,31,.42); --bg-panel: #EEF0F3; --bg-panel-soft: #DFE3E8;
  --well-bg: #CDD2D9; --card-bg: #F1F3F5; --depth-hi: rgba(255,255,255,.6); --well: inset 0 1px 2px rgba(0,0,0,.18), inset 0 0 0 1px rgba(0,0,0,.08), 0 1px 0 rgba(255,255,255,.5);
  --raise-sm: inset 0 1px 0 rgba(255,255,255,.8), 0 1px 2px rgba(0,0,0,.22), 0 4px 8px -4px rgba(0,0,0,.28); }
.sppill { flex: none; display: flex; align-items: center; gap: var(--rail-btn-gap); padding: 5px; border-radius: var(--rail-pill-r); background: var(--rail-pill-bg); box-shadow: var(--rail-pill-shadow); }
.sppill button { all: unset; box-sizing: border-box; flex: none; width: var(--rail-btn-w); height: var(--rail-btn-h); border-radius: var(--rail-btn-r); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--rail-icon-rest); transition: background-color .15s ease, color .15s ease; }
.sppill button:hover { background: var(--rail-hover-bg); color: var(--rail-icon-on); }
.sppill button:focus-visible { outline: 2px solid var(--rail-icon-on); outline-offset: 1px; }
.sppill button[aria-current="true"], .sppill button[aria-expanded="true"] { background: var(--rail-sel-bg); box-shadow: var(--rail-sel-shadow); color: var(--rail-icon-on); }
.sppill .sptile { background: var(--rail-logo-bg); color: var(--rail-logo-ink); cursor: default; }
.sppill .sptile:hover { background: var(--rail-logo-bg); color: var(--rail-logo-ink); }
.sptitle { flex: 1; min-width: 0; padding: 0 6px; font: 600 13px/16px var(--font-ui); color: var(--rail-icon-on); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spsecs { display: inline-flex; gap: var(--rail-btn-gap); }
.spsecs button { width: 28px; }
.spdiv { display: block; flex: none; width: 1px; height: 18px; margin: 0 3px; background: var(--rail-div-c); }
.spname { display: none; }
.layer.spanel .layer-body { padding: 4px 8px 8px; gap: 16px; }
.layer.spanel .layer-foot { padding: 0 8px 4px; }
.spsub { margin: 0; font: 500 12px/16px var(--font-ui); color: var(--text-muted); }
.sphead, .layer.spanel .spsecbox > h3 { margin: 0 0 8px; font: 600 11px/14px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.spsecbox { display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 8px; }
.spsecbox > p { margin: 0; font: 400 12px/17px var(--font-ui); color: var(--text-muted); }
.layer.spanel .opts { padding: 3px; gap: 3px; border-radius: 10px; background: var(--well-bg); box-shadow: var(--well); }
.layer.spanel .opt { border: 0; background: transparent; border-radius: 7px; }
.layer.spanel .opt[aria-pressed="true"] { background: var(--card-bg); color: var(--text); box-shadow: var(--raise-sm); }
.layer.spanel .lfield { border-color: transparent; background: var(--well-bg); box-shadow: var(--well); color: var(--text); }
.layer.spanel .sec { border-color: var(--line); background: var(--card-bg); box-shadow: var(--raise-sm); scroll-margin-top: 8px; }
/* Collapsed: the menu bar's shape. */
.layer.spanel.collapsed { width: var(--rail-w); align-items: center; gap: 0; animation: none; }
.layer.spanel.collapsed .sppill { flex-direction: column; align-self: stretch; padding: 6px 0 24px; }
.layer.spanel.collapsed .spsecs { flex-direction: column; }
.layer.spanel.collapsed .spsecs button { width: var(--rail-btn-w); }
.layer.spanel.collapsed .spdiv { width: var(--rail-div-w); height: 1px; margin: var(--rail-div-m) 0; }
.layer.spanel.collapsed :is(.sptitle, .spclose, .layer-body, .layer-foot) { display: none; }
.layer.spanel.collapsed .sptile { cursor: pointer; }
.layer.spanel.collapsed .spname { display: flex; flex: 1; min-height: 0; align-items: flex-end; justify-content: center; padding-bottom: var(--brand-name-inset); box-sizing: border-box; overflow: hidden; margin-bottom: calc(-1 * var(--rail-tray-pad)); }
.spname span { writing-mode: vertical-rl; transform: rotate(180deg); font: 600 var(--rail-name-size)/1 var(--font-ui); letter-spacing: var(--rail-name-track); color: var(--rail-name-c); white-space: nowrap; }
.spname b { margin-inline-start: .8em; font-weight: 800; color: var(--rail-name-strong); }
.spcallout { width: 300px; max-height: calc(100vh - 24px); overflow: auto; padding: 10px; }
.spcallout .sec { border: 0; } .spcallout .sec > summary { display: none; }
.spcallout .sphead { display: none; }
@media (prefers-reduced-motion: reduce) { .layer.spanel { animation: none; } }
/* The callout carries the panel's classes so its controls keep their look; only its place and frame differ. */
.layer.spanel.spcallout { position: fixed; right: auto; bottom: auto; height: auto; width: 300px; max-height: calc(100vh - 24px); overflow: auto; z-index: 60; display: block;
  padding: 10px 12px 12px; border-radius: 14px; background: #FBFCFD; border: 1px solid #DDE3E9; box-shadow: 0 4px 10px rgba(0,0,0,.10), 0 22px 44px -14px rgba(0,0,0,.38); animation: none; }
.layer.spanel.spcallout .acct-label { margin: 0 0 8px; }
/* On the panel's light ground, buttons take their light-ground look again (the old dark panel had set dark ones). */
.layer.spanel {
  --b2-bg: linear-gradient(180deg, #FFFFFF 0%, #ECEEEC 100%); --b2-fg: #1B2224; --b2-edge: rgba(27,34,36,.16); --b2-sh: inset 0 1px 0 #FFFFFF, 0 2px 3px rgba(27,34,36,.16), 0 6px 10px -4px rgba(27,34,36,.22);
  --b2-in: linear-gradient(180deg, #E3E6E4 0%, #EEF0EE 100%); --b2-in-fg: #1B2224; --b2-in-sh: inset 0 2px 5px rgba(27,34,36,.25), 0 1px 0 rgba(255,255,255,.7);
  --b1-bg: linear-gradient(180deg, #3A3F42 0%, #1E2325 100%); --b1-fg: #F2F5F5; --b1-edge: rgba(0,0,0,.6); --b1-sh: inset 0 1px 0 rgba(255,255,255,.14), 0 2px 3px rgba(27,34,36,.30), 0 6px 10px -4px rgba(27,34,36,.40);
  --b1-in: linear-gradient(180deg, #1E2325 0%, #2A2F31 100%); --b1-in-fg: #F2F5F5; --b1-in-sh: inset 0 2px 5px rgba(0,0,0,.5); }
/* A panel with many sections puts their icons on a second row of the pill. */
.layer.spanel.manysecs:not(.collapsed) .sppill { flex-wrap: wrap; }
.layer.spanel.manysecs:not(.collapsed) .spsecs { order: 9; flex-basis: 100%; justify-content: flex-start; padding-top: 3px; margin-top: 2px; border-top: 1px solid var(--rail-div-c); }

/* The pencil beside "Course structure", and the titles in the settings panel (Pravin, 25 Nov 2026). */
.olegend.list { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.oedit { width: 24px; height: 24px; border: 0; border-radius: 7px; background: transparent; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.oedit:hover, .oedit:focus-visible { background: var(--well-bg); color: var(--text); }
.strow { display: flex; align-items: center; gap: 6px; }
.stnum { min-width: 26px; height: 26px; padding: 0 4px; box-sizing: border-box; border-radius: 7px; background: var(--well-bg); box-shadow: var(--well); font: 600 11px/26px var(--font-ui); color: var(--text-muted); text-align: center; flex: none; }
.strow .lfield { flex: 1; min-width: 0; }
.strow .sbin { flex: none; width: 30px; padding: 0; }
.stlessons { display: flex; flex-direction: column; gap: 6px; padding-left: 14px; }
.spsecbox .add-row { align-self: flex-start; }
/* In the editor the panel sits between the working tray and the block strip, so neither is covered (as drawn on P14). */
.stage > .layer.spanel { top: 60px; bottom: 78px; }

/* Variation pictures in the variations menus (board L21): a 56 x 34 sketch on a soft tile. */
.vpic { width: 56px; height: 34px; flex: none; border-radius: 7px; background: var(--well-bg, #EEF2F5); box-shadow: var(--well); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.vpic .vprow { display: flex; align-items: center; gap: 2px; } .vpic .vpcol { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.vpic .vp { display: block; flex: none; border-radius: 1.5px; background: color-mix(in srgb, var(--text-muted) 38%, transparent); }
.vpic .vp.ink { background: color-mix(in srgb, var(--text) 75%, transparent); } .vpic .vp.acc { background: var(--accent); } .vpic .vp.line { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text-muted) 55%, transparent); }
.vpic .vp.pic { background: color-mix(in srgb, var(--accent) 30%, #9FB2C0); border-radius: 3px; } .vpic .vp.card { background: var(--card-bg, #FFFFFF); box-shadow: 0 0 0 1px color-mix(in srgb, var(--text-muted) 30%, transparent); border-radius: 3px; }
.vpic .vp.print { background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,.3); border: 2px solid #FFFFFF; border-bottom-width: 4px; box-sizing: border-box; background-clip: padding-box; outline: 0; }
.vpic .vp.hl { background: color-mix(in srgb, var(--accent) 35%, transparent); } .vpic .vp.plus { background: #F2A93B; border-radius: 1px; } .vpic .vp.light { background: #FFFFFF; } .vpic .vp.none { background: transparent; }
.vpic .vp.round { border-radius: 50%; }
.vpic .vpover { position: relative; display: block; width: 48px; height: 28px; }
.vpic .vpover > .vp.pic { width: 48px; height: 26px; }
.bvarmenu .srow:has(.vpic) { min-height: 44px; gap: 10px; }

/* The editor's always-present settings panel (Pravin, 25 Nov 2026). Course settings is the resting panel and has no close;
   the page and the block strip keep clear of it, folded or open. Hidden on screens narrower than a tablet. */
.layer.spanel[data-dock][data-kind="Course"][data-name="Settings"] .spclose { display: none; }
.stage:has(> .layer.spanel[data-dock]) .stage-body { padding-right: calc(var(--rail-w) + 2 * var(--spanel-edge)); }
.stage:has(> .layer.spanel[data-dock]:not(.collapsed)) .stage-body { padding-right: calc(var(--spanel-w) + 2 * var(--spanel-edge)); }
@media (max-width: 767px) { .stage > .layer.spanel[data-dock] { display: none; } .stage:has(> .layer.spanel[data-dock]) .stage-body { padding-right: 25px; } }
.stage:has(> .layer.spanel[data-dock]) .stage-head { padding-right: calc(var(--rail-w) + 2 * var(--spanel-edge)); }
.stage:has(> .layer.spanel[data-dock]:not(.collapsed)) .stage-head { padding-right: calc(var(--spanel-w) + 2 * var(--spanel-edge)); }
@media (max-width: 767px) { .stage:has(> .layer.spanel[data-dock]) .stage-head { padding-right: 25px; } }

/* The docked panel keeps the height it had (Pravin, 25 Nov 2026): between the working tray and the block strip. The page and the
   heading row make room for it; the block strip runs the full width underneath, as drawn on P14. */
.stage:has(> .layer.spanel[data-dock]) { --dockpad: calc(var(--rail-w) + 2 * var(--spanel-edge)); }
.stage:has(> .layer.spanel[data-dock]:not(.collapsed)) { --dockpad: calc(var(--spanel-w) + 2 * var(--spanel-edge)); }
.stage:has(> .layer.spanel[data-dock]) .stage-body > .stagefoot { width: calc(100% + 25px + var(--dockpad)); margin-right: calc(-1 * var(--dockpad)); }
@media (max-width: 767px) { .stage:has(> .layer.spanel[data-dock]) { --dockpad: 25px; } }

/* The account menu as a soft menu (25 Nov 2026): it keeps its place above the account button. */
.pop.smenu.acct { position: absolute; left: calc(var(--menu-narrow) + 6px); bottom: 11px; width: 272px; padding: 10px; gap: 4px; }
.pop.acct .acct-who { margin: 0 2px 4px; }
.pop.acct .acctrow { width: 100%; text-align: left; }
.pop.acct .acctrow .ntext b { font-size: 13px; line-height: 17px; }
.pop.acct .acctrow[aria-current="true"]::before { opacity: 1; }
.pop.acct .acctrow:disabled { opacity: .5; cursor: default; }
.pop.acct .acct-label { margin: 6px 4px 2px; }
.pop.acct .schemes { grid-template-columns: repeat(2, 1fr); gap: 6px; }
.pop.acct > .btn { margin-top: 4px; }

/* The docked panel lines up with its neighbours (25 Nov 2026, Pravin's report): its right edge on the block strip's right edge
   (the strip is 95% wide, so 2.5% in), its top on the working tray's top, and 16 px clear above the strip. */
.stage > .layer.spanel[data-dock] { right: 2.5%; top: var(--dock-top, 68px); bottom: var(--dock-bot, 84px); }
.stage:has(> .layer.spanel[data-dock]) { --dockpad: calc(var(--rail-w) + 2.5% + var(--spanel-edge)); }
.stage:has(> .layer.spanel[data-dock]:not(.collapsed)) { --dockpad: calc(var(--spanel-w) + 2.5% + var(--spanel-edge)); }
/* The working tray stays put whether the panel is open or folded: the panel starts below it, at the page's top (27 Nov 2026). Its right edge is the panel's and the strip's. */
.stage:has(> .layer.spanel[data-dock]) .stage-head, .stage:has(> .layer.spanel[data-dock]:not(.collapsed)) .stage-head { padding-right: 2.5%; }
.stage:has(> .layer.spanel[data-dock]) .stage-body { padding-right: var(--dockpad); }
@media (max-width: 767px) { .stage:has(> .layer.spanel[data-dock]) { --dockpad: 25px; } }
/* One measure for both: 2.5% of the work area itself (container units), so the panel and the strip always share an edge. */
.work > .stage { container-type: inline-size; }
.stage > .layer.spanel[data-dock] { right: 2.5cqw; }
.stage:has(> .layer.spanel[data-dock]) { --dockpad: calc(var(--rail-w) + 2.5cqw + var(--spanel-edge)); }
.stage:has(> .layer.spanel[data-dock]:not(.collapsed)) { --dockpad: calc(var(--spanel-w) + 2.5cqw + var(--spanel-edge)); }
.stage:has(> .layer.spanel[data-dock]) .stage-body > .stagefoot { width: 100cqw; margin-left: -25px; margin-right: calc(-1 * var(--dockpad)); }
@media (max-width: 767px) { .stage:has(> .layer.spanel[data-dock]) { --dockpad: 25px; } }
.stage:has(> .layer.spanel[data-dock]) .stage-body > .stagefoot { align-self: flex-start; margin-right: 0; }

/* The interface name, pressed into its tray (26 Nov 2026, agreed on the Take 5+ bar): thin type, a faint light edge
   under each letter, and no gap after the +. Same on the rail (MYSAFETY+ ADMIN), the block strip (MYSAFETY+ STUDIO), the folded settings panel and the learner bar. */
.bname { gap: 1px; text-shadow: 0 1px 0 var(--rail-name-press); }
.rname, .spname span { text-shadow: 0 -1px 0 var(--rail-name-press); } /* the rail name is turned half a turn, so its edge is set upwards to fall under the letters */
.rname b { margin-inline-start: 1px; }

/* Training sessions (A34) and attendance (A35), 27 Nov 2026 */
.t8-hits { gap: 2px; padding: 4px; border-radius: 10px; background: var(--bg-panel); box-shadow: var(--raise-sm); }
.t8-hits:empty { display: none; }
.t8-hit { display: flex; align-items: center; gap: 8px; padding: 6px; border: 0; background: transparent; border-radius: 8px; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.t8-hit:hover, .t8-hit:focus-visible { background: var(--bg-panel-soft); }
.t8-hit b { font: 600 12px/16px var(--font-ui); } .t8-hit small { font-size: 11px; }
.att .att-box { max-width: 620px; margin: 0 auto; gap: 12px; padding-bottom: 40px; }
.t8-list { padding: 2px 12px; gap: 0; }
.t8-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.t8-row:last-child { border-bottom: 0; }
.t8-row .avatar { width: 34px; height: 34px; background: var(--accent); color: var(--accent-on); }
.t8-row b { font: 600 13px/17px var(--font-ui); color: var(--text); } .t8-row small { font-size: 11px; line-height: 15px; }
.t8-pres, .t8-plus { flex: none; }
.t8-plus { width: var(--control); height: var(--control); padding: 0; justify-content: center; }
.t8-plus[aria-pressed="true"] svg { color: var(--glow); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--glow) 70%, transparent)); }
.t8-plus:disabled { opacity: .35; }
.t8-chips:empty { display: none; }
.apanel .secbody { gap: 12px; }
.apanel .secbody .search { width: 100%; } .apanel .secbody .search input { width: 100%; }

/* Templates: the certificate and wallet card preview (27 Nov 2026) */
.crprev { padding: 8px 0 30px; overflow: auto; }
.crprev-cert { overflow: hidden; border-radius: 4px; box-shadow: var(--raise); }
.crprev-cert > .cr-cert { transform-origin: top left; }
.crprev-cards { display: flex; flex-wrap: wrap; gap: 40px; padding: 30px; }
.crprev-cards .cr-card { transform: scale(1.2); transform-origin: top left; margin: 0 70px 48px 0; }
/* The working tray never hides under the docked panel (27 Nov 2026, Pravin's report on a laptop): it wraps onto a second line. */
.stage-head .etray { flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; max-width: 100%; row-gap: 4px; }
@container (max-width: 760px) { .stage-head .etray .btn .lbl-long { display: none; } }
/* A subject's icon on its header (27 Nov 2026) */
.folder .fold .subjicon { display: inline-flex; width: 26px; height: 26px; border-radius: 8px; align-items: center; justify-content: center; background: var(--bg-panel); box-shadow: var(--raise-sm); color: var(--accent); margin-right: 2px; }

/* The divider follows the name, as on the block strip where "|" comes after it (Pravin, 27 Nov 2026): on a vertical bar it sits just above the name, the empty tray between it and the pill. */
.rtray.top > .rfaint { margin-top: auto; }
.rtray.top > .rnamebox { flex: none; padding-top: 16px; }

/* Font schemes (Pravin, 27 Nov 2026), set on the page as data-font from the person's choice (public/app/fonts.js).
   --font-heading and --font-ui: the app; --content-head and --content-text: course pages and covers. The rules also reach
   elements that carry their own data-scheme, so a scheme never puts the standard fonts back. */
:root { --font-brand: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; --content-head: "Bricolage Grotesque", "Figtree", sans-serif; --content-text: "Figtree", sans-serif; }
:is([data-font="friendly"], [data-font="friendly"] [data-scheme]) { --font-heading: "Nunito", system-ui, sans-serif; --font-ui: "Nunito", system-ui, sans-serif; --content-head: "Nunito", system-ui, sans-serif; --content-text: "Nunito", system-ui, sans-serif; }
:is([data-font="easy"], [data-font="easy"] [data-scheme]) { --font-heading: "Atkinson Hyperlegible", system-ui, sans-serif; --font-ui: "Atkinson Hyperlegible", system-ui, sans-serif; --content-head: "Atkinson Hyperlegible", system-ui, sans-serif; --content-text: "Atkinson Hyperlegible", system-ui, sans-serif; }
:is([data-font="technical"], [data-font="technical"] [data-scheme]) { --font-heading: "IBM Plex Sans", system-ui, sans-serif; --font-ui: "IBM Plex Sans", system-ui, sans-serif; --content-head: "IBM Plex Sans", system-ui, sans-serif; --content-text: "IBM Plex Sans", system-ui, sans-serif; }
/* The brand marks never change with the font scheme: MYSAFETY+ STUDIO, ADMIN, LEARNER and TAKE5 on every bar and strip. */
.rname, .bname, .fd-name { font-family: var(--font-brand) !important; }
.rname b, .bname b, .fd-name b, .rname span, .bname span, .fd-name span { font-family: inherit !important; }
/* Font scheme tiles: "Aa" in each scheme's own font, the same size as a colour tile. */
.fsample { display: flex; align-items: center; justify-content: center; height: 30px; border-radius: 6px; background: var(--bg-panel-soft); font: 600 18px/1 var(--font-heading); color: var(--text); }
.fsample[data-f="standard"] { font-family: "Outfit", "Inter", sans-serif; }
.fsample[data-f="friendly"] { font-family: "Nunito", sans-serif; }
.fsample[data-f="easy"] { font-family: "Atkinson Hyperlegible", sans-serif; }
.fsample[data-f="technical"] { font-family: "IBM Plex Sans", sans-serif; }
