/* Sentinel v2 - clouds.css
   Files as clouds (v2/clouds.js): the Files page's second view. A bounded, plain grey field; each folder a loose cloud of
   floating papers under its name, turning slowly in a small circle of its own. Colours, shadows and type come from the v2
   tokens, so every theme (and dark) works as is. World sizes are CSS px at zoom 1; --z is the camera's zoom, --inv its inverse
   and --t the scale that keeps a cloud's name readable at any zoom. Rings that must read at any zoom are drawn in --inv units. */

/* ---------------- the view switch (clm.js pgFiles): the switch alone, right-aligned, nothing else above the explorer ---------------- */
.dx .pg-files3 .fvw { display: flex; align-items: center; justify-content: flex-end; margin: 0 0 12px; min-height: 34px; }
.dx .pg-files3 .fx3 { min-height: calc(100vh - var(--modebar-h) - 102px); }
.dx .fvw-seg {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: var(--radius-pill);
  background: var(--surface-sunken); border: 1px solid var(--line-1); isolation: isolate;
}
.dx .fvw-b {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px;
  padding: 0 14px; border: 0; border-radius: var(--radius-pill); background: none; color: var(--ink-3);
  font: inherit; font-size: var(--fs-small); font-weight: var(--fw-medium); cursor: pointer; transition: color .2s ease;
}
.dx .fvw-b svg { fill: none; stroke: currentColor; stroke-width: 1.6; }
.dx .fvw-b:hover, .dx .fvw-b[aria-pressed="true"] { color: var(--ink-1); }
.dx .fvw-b:focus-visible { outline: var(--focus-width, 2px) solid var(--focus); outline-offset: 1px; }
.dx .fvw-pill {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: var(--radius-pill);
  background: var(--surface-raised); box-shadow: var(--e1), 0 0 0 1px var(--line-1);
  transition: transform .42s cubic-bezier(.34, 1.36, .64, 1);
}
.dx .fvw-seg:has(.fvw-b[data-v="clouds"][aria-pressed="true"]) .fvw-pill { transform: translateX(100%); }
.dx .cl-wrap { display: block; height: calc(100vh - var(--modebar-h) - 104px); min-height: 460px; }

