/**
 * OpCo Template preview styles.
 * ALL color/spacing/radius/motion values come from the design-system tokens
 * (css/tokens.css, generated from packages/design-system). No raw literals.
 */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--flex-theme-canvas);
  color: var(--flex-theme-text-primary);
  line-height: 1.5;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--flex-space-4); top: -100px; z-index: 200;
  background: var(--flex-theme-accent); color: var(--flex-theme-accent-text);
  padding: var(--flex-space-2) var(--flex-space-4); border-radius: var(--flex-radius-md);
  font-weight: 600; transition: top var(--flex-motion-fast);
}
.skip-link:focus { top: var(--flex-space-2); }

:focus-visible {
  outline: 2px solid var(--flex-theme-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--flex-theme-focus-outer);
}

::selection { background: var(--flex-theme-selection); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 var(--flex-space-3); }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 var(--flex-space-3); }

a { color: inherit; }
.num, td.num { font-variant-numeric: tabular-nums; }

/* ---------- preview banner ---------- */
#preview-banner {
  display: flex; align-items: center; gap: var(--flex-space-3);
  background: var(--flex-color-black); color: var(--flex-color-white);
  padding: var(--flex-space-2) var(--flex-space-4);
  font-size: 0.85rem; border-bottom: 2px solid var(--flex-lime-500);
}
#preview-banner[hidden] { display: none; }
#preview-banner p { margin: 0; flex: 1; }
.banner-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--flex-lime-500); flex: none;
  box-shadow: 0 0 8px var(--flex-lime-500);
}
#preview-banner button {
  background: transparent; color: var(--flex-color-white);
  border: 1px solid var(--flex-lime-border); border-radius: var(--flex-radius-md);
  padding: var(--flex-space-1) var(--flex-space-3); cursor: pointer; font-size: 0.8rem;
}
#preview-banner button:hover { background: var(--flex-lime-muted); }

/* ---------- shell layout ---------- */
#app { min-height: 100vh; display: flex; flex-direction: column; }

#topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--flex-theme-surface);
  border-bottom: 1px solid var(--flex-theme-border);
}
.topbar-inner {
  display: flex; align-items: center; gap: var(--flex-space-3);
  padding: var(--flex-space-2) var(--flex-space-4);
  max-width: 1600px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: var(--flex-space-2); text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; display: grid; place-items: center;
  background: var(--flex-color-black); color: var(--flex-lime-500);
  border-radius: var(--flex-radius-md); font-size: 1.1rem;
}
:root[data-theme='dark'] .brand-mark { background: var(--flex-lime-500); color: var(--flex-color-black); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 0.95rem; }
.brand-text span { font-size: 0.72rem; color: var(--flex-theme-text-muted); }
.env-badge {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--flex-lime-muted); color: var(--flex-theme-text-primary);
  border: 1px solid var(--flex-lime-border); border-radius: var(--flex-radius-sm);
  padding: 2px var(--flex-space-2);
}
.topbar-spacer { flex: 1; }
.topbar-select select {
  background: var(--flex-theme-surface-elevated); color: var(--flex-theme-text-primary);
  border: 1px solid var(--flex-theme-border); border-radius: var(--flex-radius-md);
  padding: var(--flex-space-1) var(--flex-space-2); font-size: 0.85rem; max-width: 220px;
}
.icon-btn {
  position: relative; width: 36px; height: 36px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--flex-theme-border);
  border-radius: var(--flex-radius-md); cursor: pointer; color: var(--flex-theme-text-primary);
  font-size: 1.05rem;
}
.icon-btn:hover { background: var(--flex-theme-surface-interactive); }
.nav-toggle { display: none; }
@media (max-width: 860px) { .nav-toggle { display: grid; } }
.notif-count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px;
  background: var(--flex-lime-500); color: var(--flex-color-black);
  border-radius: 9px; font-size: 0.68rem; font-weight: 700;
  display: grid; place-items: center; padding: 0 4px;
}

#body-row { display: flex; flex: 1; max-width: 1600px; width: 100%; margin: 0 auto; }

