/* ============================================================
   Researchly — Client Portal design system
   A restrained, upscale monochrome workspace. White / near-black
   / cool-gray only; state is encoded by form (solid dot = done,
   ring = in progress, shade = queued), never by hue. Reuses
   style.css fonts (Instrument Sans + Instrument Serif). Prefix cp-.
   Single visual world (a logged-in app) — light, painted explicitly.
   ============================================================ */

:root {
  --cp-ground:      oklch(0.981 0.002 264);
  --cp-surface:     #ffffff;
  --cp-surface-2:   oklch(0.972 0.002 264);
  --cp-ink:         oklch(0.215 0.006 264);
  --cp-ink-2:       oklch(0.455 0.008 264);
  --cp-ink-3:       oklch(0.605 0.006 264);
  --cp-ink-4:       oklch(0.70 0.005 264);
  --cp-line:        oklch(0.925 0.004 264);
  --cp-line-soft:   oklch(0.955 0.003 264);
  --cp-sidebar:     oklch(0.185 0.006 264);
  --cp-sidebar-2:   oklch(0.235 0.006 264);
  --cp-sidebar-line:oklch(0.30 0.006 264);
  --cp-sidebar-ink: oklch(0.70 0.006 264);
  --cp-radius:      16px;
  --cp-radius-md:   12px;
  --cp-radius-sm:   10px;
  --cp-shadow:      0 1px 2px oklch(0.2 0.02 264 / 0.04), 0 6px 20px -12px oklch(0.2 0.02 264 / 0.12);
  --cp-shadow-hi:   0 2px 4px oklch(0.2 0.02 264 / 0.05), 0 16px 34px -14px oklch(0.2 0.02 264 / 0.18);
  --cp-req:         oklch(0.55 0.2 27);
}

