/* C-WORK: Work collections, routed work objects and Relationships. */
/* Match action/objects/relationships.html: a reserved desktop rail, no rail on
   tablet, and a single unframed content edge. Keep these overrides scoped so
   the legacy Action board and tab cascade cannot reintroduce a card. */
.work-surface {
  /* Work shares the page frame; the reserved left rail is gone so the
     collection starts at the same edge as the header and every other tab. */
  --work-content-offset: 0px;
  padding-top: calc(var(--shell-height) + var(--space-lg) + var(--space-xs) + var(--space-2xs));
}
.work-surface .page-shell-main { max-width: none; margin-left: var(--work-content-offset); }
/* The shell-owned setup strip sits between the header and the page; give it the
   content column and drop the home foot-notice rule it shares a class with. */
.work-surface > [data-activation-strip] { margin: 0 0 var(--space-lg) var(--work-content-offset); padding-top: 0; border-top: 0; }
.work-surface .action-page-board { margin: 0; min-width: 0; min-height: 0; border: 0; border-radius: 0; background: transparent; overflow: visible; }
/* The navigation moves into the collection toolbar once its read completes. */
.action-wrap.work-surface > .page-shell-main > .page-shell-commands:not(:has(.action-lens-tabs)) { display: none; }
.work-surface .action-lens-tabs { display: inline-flex; max-width: 100%; margin: 0; padding: var(--space-3xs); gap: var(--space-3xs); border: 0; border-radius: var(--radius-full); background: var(--color-bg-sunken); overflow: visible; }
.work-surface .action-lens-tabs > :is(button, a) { min-height: calc(var(--control-height) - 2 * var(--space-3xs)); padding: 0 calc(var(--space-sm) - var(--space-2xs)); border: 0; border-radius: var(--radius-full); background: transparent; box-shadow: none; }
.work-surface .action-lens-tabs > :is(button, a)[aria-selected="true"],
.work-surface .action-lens-tabs > :is(button, a)[aria-current="page"],
.work-surface .action-lens-tabs > :is(button, a)[aria-pressed="true"] { background: var(--color-bg-surface); color: var(--color-text-primary); font-weight: var(--type-heading-weight); box-shadow: var(--elevation-raised); }
.work-surface .work-list { padding: 0; margin: 0; }
.work-surface .work-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px 96px var(--control-height); align-items: baseline; gap: var(--space-xs) var(--space-md); padding: var(--space-md) 0; border: 0; border-bottom: 1px solid var(--color-border-subtle); border-radius: 0; background: transparent; }
.work-row > div { min-width: 0; }
.work-row .item-name { font-size: var(--type-body-size); font-weight: var(--type-body-weight); color: var(--color-text-primary); text-decoration: none; overflow-wrap: anywhere; }
.work-surface .work-row .ledger-line-text { display: block; }
.work-row .item-name:hover { color: var(--color-text-link); }
.work-row-meta { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-sm); margin-top: var(--space-2xs); font-size: var(--type-small-size); color: var(--color-text-tertiary); }
.work-row-meta a { color: inherit; }
.work-row time { color: var(--color-text-tertiary); font-size: var(--type-small-size); text-align: right; }
.work-row-state { color: var(--color-text-secondary); font-size: var(--type-small-size); }
.work-for-you { color: var(--color-status-warning-fg); }
.work-settled { color: var(--color-status-success-fg); }
.work-group { margin-top: var(--space-xl); }
.work-group h2 { font-family: var(--type-family-body); font-size: var(--type-body-size); font-weight: var(--type-heading-weight); margin: 0; }
.work-surface .collection-toolbar-controls { padding: 0; gap: var(--space-xs); }
.work-surface .collection-find { flex: 1 1 180px; }
.work-surface .collection-toolbar-chips:empty { display: none; }
.work-surface .action-filter-toolbar { padding: var(--space-sm) 0; border: 0; }
.work-surface .action-toolbar-controls { flex-wrap: nowrap; }
.work-surface .action-collection-total { flex-basis: auto; margin-left: auto; }
.work-surface .action-toolbar-button { min-height: var(--control-height); border-radius: var(--radius-full); }
.work-surface .read-state-empty .panel-desc-faded { opacity: 1; }
.work-surface .read-state-empty, .work-surface [data-filter-empty] { margin-block: var(--space-md); color: var(--color-text-tertiary); }
.work-surface .work-group:first-of-type { margin-top: var(--space-md); }
.work-surface .collection-toolbar-primary { margin-left: auto; }
.work-surface #action-view-scope { margin-block: var(--space-sm); }
.work-surface .artifact-detail-content { max-width: none; padding: 0; }
.work-object { min-width: 0; max-width: none; padding: 0; }
.work-object .artifact-viewer-header { border: 0; padding: 0; margin-bottom: var(--space-md); }
.work-object:not([data-work-type="task"]) .artifact-viewer-header { max-width: 720px; }
.work-object .page-shell-meta { margin-top: calc(var(--space-xs) + var(--space-3xs)); font-size: var(--type-small-size); }
.work-surface button.quiet-link { border: 0; padding: 0; background: transparent; font: inherit; color: var(--color-text-link); cursor: pointer; }
.work-surface .source-text .quiet-link { border: 0; padding: 0; background: transparent; font: inherit; font-size: var(--type-small-size); color: var(--color-text-link); cursor: pointer; }
.work-object .artifact-viewer-header > .source-text { margin-top: var(--space-sm); color: var(--color-text-secondary); }
.work-object [data-work-status]:empty { display: none; }
.work-object-kind { font-size: var(--type-small-size); color: var(--color-text-tertiary); margin-bottom: var(--space-xs); }
.work-object-title { display: flex; align-items: baseline; gap: var(--space-sm); }
.work-object-title h1 { font-family: var(--type-family-display); font-size: clamp(calc(var(--type-heading-size) * 1.4), 4vw, calc(var(--type-heading-size) * 1.85)); font-weight: var(--type-display-weight); line-height: 1.12; margin: 0; overflow-wrap: anywhere; }
.work-status-mark { font-size: var(--type-heading-size); color: var(--color-text-secondary); flex-shrink: 0; }
.work-object .artifact-viewer-actions { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; width: 100%; margin-top: var(--space-md); padding: 0; gap: var(--space-xs); }
/* Every control in the row is one height, so top-aligning keeps them on one line even when an unavailable primary carries its note below. */
.work-object-content { max-width: 720px; }
.work-object[data-work-type="task"] .work-object-content { max-width: none; }
.work-object-section { margin-top: var(--space-xl); }
.work-object-section h2, .work-object .decision-detail-label { font-family: var(--type-family-body); font-size: var(--type-body-size); font-weight: var(--type-heading-weight); margin-bottom: var(--space-sm); }
.work-task-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: var(--space-xl); }
.work-task-layout > * { min-width: 0; }
.work-fields { border-left: 1px solid var(--color-border-subtle); padding-left: var(--space-lg); }
.work-fields dl { display: grid; gap: var(--space-md); margin: 0; }
.work-fields dt { color: var(--color-text-tertiary); font-size: var(--type-small-size); }
.work-fields dd { margin: var(--space-2xs) 0 0; overflow-wrap: anywhere; }
.work-stages { list-style: none; padding: 0; margin: var(--space-lg) 0 0; }
.work-stages li:first-child { border-top: 1px solid var(--color-border-subtle); }
.work-stages li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); border-bottom: 1px solid var(--color-border-subtle); padding: var(--space-sm) 0; }
.work-stages li p { color: var(--color-text-tertiary); font-size: var(--type-small-size); margin: var(--space-2xs) 0 0; }
.work-stages li p:empty { display: none; }
.work-stages li > span { font-size: var(--type-small-size); color: var(--color-text-secondary); }
.work-stages li[data-status="done"] > span, .work-stages li[data-status="completed"] > span { color: var(--color-status-success-fg); }
.work-stage-nav { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-md); border-top: 1px solid var(--color-border-subtle); margin-top: var(--space-xl); padding-top: var(--space-md); }
.work-stage-nav div:last-child { text-align: right; }
.work-stage-nav span, .work-stage-nav a { display: block; overflow-wrap: anywhere; }
.work-stage-nav span { color: var(--color-text-tertiary); font-size: var(--type-small-size); }
.work-object .decision-detail-meta { margin-top: 0; }
.work-object .backrefs-section { max-width: 720px; }
.work-object .backrefs-section h2, .work-object .backref-group-header { font-family: var(--type-family-body); font-size: var(--type-body-size); font-weight: var(--type-heading-weight); text-transform: none; letter-spacing: normal; }
.work-object .backref-item { flex-wrap: wrap; gap: var(--space-xs) var(--space-sm); padding-block: var(--space-sm); }
.work-object .backref-item .artifact-link { min-width: 0; font-family: var(--type-family-body); font-size: var(--type-body-size); color: var(--color-text-primary); overflow-wrap: anywhere; }
.work-object .backref-item .artifact-link:hover { color: var(--color-text-link); }
.work-object .backref-item .artifact-link-status { padding: 0; margin-left: auto; font-size: var(--type-small-size); color: var(--color-text-secondary); background: transparent; text-transform: none; letter-spacing: normal; }
.work-object .backref-item .artifact-link-status:is([data-status="completed"], [data-status="done"], [data-status="resolved"]) { color: var(--color-status-success-fg); }
.work-surface .pipeline-detail { border-radius: 0; box-shadow: none; border: 0; border-left: 1px solid var(--color-border-subtle); padding: 0 0 0 var(--space-lg); }
.work-surface .pipeline-detail-heading h2 { margin: 0; font-family: var(--type-family-display); font-size: var(--type-heading-size); font-weight: var(--type-display-weight); }
.work-surface .pipeline-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-sm); }
.work-surface .pipeline-toolbar > * { min-width: 0; max-width: 100%; }
.work-surface .pipeline-toolbar [data-create] { margin-left: auto; width: auto; }
.work-surface :is(.pipeline-layout-controls, .work-layout-controls) { display: inline-flex; gap: var(--space-3xs); padding: var(--space-3xs); border-radius: var(--radius-full); background: var(--color-bg-sunken); }
.work-surface .pipeline-layout-controls .btn { border: 0; border-radius: var(--radius-full); background: transparent; box-shadow: none; }
.work-surface :is(.pipeline-layout-controls, .work-layout-controls) [aria-pressed="true"] { background: var(--color-bg-surface); box-shadow: var(--elevation-raised); }
.work-surface .pipeline-board-layout { min-width: 0; }
.work-surface .pipeline-board-layout.pipeline-has-selection { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-lg); }
.work-surface .pipeline-board-layout > * { min-width: 0; }
.work-surface .pipeline-record-list .item-list { padding: 0; margin: 0; }
.work-surface .pipeline-department-board { min-width: 0; }
/* The mocks collapse the reserved rail at 1080px, before rows get cramped. */
@media (max-width: 760px) {
  .work-surface { --space-page-x: calc(var(--space-sm) + var(--space-2xs)); padding-top: calc(var(--shell-height) + var(--space-md) + var(--space-2xs)); }
  .work-surface .collection-find { flex: 1 1 0; order: -2; }
  .work-surface .collection-toolbar-primary { order: -1; }
  .work-surface .action-lens-tabs { flex-wrap: nowrap; }
  .work-surface .action-lens-tabs > :is(button, a) { min-height: var(--control-height-large); }
  .work-surface .collection-toolbar-controls > .action-lens-tabs { flex-basis: auto; }
  .work-surface .pipeline-record-list { padding-inline: 0; }
  .work-surface .page-shell-main { max-width: none; }
  .work-task-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .work-fields { order: -1; border-left: 0; border-block: 1px solid var(--color-border-subtle); padding: var(--space-md) 0; }
  .work-fields dl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .work-surface .work-row { grid-template-columns: minmax(0, 1fr) var(--control-height); gap: var(--space-xs); }
  .work-row > div, .work-row-state { grid-column: 1; }
  .work-row > time { display: none; }
  .work-row > .movement-trigger { grid-column: 2; grid-row: 1; }
  .work-surface .pipeline-board-layout.pipeline-has-selection { display: block; }
  .work-surface .pipeline-has-selection > :is(.pipeline-record-list, .pipeline-boards, .pipeline-list) { display: none; }
  .work-surface .pipeline-detail { border-left: 0; padding: 0; }
}
@media (max-width: 480px) {
  .work-object .page-shell-toggles { flex-wrap: wrap; }
  .work-surface .pipeline-toolbar label { flex: 1 1 100%; }
  .work-surface .pipeline-form-grid { grid-template-columns: minmax(0, 1fr); }
}

