.workflow-pick { margin-bottom: 12px; max-width: 420px; }
.workflow-steps li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.workflow-step-label { flex: 1; min-width: 140px; }
.workflow-jump-btn { flex-shrink: 0; }
.workflow-actions { margin-top: 12px; }


/* v0.21.0 public, search and notification surfaces */
.public-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.public-search { display: grid; grid-template-columns: 1fr minmax(240px, 360px) auto; gap: 12px; align-items: end; }
.search-input { width: 100%; box-sizing: border-box; min-height: 34px; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; }
.search-wide { min-height: 40px; font-size: 14px; }
.public-record-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.block-text { display: block; margin-top: 4px; }
.search-result, .notification-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.search-result h3, .notification-item h3 { margin: 8px 0 4px; }
.notification-body { margin: 0 0 4px; }
.notification-link { position: relative; }
.notification-count { display: inline-flex; min-width: 17px; height: 17px; margin-left: 6px; padding: 0 4px; box-sizing: border-box; align-items: center; justify-content: center; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10px; line-height: 17px; }
.notification-success { color: var(--success); }
@media (max-width: 820px) { .public-grid, .public-record-grid, .public-search { grid-template-columns: 1fr; } .public-search .btn { width: max-content; } .search-result, .notification-item { align-items: flex-start; flex-direction: column; } }

/* Role page navigation and expander alignment */
.nav [data-role-page] { margin-left: 2px; }
.expander-header h3,
.expander-header h4 { flex: 1; min-width: 0; margin-top: 0; margin-bottom: 0; color: var(--accent); }
.org-tickets .expander-header { align-items: center; }

.meeting-records > .expander { margin-top: 12px; }
.meeting-records > .expander:first-child { margin-top: 0; }
.meeting-records .expander-body { overflow-x: auto; }
.org-tickets .expander-header .head-meta { margin-left: auto; }

/* v0.21.0 workflow guidance */
.search-controls { display:grid; grid-template-columns:minmax(0,1fr) 180px; gap:10px; align-items:center; }
.card-subtle { border:1px solid var(--border); border-radius:var(--radius); padding:10px 12px; background:var(--surface); }
.card-subtle > strong + span { margin-left:8px; }
.work-next { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; }
.work-next strong, .assignment-suggest strong { display:block; }
.work-meta, .assignment-meta { display:block; margin-top:3px; }
.assignment-suggest { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:10px 0; }
@media (max-width:820px) { .search-controls { grid-template-columns:1fr; } .work-next, .assignment-suggest { align-items:flex-start; flex-direction:column; } }

/* Network status */
.net-good { color: var(--success) !important; }
.net-warn { color: var(--warning) !important; }
.net-bad { color: var(--danger) !important; }
.badge-resolved { display:inline; padding:0; border:0; border-radius:0; background:transparent; color:var(--success); font-weight:600; line-height:inherit; }
[data-theme="dark"] .badge-resolved { background:transparent; color:var(--success); }
.badge-waiting { display:inline-flex; align-items:center; justify-content:center; min-width:64px; padding:3px 9px; border:1px solid var(--warning); border-radius:999px; background:var(--warning); color:#fff; font-weight:600; line-height:1.2; }
[data-theme="dark"] .badge-waiting { color:#1e1e1e; }

/* Network overview stats */
.network-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.network-detail { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 0; }

/* Staff workflow emphasis */
.work-section .section-title { font-size:18px; padding:12px 14px; border-width:2px; }
.work-section .section-title .badge { font-size:12px; }
.ops-stats .stat strong { font-size:24px; }

/* v0.21.0 staff workflow phases + detail tabs */
.phase-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}
.phase-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.phase-step:hover { border-color: var(--accent); color: var(--text); }
.phase-step.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  color: var(--text);
  font-weight: 600;
}
.phase-step.done { color: var(--success); border-color: var(--success); }
.phase-mark { font-size: 12px; line-height: 1; }
.phase-label { font-size: 13px; }
.phase-count { font-size: 11px; opacity: 0.8; }
.workflow-next { margin-bottom: 10px; }
.workflow-phase-steps { margin-top: 4px; }

.detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.detail-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius);
  cursor: pointer;
}
.detail-tab:hover { color: var(--text); background: var(--bg); }
.detail-tab.active {
  color: var(--text);
  font-weight: 600;
  border-color: var(--border);
  background: var(--surface);
}
.detail-panels { min-height: 120px; }
.detail-panel[hidden] { display: none !important; }
.detail-panel.active { display: block; }