.cp-body {
  background: var(--cp-ground);
  color: var(--cp-ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Shell ---- */
.cp-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }

/* ---- Sidebar ---- */
.cp-sidebar {
  position: sticky; top: 0; align-self: start; height: 100vh;
  background: var(--cp-sidebar); color: #fff;
  display: flex; flex-direction: column;
  padding: 24px 18px; box-sizing: border-box;
}
.cp-sidebar-logo { padding: 6px 10px 26px; }
.cp-sidebar-logo img { height: 25px; display: block; opacity: 0.96; }
.cp-nav { display: flex; flex-direction: column; gap: 2px; }
.cp-nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 13px; border-radius: var(--cp-radius-sm);
  color: var(--cp-sidebar-ink);
  font-size: 13.5px; font-weight: 500; letter-spacing: -0.003em;
  transition: background 0.16s ease, color 0.16s ease;
}
.cp-nav-item:hover { background: oklch(1 0 0 / 0.05); color: #fff; }
.cp-nav-item.active { background: oklch(1 0 0 / 0.09); color: #fff; font-weight: 600; }
.cp-nav-item.active::before {
  content: ''; position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 17px; border-radius: 3px; background: #fff;
}
.cp-nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.85; }
.cp-nav-item.active svg { opacity: 1; }

.cp-sidebar-foot { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--cp-sidebar-line); }
.cp-sidebar-user { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cp-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: oklch(1 0 0 / 0.1); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; flex-shrink: 0;
  border: 1px solid oklch(1 0 0 / 0.14);
}
.cp-sidebar-user .nm { font-size: 13.5px; font-weight: 600; color: #fff; line-height: 1.35; letter-spacing: -0.006em; }
.cp-sidebar-user .co { font-size: 11.5px; color: var(--cp-sidebar-ink); line-height: 1.35; }
.cp-logout {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; box-sizing: border-box;
  background: none; border: 1px solid var(--cp-sidebar-line);
  color: oklch(0.82 0.006 264);
  font-family: 'Instrument Sans', sans-serif; font-size: 13px; font-weight: 600;
  padding: 10px 12px; border-radius: var(--cp-radius-sm); cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}
.cp-logout:hover { background: oklch(1 0 0 / 0.06); color: #fff; border-color: oklch(0.42 0.006 264); }
.cp-logout svg { width: 16px; height: 16px; }

/* ---- Main column ---- */
.cp-main { display: flex; flex-direction: column; min-width: 0; }
.cp-topbar {
  position: sticky; top: 0; z-index: 30;
  background: oklch(0.981 0.002 264 / 0.82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--cp-line);
  height: 68px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 34px;
}
.cp-topbar-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.cp-hamburger {
  display: none; background: none; border: 1px solid var(--cp-line);
  border-radius: 9px; padding: 7px; cursor: pointer; color: var(--cp-ink);
}
.cp-hamburger svg { width: 18px; height: 18px; display: block; }
.cp-breadcrumb { font-size: 12px; color: var(--cp-ink-3); letter-spacing: -0.002em; }
.cp-breadcrumb .pg { color: var(--cp-ink); font-weight: 600; }
.cp-topbar-user { display: flex; align-items: center; gap: 12px; }
.cp-topbar-user .meta { text-align: right; line-height: 1.35; }
.cp-topbar-user .nm { font-size: 13px; font-weight: 600; letter-spacing: -0.006em; }
.cp-topbar-user .co { font-size: 11.5px; color: var(--cp-ink-3); }
.cp-topbar-user .cp-avatar { background: var(--cp-ink); color: #fff; border: none; }

.cp-content { padding: 24px 34px 56px; max-width: 1080px; width: 100%; box-sizing: border-box; }
.cp-page-title {
  font-size: 30px; letter-spacing: -0.022em; font-weight: 600; line-height: 1.1;
  margin: 0 0 8px; text-wrap: balance;
}
.cp-page-title em { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.cp-page-sub { font-size: 14.5px; line-height: 1.6; color: var(--cp-ink-2); margin: 0 0 24px; max-width: 60ch; }

/* ---- Cards ---- */
.cp-card {
  background: var(--cp-surface);
  border: 1px solid var(--cp-line);
  border-radius: var(--cp-radius);
  box-shadow: var(--cp-shadow);
}
.cp-grid { display: grid; gap: 14px; }
.cp-stats { grid-template-columns: repeat(4, 1fr); }
.cp-stat { padding: 17px 20px; }
.cp-stat .lbl {
  font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--cp-ink-3); margin-bottom: 9px;
}
.cp-stat .val {
  font-size: 29px; font-weight: 600; letter-spacing: -0.025em; line-height: 1;
  color: var(--cp-ink); font-variant-numeric: tabular-nums;
}
.cp-stat .val.accent { color: var(--cp-ink); } /* monochrome — no hue accent */

.cp-actions { grid-template-columns: repeat(2, 1fr); margin-top: 4px; }
.cp-action { padding: 18px 22px; display: flex; flex-direction: column; transition: border-color 0.2s, box-shadow 0.2s; }
.cp-action:hover { border-color: oklch(0.85 0.005 264); box-shadow: var(--cp-shadow-hi); }
.cp-action .ic {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--cp-ink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 13px;
}
.cp-action .ic svg { width: 19px; height: 19px; }
.cp-action h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 6px; }
.cp-action p { font-size: 13px; line-height: 1.55; color: var(--cp-ink-2); margin: 0 0 14px; flex: 1; }

/* Functional card tints: green = sample workflow, blue = final-report workflow */
.cp-action.tint-sample { background: oklch(0.986 0.013 155); border-color: oklch(0.9 0.035 155); }
.cp-action.tint-sample .ic { background: oklch(0.94 0.05 155); color: oklch(0.47 0.09 155); }
.cp-action.tint-sample:hover { border-color: oklch(0.83 0.06 155); }
.cp-action.tint-report { background: oklch(0.985 0.013 245); border-color: oklch(0.9 0.03 245); }
.cp-action.tint-report .ic { background: oklch(0.94 0.045 245); color: oklch(0.5 0.1 245); }
.cp-action.tint-report:hover { border-color: oklch(0.83 0.05 245); }

/* ---- Buttons ---- */
.cp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13.5px; font-weight: 600; letter-spacing: -0.003em;
  padding: 10px 18px; border-radius: var(--cp-radius-sm); cursor: pointer;
  border: 1px solid transparent; text-align: center; white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, color 0.16s, box-shadow 0.16s, transform 0.05s;
}
.cp-btn:active { transform: translateY(0.5px); }
.cp-btn-dark { background: var(--cp-ink); color: #fff; }
.cp-btn-dark:hover { background: oklch(0.14 0.006 264); color: #fff; box-shadow: 0 6px 18px -8px oklch(0.2 0.02 264 / 0.4); }
.cp-btn-light { background: var(--cp-surface); color: var(--cp-ink); border-color: var(--cp-line); }
.cp-btn-light:hover { border-color: oklch(0.74 0.006 264); background: var(--cp-surface-2); }
.cp-btn-sm { padding: 8px 14px; font-size: 12.5px; border-radius: 9px; }
.cp-btn svg { width: 15px; height: 15px; }
.cp-btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---- Section headings ---- */
.cp-section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--cp-line-soft);
}
.cp-section-head h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }

/* ---- Badges (subtle functional colour; soft, never saturated) ---- */
.cp-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 600; line-height: 1; letter-spacing: -0.002em;
  padding: 5px 11px 5px 9px; border-radius: 999px; white-space: nowrap;
  color: var(--cp-ink-2); background: var(--cp-surface-2); border: 1px solid var(--cp-line);
}
.cp-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; box-sizing: border-box; background: currentColor; }
.cp-badge.ok       { color: oklch(0.46 0.09 155);  background: oklch(0.965 0.028 155); border-color: oklch(0.9 0.045 155); }
.cp-badge.progress { color: oklch(0.5 0.1 245);    background: oklch(0.965 0.028 245); border-color: oklch(0.9 0.04 245); }
.cp-badge.info     { color: oklch(0.5 0.1 245);    background: oklch(0.965 0.028 245); border-color: oklch(0.9 0.04 245); }
.cp-badge.warn     { color: oklch(0.55 0.11 70);   background: oklch(0.97 0.045 82);   border-color: oklch(0.9 0.06 82); }
.cp-badge.fail     { color: oklch(0.52 0.16 27);   background: oklch(0.968 0.03 27);   border-color: oklch(0.9 0.05 27); }
.cp-badge.muted    { color: var(--cp-ink-3); }
.cp-badge.muted::before { background: var(--cp-ink-4); }

/* ---- Tables ---- */
.cp-table-wrap { width: 100%; overflow-x: auto; }
.cp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cp-table th {
  text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.055em;
  text-transform: uppercase; color: var(--cp-ink-3);
  padding: 14px 24px; border-bottom: 1px solid var(--cp-line-soft); white-space: nowrap;
}
.cp-table td { padding: 16px 24px; border-bottom: 1px solid var(--cp-line-soft); vertical-align: middle; }
.cp-table tr:last-child td { border-bottom: none; }
.cp-table tbody tr { transition: background 0.14s; }
.cp-table tbody tr:hover { background: oklch(0.986 0.002 264); }
.cp-table .nm { font-weight: 600; color: var(--cp-ink); letter-spacing: -0.008em; }
.cp-table a.nm:hover { color: var(--cp-ink-2); }
.cp-table .id { font-size: 12px; color: var(--cp-ink-3); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; margin-top: 3px; }

/* ---- Notes / info strips ---- */
.cp-note {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--cp-surface); border: 1px solid var(--cp-line);
  border-radius: var(--cp-radius-md); padding: 16px 18px;
  font-size: 13px; line-height: 1.6; color: var(--cp-ink-2);
}
.cp-note svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--cp-ink-3); margin-top: 1px; }

/* ---- Alerts ---- */
.cp-alert { border-radius: var(--cp-radius-md); padding: 13px 16px; font-size: 13px; line-height: 1.6; margin-bottom: 20px; }
.cp-alert-error { border: 1px solid oklch(0.86 0.05 27); background: oklch(0.975 0.013 27); color: oklch(0.48 0.15 27); }

/* ---- Forms ---- */
.cp-form-card { padding: 30px 32px; }
.cp-field { margin-bottom: 22px; }
.cp-field .hint { font-size: 12px; color: var(--cp-ink-3); margin: 6px 0 0; line-height: 1.5; }
.cp-field-req { color: var(--cp-req); }

