/* Operational Radar design system (UI spec Section 1).
   Calm executive feel, generous white space, severity color coding. */
:root {
  --critical: #E53935;
  --high: #FB8C00;
  --medium: #FDD835;
  --positive: #2E7D32;
  --info: #1E88E5;
  --neutral: #607D8B;
  --bg: #F5F7FA;
  --sidebar: #0f2744;
  --sidebar-light: #1c3d63;
  --paper: #ffffff;
  --ink: #1a1a1a;
  --muted: #5b6675;
  --line: #d9dee6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

h1 { font-size: 28px; font-weight: 700; margin: 0; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 0.75rem; color: var(--sidebar); }
h3 { font-size: 14px; font-weight: 600; margin: 0.75rem 0 0.4rem; color: var(--sidebar); }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
.muted { color: var(--muted); font-size: 12.5px; }

/* Shell: sidebar + main */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  font-weight: 700;
  font-size: 15px;
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid var(--sidebar-light);
}
.brand-mark { color: var(--info); }
.sidebar nav { flex: 1; padding: 0.75rem 0; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #c9d4e3;
  padding: 0.55rem 1rem;
  font-size: 13.5px;
}
.sidebar nav a:hover { background: var(--sidebar-light); text-decoration: none; }
.sidebar nav a.active {
  background: var(--sidebar-light);
  color: #fff;
  border-left: 3px solid var(--info);
  padding-left: calc(1rem - 3px);
}
.nav-badge {
  background: var(--critical);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9px;
  padding: 0 7px;
  margin-left: auto;
}
.user-block {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--sidebar-light);
}
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--info);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; flex: 1; }
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: #9fb0c6; text-transform: capitalize; }
.link-btn {
  background: none; border: none; color: #9fb0c6; cursor: pointer;
  font-size: 16px;
}
.link-btn:hover { color: #fff; }

.main {
  flex: 1;
  min-width: 0;
  padding: 1.5rem 2rem 3rem;
  max-width: 1200px;
}

/* Page head */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.date-line { color: var(--muted); margin: 0.25rem 0 0; }
.breadcrumb { font-size: 12.5px; color: var(--muted); margin: 0 0 0.25rem; }
.head-actions { display: flex; gap: 0.5rem; }
.lede { font-size: 15px; }

/* Buttons */
.btn {
  display: inline-block;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn-primary { background: var(--info); color: #fff; }
.btn-secondary { background: var(--paper); color: var(--info); border-color: var(--info); }
.btn-danger { background: var(--paper); color: var(--critical); border-color: var(--critical); }
.btn-small { padding: 0.25rem 0.6rem; font-size: 12px; }

/* Panels and grids */
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 2px rgba(15, 39, 68, 0.05);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.5rem;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.three-col { display: grid; grid-template-columns: 1.2fr 0.9fr 0.9fr; gap: 1.25rem; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

/* Stat tiles */
.stat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem 1rem;
}
.stat-value { font-size: 26px; font-weight: 700; display: block; }
.stat-label { color: var(--muted); font-size: 12px; }
.tile-critical .stat-value { color: var(--critical); }
.tile-high .stat-value { color: var(--high); }
.tile-medium .stat-value { color: #8a6d00; }

/* Tabs */
.tabs { display: flex; gap: 0.25rem; }
.tab {
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.tab:hover { text-decoration: none; background: var(--bg); }
.tab-active { background: var(--sidebar); color: #fff; }

/* Attention item rows */
.item-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
.item-row:first-of-type { border-top: none; }
.item-row:hover { background: var(--bg); text-decoration: none; }
.sev { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.sev-critical { background: var(--critical); }
.sev-high { background: var(--high); }
.sev-medium { background: var(--medium); }
.sev-low { background: var(--positive); }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-title { font-weight: 600; overflow-wrap: anywhere; }
.item-sub {
  color: var(--muted); font-size: 12.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.closed-item-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 0.3rem;
  overflow-wrap: anywhere;
}
.item-row-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.evidence-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.chev { color: var(--muted); font-size: 18px; }

/* Badges and chips */
.badge {
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
}
.badge-critical { background: var(--critical); }
.badge-high { background: var(--high); }
.badge-medium { background: var(--medium); color: var(--ink); }
.badge-low { background: var(--positive); }
.chip {
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.chip-confirmed, .chip-potential, .chip-assigned, .chip-monitoring,
.chip-resolved, .chip-verified, .chip-closed, .chip-dismissed,
.chip-unowned, .chip-planned, .chip-status-done, .chip-status-pending,
.chip-status-processing, .chip-status-failed {
  border-color: var(--line);
  color: var(--muted);
  background: var(--bg);
}
.basis-adjudicated, .basis-uncontested, .basis-disputed {
  border-color: var(--line);
  color: var(--muted);
  background: var(--bg);
}
.person-chip {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.crit-badge {
  display: inline-block;
  min-width: 22px;
  text-align: center;
  border-radius: 4px;
  font-weight: 700;
  color: #fff;
  padding: 0.05rem 0.4rem;
  background: var(--neutral);
}
.crit-5, .crit-4 { background: var(--critical); }
.crit-3 { background: var(--high); }
.crit-2 { background: var(--medium); color: var(--ink); }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  border-bottom: 2px solid var(--line);
}
.table td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:hover { background: var(--bg); }

/* Forms */
.stack-form label { display: block; font-weight: 600; margin: 0.75rem 0 0.25rem; }
.stack-form label .muted { font-weight: 400; }
.stack-form input[type="text"], .stack-form input[type="date"],
.stack-form input[type="file"], .stack-form select, .stack-form textarea {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  background: #fff;
}
.stack-form button { margin-top: 0.9rem; }
.ruling-form { max-width: 620px; }

/* Alerts */
.alert {
  border-radius: 6px;
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
.alert-critical { background: #fdecea; color: var(--critical); border: 1px solid var(--critical); }
.alert-info { background: #e8f1fb; color: var(--info); border: 1px solid var(--info); }
.error { color: var(--critical); font-weight: 600; }

/* Evidence chips */
.evidence-chip {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0;
  background: var(--bg);
}
.evidence-chip summary { cursor: pointer; font-size: 13px; }
.evidence-chip blockquote {
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  background: var(--paper);
  border-left: 3px solid var(--info);
  font-style: italic;
}
.email-evidence-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  margin: 0.75rem 0;
  background: var(--bg);
  overflow-wrap: anywhere;
}
.email-evidence-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.email-evidence-head > div { min-width: 0; }
.email-evidence-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1rem;
  margin: 1rem 0;
}
.email-evidence-fields div { min-width: 0; }
.email-evidence-fields dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.email-evidence-fields dd { margin: 0; overflow-wrap: anywhere; }
.email-evidence-snippet {
  margin: 0.75rem 0;
  padding: 0.65rem 0.75rem;
  border-left: 3px solid var(--info);
  background: var(--paper);
  white-space: pre-wrap;
}

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  display: flex;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-left: 2px solid var(--line);
  margin-left: 6px;
  padding-left: 1rem;
  position: relative;
}
.timeline-dot {
  position: absolute;
  left: -7px;
  top: 0.9rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--neutral);
  border: 2px solid var(--paper);
}
.dot-confirmed, .dot-event-contradiction_detected { background: var(--critical); }
.dot-potential { background: var(--high); }
.dot-assigned, .dot-event-claim_extracted { background: var(--info); }
.dot-resolved, .dot-verified, .dot-event-ruling_issued,
.dot-event-truth_changed { background: var(--positive); }

/* Donuts (ruling D1: inline SVG, no chart library) */
.donut-panel h3 { margin-top: 0; }
.donut-wrap { display: flex; align-items: center; gap: 0.75rem; }
.donut { width: 96px; height: 96px; flex-shrink: 0; }
.legend { list-style: none; padding: 0; margin: 0; font-size: 12px; }
.legend .dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-right: 5px;
}
.big-number { font-size: 30px; font-weight: 700; margin: 0.25rem 0; }

/* Misc */
.pilot-status {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) repeat(2, minmax(150px, 1fr)) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--info);
  border-radius: 6px;
  background: var(--paper);
  font-size: 13px;
}
.pilot-label { display: block; color: var(--muted); margin-bottom: 0.2rem; }
.pilot-label-row { display: flex; align-items: center; gap: 0.35rem; }
.pilot-label-row .pilot-label { margin-bottom: 0; }
.sync-help { position: relative; }
.sync-help summary {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: var(--bg);
  cursor: help;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  list-style: none;
}
.sync-help summary::-webkit-details-marker { display: none; }
.sync-help summary:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}
.sync-help-text {
  display: none;
  position: absolute;
  z-index: 5;
  top: calc(100% + 0.4rem);
  left: 0;
  width: min(260px, calc(100vw - 3rem));
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 4px 12px rgba(15, 39, 68, 0.15);
  color: var(--ink);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}
.sync-help[open] .sync-help-text,
.sync-help:hover .sync-help-text,
.sync-help:focus-within .sync-help-text { display: block; }
.sync-result-succeeded { color: var(--positive); }
.sync-result-failed { color: var(--critical); }
.sync-result-running, .sync-result-skipped { color: var(--high); }
.pilot-sync-summary { grid-column: 1 / -1; color: var(--muted); }
.pilot-sync-notice {
  margin: -0.4rem 0 1rem;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 900px) {
  .pilot-status { grid-template-columns: 1fr 1fr; }
}

.empty-state { color: var(--muted); padding: 1rem 0.5rem; }
.footer-note { color: var(--muted); margin-top: 1.5rem; font-size: 12.5px; }
.five-questions { padding-left: 1.25rem; }
.five-questions li { margin-bottom: 0.8rem; }
.checklist { padding-left: 1.1rem; }
.checklist li { margin-bottom: 0.3rem; }
.claim-value { font-size: 20px; font-weight: 700; margin: 0.25rem 0; }
.claim-panel blockquote {
  margin: 0.5rem 0;
  padding: 0.6rem 0.8rem;
  background: var(--bg);
  border-left: 3px solid var(--info);
  font-style: italic;
}
.missing-expectation { font-weight: 600; color: var(--high); }
.raw-content {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  max-height: 420px;
  overflow-y: auto;
}
.brief-entry { border-top: 1px solid var(--line); padding: 0.75rem 0; }
.brief-entry:first-of-type { border-top: none; }
.brief-headline { font-weight: 700; margin: 0 0 0.25rem; }
.brief-action { color: var(--info); font-weight: 600; }

/* Login (standalone) */
.login-card {
  max-width: 360px;
  margin: 4rem auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--sidebar);
  border-radius: 8px;
  padding: 2rem;
}
.login-card h1 { font-size: 22px; margin: 0 0 0.25rem; }
.tagline { color: var(--muted); margin-top: 0; }
.login-card label { display: block; margin: 1rem 0 0.25rem; font-weight: 600; }
.login-card input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.login-card button {
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.6rem;
  background: var(--info);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 1.5rem; }

/* Responsive (ruling D7) */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .sidebar nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.35rem;
    scrollbar-width: thin;
  }
  .sidebar nav a { flex: 0 0 auto; padding: 0.5rem 0.65rem; }
  .sidebar nav a.active { border-left: 0; border-bottom: 3px solid var(--info); padding-left: 0.65rem; }
  .brand { padding: 0.8rem 1rem; }
  .user-block { padding: 0.55rem 1rem; }
  .two-col, .three-col, .summary-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .main { padding: 1rem; }
  .panel-head, .page-head { flex-wrap: wrap; }
  .tabs { flex-wrap: wrap; }
  .item-row { flex-wrap: wrap; align-items: flex-start; }
  .item-main { flex-basis: calc(100% - 2rem); }
  .item-row-steward { flex-wrap: nowrap; }
  .item-row-steward .item-main { flex-basis: auto; }
  .item-row-steward .chev { flex: 0 0 auto; }
  .item-sub { white-space: normal; overflow: visible; }
  .table { display: block; max-width: 100%; overflow-x: auto; }
}