.work-surface .pipeline-board-layout.pipeline-has-selection { display: block; }
.work-surface .pipeline-has-selection > :is(.pipeline-record-list, .pipeline-boards, .pipeline-list) { display: none; }
.work-surface .pipeline-has-selection .pipeline-detail { border: 0; padding: 0; }
.work-surface .pipeline-detail-heading h2 { font-size: clamp(calc(var(--type-heading-size) * 1.4), 4vw, calc(var(--type-heading-size) * 1.85)); }
.pipeline-read-detail { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: var(--space-xl); margin-block: var(--space-lg); }
.pipeline-read-detail .work-fields dl { display: grid; gap: var(--space-md); }
.work-surface .pipeline-detail > details[data-pipeline-disclosure="edit"] { margin-block: var(--space-lg); }
.work-surface .plan-lifecycle-form { inset-inline-start: 0; inset-inline-end: auto; }
@media (max-width: 760px) {
  .pipeline-read-detail { grid-template-columns: minmax(0, 1fr); }
  .pipeline-read-detail .work-fields { order: -1; }
  .pipeline-read-detail .work-fields dl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.work-stages li { position: relative; padding-inline-start: var(--space-lg); }
.work-stages li::before { content: ''; position: absolute; left: 0; top: var(--space-lg); width: var(--space-sm); height: var(--space-sm); border: 1px solid var(--color-border-default); border-radius: var(--radius-full); }
.work-stages li[data-status="done"]::before, .work-stages li[data-status="completed"]::before { border-color: var(--color-status-success-fg); background: var(--color-status-success-fg); }
.work-stages li[data-status="active"]::before { border-color: var(--color-text-link); }
.work-unavailable-command { display: grid; gap: var(--space-2xs); font-size: var(--type-small-size); color: var(--color-text-tertiary); }
.work-unavailable-command > .btn { justify-self: end; }
@media (max-width: 640px) {
  .work-object [data-work-history],
  .work-object:not([data-work-type="plan"]) [data-copy-detail-url] { display: none; }
  .work-object .plan-lifecycle-form [data-copy-detail-url] { display: inline-flex; }
}
.work-status-mark.work-for-you { color: var(--color-status-warning-fg); }
.work-status-mark.work-settled { color: var(--color-status-success-fg); }

/* A selected relationship replaces its collection controls, like the object mock. */
.work-surface #pipeline-workspace:has(.pipeline-has-selection) > :is(.action-lens-tabs, .collection-toolbar, .pipeline-toolbar, .action-filter-toolbar, .filter-chip-row, [data-filter-empty]) { display: none; }
/* Relationship rows use the collection row template (collections.css); the
   date column names its role ("Review", "Contacted"), so it is a little wider. */
.collection-page .pipeline-record-list .work-row { grid-template-columns: minmax(0, 1fr) 150px 150px var(--control-height); }
.collection-page .pipeline-record-list-open { padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.collection-page .pipeline-record-list .work-row time { text-align: right; }
.collection-page .pipeline-layout-controls { width: fit-content; }
.collection-page .pipeline-scope { display: grid; gap: var(--space-2xs); font-size: 13px; }
@media (max-width: 760px) {
  .collection-page .pipeline-record-list .work-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .collection-page .pipeline-record-list .work-row time { text-align: left; }
  .collection-page .pipeline-row-no-date { display: none; }
}
.work-surface .pipeline-detail .pipeline-operating-summary { border: 0; }
.work-surface .pipeline-detail-commands { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-lg); }
.work-surface .pipeline-detail:has([data-pipeline-edit]) > details[data-pipeline-disclosure="edit"] > summary { display: none; }
/* The editor leaves the pipeline wrapper while its panel is open. */
.pipeline-notes-panel label { display: grid; gap: var(--space-xs); margin-block: var(--space-sm); }
.pipeline-notes-panel textarea { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; padding: var(--space-sm); border: 1px solid var(--color-border-default); border-radius: var(--radius-sm); background: var(--color-bg-surface); color: var(--color-text-primary); font: inherit; }
.pipeline-notes-panel [data-note] { margin-bottom: var(--space-lg); overflow-wrap: anywhere; }
.pipeline-notes-panel button.quiet-link { border: 0; padding: 0; background: transparent; font: inherit; color: var(--color-text-link); cursor: pointer; }
/* Device setting request state, shown in place of the task commands after a decision. */
.work-device-setting-state { display: inline-flex; align-items: center; gap: var(--space-2xs); max-width: 100%; padding: var(--space-3xs) var(--space-sm); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-full); background: var(--color-bg-sunken); color: var(--color-text-secondary); font-size: var(--type-small-size); line-height: 1.4; overflow-wrap: anywhere; }
.work-device-setting-state::before { content: ""; width: 0.5em; height: 0.5em; flex-shrink: 0; border-radius: 50%; background: currentColor; opacity: 0.7; }
.work-device-setting-state[data-tone="waiting"] { color: var(--color-status-warning-fg); }
.work-device-setting-state[data-tone="success"] { color: var(--color-status-success-fg); }
.work-device-setting-state[data-tone="danger"] { color: var(--color-status-danger-fg); }
.work-object [data-work-command][aria-busy="true"] { cursor: progress; }
/* Ecosystem type (Organizations · Signals), R2e: sits under the tabs, before the toolbar. */
.work-surface .ecosystem-type-row { margin: var(--space-sm) 0; }
.collection-page .ecosystem-signal-list .work-row { grid-template-columns: minmax(0, 1fr) 150px 116px; }
.collection-page .ecosystem-signal-list .work-row time { text-align: right; }
@media (max-width: 760px) {
  .collection-page .ecosystem-signal-list .work-row { grid-template-columns: minmax(0, 1fr); }
  .collection-page .ecosystem-signal-list .work-row > * { grid-column: 1; }
  .collection-page .ecosystem-signal-list .work-row time { text-align: left; }
}

