/* File Studio. Light by default; dark when Grist says so (the plugin API sets data-grist-appearance
   on <html>), or when the system prefers it and no Grist is there to say otherwise (the demo).

   The family's look: Invoice Studio's neutrals and brand blue, and the dark chrome bar Advanced
   Charts, Invoice Studio and Plan Studio all hang from. What is the gallery's own: pictures sit on a
   slightly darker floor with hairline edges and no shadows, so the photos are the colour on the
   page; documents are drawn as paper with their type on a coloured tab; and the lightbox is a dark
   room. */

:root {
  --gs-surface: #ffffff;
  --gs-surface-2: #f3f6f9;
  --gs-ink: #14202b;
  --gs-muted: #5b6b7e;
  --gs-line: #dde4ec;
  --gs-line-strong: #c3cedb;
  --gs-hover: rgba(20, 32, 43, 0.05);
  --gs-sel: rgba(20, 80, 155, 0.10);
  --gs-focus: #14509b;
  --gs-accent: #14509b;
  --gs-accent-ink: #ffffff;
  --gs-accent-soft: #e6eefa;
  --gs-danger: #c42b33; --gs-danger-ink: #ffffff;
  --gs-ok: #16704a;
  --gs-ground: #e9eef3;
  --gs-tile: #dfe6ed;
  --gs-card: #ffffff;
  --gs-card-line: #d9e1ea;
  --gs-paper: #fbfcfd;
  --gs-paper-ink: #3a4756;
  --gs-tip-bg: #14202b;
  --gs-tip-ink: #f0f5fa;
  --gs-room: #080c10;   /* the dark room of the lightbox and the editors, in both themes */
  --gs-scrim-ink: #f0f5fa;
  --gs-sheet-ink: #1b1f24; --gs-sheet-mute: #5b6670; --gs-sheet-line: #cfd6de; --gs-sheet-head: #eef1f5;   /* ink and lines on the white sheets of a document: the same in both themes */   /* ink on the dark scrims over pictures: light in both themes (unlike the tooltip ink) */
  --gs-field-bg: rgba(20, 80, 155, 0.1); --gs-field-line: rgba(20, 80, 155, 0.55);   /* PDF form fields on a white sheet: the same in both themes */
  --gs-note: #f8efdc;
  --gs-chrome: #101c29;
  --gs-chrome-ink: #f0f5fa;
  --gs-chrome-mute: #9db1c4;
  --gs-chrome-soft: rgba(255, 255, 255, 0.08);
  --gs-chrome-soft-2: rgba(255, 255, 255, 0.15);
  --gs-chrome-rule: rgba(255, 255, 255, 0.14);
  /* file-type tabs: always next to the type's name, never the only sign */
  --gs-t-red: #c2410c; --gs-t-blue: #1d5fbf; --gs-t-green: #16794c; --gs-t-orange: #b45309;
  --gs-t-violet: #6d4bc4; --gs-t-teal: #0f7480; --gs-t-grey: #5b6470; --gs-t-slate: #4a5a6c; --gs-tab-ink: #ffffff;
  --gs-fs-1: 11px;   /* counts, tags, hints */
  --gs-fs-2: 12px;   /* secondary text, captions */
  --gs-fs-3: 13px;   /* the working size */
  --gs-fs-4: 15px;   /* record titles, dialog titles */
  --gs-fs-5: 18px;
  --gs-r-1: 4px; --gs-r-2: 6px; --gs-r-3: 10px; --gs-r-pill: 999px;
  /* depth only for what floats: menus, dialogs, the drawer, the tray, the toast */
  --gs-float: 0 1px 2px rgba(20, 32, 43, 0.06), 0 10px 30px -20px rgba(20, 32, 43, 0.35);
  --gs-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gs-mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-grist-appearance="light"]) {
    --gs-surface: #111a22; --gs-surface-2: #18232e; --gs-ink: #e7eef5; --gs-muted: #8fa1b3; --gs-line: #243240;
    --gs-line-strong: #314253; --gs-hover: rgba(255, 255, 255, 0.05); --gs-sel: rgba(107, 165, 240, 0.16); --gs-focus: #6ba5f0;
    --gs-accent: #6ba5f0; --gs-accent-ink: #0b1219; --gs-accent-soft: #17293f; --gs-danger: #ff6b6f; --gs-danger-ink: #0b1219; --gs-ok: #62c08d;
    --gs-ground: #0b1117; --gs-tile: #17222d; --gs-card: #16212b; --gs-card-line: #263443; --gs-paper: #1d2935; --gs-paper-ink: #c4d0dc;
    --gs-tip-bg: #e7eef5; --gs-tip-ink: #0e151c; --gs-note: #2a2114; --gs-chrome: #15202e;
    --gs-t-red: #f0855a; --gs-t-blue: #7aa9f0; --gs-t-green: #5fc495; --gs-t-orange: #e9a55a;
    --gs-t-violet: #b59cf5; --gs-t-teal: #5cc3cf; --gs-t-grey: #a3acb7; --gs-t-slate: #9fb0c2; --gs-tab-ink: #0b1117;
    --gs-float: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 34px -22px rgba(0, 0, 0, 0.9);
    color-scheme: dark;
  }
}
:root[data-grist-appearance="dark"] {
  --gs-surface: #111a22; --gs-surface-2: #18232e; --gs-ink: #e7eef5; --gs-muted: #8fa1b3; --gs-line: #243240;
  --gs-line-strong: #314253; --gs-hover: rgba(255, 255, 255, 0.05); --gs-sel: rgba(107, 165, 240, 0.16); --gs-focus: #6ba5f0;
  --gs-accent: #6ba5f0; --gs-accent-ink: #0b1219; --gs-accent-soft: #17293f; --gs-danger: #ff6b6f; --gs-danger-ink: #0b1219; --gs-ok: #62c08d;
  --gs-ground: #0b1117; --gs-tile: #17222d; --gs-card: #16212b; --gs-card-line: #263443; --gs-paper: #1d2935; --gs-paper-ink: #c4d0dc;
  --gs-tip-bg: #e7eef5; --gs-tip-ink: #0e151c; --gs-note: #2a2114; --gs-chrome: #15202e;
  --gs-t-red: #f0855a; --gs-t-blue: #7aa9f0; --gs-t-green: #5fc495; --gs-t-orange: #e9a55a;
  --gs-t-violet: #b59cf5; --gs-t-teal: #5cc3cf; --gs-t-grey: #a3acb7; --gs-t-slate: #9fb0c2; --gs-tab-ink: #0b1117;
  --gs-float: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 34px -22px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

html, body, #app { height: 100%; }
body {
  margin: 0; overflow: hidden; background: var(--gs-surface); color: var(--gs-ink);
  font: var(--gs-fs-3)/1.4 var(--gs-font); -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gs-focus); outline-offset: 2px; }
svg { flex: none; }

.gs-app { display: flex; flex-direction: column; height: 100%; position: relative; }
.gs-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- buttons and inputs ---- */
.gs-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--gs-line-strong); background: var(--gs-surface);
  padding: 5px 10px; border-radius: var(--gs-r-2); cursor: pointer; white-space: nowrap; line-height: 18px;
}
.gs-btn:hover { background: var(--gs-surface-2); }
.gs-btn:disabled { opacity: 0.5; cursor: default; }
.gs-btn svg { width: 15px; height: 15px; }
a.gs-btn { color: inherit; text-decoration: none; }   /* a link that looks like its button neighbours (Open in Grist) */
.gs-btn--primary { background: var(--gs-accent); border-color: var(--gs-accent); color: var(--gs-accent-ink); font-weight: 600; }
.gs-btn--primary:hover { background: var(--gs-accent); filter: brightness(1.08); }
.gs-btn--danger { background: var(--gs-danger); border-color: var(--gs-danger); color: var(--gs-danger-ink); }   /* dark text on the lighter red of dark mode */
.gs-btn--icon { padding: 5px 7px; }
.gs-btn.is-on { background: var(--gs-accent-soft); border-color: var(--gs-accent); font-weight: 600; }
.gs-input { width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--gs-line-strong); border-radius: var(--gs-r-2); background: var(--gs-surface); }
.gs-input--inline { width: auto; padding: 4px 6px; }
.gs-seg { display: inline-flex; border: 1px solid var(--gs-line-strong); border-radius: var(--gs-r-2); overflow: hidden; flex: none; }
.gs-seg__btn { border: 0; background: var(--gs-surface); padding: 5px 10px; cursor: pointer; border-left: 1px solid var(--gs-line); display: inline-flex; align-items: center; gap: 6px; }
.gs-seg__btn:first-child { border-left: 0; }
.gs-seg__btn:hover { background: var(--gs-surface-2); }
.gs-seg__btn.is-on { background: var(--gs-accent-soft); font-weight: 600; }
.gs-seg__btn svg { width: 14px; height: 14px; }
.gs-link { border: 0; background: none; padding: 0; color: var(--gs-focus); cursor: pointer; text-decoration: underline; font-size: inherit; }