/* Report-request layout (matches the client's generation tool) */
.cp-req-hint { color: var(--cp-req); font-weight: 600; }
.cp-toprow { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 20px; margin-bottom: 26px; }
.cp-seg-row { display: grid; grid-template-columns: 1fr 1.7fr 34px; gap: 18px; align-items: end; margin-bottom: 18px; }
.cp-seg-x {
  height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: var(--cp-ink-3); font-size: 20px; line-height: 1; padding: 0; border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.cp-seg-x:hover { color: var(--cp-ink); background: var(--cp-surface-2); }
.cp-btn-add {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Instrument Sans', sans-serif; font-size: 13.5px; font-weight: 600;
  color: var(--cp-ink); background: var(--cp-surface); border: 1px solid var(--cp-line);
  padding: 9px 16px; border-radius: var(--cp-radius-sm); cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.cp-btn-add:hover { background: var(--cp-surface-2); border-color: oklch(0.74 0.006 264); }
.cp-players-row { display: flex; gap: 28px; align-items: flex-start; }
.cp-players-row .players-field { flex: 1; min-width: 0; }
.cp-players-row .players-cta { padding-top: 28px; flex-shrink: 0; }
.cp-cover-note {
  text-align: center; font-size: 12px; font-weight: 600; letter-spacing: 0.03em;
  color: var(--cp-ink-3); margin: 30px 0 2px;
}

/* Legacy segment card / icon button (kept for compatibility) */
.cp-segment { border: 1px solid var(--cp-line); border-radius: var(--cp-radius-md); padding: 18px; margin-bottom: 14px; background: var(--cp-surface); }
.cp-segment-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cp-segment-head .lbl { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--cp-ink-3); }
.cp-segment-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 16px; }
.cp-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 8px; background: var(--cp-surface); border: 1px solid var(--cp-line);
  color: var(--cp-ink-3); cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cp-icon-btn:hover { background: var(--cp-surface-2); color: var(--cp-ink); border-color: oklch(0.74 0.006 264); }
.cp-icon-btn svg { width: 15px; height: 15px; }

/* ---- Upload dropzone ---- */
.cp-dropzone {
  border: 1.5px dashed oklch(0.86 0.005 264); border-radius: var(--cp-radius-md);
  padding: 38px 24px; text-align: center; background: var(--cp-surface-2);
  transition: border-color 0.16s, background 0.16s; cursor: pointer;
}
.cp-dropzone:hover, .cp-dropzone.drag { border-color: var(--cp-ink); background: oklch(0.965 0.002 264); }
.cp-dropzone .dz-ic { color: var(--cp-ink-3); margin-bottom: 12px; }
.cp-dropzone .dz-ic svg { width: 26px; height: 26px; }
.cp-dropzone .dz-main { font-size: 14px; font-weight: 600; margin-bottom: 4px; letter-spacing: -0.006em; }
.cp-dropzone .dz-sub { font-size: 12.5px; color: var(--cp-ink-3); }
.cp-file-chip {
  display: none; align-items: center; gap: 12px; margin-top: 14px;
  border: 1px solid var(--cp-line); border-radius: var(--cp-radius-sm); padding: 12px 14px; background: var(--cp-surface);
}
.cp-file-chip.show { display: flex; }
.cp-file-chip .fx { width: 32px; height: 32px; border-radius: 8px; background: var(--cp-ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; letter-spacing: 0.02em; }
.cp-file-chip .fn { font-size: 13px; font-weight: 600; letter-spacing: -0.006em; }
.cp-file-chip .fr { margin-left: auto; background: none; border: none; color: var(--cp-ink-3); cursor: pointer; font-size: 12.5px; font-weight: 600; }
.cp-file-chip .fr:hover { color: var(--cp-ink); }

/* ---- Radio option cards ---- */
.cp-option {
  display: flex; align-items: center; gap: 15px;
  border: 1px solid var(--cp-line); border-radius: var(--cp-radius-md);
  padding: 17px 18px; margin-bottom: 12px; cursor: pointer; transition: border-color 0.16s, box-shadow 0.16s;
}
.cp-option:hover { border-color: oklch(0.78 0.006 264); }
.cp-option.sel { border-color: var(--cp-ink); box-shadow: 0 0 0 1px var(--cp-ink); }
.cp-option input { accent-color: var(--cp-ink); width: 17px; height: 17px; }
.cp-option .oc-nm { font-size: 14px; font-weight: 600; letter-spacing: -0.008em; }
.cp-option .oc-meta { font-size: 12px; color: var(--cp-ink-3); margin-top: 3px; font-variant-numeric: tabular-nums; }

/* ---- Workflow (single-line connected stepper) ---- */
.cp-workflow { display: flex; align-items: flex-start; }
.cp-wf-step {
  flex: 1 1 0; min-width: 0; position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 6px;
}
.cp-wf-step::after { /* connector line to the next node */
  content: ''; position: absolute; top: 15px; left: calc(50% + 20px); width: calc(100% - 40px);
  height: 1px; background: var(--cp-line);
}
.cp-wf-step:last-child::after { display: none; }
.cp-wf-node {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--cp-line); background: var(--cp-surface);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Instrument Serif', serif; font-style: italic; font-size: 13px;
  color: var(--cp-ink-3); margin-bottom: 11px; position: relative; z-index: 1;
  font-variant-numeric: tabular-nums;
}
.cp-wf-step .t { font-size: 12px; font-weight: 600; line-height: 1.35; letter-spacing: -0.006em; color: var(--cp-ink); }