/* Tasks Board: the same read as List, relaid out by task group. Columns sit
   side by side and wrap instead of scrolling sideways; on phone they stack in
   reading order. */
.work-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: var(--space-md); margin-top: var(--space-md); align-items: start; }
.work-board-column { min-width: 0; padding: var(--space-sm); border-radius: var(--radius-surface); background: var(--color-bg-sunken); }
.work-board-column h2 { display: flex; align-items: baseline; gap: var(--space-xs); margin: 0 0 var(--space-sm); font-family: var(--type-family-body); font-size: var(--type-body-size); font-weight: var(--type-heading-weight); }
.work-board-count { color: var(--color-text-tertiary); font-size: var(--type-small-size); font-weight: var(--type-body-weight); }
.work-board-cards { display: grid; gap: var(--space-xs); margin: 0; padding: 0; list-style: none; }
.work-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2xs) var(--space-xs); align-items: start; padding: var(--space-sm); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-md); background: var(--color-bg-surface); min-width: 0; }
.work-card > :not(.movement-trigger) { grid-column: 1; min-width: 0; }
.work-card > .movement-trigger { grid-column: 2; grid-row: 1; }
.work-card .item-name { color: var(--color-text-primary); text-decoration: none; overflow-wrap: anywhere; }
.work-card .item-name:hover { color: var(--color-text-link); }
.work-card > .collection-kind { justify-self: start; font-size: var(--type-small-size); color: var(--color-text-tertiary); }
.work-card .work-row-meta { margin-top: 0; }
.work-card-state { margin: 0; font-size: var(--type-small-size); color: var(--color-text-secondary); overflow-wrap: anywhere; }
.work-card-state.work-for-you { color: var(--color-status-warning-fg); }
.work-board-done { margin-top: var(--space-lg); }
.work-board-done-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); }
.work-board-done-count { color: var(--color-status-success-fg); font-size: var(--type-small-size); }
.work-board-done .work-board-cards { margin-top: var(--space-sm); grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); }
@media (max-width: 640px) {
  .work-board, .work-board-done { --control-height: var(--control-height-large); }
  .work-board, .work-board-done .work-board-cards { grid-template-columns: minmax(0, 1fr); }
  .work-card .item-name, .work-card .work-row-meta a { display: inline-flex; align-items: center; min-height: var(--control-height-large); }
}
/* Plans · Stages (native views W1b): the List row template with a segmented
   stage track in the state column. Leaf done, marine in progress, marine hatch
   blocked, hairline not started; no ember (ember is danger only). */