/* ---- the chrome bar ---- */
.gs-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 7px 12px;
  background: var(--gs-chrome); color: var(--gs-chrome-ink); border-bottom: 1px solid var(--gs-chrome-rule);
  position: relative; z-index: 8;
}
.gs-bar-left, .gs-bar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.gs-brand { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 28px; min-height: 28px; color: inherit; text-decoration: none; }
.gs-brand__logo { width: 22px; height: 22px; flex: none; box-sizing: border-box; padding: 2px; border-radius: var(--gs-r-2); background: #fff; }
.gs-brand__name { font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.gs-mode { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: var(--gs-r-pill); background: var(--gs-chrome-soft); font-size: var(--gs-fs-1); font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; }
.gs-mode__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gs-chrome-mute); flex: none; }
.gs-mode.is-live .gs-mode__dot { background: #59c98f; }
.gs-mode.is-ro .gs-mode__dot { background: #e6b566; }
.gs-mode.is-demo .gs-mode__dot { background: #7fb2f0; }
.gs-counts { color: var(--gs-chrome-mute); font-size: var(--gs-fs-2); white-space: nowrap; }
.gs-toolbar .gs-btn, .gs-toolbar .gs-input { background-color: var(--gs-chrome-soft); border-color: var(--gs-chrome-rule); color: var(--gs-chrome-ink); }
.gs-toolbar .gs-btn:hover { background-color: var(--gs-chrome-soft-2); border-color: var(--gs-chrome-soft-2); }
.gs-toolbar .gs-btn--primary, .gs-toolbar .gs-btn--primary:hover { background: var(--gs-chrome-ink); border-color: transparent; color: var(--gs-chrome); font-weight: 600; filter: none; }
.gs-toolbar .gs-btn--primary:hover { background: #fff; }
.gs-toolbar .gs-seg { border-color: var(--gs-chrome-rule); }
.gs-toolbar .gs-seg__btn { background: transparent; color: var(--gs-chrome-mute); border-left-color: var(--gs-chrome-rule); }
.gs-toolbar .gs-seg__btn:hover { background: var(--gs-chrome-soft); color: var(--gs-chrome-ink); }
.gs-toolbar .gs-seg__btn.is-on { background: var(--gs-chrome-soft-2); color: var(--gs-chrome-ink); }
.gs-toolbar :focus-visible { outline-color: var(--gs-chrome-ink); }
.gs-btn--key { width: 30px; justify-content: center; padding-left: 0; padding-right: 0; font-weight: 700; }

/* ---- the filter bar ---- */
.gs-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 7px 12px; background: var(--gs-surface);
  border-bottom: 1px solid var(--gs-line); position: relative; z-index: 7;
}
.gs-search { position: relative; flex: 0 1 240px; min-width: 140px; }
.gs-search svg { position: absolute; left: 8px; top: 50%; width: 14px; height: 14px; margin-top: -7px; color: var(--gs-muted); pointer-events: none; }
.gs-search .gs-input { padding-left: 28px; }
.gs-inside { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.gs-inside__note { color: var(--gs-muted); font-size: var(--gs-fs-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gs-linkbtn { border: 0; background: none; padding: 2px 0; font: inherit; font-size: var(--gs-fs-2); color: var(--gs-ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.gs-linkbtn:hover { color: var(--gs-focus); }
/* the "Inside files" box sits at the end of the search field, which grows to hold it */
.gs-search.has-inside { flex-basis: 340px; }
.gs-search.has-inside .gs-input { padding-right: 126px; }
.gs-inside__switch { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--gs-muted); font-size: var(--gs-fs-2); gap: 5px; }
.gs-inside__switch[hidden] { display: none; }
.gs-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.gs-chip {
  border: 1px solid var(--gs-line-strong); background: var(--gs-surface); border-radius: var(--gs-r-pill); padding: 3px 10px; cursor: pointer;
  font-size: var(--gs-fs-2); white-space: nowrap; display: inline-flex; gap: 5px; align-items: baseline;
}
.gs-chip:hover { background: var(--gs-surface-2); }
.gs-chip__n { color: var(--gs-muted); font-variant-numeric: tabular-nums; font-size: var(--gs-fs-1); }
.gs-chip.is-on { background: var(--gs-ink); border-color: var(--gs-ink); color: var(--gs-surface); }
.gs-chip.is-on .gs-chip__n { color: inherit; opacity: 0.75; }
.gs-chip:disabled { opacity: 0.45; cursor: default; }
.gs-filters__end { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gs-size { display: inline-flex; align-items: center; gap: 6px; color: var(--gs-muted); }
.gs-size svg { width: 13px; height: 13px; }
.gs-size svg + input + svg { width: 17px; height: 17px; }
.gs-size input { width: 96px; accent-color: var(--gs-accent); }
.gs-label { color: var(--gs-muted); font-size: var(--gs-fs-2); }
.gs-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.gs-check input { accent-color: var(--gs-accent); margin: 0; }

/* the marked-files bar takes the filter bar's place */
.gs-marked { background: var(--gs-accent-soft); }
.gs-marked__n { font-weight: 600; }

/* ---- the stage ---- */
.gs-stage { flex: 1; min-height: 0; position: relative; background: var(--gs-ground); }
.gs-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; outline: none; overscroll-behavior: contain; scrollbar-gutter: stable; }
.gs-scroll:focus-visible { box-shadow: inset 0 0 0 2px var(--gs-focus); }
.gs-canvas { position: relative; width: 100%; }

.gs-empty { max-width: 520px; margin: 48px auto; padding: 0 16px; text-align: center; }
.gs-empty h2 { font-size: var(--gs-fs-4); margin: 0 0 8px; }
.gs-empty p { color: var(--gs-muted); margin: 0 0 16px; }
.gs-empty__actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
/* The Viewer on a folder that holds only folders: the folders to choose from, each with a cover and its count. */
.gs-subs { max-width: 940px; margin: 28px auto; padding: 0 16px; }
.gs-subs h2 { font-size: var(--gs-fs-4); margin: 0 0 4px; }
.gs-subs > p { color: var(--gs-muted); margin: 0 0 16px; font-size: var(--gs-fs-3); }
.gs-subs__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 12px; margin-bottom: 18px; }
.gs-sub {
  display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; cursor: pointer; font: inherit; color: inherit;
  background: var(--gs-card); border: 1px solid var(--gs-card-line); border-radius: var(--gs-r-2);
}
.gs-sub:hover { border-color: var(--gs-line-strong); }
.gs-sub:focus-visible { outline: 2px solid var(--gs-focus); outline-offset: 3px; }
.gs-sub__cover { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--gs-tile); overflow: hidden; }
.gs-sub__none { position: absolute; inset: 8px; display: grid; place-items: center; border: 1.5px dashed var(--gs-line-strong); border-radius: var(--gs-r-2); color: var(--gs-muted); }
.gs-sub__none svg { width: 24px; height: 24px; opacity: 0.7; }
.gs-sub__name { display: block; padding: 8px 12px 0; font-weight: 600; font-size: var(--gs-fs-3); line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-sub__count { display: block; padding: 0 12px 10px; font-size: var(--gs-fs-2); color: var(--gs-muted); font-variant-numeric: tabular-nums; }

/* ---- a record's header in the Files layout ---- */
.gs-head {
  position: absolute; left: 12px; right: 12px; display: flex; align-items: center; gap: 10px; box-sizing: border-box;
  padding: 10px 2px 6px; border-bottom: 1px solid var(--gs-line-strong);
}
.gs-head__title { font-weight: 600; font-size: var(--gs-fs-4); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.gs-head__title:hover { text-decoration: underline; }
.gs-head__n { color: var(--gs-muted); font-size: var(--gs-fs-2); white-space: nowrap; }
.gs-head__add { margin-left: auto; }
/* Properties of a folder */
.gs-dialog--props { width: min(440px, calc(100% - 32px)); max-height: 80%; overflow: auto; }
.gs-props { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 8px; font-size: var(--gs-fs-3); }
.gs-props dt { color: var(--gs-muted); }
.gs-props dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.gs-props__note { margin: 0 0 8px; color: var(--gs-muted); font-size: var(--gs-fs-2); }
.gs-props__h { margin: 14px 0 6px; font-size: var(--gs-fs-1); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gs-muted); }
.gs-props__parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gs-props__parts li { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; font-size: var(--gs-fs-3); }
.gs-props__value { font-variant-numeric: tabular-nums; color: var(--gs-muted); }
.gs-props__bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--gs-surface-2); position: relative; overflow: hidden; }
.gs-props__bar::after { content: ''; position: absolute; inset: 0 auto 0 0; width: calc(var(--share) * 100%); background: var(--gs-accent); border-radius: 2px; }
/* a folder with no file yet */
.gs-emptyrow {
  position: absolute; left: 12px; right: 12px; box-sizing: border-box; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px;
  padding: 0 16px; border: 1px dashed var(--gs-line-strong); border-radius: var(--gs-r-2); color: var(--gs-muted); font-size: var(--gs-fs-2);
}
.gs-head.is-current .gs-head__title { color: var(--gs-focus); }
.gs-head.is-current { border-bottom-color: var(--gs-focus); }

/* ---- the list (Details view): column headings, then a row for each file ---- */
.gs-listhead {
  position: sticky; top: 0; z-index: 4; height: 34px; box-sizing: border-box; display: grid; grid-template-columns: var(--gs-cols); gap: 0 10px; align-items: center;
  padding: 0 12px; background: var(--gs-ground); border-bottom: 1px solid var(--gs-line-strong); font-size: var(--gs-fs-2); color: var(--gs-muted);
}
.gs-listhead__cell { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-listhead__cell button { border: 0; background: none; padding: 4px 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; gap: 5px; align-items: baseline; }
.gs-listhead__cell button:hover { color: var(--gs-ink); }
.gs-listhead__cell.is-sorted { color: var(--gs-ink); font-weight: 600; }
.gs-listhead__cell.is-num { text-align: right; padding-right: 8px; }
.gs-listhead__dir { font-size: 9px; color: var(--gs-muted); }
.gs-row {
  position: absolute; box-sizing: border-box; display: grid; grid-template-columns: var(--gs-cols); gap: 0 10px; align-items: center; padding: 0 0 0 0;
  border-bottom: 1px solid var(--gs-line); cursor: pointer; outline: none; font-size: var(--gs-fs-3); contain: layout paint;
}
.gs-row:hover { background: var(--gs-surface-2); }
.gs-row.is-marked { background: var(--gs-accent-soft); }
.gs-row.is-current { box-shadow: inset 3px 0 0 var(--gs-focus); }
.gs-row:focus-visible { box-shadow: inset 0 0 0 2px var(--gs-focus); }
.gs-row__mark {
  justify-self: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--gs-line-strong); background: var(--gs-surface); color: transparent;
  padding: 0; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity 0.12s;
}
.gs-row__mark svg { width: 12px; height: 12px; }
.gs-row:hover .gs-row__mark, .gs-row:focus-within .gs-row__mark, .has-marks .gs-row__mark { opacity: 1; }
.gs-row.is-marked .gs-row__mark { opacity: 1; background: var(--gs-accent); border-color: var(--gs-accent); color: #fff; }
.gs-row__thumb {
  position: relative; width: 36px; height: 36px; border-radius: var(--gs-r-1); overflow: hidden; background: var(--gs-tile); display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--gs-line);
}
.gs-row__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.18s; }
.gs-row__img.is-in { opacity: 1; }
.gs-row__ext { font-size: var(--gs-fs-1); font-weight: 700; letter-spacing: 0.02em; color: var(--gs-ink); }
.gs-row__thumb.is-type::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tint, var(--gs-line-strong)); }
.gs-row__name { min-width: 0; display: grid; gap: 1px; line-height: 1.25; }
.gs-row__nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.gs-row__hit { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--gs-fs-1); color: var(--gs-muted); }
.gs-row__hit b { font-weight: 600; }
.gs-row__hit mark { background: none; color: var(--gs-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.gs-row__cell { font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gs-muted); font-size: var(--gs-fs-2); }
.gs-row__num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 8px; }
.gs-row__more {
  justify-self: center; width: 28px; height: 28px; border: 0; border-radius: var(--gs-r-1); background: none; color: var(--gs-muted); padding: 0; display: grid; place-items: center; cursor: pointer;
}
.gs-row__more:hover { background: var(--gs-surface); color: var(--gs-ink); }
.gs-row__more svg { width: 15px; height: 15px; }
.gs-row.is-dragged { opacity: 0.5; }
/* a long press opens the menu: no text selection or callout on what is pressed */
.gs-tile, .gs-row, .gs-card, .gs-head { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* ---- the folder list on the left ---- */
.gs-body { flex: 1; min-height: 0; display: flex; position: relative; }
.gs-body .gs-stage { min-width: 0; }
.gs-treebox { flex: none; width: 268px; min-height: 0; display: flex; border-right: 1px solid var(--gs-line); background: var(--gs-surface); }
.gs-treebox[hidden] { display: none; }
.gs-tree { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.gs-tree__head { display: flex; align-items: center; gap: 4px; padding: 10px 8px 6px 14px; }
.gs-tree__title { margin: 0; font-size: var(--gs-fs-1); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gs-muted); }
.gs-tree__close { display: none; }
.gs-tree__find { margin: 0 10px 6px; width: auto; }
.gs-tree__scroll { flex: 1; min-height: 0; overflow: auto; position: relative; outline: none; }
.gs-tree__all, .gs-tree__row {
  display: flex; align-items: center; gap: 6px; box-sizing: border-box; height: 30px; padding-right: 10px; cursor: pointer; white-space: nowrap; font-size: var(--gs-fs-3);
  color: var(--gs-ink); outline: none; user-select: none;
}
.gs-tree__all { padding-left: 14px; }
.gs-tree__all svg, .gs-tree__row svg { width: 15px; height: 15px; flex: none; color: var(--gs-muted); }
.gs-tree__list { position: relative; }
.gs-tree__space { width: 1px; }
.gs-tree__row { position: absolute; left: 0; right: 0; }
.gs-tree__all:hover, .gs-tree__row:hover { background: var(--gs-surface-2); }
.gs-tree__all:focus-visible, .gs-tree__row:focus-visible { box-shadow: inset 0 0 0 2px var(--gs-focus); }
.gs-tree__row.is-selected, .gs-tree__all.is-selected { background: var(--gs-accent-soft); box-shadow: inset 3px 0 0 var(--gs-accent); font-weight: 600; }
.gs-tree__row.is-current:not(.is-selected) .gs-tree__name { color: var(--gs-focus); }
.gs-tree__row.is-dragged { opacity: 0.5; }
.gs-tree__row.is-drop-target, .gs-tree__all.is-drop-target { outline: 2px dashed var(--gs-accent); outline-offset: -2px; }
.gs-tree__toggle { flex: none; width: 18px; height: 18px; padding: 0; border: 0; background: none; border-radius: var(--gs-r-1); display: grid; place-items: center; cursor: pointer; color: var(--gs-muted); }
.gs-tree__toggle svg { width: 12px; height: 12px; transform: rotate(-90deg); transition: transform 0.12s; }   /* the chevron points down; closed it points right */
.gs-tree__row[aria-expanded="true"] .gs-tree__toggle svg { transform: none; }
.gs-tree__toggle:hover { background: var(--gs-surface); color: var(--gs-ink); }
.gs-tree__toggle.is-none { cursor: default; }
.gs-tree__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.gs-tree__n { flex: none; color: var(--gs-muted); font-size: var(--gs-fs-1); font-variant-numeric: tabular-nums; }
.gs-tree__nest { padding: 10px 14px 14px; border-top: 1px solid var(--gs-line); }
.gs-tree__nest .gs-hint { margin: 0 0 8px; }
.gs-toolbar .gs-btn--tree.is-on { background-color: var(--gs-chrome-soft-2); border-color: var(--gs-chrome-ink); }   /* on, in the dark bar: lighter, with a ring */
@media (max-width: 760px) {
  /* on a narrow widget the list slides over the files, and closing it is a button of its own */
  .gs-treebox { position: absolute; z-index: 30; left: 0; top: 0; bottom: 0; width: min(300px, 88%); box-shadow: var(--gs-float); }
  .gs-tree__close { display: grid; }
}
.gs-chip--scope { max-width: 220px; background: var(--gs-accent-soft); border-color: var(--gs-accent); align-items: center; }
.gs-chip--scope svg { width: 13px; height: 13px; flex: none; }
.gs-chip__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* the box dragged over the wall */
.gs-lasso { position: absolute; z-index: 5; pointer-events: none; border: 1px solid var(--gs-accent); background: color-mix(in srgb, var(--gs-accent) 14%, transparent); border-radius: 2px; }
.gs-scroll.is-lassoing { user-select: none; cursor: crosshair; }
/* the command palette */
.gs-pal { top: 10%; width: min(580px, calc(100% - 32px)); padding: 10px; display: flex; flex-direction: column; gap: 8px; max-height: 78%; }
.gs-pal__input { width: 100%; font-size: var(--gs-fs-4); padding: 9px 12px; }
.gs-pal__list { overflow: auto; min-height: 0; }
.gs-pal__group { padding: 8px 10px 4px; font-size: var(--gs-fs-1); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gs-muted); }
.gs-pal__item { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px; border-radius: var(--gs-r-1); cursor: pointer; font-size: var(--gs-fs-3); }
.gs-pal__item[aria-selected="true"] { background: var(--gs-accent-soft); box-shadow: inset 3px 0 0 var(--gs-accent); }
.gs-pal__item.is-off { opacity: 0.55; cursor: default; }
.gs-pal__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-pal__hint { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gs-muted); font-size: var(--gs-fs-2); }
.gs-pal__keys { margin-left: auto; flex: none; font: 600 var(--gs-fs-1)/1 var(--gs-font); padding: 3px 6px; border: 1px solid var(--gs-line-strong); border-radius: var(--gs-r-1); background: var(--gs-surface-2); color: var(--gs-muted); }
.gs-pal__hint + .gs-pal__keys { margin-left: 0; }
.gs-pal__foot { padding: 6px 10px 2px; border-top: 1px solid var(--gs-line); font-size: var(--gs-fs-1); color: var(--gs-muted); }
.gs-pal__none { padding: 18px 10px; color: var(--gs-muted); font-size: var(--gs-fs-3); }
/* cut and not pasted yet */
.gs-tile.is-cut, .gs-row.is-cut { opacity: 0.45; }

