/* Runwell's shared pieces: the ones every area uses that runeui doesn't draw (the index toolbar,
/* what Runwell puts in runeui's table and bulk bar, cards plugins render, hint mode, form widgets).
/* Unlayered, so these win over runeui's layers; on runeui's tokens (appearance.css, docs/theming.md).
/*
/* 2 Index toolbar and filters   3 Lists   4 Bulk bar   5 Index cards
/* 6 Small pieces   7 Form widgets */

/* ======================================================================= 2 Index toolbar and filters */

/* An index's top row: its filters (ui :filter pills in ui :filter_bar), and across from them the
/* view toggle and New. */
.index-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; min-height: var(--ui-h); }
.index-toolbar__filters { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; min-width: 0; min-height: var(--ui-h); }
.index-toolbar__end { display: flex; align-items: center; gap: .75rem; flex: 0 0 auto; }
/* The row of filters as plugins' pages write it by hand. */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.view-toggle .icon { width: 1rem; height: 1rem; }
/* On a phone the filters take a row of their own under the view toggle and New. */
@media (max-width: 640px) {
  .index-toolbar { flex-wrap: wrap; justify-content: flex-end; }
  .index-toolbar__filters { order: 2; flex: 1 1 100%; }
}

/* New: the page's primary action, with its key. On a phone, just the icon. */
.new-link kbd { height: 1.125rem; min-width: 1.125rem; border-color: color-mix(in oklab, var(--background) 25%, transparent); background: transparent; color: inherit; opacity: .7; }
@media (max-width: 640px) {
  .ui-button.new-link { width: var(--ui-h); padding: 0; }
  .new-link :is(.new-link__text, .new-link__key) { display: none; }
}

/* A link that opens a sheet, with the arrow to the record's own page after it (page_link_to):
   faint until the row or the link is pointed at or focused. */
.sheet-link { display: inline-flex; align-items: center; gap: .25rem; min-width: 0; max-width: 100%; }
.sheet-link > a:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.page-link { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; border-radius: calc(var(--ui-radius-sm) - 2px); color: var(--faint-foreground); opacity: .55; transition: opacity var(--ui-duration), color var(--ui-duration), background-color var(--ui-duration); }
.page-link svg { width: .875rem; height: .875rem; }
:is(tr, li, .sheet-link):hover .page-link, .page-link:focus-visible { opacity: 1; }
.page-link:hover { background: var(--ui-ghost-hover); color: var(--primary); }

/* ======================================================================= 3 Lists */

