/*~ Studio front end styles: home (moved out of index.html, batch 96 - same rules, same order) */

  /* ---- home tiles (BMS AR's) */
  .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 22px; }
  .tile { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; cursor: pointer; text-decoration: none;
    color: var(--ink); font: inherit; text-align: left; display: flex; flex-direction: column; gap: 6px; min-height: 160px; }
  .tile:hover:not([aria-disabled]) { border-color: var(--blue); box-shadow: 0 2px 10px color-mix(in srgb, var(--blue) 18%, transparent); background: var(--surface); }
  .tile h3 { margin: 0 0 4px; color: var(--link); font-size: 15px; font-weight: 600; }
  .tile p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; }
  .tile .go { font: 600 13px var(--head); color: var(--link); }
  .tile[aria-disabled] { cursor: default; opacity: .7; }
  .tile[aria-disabled] h3 { color: var(--muted); }
  .tile[aria-disabled]:hover { border-color: var(--line); box-shadow: none; }
  .drop-tile, .train-tile { border: 2px dashed var(--input-line); }
  /* Home, after a minute idle: the tasks light up in turn - each one feeds the next */
  .tile.flow-on { animation: flowGlow 6s ease-out; }
  /* the screen saver covers the whole page, above sticky / positioned cards, side panels and pop-outs (Simon 1 Nov 2026 -
     batch 75: Quote v2's plant cards stayed on top); it never takes a click and any input stops it */
  canvas.idlefx { position: fixed; left: 0; top: 0; z-index: 2147483000; pointer-events: none; display: none; opacity: 0; transition: opacity 1.2s ease; }
  #idleFxCard .fxlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 22px; margin: 6px 0 10px; }
  #idleFxCard .fxrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
  @keyframes flowGlow { 0% { box-shadow: 0 0 0 0 transparent; }
    35% { border-color: var(--blue); box-shadow: 0 0 0 3px var(--mint), 0 0 38px 12px color-mix(in srgb, var(--blue) 60%, transparent);
          background: color-mix(in srgb, var(--mint) 22%, var(--surface)); transform: translateY(-2px); }
    100% { box-shadow: 0 0 0 0 transparent; } }
  /* the arrow tiles (Move to Delivery / Service, Service Management) glow along their arrow outline, not as a rectangle */
  .stage .next-tile.flow-on, .stage .info-tile.flow-on, .stage .link-tile.flow-on, .stage .beyond-tile.flow-on { animation: flowGlowArrow 6s ease-out; }
  .stage .next-tile.flow-on::before, .stage .info-tile.flow-on::before, .stage .link-tile.flow-on::before, .stage .beyond-tile.flow-on::before { animation: flowEdge 6s ease-out; }
  @keyframes flowGlowArrow { 0%, 100% { filter: none; }
    35% { filter: drop-shadow(0 0 2px var(--mint)) drop-shadow(0 0 16px color-mix(in srgb, var(--blue) 60%, transparent)); transform: translateY(-2px); } }
  @keyframes flowEdge { 35% { background: var(--blue); } }
  .outflash { animation: outFlash 0.8s ease-in-out 3; }
  @keyframes outFlash { 50% { box-shadow: 0 0 0 4px var(--mint, #5fd3b3); } }
  .flowline { margin: -6px 0 16px; font: 600 15px var(--head); color: var(--link); letter-spacing: .01em; }
  .flowline.lit { background: linear-gradient(90deg, var(--link) 0%, var(--link) 40%, var(--mint) 50%, var(--link) 60%, var(--link) 100%);
    background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: flowShine 3s linear infinite; }
  @keyframes flowShine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
  @media (prefers-reduced-motion: reduce) { .tile.flow-on, .flowline.lit { animation: none; } }
  .drop-tile:hover, .drop-tile:focus-visible, .train-tile:hover, .train-tile:focus-visible { border-color: var(--blue); outline: none; cursor: pointer; }
  .drop-tile.over, .train-tile.over { border-color: var(--link); background: var(--blue-pale); box-shadow: 0 2px 10px color-mix(in srgb, var(--blue) 18%, transparent); }
  .drop-tile.busy { cursor: progress; }
  .ds-tile { border: 2px dashed var(--input-line); cursor: pointer; }
  .ds-tile:hover, .ds-tile:focus-visible { border-color: var(--blue); outline: none; }
  .ds-tile.over { border-color: var(--link); background: var(--blue-pale); }
  .ds-tile.busy { cursor: progress; }
  .ds-tile .dropmsg { font-size: 13px; color: var(--link); line-height: 1.5; }
  .ds-tile .dsres { margin-top: 6px; cursor: default; min-width: 0; }
  /* the tile's result: one short line and "See details" (batch 15 item 4 - the row never stretches); the card a pop-up */
  .ds-tile .dsline { color: var(--ink); line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; overflow: hidden; } .ds-tile .dsline.bad { color: var(--alarm); }
  dialog.dsdlg .dshead { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
  dialog.dsdlg .dsthumb { flex: none; width: 84px; border: 1px solid var(--line); border-radius: 4px; background: #fff; overflow: hidden; }
  dialog.dsdlg .dsthumb img { display: block; width: 100%; height: auto; }
  dialog.dsdlg .dstitle { font: 700 16px var(--head); color: var(--ink); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }   /* a long file name: two lines, the whole name on hover (batch 282) */
  dialog.dsdlg .dsrow { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
  dialog.dsdlg .dstick { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; color: #fff; }
  dialog.dsdlg .dstick.ok { background: var(--ok); } dialog.dsdlg .dstick.no { background: var(--alarm); } dialog.dsdlg .dstick.wait { background: var(--warn); }
  dialog.dsdlg .dspic { display: block; max-width: 260px; margin-top: 6px; background: #fff; border: 1px solid var(--grid); border-radius: 4px; cursor: zoom-in; }
  dialog.dsdlg .dspic img { display: block; width: 100%; height: auto; max-height: 220px; object-fit: contain; }
  dialog.dsdlg .dschips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
  dialog.dsdlg .dsterms { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 6px 0; }
  dialog.dsdlg .dsterms label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
  dialog.dsdlg .dsterms input { width: 70px; }
  /* batch 282 item 2 (Simon 12 Nov 2026): the Datasheet drop dialog as a proper centred modal in the house style (as #ask) -
     blue title bar with its one close cross, a padded body, ONE footer row of buttons (the primary last, on the right) */
  dialog.dsdlg { width: min(560px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
    overflow: auto; margin: auto; background: var(--surface); color: var(--ink); }
  dialog.dsdlg > h2 { margin: 0; padding: 12px 48px 12px 18px; background: var(--blue); color: var(--mint); font-size: 15px; font-weight: 600; position: sticky; top: 0; z-index: 1; }
  dialog.dsdlg > h2 .muted { color: inherit; opacity: .8; }
  dialog.dsdlg > h2 .dlgx { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; padding: 0; border-radius: 50%;
    background: transparent; border: 0; color: inherit; font-size: 16px; line-height: 32px; cursor: pointer; opacity: .8; }
  dialog.dsdlg > h2 .dlgx:hover { opacity: 1; background: rgba(255,255,255,.18); }
  dialog.dsdlg > .body { padding: 16px 18px; min-width: 0; }
  dialog.dsdlg .dsnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  dialog.dsdlg .dssum { margin-top: 12px; }
  dialog.dsdlg .dsfoot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
  @media (max-width: 520px) { dialog.dsdlg > .body { padding: 14px; } dialog.dsdlg .dsfoot { flex-direction: column-reverse; } dialog.dsdlg .dsfoot > button { width: 100%; } }
  /* the page behind a dialog keeps its layout: the hand-over arrow never shrinks or grows with its row */
  .stage .tiles > .next-tile { flex-shrink: 0; align-self: stretch; }
  .ds-tile .dscard { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 8px 10px; margin-top: 6px; }
  .ds-tile .dscard h4 { margin: 0 0 6px; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
  .ds-tile .dspic { display: block; width: 100%; background: #fff; border: 1px solid var(--grid); border-radius: 4px; margin: 0 0 6px; cursor: zoom-in; }
  .ds-tile .dspic img { display: block; width: 100%; height: auto; max-height: 220px; object-fit: contain; }
  .ds-tile .terms { overflow-wrap: anywhere; }
  .drop-tile .dropmsg, .train-tile .dropmsg { font-size: 13px; color: var(--link); line-height: 1.5; }
  .drop-tile .dropmsg .muted { font-size: 13px; }
  .drop-tile .bar { margin: 4px 0 0; }
  .tile .tag, .tile .go { align-self: flex-start; }
  /* Home's delivery stages: a small heading and a light tint per group, from the theme's own colours (BMS AR themes, dark too) */
  .stage { --stage: var(--blue); border-left: 3px solid color-mix(in srgb, var(--stage) 80%, var(--surface)); padding: 10px 12px 12px; margin-bottom: 18px;
    border-radius: 8px; background: color-mix(in srgb, var(--stage) 14%, var(--surface)); }   /* a box behind each stage, a shade darker than its tiles */
  .stage.sales, .htile.sales { --stage: var(--ok); }                                       /* sales: green */
  .stage.delivery, .htile.delivery { --stage: #9AA3AF; }                                      /* delivery: pale grey */
  .stage.service, .htile.service { --stage: var(--blue); }                                   /* service: the theme's blue / purple */
  .stage .tiles { margin-bottom: 0; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }   /* the same column width in every group */
  /* a section's tiles one row that never wraps (Simon, 29 Oct 2026 - batch 15 item 4): they shrink evenly to fit (120px
     the least), the hand-over arrow narrow at the row's end; too narrow for them all, the row scrolls sideways.
     Descriptions are clamped (the full text on hover - clampTips); the drop hint stays at the bottom. */
  .stage .tiles, .stagewrap.fit .stage .tiles { display: flex; flex-wrap: nowrap; gap: 14px; overflow-x: auto; overflow-y: hidden;
    padding-bottom: 2px; scrollbar-width: thin; }
  /* one tile size for the whole page, every row (Simon, 29 Oct 2026 - batch 16 item 8): the width so the longest row
     (Delivery: 9 tiles + its arrow) fits, shorter rows left-aligned, never stretched; one height - the tallest tile's -
     so the drop hints line up at the bottom (sizeHomeTiles sets --tilew / --tileh) */
  .stage .tiles > .tile { flex: 0 0 var(--tilew, 200px); width: var(--tilew, 200px); min-width: 120px; height: var(--tileh, auto); box-sizing: border-box; }
  .stage .tiles > .tile > p { display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; flex: 0 1 auto; }
  .stage .tiles > .tile .dropmsg { margin-top: auto; }
  .stage .tiles > .next-tile { flex: 0 0 104px; width: 104px; min-width: 104px; height: auto; padding-left: 10px; padding-right: 30px; justify-content: center; }
  .stage .tiles > .next-tile::before, .stage .tiles > .next-tile::after { clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%); }
  .stage .tiles > .next-tile h3 { font-size: 13px; line-height: 1.25; overflow-wrap: normal; word-break: keep-all; hyphens: manual; }   /* whole words only (batch 16) */
  .stage .tile, .stage .tile:hover:not([aria-disabled]) { background: color-mix(in srgb, var(--stage) 6%, var(--surface)); }
  /* Help page tiles: the same light tint as the Home section (stage) the task comes from */
  /* a page with no Home section (Clients, the admin pages): its own pale sand tint, used by no section (Simon, 29 Oct
     2026 - not Service's blue) */
  .htile.other { --stage: #C9A227; }
  .htile.sales, .htile.delivery, .htile.service, .htile.other { background: color-mix(in srgb, var(--stage) 6%, var(--surface)); border-color: color-mix(in srgb, var(--stage) 45%, var(--line)); }
  .stage .drop-tile.over { background: var(--blue-pale); }
  .stagehead { margin: 0 0 8px; font: 600 12px var(--head); letter-spacing: .06em; text-transform: uppercase;
    color: color-mix(in srgb, var(--stage) 60%, var(--ink)); }
  .soon-tile { cursor: default; opacity: .75; }   /* a module that's on its way: shown, not clickable */
  .tile .tagrow { margin: -2px 0 6px; }   /* a tile's tag (Coming soon / Beta) on its own line under the title */
  .info-tile .infomsg { font-size: 13px; color: var(--link); line-height: 1.5; }
  .info-tile:focus-visible { border-color: var(--blue); outline: none; }
  /* points on: the work carries on from here - an arrow shape drawn as two layers so its edge follows the point */
  .stage .next-tile, .stage .next-tile:hover:not([aria-disabled]), .stage .info-tile, .stage .info-tile:hover:not([aria-disabled]) { position: relative; border-color: transparent; background: transparent;
    box-shadow: none; padding-right: 44px; isolation: isolate; }
  .stage .next-tile::before, .stage .next-tile::after, .stage .info-tile::before, .stage .info-tile::after { content: ""; position: absolute; z-index: -1;
    clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 50%, calc(100% - 34px) 100%, 0 100%); }
  .stage .next-tile { cursor: default; }
  .stage .next-tile::before, .stage .info-tile::before { inset: -1.5px; background: color-mix(in srgb, var(--stage) 45%, var(--line)); }
  .stage .next-tile:hover::before, .stage .info-tile:hover::before, .stage .info-tile:focus-visible::before { background: var(--blue); }
  .stage .next-tile::after, .stage .info-tile::after { inset: 0; background: color-mix(in srgb, var(--stage) 6%, var(--surface)); }
  /* a link tile, and the tile that follows it: a socket cut into the left side that takes the arrow before it (the same 34px
     point), and a point on the right that leads into the next one */
  .stage .link-tile, .stage .link-tile:hover:not([aria-disabled]), .stage .beyond-tile, .stage .beyond-tile:hover:not([aria-disabled]) { position: relative; border-color: transparent; background: transparent;
    box-shadow: none; padding-left: 44px; padding-right: 44px; isolation: isolate; }
  .stage .link-tile::before, .stage .link-tile::after, .stage .beyond-tile::before, .stage .beyond-tile::after { content: ""; position: absolute; z-index: -1;
    clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 50%, calc(100% - 34px) 100%, 0 100%, 34px 50%); }
  .stage .link-tile::before, .stage .beyond-tile::before { inset: -1.5px; background: color-mix(in srgb, var(--stage) 45%, var(--line)); }
  .stage .link-tile:hover::before, .stage .link-tile:focus-visible::before { background: var(--blue); }
  .stage .link-tile::after, .stage .beyond-tile::after { inset: 0; background: color-mix(in srgb, var(--stage) 6%, var(--surface)); }
  .link-tile:focus-visible { outline: none; }
  .stage .beyond-tile { cursor: default; }
  /* turned on / off from Your account: they fade in and out over 3 seconds, then leave the row */
  .stage .link-tile, .stage .beyond-tile { transition: opacity 3s ease; }
  .stage .link-tile.faded, .stage .beyond-tile.faded { opacity: 0; }
  @media (prefers-reduced-motion: reduce) { .stage .link-tile, .stage .beyond-tile { transition-duration: .2s; } }
  /* beside the arrow it slides left into it: both edges are drawn 1.5px outside their boxes, so the slanted edges sit
     (14px grid gap + 34px point - 3px - this) apart across, and 30.7px brings that to 14px measured square to the slant
     (the point is 34px over half a 250-500px tile, so within 0.2px). Wrapped onto a new row, it lines up as normal */
  .stage .link-tile.beside, .stage .beyond-tile.beside { margin-left: -30.7px; }
  /* Your account: an unlabelled administrator's button - the dialog's own colour */
  .stealth { width: 22px; height: 22px; min-width: 0; padding: 0; border: 0; background: transparent; box-shadow: none; cursor: default; }
  .stealth:hover, .stealth:focus-visible { background: transparent; box-shadow: none; outline: none; }
  /* tooltips, as BMS AR's: dark blue, the title in the accent colour, an arrow to what it's about */
  #tip { position: fixed; z-index: 10000; max-width: 320px; padding: 8px 11px; border-radius: 7px; background: var(--blue-dark); color: var(--on-primary);
    font: 400 13px/1.45 var(--body, system-ui, sans-serif); box-shadow: 0 6px 22px rgba(10, 30, 70, .28); pointer-events: none;
    opacity: 0; transform: translateY(3px); transition: opacity .12s, transform .12s; white-space: pre-line; }
  #tip.on { opacity: 1; transform: none; }
  #tip b { color: var(--mint); font-weight: 600; }
  #tip:has(.tH, .tL) { max-width: 400px; }
  #tip .tH { color: var(--mint); font-weight: 700; font-size: 13.5px; margin-bottom: 3px; }
  #tip .tL { color: var(--mint); font-weight: 600; }
  #tip .tI { padding-left: 12px; text-indent: -8px; }
  #tip .tI::before { content: '• '; color: var(--mint); }
  #tip .tGap { margin: 6px 0; border-top: 1px solid rgba(255, 255, 255, .22); }
  #tip::before { content: ''; position: absolute; left: var(--arrow, 16px); border: 6px solid transparent; }
  #tip.below::before { top: -12px; border-bottom-color: var(--blue-dark); }
  #tip.above::before { bottom: -12px; border-top-color: var(--blue-dark); }
  /* progress bars in the status chips' pale colours: running blue, waiting orange, done green - on a white track */
  .pbar { position: relative; height: 18px; background: var(--surface); border: 1px solid var(--grid); border-radius: 9px; overflow: hidden; min-width: 110px; }
  .pbar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue-pale); border-radius: 9px; transition: width .4s; }
  /* batch 390 item 6 (Simon 15 Nov 2026 - "% complete is lost in the coloured background"): ONE style for every bar's words - two-tone,
     clipped at the fill's edge: --pbar-on over the filled part, --pbar-off over the empty track (--p, the fill's width, is copied
     from the <i> onto the bar by core.js's pbarSync). Each pair is the theme's own contrasting tokens (on-primary on blue, ink on
     surface; the pale fills take the darker words both sides) - WCAG AA (4.5:1) at every fill level, light and dark */
  .pbar { --p: 0%; --pbar-on: var(--link); --pbar-off: var(--link); }
  .pbar span { color: var(--pbar-off); }
  @supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .pbar span { color: transparent; background: linear-gradient(90deg, var(--pbar-on) var(--p), var(--pbar-off) var(--p));
      -webkit-background-clip: text; background-clip: text; }
  }
  /* a finished job's bar: the same panel green as its DONE chip */
  .pbar.done i { background: color-mix(in srgb, var(--ok) 18%, var(--surface)); }
  .pbar.done { --pbar-on: color-mix(in srgb, var(--ok) 45%, var(--ink)); --pbar-off: color-mix(in srgb, var(--ok) 45%, var(--ink)); }
  .pbar.wait i { background: color-mix(in srgb, var(--warn) 20%, var(--surface)); }
  .pbar.wait { --pbar-on: color-mix(in srgb, var(--warn) 40%, var(--ink)); --pbar-off: color-mix(in srgb, var(--warn) 40%, var(--ink)); }
  .pbar span { position: relative; display: block; text-align: center; font: 600 12px/16px var(--head); mix-blend-mode: normal; }
  /* a solid fill where the bar is the page's one job (Quote v2 Send to Panel Drawings - batch 87 item 11): white over the fill,
     ink over the track */
  .pbar.solid i { background: color-mix(in srgb, var(--blue) 50%, var(--blue-dark)); } .pbar.solid { --pbar-on: var(--on-primary, #fff); --pbar-off: var(--ink); } .pbar.solid span { text-shadow: none; }

  /* ---- dropping files */
  .drop { border: 2px dashed var(--input-line); border-radius: 8px; padding: 34px 16px; text-align: center; color: var(--muted);
    transition: background .12s, border-color .12s; }
  .drop.over { border-color: var(--link); background: var(--blue-pale); color: var(--link); }
  .drop .big { font: 600 17px var(--head); color: var(--link); margin-bottom: 4px; }
  .drop .pick { margin-top: 14px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
  /* ---- Home's tray (Simon, 8 Oct 2026): what's been dropped on a task, gathered over several drops until Continue */
  .tray { position: fixed; right: 18px; bottom: 24px; z-index: 62; width: min(500px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
    display: flex; flex-direction: column; background: var(--surface); border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.25); overflow: hidden; }
  .tray > h2 { margin: 0; padding: 12px 48px 12px 18px; background: var(--blue); color: var(--mint); font-size: 15px; font-weight: 600; position: relative; }
  .tray > h2 .dlgx { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; padding: 0; border-radius: 50%;
    background: transparent; border: 0; color: inherit; font-size: 16px; line-height: 32px; cursor: pointer; opacity: .8; }
  .tray > h2 .dlgx:hover { opacity: 1; background: rgba(255,255,255,.18); }
  .tray > .body { padding: 14px 18px 16px; overflow: auto; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
  /* Quote a Project's start popup fits one 1080p view (batch 18, 30 Oct 2026): paired fields side by side, a one-line file row */
  .qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
  .qgrid > .full { grid-column: 1 / -1; }
  .qfiles.compact { margin-bottom: 12px; }
  .qfiles.compact .drop { padding: 8px 10px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
  .qfiles.compact .items { max-height: 18vh; margin-top: 6px; }
  .qfiles.compact .items:empty { display: none; }
  .qtip { display: inline-block; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--muted); color: var(--muted); font: 600 10px/13px var(--head, sans-serif);
    text-align: center; cursor: help; vertical-align: 1px; margin-left: 3px; }
  @media (max-width: 640px) { .qgrid { grid-template-columns: 1fr; } }
  .tray .drop { padding: 18px 12px; }
  .tray .drop .pick { margin-top: 8px; }
  .tray .items, .qfiles .items { border: 1px solid var(--grid); border-radius: 4px; max-height: 38vh; overflow: auto; font-size: 13px; }
  .tray .items:empty::before, .qfiles .items:empty::before { content: "Nothing gathered yet."; display: block; padding: 10px; color: var(--muted); }
  .tray .it, .qfiles .it { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-bottom: 1px solid var(--grid); }
  .tray .it:last-child, .qfiles .it:last-child { border-bottom: 0; }
  .tray .it .nm, .qfiles .it .nm { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .tray .it .sz, .qfiles .it .sz { color: var(--muted); white-space: nowrap; font-size: 12px; }
  .tray .it.unused .nm, .qfiles .it.unused .nm { color: var(--muted); }
  .tray details > summary, .qfiles details > summary { cursor: pointer; list-style: none; } .tray details > summary::-webkit-details-marker, .qfiles details > summary::-webkit-details-marker { display: none; }
  .tray details > summary .nm::before, .qfiles details > summary .nm::before { content: "▸ "; color: var(--muted); }
  .tray details[open] > summary .nm::before, .qfiles details[open] > summary .nm::before { content: "▾ "; }
  .tray details .it, .qfiles details .it { padding-left: 26px; background: var(--surface-alt); }
  .tray button.danger.x, .qfiles button.danger.x { padding: 0 8px; min-width: 0; line-height: 22px; font-size: 12px; }
  .tray .hint { font-size: 13px; }
  /* Quote a Project's start popup: the optional files under the description */
  .qfiles .drop { padding: 10px 12px; font-size: 13px; }
  .qfiles .drop .pick { margin-top: 6px; }
  .qfiles .items { max-height: 22vh; margin-top: 6px; }
  .qfiles .items:empty::before { content: "No files - the description is all Studio reads."; }
  dialog textarea.qdesc { resize: vertical; min-height: 90px; }
  .tray .btns { display: flex; gap: 8px; align-items: center; }
  .drop-tile.gathering { border-color: var(--link); border-style: solid; }
  .bar { height: 10px; background: var(--surface); border: 1px solid var(--grid); border-radius: 5px; overflow: hidden; margin: 10px 0; }
  .bar i { display: block; height: 100%; background: color-mix(in srgb, var(--blue) 22%, var(--surface)); width: 0; transition: width .3s; }
  .cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 12px 0; }
  .cats div { background: var(--surface-alt); border: 1px solid var(--grid); border-radius: 4px; padding: 7px 10px; }
  .cats b { color: var(--link); }
  .fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 16px; }
  .fields [data-fsrc] { margin-top: 2px; font-size: 11px; }
  .fields .warnnote { color: var(--warn, #b45309); }
  .fields .miss input { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 6%, var(--surface)); }
  .checklist label { display: block; padding: 3px 0; }
  .checklist label.off > :not(input) { opacity: .45; }
  .filedrop { border: 1px dashed var(--input-line); border-radius: 4px; padding: 3px 8px; font-size: 13px; color: var(--muted); cursor: pointer; display: inline-block; }
  .filedrop.over { border-color: var(--link); background: var(--blue-pale); color: var(--link); }
  /* speak instead of typing (micBtn): the microphone sits in the box's bottom-right corner, clear of the resize grip */
  .micwrap { position: relative; }
  label.f > .mic, .micwrap > .mic { position: absolute; right: 20px; bottom: 8px; padding: 1px 8px; font-size: 12px; line-height: 18px; }
  label.f > textarea.hasmic, .micwrap > textarea.hasmic { padding-right: 96px; }
  /* answer / change boxes (autoGrow): 5 lines to start, the card's full width, growing with what's typed to about 15
     lines, then scrolling - the microphone stays in the bottom-right corner as it grows */
  textarea.autogrow { width: 100%; line-height: 1.4; resize: vertical; overflow-y: hidden; }
  .mic.on { background: var(--alarm, #c62828); border-color: var(--alarm, #c62828); color: #fff; animation: micpulse 1.2s ease-in-out infinite; }
  @keyframes micpulse { 50% { opacity: .7; } }
  /* the job page's files (Your instructions for the job) */
  .infiles > div { padding: 3px 0; font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .infiles > div.deleted > a, .infiles > div.deleted > span.nm { text-decoration: line-through; opacity: .55; }
  .infiles button.small, .checklist button.small { padding: 0 7px; line-height: 18px; }
  .pdthread { border-left: 3px solid var(--grid); padding-left: 8px; margin-bottom: 6px; }
  #topAct:empty { display: none; }