/* ---- a tile ---- */
.gs-tile {
  position: absolute; box-sizing: border-box; border-radius: var(--gs-r-1); background: var(--gs-tile); overflow: hidden; cursor: zoom-in;
  outline: none; contain: layout paint;
}
.gs-tile__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.18s; }
.gs-tile__img.is-in { opacity: 1; }
.gs-fit-whole .gs-tile__img { object-fit: contain; }
.gs-tile:hover .gs-tile__img { filter: brightness(1.04); }
.gs-tile.is-current { box-shadow: 0 0 0 2px var(--gs-ground), 0 0 0 4px var(--gs-focus); }
.gs-tile.is-marked::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px var(--gs-accent); border-radius: var(--gs-r-1); pointer-events: none; }
.gs-tile__tag {
  position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 5px; max-width: calc(100% - 12px);
  padding: 2px 7px; border-radius: var(--gs-r-1); background: rgba(11, 17, 23, 0.72); color: var(--gs-scrim-ink); font-size: var(--gs-fs-1); font-weight: 600;
  letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.gs-tile__tag svg { width: 11px; height: 11px; }
/* where a search inside files found its words: the page, then a few words around the match */
.gs-tile__hit {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 7px 5px; background: rgba(11, 17, 23, 0.82); color: var(--gs-scrim-ink);
  font-size: var(--gs-fs-1); line-height: 1.3; pointer-events: none;
}
.gs-tile__hit b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.gs-tile__hit span { display: block; max-height: 2.6em; overflow: hidden; overflow-wrap: anywhere; }
/* the word itself: brighter and underlined, not a colour */
.gs-tile__hit mark, .gs-lb__snippet mark { background: none; color: var(--gs-scrim-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.gs-tile.has-hit .gs-tile__tag { display: none; }
.gs-tile.has-hit .gs-paper { inset: 8% 8% calc(var(--gs-hit-h) + 4px) 8%; padding-top: 30px; }
.gs-tile.has-hit .gs-paper__text { display: none; }
.gs-tile__mark {
  position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(11, 17, 23, 0.35); color: transparent; cursor: pointer; padding: 0; opacity: 0; transition: opacity 0.12s;
  display: grid; place-items: center;
}
.gs-tile__mark svg { width: 13px; height: 13px; }
.gs-tile:hover .gs-tile__mark, .gs-tile:focus-visible .gs-tile__mark, .gs-tile.is-marked .gs-tile__mark, .has-marks .gs-tile__mark { opacity: 1; }
.gs-tile.is-marked .gs-tile__mark { background: var(--gs-accent); border-color: var(--gs-accent); color: var(--gs-accent-ink); }
.gs-tile__more {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: var(--gs-r-2); padding: 0; cursor: pointer;
  background: rgba(11, 17, 23, 0.55); color: #fff; opacity: 0; display: grid; place-items: center;
}
.gs-tile__more svg { width: 15px; height: 15px; }
.gs-tile:hover .gs-tile__more, .gs-tile:focus-within .gs-tile__more { opacity: 1; }
.gs-caption {
  position: absolute; height: 22px; line-height: 22px; font-size: var(--gs-fs-2); color: var(--gs-muted); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; padding: 0 2px; box-sizing: border-box;
}
.gs-tile.is-loading { background-image: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.25) 50%, transparent 70%); background-size: 200% 100%; animation: gs-shimmer 1.4s linear infinite; }
:root[data-grist-appearance="dark"] .gs-tile.is-loading { background-image: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%); }
@keyframes gs-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* a document drawn as paper: the type on a coloured tab, the name, and for text files the first lines */
.gs-paper {
  position: absolute; inset: 8%; background: var(--gs-paper); color: var(--gs-paper-ink); border: 1px solid var(--gs-line-strong);
  border-radius: var(--gs-r-1); display: flex; flex-direction: column; padding: calc(10% + 30px) 10% 9%; box-sizing: border-box; overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}