@media (max-width: 720px) {
  .phase-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* v0.21.0 workflow/mobile state polish */
.state-panel { display:flex; flex-direction:column; gap:4px; margin:10px 0; }
.state-error { border-color: var(--danger); }

.work-stats .stat { min-width: 0; overflow: hidden; }
.work-stats .stat span { display:block; overflow-wrap:anywhere; }

@media (max-width: 700px) {
  .main { padding:16px; }
  .header { padding:8px 12px; gap:6px 10px; }
  .nav { overflow-x:auto; flex-wrap:nowrap; }
  .nav a { flex:0 0 auto; }
  .work-grid { grid-template-columns:1fr; }
  .work-next { gap:8px; }
  .work-next .btn { width:max-content; }
  .ticket-views { align-items:stretch; }
  .ticket-views .search-input { flex:1 1 100%; }
  .ticket-views .btn { flex:0 0 auto; }
  .cal-toolbar { gap:8px; }
  .cal-grid { gap:2px; }
  .cal-cell { min-height:60px; padding:4px; }
}
@media (max-width: 420px) {
  .main { padding:12px; }
  .page-head { padding:12px 14px; margin-bottom:16px; }
  .page-head .page-title, .page-title { font-size:18px; }
  .work-stats .stat { padding:8px 6px; }
  .work-stats .stat strong { font-size:20px; }
  .work-stats .stat span { font-size:10px; line-height:1.2; }
  .network-stats .stat { padding:8px 6px; }
  .network-stats .stat span { font-size:10px; line-height:1.2; }
  .btn { max-width:100%; }
  .detail-tabs { overflow-x:auto; flex-wrap:nowrap; }
  .detail-tab { flex:0 0 auto; }
}




/* Global rhythm */
html, body { line-height: 1.45; }


.page-head,
.card,
.expander {
  width: 100%;
}


.page-head .page-title { margin-bottom: 0; }
.page-head .page-desc { margin-bottom: 0; line-height: 1.5; }


.card:last-child { margin-bottom: 0; }

/* Shared headings and metadata */
.section-title,
.section-title-sm {
  line-height: 1.35;
}

.section-title { margin: var(--space-4) 0 var(--space-2); }
.section-title:first-child { margin-top: 0; }
.section-title-sm { margin: 0 0 var(--space-2); }

.settings-card-title {
  line-height: 1.35;
  margin-bottom: var(--space-2);
}

.settings-desc,
.section-lead,
.section-lead-block,
.section-lead-tight,
.page-note,
.meta-line,
.form-hint,
.status-msg {
  line-height: 1.5;
}

/* Header controls share one visual height */


.nav a,
.role-btn,
.btn,
.org-select,
#theme-toggle {
  min-height: var(--control-h);
}

.nav a,
.role-btn {
  display: inline-flex;
  align-items: center;
}


.role-btn {
  padding: 0 12px;
  justify-content: center;
}


.btn {
  min-height: var(--control-h);
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}



/* Header controls use one shared height, including compact buttons and icon controls. */
.header .nav a,
.header-right .btn,
.header-right .btn-sm,
.header-right .role-btn,
.header-right .org-select,
.header-right #theme-toggle {
  height: var(--control-h);
  min-height: var(--control-h);
  box-sizing: border-box;
}

.header-right .org-select {
  padding-top: 0;
  padding-bottom: 0;
}

/* Shared control geometry */
.form-row { margin-bottom: var(--space-3); }
.form-row:last-child { margin-bottom: 0; }

.form-row input,
.form-row textarea,
.form-row select,
.search-input {
  line-height: 1.35;
}

.form-row input,
.form-row select {
  min-height: var(--control-h);
}

.form-row textarea { line-height: 1.45; }

.toolbar {
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.toolbar:last-child { margin-bottom: 0; }

.toolbar-end { gap: var(--space-2); }

/* Expanders use the same panel rhythm everywhere */
.expander {
  margin-bottom: var(--content-gap);
}

.expander-header {
  min-height: 46px;
  padding: var(--space-2) var(--space-4);
  gap: var(--space-2);
}

.expander-header h3 {
  line-height: 1.35;
  color: var(--accent);
}

.expander > .expander-body {
  padding: var(--space-4);
}

.expander-body > :first-child { margin-top: 0; }
.expander-body > :last-child { margin-bottom: 0; }

.work-empty,
.cal-empty,
.status-msg {
  line-height: 1.5;
}

.work-item + .work-item { margin-top: var(--space-3); }
.work-empty + .work-empty { margin-top: var(--space-4); }

/* Consistent card grids */
.public-grid,
.public-record-grid,
.work-grid {
  gap: var(--content-gap);
}

.stats-grid { gap: var(--space-3); }

/* Content stacks own the vertical rhythm; children do not need arbitrary gaps. */
.content-stack > .card,
.content-stack > .expander,
#meetings-list > .expander {
  margin-bottom: var(--content-gap);
}