/* ---------------- the host and the field: a shade of the theme's own ground ---------------- */
.cl-host {
  /* the field (the owner, 2026-10-15: "the background of the cloud docs should change slightly by the chosen theme so it fits
     the environment around it"): the page's own ground a step down in a light theme and a step up in a dark one, keeping most of
     the theme's hue and tint (parchment a warm paper grey, midnight a blue night, each theme its own) - no longer one neutral
     grey in every theme; papers a step above it in the same tint. Still quiet: no colour that says anything, no glow */
  --cl-canvas: #e7e7e9;
  --cl-canvas: color-mix(in oklab, var(--surface-page) 86%, var(--ink-3, #8a8a8f) 14%);
  --cl-canvas: light-dark(oklch(from var(--surface-page) calc(l - 0.045) calc(c * 0.85) h), oklch(from var(--surface-page) calc(l + 0.03) calc(c * 0.9) h));
  --cl-paper: var(--surface-raised);
  --cl-paper: light-dark(var(--surface-raised), oklch(from var(--surface-page) calc(l + 0.115) calc(c * 0.9) h));
  --cl-shade: rgb(26 35 48 / .30);
  --cl-shade: light-dark(rgb(26 35 48 / .30), rgb(0 0 0 / .62));
  --cl-rim: rgb(26 35 48 / .08);
  --cl-rim: light-dark(rgb(26 35 48 / .08), rgb(255 255 255 / .09));
  --cl-lit: transparent;
  --cl-lit: light-dark(transparent, rgb(255 255 255 / .06));
  position: relative; overflow: hidden; border-radius: 18px; border: 1px solid var(--line-1);
  background: var(--cl-canvas); contain: layout paint; user-select: none; -webkit-user-select: none; touch-action: none;
}
.cl-stage { --z: 1; --inv: 1; --t: 1; position: absolute; inset: 0; overflow: hidden; cursor: grab; outline: none; background: var(--cl-canvas); }
.cl-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.cl-stage.is-grabbing, .cl-stage.is-dragging-card { cursor: grabbing; }
.cl-stage.is-lasso { cursor: crosshair; }
.cl-world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; z-index: 1; }
/* raster once while moving (fast), crisp again when the field settles */
.cl-stage.is-moving .cl-world { will-change: transform; }

/* the edge being pulled against glows (opacity set per frame) */
.cl-edge { position: absolute; z-index: 4; pointer-events: none; opacity: 0; }
.cl-edge-l, .cl-edge-r { top: 0; bottom: 0; width: 96px; }
.cl-edge-t, .cl-edge-b { left: 0; right: 0; height: 96px; }
.cl-edge-l { left: 0; background: radial-gradient(60% 55% at 0% 50%, color-mix(in oklab, var(--brand) 24%, transparent), transparent 75%); }
.cl-edge-r { right: 0; background: radial-gradient(60% 55% at 100% 50%, color-mix(in oklab, var(--brand) 24%, transparent), transparent 75%); }
.cl-edge-t { top: 0; background: radial-gradient(55% 60% at 50% 0%, color-mix(in oklab, var(--brand) 24%, transparent), transparent 75%); }
.cl-edge-b { bottom: 0; background: radial-gradient(55% 60% at 50% 100%, color-mix(in oklab, var(--brand) 24%, transparent), transparent 75%); }

/* ---------------- a cloud: its name and its papers, no disc ---------------- */
.cl-group { position: absolute; left: 0; top: 0; width: 0; height: 0; transition: transform .9s cubic-bezier(.22, 1, .36, 1), opacity .45s ease, filter .45s ease; }
.cl-orbit { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.cl-stage.is-flipping .cl-group, .cl-stage.is-flipping .cl-card, .cl-stage.is-flipping .cl-title { transition: none !important; }
.cl-group.is-leaving { opacity: 0; }
.cl-group.is-src { z-index: 40; }

.cl-title {
  position: absolute; left: 0; top: 0; z-index: 3; transform: translate(-50%, -100%); width: max-content; max-width: calc(250px * var(--t));
  display: flex; flex-direction: column; align-items: center; gap: calc(2px * var(--t)); padding: calc(4px * var(--t)) calc(10px * var(--t));
  border: 0; border-radius: calc(10px * var(--t)); background: none; color: var(--ink-1); font: inherit; text-align: center; cursor: pointer;
  transition: top .6s cubic-bezier(.22, 1, .36, 1), background-color .2s ease, color .2s ease, opacity .3s ease;
}
.cl-tname {
  font-size: calc(13px * var(--t)); line-height: 1.16; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: balance;
}
.cl-tglyph { margin-right: .45em; letter-spacing: 0; }
.cl-tsub { font-size: calc(11px * var(--t)); color: var(--ink-3); letter-spacing: .04em; }
.cl-title:hover, .cl-group.is-hot .cl-title { color: var(--brand); background: color-mix(in oklab, var(--cl-paper) 70%, transparent); }
/* Group by Risk: each cloud's glyph in its level's colour, Critical first - its name in ink (a whole name in red was as loud as
   the papers' red edge the owner had taken away, 2026-10-15) */
.cl-group[data-key="r:critical"] .cl-tglyph { color: var(--sev-critical); }
.cl-group[data-key="r:high"] .cl-tglyph { color: var(--sev-high); }
.cl-group[data-key="r:medium"] .cl-tglyph { color: var(--sev-medium); }
.cl-group[data-key="r:low"] .cl-tglyph { color: var(--sev-low); }
.cl-group[data-key="r:none"] .cl-tglyph { color: var(--ok); }
.cl-group[data-key="r:na"] .cl-tname, .cl-group[data-key="s:Not analysed"] .cl-tname { color: var(--ink-3); }
.cl-group.is-hitg .cl-title { color: var(--brand); background: var(--brand-soft); }
.cl-group.is-hot .cl-paper { box-shadow: 0 0 0 calc(1px * var(--inv)) color-mix(in oklab, var(--brand) 45%, transparent), 0 1px 2px var(--cl-shade), 0 12px 24px -12px var(--cl-shade); }

/* flown into one cloud: the others fade back, their names stay as signposts (and can be clicked) */
.cl-group.is-dim .cl-card { opacity: .12; filter: saturate(0); pointer-events: none; }
.cl-group.is-dim .cl-cap { opacity: 0 !important; }
.cl-group.is-dim .cl-title { opacity: .5; }
.cl-group.is-dim .cl-empty { opacity: .3; }

/* the zone round a cloud: only the cloud a dragged paper is over shows it (a soft rounded panel, never a disc) */
.cl-zone {
  position: absolute; z-index: 0; border-radius: 28px; pointer-events: none; opacity: 0;
  border: 1.5px solid color-mix(in oklab, var(--brand) 55%, transparent); background: color-mix(in oklab, var(--brand) 7%, transparent);
  transition: opacity .2s ease, transform .3s cubic-bezier(.22, 1, .36, 1);
}
.cl-group.is-drop .cl-zone { opacity: 1; transform: scale(1.02); }
.cl-group.is-drop .cl-title { color: var(--brand); }
.cl-stage.is-dragging-card .cl-group:not(.is-src):not(.is-drop) .cl-title { color: var(--ink-1); }

/* an empty folder: a dashed paper outline to drop onto; its words stay inside it (they grow a little as the field goes out,
   never past the outline) and far out, where they could not be read, only the outline is left */
.cl-empty {
  position: absolute; left: -62px; top: -46px; width: 124px; height: 92px; box-sizing: border-box; z-index: 1;
  display: grid; place-content: center; gap: calc(3px * min(var(--inv), 1.1)); text-align: center; padding: 8px; border-radius: 12px; pointer-events: none;
  border: calc(1.5px * min(var(--inv), 2.4)) dashed color-mix(in oklab, var(--ink-3) 55%, transparent); color: var(--ink-3); overflow: hidden;
}
.cl-empty b { font-size: calc(12px * min(var(--inv), 1.1)); font-weight: 650; color: var(--ink-2); line-height: 1.2; }
.cl-empty span { font-size: calc(11px * min(var(--inv), 1.1)); line-height: 1.2; }
.cl-stage.is-far .cl-empty b, .cl-stage.is-far .cl-empty span { display: none; }

/* ---------------- a paper ---------------- */
.cl-card {
  position: absolute; left: 0; top: 0; width: 74px; height: 94px; padding: 0; margin: 0; border: 0; background: none;
  color: inherit; font: inherit; cursor: pointer; z-index: 2; outline: none; -webkit-tap-highlight-color: transparent;
  transition: transform .7s cubic-bezier(.22, 1, .36, 1), opacity .35s ease, filter .35s ease;
}
.cl-fly { position: relative; display: block; width: 100%; height: 100%; }
/* the float: barely there and slow (the 90 s turning is the motion to notice) */
.cl-float { display: block; width: 100%; height: 100%; animation: cl-drift var(--fd, 20s) ease-in-out var(--fdl, 0s) infinite alternate; }
@keyframes cl-drift {
  0% { transform: translate3d(calc(var(--fx, 1.5px) * -1), calc(var(--fy, 1.5px) * -1), 0); }
  100% { transform: translate3d(var(--fx, 1.5px), var(--fy, 1.5px), 0); }
}
.cl-stage.is-dragging-card .cl-float { animation-play-state: paused; }

.cl-paper {
  --u: .5rem;
  position: relative; display: flex; flex-direction: column; align-items: flex-start; width: 100%; height: 100%; box-sizing: border-box;
  padding: 1.05em .9em .8em; font-size: var(--u); text-align: left; border-radius: .8em; overflow: hidden;
  background: linear-gradient(180deg, var(--cl-paper), color-mix(in oklab, var(--cl-paper) 95%, var(--ink-4) 5%));
  box-shadow: 0 0 0 1px var(--cl-rim), 0 1px 2px var(--cl-shade), 0 12px 24px -12px var(--cl-shade), inset 0 1px 0 var(--cl-lit);
  transition: transform .26s cubic-bezier(.22, 1, .36, 1), box-shadow .26s ease;
}
/* the folded corner, cut out of the field's grey */
.cl-paper::after {
  content: ""; position: absolute; top: 0; right: 0; width: 1.9em; height: 1.9em;
  background: linear-gradient(225deg, var(--cl-canvas) 50%, color-mix(in oklab, var(--cl-paper) 82%, var(--ink-4) 18%) 50%);
  border-bottom-left-radius: .4em; box-shadow: -1px 1px 2px color-mix(in oklab, black 12%, transparent);
}
.cl-ext {
  flex: none; display: inline-block; padding: .1em .45em; border-radius: .35em; font-size: 1em; font-weight: 700; letter-spacing: .06em;
  color: var(--ink-3); background: color-mix(in oklab, var(--ink-4) 18%, transparent);
}
.cl-new { position: absolute; top: 1.15em; right: 2.4em; width: .9em; height: .9em; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 .25em color-mix(in oklab, var(--brand) 22%, transparent); }
.cl-ptitle {
  flex: none; align-self: stretch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: .6em;
  font-size: 1.12em; line-height: 1.22; font-weight: 700; color: var(--ink-1); letter-spacing: -.005em; word-break: break-word;
}
.cl-lines { flex: 1 1 auto; min-height: 0; overflow: hidden; align-self: stretch; display: grid; align-content: start; gap: .45em; margin-top: .75em; padding-bottom: .4em; }
.cl-lines i { display: block; height: .32em; border-radius: 1em; background: color-mix(in oklab, var(--ink-4) 32%, transparent); }
.cl-lines i:nth-child(2) { width: 86%; }
.cl-lines i:nth-child(3) { width: 92%; }
.cl-lines i:nth-child(4) { width: 70%; }
.cl-lines i:nth-child(5) { width: 48%; }
/* the worst risk, as its glyph alone (near) */
.cl-sev { position: absolute; left: .8em; bottom: .7em; display: grid; place-items: center; width: 2.1em; height: 2.1em; border-radius: 50%; font-size: 1.05em; font-weight: 700; line-height: 1; }
.cl-sev.sev-critical { color: var(--sev-critical); background: var(--sev-critical-soft); }
.cl-sev.sev-high { color: var(--sev-high); background: var(--sev-high-soft); }
.cl-sev.sev-medium { color: var(--sev-medium); background: var(--sev-medium-soft); }
.cl-sev.sev-low { color: var(--sev-low); background: var(--sev-low-soft); }
.cl-sev.sev-ok { color: var(--ok); background: var(--ok-soft); }
.cl-signed {
  position: absolute; right: .7em; bottom: .8em; padding: .1em .45em; border: .14em solid var(--ok); border-radius: .35em;
  color: var(--ok); font-size: .95em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; transform: rotate(-9deg); opacity: .85;
}
/* far away: the paper is its title, large and bold (about 8-9 px on screen at the whole-field view) */
.cl-stage.is-far .cl-lines, .cl-stage.is-far .cl-ext, .cl-stage.is-far .cl-new, .cl-stage.is-far .cl-sev { display: none; }
/* whole words only: a word longer than the paper is cut at its edge ("Processi" reads; "Proces / sing" does not) */
.cl-stage.is-far .cl-ptitle { margin-top: 0; font-size: 1.75em; line-height: 1.1; -webkit-line-clamp: 4; letter-spacing: -.02em; word-break: keep-all; overflow-wrap: normal; hyphens: manual; }
.cl-stage.is-far .cl-signed { font-size: 1.6em; bottom: .5em; }

/* the caption under a paper (near, or in the cloud flown into): its name on one line, where it belongs on the next; level */
.cl-cap {
  position: absolute; left: 50%; top: calc(100% + 6px); width: 104px; transform: translateX(-50%); rotate: calc(var(--rot, 0) * -1deg);
  pointer-events: none; display: grid; gap: 1px; text-align: center; opacity: 0; transition: opacity .25s ease;
}
.cl-cap-t { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: calc(12px * var(--inv)); line-height: 1.25; font-weight: 600; color: var(--ink-1); }
.cl-cap-m { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: calc(11px * var(--inv)); line-height: 1.25; color: var(--ink-3); }
.cl-stage.is-near .cl-card:not(.is-miss) .cl-cap,
.cl-stage.is-focus .cl-group.is-in .cl-card:not(.is-miss) .cl-cap { opacity: 1; }

.cl-card:hover { z-index: 5; }
.cl-card:hover .cl-paper { transform: translateY(-5px) scale(1.07); box-shadow: 0 0 0 1px var(--cl-rim), 0 2px 4px var(--cl-shade), 0 22px 36px -16px var(--cl-shade), inset 0 1px 0 var(--cl-lit); }
.cl-card.is-sel { z-index: 6; }
.cl-card.is-sel .cl-paper {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 0 0 calc(2px * var(--inv)) var(--brand), 0 0 0 calc(6px * var(--inv)) color-mix(in oklab, var(--brand) 18%, transparent), 0 22px 40px -16px var(--cl-shade);
}
.cl-card.is-drag { z-index: 60; transition: none; pointer-events: none; }
.cl-card.is-drag .cl-paper { box-shadow: 0 0 0 calc(2px * var(--inv)) var(--brand), 0 30px 50px -18px var(--cl-shade); }
.cl-card.is-leaving { opacity: 0; }
/* search: the rest fade far back, the matches lift a little with a thin ring; the one walked to in the list stands out */
.cl-stage.is-searching .cl-card.is-miss { opacity: .1; filter: grayscale(1); pointer-events: none; }
.cl-stage.is-searching .cl-card.is-hit .cl-paper { transform: scale(1.04); box-shadow: 0 0 0 calc(1.5px * var(--inv)) color-mix(in oklab, var(--brand) 55%, transparent), 0 1px 2px var(--cl-shade), 0 16px 30px -14px var(--cl-shade); }
.cl-stage.is-searching .cl-card.is-cur .cl-paper, .cl-stage.is-searching .cl-card.is-hit.is-sel .cl-paper {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 0 0 calc(2px * var(--inv)) var(--brand), 0 0 0 calc(7px * var(--inv)) color-mix(in oklab, var(--brand) 18%, transparent), 0 22px 40px -16px var(--cl-shade);
}
.cl-stage.is-searching .cl-group:not(.is-hitg) .cl-title { color: var(--ink-3); }
/* keyboard focus: an outline at a steady width on screen, drawn last so selection or search never hides it */
.cl-stage .cl-card:focus-visible .cl-paper { outline: calc(2px * max(1, var(--inv))) solid var(--focus); outline-offset: calc(3px * max(1, var(--inv))); }
.cl-stage .cl-title:focus-visible { outline: calc(2px * max(1, var(--inv))) solid var(--focus); outline-offset: calc(2px * max(1, var(--inv))); }

/* the lasso */
.cl-lasso { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; overflow: visible; }
.cl-lasso path { fill: color-mix(in oklab, var(--brand) 10%, transparent); stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 6 5; stroke-linejoin: round; animation: cl-ants .6s linear infinite; }
@keyframes cl-ants { to { stroke-dashoffset: -11; } }

/* ---------------- the floating controls ---------------- */
.cl-bar { position: absolute; z-index: 8; top: 14px; left: 14px; right: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; pointer-events: none; }
.cl-bar > * { pointer-events: auto; }
.cl-seg, .cl-search, .cl-jump, .cl-crumb, .cl-zoom, .cl-mini, .cl-bulk, .cl-hint, .cl-insp, .cl-menu, .cl-peek, .cl-results {
  background: color-mix(in oklab, var(--surface-raised) 92%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--line-1); box-shadow: var(--e2);
}
/* Group by: a label and a quiet segmented switch (the raised white pill, like the Explorer | Clouds switch above) */
.cl-seg { display: inline-flex; align-items: center; padding: 3px; border-radius: var(--radius-pill); gap: 2px; background: color-mix(in oklab, var(--surface-sunken) 90%, transparent); }
.cl-seg-k { padding: 0 6px 0 10px; font-size: var(--fs-micro); font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.cl-seg button {
  height: 30px; padding: 0 13px; border: 0; border-radius: var(--radius-pill); background: none; color: var(--ink-3);
  font: inherit; font-size: var(--fs-small); font-weight: var(--fw-medium); cursor: pointer; transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.cl-seg button:hover { color: var(--ink-1); }
.cl-seg button[aria-pressed="true"] { color: var(--ink-1); background: var(--surface-raised); box-shadow: var(--e1), 0 0 0 1px var(--line-1); }
.cl-seg button:focus-visible, .cl-zoom button:focus-visible, .cl-crumb button:focus-visible, .cl-insp button:focus-visible, .cl-bulk button:focus-visible, .cl-jump:focus-visible, .cl-step:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.cl-search { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 13px; border-radius: var(--radius-pill); min-width: 0; flex: 0 1 340px; cursor: text; }
.cl-search > svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--ink-3); stroke-width: 1.7; stroke-linecap: round; }
.cl-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink-1); font: inherit; font-size: var(--fs-small); }
.cl-search input::placeholder { color: var(--ink-3); }
.cl-search input::-webkit-search-cancel-button { display: none; }
.cl-search:focus-within { box-shadow: 0 0 0 2px var(--focus), var(--e2); }
.cl-hits { font-size: var(--fs-micro); font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cl-hits:not(:empty) { padding: 2px 8px; border-radius: 1em; background: var(--brand-soft); color: var(--brand); }
.cl-hits.is-zero { background: var(--surface-sunken); color: var(--ink-3); }
.cl-step { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; }
.cl-step:hover { background: var(--surface-hover); color: var(--ink-1); }
.cl-step svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cl-step[hidden] { display: none; }
.cl-jump {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 15px; border-radius: var(--radius-pill);
  color: var(--ink-1); font: inherit; font-size: var(--fs-small); font-weight: var(--fw-medium); cursor: pointer;
}
.cl-jump:hover, .cl-jump[aria-expanded="true"] { background: var(--surface-raised); }
.cl-jump svg { width: 15px; height: 15px; fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.cl-jump[aria-expanded="true"] svg { transform: rotate(180deg); }
.cl-crumb {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 15px; border-radius: var(--radius-pill);
  font-size: var(--fs-small); color: var(--ink-3); animation: cl-pop .35s cubic-bezier(.34, 1.4, .64, 1);
}
.cl-crumb[hidden] { display: none; }
.cl-crumb button { border: 0; background: none; color: var(--brand); font: inherit; cursor: pointer; padding: 0; }
.cl-crumb b { color: var(--ink-1); font-weight: 650; text-transform: uppercase; letter-spacing: .1em; font-size: var(--fs-micro); }
.cl-x {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--surface-sunken);
  color: var(--ink-2) !important; font-size: 16px; line-height: 1; cursor: pointer;
}
.cl-x:hover { background: var(--surface-hover); color: var(--ink-1) !important; }
@keyframes cl-pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes cl-fade { from { opacity: 0; } to { opacity: 1; } }

/* the results under the search box */
.cl-results { position: absolute; z-index: 11; max-height: min(420px, calc(100% - 80px)); overflow-y: auto; padding: 6px; border-radius: 16px; box-shadow: var(--e3); scrollbar-width: thin; animation: cl-pop .2s cubic-bezier(.22, 1, .36, 1); transform-origin: top left; }
.cl-results[hidden] { display: none; }
.cl-res-h { padding: 8px 10px 4px; font-size: var(--fs-micro); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.cl-res-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px; border-radius: 10px; cursor: pointer; }
.cl-res-row[aria-selected="true"] { background: var(--surface-hover); box-shadow: inset 0 0 0 1px var(--line-2); }
.cl-res-g { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; color: var(--ink-3); background: var(--surface-sunken); }
.cl-res-g svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.cl-res-g.sev-critical { color: var(--sev-critical); background: var(--sev-critical-soft); }
.cl-res-g.sev-high { color: var(--sev-high); background: var(--sev-high-soft); }
.cl-res-g.sev-medium { color: var(--sev-medium); background: var(--sev-medium-soft); }
.cl-res-g.sev-low { color: var(--sev-low); background: var(--sev-low-soft); }
.cl-res-g.sev-ok { color: var(--ok); background: var(--ok-soft); }
.cl-res-t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--fs-small); font-weight: 550; color: var(--ink-1); }
.cl-res-t mark { background: color-mix(in oklab, var(--brand) 18%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.cl-res-m { max-width: 140px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--fs-micro); color: var(--ink-3); }
.cl-res-more, .cl-res-none { padding: 8px 10px 6px; font-size: var(--fs-micro); color: var(--ink-3); }

.cl-zoom { position: absolute; z-index: 8; right: 14px; bottom: 14px; display: flex; flex-direction: column; padding: 4px; gap: 2px; border-radius: 14px; transition: bottom .3s ease; }
.cl-zoom button { width: 34px; height: 32px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); font: inherit; font-size: 17px; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.cl-zoom button:hover { background: var(--surface-hover); color: var(--ink-1); }
.cl-zoom .cl-fit { font-size: var(--fs-micro); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

.cl-mini { position: absolute; z-index: 8; left: 14px; bottom: 14px; padding: 6px; border-radius: 12px; cursor: pointer; line-height: 0; transition: opacity .35s ease, transform .45s cubic-bezier(.22, 1, .36, 1); }
.cl-host.is-whole .cl-mini { opacity: 0; transform: translateY(8px) scale(.96); pointer-events: none; }
.cl-mini svg { display: block; }
.cl-mini-bg { fill: var(--cl-canvas); stroke: var(--line-1); }
.cl-mini-c { fill: color-mix(in oklab, var(--cl-paper) 80%, transparent); stroke: color-mix(in oklab, var(--ink-4) 60%, transparent); stroke-width: .8; }
.cl-mini-v { fill: color-mix(in oklab, var(--brand) 7%, transparent); stroke: var(--brand); stroke-width: 1.4; }

.cl-hint {
  position: absolute; z-index: 7; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 7px 14px; border-radius: var(--radius-pill);
  font-size: var(--fs-micro); color: var(--ink-2); white-space: nowrap; pointer-events: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.22, 1, .36, 1);
}
.cl-hint.is-gone { opacity: 0; transform: translate(-50%, 8px); }

/* the peek: a hovered paper's facts */
.cl-peek { position: absolute; z-index: 9; left: 0; top: 0; width: 248px; padding: 11px 13px 12px; border-radius: 14px; pointer-events: none; box-shadow: var(--e3); }
.cl-peek[hidden] { display: none; }
.cl-peek.is-in { animation: cl-peek .22s cubic-bezier(.22, 1, .36, 1); }
@keyframes cl-peek { from { opacity: 0; translate: 0 4px; } to { opacity: 1; translate: 0 0; } }
.cl-peek-k { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-micro); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.cl-peek-k span:last-child { letter-spacing: .02em; text-transform: none; font-weight: 600; }
.cl-peek-t { margin-top: 5px; font-size: var(--fs-body); line-height: 1.3; font-weight: 650; color: var(--ink-1); }
.cl-peek-p { margin-top: 3px; font-size: var(--fs-small); color: var(--ink-2); }
.cl-peek-r { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.cl-peek-h { font-size: var(--fs-micro); color: var(--ink-3); }

/* the bar for a selection of several */
.cl-bulk {
  position: absolute; z-index: 9; left: 50%; bottom: 18px; display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 16px;
  border-radius: var(--radius-pill); transform: translateX(-50%); font-size: var(--fs-small); color: var(--ink-2); white-space: nowrap;
}
.cl-bulk[hidden] { display: none; }
.cl-bulk.is-in { animation: cl-rise .42s cubic-bezier(.34, 1.36, .64, 1); }
@keyframes cl-rise { from { opacity: 0; transform: translate(-50%, 16px) scale(.96); } to { opacity: 1; transform: translateX(-50%); } }
.cl-bulk b { color: var(--ink-1); font-weight: 650; margin-right: 6px; }
.cl-bulk button, .cl-acts button {
  height: 32px; padding: 0 14px; border-radius: var(--radius-pill); border: 1px solid var(--line-2); background: var(--surface-card);
  color: var(--ink-1); font: inherit; font-size: var(--fs-small); font-weight: var(--fw-medium); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.cl-bulk button:hover, .cl-acts button:hover { background: var(--surface-hover); border-color: var(--line-3); }
.cl-bulk button:active, .cl-acts button:active, .cl-open:active { transform: scale(.97); }
.cl-bulk .cl-ghost { border-color: transparent; background: none; color: var(--ink-2); }

.cl-menu {
  position: absolute; z-index: 12; min-width: 220px; max-width: 300px; max-height: 320px; overflow-y: auto; padding: 6px; border-radius: 14px;
  display: grid; animation: cl-pop .22s cubic-bezier(.22, 1, .36, 1); transform-origin: top left; box-shadow: var(--e3);
}
.cl-menu.is-up { transform-origin: bottom left; }
.cl-menu button {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; text-align: left; padding: 8px 12px; border: 0; border-radius: 9px;
  background: none; color: var(--ink-1); font: inherit; font-size: var(--fs-small); cursor: pointer;
}
.cl-menu button small { color: var(--ink-3); font-size: var(--fs-micro); }
.cl-menu button:hover { background: var(--surface-hover); }
.cl-menu button:focus-visible { background: var(--surface-hover-2, var(--surface-hover)); outline: 2px solid var(--focus); outline-offset: -2px; }
.cl-menu button[disabled] { color: var(--ink-3); cursor: default; background: none; }

/* the inspector: a header (a small paper, where it is, its name), then its facts and ways in */
.cl-insp { position: absolute; z-index: 9; top: 64px; right: 14px; width: 330px; max-height: calc(100% - 78px - 64px); overflow-y: auto; border-radius: 18px; box-shadow: var(--e3); scrollbar-width: thin; }
.cl-insp[hidden] { display: none; }
.cl-insp-head { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 14px 14px 18px; border-bottom: 1px solid var(--line-1); }
.cl-insp .cl-paper.is-thumb { --u: .34rem; width: 52px; height: 66px; }
.cl-insp .cl-paper.is-thumb .cl-lines, .cl-insp .cl-paper.is-thumb .cl-signed, .cl-insp .cl-paper.is-thumb .cl-new { display: none; }
.cl-insp .cl-paper::after { background: linear-gradient(225deg, var(--surface-raised) 50%, color-mix(in oklab, var(--cl-paper) 82%, var(--ink-4) 18%) 50%); }
.cl-insp-id { min-width: 0; }
.cl-insp-k { font-size: var(--fs-micro); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.cl-insp-t { margin: 4px 0 2px; font-size: var(--fs-h3, 17px); line-height: 1.3; font-weight: 680; color: var(--ink-1); letter-spacing: -.01em; }
.cl-insp-f { font-size: var(--fs-micro); color: var(--ink-3); word-break: break-all; }
.cl-insp-body { padding: 12px 18px 16px; }
.cl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 4px; }
.cl-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 1em; font-size: var(--fs-micro); font-weight: 650; }
.cl-chip .cl-n { font-weight: 800; font-variant-numeric: tabular-nums; }
.cl-chip.sev-critical { color: var(--sev-critical); background: var(--sev-critical-soft); }
.cl-chip.sev-high { color: var(--sev-high); background: var(--sev-high-soft); }
.cl-chip.sev-medium { color: var(--sev-medium); background: var(--sev-medium-soft); }
.cl-chip.sev-low { color: var(--sev-low); background: var(--sev-low-soft); }
.cl-chip.sev-ok { color: var(--ok); background: var(--ok-soft); }
.cl-chip.sev-na { color: var(--ink-2); background: var(--surface-sunken); }
.cl-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 12px 0 14px; font-size: var(--fs-small); }
.cl-facts:empty { display: none; }
.cl-facts dt { color: var(--ink-3); }
.cl-facts dd { margin: 0; color: var(--ink-1); min-width: 0; }
.cl-open {
  display: block; width: 100%; height: 36px; margin-top: 12px; border-radius: var(--radius-pill); border: 0; background: var(--brand); color: var(--on-brand);
  font: inherit; font-size: var(--fs-small); font-weight: 650; cursor: pointer; transition: background-color .15s ease, transform .15s ease;
}
.cl-open:hover { background: var(--brand-hover, var(--brand)); }
.cl-acts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-top: 8px; }
.cl-acts button { padding: 0 8px; }
.cl-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-1); }
.cl-link { border: 0; background: none; padding: 2px 0; color: var(--brand); font: inherit; font-size: var(--fs-small); font-weight: var(--fw-medium); cursor: pointer; }
.cl-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- phone and narrow ---------------- */
@media (max-width: 760px) {
  .dx .cl-wrap { height: calc(100dvh - 190px); min-height: 380px; }
  .dx .fvw-b span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .dx .fvw-b { padding: 0 12px; }
  .cl-host { border-radius: 14px; }
  .cl-bar { top: 10px; left: 10px; right: 10px; gap: 8px; }
  .cl-seg { flex: 1 1 100%; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .cl-seg-k { display: none; }
  .cl-seg button { flex: 1 0 auto; padding: 0 10px; }
  /* the search and Jump to share the second row; the way back out of a cloud takes its own */
  .cl-search { flex: 1 1 0; min-width: 0; order: 3; }
  .cl-jump { order: 4; padding: 0 10px 0 12px; }
  .cl-crumb { order: 5; max-width: 100%; }
  .cl-mini, .cl-hint, .cl-peek { display: none; }
  .cl-insp { top: auto; left: 10px; right: 10px; bottom: 10px; width: auto; max-height: 62%; }
  .cl-zoom { right: 10px; bottom: 10px; }
  .cl-host.has-bulk .cl-zoom { bottom: 64px; }
  .cl-bulk { bottom: 10px; max-width: calc(100% - 20px); overflow-x: auto; }
  .cl-results { left: 10px !important; right: 10px; width: auto !important; }
}