#sidenav {
  width: 248px; flex: none;
  border-right: 1px solid var(--flex-theme-border);
  padding: var(--flex-space-4) var(--flex-space-3);
  display: flex; flex-direction: column; gap: var(--flex-space-4);
  position: sticky; top: 57px; align-self: flex-start; max-height: calc(100vh - 57px); overflow: auto;
}
.sidenav-deal { padding: 0 var(--flex-space-2); }
.sidenav-deal-name { font-weight: 600; font-size: 0.9rem; margin: 0 0 var(--flex-space-1); }
.sidenav-deal .badge { margin-bottom: var(--flex-space-2); }
.sidenav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sidenav-list a {
  display: flex; align-items: center; gap: var(--flex-space-2);
  padding: var(--flex-space-2) var(--flex-space-3); border-radius: var(--flex-radius-md);
  text-decoration: none; font-size: 0.9rem; color: var(--flex-theme-text-secondary);
}
.sidenav-list a:hover { background: var(--flex-theme-surface-interactive); color: var(--flex-theme-text-primary); }
.sidenav-list a[aria-current="page"] {
  background: var(--flex-lime-muted); color: var(--flex-theme-text-primary); font-weight: 600;
  box-shadow: inset 2px 0 0 var(--flex-lime-500);
}
.nav-icon { width: 18px; text-align: center; color: var(--flex-theme-text-muted); }
.sidenav-list a[aria-current="page"] .nav-icon { color: var(--flex-theme-text-primary); }
.sidenav-foot { margin-top: auto; padding-top: var(--flex-space-4); }

#view { flex: 1; min-width: 0; padding: var(--flex-space-6); }

/* ---------- page header ---------- */
.kicker {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--flex-theme-text-muted); margin: 0 0 var(--flex-space-1);
}
.page-header { margin-bottom: var(--flex-space-6); }
.page-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--flex-space-4); flex-wrap: wrap; }
.lede { color: var(--flex-theme-text-secondary); max-width: 60ch; }
.page-actions { display: flex; gap: var(--flex-space-2); flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--flex-space-1);
  padding: var(--flex-space-2) var(--flex-space-4); border-radius: var(--flex-radius-md);
  font-size: 0.9rem; font-weight: 600; cursor: pointer; text-decoration: none;
  border: 1px solid transparent; transition: background var(--flex-motion-fast);
  min-height: 40px;
}
.btn-primary { background: var(--flex-lime-500); color: var(--flex-color-black); }
.btn-primary:hover { background: var(--flex-lime-hover); }
.btn-ghost {
  background: transparent; color: var(--flex-theme-text-primary);
  border-color: var(--flex-theme-border);
}
.btn-ghost:hover { background: var(--flex-theme-surface-interactive); }
.btn-danger { background: transparent; color: var(--flex-theme-text-primary); border-color: var(--flex-theme-border); }
.btn-danger:hover { background: var(--flex-lime-muted); }
.btn-sm { min-height: 32px; padding: var(--flex-space-1) var(--flex-space-3); font-size: 0.8rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: var(--flex-space-1);
  font-size: 0.75rem; font-weight: 600; padding: 2px var(--flex-space-2);
  border-radius: var(--flex-radius-sm); border: 1px solid var(--flex-theme-border);
  background: var(--flex-theme-surface-elevated); color: var(--flex-theme-text-secondary);
  white-space: nowrap;
}
.st-ok { background: var(--flex-lime-muted); border-color: var(--flex-lime-border); color: var(--flex-theme-text-primary); }
.st-warn { border-style: dashed; }
.st-bad { background: var(--flex-color-black); color: var(--flex-color-white); border-color: var(--flex-color-black); }
:root[data-theme='dark'] .st-bad { background: var(--flex-color-white); color: var(--flex-color-black); border-color: var(--flex-color-white); }
.st-muted { opacity: 0.75; }
.sev-critical { background: var(--flex-color-black); color: var(--flex-lime-500); border-color: var(--flex-color-black); font-weight: 700; }
:root[data-theme='dark'] .sev-critical { background: var(--flex-lime-500); color: var(--flex-color-black); border-color: var(--flex-lime-500); }
.sev-high { border: 2px solid var(--flex-theme-text-primary); color: var(--flex-theme-text-primary); }
.sev-medium { border-style: dashed; }
.sev-low { opacity: 0.8; }

