/* Organization tab: collections on the left, the selected one on the right. */

.og-workspace { display: grid; grid-template-columns: minmax(212px, 17%) minmax(0, 1fr); gap: var(--panel-gap); align-items: start; max-width: 100%; }

/* Reached from the picker on a phone, where the list is off screen. */
.og-picker, .og-plot-cta, .og-plot-close { display: none; }
.og-list-dialog-body { position: relative; padding: 26px 16px 30px; }
.og-list-dialog-close { position: absolute; top: 12px; right: 12px; }
.og-list-dialog .og-list { display: block; position: static; padding: 0; border: 0; box-shadow: none; }

.og-list { position: sticky; top: 18px; align-self: start; padding: 14px; border: 1px solid var(--line); background: var(--paper-raised); box-shadow: 0 9px 28px rgba(34, 31, 25, .045); -webkit-user-select: none; user-select: none; }
.og-list-hd { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; }
.og-panel-title { flex: none; }
.og-list-count { margin-left: 7px; color: #aaa49a; font: 400 var(--text-label)/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: 0; }

.og-list-controls { display: grid; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.og-search { width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 2px; background: var(--paper-raised); color: inherit; font-size: 12px; }
.og-search:focus { border-color: var(--blue); outline: 0; }
.og-filter-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.og-filter-tags .og-tag { padding: 2px 9px 1px; font-size: 10px; }
.og-new { padding: 0; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: var(--text-control); letter-spacing: 0; text-transform: none; }
.og-new:hover { text-decoration: underline; }

.og-row { margin-top: 4px; }
.og-list-controls + .og-row { margin-top: 8px; }
.og-row button { display: grid; align-content: center; gap: 3px; width: 100%; min-height: 60px; padding: 8px; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; background: var(--paper); color: inherit; cursor: pointer; text-align: left; transition: border-color .12s, background .12s; }
.og-row button:hover { border-color: #b9b3a7; background: var(--paper-raised); }
.og-row.is-active button { border-color: #abc0f4; background: var(--blue-soft); }
.og-row.is-active .og-row-title { color: var(--blue); }
.og-row-title { overflow: hidden; font-size: var(--text-body); font-weight: 400; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.og-row-meta { color: var(--muted); font-size: var(--text-meta); font-variant-numeric: tabular-nums; }
.og-row-tags { display: flex; gap: 4px; margin-top: 3px; overflow: hidden; height: 15px; }
.og-row-tags i { flex: 0 0 auto; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-raised); color: white; font-size: 9px; font-style: normal; }

.og-detail { min-width: 0; display: grid; gap: var(--panel-gap); }

/* The collection at a glance. Each slot keeps its height whether or not it
   holds anything, so a collection with no description and no tags is the same
   height as one with both — and so is the read-only view. */
.og-info { display: grid; gap: 8px; padding: 18px; border: 1px solid var(--line); background: var(--paper-raised); box-shadow: 0 9px 28px rgba(34, 31, 25, .045); }
.og-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.og-title { flex: 1; min-width: 220px; margin: 0; padding: 2px 8px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--ink); font: var(--font-panel-title); letter-spacing: -.02em; }
input.og-title:hover { border-color: var(--line); }
input.og-title:focus { border-color: var(--blue); background: var(--paper-raised); outline: 0; }
.og-head-actions { display: flex; align-items: center; gap: 12px; }
.og-head-actions .button { min-height: 30px; font-size: 11px; }
.og-head-actions .danger { border-color: #ddb7b1; color: var(--red); }
.og-head-actions .danger:hover { border-color: var(--red); background: var(--red); color: white; }

.og-description { width: 100%; min-height: 27px; padding: 3px 10px; overflow-y: hidden; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--ink); font: 13px/1.5 var(--sans); resize: none; }
.og-description:hover { border-color: var(--line); }
.og-description:focus { border-color: var(--blue); background: var(--paper-raised); outline: 0; }
.og-description-static { margin: 0; padding: 3px 10px; color: var(--muted); font: italic 13px/1.5 var(--serif); }

.og-tag { padding: 4px 11px 3px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.og-tag:hover { border-color: var(--ink); color: var(--ink); }
.og-tag.is-on { border-color: var(--tag, var(--blue)); background: color-mix(in srgb, var(--tag, var(--blue)) 16%, var(--paper)); color: var(--tag, var(--blue)); }

/* What the collection is, next to what it holds. */
.og-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; min-height: 34px; padding: 6px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.og-fact { display: flex; align-items: center; gap: 7px; }
.og-fact b { color: #aaa49a; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 9px; }
.og-fact-input { padding: 2px 6px; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--ink); font: inherit; }
.og-fact-input:hover { border-color: var(--line); }
.og-fact-input:focus { border-color: var(--blue); background: var(--paper-raised); outline: 0; }

/* Tag entry: chips for what is set, a box to type the next one into. */
.og-tagbox { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 32px; padding: 4px 8px; border: 1px solid transparent; border-radius: 3px; }
.og-tagbox:hover { border-color: var(--line); }
.og-tagbox:focus-within { border-color: var(--blue); background: var(--paper-raised); }
.og-tagbox.is-readonly { padding-left: 0; }
.og-tag-none { color: var(--muted); font-size: 11px; }
.og-chips { display: contents; }
.og-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-raised); color: white; font-size: 11px; white-space: nowrap; }
.og-chip-x { padding: 0; border: 0; background: none; color: inherit; cursor: pointer; font-size: 13px; line-height: 1; opacity: .7; }
.og-chip-x:hover { opacity: 1; }
.og-tag-input { flex: 1; min-width: 130px; padding: 3px 2px; border: 0; background: transparent; color: var(--ink); font: 12px var(--sans); }
.og-tag-input:focus { outline: 0; }
/* display on a class beats the browser's [hidden] rule, so say it here. */
.og-tag-suggest[hidden] { display: none; }
.og-tag-suggest { position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; display: grid; min-width: 210px; padding: 4px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); box-shadow: 0 6px 20px rgba(23, 23, 19, .12); }
.og-suggest-item { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border: 0; border-radius: 2px; background: transparent; color: var(--ink); cursor: pointer; font-size: 12px; text-align: left; }
.og-suggest-item:hover, .og-suggest-item.is-on { background: var(--blue-soft); }
.og-suggest-item i { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.og-suggest-item.is-new { color: var(--blue); }

.og-notes-section { gap: 12px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.og-notes-section > summary { margin-bottom: 2px; padding-bottom: 0; border-bottom: 0; cursor: pointer; list-style: none; }
.og-notes-section > summary::-webkit-details-marker { display: none; }
.og-notes-section > summary::before { content: "›"; display: inline-block; margin-right: 8px; color: var(--muted); font-size: 14px; line-height: 1; transition: transform .14s ease-out; }
.og-notes-section[open] > summary::before { transform: rotate(90deg); }
/* space-between would strand the title mid-row between the chevron and the
   tools; the auto margin keeps it next to the chevron. */
.og-notes-section > summary .og-section-title { margin-right: auto; }
.og-notes-section > summary:hover .og-section-title { color: var(--blue); }
.og-notes-tools { display: flex; gap: 12px; }
.og-jump { padding: 0; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 11px; }
.og-jump:hover { text-decoration: underline; }
.og-notes-view { font-size: 13px; line-height: 1.6; }
.og-notes-view > :first-child { margin-top: 0; }
.og-notes-view > :last-child { margin-bottom: 0; }
.og-notes { width: 100%; min-height: 170px; padding: 12px 14px; border: 1px solid #cfc9bd; border-radius: 2px; background: var(--paper-raised); color: var(--ink); font: 13px/1.6 var(--sans); resize: vertical; }
.og-notes:focus { border-color: var(--blue); outline: 0; }

.og-section { display: grid; gap: 12px; }
.og-section-hd { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.og-section-title { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.og-organization-section[hidden] { display: none; }
.og-organization-section { padding: 18px; border: 1px solid var(--line); background: var(--paper-raised); box-shadow: 0 9px 28px rgba(34, 31, 25, .045); }
.og-organization-head { padding-bottom: 0; border-bottom: 0; }
.og-organization-head:empty { display: none; }
.og-organization-tools { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.og-organization-primary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.og-selection-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.og-organization-board {
  --og-panel-height: 620px;
  display: grid;
  gap: var(--panel-gap);
  padding: 18px;
  border: 1px solid var(--line);
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--line) 32%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 32%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
}
/* Each bucket is its own block, so the grouping is visible at a glance rather
   than implied by a rule between rows. */
.og-buckets { container-type: inline-size; min-width: 0; max-width: 100%; display: grid; align-content: start; gap: 10px; outline: 0; }
.og-buckets:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.og-bucket { min-width: 0; max-width: 100%; border: 1px solid var(--line); background: var(--paper-raised); box-shadow: 0 9px 28px rgba(34, 31, 25, .045); }
.og-bucket[open] { border-color: #b9b3a7; background: var(--paper-raised); }
.og-bucket.is-drop { border-color: var(--blue); background: color-mix(in srgb, var(--blue-soft) 55%, var(--paper)); }
.og-bucket > summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.og-bucket > summary::-webkit-details-marker { display: none; }
.og-bucket > summary::before { content: "›"; width: 12px; color: var(--muted); font-size: 15px; line-height: 1; transition: transform .14s ease-out; }
.og-bucket[open] > summary::before { transform: rotate(90deg); }
.og-bucket > summary:hover { color: var(--blue); }
.og-bucket-select { flex: 0 0 auto; margin: 0; accent-color: var(--blue); }
.og-bucket-name { min-width: 0; max-width: 58%; overflow: hidden; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.og-bucket-count { margin-right: auto; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.og-bucket-body {
  min-width: 0;
  max-width: 100%;
  padding: 0 14px 12px;
  overflow-x: hidden;
  background: var(--paper-raised);
}
.og-bucket-hint { color: var(--blue); font-size: 9px; font-weight: 700; letter-spacing: .1em; opacity: 0; text-transform: uppercase; }
.og-bucket.is-drop .og-bucket-hint { opacity: 1; }
.og-links { width: 100%; max-width: 100%; table-layout: fixed; -webkit-user-select: none; user-select: none; }
.og-links tr { cursor: grab; }
.og-links tr:active { cursor: grabbing; }
.og-links tr:not(.is-selected):hover td { background: var(--paper); }
.og-links tr.is-selected td { background: var(--blue-soft); }
.og-links tr.is-cursor td { box-shadow: inset 0 1px 0 var(--blue), inset 0 -1px 0 var(--blue); }
.og-links tr.is-cursor td:first-child { box-shadow: inset 0 1px 0 var(--blue), inset 0 -1px 0 var(--blue), inset 2px 0 0 var(--blue); }
.og-links tr.is-cursor td:last-child { box-shadow: inset 0 1px 0 var(--blue), inset 0 -1px 0 var(--blue), inset -2px 0 0 var(--blue); }
.og-links td { padding: 7px 12px 7px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.og-link-select { width: 26px; padding-right: 0; }
.og-link-name { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.og-link-instrument { width: 34%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.og-links td.og-link-actions { width: 38px; padding-right: 6px; overflow: visible; text-align: right; }

.og-action-menu-wrap { position: relative; display: inline-flex; }
.og-action-menu-toggle { width: 25px; height: 25px; padding: 0; border: 0; border-radius: 2px; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; }
.og-action-menu-toggle:hover { background: var(--paper); color: var(--ink); }
.og-action-menu[hidden] { display: none; }
.og-action-menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 40; min-width: 158px; display: flex; flex-direction: column; padding: 4px; border: 1px solid var(--line); background: var(--paper-raised); box-shadow: 0 10px 28px rgba(34, 31, 25, .14); }
.og-action-menu button { width: 100%; padding: 7px 9px; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: 11px; font-weight: 400; text-align: left; white-space: nowrap; }
.og-action-menu button:hover:not(:disabled) { background: var(--paper); }
.og-action-menu button:disabled { opacity: .35; cursor: default; }
.og-action-menu button.danger { color: var(--red); }
.og-bucket-menu-wrap { margin-left: 2px; }

/* Buckets take the room; the drawer is a fixed column beside them. */
.og-files-split { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: var(--panel-gap); align-items: start; }
.og-files-split > * { min-width: 0; }

.og-drawer { position: sticky; top: 18px; height: var(--og-panel-height); display: flex; flex-direction: column; gap: 9px; padding: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--paper-raised); box-shadow: 0 9px 28px rgba(34, 31, 25, .045); -webkit-user-select: none; user-select: none; }
.og-drawer.is-drop { border-color: var(--blue); background: color-mix(in srgb, var(--blue-soft) 55%, var(--paper)); }
.og-drawer-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.og-drawer-count { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
/* Folders, then how to arrange what they leave. */
.og-drawer-folders { max-height: 168px; overflow-y: auto; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
/* The drawer's own folder rows. These used to borrow the files tab's .tree-row
   rules; they are a different shape — a wrapper holding a button and a count —
   so they carry their own names now. */
.og-tree-row { display: flex; align-items: center; gap: 8px; padding-left: var(--indent); border-radius: 2px; }
.og-tree-row:hover { background: rgba(23, 23, 19, .05); }
.og-tree-row.is-active { background: var(--blue-soft); }
.og-tree-row button { flex: 1; min-width: 0; padding: 5px 4px; border: 0; overflow: hidden; background: transparent; color: inherit; cursor: pointer; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.og-tree-row.is-active button { color: var(--blue); }
.og-tree-count { padding-right: 6px; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }

.og-drawer-modes { display: flex; flex-wrap: wrap; gap: 4px; }
.og-mode { padding: 3px 9px 2px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }
.og-mode:hover { border-color: var(--ink); color: var(--ink); }
.og-mode.is-on { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }

.og-drawer-list { min-height: 0; flex: 1; overflow-y: auto; outline: 0; }
.og-file-group { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 9px 0 3px; padding-bottom: 3px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.og-file-group:first-child { margin-top: 0; }
.og-file-group span { font-weight: 400; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.og-drawer-list:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.og-file { display: grid; grid-template-columns: minmax(0, 1fr) 38%; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 2px; cursor: grab; font-size: 11px; }
.og-file:active { cursor: grabbing; }
.og-file:not(.is-selected):hover { background: var(--paper-raised); }
.og-file.is-selected { background: var(--blue-soft); }
.og-file.is-cursor { box-shadow: inset 0 0 0 1px var(--blue); }
.og-file-name { min-width: 0; display: flex; align-items: baseline; gap: 7px; overflow: hidden; color: var(--ink); white-space: nowrap; }
.og-file-name > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.og-file-instrument { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.og-time-day { margin-top: 8px; padding: 3px 6px 2px; color: var(--ink); font-size: 11px; font-weight: 600; }
.og-time-day:first-child { margin-top: 0; }
.og-time-hour { padding: 2px 6px; color: var(--muted); font-size: 10px; font-weight: 500; }

.og-drawer-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding-top: 9px; border-top: 1px solid var(--line); }
.og-drawer-selected { flex: 1; min-width: 60px; text-align: right; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.og-drawer-bucket { max-width: 140px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 2px; background: var(--paper-raised); color: var(--ink); font-size: 11px; }
.og-drawer-hint { margin: 0; color: #aaa49a; font-size: 10px; line-height: 1.45; }

/* Follows the cursor while dragging; lives for one frame at the start. */
.og-drag-ghost { position: fixed; top: -1000px; left: -1000px; display: grid; gap: 1px; padding: 8px 12px; border: 1px solid var(--blue); border-radius: 3px; background: var(--paper); box-shadow: 0 6px 18px rgba(23, 23, 19, .18); pointer-events: none; }
.og-drag-ghost b { color: var(--ink); font-size: 12px; font-weight: 500; }
.og-drag-ghost span { color: var(--blue); font-size: 10px; }

/* While a drag is on, the buckets read as targets. */
.og-dragging .og-bucket { border-style: dashed; }
.og-dragging .og-bucket.is-drop { border-style: solid; }

/* The plot lines up with the buckets above it, with the metadata beside it. */
.og-column { min-width: 0; display: grid; gap: var(--panel-gap); }
.og-plot-row { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: var(--panel-gap); align-items: stretch; }
.og-plot-section { min-width: 0; height: var(--og-panel-height); display: flex; flex-direction: column; gap: 12px; padding: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--paper-raised); box-shadow: 0 9px 28px rgba(34, 31, 25, .045); }

.og-meta { min-width: 0; height: var(--og-panel-height); display: flex; flex-direction: column; gap: 12px; padding: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--paper-raised); box-shadow: 0 9px 28px rgba(34, 31, 25, .045); }
.og-meta-count { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
/* The shared metadata fields collapse to a compact label-and-value box here. */
.og-meta-fields { min-height: 0; flex: 1; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; align-content: start; gap: 6px; overflow-y: auto; padding: 2px 4px 2px 2px; }
.meta-grid.og-meta-fields .field { gap: 1px; padding: 4px 6px; }
.og-meta-fields .field-hint { display: none; }
.meta-grid.og-meta-fields .field input, .meta-grid.og-meta-fields .field textarea, .meta-grid.og-meta-fields .field select { padding: 2px 4px; background: rgba(255, 255, 255, .48); }
.meta-grid.og-meta-fields .field textarea { height: 28px; min-height: 28px; }
.meta-grid.og-meta-fields .field-static { padding: 2px 4px; }
.og-meta-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.og-plot-count { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.og-plot-section .plot-host { min-height: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.og-plot-section .plot-controls { width: 100%; flex: 0 0 auto; row-gap: 8px; margin-bottom: 8px; }
.og-plot-section .plot-canvas.is-fit-height { min-height: 0; flex: 1 1 auto; }

.og-empty { margin: 0; color: var(--muted); font-size: 12px; }

@container (max-width: 520px) {
  .og-link-instrument { display: none; }
}

@media (max-width: 1200px) {
  .og-files-split, .og-plot-row { grid-template-columns: 1fr; }
  .og-workspace { grid-template-columns: 1fr; }
  .og-drawer, .og-list { position: static; }
}

@media (max-width: 900px) {
  .og-drawer { display: none; }
}

@media (max-width: 700px) {
  /* The collection list moves into a sheet behind a picker that names what is
     open, the way the data-files folder tree does. */
  .og-list { display: none; }
  .og-picker {
    min-height: var(--tap);
    display: flex;
    align-items: baseline;
    gap: 9px;
    padding: 11px 13px 8px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--paper-raised);
    box-shadow: 0 9px 28px rgba(34, 31, 25, .045);
    color: var(--ink);
    cursor: pointer;
    text-align: left;
  }
  .og-picker span { color: var(--muted); font-size: var(--text-meta); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; }
  .og-picker strong { min-width: 0; overflow: hidden; font-size: var(--text-control); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
  .og-picker::after { content: "⌄"; margin-left: auto; color: var(--muted); }

  /* The facts are the one part of the panel that is pure readout. */
  .og-facts { display: none; }
  .og-info { padding: 13px; }

  /* The board loses its frame and its header, so the buckets stand on the page
     by themselves. A bucket keeps its name and its files; the count and the
     actions menu are desk work. */
  .og-organization-section { padding: 0; border: 0; background: transparent; box-shadow: none; }
  .og-organization-head { display: none; }
  .og-organization-board { padding: 0; border: 0; background: transparent; box-shadow: none; }
  .og-bucket-count,
  .og-bucket-hint,
  .og-bucket-menu-wrap { display: none; }
  .og-bucket > summary { padding: 11px 12px; }

  /* Plot and metadata have no room beside the buckets. The metadata goes; the
     plot waits behind the floating action and opens over the page. */
  .og-meta { display: none; }
  .og-plot-row { display: block; }
  .og-plot-section { display: none; }

  .og-plot-cta {
    position: fixed;
    z-index: 90;
    right: 16px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    min-height: var(--tap);
    display: inline-flex;
    align-items: center;
    padding: 0 18px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper-raised);
    cursor: pointer;
    font-size: var(--text-control);
    font-weight: 600;
    box-shadow: 0 8px 22px rgba(23, 23, 19, .28);
  }
  .og-plot-cta[hidden] { display: none; }

  /* Full screen, over everything, with a way back out. */
  .og-workspace.is-plot-open .og-plot-section {
    position: fixed;
    inset: 0;
    z-index: 1100;
    height: 100dvh;
    display: flex;
    padding: 12px calc(14px + env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));
    border: 0;
    border-radius: 0;
    background: var(--paper);
  }
  .og-workspace.is-plot-open .og-plot-cta { display: none; }
  .og-workspace.is-plot-open .og-plot-close {
    width: var(--tap);
    height: var(--tap);
    display: grid;
    place-items: center;
    margin-left: auto;
    padding: 0 0 3px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 20px;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .og-picker,
  .og-list,
  .og-detail,
  .og-organization-head,
  .og-files-split,
  .og-meta {
    display: none;
  }

  .og-workspace,
  .og-column,
  .og-organization-section,
  .og-organization-board,
  .og-plot-row {
    display: block;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .og-plot-section {
    position: fixed;
    inset: 0;
    z-index: 1100;
    width: 100vw;
    height: 100dvh;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .og-plot-section > .og-section-hd,
  .og-plot-section .plot-controls {
    display: none;
  }

  .og-plot-section .plot-host,
  .og-plot-section .plot-canvas.is-fit-height {
    width: 100%;
    height: 100%;
    flex: none;
  }
}

.og-list-tools { display: flex; align-items: center; gap: 8px; }
.og-sort { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 2px; background: var(--paper-raised); color: var(--muted); font-size: 11px; }
.og-sort:focus { border-color: var(--blue); outline: 0; }
.og-clear { padding: 0; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 10px; white-space: nowrap; }
.og-clear:hover { text-decoration: underline; }