@media (max-width: 600px) {
  h1 { font-size: 23px; overflow-wrap: anywhere; }
  .main { padding: 0.75rem; }
  .panel { padding: 0.85rem; margin-bottom: 1rem; }
  .pilot-status { grid-template-columns: 1fr; }
  .pilot-status form, .pilot-status .btn { width: 100%; }
  .head-actions, .head-actions form, .head-actions .btn { width: 100%; }
  .stat-row { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .email-evidence-head { flex-direction: column; }
  .email-evidence-head .btn { width: 100%; text-align: center; }
  .email-evidence-fields { grid-template-columns: 1fr; }
  .mailbox-table, .mailbox-table tbody, .mailbox-table tr,
  .mailbox-table td { display: block; width: 100%; }
  .mailbox-table { overflow: visible; }
  .mailbox-table tr {
    border: 1px solid var(--line);
    border-radius: 6px;
    margin-bottom: 0.75rem;
    padding: 0.4rem;
  }
  .mailbox-table td { border-bottom: 0; overflow-wrap: anywhere; }
  .mailbox-table .noc-right { text-align: left; }
  .inline-form { display: block; margin: 0.35rem 0; }
  .inline-form .btn { width: 100%; }
  .stack-form { flex-direction: column; }
  .stack-form input, .stack-form select, .stack-form button { width: 100%; }
}

/* NOC dashboard */
.noc-strip { display: flex; gap: 1rem; margin-bottom: 1.5rem; align-items: stretch; }
.noc-score {
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
  padding: 0.9rem 1.4rem; display: flex; flex-direction: column;
  align-items: center; justify-content: center; min-width: 150px;
}
.noc-score-value { font-size: 40px; font-weight: 700; line-height: 1.1; }
.noc-score-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.noc-score-band { font-size: 11px; font-weight: 700; margin-top: 2px; }
.noc-healthy .noc-score-value, .noc-healthy .noc-score-band { color: var(--positive); }
.noc-degraded .noc-score-value, .noc-degraded .noc-score-band { color: var(--high); }
.noc-at-risk .noc-score-value, .noc-at-risk .noc-score-band { color: var(--critical); }
.noc-tiles { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.6rem; flex: 1; }
.noc-tile {
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0.5rem 0.25rem; color: var(--ink);
}
.noc-tile:hover { text-decoration: none; border-color: var(--info); }
.noc-value { font-size: 22px; font-weight: 700; }
.noc-label { font-size: 11px; color: var(--muted); text-align: center; }
.noc-alert .noc-value { color: var(--critical); }
.noc-warn .noc-value { color: var(--high); }
.noc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.noc-span2 { grid-column: span 2; }
.noc-table { width: 100%; border-collapse: collapse; }
.noc-table td { padding: 0.35rem 0.25rem; border-bottom: 1px solid var(--line); font-size: 13px; }
.noc-table tr:last-child td { border-bottom: none; }
.noc-right { text-align: right; }
.noc-event { display: flex; gap: 0.75rem; padding: 0.35rem 0; color: var(--ink); font-size: 13px; }
.noc-event:hover { text-decoration: none; color: var(--info); }
.noc-date { color: var(--muted); flex-shrink: 0; }
.noc-overdue .noc-date { color: var(--critical); font-weight: 700; }
.noc-trend { display: flex; align-items: flex-end; gap: 3px; height: 64px; margin: 0.25rem 0 0.5rem; }
.noc-bar-wrap { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.noc-bar { width: 100%; background: var(--info); border-radius: 2px 2px 0 0; min-height: 2px; }
.chip-aging, .chip-svc-critical, .chip-svc-high, .chip-svc-medium,
.chip-svc-low, .chip-conn-active, .chip-conn-planned,
.chip-conn-not_configured, .chip-conn-error {
  border-color: var(--line);
  color: var(--muted);
  background: var(--bg);
}
.chip-aging { font-weight: 700; }
.error { color: var(--critical); }

/* Detector packs and business-language chips */
.pack-row { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.45rem 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.pack-row:last-of-type { border-bottom: none; }
.pack-row input { margin-top: 3px; }
.chip-area, .chip-conf-high, .chip-conf-medium, .chip-conf-low {
  border-color: var(--line);
  color: var(--muted);
  background: var(--bg);
}

/* Mailbox administration */
.inline-form { display: inline-block; margin: 0 0 0.25rem 0.25rem; }
.stack-form { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.4rem 0; }
.stack-form input, .stack-form select {
  padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 6px;
  font-size: 13px;
}
.mailbox-removal-note {
  display: block;
  max-width: 260px;
  margin: 0.35rem 0 0 auto;
}
[data-mailbox-sync-form][aria-busy="true"] { min-width: 260px; }
.mailbox-sync-progress { margin-top: 0.4rem; text-align: left; }
.mailbox-sync-bar {
  display: block; position: relative; overflow: hidden; height: 3px;
  margin-bottom: 0.35rem; border-radius: 2px; background: var(--line);
}
.mailbox-sync-bar::after {
  content: ""; position: absolute; inset: 0 auto 0 -35%; width: 35%;
  background: var(--info); animation: mailbox-sync 1.1s ease-in-out infinite;
}
.mailbox-sync-status { display: block; color: var(--muted); font-size: 12px; }
@keyframes mailbox-sync { to { left: 135%; } }
@media (prefers-reduced-motion: reduce) {
  .mailbox-sync-bar::after { animation-duration: 2.5s; }
}

@media (max-width: 600px) {
  .mailbox-actions { display: grid; gap: 0.35rem; }
  .mailbox-removal-note { max-width: none; margin-left: 0; }
}

/* Today's Attention decision brief */
.decision-opening {
  margin: 1rem 0; padding: 1.25rem; border: 1px solid var(--line);
  border-radius: 10px; background: var(--panel);
}
.decision-opening h2 { margin: 0.25rem 0; font-size: 24px; }
.decision-opening p { margin: 0.35rem 0 0.75rem; max-width: 760px; }
.decision-metrics { display: flex; flex-wrap: wrap; gap: 0.6rem 1.25rem; }
.decision-metrics span { color: var(--muted); font-size: 13px; }
.decision-list { display: grid; gap: 0.8rem; }
.secondary-priorities {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem;
}
.decision-card {
  padding: 1rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel);
}
.decision-card-featured {
  padding: 1.2rem; border-left: 3px solid var(--sidebar);
}
.decision-card-secondary { padding: 0.85rem; }
.decision-card-secondary .decision-card-head h2 { font-size: 17px; }
.decision-card-secondary .decision-card-footer { margin-top: 0.7rem; }
.secondary-why { margin-bottom: 0.35rem; color: var(--muted); }
.start-here {
  display: inline-block; margin-right: 0.45rem; color: var(--ink);
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em;
}
.decision-card-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem;
  align-items: start;
}
.decision-severity {
  display: inline-block; width: auto; max-width: max-content;
  align-self: start; justify-self: end;
}
.decision-card-head h2 { margin: 0.15rem 0 0; font-size: 19px; }
.decision-reasoning {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin: 0.9rem 0;
}
.decision-reasoning h3 { margin: 0 0 0.25rem; font-size: 13px; }
.decision-reasoning p { margin: 0; }
.decision-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; border-top: 1px solid var(--line); padding-top: 0.75rem;
}
.decision-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.remaining-items {
  display: flex; justify-content: space-between; gap: 1rem;
  margin: 0.9rem 0; padding: 0.8rem 0;
}
.decision-diagnostics { margin: 0.8rem 0; color: var(--muted); }
@media (max-width: 600px) {
  .secondary-priorities { grid-template-columns: 1fr; }
  .decision-reasoning { grid-template-columns: 1fr; }
  .decision-card-footer { align-items: flex-start; flex-direction: column; }
  .decision-actions { width: 100%; }
  .decision-actions .btn { flex: 1; text-align: center; }
}