/* ---------- cards & grids ---------- */
.card {
  background: var(--flex-theme-surface); border: 1px solid var(--flex-theme-border);
  border-radius: var(--flex-radius-lg); padding: var(--flex-space-5);
}
.card h3 { margin-bottom: var(--flex-space-2); }
.grid { display: grid; gap: var(--flex-space-4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; gap: var(--flex-space-1); }
.stat .stat-value { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat .stat-label { font-size: 0.8rem; color: var(--flex-theme-text-muted); }
.stat .stat-sub { font-size: 0.8rem; color: var(--flex-theme-text-secondary); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--flex-theme-border); border-radius: var(--flex-radius-lg); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; background: var(--flex-theme-surface); }
.data-table caption { text-align: left; padding: var(--flex-space-3) var(--flex-space-4); font-weight: 600; }
.data-table th {
  text-align: left; padding: var(--flex-space-2) var(--flex-space-3);
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--flex-theme-text-muted); border-bottom: 1px solid var(--flex-theme-border);
  background: var(--flex-theme-surface-elevated); white-space: nowrap;
}
.data-table td { padding: var(--flex-space-2) var(--flex-space-3); border-bottom: 1px solid var(--flex-theme-border); vertical-align: top; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--flex-theme-surface-elevated); }
.cell-title { font-weight: 600; }
.cell-sub { font-size: 0.78rem; color: var(--flex-theme-text-muted); }

/* ---------- stage stepper ---------- */
.stage-stepper {
  list-style: none; display: flex; gap: 0; margin: 0 0 var(--flex-space-6); padding: 0;
  border: 1px solid var(--flex-theme-border); border-radius: var(--flex-radius-lg); overflow: hidden;
  background: var(--flex-theme-surface);
}
.stage-stepper li {
  flex: 1; display: flex; align-items: center; gap: var(--flex-space-2);
  padding: var(--flex-space-3) var(--flex-space-4); font-size: 0.85rem;
  border-right: 1px solid var(--flex-theme-border); color: var(--flex-theme-text-muted);
}
.stage-stepper li:last-child { border-right: none; }
.step-dot {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none;
  border: 1px solid var(--flex-theme-border); font-size: 0.75rem; font-weight: 700;
}
.stage-stepper li.done { color: var(--flex-theme-text-secondary); }
.stage-stepper li.done .step-dot { background: var(--flex-lime-muted); border-color: var(--flex-lime-border); }
.stage-stepper li.current { color: var(--flex-theme-text-primary); font-weight: 700; background: var(--flex-lime-muted); }
.stage-stepper li.current .step-dot { background: var(--flex-lime-500); color: var(--flex-color-black); border-color: var(--flex-lime-500); }

/* ---------- states ---------- */
.empty-state, .error-state {
  text-align: center; padding: var(--flex-space-10) var(--flex-space-6);
  border: 1px dashed var(--flex-theme-border); border-radius: var(--flex-radius-lg);
  background: var(--flex-theme-surface); max-width: 560px; margin: var(--flex-space-6) auto;
}
.empty-mark { font-size: 2.5rem; color: var(--flex-theme-text-muted); margin-bottom: var(--flex-space-3); }
.skeleton-block { display: flex; flex-direction: column; gap: var(--flex-space-2); padding: var(--flex-space-4); }
.skeleton-line {
  height: 18px; border-radius: var(--flex-radius-sm);
  background: linear-gradient(90deg, var(--flex-theme-surface-elevated) 25%, var(--flex-theme-surface-interactive) 50%, var(--flex-theme-surface-elevated) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton-line { animation: none; } }

/* ---------- forms ---------- */
.field { margin-bottom: var(--flex-space-4); }
.field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: var(--flex-space-1); }
.field input, .field select, .field textarea {
  width: 100%; padding: var(--flex-space-2) var(--flex-space-3);
  border: 1px solid var(--flex-theme-border); border-radius: var(--flex-radius-md);
  background: var(--flex-theme-canvas); color: var(--flex-theme-text-primary); font-size: 0.95rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--flex-theme-focus); outline: none;
  box-shadow: 0 0 0 3px var(--flex-theme-focus-outer);
}
.field .hint { font-size: 0.8rem; color: var(--flex-theme-text-muted); margin: var(--flex-space-1) 0 0; }
.field .req { color: var(--flex-theme-text-primary); }
.form-error {
  background: var(--flex-lime-muted); border: 1px solid var(--flex-lime-border);
  border-radius: var(--flex-radius-md); padding: var(--flex-space-3);
  margin-bottom: var(--flex-space-4); font-size: 0.9rem;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--flex-space-4); }
.form-grid .field-full { grid-column: 1 / -1; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: var(--flex-overlay-scrim); padding: var(--flex-space-4);
}
.modal {
  background: var(--flex-theme-surface); color: var(--flex-theme-text-primary);
  border: 1px solid var(--flex-theme-border); border-radius: var(--flex-radius-lg);
  width: min(560px, 100%); max-height: 90vh; overflow: auto;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: var(--flex-space-4) var(--flex-space-5); border-bottom: 1px solid var(--flex-theme-border); }