.content-stack > :last-child,
#meetings-list > :last-child { margin-bottom: 0; }

/* Common action/status rows */
.row-between {
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

/* Responsive spacing */
@media (max-width: 700px) {
  .main { padding: var(--space-4); }
  .page-head { padding: var(--space-3) var(--space-4); }
  .card { padding: var(--space-3); }
  .expander > .expander-body { padding: var(--space-3); }
}

@media (max-width: 520px) {
  .header { padding: var(--space-2) var(--space-3); }
  .main { padding: var(--space-3); }
  .page-head { margin-bottom: var(--space-3); }
  .btn,
  .btn-sm { max-width: 100%; }
}


/* v0.21.0 uniform layout rules */
.stat { text-align: center; align-items: center; justify-content: center; }
.stat strong, .stat span { text-align: center; }
.toolbar.toolbar-end { display: flex; align-items: flex-start; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-2); }
.badge-waiting, .badge-closed { display: inline-flex; width: 84px; height: 28px; min-width: 84px; min-height: 28px; box-sizing: border-box; align-items: center; justify-content: center; padding: 0; text-align: center; white-space: nowrap; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1; }

/* Search filters and favorites */
.search-filters { display:grid; grid-template-columns:minmax(150px,1fr) minmax(150px,1fr) auto auto; gap:10px; align-items:end; margin-top:12px; }
.search-filters label { display:grid; gap:4px; font-size:13px; }
.search-saved-list { display:grid; gap:8px; margin-top:12px; }
.search-saved { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:8px 10px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); }
.search-saved > div:first-child { display:grid; gap:3px; min-width:0; }
@media (max-width:820px) { .search-filters { grid-template-columns:1fr 1fr; } .search-filters .btn { width:max-content; } .search-saved { align-items:flex-start; flex-direction:column; } }

/* Keep standard checkboxes at native size with their labels inline. */
.form-row > .att-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.form-row > .att-label > input[type="checkbox"] {
  width: auto;
  height: auto;
  margin: 0;
  flex: 0 0 auto;
  transform: none;
}

/* v0.21.0 compact ticket handoff workflow */
.ticket-handoff-compact,
.ticket-handoff-history,
.ticket-handoff-request { margin:10px 0; }
/*
 * The disclosure rows inside a ticket read as one column.
 *
 * "Related tickets 0" put its count inline immediately after the label, so the
 * number sat wherever the text happened to end -- anchored to nothing, and
 * visibly adrift from the rows above and below it as they opened and closed.
 * The count is now pinned to the right edge, which is a fixed position
 * regardless of label length or what is expanded above it.
 *
 * display:flex drops the native disclosure triangle, so the rows carry their
 * own chevron -- losing the marker would take the affordance that these open
 * at all. Same trap the notification panel's <details> hit from the other
 * direction: styling a <details> means owning what the browser stops drawing.
 */
.ticket-links > summary,
.ticket-activity > summary,
.ticket-history > summary,
.ticket-handoff-request > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}
.ticket-links > summary::-webkit-details-marker,
.ticket-activity > summary::-webkit-details-marker,
.ticket-history > summary::-webkit-details-marker,
.ticket-handoff-request > summary::-webkit-details-marker { display: none; }
.ticket-links > summary::before,
.ticket-activity > summary::before,
.ticket-history > summary::before,
.ticket-handoff-request > summary::before {
  content: "▸";
  display: inline-block;
  font-size: .8em;
  opacity: .7;
  transition: transform .15s ease;
}
.ticket-links[open] > summary::before,
.ticket-activity[open] > summary::before,
.ticket-history[open] > summary::before,
.ticket-handoff-request[open] > summary::before { transform: rotate(90deg); }
.ticket-links > summary .badge { margin-left: auto; }
.ticket-handoff-row { display:grid; grid-template-columns:auto auto 1fr; align-items:center; gap:8px 12px; padding:8px 10px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); }
.ticket-handoff-row .handoff-actions { display:flex; justify-content:flex-end; align-items:center; gap:6px; flex-wrap:wrap; }
.handoff-quick-row { display:grid; grid-template-columns:minmax(130px,1fr) 110px auto; gap:8px; align-items:center; }
.handoff-context { margin-top:7px; }
.handoff-context summary { font-size:12px; }
.handoff-context .card-subtle { margin-top:6px; }
/* Stack the context controls to one width. .reply-input is flex:1, sized for a
   flex toolbar, so inside this block-layout <details> the textareas fell back to
   their intrinsic size and did not line up with the selects and inputs. */