/* ---- Success panel ---- */
.cp-success { max-width: 540px; margin: 8px auto; text-align: center; padding: 48px 36px; }
.cp-success .tick {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--cp-ink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 22px;
}
.cp-success .tick svg { width: 26px; height: 26px; }
.cp-success h2 { font-size: 23px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 10px; }
.cp-success p { font-size: 14px; line-height: 1.65; color: var(--cp-ink-2); margin: 0 auto 20px; max-width: 400px; }
.cp-reqid {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cp-surface-2); border: 1px solid var(--cp-line); border-radius: 999px; padding: 8px 16px;
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; margin-bottom: 26px; letter-spacing: 0.01em;
}
.cp-success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- Definition list ---- */
.cp-dl { display: grid; grid-template-columns: 190px 1fr; gap: 0; }
.cp-dl dt { font-size: 12.5px; font-weight: 600; color: var(--cp-ink-3); padding: 14px 0; border-bottom: 1px solid var(--cp-line-soft); }
.cp-dl dd { font-size: 13.5px; color: var(--cp-ink); padding: 14px 0; border-bottom: 1px solid var(--cp-line-soft); margin: 0; }
.cp-dl dt:last-of-type, .cp-dl dd:last-of-type { border-bottom: none; }

/* ---- Tabs ---- */
.cp-tabs { display: inline-flex; gap: 4px; background: var(--cp-surface-2); border: 1px solid var(--cp-line); border-radius: var(--cp-radius-sm); padding: 4px; margin-bottom: 22px; }
.cp-tab {
  border: none; background: none; cursor: pointer;
  font-family: 'Instrument Sans', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: -0.004em;
  color: var(--cp-ink-3); padding: 7px 16px; border-radius: 7px; transition: background 0.15s, color 0.15s;
}
.cp-tab:hover { color: var(--cp-ink-2); }
.cp-tab.active { background: var(--cp-surface); color: var(--cp-ink); box-shadow: 0 1px 2px oklch(0.2 0.02 264 / 0.1); }

/* ---- Coloured file icons on buttons ---- */
.cp-fileicon { flex-shrink: 0; }
.cp-btn .cp-fileicon { width: 16px; height: 16px; }

/* ---- Version history (stacked timeline cards) ---- */
.cp-versions { display: flex; flex-direction: column; gap: 12px; }
.cp-version { border: 1px solid var(--cp-line); border-radius: var(--cp-radius-md); padding: 18px 20px; background: var(--cp-surface); }
.cp-version.current { border-color: oklch(0.86 0.05 155); background: oklch(0.99 0.01 155); }
.cp-version-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.cp-version-head .vn { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.cp-version-meta { font-size: 12.5px; color: var(--cp-ink-3); margin-bottom: 12px; }
.cp-version-changes { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 5px; }
.cp-version-changes li { font-size: 13px; color: var(--cp-ink-2); display: flex; gap: 9px; align-items: flex-start; line-height: 1.5; }
.cp-version-changes li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--cp-ink-4); margin-top: 7px; flex-shrink: 0; }
.cp-version-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Empty state ---- */
.cp-empty { text-align: center; padding: 56px 32px; }
.cp-empty .ic { width: 52px; height: 52px; border-radius: 14px; background: var(--cp-surface-2); border: 1px solid var(--cp-line); color: var(--cp-ink-3); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.cp-empty .ic svg { width: 24px; height: 24px; }
.cp-empty h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 8px; }
.cp-empty p { font-size: 14px; color: var(--cp-ink-2); line-height: 1.6; margin: 0 auto 20px; max-width: 340px; }