.gs-paper::before { content: ""; position: absolute; top: 0; right: 0; width: 16px; height: 16px; background: var(--gs-line-strong); clip-path: polygon(0 0, 0 100%, 100% 100%); }
.gs-paper__type {
  position: absolute; top: 10%; left: 0; padding: 2px 8px 2px 10%; font-size: var(--gs-fs-1); font-weight: 700; letter-spacing: 0.06em;
  color: var(--gs-tab-ink); background: var(--tint, var(--gs-t-slate)); border-radius: 0 var(--gs-r-1) var(--gs-r-1) 0;
}
.gs-paper__name { margin-top: auto; font-weight: 600; font-size: var(--gs-fs-2); line-height: 1.3; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gs-paper__size { color: var(--gs-muted); font-size: var(--gs-fs-1); margin-top: 2px; }
.gs-paper__text { font: var(--gs-fs-1)/1.35 var(--gs-mono); white-space: pre-wrap; word-break: break-all; overflow: hidden; flex: 1; min-height: 0; opacity: 0.85; margin-bottom: 6px; mask-image: linear-gradient(to bottom, #000 70%, transparent); }
.gs-paper--media { padding-top: 20%; align-items: center; justify-content: center; text-align: center; }
.gs-paper--media svg { width: 34%; height: auto; color: var(--tint); opacity: 0.85; margin-bottom: 8px; }
.gs-t-red { --tint: var(--gs-t-red); } .gs-t-blue { --tint: var(--gs-t-blue); } .gs-t-green { --tint: var(--gs-t-green); }
.gs-t-orange { --tint: var(--gs-t-orange); } .gs-t-violet { --tint: var(--gs-t-violet); } .gs-t-teal { --tint: var(--gs-t-teal); }
.gs-t-grey { --tint: var(--gs-t-grey); } .gs-t-slate { --tint: var(--gs-t-slate); }
.gs-play {
  position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%;
  background: rgba(11, 17, 23, 0.6); display: grid; place-items: center; pointer-events: none;
}
.gs-play::after { content: ""; margin-left: 4px; border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }

/* ---- a card ---- */
.gs-card {
  position: absolute; box-sizing: border-box; background: var(--gs-card); border: 1px solid var(--gs-card-line); border-radius: var(--gs-r-2);
  overflow: hidden; display: flex; flex-direction: column; cursor: pointer; outline: none; contain: layout paint;
}
.gs-card:hover { border-color: var(--gs-line-strong); }
.gs-card.is-current { border-color: var(--gs-focus); box-shadow: 0 0 0 1px var(--gs-focus); }
/* focus is its own mark, outside the card, so the current record and the keyboard's place never look alike */
.gs-card:focus-visible, .gs-tile:focus-visible, .gs-strip__item:focus-visible { outline: 2px solid var(--gs-focus); outline-offset: 3px; }
.gs-card__cover { position: relative; flex: none; background: var(--gs-tile); overflow: hidden; }
.gs-card__cover .gs-tile__img { cursor: zoom-in; }
.gs-cover-fit .gs-card__cover .gs-tile__img { object-fit: contain; }
.gs-card__cover.is-empty { background: var(--gs-surface-2); }
.gs-card__none {
  position: absolute; inset: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1.5px dashed var(--gs-line-strong); border-radius: var(--gs-r-2); color: var(--gs-muted); font-size: var(--gs-fs-2); text-align: center; padding: 8px;
}
.gs-card__none svg { width: 22px; height: 22px; opacity: 0.7; }
.gs-card__count {
  position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: var(--gs-r-pill); background: rgba(11, 17, 23, 0.72); color: var(--gs-scrim-ink);
  font-size: var(--gs-fs-1); font-weight: 600; pointer-events: none; font-variant-numeric: tabular-nums;
}
/* a folder of folders: the cover is from a folder below it, so it carries a folder mark */
.gs-card__folder { position: absolute; left: 8px; top: 8px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: var(--gs-r-pill); background: rgba(11, 17, 23, 0.72); color: var(--gs-scrim-ink); pointer-events: none; }
.gs-card__folder svg { width: 15px; height: 15px; }
.gs-card__dots { position: absolute; left: 8px; right: 70px; bottom: 11px; display: flex; gap: 3px; pointer-events: none; opacity: 0; transition: opacity 0.15s; }
.gs-card:hover .gs-card__dots { opacity: 1; }
.gs-card__dot { flex: 1; max-width: 22px; height: 3px; border-radius: var(--gs-r-1); background: rgba(255, 255, 255, 0.5); box-shadow: 0 0 2px rgba(0, 0, 0, 0.4); }
.gs-card__dot.is-on { background: #fff; }
.gs-card__body { padding: 8px 12px; min-height: 0; overflow: hidden; }
.gs-card__title { font-weight: 600; font-size: var(--gs-fs-3); line-height: 20px; max-height: 40px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.gs-card__title.is-blank { color: var(--gs-muted); font-weight: 500; font-style: italic; }
.gs-card__field { display: flex; gap: 8px; line-height: 20px; font-size: var(--gs-fs-2); white-space: nowrap; }
.gs-card__field:first-of-type { margin-top: 6px; }
.gs-card__label { color: var(--gs-muted); flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.gs-card__value { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gs-card__value.is-empty { color: var(--gs-muted); }
.gs-card__open {
  position: absolute; top: 8px; right: 8px; border: 0; border-radius: var(--gs-r-2); padding: 4px 8px; font-size: var(--gs-fs-1); font-weight: 600;
  background: rgba(11, 17, 23, 0.6); color: #fff; cursor: pointer; opacity: 0;
}
.gs-card:hover .gs-card__open, .gs-card:focus-within .gs-card__open { opacity: 1; }

/* ---- dropping files ---- */
.is-drop-target { outline: 2px dashed var(--gs-accent) !important; outline-offset: -2px; }
.gs-card.is-drop-target .gs-card__cover::after, .gs-head.is-drop-target::after, .gs-emptyrow.is-drop-target::after, .gs-viewer.is-drop-target .gs-viewer__stage::after {
  content: attr(data-drop); position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 12px;
  background: color-mix(in srgb, var(--gs-accent) 18%, transparent); color: var(--gs-ink); font-weight: 600; z-index: 3;
}
.gs-dropsheet {
  position: absolute; inset: 0; z-index: 15; display: grid; place-items: center; pointer-events: none;
  background: color-mix(in srgb, var(--gs-surface) 70%, transparent);
}
.gs-dropsheet__box { border: 2px dashed var(--gs-accent); border-radius: var(--gs-r-3); padding: 22px 28px; background: var(--gs-surface); text-align: center; max-width: 360px; }
.gs-dropsheet__box strong { display: block; font-size: var(--gs-fs-4); margin-bottom: 4px; }
.gs-dropsheet__box span { color: var(--gs-muted); }

/* ---- the Viewer layout ---- */
.gs-viewer { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--gs-ground); }
.gs-viewer__head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--gs-line); background: var(--gs-surface); flex-wrap: wrap; }
.gs-viewer__nav { display: inline-flex; align-items: center; gap: 2px; }
.gs-viewer__title { font-weight: 600; font-size: var(--gs-fs-4); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-viewer__pos { color: var(--gs-muted); font-size: var(--gs-fs-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gs-viewer__actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.gs-viewer__stage { flex: 1; min-height: 0; position: relative; }
.gs-strip {
  flex: none; display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; overflow-y: hidden; border-top: 1px solid var(--gs-line);
  background: var(--gs-surface); scrollbar-width: thin;
}
.gs-strip__item {
  position: relative; flex: none; width: 76px; height: 58px; border-radius: var(--gs-r-1); overflow: hidden; background: var(--gs-tile);
  cursor: pointer; border: 0; padding: 0; outline: none;
}
.gs-strip__item.is-on { box-shadow: 0 0 0 2px var(--gs-surface), 0 0 0 4px var(--gs-focus); }
.gs-strip__item .gs-paper { inset: 5px; padding: 30% 8% 6%; }
.gs-strip__item .gs-paper__name, .gs-strip__item .gs-paper__size, .gs-strip__item .gs-paper__text { display: none; }
.gs-strip__item .gs-paper__type { font-size: var(--gs-fs-1); padding: 1px 5px 1px 6px; }
.gs-strip__cover { position: absolute; left: 3px; top: 3px; font-size: var(--gs-fs-1); font-weight: 700; padding: 1px 5px; border-radius: var(--gs-r-1); background: var(--gs-accent); color: var(--gs-accent-ink); pointer-events: none; }
.gs-strip__add {
  flex: none; width: 76px; height: 58px; border: 1.5px dashed var(--gs-line-strong); border-radius: var(--gs-r-1); background: transparent;
  color: var(--gs-muted); cursor: pointer; display: grid; place-items: center; font-size: var(--gs-fs-1);
}
.gs-strip__add:hover { border-color: var(--gs-accent); color: var(--gs-accent); }
.sortable-ghost { opacity: 0.35; }

/* ---- what the stage shows: one file, large ---- */
.gs-media { position: absolute; inset: 0; overflow: hidden; display: grid; place-items: center; touch-action: none; user-select: none; }
.gs-media__img { max-width: none; max-height: none; transform-origin: 0 0; position: absolute; left: 0; top: 0; will-change: transform; image-rendering: auto; }
.gs-media__img.is-pixelated { image-rendering: pixelated; }
.gs-media.is-zoomed { cursor: grab; }
.gs-media.is-panning { cursor: grabbing; }
.gs-media__video { max-width: 100%; max-height: 100%; background: #000; }
.gs-media__audio { width: min(520px, 90%); }
.gs-media__pages { position: absolute; inset: 0; overflow: auto; display: block; padding: 16px 0; box-sizing: border-box; touch-action: pan-x pan-y; user-select: text; }
.gs-media__page { display: block; margin: 0 auto 12px; background: #fff; outline: 1px solid rgba(0, 0, 0, 0.25); }
.gs-media__text {
  position: absolute; inset: 0; overflow: auto; margin: 0; padding: 16px 20px; box-sizing: border-box; background: var(--gs-surface); color: var(--gs-ink);
  font: var(--gs-fs-2)/1.5 var(--gs-mono); white-space: pre-wrap; word-break: break-word; user-select: text; touch-action: pan-x pan-y; tab-size: 4;
}
.gs-media__table { position: absolute; inset: 0; overflow: auto; background: var(--gs-surface); user-select: text; touch-action: pan-x pan-y; }
.gs-media__table table { border-collapse: collapse; font-size: var(--gs-fs-2); min-width: 100%; }
.gs-media__table th, .gs-media__table td { border: 1px solid var(--gs-line); padding: 4px 8px; text-align: left; white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.gs-media__table th { position: sticky; top: 0; background: var(--gs-surface-2); font-weight: 600; }
.gs-media__table td.is-num { text-align: right; font-variant-numeric: tabular-nums; }
.gs-media__note { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: var(--gs-tip-bg); color: var(--gs-tip-ink); font-size: var(--gs-fs-2); padding: 5px 10px; border-radius: var(--gs-r-2); white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis; z-index: 2; }
.gs-media--card { touch-action: auto; user-select: text; }
.gs-media__card { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 20px; max-width: 360px; }
.gs-media__card .gs-paper { position: relative; inset: auto; width: 150px; height: 190px; }
.gs-media__card strong { font-size: var(--gs-fs-4); word-break: break-word; }
.gs-media__card p { margin: 0; color: var(--gs-muted); }
.gs-loading { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--gs-muted); font-size: var(--gs-fs-2); }
.gs-loading__bar { width: 180px; height: 4px; border-radius: var(--gs-r-1); background: var(--gs-line); overflow: hidden; }
.gs-loading__fill { height: 100%; width: 0; background: var(--gs-accent); transition: width 0.15s; }
.gs-loading__fill.is-unknown { width: 35%; animation: gs-indef 1.1s ease-in-out infinite; }
@keyframes gs-indef { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* ---- the lightbox: a dark room, whatever the theme ---- */
.gs-lightbox {
  position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--gs-room); color: var(--gs-ink);
  --gs-surface: #111a22; --gs-surface-2: #18232e; --gs-ink: #e7eef5; --gs-muted: #8fa1b3; --gs-line: #243240; --gs-line-strong: #314253;
  --gs-tile: #17222d; --gs-paper: #1d2935; --gs-paper-ink: #c4d0dc; --gs-focus: #6ba5f0; --gs-accent: #6ba5f0; --gs-accent-ink: #0b1219; --gs-accent-soft: #17293f; --gs-danger: #ff6b6f; --gs-danger-ink: #0b1219; --gs-ok: #62c08d;
  --gs-t-red: #f0855a; --gs-t-blue: #7aa9f0; --gs-t-green: #5fc495; --gs-t-orange: #e9a55a; --gs-t-violet: #b59cf5; --gs-t-teal: #5cc3cf; --gs-t-grey: #a3acb7; --gs-t-slate: #9fb0c2; --gs-tab-ink: #0b1117;
  --gs-float: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 34px -22px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}
.gs-lb__bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; min-height: 44px; box-sizing: border-box; }
.gs-lb__name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-lb__meta { color: var(--gs-muted); font-size: var(--gs-fs-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gs-lb__tools { margin-left: auto; display: flex; align-items: center; gap: 2px; }
/* after a search inside files: where the words are, one quiet line under the bar */
.gs-lb__found { flex: none; display: flex; align-items: baseline; gap: 10px; padding: 0 14px 8px; font-size: var(--gs-fs-2); min-width: 0; }
.gs-lb__found[hidden] { display: none; }
.gs-lb__where { font-weight: 600; white-space: nowrap; }
.gs-lb__snippet { color: var(--gs-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-lb__count { color: var(--gs-muted); white-space: nowrap; font-variant-numeric: tabular-nums; margin-left: auto; }
.gs-lb__nextmatch { flex: none; align-self: center; padding: 2px 10px; min-height: 26px; }
.gs-lb__zoomtools { display: contents; }
.gs-lb__btn {
  flex: none; border: 0; background: transparent; color: #c9d5e1; width: 34px; height: 34px; border-radius: var(--gs-r-2); cursor: pointer; display: grid; place-items: center; padding: 0;
}
.gs-lb__btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.gs-lb__btn:disabled { opacity: 0.35; cursor: default; background: none; }
.gs-lb__btn svg { width: 18px; height: 18px; }
.gs-lb__btn.is-on { background: rgba(255, 255, 255, 0.16); color: #fff; }
.gs-lb__zoom { min-width: 46px; text-align: center; font-size: var(--gs-fs-2); color: #c9d5e1; font-variant-numeric: tabular-nums; border: 0; background: none; cursor: pointer; border-radius: var(--gs-r-2); height: 30px; }
.gs-lb__zoom:hover { background: rgba(255, 255, 255, 0.1); }
.gs-lb__sep { width: 1px; height: 20px; background: rgba(255, 255, 255, 0.14); margin: 0 4px; }
.gs-lb__body { flex: 1; min-height: 0; position: relative; display: flex; }
.gs-lb__stage { flex: 1; min-width: 0; position: relative; }
.gs-lb__arrow {
  position: absolute; top: 50%; width: 44px; height: 64px; margin-top: -32px; border: 0; border-radius: var(--gs-r-3); z-index: 3; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); color: #fff; display: grid; place-items: center; opacity: 0.75;
}
.gs-lb__arrow:hover { background: rgba(255, 255, 255, 0.16); opacity: 1; }
.gs-lb__arrow svg { width: 22px; height: 22px; }
.gs-lb__arrow--prev { left: 10px; }
.gs-lb__arrow--next { right: 10px; }
.gs-lb__info { flex: none; width: 260px; border-left: 1px solid rgba(255, 255, 255, 0.1); padding: 14px 16px; overflow: auto; font-size: var(--gs-fs-2); box-sizing: border-box; }
.gs-lb__info h3 { font-size: var(--gs-fs-1); text-transform: uppercase; letter-spacing: 0.06em; color: var(--gs-muted); margin: 14px 0 4px; font-weight: 600; }
.gs-lb__info h3:first-child { margin-top: 0; }
.gs-lb__info dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; }
.gs-lb__info dt { color: var(--gs-muted); }
.gs-lb__info dd { margin: 0; word-break: break-word; }
.gs-lb__strip { flex: none; display: flex; gap: 6px; padding: 8px 12px 10px; overflow-x: auto; scrollbar-width: thin; }
.gs-lb__strip .gs-strip__item { width: 64px; height: 48px; }
.gs-lightbox .gs-strip__item.is-on { box-shadow: 0 0 0 2px var(--gs-room), 0 0 0 4px var(--gs-ink); }
.gs-lb__record { border: 0; background: none; color: var(--gs-muted); cursor: pointer; padding: 4px 6px; min-height: 26px; border-radius: var(--gs-r-1); font: inherit; font-size: var(--gs-fs-2); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30%; }
.gs-lb__record:hover { color: #fff; }
.gs-lightbox .gs-menu { background: var(--gs-surface-2); border-color: var(--gs-line-strong); color: var(--gs-ink); }
.gs-lightbox .gs-menu__item:hover { background: rgba(255, 255, 255, 0.08); }
.gs-lightbox .gs-media__text, .gs-lightbox .gs-media__table { background: var(--gs-surface); color: var(--gs-ink); }

/* ---- drawers, dialogs, menus ---- */
.gs-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.32); z-index: 50; }
.gs-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--gs-surface); z-index: 51;
  display: flex; flex-direction: column; box-shadow: var(--gs-float);
}
.gs-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--gs-line); }
.gs-drawer__head h2 { font-size: var(--gs-fs-4); margin: 0; }
.gs-drawer__body { flex: 1; overflow: auto; padding: 4px 16px 16px; }
.gs-drawer__body h3 { font-size: var(--gs-fs-1); text-transform: uppercase; letter-spacing: 0.04em; color: var(--gs-muted); margin: 18px 0 6px; }
.gs-drawer__foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--gs-line); }
.gs-spacer { flex: 1; }
.gs-field { margin: 10px 0; }
.gs-field > label, .gs-field > .gs-field__label { display: block; font-weight: 600; font-size: var(--gs-fs-2); margin-bottom: 4px; }
.gs-hint { color: var(--gs-muted); font-size: var(--gs-fs-2); margin: 4px 0 0; }
.gs-hint code, .gs-dialog code { font: var(--gs-fs-1) var(--gs-mono); background: var(--gs-surface-2); padding: 1px 4px; border-radius: var(--gs-r-1); }
.gs-warn { color: var(--gs-danger); font-size: var(--gs-fs-2); margin: 4px 0 0; }
.gs-checks { display: flex; flex-direction: column; gap: 5px; padding: 2px 0; }
.gs-icon-btn { border: 0; background: transparent; width: 32px; height: 32px; border-radius: var(--gs-r-2); cursor: pointer; color: var(--gs-muted); display: grid; place-items: center; padding: 0; }
.gs-icon-btn:hover { background: var(--gs-surface-2); color: var(--gs-ink); }
.gs-icon-btn svg { width: 18px; height: 18px; }
.gs-tokens { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.gs-token { border: 1px solid var(--gs-line-strong); background: var(--gs-surface-2); border-radius: var(--gs-r-1); padding: 1px 6px; font: var(--gs-fs-1) var(--gs-mono); cursor: pointer; }
.gs-token:hover { border-color: var(--gs-accent); }
.gs-preview { font: var(--gs-fs-2) var(--gs-mono); background: var(--gs-surface-2); border-radius: var(--gs-r-2); padding: 6px 8px; margin-top: 6px; color: var(--gs-muted); word-break: break-all; }

.gs-dialog {
  position: absolute; z-index: 52; left: 50%; top: 16%; transform: translateX(-50%); width: min(440px, calc(100% - 32px));
  background: var(--gs-surface); color: var(--gs-ink); border-radius: var(--gs-r-3); padding: 16px 18px; box-shadow: var(--gs-float); box-sizing: border-box;
}
.gs-dialog h2 { font-size: var(--gs-fs-4); margin: 0 0 8px; }
.gs-dialog p { margin: 0 0 14px; color: var(--gs-muted); }
.gs-dialog__list { margin: -6px 0 14px; padding-left: 18px; color: var(--gs-ink); font-size: var(--gs-fs-2); line-height: 1.5; max-height: 160px; overflow: auto; }
.gs-dialog .gs-dialog__problem { color: var(--gs-danger); margin-top: -6px; }
.gs-dialog__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.gs-menu {
  position: absolute; z-index: 60; min-width: 190px; max-width: 300px; background: var(--gs-surface); border: 1px solid var(--gs-line-strong);
  border-radius: var(--gs-r-2); padding: 4px; box-shadow: var(--gs-float); display: flex; flex-direction: column;
}
.gs-menu__item { border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: var(--gs-r-1); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-menu__item:hover, .gs-menu__item:focus-visible { background: var(--gs-surface-2); outline: none; }
.gs-menu__item:disabled { opacity: 0.45; cursor: default; background: none; }
.gs-menu__item.is-danger { color: var(--gs-danger); }
/* a second line saying what the item really does (Remove: only this cell / every cell) */
.gs-menu__item.has-note { display: flex; flex-direction: column; gap: 1px; white-space: normal; padding-top: 6px; padding-bottom: 6px; }
.gs-menu__note { font-size: var(--gs-fs-1); color: var(--gs-muted); line-height: 1.3; }
.gs-menu__sep { height: 1px; background: var(--gs-line); margin: 4px 2px; }

/* a label with a short form for phones */
.gs-narrow { display: none; }

/* ---- the Display popover ---- */
.gs-pop {
  position: absolute; z-index: 60; width: min(300px, calc(100% - 12px)); box-sizing: border-box; background: var(--gs-surface);
  border: 1px solid var(--gs-line-strong); border-radius: var(--gs-r-3); box-shadow: var(--gs-float); padding: 12px 14px;
}
.gs-pop__body { display: flex; flex-direction: column; gap: 12px; }
.gs-pop__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gs-pop__label { font-weight: 600; font-size: var(--gs-fs-2); }
.gs-pop__checks { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--gs-line); padding-top: 12px; }
.gs-pop .gs-size input { width: 140px; }

/* ---- uploads and messages ---- */
.gs-tray {
  position: absolute; right: 12px; bottom: 12px; z-index: 30; width: min(340px, calc(100% - 24px)); background: var(--gs-surface);
  border: 1px solid var(--gs-line-strong); border-radius: var(--gs-r-3); box-shadow: var(--gs-float); overflow: hidden;
}
.gs-tray__head { display: flex; align-items: center; gap: 8px; padding: 9px 8px 9px 14px; font-weight: 600; border-bottom: 1px solid var(--gs-line); }
.gs-tray__head span { flex: 1; }
.gs-tray__list { max-height: 210px; overflow: auto; padding: 4px 0; }
.gs-tray__row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 6px 14px; font-size: var(--gs-fs-2); }
.gs-tray__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-tray__state { color: var(--gs-muted); font-size: var(--gs-fs-2); white-space: nowrap; }
.gs-tray__row.is-error .gs-tray__state { color: var(--gs-danger); }
.gs-tray__row.is-done .gs-tray__state { color: var(--gs-ok); }
.gs-tray__bar { grid-column: 1 / -1; height: 3px; border-radius: var(--gs-r-1); background: var(--gs-line); overflow: hidden; }
.gs-tray__fill { height: 100%; background: var(--gs-accent); width: 0; transition: width 0.15s; }
.gs-tray__why { grid-column: 1 / -1; color: var(--gs-danger); font-size: var(--gs-fs-2); }

.gs-toast {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 70; max-width: calc(100% - 32px);
  background: var(--gs-tip-bg); color: var(--gs-tip-ink); padding: 8px 12px; border-radius: var(--gs-r-2); box-shadow: var(--gs-float);
  display: flex; align-items: center; gap: 12px;
}
.gs-toast__btn { border: 0; background: none; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0; }
.gs-banner {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; background: var(--gs-note); border-bottom: 1px solid var(--gs-line); font-size: var(--gs-fs-2);
}
.gs-banner > span { flex: 1; min-width: 0; }

/* ---- keyboard sheet ---- */
.gs-keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 16px; align-items: baseline; }
.gs-keys dt { white-space: nowrap; }
.gs-keys dd { margin: 0; }
.gs-keys kbd { font: 600 var(--gs-fs-1)/1 var(--gs-font); padding: 3px 6px; border: 1px solid var(--gs-line-strong); border-bottom-width: 2px; border-radius: var(--gs-r-1); background: var(--gs-surface-2); white-space: nowrap; }
.gs-dialog--keys { width: min(500px, calc(100% - 32px)); max-height: 80%; overflow: auto; }
.gs-dialog--keys .gs-dialog__foot { position: sticky; bottom: -16px; margin: 0 -18px -16px; padding: 10px 18px 16px; background: var(--gs-surface); border-top: 1px solid var(--gs-line); }

@media (max-width: 900px) {
  .gs-btn__label, .gs-brand__name, .gs-sort-word, .gs-wide { display: none; }
  .gs-narrow { display: inline; }
  /* the chips scroll sideways in the room search, tag, sort and Display leave; under 140px they take a row of their own */
  .gs-search, .gs-search.has-inside { flex: 0 1 300px; }
  .gs-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 140px; flex: 1 1 140px; }
  .gs-chips::-webkit-scrollbar { display: none; }
  .gs-chips { mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }   /* says: more to the right */
  .gs-chip { flex: none; }
}
@media (max-width: 620px) {
  .gs-counts, .gs-btn--key { display: none; }
  .gs-seg--icons .gs-seg__label { display: none; }
  .gs-filters { flex-wrap: wrap; }
  .gs-search, .gs-search.has-inside { flex: 1 1 100%; }
  .gs-lb__info { position: absolute; inset: 0 0 0 auto; width: min(300px, 90%); background: #0b0f14; z-index: 4; }
  /* a phone pinches and double-taps to zoom; the bar keeps the name, Download, Details and Close */
  .gs-lb__zoomtools, .gs-lb__tab, .gs-lb__record, .gs-lb__meta { display: none; }
  .gs-lb__name { flex: 1 1 auto; }
  .gs-lb__arrow { width: 36px; height: 52px; margin-top: -26px; }
  .gs-filters__end { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}

/* ---- choices in a dialog ---- */
.gs-choices { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.gs-choice { flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 12px; text-align: left; white-space: normal; }
.gs-choice__label { font-weight: 600; }
.gs-choice__hint { font-size: var(--gs-fs-2); opacity: 0.8; font-weight: 400; }
.gs-lb__go { margin-top: 12px; background: transparent; border-color: var(--gs-line-strong); }
.gs-keys__group { font-size: var(--gs-fs-3); font-weight: 600; margin: 12px 0 6px; }

/* ---- rename by pattern ---- */
.gs-renames { list-style: none; margin: 0 0 14px; padding: 8px 10px; background: var(--gs-surface-2); border-radius: var(--gs-r-2); font: var(--gs-fs-2)/1.6 var(--gs-mono); overflow-wrap: anywhere; }
.gs-renames__old { color: var(--gs-muted); }
.gs-renames__more { color: var(--gs-muted); font-family: var(--gs-font); }

/* transparent pictures: a light checkerboard, the convention of every image editor */
.gs-alpha {
  background-color: #ffffff;
  background-image: conic-gradient(#e6eaee 25%, #ffffff 0 50%, #e6eaee 0 75%, #ffffff 0);
  background-size: 16px 16px;
}

/* ---- where it is, the row card ---- */
.gs-places { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.gs-places__item { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-radius: var(--gs-r-2); }
.gs-places__item.is-here { background: rgba(255, 255, 255, 0.06); }
.gs-places__where { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gs-places__row { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-places__path { color: var(--gs-muted); font-size: var(--gs-fs-1); overflow-wrap: anywhere; }   /* wraps: "shown here" at the end must stay readable */
.gs-places__go { display: flex; gap: 2px; flex: none; }
.gs-places__none { color: var(--gs-muted); margin: 0; }
.gs-rowcard { width: min(520px, calc(100% - 32px)); max-height: 80%; display: flex; flex-direction: column; }
.gs-rowcard__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.gs-rowcard__head h2 { margin: 0; }
.gs-dialog .gs-rowcard__sub { margin: 2px 0 12px; font-size: var(--gs-fs-2); }
.gs-rowcard__list { display: grid; grid-template-columns: minmax(90px, max-content) 1fr; gap: 6px 14px; margin: 0 0 14px; overflow: auto; min-height: 0; }
.gs-rowcard__list dt { color: var(--gs-muted); }
.gs-rowcard__list dd { margin: 0; overflow-wrap: anywhere; }
.gs-rowcard__empty { color: var(--gs-muted); }
.gs-rowcard__files { display: flex; flex-wrap: wrap; gap: 4px 10px; }

/* ---- the record picker ---- */
.gs-pick { width: min(460px, calc(100% - 32px)); }
.gs-pick__list { margin: 8px 0 14px; max-height: 280px; overflow: auto; display: flex; flex-direction: column; border: 1px solid var(--gs-line); border-radius: var(--gs-r-2); }
.gs-pick__item { display: flex; flex-direction: column; gap: 1px; text-align: left; border: 0; border-bottom: 1px solid var(--gs-line); background: none; padding: 7px 10px; cursor: pointer; }
.gs-pick__item:last-child { border-bottom: 0; }
.gs-pick__item:hover, .gs-pick__item.is-on { background: var(--gs-accent-soft); }
.gs-pick__title { font-weight: 600; }
.gs-pick__meta { color: var(--gs-muted); font-size: var(--gs-fs-2); }
.gs-rowcard__list--places { display: block; }
.gs-lightbox .gs-icon-btn { color: var(--gs-muted); } .gs-lightbox .gs-icon-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--gs-ink); }
.gs-tile.is-dragged { opacity: 0.45; }

/* ---- the picture editor: the lightbox's dark room, with a panel ---- */
.gs-ed__wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gs-ink); background: rgba(8, 12, 16, 0.72); z-index: 6; font-size: var(--gs-fs-4); }
.gs-ed__title { color: var(--gs-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gs-ed__title .gs-lb__name { color: var(--gs-ink); }
.gs-ed__save { gap: 4px; }
.gs-ed__save svg { width: 13px; height: 13px; }
.gs-ed__body { flex: 1; min-height: 0; display: flex; }
.gs-ed__stage { flex: 1; min-width: 0; position: relative; overflow: hidden; }
.gs-ed__canvas { position: absolute; left: 0; top: 0; touch-action: none; }
.gs-ed__panel { flex: none; width: 300px; display: flex; flex-direction: column; border-left: 1px solid var(--gs-line); background: var(--gs-surface); min-height: 0; }
.gs-ed__tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 8px; border-bottom: 1px solid var(--gs-line); }
.gs-ed__tab { border: 0; background: none; color: var(--gs-muted); padding: 6px 10px; border-radius: var(--gs-r-2); cursor: pointer; font-weight: 600; }
.gs-ed__tab:hover { color: var(--gs-ink); background: var(--gs-surface-2); }
.gs-ed__tab.is-on { color: var(--gs-ink); background: var(--gs-accent-soft); }
.gs-ed__panel-body { flex: 1; min-height: 0; overflow: auto; padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.gs-ed__group { display: flex; flex-direction: column; gap: 8px; }
.gs-ed__label { font-size: var(--gs-fs-1); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gs-muted); }
.gs-ed__chips { display: flex; flex-wrap: wrap; gap: 4px; }
.gs-ed__row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gs-ed__flipv svg { transform: rotate(90deg); }   /* the Flip arrows, turned: top and bottom swap */
.gs-ed__slider { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; }
/* a neutral track: a slider at rest is not "on"; the thumb and number turn accent once it moves */
.gs-ed__slider input { grid-column: 1 / -1; width: 100%; height: 24px; margin: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; }
.gs-ed__slider input::-webkit-slider-runnable-track { height: 4px; border-radius: var(--gs-r-pill); background: var(--gs-line-strong); }
.gs-ed__slider input::-moz-range-track { height: 4px; border-radius: var(--gs-r-pill); background: var(--gs-line-strong); }
.gs-ed__slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--gs-ink); border: 2px solid var(--gs-surface); box-sizing: border-box; }
.gs-ed__slider input::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--gs-ink); border: 2px solid var(--gs-surface); box-sizing: border-box; }
.gs-ed__slider.is-changed input::-webkit-slider-thumb { background: var(--gs-accent); }
.gs-ed__slider.is-changed input::-moz-range-thumb { background: var(--gs-accent); }
.gs-ed__slider.is-changed .gs-ed__value { color: var(--gs-accent); font-weight: 600; }
.gs-ed__slider input:focus-visible { outline: 2px solid var(--gs-focus); outline-offset: 2px; border-radius: var(--gs-r-1); }
.gs-ed__slider-name { cursor: default; user-select: none; }
.gs-ed__value { color: var(--gs-muted); font-variant-numeric: tabular-nums; font-size: var(--gs-fs-2); }
.gs-ed__swatches { display: flex; gap: 8px; }
.gs-ed__swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--gs-line-strong); background: var(--sw); cursor: pointer; padding: 0; }
.gs-ed__swatch.is-on { box-shadow: 0 0 0 2px var(--gs-surface), 0 0 0 4px var(--gs-ink); }
.gs-ed__num { width: 92px; }
.gs-ed__dims span { color: var(--gs-muted); }
.gs-ed .gs-hint { margin: 0; }
@media (max-width: 720px) {
  .gs-ed__body { flex-direction: column; }
  .gs-ed__panel { width: auto; height: 44%; border-left: 0; border-top: 1px solid var(--gs-line); }
  .gs-ed__title { display: none; }
}

/* ---- the text editor ---- */
.gs-te__status { color: var(--gs-muted); font-size: var(--gs-fs-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-variant-numeric: tabular-nums; }
.gs-te .gs-lb__tools { gap: 4px; }
.gs-te__note { flex: none; padding: 6px 14px; background: #2a2114; color: #e9c27a; font-size: var(--gs-fs-2); }
.gs-te__body { flex: 1; min-height: 0; display: flex; position: relative; }
.gs-te__editor { flex: 1; min-width: 0; overflow: hidden; }
.gs-te__editor .cm-editor { height: 100%; }
.gs-te__preview { flex: 1; min-width: 0; position: relative; border-left: 1px solid var(--gs-line); background: #ffffff; overflow: auto; }
.gs-te__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #ffffff; }
.gs-te__tag { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: var(--gs-r-1); background: rgba(11, 17, 23, 0.72); color: var(--gs-scrim-ink); font-size: var(--gs-fs-1); pointer-events: none; }
.gs-te__svg { position: absolute; inset: 0; display: grid; place-items: center; }
.gs-te__svg img { max-width: 90%; max-height: 90%; }
.gs-te__md { padding: 20px 28px; color: #14202b; font: var(--gs-fs-3) / 1.6 var(--gs-font); max-width: 760px; }
.gs-te__md h1, .gs-te__md h2, .gs-te__md h3 { line-height: 1.25; margin: 1.2em 0 0.5em; }
.gs-te__md h1 { font-size: 22px; } .gs-te__md h2 { font-size: 18px; } .gs-te__md h3 { font-size: 15px; }
.gs-te__md code { font: var(--gs-fs-2) var(--gs-mono); background: #f3f6f9; padding: 1px 4px; border-radius: var(--gs-r-1); }
.gs-te__md pre { background: #f3f6f9; padding: 10px 12px; border-radius: var(--gs-r-2); overflow: auto; }
.gs-te__md table { border-collapse: collapse; } .gs-te__md th, .gs-te__md td { border: 1px solid #dde4ec; padding: 4px 8px; }
.gs-te__md a { color: #14509b; }
.gs-te__md th { text-align: left; font-weight: 600; background: #f3f6f9; }
.gs-te__md td { font-variant-numeric: tabular-nums; }
.gs-te__md blockquote { margin: 0 0 1em; padding: 2px 0 2px 14px; border-left: 3px solid #c9d3de; color: #3a4756; }
.gs-te__md blockquote p { margin: 0.4em 0; }
.gs-te__grid { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--gs-surface); }
.gs-te__gridtools { flex: none; display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--gs-line); flex-wrap: wrap; }
.gs-te__gridscroll { flex: 1; min-height: 0; overflow: auto; position: relative; outline: none; }
.gs-te__gridscroll:focus-visible { box-shadow: inset 0 0 0 2px var(--gs-focus); }
.gs-te__table { border-collapse: collapse; font-size: var(--gs-fs-2); color: var(--gs-ink); }
.gs-te__table th, .gs-te__table td { border: 1px solid var(--gs-line); padding: 4px 8px; height: 26px; box-sizing: border-box; white-space: pre; max-width: 320px; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.gs-te__table thead th { position: sticky; top: 0; background: var(--gs-surface-2); color: var(--gs-muted); font-weight: 600; z-index: 1; text-align: center; min-width: 60px; }
.gs-te__table tbody th { position: sticky; left: 0; background: var(--gs-surface-2); color: var(--gs-muted); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.gs-te__table .gs-te__corner { left: 0; z-index: 2; }
.gs-te__table th.is-col, .gs-te__table th.is-row { color: var(--gs-ink); background: var(--gs-accent-soft); }
.gs-te__table tr.is-head td { font-weight: 600; }
.gs-te__table td { cursor: cell; font-variant-numeric: tabular-nums; }
.gs-te__table td.is-num { text-align: right; }
.gs-te__table td.is-on { outline: 2px solid var(--gs-focus); outline-offset: -2px; }
.gs-te__cellinput {
  position: absolute; z-index: 3; box-sizing: border-box; padding: 3px 7px; border: 2px solid var(--gs-focus); border-radius: 0; resize: none;
  background: var(--gs-surface); color: var(--gs-ink); font: var(--gs-fs-2) / 1.4 var(--gs-font); overflow: hidden; white-space: pre; width: auto; max-width: 480px; field-sizing: content;
}
@media (max-width: 720px) {
  .gs-te__body { flex-direction: column; }
  .gs-te__preview { border-left: 0; border-top: 1px solid var(--gs-line); }
  .gs-te__status { display: none; }
}
@media (max-width: 480px) {
  .gs-te__word { display: none; }   /* the Preview button keeps its eye and its name for screen readers */
}

/* ---- the PDF editor: pages as a grid, pages as sheets to fill and sign ---- */
.gs-ed .gs-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.gs-pe__stage { overflow: auto; background: var(--gs-room); padding: 16px; box-sizing: border-box; }
.gs-pe__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; align-content: start; }
.gs-pe__tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px 8px; min-width: 0;
  border: 1px solid var(--gs-line); border-radius: var(--gs-r-2); background: var(--gs-surface); cursor: grab; user-select: none;
}
.gs-pe__tile:hover { border-color: var(--gs-line-strong); }
.gs-pe__tile.is-sel { border-color: var(--gs-accent); background: var(--gs-accent-soft); }
.gs-pe__tile:focus-visible { outline: 2px solid var(--gs-focus); outline-offset: 2px; }
.gs-pe__tile.is-removed .gs-pe__thumb { opacity: 0.35; }
.gs-pe__tile.is-ghost { opacity: 0.4; }
.gs-pe__tile.is-chosen { cursor: grabbing; }
.gs-pe__paper { position: relative; display: grid; place-items: center; width: 100%; height: 176px; }
.gs-pe__thumb { display: block; background: #fff; box-shadow: 0 0 0 1px var(--gs-line-strong); }
.gs-pe__badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 3px 9px; border-radius: var(--gs-r-1); background: var(--gs-surface-2); color: var(--gs-ink); border: 1px solid var(--gs-line-strong); font-size: var(--gs-fs-2); font-weight: 600; }
.gs-pe__cap { display: flex; justify-content: space-between; gap: 8px; width: 100%; font-size: var(--gs-fs-2); color: var(--gs-muted); min-width: 0; }
.gs-pe__num { font-weight: 600; color: var(--gs-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gs-pe__from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gs-pe__tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; opacity: 0; transition: opacity 0.12s; }
.gs-pe__tile:hover .gs-pe__tools, .gs-pe__tile:focus-within .gs-pe__tools, .gs-pe__tile.is-sel .gs-pe__tools { opacity: 1; }
.gs-pe__tbtn { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 1px solid var(--gs-line-strong); border-radius: var(--gs-r-1); background: var(--gs-surface-2); color: var(--gs-ink); cursor: pointer; }
.gs-pe__tbtn:hover { background: var(--gs-surface); border-color: var(--gs-accent); }
.gs-pe__tbtn svg { width: 14px; height: 14px; }
.gs-pe__count { margin: 0; color: var(--gs-muted); font-size: var(--gs-fs-2); font-variant-numeric: tabular-nums; }
.gs-pe__note { margin: 0; padding: 8px 10px; border: 1px solid var(--gs-line-strong); border-radius: var(--gs-r-2); background: var(--gs-surface-2); font-size: var(--gs-fs-2); }
.gs-pe__files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.gs-pe__file { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; align-items: center; padding: 3px 0; font-size: var(--gs-fs-2); }
.gs-pe__filename { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gs-pe__filen { color: var(--gs-muted); font-size: var(--gs-fs-1); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gs-pe__flash { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 7; max-width: min(620px, calc(100% - 24px)); background: var(--gs-tip-bg); color: var(--gs-tip-ink); font-size: var(--gs-fs-2); padding: 7px 12px; border-radius: var(--gs-r-2); box-shadow: var(--gs-float); }

/* sheets: one column of pages, with the marks on them */
.gs-pe__stage--sheets { padding: 18px 28px 40px; }
.gs-pe__sheets { display: flex; flex-direction: column; align-items: center; gap: 22px; min-width: min-content; }
.gs-pe__sheetwrap { display: block; }
.gs-pe__label { font-size: var(--gs-fs-1); color: var(--gs-muted); margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.gs-pe__sheet { position: relative; background: #fff; box-shadow: 0 0 0 1px var(--gs-line-strong); }
.gs-pe__page { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.gs-pe__layer { position: absolute; inset: 0; touch-action: pan-y; cursor: default; }
.gs-pe__stage[data-tool]:not([data-tool="select"]) .gs-pe__layer { cursor: crosshair; touch-action: none; }
.gs-pe__mark { position: absolute; user-select: none; touch-action: none; cursor: move; }
.gs-pe__mark.is-locked { pointer-events: none; }
.gs-pe__text { white-space: pre; }
.gs-pe__draw { pointer-events: none; }
.gs-pe__draw svg { display: block; overflow: visible; }
.gs-pe__draw path { pointer-events: stroke; cursor: move; }
.gs-pe__hilite { opacity: 0.38; }
.gs-pe__image img { width: 100%; height: 100%; display: block; pointer-events: none; }
.gs-pe__check svg, .gs-pe__cross svg { display: block; overflow: visible; }
.gs-pe__frame { position: absolute; border: 2px solid var(--gs-accent); border-radius: 2px; pointer-events: none; }
.gs-pe__handle { position: absolute; width: 11px; height: 11px; background: #fff; border: 2px solid var(--gs-accent); border-radius: 2px; pointer-events: auto; box-sizing: border-box; }
.gs-pe__handle::after { content: ''; position: absolute; inset: -8px; }
.gs-pe__handle--nw { left: -7px; top: -7px; cursor: nwse-resize; }
.gs-pe__handle--ne { right: -7px; top: -7px; cursor: nesw-resize; }
.gs-pe__handle--sw { left: -7px; bottom: -7px; cursor: nesw-resize; }
.gs-pe__handle--se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.gs-pe__edit { position: absolute; z-index: 3; margin: 0; padding: 0; border: 1px dashed var(--gs-accent); background: rgba(255, 255, 255, 0.92); resize: none; overflow: hidden; white-space: pre; outline: none; box-sizing: content-box; }
.gs-pe__sigpreview { max-width: 100%; max-height: 90px; background: #fff; border: 1px solid var(--gs-line-strong); border-radius: var(--gs-r-2); padding: 6px; box-sizing: border-box; align-self: flex-start; }

/* the signature pad and the "add files" list */
.gs-dialog--wide { width: min(520px, calc(100% - 32px)); }
.gs-sign__wrap { position: relative; margin: 6px 0 10px; }
.gs-sign__pad { display: block; max-width: 100%; background: #fff; border: 1px solid var(--gs-line-strong); border-radius: var(--gs-r-2); touch-action: none; cursor: crosshair; }
.gs-sign__hint { position: absolute; inset: 1px; display: grid; place-items: center; background: #fff; border-radius: var(--gs-r-2); color: #4b5563; font-size: var(--gs-fs-2); pointer-events: none; }
.gs-sign__keep { margin: 10px 0 0; }
.gs-sign__old { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--gs-line); }
.gs-sign__old img { background: #fff; border-radius: var(--gs-r-1); padding: 3px 6px; }
.gs-fc__list { max-height: 260px; }
.gs-fc__item { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 7px 10px; cursor: pointer; border-bottom: 1px solid var(--gs-line); }
.gs-fc__item:last-child { border-bottom: 0; }
.gs-fc__item:hover { background: var(--gs-surface-2); }
.gs-fc__item input { accent-color: var(--gs-accent); margin: 0; }
.gs-fc__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gs-fc__meta { color: var(--gs-muted); font-size: var(--gs-fs-1); white-space: nowrap; }
.gs-dialog__list li { overflow-wrap: anywhere; }

/* the marked-files bar has six buttons: on a narrow widget it takes a second row rather than scrolling sideways */
.gs-filters.gs-marked { flex-wrap: wrap; row-gap: 6px; }

/* ---- storage: where the space goes ---- */
.gs-lib { position: absolute; inset: 0; z-index: 46; display: flex; flex-direction: column; background: var(--gs-ground); color: var(--gs-ink); }
.gs-lib__head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--gs-line); background: var(--gs-surface); }
.gs-lib__head h2 { margin: 0; font-size: var(--gs-fs-4); }
.gs-lib__body { flex: 1; min-height: 0; overflow: auto; padding: 20px max(16px, calc((100% - 880px) / 2)) 48px; display: flex; flex-direction: column; gap: 24px; }
.gs-lib__note { margin: 0; padding: 9px 12px; border-left: 3px solid var(--gs-accent); background: var(--gs-accent-soft); border-radius: 0 var(--gs-r-2) var(--gs-r-2) 0; }
.gs-lib__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.gs-lib__big { font-size: 22px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.gs-lib__sub { color: var(--gs-muted); font-size: var(--gs-fs-2); }
.gs-lib__limit { display: flex; align-items: center; gap: 8px; }
.gs-lib__bar { display: flex; height: 14px; margin-top: 14px; border-radius: var(--gs-r-pill); overflow: hidden; background: var(--gs-surface-2); border: 1px solid var(--gs-line-strong); }
.gs-lib__seg { display: block; height: 100%; min-width: 3px; border-right: 1px solid var(--gs-ground); }
.gs-lib__seg:last-child { border-right: 0; }
.gs-lib__seg--unused, .gs-lib__dot--unused { background: repeating-linear-gradient(135deg, var(--gs-muted) 0 2px, transparent 2px 5px); }   /* a pattern, not a colour: unused is said in words too */
.gs-lib__fill { margin: 8px 0 0; font-weight: 600; }
.gs-lib__fill.is-near { color: var(--gs-t-orange); }
.gs-lib__fill.is-over { color: var(--gs-danger); }
.gs-lib__legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 0; margin: 12px 0 8px; font-size: var(--gs-fs-2); }
.gs-lib__legend li { display: inline-flex; align-items: baseline; gap: 6px; }
.gs-lib__dot { width: 10px; height: 10px; border-radius: 2px; flex: none; align-self: center; border: 1px solid var(--gs-line-strong); box-sizing: border-box; }
.gs-lib__legend b { font-variant-numeric: tabular-nums; }
.gs-lib__n { color: var(--gs-muted); font-variant-numeric: tabular-nums; }
.gs-lib__section h3 { margin: 0 0 6px; font-size: var(--gs-fs-1); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gs-muted); }
.gs-lib__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--gs-line); }
.gs-lib__what { flex: 1; min-width: 0; }
.gs-lib__what .gs-hint { margin: 2px 0 0; }
.gs-lib__row > .gs-btn { flex: none; }
.gs-lib__side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.gs-lib__table { width: 100%; border-collapse: collapse; }
.gs-lib__table th { text-align: left; padding: 6px 8px; font-size: var(--gs-fs-1); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gs-muted); border-bottom: 1px solid var(--gs-line-strong); white-space: nowrap; }
.gs-lib__table td { padding: 6px 8px; border-bottom: 1px solid var(--gs-line); vertical-align: middle; }
.gs-lib__table .is-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gs-lib__table .gs-lib__name { width: 100%; max-width: 0; }
.gs-lib__name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-lib__used { white-space: nowrap; color: var(--gs-muted); font-size: var(--gs-fs-2); }
.gs-lib__act { width: 40px; text-align: right; }
.gs-lib__job-bar { height: 8px; margin: 10px 0 14px; border-radius: var(--gs-r-pill); background: var(--gs-surface-2); border: 1px solid var(--gs-line); overflow: hidden; }
.gs-lib__job-bar span { display: block; height: 100%; width: 0; background: var(--gs-accent); transition: width 0.2s; }
.gs-lib__job-text { margin: 0; color: var(--gs-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .gs-lib__row { flex-direction: column; }
  .gs-lib__used { display: none; }
}

/* ---- the photo report's options ---- */
.gs-report__row { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.gs-report__checks { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 6px; }
.gs-report__check input { margin: 0; }
.gs-dialog .gs-report__sum { margin: 10px 0 16px; font-size: var(--gs-fs-2); font-variant-numeric: tabular-nums; }

/* ---- PDF form fields drawn over a page (the sheet is white in both themes) ---- */
.gs-pe__field {
  position: absolute; box-sizing: border-box; margin: 0; padding: 0 3px; border: 1px solid var(--gs-field-line); border-radius: 2px;
  background: var(--gs-field-bg); color: #111827; font-family: var(--gs-font); outline: none; color-scheme: light;   /* the sheet is white: native controls are drawn light */
}
.gs-pe__field:focus { background: #fff; box-shadow: 0 0 0 2px var(--gs-accent); }
textarea.gs-pe__field { padding: 3px; resize: none; line-height: 1.25; }
select.gs-pe__field { padding: 0 2px; }
.gs-pe__field--tick { padding: 0; accent-color: var(--gs-accent); cursor: pointer; }

/* ---- a Word, Excel or PowerPoint file in the lightbox and the Viewer: on white sheets, like a PDF's pages ---- */
.gs-office { position: absolute; inset: 0; overflow: auto; background: var(--gs-room); padding: 18px 28px 40px; box-sizing: border-box; outline: none; }
.gs-office:focus-visible { box-shadow: inset 0 0 0 2px var(--gs-focus); }
.gs-office__wait { color: var(--gs-muted); text-align: center; padding: 40px 0; }
.gs-office__note { color: var(--gs-sheet-mute); font-size: var(--gs-fs-2); margin: 10px 0 0; }
.gs-office > .gs-office__note { color: var(--gs-muted); }
.gs-office__paper {
  max-width: 800px; margin: 0 auto; background: #fff; color: var(--gs-sheet-ink); padding: 52px 60px 60px; box-sizing: border-box;
  box-shadow: 0 0 0 1px var(--gs-line-strong); font: 15px/1.6 var(--gs-font); overflow-wrap: anywhere; color-scheme: light;
}
.gs-office__p { margin: 0 0 0.7em; font-weight: 400; font-size: 1em; line-height: inherit; }
.gs-office__p.is-title { font-size: 22px; font-weight: 700; line-height: 1.3; margin-bottom: 0.6em; }
.gs-office__p.is-h1 { font-size: 18px; font-weight: 700; line-height: 1.3; margin: 1.2em 0 0.5em; }
.gs-office__p.is-h2 { font-size: 15px; font-weight: 700; line-height: 1.4; margin: 1.1em 0 0.4em; }
.gs-office__p.is-h3, .gs-office__p.is-h4, .gs-office__p.is-h5, .gs-office__p.is-h6 { font-size: 15px; font-weight: 600; margin: 0.9em 0 0.35em; }
.gs-office__p.is-item { margin-bottom: 0.3em; }
.gs-office__marker { display: inline-block; min-width: 1.5em; margin-left: -1.5em; }
.gs-office__p.is-item { position: static; }
.gs-office .is-b { font-weight: 700; } .gs-office .is-i { font-style: italic; } .gs-office .is-u { text-decoration: underline; } .gs-office .is-s { text-decoration: line-through; }
.gs-office a { color: #1d4ed8; text-decoration: underline; }
.gs-office__img { max-width: 100%; height: auto; vertical-align: middle; }
.gs-office__noimg { color: var(--gs-sheet-mute); font-style: italic; }
.gs-office__tblwrap { overflow-x: auto; margin: 0 0 1em; }
.gs-office__tbl { border-collapse: collapse; width: 100%; font-size: 13px; }
.gs-office__tbl td { border: 1px solid var(--gs-sheet-line); padding: 4px 8px; vertical-align: top; }
.gs-office__tbl td .gs-office__p { margin: 0; }
/* a workbook: the grid fills the stage, the sheet tabs sit under it like in Excel */
.gs-office.is-sheet { display: flex; flex-direction: column; padding: 0; }
.gs-office__grid { flex: 1; min-height: 0; overflow: auto; background: var(--gs-room); }
.gs-office__sheetwrap { width: max-content; min-width: 100%; }
.gs-office__sheetwrap { color: var(--gs-sheet-ink); font: 13px/1.35 var(--gs-font); color-scheme: light; }
.gs-office__sheetwrap .gs-office__note { background: #fff; }
.gs-office__sheet { border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.gs-office__sheet col.is-corner { width: 44px; }
.gs-office__sheet td, .gs-office__sheet th { border-right: 1px solid var(--gs-sheet-line); border-bottom: 1px solid var(--gs-sheet-line); padding: 2px 6px; height: 22px; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: #fff; }
.gs-office__sheet th { background: var(--gs-sheet-head); color: var(--gs-sheet-mute); font-weight: 500; font-size: 12px; text-align: center; position: sticky; z-index: 1; }
.gs-office__sheet thead th { top: 0; }
.gs-office__sheet th.is-row { left: 0; z-index: 1; }
.gs-office__sheet th.is-corner { left: 0; z-index: 2; }
.gs-office__sheet td.k-number { text-align: right; font-variant-numeric: tabular-nums; }
.gs-office__sheet td.k-bool, .gs-office__sheet td.k-error { text-align: center; }
.gs-office__sheetwrap .gs-office__note { padding: 8px 12px; }
.gs-office__tabs { flex: none; display: flex; gap: 2px; padding: 0 8px; overflow-x: auto; background: #101820; border-top: 1px solid var(--gs-line-strong); }
.gs-office__tab { border: 0; border-top: 2px solid transparent; background: none; color: var(--gs-muted); padding: 8px 14px; cursor: pointer; font: inherit; font-size: var(--gs-fs-2); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.gs-office__tab:hover { color: var(--gs-ink); }
.gs-office__tab.is-on { color: var(--gs-ink); border-top-color: var(--gs-accent); font-weight: 600; background: rgba(255, 255, 255, 0.05); }
.gs-office__tab:focus-visible { outline: 2px solid var(--gs-focus); outline-offset: -2px; }
/* a presentation: one white card per slide */
.gs-office__slides { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.gs-office__slide { background: #fff; color: var(--gs-sheet-ink); padding: 5% 6%; box-sizing: border-box; box-shadow: 0 0 0 1px var(--gs-line-strong); font: 15px/1.45 var(--gs-font); color-scheme: light; overflow-wrap: anywhere; }
.gs-office__stitle { font-size: 22px; line-height: 1.25; margin: 0 0 0.4em; }
.gs-office__ssub { font-size: 15px; color: var(--gs-sheet-mute); margin: 0 0 0.8em; }
.gs-office__items { list-style: none; margin: 0; padding: 0; }
.gs-office__items li { margin: 0 0 0.3em; }
.gs-office__items li.is-bullet::before { content: "•"; display: inline-block; width: 1.1em; }
.gs-office__stbl { margin-top: 0.6em; }

/* ---- the slideshow's clock, and the before/after slider ---- */
.gs-lb__tick { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--gs-accent); transform-origin: 0 50%; z-index: 5; pointer-events: none; }
@keyframes gs-tick { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .gs-lb__tick { display: none; } }
.gs-cmp__stage { position: relative; flex: 1; min-height: 0; margin: 0 14px; display: grid; place-items: center; cursor: ew-resize; touch-action: none; user-select: none; overflow: hidden; }
.gs-cmp__frame { position: relative; overflow: hidden; box-shadow: 0 0 0 1px var(--gs-line-strong); }
.gs-cmp__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.gs-cmp__line { position: absolute; top: 0; bottom: 0; width: 30px; margin-left: -15px; outline: none; cursor: ew-resize; }
.gs-cmp__line::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; background: var(--gs-tip-ink); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); }
.gs-cmp__line:focus-visible .gs-cmp__grip { box-shadow: 0 0 0 3px var(--gs-focus); }
.gs-cmp__grip { position: absolute; z-index: 1; top: 50%; left: 0; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; background: var(--gs-tip-ink); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); }
.gs-cmp__grip::before, .gs-cmp__grip::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; margin-top: -5px; border: 5px solid transparent; }
.gs-cmp__grip::before { left: 4px; border-right-color: #0e151c; }
.gs-cmp__grip::after { right: 4px; border-left-color: #0e151c; }
.gs-cmp__tag { position: absolute; top: 10px; max-width: 42%; padding: 2px 8px; border-radius: var(--gs-r-1); background: rgba(11, 17, 23, 0.72); color: var(--gs-scrim-ink); font-size: var(--gs-fs-1); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; transition: opacity 0.12s; }
.gs-cmp__tag.is-a { left: 10px; } .gs-cmp__tag.is-b { right: 10px; }
.gs-cmp__wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gs-muted); background: var(--gs-room); z-index: 4; }
.gs-cmp__wait[hidden] { display: none; }
.gs-cmp__hint { flex: none; margin: 0; padding: 8px 14px 12px; color: var(--gs-muted); font-size: var(--gs-fs-2); text-align: center; }

/* ---- tags and a note ---- */
.gs-note__name { margin: 0 0 12px; color: var(--gs-muted); font-size: var(--gs-fs-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-tags { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; align-items: center; }
.gs-tag { display: inline-flex; align-items: center; gap: 2px; padding: 2px 3px 2px 10px; border: 1px solid var(--gs-line-strong); border-radius: var(--gs-r-pill); background: var(--gs-accent-soft); font-size: var(--gs-fs-2); }
.gs-tag__x { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--gs-muted); cursor: pointer; }
.gs-tag__x:hover { background: var(--gs-surface-2); color: var(--gs-ink); }
.gs-tag__x svg { width: 12px; height: 12px; }
.gs-tags__none { color: var(--gs-muted); font-size: var(--gs-fs-2); }
.gs-tags__picks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 8px; }
.gs-tags__label { color: var(--gs-muted); font-size: var(--gs-fs-2); margin-right: 2px; }
.gs-note { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; min-height: 84px; }
.gs-lb__note { white-space: pre-wrap; }