.handoff-context > select,
.handoff-context > input,
.handoff-context > textarea { display:block; width:100%; box-sizing:border-box; margin-top:6px; flex:none; min-width:0; }
.handoff-context > textarea { resize:vertical; padding:7px 10px; font:inherit; line-height:1.4; }
/* The button used to be a 4th child of the 3-column .handoff-quick-row grid, so
   it stretched to a full 1fr cell. Own row, intrinsic width, normal padding. */
.handoff-submit { margin-top:8px; }
.handoff-submit .btn { width:auto; padding:0 14px; }
.ticket-handoff-history { padding:5px 2px; }
/* Matches .ticket-priority directly above it: label, control and button sit
   together on the left. justify-content:flex-end plus margin-right:auto on the
   label pushed the two ends of the row apart across the whole panel. */
.assignment-admin { margin:8px 0; align-items:center; gap:8px; }
.ticket-handoff-request > .card-subtle { padding:8px; }
@media (max-width:820px) {
  .ticket-handoff-row { grid-template-columns:1fr; align-items:flex-start; }
  .ticket-handoff-row .handoff-actions { justify-content:flex-start; }
  .handoff-quick-row { grid-template-columns:1fr; }
  .assignment-admin { align-items:flex-start; flex-wrap:wrap; }
  .assignment-admin .muted { width:100%; }
}

/* Shared UI states */
.state-empty,
.state-loading,
.state-success,
.state-warning,
.state-error {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-h);
  line-height: var(--line-height);
}
.state-empty { color: var(--text-muted); }
.state-loading { color: var(--text-muted); }
.state-success { color: var(--success); }
.state-warning { color: var(--warning); }
.state-error { color: var(--danger); }

/* v0.21.0 live meeting workspace */
.live-meeting-shell { padding: 16px; }
.live-meeting-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:12px; }
.live-clock { font-variant-numeric: tabular-nums; font-weight:700; margin-top:4px; text-align:right; }
.live-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:12px 0; }
.live-stats > div { padding:10px; border:1px solid var(--border); border-radius:8px; text-align:center; }
.live-stats strong,.live-stats span { display:block; }
.live-stats strong { font-size:1.15rem; }
.live-stats span { font-size:.78rem; color:var(--muted); }
.live-current { display:flex; flex-direction:column; gap:3px; margin:12px 0; }
.live-preflight .workflow-steps li { display:flex; gap:8px; align-items:baseline; }
.live-preflight .workflow-steps li > span { margin-left:auto; }
@media (max-width:700px){ .live-stats{grid-template-columns:repeat(2,minmax(0,1fr));} .live-meeting-header{flex-direction:column;} }

/* Tabs a meeting has not reached yet are greyed rather than removed: a tab
   that disappears and returns is disorienting, and the greyed sequence shows
   the order the meeting will follow. */
.detail-tab-unavailable { opacity: .45; cursor: not-allowed; }
.detail-tab-unavailable:hover { background: inherit; }
/* An optional step answered with "None this meeting" is settled, not done --
   muted, but never struck through the way a completed step is. */
.workflow-step-skipped .workflow-step-label { opacity: .7; }
.workflow-optional-btn { margin-left: 6px; }
/* The workflow guide is a collapsible expander now. It sits directly above the
   work sections, which had no separation from it at all -- the guide's border
   ran straight into the next card. */
.workflow-guide-expander { margin-bottom: 16px; }
.workflow-guide-expander > .expander-header .head-meta { white-space: normal; }
.workflow-guide-step{display:flex;align-items:center;gap:12px;justify-content:space-between;margin-bottom:8px}.workflow-guide-step>div{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}.workflow-guide-grid{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:760px){.workflow-guide-grid{grid-template-columns:1fr}}


/* v0.21.0 meeting detail navigation: one tab set, contextual records. */
#meet-detail .detail-tabs { position: sticky; top: 0; z-index: 3; background: var(--surface); padding-top: 8px; }
#meet-detail .detail-tab { min-width: 86px; text-align: center; }
.detail-records-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:14px; padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius); background:var(--bg); }
.detail-records-head .muted { font-size:12px; }