.modal-head h2 { margin: 0; }
.modal-x { background: transparent; border: none; font-size: 1.1rem; cursor: pointer; color: var(--flex-theme-text-primary); padding: var(--flex-space-1); }
.modal-body { padding: var(--flex-space-5); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--flex-space-2); padding: var(--flex-space-4) var(--flex-space-5); border-top: 1px solid var(--flex-theme-border); }

/* ---------- toasts ---------- */
#toasts { position: fixed; bottom: var(--flex-space-4); right: var(--flex-space-4); z-index: 120; display: flex; flex-direction: column; gap: var(--flex-space-2); }
.toast {
  background: var(--flex-color-black); color: var(--flex-color-white);
  padding: var(--flex-space-3) var(--flex-space-4); border-radius: var(--flex-radius-md);
  font-size: 0.88rem; max-width: 360px; opacity: 0; transform: translateY(8px);
  transition: opacity var(--flex-motion-normal), transform var(--flex-motion-normal);
  border-left: 3px solid var(--flex-lime-500);
}
:root[data-theme='dark'] .toast { background: var(--flex-color-white); color: var(--flex-color-black); }
.toast.show { opacity: 1; transform: none; }
.toast-error { border-left-color: var(--flex-theme-text-primary); }

/* ---------- activity feed ---------- */
.feed { display: flex; flex-direction: column; }
.feed-item {
  display: grid; grid-template-columns: 28px 1fr; gap: var(--flex-space-3);
  padding: var(--flex-space-3) 0; border-bottom: 1px solid var(--flex-theme-border);
}
.feed-item:last-child { border-bottom: none; }
.feed-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; background: var(--flex-theme-border); }
.feed-dot.t-human { background: var(--flex-theme-text-primary); }
.feed-dot.t-ai { background: var(--flex-lime-500); box-shadow: 0 0 6px var(--flex-lime-border); }
.feed-dot.t-system { background: transparent; border: 2px solid var(--flex-theme-text-muted); }
.feed-dot.t-provider { background: var(--flex-theme-text-muted); }
.feed-meta { font-size: 0.78rem; color: var(--flex-theme-text-muted); margin-top: var(--flex-space-1); }

/* ---------- AI command ---------- */
.ai-brief { display: grid; gap: var(--flex-space-2); }
.ai-brief-item {
  display: flex; gap: var(--flex-space-3); align-items: baseline;
  padding: var(--flex-space-2) var(--flex-space-3);
  border: 1px solid var(--flex-theme-border); border-radius: var(--flex-radius-md);
  background: var(--flex-theme-surface);
}
.ai-brief-item strong { font-variant-numeric: tabular-nums; }
.cmd-chips { display: flex; flex-wrap: wrap; gap: var(--flex-space-2); margin: var(--flex-space-3) 0; }
.cmd-chip {
  border: 1px solid var(--flex-lime-border); background: var(--flex-lime-muted);
  border-radius: 999px; padding: var(--flex-space-1) var(--flex-space-3);
  font-size: 0.82rem; cursor: pointer; color: var(--flex-theme-text-primary);
}
.cmd-chip:hover { background: var(--flex-lime-500); color: var(--flex-color-black); }
.backend-panel {
  border: 1px dashed var(--flex-theme-border); border-radius: var(--flex-radius-lg);
  padding: var(--flex-space-5); background: var(--flex-theme-surface); margin-top: var(--flex-space-4);
}
.backend-panel details { margin-top: var(--flex-space-2); }
.backend-panel summary { cursor: pointer; font-weight: 600; }

/* ---------- misc ---------- */
.toolbar { display: flex; gap: var(--flex-space-2); align-items: center; flex-wrap: wrap; margin-bottom: var(--flex-space-4); }
.toolbar input[type="search"], .toolbar select {
  padding: var(--flex-space-2) var(--flex-space-3); border: 1px solid var(--flex-theme-border);
  border-radius: var(--flex-radius-md); background: var(--flex-theme-canvas); color: var(--flex-theme-text-primary);
}
.muted { color: var(--flex-theme-text-muted); }
.mt-4 { margin-top: var(--flex-space-4); } .mt-6 { margin-top: var(--flex-space-6); }
.mb-4 { margin-bottom: var(--flex-space-4); }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: var(--flex-space-8) 0 var(--flex-space-4); }
.section-title h2 { margin: 0; }
.deal-card { display: block; text-decoration: none; color: inherit; }
.deal-card:hover { border-color: var(--flex-lime-border); }
.diff-added { background: var(--flex-lime-muted); }
.lock-note {
  display: flex; gap: var(--flex-space-2); align-items: center;
  padding: var(--flex-space-2) var(--flex-space-3); border: 1px solid var(--flex-lime-border);
  border-radius: var(--flex-radius-md); background: var(--flex-lime-muted); font-size: 0.85rem;
}