/* An index's table (layouts/shared/_list_table): runeui's ui :table in a bordered panel, with its
/* pages underneath. runeui sizes the columns (each as wide as what it holds, the one marked
/* data-grow taking the rest and cutting a long name short) and scrolls the table sideways in its
/* container when a window is too narrow for them. What's here is Runwell's own: the panel, the
/* links and pickers in the cells, the row the keys are on, and the row's edit and delete. */
.list-table { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.list-table [data-slot="table-scroll"] { border: 1px solid var(--border); border-radius: var(--ui-radius-xl); background: var(--background); }
.list-table { --ui-table-truncate: 14rem; }
/* Tasks has the most columns: its work and client give the task's title the room. */
#tasks_list { --ui-table-truncate: 10rem; }
.list-table [data-slot="table"] :is(th, td):first-child { padding-inline-start: .75rem; }
.list-table [data-slot="table"] :is(th, td):last-child { padding-inline-end: .75rem; }
.list-table [data-slot="table"] th { color: var(--muted-foreground); font-size: var(--ui-text-xs); }
.list-table [data-slot="table"] td { height: 2.5rem; }
.list-table [data-slot="table"] :is(th, td)[data-slot="table-select"] { padding-inline: .75rem 0; }
.list-table td strong { font-weight: 500; }
.list-table td a:not([class]), .list-table td a.row-link { color: var(--foreground); font-weight: 500; text-decoration: none; }
.list-table td a:not([class]):hover, .list-table td a.row-link:hover { color: var(--primary); }
/* The growing column's link cuts short with it (a sheet-link is a flex row: its link shrinks). */
.list-table td:is([data-grow], [data-truncate]) > a { display: block; overflow: hidden; text-overflow: ellipsis; }
.list-table td:is([data-grow], [data-truncate]) .sheet-link { display: flex; }
/* A task's title wraps to two lines rather than being cut at one (data-grow="wrap"). */
.list-table td[data-grow="wrap"] .sheet-link { align-items: flex-start; }
.list-table td[data-grow="wrap"] .sheet-link > a:first-child { display: -webkit-box; white-space: normal; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
/* A cell whose text runs over lines instead of being cut (the audit log's details). */
.list-table td.list-table__wrap { white-space: normal; overflow-wrap: anywhere; }
.list-table__corner { width: 1%; }
.list-table__corner [data-slot="menu"] { display: inline-flex; margin-block: -0.25rem; font-weight: 400; }

/* The row j / k landed on. */
[data-slot="table"] tbody tr:focus-visible { outline: none; box-shadow: none; }

/* Edit and delete at a row's end, quiet until the row is hovered. */
.row-actions { width: 1%; }
.row-actions__row { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.row-action { opacity: .6; }
tr:hover .row-action, .row-action:focus-visible { opacity: 1; }

/* "Load more" for lists that load their next page as you scroll (PaginationHelper), and the pages
/* under a table (table_pagination: which rows are showing, then ui :pagination). */
.pagination-link { display: block; flex: 1; min-height: 1.5rem; pointer-events: none; text-decoration: none; }
.pagination-link.pagination-link--active-when-observed { width: 0; height: 0; overflow: hidden; visibility: hidden; }
turbo-frame:has(.pagination-link--active-when-observed):has(~ turbo-frame) .pagination-link--active-when-observed { display: none; }
.pagination-list { display: contents; }
.pagination-link.pagination-link--manual { flex: none; margin: 0 auto; pointer-events: auto; }
.table .pagination-row td { height: 0; padding: 0; border: 0; }
.list-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.list-pagination__summary { color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.list-pagination [data-slot="pagination"] { width: auto; }

/* ======================================================================= 4 Bulk bar */

/* While rows are picked, the table's bulk bar (ui :bulk_bar, in the table's container) takes the
/* index toolbar's row: the toolbar steps aside and the bar is as tall as it was, so the table
/* doesn't move. Each action is a form of its own (BulkHelper). */
#main:has(.list-table [data-slot="bulk-bar"]:not([hidden])) .index-toolbar { display: none; }
.list-table [data-slot="bulk-bar"] { margin-bottom: 1rem; flex-wrap: wrap; }
[data-slot="bulk-bar"] .bulk-form { display: inline-flex; flex-direction: row; align-items: center; gap: .5rem; margin: 0; }
[data-slot="bulk-bar"] [data-slot="bulk-actions"] { flex-wrap: wrap; align-items: center; }
/* A plugin page's bar, in the index toolbar (content_for :index_bulk): it takes the filters' place. */
#main[data-bulk-active] :is(.index-toolbar__filter-pills, .index-toolbar__end) { display: none !important; }
#main[data-bulk-active] .index-toolbar__filters { flex: 1 1 auto; }
.index-toolbar [data-slot="bulk-bar"] { flex: 1; margin: 0; }
/* A plugin's table with the native checkboxes (bulk_select_cell). */
:is(th, td)[data-slot="table-select"] > input[type="checkbox"] { display: block; margin: 0; cursor: pointer; }

/* ======================================================================= 5 Cards */

/* A record as a card (app-card: layouts/shared/_card, which plugins render). Indexes are tables
/* only since 5.0; the board's cards are runeui's (tasks.css, 4). */
.app-card { position: relative; justify-content: space-between; gap: 1rem; min-width: 0; padding: 1rem; transition: border-color .12s; }
.app-card:hover { border-color: var(--input); }
.app-card:has(.app-card__link:focus-visible) { box-shadow: var(--ui-focus-ring); }
.app-card__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.app-card__link:focus-visible { box-shadow: none; }
.app-card__header { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.app-card__eyebrow { display: flex; align-items: center; gap: .5rem; min-width: 0; color: var(--faint-foreground); font-size: var(--ui-text-xs); }
.app-card__ref { flex: 0 0 auto; color: var(--muted-foreground); font-weight: 500; }
.app-card__context { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-card__ref + .app-card__context { padding-left: .5rem; border-left: 1px solid var(--border); }
.app-card__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; font-size: var(--ui-text-sm); font-weight: 500; line-height: 1.375; }
.app-card__footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-width: 0; }
.app-card__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.app-card__people { position: relative; z-index: 2; display: inline-flex; align-items: center; flex: 0 0 auto; margin-left: auto; }

/* ======================================================================= 6 Small pieces */

/* People: nobody's placeholder, and "+N" at the end of a stack. */
.person__none { color: var(--faint-foreground); font-size: var(--ui-text-xs); }
/* An avatar (ui :avatar through avatar and person_tag): its initials on its own colour (letter--N),
/* and the smallest size, which runeui has no name for. */
.avatar [data-slot="avatar-fallback"] { background: transparent; color: inherit; }
[data-slot="avatar"].avatar--xs { --avatar-size: 1.125rem; }
[data-slot="avatar"].avatar--lg { --avatar-size: 1.75rem; }

/* A destructive action on a record's own page (confirm_button, layouts/shared/_confirm): a quiet
/* red button; the question is asked in the page's confirm dialog. */
.confirm-button.ui-button, .danger-button.ui-button { color: var(--destructive); }
.confirm-button.ui-button:hover, .danger-button.ui-button:hover { background: color-mix(in oklab, var(--destructive) 9%, transparent); color: var(--destructive); }

/* The ? sheet (layouts/shared/_shortcuts, runeui's ui :dialog): groups in two columns, each a list
/* of what a key does with its keys (ui :kbd) at the end; the footer has hint mode's switch. Inside
/* runeui's dialog, so it reads runeui's tokens. */
.shortcuts__groups { columns: 2 20rem; column-gap: 2rem; }
.shortcuts__groups section { display: flex; flex-direction: column; gap: .25rem; padding-bottom: 1.25rem; break-inside: avoid; }
.shortcuts__heading { color: var(--muted-foreground); font-size: var(--ui-text-xs); font-weight: 500; }
.shortcut-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-auto-flow: dense; margin: 0; }
.shortcut-list :is(dt, dd) { margin: 0; padding: .4375rem 0; border-bottom: 1px solid var(--border); }
.shortcut-list dt { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .25rem; padding-left: 1rem; white-space: nowrap; }
.shortcut-list dd { grid-column: 1; }
.shortcut-list :is(dt, dd):last-of-type { border-bottom: 0; }
.shortcuts [data-slot="dialog-footer"] { align-items: center; }
.shortcuts [data-slot="dialog-footer"] [data-slot="choice"] { margin-inline-end: auto; }

/* A snippet outside rich text (code_block): a command or request to read or copy, coloured with
/* Lexxy's code colours (runeui/lexxy.css, light and dark), as code in rich text is. */
.code-block { margin: 0; padding: .75rem 1rem; overflow-x: auto; border-radius: var(--ui-radius-lg); background: var(--muted); border: 0; font-family: var(--font-mono); font-size: var(--ui-text-xs); tab-size: 2; text-align: start; white-space: pre; overflow-wrap: normal; }
.code-block :is(.token.attr-name, .token.atrule, .token.attr, .token.keyword) { color: var(--lexxy-color-code-token-att); }
.code-block :is(.token.boolean, .token.constant, .token.number, .token.property, .token.symbol, .token.tag) { color: var(--lexxy-color-code-token-property); }
.code-block :is(.token.attr-value, .token.builtin, .token.char, .token.inserted, .token.selector, .token.string) { color: var(--lexxy-color-code-token-selector); }
.code-block :is(.token.comment, .token.cdata, .token.doctype, .token.prolog) { color: var(--lexxy-color-code-token-comment); font-style: italic; }
.code-block :is(.token.deleted, .token.entity, .token.operator, .token.url) { color: var(--lexxy-color-code-token-operator); }
.code-block :is(.token.class, .token.class-name, .token.function) { color: var(--lexxy-color-code-token-function); }
.code-block :is(.token.important, .token.namespace, .token.regex, .token.variable) { color: var(--lexxy-color-code-token-variable); }
.code-block .token.punctuation { color: var(--lexxy-color-code-token-punctuation); }


/* Hint mode (keyboard_controller, the . key): each control's key as a keycap on it, from
/* data-key-hint, and a strip of the keys with no control at the foot of the page. Keycaps are
/* overlays, so turning hints on moves nothing: runeui's kbd (its size, corners and type), in the
/* text's colour so it stands out on any control. */
:where(html[data-hints] [data-key-hint]:not(input, textarea, select)) { position: relative; }
html[data-hints] [data-key-hint]:not(input, textarea, select, :has(kbd, [data-slot="kbd"]))::after {
  content: attr(data-key-hint); position: absolute; inset: -.5rem -.5rem auto auto; z-index: 2;
  display: grid; place-items: center; min-width: 1rem; height: 1rem; padding: 0 .25rem; border-radius: calc(var(--ui-radius-sm) - 2px);
  background: var(--foreground); color: var(--background); box-shadow: 0 0 0 2px var(--background);
  font-family: var(--font-sans); font-size: .625rem; font-weight: 500; line-height: 1;
  text-transform: none; white-space: pre; word-spacing: .2em; pointer-events: none;
}
html[data-hints] [data-slot="sidebar-menu-button"][data-key-hint]::after { inset: 50% .5rem auto auto; translate: 0 -50%; }
html[data-hints] :is([data-filter-target~="item"], [data-keyboard-item]):not(:hover, :focus-within, [data-keyboard-current], [aria-selected="true"]) [data-key-hint]::after { display: none; }
/* The strip (layouts/shared/_hint_legend): a floating bar of ui :kbd keys. */
.hint-legend { display: none; }
html[data-hints] .hint-legend {
  position: fixed; bottom: 1rem; left: 50%; translate: -50% 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .5rem 1rem; max-width: calc(100vw - 2rem); padding: .375rem .375rem .375rem .75rem; border: 1px solid var(--border); border-radius: calc(var(--ui-radius-lg) * 1.2);
  background: var(--background); box-shadow: 0 0 0 1px var(--border), var(--ui-shadow-lg); color: var(--muted-foreground); font-size: var(--ui-text-xs);
}
.hint-legend__item { display: inline-flex; align-items: center; gap: .25rem; }
@media (any-hover: none) { html[data-hints] [data-key-hint]::after { display: none; } }

@media (any-hover: none) { .hide-on-touch { display: none !important; } }

/* ======================================================================= 7 Form widgets */

/* The fields Runwell builds from more than one input (ApplicationHelper's date_input, money_field,
/* rich_text_field; DocumentsHelper's document_drop_target). Bare inputs inside them are the compatibility layer's. */

/* A form's own controls (selects, a combobox behind its button, a date) fill their field, as its
/* inputs do: runeui's are as wide as their words, which left a column of fields ragged. */
:is(.field, [data-slot="field"]) :is([data-slot="select-trigger"], [data-slot="combobox-trigger"][data-picker], [data-slot="date-picker"]),
:is(.field, [data-slot="field"]) ui-combobox:has(> ui-combobox-trigger) { width: 100%; }
:is(.field, [data-slot="field"]) [data-slot="date-picker-input"] { flex: 1; }

/* A form's fields side by side, two or more to a row as room allows (runeui's fields stack), and
/* its buttons at its end. */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; }

/* Money (money_field): the dollars people type and the cents sent, laid out as the one field. */
.money-field { display: contents; }

/* Rich text (rich_text_field, Lexxy) is runeui's editor skin (runeui_tags lexxy: true). */
/* Saved rich text: a list reads as tight as it did in the editor (Lexxy wraps each item's text
/* in a paragraph). */
.lexxy-content li > p { margin: 0; padding: 0; }
.lexxy-content li > :is(ul, ol) { margin-block: 0; }

/* Uploads (document_drop_target): a dashed box the width of its column. The file input covers it,
/* so a click chooses and a drop fills it; the upload controller writes progress into it. Hovered,
/* dragged over or focused, it takes the accent. */
.upload-drop {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; width: 100%;
  padding: 1.5rem; border: 1px dashed var(--input); border-radius: var(--ui-radius-xl); color: var(--muted-foreground);
  text-align: center; cursor: pointer; transition: background .12s, border-color .12s, color .12s;
}
.upload-drop:is(:hover, .drag-and-drop__hover-container) { border-color: color-mix(in oklab, var(--primary) 60%, var(--input)); background: var(--brand-tint); color: var(--foreground); }
.upload-drop:has(input:focus-visible) { border-color: var(--primary); box-shadow: var(--ui-focus-ring); }
.upload-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 0; cursor: pointer; }
.upload-drop input[type="file"]::file-selector-button { cursor: pointer; }
.upload-drop__choose { color: var(--foreground); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.upload-drop__limit { color: var(--faint-foreground); }
.upload-drop progress { flex-basis: 100%; width: 100%; height: 4px; accent-color: var(--primary); }
.upload-drop[aria-busy="true"], form[aria-busy="true"] .upload-drop { cursor: progress; }
.styleguide-skeleton { width: 12rem; }

/* ======================================================================= Pending */

/* While a form is on its way (Turbo marks it aria-busy), its submit button dims and takes no
/* second click, so a save is never sent twice and you can see it's working. */
form[aria-busy="true"] :is(button[type="submit"], input[type="submit"]) { opacity: .6; cursor: progress; pointer-events: none; }

/* ======================================================================= Toasts */

/* Notices and alerts are runeui's toasts (ui :toaster in layouts/shared/_feedback; the flash and
/* turbo_stream_flash), in the bottom right corner, over the side panel, the trays and the search
/* bar (the bell and the + are in the bar at the top). */
#runeui-toaster { z-index: 63; }

/* ======================================================================= The brand's colour */

/* The scheme's colour (Settings > Appearance, --primary) carries through what's chosen, current or
/* under the keys: its tints (--brand-tint and --brand-tint-strong, appearance.css: shadcn's quiet
/* --accent fill in the neutral scheme, the scheme's hue in the others, light or dark), and the
/* colour itself on the icon of what's highlighted, on checkboxes and on selected text. Mixes here
/* are in OKLab: in OKLCH white, greys and transparent carry a hue of 0 (red), and a mix swings
/* round the wheel toward it. */
input:is([type="checkbox"], [type="radio"]) { accent-color: var(--primary); }
::selection { background: color-mix(in oklab, var(--primary) 28%, transparent); }
[data-slot="table"] tbody tr:focus-visible, [data-slot="table"] tbody tr[data-keyboard-current] { background: var(--brand-tint); }
.settings-nav__link[aria-current="page"] { background: var(--brand-tint); }
.settings-nav__link[aria-current="page"] .icon { color: var(--primary); }
.record-list__row[data-keyboard-current], :is(.item-row, .list-row)[data-keyboard-current] { background: var(--brand-tint); }

/* A person in a table's cell (person_cell): the owner column's avatar, then the name. */
.person-cell { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; max-width: 100%; vertical-align: middle; }
.person-cell > :last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Optimistic: what's sent shows at once, dimmed, until the server answers (the pending controller's
   rows, a row being deleted, the rows a bulk action is changing, a tab's frame loading). */
.task-item--pending,
.record-feed__item--pending,
tr.is-pending,
.is-pending { opacity: 0.5; pointer-events: none; transition: opacity 150ms ease; }
tr.is-leaving { opacity: 0; transition: opacity 200ms ease; }
.task-item__pending-dot { inline-size: 0.875rem; block-size: 0.875rem; border-radius: 50%; border: 1.5px dashed var(--input); flex: none; }
#record_tab[aria-busy="true"] .record-tabs__panel { opacity: 0.5; transition: opacity 150ms ease 100ms; }
@media (prefers-reduced-motion: reduce) {
  tr.is-leaving, .is-pending, #record_tab[aria-busy="true"] .record-tabs__panel { transition: none; }
}

/* A row just added from the modal (create.turbo_stream.erb): tinted a moment, then like the rest. */
tr.is-fresh { animation: row-fresh 2.4s ease-out; }
@keyframes row-fresh { from { background: var(--brand-tint-strong); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { tr.is-fresh { animation: none; background: var(--brand-tint); } }

/* A form's draft came back from the browser (the draft controller): said quietly, with Discard. */
.draft-notice { display: flex; align-items: center; gap: .5rem; margin: 0; color: var(--muted-foreground); font-size: var(--ui-text-xs); }
.draft-notice[hidden] { display: none; }
.draft-notice__discard.ui-button { height: auto; padding: 0; color: var(--primary); font: inherit; } /* runeui's link button, inline in the line */

/* The connection gone (layouts/shared/_connection_status, the connection controller): a quiet pill
   at the foot of the page, and anything waiting to be sent marked unsaved. */
.connection-status { position: fixed; inset-inline: 0; bottom: calc(.75rem + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; gap: .5rem; width: fit-content; margin: 0 auto; padding: .25rem .75rem; border: 1px solid var(--border); border-radius: var(--ui-radius-full); background: var(--background); box-shadow: 0 0 0 1px var(--border), var(--ui-shadow-lg); color: var(--muted-foreground); font-size: var(--ui-text-xs); }
.connection-status[hidden] { display: none; }
.connection-status__dot { inline-size: 0.5rem; block-size: 0.5rem; border-radius: 50%; background: var(--warning); }
form[data-unsaved] input,
form[data-unsaved] textarea,
.layout-field:has(form[data-unsaved]) input,
.layout-field:has(form[data-unsaved]) textarea { border-color: var(--warning); }
.layout-field:has(form[data-unsaved])::after,
form[data-unsaved].record-title-form::after { content: "Not saved yet"; color: var(--warning); font-size: var(--ui-text-xs); }

/* A count beside a tab's name (record tabs, a section's filter: ui :tabs as links). */
.tab-count { min-width: 1.125rem; padding: 0 6px; border-radius: var(--ui-radius-full); background: light-dark(color-mix(in oklab, var(--foreground) 6%, var(--muted)), color-mix(in oklab, var(--foreground) 14%, var(--muted))); color: var(--muted-foreground); font-size: var(--ui-text-xs); font-weight: 600; line-height: 1.125rem; text-align: center; }

/* A row in a card's list (records' contacts, work and documents, a section's focus): what it is,
/* muted lines under it, what it's at on the right. A link row tints on hover. */
.item-row { display: flex; align-items: center; gap: .75rem; min-height: 2.5rem; padding: 6px .75rem; border-radius: var(--ui-radius-sm); color: var(--foreground); text-decoration: none; }
a.item-row:hover, a.item-row:focus-visible { background: var(--ui-ghost-hover); color: var(--foreground); }
.item-row__content { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.item-row__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.item-row__desc { min-width: 0; color: var(--faint-foreground); font-size: var(--ui-text-xs); line-height: 1rem; overflow-wrap: anywhere; }
.item-row__meta { display: flex; flex: 0 0 auto; align-items: center; gap: .5rem; color: var(--faint-foreground); white-space: nowrap; font-variant-numeric: tabular-nums; }
.item-row__actions { display: flex; flex: 0 0 auto; align-items: center; gap: .5rem; margin-left: auto; }

/* A line of small print under a field (the work's description, a person's email). */
.field-note { color: var(--muted-foreground); font-size: var(--ui-text-xs); }

/* A section's state as a dot (works/_scope). */
.state-dot { display: inline-block; flex: 0 0 auto; width: .5rem; height: .5rem; border-radius: 50%; background: var(--faint-foreground); }
.state-dot--accent { background: var(--primary); }
.state-dot--danger { background: var(--destructive); }
.state-dot--ok { background: var(--success); }