/* ---- Current-report banner (edit) ---- */
.cp-editbar { display: flex; flex-wrap: wrap; gap: 6px 26px; align-items: baseline; padding: 16px 20px; border: 1px solid var(--cp-line); border-radius: var(--cp-radius-md); background: var(--cp-surface-2); margin-bottom: 24px; }
.cp-editbar .k { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cp-ink-3); margin-right: 8px; }
.cp-editbar .v { font-size: 14px; font-weight: 600; color: var(--cp-ink); }

/* ---- Spinner ---- */
.cp-spinner {
  display: inline-block; width: 14px; height: 14px; margin-right: 2px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; vertical-align: -2px; animation: cp-spin 0.6s linear infinite;
}
@keyframes cp-spin { to { transform: rotate(360deg); } }

/* ---- Mobile scrim ---- */
.cp-scrim { display: none; position: fixed; inset: 0; z-index: 40; background: oklch(0.2 0.006 264 / 0.5); }
.cp-scrim.show { display: block; }

/* ============================================================
   Responsive (desktop / tablet focused; drawer kept for small)
   ============================================================ */
@media (max-width: 1040px) { .cp-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .cp-shell { grid-template-columns: 1fr; }
  .cp-sidebar { position: fixed; top: 0; left: 0; z-index: 50; width: 272px; height: 100vh; transform: translateX(-100%); transition: transform 0.24s ease; }
  .cp-sidebar.open { transform: translateX(0); }
  .cp-hamburger { display: inline-flex; }
  .cp-topbar-user .meta { display: none; }
  .cp-content { padding: 32px 26px 60px; }
}
@media (max-width: 860px) {
  .cp-toprow { grid-template-columns: 1fr; gap: 18px; }
  .cp-seg-row { grid-template-columns: 1fr 1.6fr 30px; }
  .cp-players-row { flex-direction: column; }
  .cp-players-row .players-cta { padding-top: 0; }
  .cp-players-row .players-cta .cp-btn { width: 100%; }
}
@media (max-width: 680px) {
  .cp-content { padding: 24px 18px 56px; }
  .cp-topbar { padding: 0 18px; }
  .cp-actions { grid-template-columns: 1fr; }
  .cp-stats { grid-template-columns: 1fr 1fr; }
  .cp-segment-grid { grid-template-columns: 1fr; }
  .cp-dl { grid-template-columns: 1fr; }
  .cp-dl dt { padding-bottom: 2px; border-bottom: none; }
  .cp-dl dd { padding-top: 2px; }
  .cp-page-title { font-size: 25px; }

  /* Keep the stepper on one line but let it scroll on small screens */
  .cp-workflow { overflow-x: auto; padding-bottom: 4px; }
  .cp-wf-step { flex: 0 0 128px; }

  .cp-table.cp-responsive, .cp-table.cp-responsive tbody, .cp-table.cp-responsive tr, .cp-table.cp-responsive td { display: block; width: 100%; box-sizing: border-box; }
  .cp-table.cp-responsive thead { display: none; }
  .cp-table.cp-responsive tr { border: 1px solid var(--cp-line); border-radius: var(--cp-radius-md); margin-bottom: 12px; padding: 6px 4px; }
  .cp-table.cp-responsive td { border: none; padding: 8px 16px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
  .cp-table.cp-responsive td::before {
    content: attr(data-label); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--cp-ink-3); flex-shrink: 0;
  }
  .cp-table.cp-responsive td[data-label=""]::before { content: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cp-spinner { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