/* ---------- route additions: requests / findings / data-room / activity ---------- */
/* Clickable table rows open a detail modal - cursor signals the affordance. */
.row-click tbody tr { cursor: pointer; }
/* Overdue marker: lime left-border per monochrome discipline (UI.md §4 - never red). */
.cell-overdue {
  display: inline-block;
  border-left: 3px solid var(--flex-lime-500);
  padding-left: var(--flex-space-2);
}
/* Active filter chip state. */
.cmd-chip[aria-pressed="true"] {
  background: var(--flex-lime-500);
  color: var(--flex-color-black);
  border-color: var(--flex-lime-500);
  font-weight: 700;
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  #sidenav {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; width: 260px;
    background: var(--flex-theme-surface); transform: translateX(-100%);
    transition: transform var(--flex-motion-normal); max-height: none;
  }
  body.nav-open #sidenav { transform: none; }
  #view { padding: var(--flex-space-4); }
  .stage-stepper { flex-direction: column; }
  .stage-stepper li { border-right: none; border-bottom: 1px solid var(--flex-theme-border); }
  .stage-stepper li:last-child { border-bottom: none; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .page-header-row { flex-direction: column; }
  .topbar-inner { flex-wrap: wrap; }
  .topbar-select select { max-width: 140px; }
  /* tables collapse to cards */
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { border-bottom: 2px solid var(--flex-theme-border); padding: var(--flex-space-2) 0; }
  .data-table td { border: none; padding: var(--flex-space-1) var(--flex-space-3); }
  .data-table td::before {
    content: attr(data-label); display: block;
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--flex-theme-text-muted);
  }
}

/* --- Day-1 / 100-day / KPI route additions (monochrome + lime tokens only) --- */
.blocker-callout {
  border: 1px solid var(--flex-theme-border);
  border-left: 4px solid var(--flex-theme-text-primary);
  background: var(--flex-lime-muted);
  border-radius: var(--flex-radius-md);
  padding: var(--flex-space-3);
  margin: var(--flex-space-3) 0;
  font-size: 0.9rem;
}
.blocker-callout strong { display: block; margin-bottom: var(--flex-space-1); }
.progress-track {
  height: 8px; background: var(--flex-theme-surface-interactive);
  border-radius: var(--flex-radius-sm); overflow: hidden; margin-top: var(--flex-space-2);
}
.progress-track > span { display: block; height: 100%; background: var(--flex-lime-500); }
.kv { display: grid; gap: var(--flex-space-2); margin: 0; }
.kv .kv-row { display: flex; justify-content: space-between; gap: var(--flex-space-3); font-size: 0.9rem; }
.kv .kv-label { color: var(--flex-theme-text-muted); }
.kv .kv-value { text-align: right; word-break: break-word; }
.timeline { list-style: none; margin: var(--flex-space-3) 0 0; padding: 0; }
.timeline li {
  position: relative; padding: 0 0 var(--flex-space-3) var(--flex-space-5); font-size: 0.9rem;
}
.timeline li::before {
  content: ''; position: absolute; left: 6px; top: 6px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--flex-lime-500);
}
.timeline li::after {
  content: ''; position: absolute; left: 9px; top: 16px; bottom: 0; width: 2px;
  background: var(--flex-theme-border);
}
.timeline li:last-child::after { display: none; }
.timeline .ms-date { color: var(--flex-theme-text-muted); font-size: 0.82rem; }
.checklist { list-style: none; margin: 0 0 var(--flex-space-4); padding: 0; display: grid; gap: var(--flex-space-2); }
.checklist li { font-size: 0.92rem; }
.card-actions { display: flex; gap: var(--flex-space-2); flex-wrap: wrap; margin-top: var(--flex-space-3); }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- print (board pack) ---------- */
@media print {
  #topbar, #sidenav, #preview-banner, #toasts, .page-actions, .page-header,
  .toolbar, .section-title, .nav-toggle, #modal-root { display: none !important; }
  #view { padding: 0; }
  #board-pack { display: block !important; }
  .card { border: none; }
}