/* v0.21.0 BC meeting setup + document preview */
.meeting-file-preview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-top:10px}.meeting-file-preview-card{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);overflow:hidden}.meeting-file-preview-head{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:8px 10px;border-bottom:1px solid var(--border);font-size:.82rem}.meeting-file-preview-image{display:block;width:100%;height:180px;object-fit:contain;background:var(--bg)}.meeting-file-preview-frame{display:block;width:100%;height:220px;border:0;background:var(--bg)}


/* v0.21.0 accessibility/release baseline */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
@media (max-width: 640px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .header { gap: 8px; }
  .header-right { min-width: 0; }
  .toolbar { flex-wrap: wrap; }
  .toolbar > * { max-width: 100%; }
  table { min-width: 0; }
}

.work-stats .stat-link { display:flex; text-decoration:none; color:inherit; cursor:pointer; }
.work-stats .stat-link:hover { border-color:var(--accent); transform:translateY(-1px); }

/* work-grid 2-col force */
.work-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: var(--content-gap, 12px);
}
@media (max-width: 700px) {
  .work-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Stat links: no underline on numbers or labels */
a.stat, a.stat.stat-link, a.stat.stat-success, a.stat.stat-warning, a.stat.stat-error, .stat-link {
  text-decoration: none !important;
  color: inherit;
}
a.stat:hover, a.stat.stat-link:hover, .stat-link:hover { text-decoration: none !important; }
a.stat strong, a.stat span, .stat-link strong, .stat-link span { text-decoration: none !important; }

/* My Work / meeting detail layout containment */
.main > .expander {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.detail-panels {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.detail-tab-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  box-sizing: border-box;
}
.detail-tab-nav.toolbar {
  margin-bottom: 0;
}
.meet-detail .expander-body,
#meet-detail > .expander-body {
  overflow: visible;
}

/* Platform My Work inbox */
.work-notify {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.work-notify-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.work-notify-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.work-notify-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg, transparent);
  color: inherit;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
}
.work-notify-item:hover { border-color: var(--accent); }
.work-notify-empty { margin-bottom: 12px; }
.work-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.work-next .work-meta { display: block; margin-top: 2px; }

/* Notification action cluster: Open + dismiss (×). */
.notification-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.notification-dismiss {
  min-width: 32px;
  padding: 2px 8px;
  font-size: 1.1rem;
  line-height: 1;
  /* Distinct from the primary Open action next to it: subdued by default,
     lit up on hover so the destructive intent is legible. */
  opacity: .7;
}
.notification-dismiss:hover { opacity: 1; }
@media (max-width: 820px) { .notification-actions { width: 100%; justify-content: flex-end; } }

/* Priority tiers. Same border treatment as .stat-error / .stat-warning on the
   ops dashboard, so severity reads the same way in both places. Backlog items
   keep the plain card -- three loud tiers would be one flat list again. */
.notification-item.notification-now {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
  border-left: 3px solid var(--danger);
}
.notification-item.notification-soon {
  border-color: color-mix(in srgb, var(--warning) 35%, var(--border));
  border-left: 3px solid var(--warning);
}
.notification-item.notification-now h3 { color: var(--danger); }
.notification-item.notification-soon h3 { color: var(--warning); }

/* Recently dismissed sits below the live list and stays quiet -- it is an undo
   affordance, not a competing feed. */
.notification-recent { margin-top: 12px; }
.notification-recent > summary { cursor: pointer; list-style: none; }
.notification-recent > summary::-webkit-details-marker { display: none; }
.notification-recent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
@media (max-width: 820px) {
  .notification-recent-row { align-items: flex-start; flex-direction: column; }
}

/* Bulk dismiss sits above the list, right-aligned so it reads as a control for
   the list rather than as another notification. */
.notification-bulk { display: flex; justify-content: flex-end; margin-bottom: 4px; }

/* The tier's text label. Colour alone cannot carry the distinction -- see the
   note at the tier badge in notifications.js. */
.notification-tier {
  display: inline-block;
  margin: 0;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.notification-tier.tier-now {
  background: color-mix(in srgb, var(--danger) 18%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border));
  color: var(--danger);
}
.notification-tier.tier-soon {
  background: color-mix(in srgb, var(--warning) 18%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--warning) 45%, var(--border));
  color: var(--warning);
}