.work-stages-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-md); margin-top: var(--space-md); padding-bottom: var(--space-xs); border-bottom: 1px solid var(--color-border-subtle); font-size: var(--type-small-size); color: var(--color-text-tertiary); }
.work-stage-legend { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-sm); list-style: none; margin: 0; padding: 0; }
.work-stage-legend li { display: inline-flex; align-items: center; gap: var(--space-2xs); }
.work-stage-swatch { display: inline-block; width: 14px; height: 6px; border-radius: 3px; }
.work-stage-state { min-width: 0; }
.work-stage-track { display: flex; gap: 3px; list-style: none; margin: var(--space-2xs) 0 var(--space-xs); padding: 0; }
.work-stage-seg { flex: 1 1 0; min-width: 4px; }
.work-stage-seg > span, .work-stage-swatch { box-sizing: border-box; }
.work-stage-seg > span { display: block; height: 6px; border-radius: 3px; }
.work-stage-seg[data-stage-state="done"] > span, .work-stage-swatch[data-stage-state="done"] { background: var(--color-status-success-bright); }
.work-stage-seg[data-stage-state="active"] > span, .work-stage-swatch[data-stage-state="active"] { background: var(--color-accent-default); }
.work-stage-seg[data-stage-state="blocked"] > span, .work-stage-swatch[data-stage-state="blocked"] { border: 1px solid var(--color-accent-default); background: repeating-linear-gradient(-45deg, var(--color-accent-default) 0 2px, transparent 2px 4px); }
.work-stage-seg[data-stage-state="pending"] > span, .work-stage-swatch[data-stage-state="pending"] { border: 1px solid var(--color-border-default); }
.work-stage-line, .work-stage-situation { margin: 0; overflow-wrap: anywhere; }
.work-stage-line { color: var(--color-text-secondary); }
.work-stage-situation { margin-top: var(--space-3xs); color: var(--color-text-tertiary); }
.work-stage-situation[data-stage-situation="blocked"] { color: var(--color-accent-default); }
@media (max-width: 760px) {
  /* No ⋯ column on a plan row, so the track takes the full row width. */
  :is(.work-surface, .collection-page) .work-row.work-stages-row { grid-template-columns: minmax(0, 1fr); }
  .work-stages-row > :is(div, .work-row-state, time) { grid-column: 1; }
  .work-stages-row > time { display: block; text-align: left; }
  .work-stages-row .item-name { display: inline-flex; align-items: center; min-height: 44px; }
  .work-stages-row .tag-tap { min-height: 44px; }
  .work-stage-seg > span { height: 8px; }
}
/* Decisions · Record (native views W3): newest first under serif month
   headings; mono date gutter; text as written, clamped to two lines with an
   in-place More. Superseded entries are muted, never ember. */
.work-record-month { margin-top: var(--space-lg); }
.work-record-month h2 { margin: 0; padding-bottom: var(--space-xs); border-bottom: 1px solid var(--color-border-subtle); font-family: var(--type-family-display); font-size: var(--type-heading-size); font-weight: var(--type-display-weight); }
.work-record-list { list-style: none; margin: 0; padding: 0; }
.work-record-entry { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: var(--space-xs) var(--space-md); align-items: baseline; padding: var(--space-md) 0; border-bottom: 1px solid var(--color-border-subtle); }
.work-record-date { font-family: var(--type-family-mono); font-size: var(--type-small-size); color: var(--color-text-tertiary); white-space: nowrap; }
.work-record-main { min-width: 0; }
.work-record-title { font-size: var(--type-body-size); font-weight: var(--type-heading-weight); color: var(--color-text-primary); text-decoration: none; overflow-wrap: anywhere; }
.work-record-title:hover { color: var(--color-text-link); }
.work-record-body { margin: var(--space-2xs) 0 0; color: var(--color-text-secondary); white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.work-record-body.work-record-body-open { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; }
.work-record-more { min-height: var(--control-height); padding: 0; border: 0; background: none; color: var(--color-text-link); font: inherit; font-size: var(--type-small-size); cursor: pointer; }
.work-record-relation { margin: var(--space-2xs) 0 0; font-size: var(--type-small-size); color: var(--color-text-tertiary); overflow-wrap: anywhere; }
.work-record-relation a { color: inherit; }
.work-record-entry[data-superseded] :is(.work-record-title, .work-record-body) { color: var(--color-text-tertiary); }
.work-record-entry[data-superseded] .work-record-title { font-weight: var(--type-body-weight); }
.work-record-toggle { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: var(--control-height); cursor: pointer; }
@media (max-width: 760px) {
  .work-record-entry { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); }
  .work-record-title, .work-record-relation a { display: inline-flex; align-items: center; min-height: 44px; }
  .work-record-more, .work-record-toggle, .work-record-entry .tag-tap { min-height: 44px; }
}

/* Device approvals share this preview on Home review and phone detail. */
.device-setting-preview-fields { display: grid; gap: var(--space-md); }
.device-setting-preview-fields dt { color: var(--color-text-tertiary); font-size: var(--type-small-size); }
.device-setting-preview-fields dd { margin: var(--space-2xs) 0 0; overflow-wrap: anywhere; }
.device-setting-preview-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--space-lg); }
.device-setting-preview-values section { min-width: 0; padding: var(--space-md); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-md); }
.device-setting-preview li, .device-setting-preview p { overflow-wrap: anywhere; }
.device-setting-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.device-setting-preview details { margin-top: var(--space-lg); }

.device-setting-preview-values h3 { font-family: var(--type-family-body); font-size: var(--type-body-size); font-weight: var(--type-heading-weight); margin: 0 0 var(--space-sm); }
