/* Source Chart (2026-10-07) - styles for the Analytics > Source Chart
   dashboard (source-chart.html) and the public submission form
   (source-form.html). Built on the app's design tokens (styles.css); only the
   five project-segment colours are new, validated with the dataviz
   validate_palette.js on both surfaces (light #ffffff / dark #161b26). */
:root {
  --sc-seg-1: #2a78d6; /* B2B        */
  --sc-seg-2: #eb6834; /* Exhibitors */
  --sc-seg-3: #1baf7a; /* Attendees  */
  --sc-seg-4: #6250d6; /* Healthcare */
  --sc-seg-5: #e87ba4; /* Technology */
  --sc-hero-a: #0f2a5c;
  --sc-hero-b: #2a78d6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --sc-seg-1: #3987e5; --sc-seg-2: #d95926; --sc-seg-3: #199e70; --sc-seg-4: #9085e9; --sc-seg-5: #d55181; --sc-hero-a: #0b1b3d; --sc-hero-b: #1d4e99; }
}
:root[data-theme="dark"] { --sc-seg-1: #3987e5; --sc-seg-2: #d95926; --sc-seg-3: #199e70; --sc-seg-4: #9085e9; --sc-seg-5: #d55181; --sc-hero-a: #0b1b3d; --sc-hero-b: #1d4e99; }

/* ---------- Dashboard hero ---------- */
.sc-hero {
  /* NOTE: no overflow:hidden here - it clipped the Export dropdown. The
     decorative ring is clipped by its own .sc-hero-bg layer instead. */
  position: relative; z-index: 16; border-radius: var(--radius-xl);
  padding: 26px 28px; margin-bottom: 18px; color: #fff;
  background: radial-gradient(1200px 300px at 90% -40%, rgba(255,255,255,0.22), transparent 60%),
              linear-gradient(120deg, var(--sc-hero-a) 0%, var(--sc-hero-b) 100%);
  box-shadow: var(--shadow-lg);
  display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; justify-content: space-between;
}
.sc-hero-bg { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.sc-hero-bg::after {
  content: ''; position: absolute; right: -60px; bottom: -90px; width: 280px; height: 280px; border-radius: 50%;
  border: 38px solid rgba(255,255,255,0.07);
}
.sc-hero-main { position: relative; min-width: 0; }
.sc-hero-eyebrow { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; opacity: 0.75; }
.sc-hero h2 { margin: 4px 0 6px; font-size: 26px; letter-spacing: -0.02em; font-weight: 800; }
.sc-hero p { margin: 0; font-size: 13.5px; opacity: 0.85; max-width: 520px; line-height: 1.5; }
.sc-hero-controls { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sc-month-nav {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 12px;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.22); backdrop-filter: blur(6px);
}
.sc-month-nav button, .sc-month-nav input {
  background: transparent; border: 0; color: #fff; font: inherit; font-weight: 650; font-size: 13.5px;
  border-radius: 8px; padding: 7px 10px; cursor: pointer;
}
.sc-month-nav button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.sc-month-nav button svg { width: 15px; height: 15px; }
.sc-month-trigger { min-width: 168px; }
.sc-month-trigger .sc-chev { width: 13px; height: 13px; opacity: 0.8; transition: transform 0.14s ease; }
.sc-month-trigger[aria-expanded="true"] .sc-chev { transform: rotate(180deg); }
.sc-month-nav button:hover, .sc-month-nav input:hover { background: rgba(255,255,255,0.16); }
.sc-month-nav button:disabled { opacity: 0.35; cursor: default; background: transparent; }
.sc-month-nav button:focus-visible, .sc-month-nav input:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.sc-btn-ghost {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 10px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; color: #fff; text-decoration: none;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.24);
  transition: background 0.14s ease, transform 0.14s ease;
}
.sc-btn-ghost:hover { background: rgba(255,255,255,0.24); }
.sc-btn-ghost:active { transform: translateY(1px); }
.sc-btn-ghost svg { width: 15px; height: 15px; }
.sc-hero .export-menu .export-menu-btn { background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.24); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.2; padding: 9px 13px; min-height: 37px; border-radius: 10px; gap: 7px; display: inline-flex; align-items: center; box-shadow: none; }
.sc-hero .export-menu .export-menu-btn svg:first-child { width: 15px; height: 15px; }
.sc-hero .export-menu .export-menu-btn:hover { background: rgba(255,255,255,0.24); }

/* ---------- Submission status ---------- */
.sc-status {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 14px 18px; margin-bottom: 18px;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.sc-status-main { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.sc-ring { --p: 0; width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; position: relative;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0); }
.sc-ring::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface-1); }
.sc-ring.full span { font-size: 10px; letter-spacing: -0.02em; }
.sc-ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1; font-size: 11px; font-weight: 750; }
.sc-status-title { font-size: 13.5px; font-weight: 700; }
.sc-status-sub { font-size: 12px; color: var(--text-muted); }
.sc-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.sc-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.sc-chip svg { width: 12px; height: 12px; }
.sc-chip.done { background: var(--status-success-bg); color: var(--status-success-fg); }
.sc-chip.pending { background: var(--status-warning-bg); color: var(--status-warning-fg); }

/* ---------- KPI cards (non-interactive variant) ---------- */
.sc-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.sc-kpi { cursor: default; min-width: 0; }
.sc-kpi:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--border); }
.sc-kpi:hover::after { box-shadow: none; }
.sc-kpi .kpi-value { font-size: 28px; }
.sc-spark { width: 100%; height: 34px; margin-top: 6px; display: block; }
.sc-kpi-foot { display: flex; align-items: center; gap: 8px; min-height: 20px; margin-top: 2px; }
.sc-kpi-foot .kpi-compare-label { font-size: 11.5px; color: var(--text-muted); }
@media (max-width: 1280px) { .sc-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .sc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .sc-kpis { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
.sc-section { margin: 30px 0 14px; display: flex; align-items: center; gap: 12px; }
.sc-section-num {
  width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 12.5px; font-weight: 800; color: #fff; background: var(--accent-grad); box-shadow: var(--shadow-sm);
}
.sc-section h3 { margin: 0; font-size: 16px; letter-spacing: -0.01em; }
.sc-section p { margin: 1px 0 0; font-size: 12.5px; color: var(--text-muted); }
.sc-grid-2 { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px; align-items: stretch; }
.sc-grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.sc-grid-2.sc-grid-proj { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
@media (max-width: 980px) { .sc-grid-2, .sc-grid-2.sc-grid-proj { grid-template-columns: 1fr; } }
.sc-card-note { font-size: 12px; color: var(--text-muted); margin: 12px 0 0; line-height: 1.5; }
.sc-big { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.sc-big-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.sc-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sc-card-head .chart-card-title { margin: 0; }
.chart-card.sc-fill { height: 100%; }
.sc-bars .bar-row-fill.muted { background: var(--baseline) !important; }
.sc-bars .bar-row-label.muted, .sc-bars .bar-row-value.muted { color: var(--text-muted); }
.sc-bars .bar-row { cursor: default; }
.sc-bars .bar-row:hover .bar-row-track { box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.18); }
.sc-empty { color: var(--text-muted); font-size: 13px; padding: 18px 4px; }

/* Project segments: one stacked bar, 2px surface gaps, labels beneath. */
.sc-stack { display: flex; height: 22px; gap: 2px; border-radius: 6px; overflow: hidden; background: var(--surface-2); margin: 14px 0 16px; }
.sc-stack-seg { height: 100%; min-width: 2px; transition: opacity 0.14s ease; cursor: default; }
.sc-stack-seg:first-child { border-radius: 6px 0 0 6px; }
.sc-stack-seg:last-child { border-radius: 0 6px 6px 0; }
.sc-stack:hover .sc-stack-seg:not(:hover) { opacity: 0.45; }
.sc-seg-list { display: grid; gap: 10px; }
.sc-seg-row { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; font-size: 13px; }
.sc-swatch { width: 12px; height: 12px; border-radius: 4px; }
.sc-seg-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.sc-seg-pct { color: var(--text-muted); font-size: 12px; min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.sc-rate { display: flex; align-items: center; gap: 14px; }
.sc-rate .kpi-meter { flex: 1; }

/* ---------- Monthly columns (emails verified) ---------- */
.sc-cols { width: 100%; height: 190px; display: block; }
.sc-col { fill: var(--accent); transition: opacity 0.12s ease; }
.sc-col.current { fill: var(--accent); }
.sc-col.other { fill: var(--accent); opacity: 0.38; }
.sc-col-hit:hover + .sc-col, .sc-col-g:hover .sc-col { opacity: 1; }

/* ---------- Team table ---------- */
.sc-table td, .sc-table th { white-space: nowrap; }
.sc-table td.num, .sc-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.sc-table tfoot td { padding: 13px 16px; font-weight: 750; background: var(--surface-2); border-top: 2px solid var(--border); }
.sc-table tfoot td:first-child { border-left: 3px solid transparent; }
.sc-table tfoot td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sc-team-cell { display: flex; flex-direction: column; gap: 5px; min-width: 170px; }
.sc-team-name { font-weight: 650; }
.sc-share { height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.sc-share > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.sc-table tr.sc-row-click { cursor: pointer; }
.sc-table tr.sc-row-click:hover td { background: var(--surface-2); }
.sc-row-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- Empty state ---------- */
.sc-empty-card {
  text-align: center; padding: 44px 24px; background: var(--surface-1); border: 1px dashed var(--baseline);
  border-radius: var(--radius-xl); margin-bottom: 18px;
}
.sc-empty-card h3 { margin: 12px 0 6px; font-size: 17px; }
.sc-empty-card p { margin: 0 auto 16px; color: var(--text-secondary); font-size: 13.5px; max-width: 460px; line-height: 1.55; }
.sc-empty-icon { width: 54px; height: 54px; border-radius: 16px; margin: 0 auto; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--accent-grad); box-shadow: var(--shadow-md); }
.sc-empty-icon svg { width: 26px; height: 26px; }

/* ---------- Modals (detail + teams) ---------- */
.sc-modal-wide { max-width: 760px; }
.sc-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.sc-detail-stat { background: var(--surface-2); border-radius: var(--radius-md); padding: 10px 12px; }
.sc-detail-stat b { display: block; font-size: 18px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.sc-detail-stat span { font-size: 11.5px; color: var(--text-muted); }
.sc-detail-h { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin: 16px 0 8px; font-weight: 700; }
.sc-kv { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-kv span { background: var(--surface-2); border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.sc-kv b { font-variant-numeric: tabular-nums; }
.sc-team-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.sc-team-row input { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-1); color: var(--text-primary); font: inherit; }
.sc-team-row input:focus { outline: 2px solid rgba(var(--accent-rgb), 0.4); border-color: var(--accent); }
.sc-team-row .meta-line { white-space: nowrap; }
.sc-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-secondary); cursor: pointer; }

/* ======================================================================
   Public submission form (source-form.html)
   ====================================================================== */
.sf-page { min-height: 100vh; background: var(--page-plane); }
.sf-top {
  background: radial-gradient(900px 260px at 85% -50%, rgba(255,255,255,0.2), transparent 60%), linear-gradient(120deg, var(--sc-hero-a), var(--sc-hero-b));
  color: #fff; padding: 20px 24px 86px;
}
.sf-top-inner { max-width: 880px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sf-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.01em; font-size: 16px; }
.sf-brand .brand-mark { background: rgba(255,255,255,0.18); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.3); }
.sf-top .theme-toggle { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); }
.sf-title { max-width: 880px; margin: 26px auto 0; }
.sf-title h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.02em; font-weight: 800; }
.sf-title p { margin: 0; opacity: 0.85; font-size: 14px; max-width: 560px; line-height: 1.55; }
.sf-wrap { max-width: 880px; margin: -58px auto 40px; padding: 0 16px; position: relative; }
.sf-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); padding: 28px; }
@media (max-width: 560px) { .sf-card { padding: 20px 16px; } .sf-title h1 { font-size: 23px; } }

.sf-steps { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.sf-step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 650; color: var(--text-muted); }
.sf-step-dot { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-2); font-size: 11.5px; font-weight: 800; color: var(--text-muted); }
.sf-step.active { color: var(--text-primary); }
.sf-step.active .sf-step-dot { background: var(--accent-grad); color: #fff; box-shadow: var(--shadow-sm); }
.sf-step.done .sf-step-dot { background: var(--status-success-bg); color: var(--status-success-fg); }
.sf-step-line { flex: 1; min-width: 18px; height: 2px; background: var(--border); border-radius: 2px; }
.sf-h { margin: 0 0 4px; font-size: 19px; letter-spacing: -0.01em; }
.sf-sub { margin: 0 0 20px; color: var(--text-secondary); font-size: 13.5px; line-height: 1.55; }
.sf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sf-turnstile { margin: 4px 0 16px; min-height: 65px; }
.sf-otp { display: flex; gap: 8px; justify-content: flex-start; margin: 4px 0 8px; }
.sf-otp input {
  width: 46px; height: 54px; text-align: center; font-size: 22px; font-weight: 750; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--surface-1); color: var(--text-primary); font-variant-numeric: tabular-nums;
}
.sf-otp input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2); }
.sf-otp.error input { border-color: #e34948; }
.sf-resend { font-size: 12.5px; color: var(--text-muted); }
.sf-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 650; color: var(--accent); cursor: pointer; }
.sf-link:disabled { color: var(--text-muted); cursor: default; }
.sf-who { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--surface-2); border-radius: var(--radius-md); padding: 10px 14px; margin-bottom: 20px; font-size: 13px; }
.sf-who b { font-weight: 700; }

.sf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .sf-row { grid-template-columns: 1fr; } }
.sf-section { border: 1px solid var(--border); border-radius: var(--radius-lg); margin: 0 0 14px; background: var(--surface-1); overflow: hidden; }
.sf-section > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 700; font-size: 14.5px;
}
.sf-section > summary::-webkit-details-marker { display: none; }
.sf-section > summary .sc-section-num { width: 26px; height: 26px; font-size: 11.5px; }
.sf-section > summary .sf-sum { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.sf-section > summary .chev { width: 16px; height: 16px; color: var(--text-muted); transition: transform 0.16s ease; flex-shrink: 0; }
.sf-section[open] > summary .chev { transform: rotate(180deg); }
.sf-section[open] > summary { border-bottom: 1px solid var(--border); }
.sf-section.has-error { border-color: #e34948; }
.sf-body { padding: 16px; }
.sf-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--text-secondary); }
.sf-field .hint { font-weight: 450; color: var(--text-muted); }
.sf-input, .sf-field select, .sf-field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-1);
  color: var(--text-primary); font: inherit; font-size: 14px; font-variant-numeric: tabular-nums;
}
.sf-input:focus, .sf-field select:focus, .sf-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18); }
.sf-field.err .sf-input, .sf-field.err select { border-color: #e34948; }
.sf-err { color: #c0342f; font-size: 12px; margin-top: 4px; min-height: 0; }
:root[data-theme="dark"] .sf-err { color: #f7a3a1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sf-err { color: #f7a3a1; } }
.sf-field { margin-bottom: 14px; }
.sf-sub-h { font-size: 13px; font-weight: 700; margin: 18px 0 4px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sf-sub-h .sf-tally { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.sf-sub-h .sf-tally.bad { color: #c0342f; }
.sf-bucket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; }
.sf-bucket label { font-size: 12.5px; margin-bottom: 4px; }
.sf-list-row { display: grid; grid-template-columns: 1fr 140px 34px; gap: 8px; margin-bottom: 8px; }
.sf-list-row .rm { border: 1px solid var(--border); background: var(--surface-1); border-radius: var(--radius-md); cursor: pointer; color: var(--text-muted); }
.sf-list-row .rm:hover { color: #c0342f; border-color: #e34948; }
@media (max-width: 460px) { .sf-list-row { grid-template-columns: 1fr 100px 34px; } }
.sf-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.sf-note { background: var(--status-info-bg); color: var(--status-info-fg); border-radius: var(--radius-md); padding: 10px 14px; font-size: 12.5px; line-height: 1.5; margin-bottom: 16px; }
.sf-note.warn { background: var(--status-warning-bg); color: var(--status-warning-fg); }
.sf-total-line { display: flex; align-items: center; justify-content: space-between; background: var(--surface-2); border-radius: var(--radius-md); padding: 10px 14px; font-size: 13px; margin-top: 4px; }
.sf-total-line b { font-size: 18px; font-variant-numeric: tabular-nums; }
.sf-success { text-align: center; padding: 18px 0 6px; }
.sf-success .tick { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; background: var(--status-success-bg); color: var(--status-success-fg); }
.sf-success .tick svg { width: 32px; height: 32px; }
.sf-success h2 { margin: 0 0 6px; font-size: 21px; }
.sf-success p { margin: 0 auto 18px; max-width: 420px; color: var(--text-secondary); font-size: 14px; line-height: 1.55; }
.sf-foot { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 18px; }
.sf-banner { margin-bottom: 16px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.status-pill.pending { background: var(--status-warning-bg); color: var(--status-warning-fg); font-size: 11.5px; }
.sf-input-bad { border-color: #e34948 !important; }

.sc-bars .bar-row { grid-template-columns: minmax(96px, 170px) minmax(40px, 1fr) auto 44px; }
.sc-bars .bar-row-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-top .theme-toggle-btn { color: rgba(255,255,255,0.75); }
.sf-top .theme-toggle-btn[aria-pressed="true"] { color: var(--text-primary); }
.sf-turnstile:empty { min-height: 0; margin: 0; }
@media (max-width: 560px) { .sc-bars .bar-row { grid-template-columns: 96px minmax(30px, 1fr) auto; } }
.sf-sub-h { margin-bottom: 8px; }

/* =====================================================================
   Premium navigation layer (2026-10-07b): hero meta, sticky section nav
   with scroll-spy + progress, month picker popover, clickable KPI cards,
   reminder button, back-to-top, print stylesheet.
   ===================================================================== */
[id^="sec-"] { scroll-margin-top: 140px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Hero meta pills */
.sc-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sc-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.2);
}
.sc-pill svg { width: 13px; height: 13px; opacity: 0.9; }
.sc-pill .sc-live { width: 7px; height: 7px; border-radius: 50%; background: #5ee0a8; box-shadow: 0 0 0 3px rgba(94,224,168,0.25); }
.sc-pill.warn .sc-live { background: #ffc857; box-shadow: 0 0 0 3px rgba(255,200,87,0.25); }

/* Sticky section navigation */
.sc-subnav {
  position: sticky; top: 72px; z-index: 15; margin: 0 0 18px; border-radius: 14px;
  background: var(--surface-1); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease, border-color 0.18s ease; overflow: hidden;
}
.sc-subnav.stuck { box-shadow: var(--shadow-lg); border-color: rgba(var(--accent-rgb), 0.25); }
.sc-subnav-inner { display: flex; align-items: center; gap: 12px; padding: 6px 8px 6px 6px; }
.sc-subnav-links { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sc-subnav-links::-webkit-scrollbar { display: none; }
.sc-subnav-links a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: var(--text-secondary); text-decoration: none;
  transition: background 0.14s ease, color 0.14s ease;
}
.sc-subnav-links a i {
  font-style: normal; width: 19px; height: 19px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 800; background: var(--surface-2); color: var(--text-muted); transition: background 0.14s ease, color 0.14s ease;
}
.sc-subnav-links a:hover { background: var(--surface-2); color: var(--text-primary); }
.sc-subnav-links a.active { background: rgba(var(--accent-rgb), 0.12); color: var(--accent); }
.sc-subnav-links a.active i { background: var(--accent); color: #fff; }
.sc-subnav-links a:focus-visible, .sc-subnav-month button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sc-subnav-month { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); flex-shrink: 0; }
.sc-subnav-month button {
  border: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: 12.5px; font-weight: 650;
  border-radius: 8px; padding: 6px 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.sc-subnav-month button svg { width: 14px; height: 14px; }
.sc-subnav-month button:hover { background: var(--surface-1); box-shadow: var(--shadow-sm); }
.sc-subnav-month button:disabled { opacity: 0.35; cursor: default; background: transparent; box-shadow: none; }
.sc-nm-label { min-width: 84px; }
.sc-subnav-progress { height: 2px; background: transparent; }
.sc-subnav-progress span { display: block; height: 100%; width: 0; background: var(--accent-grad); transition: width 0.08s linear; }
.sc-subnav.hidden { display: none; }
@media (max-width: 760px) { .sc-nm-label { min-width: 64px; } .sc-subnav-links a { padding: 8px 11px; } }

/* Month picker popover */
.sc-monthpop {
  position: fixed; z-index: 60; width: 292px; padding: 12px; border-radius: 14px;
  background: var(--surface-1); border: 1px solid var(--border); box-shadow: var(--shadow-xl); color: var(--text-primary);
  animation: sc-pop-in 0.14s ease;
}
.sc-monthpop.hidden { display: none; }
@keyframes sc-pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
.sc-mp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sc-mp-head b { font-size: 14.5px; letter-spacing: -0.01em; }
.sc-mp-head button {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-1); color: var(--text-primary);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.sc-mp-head button svg { width: 15px; height: 15px; }
.sc-mp-head button:hover:not(:disabled) { background: var(--surface-2); }
.sc-mp-head button:disabled { opacity: 0.35; cursor: default; }
.sc-mp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sc-mp-grid button {
  position: relative; padding: 11px 0 10px; border-radius: 10px; border: 1px solid transparent; background: var(--surface-2);
  color: var(--text-primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.sc-mp-grid button:hover:not(:disabled) { border-color: rgba(var(--accent-rgb), 0.45); }
.sc-mp-grid button.cur { border-color: var(--baseline); }
.sc-mp-grid button.sel { background: var(--accent); color: #fff; border-color: var(--accent); }
.sc-mp-grid button:disabled { opacity: 0.35; cursor: default; }
.sc-mp-grid button.has::after {
  content: ''; position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; transform: translateX(-50%);
  background: var(--series-3);
}
.sc-mp-grid button.sel.has::after { background: #fff; }
.sc-mp-foot { display: flex; gap: 8px; margin-top: 10px; }
.sc-mp-foot button {
  flex: 1; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-1); color: var(--text-primary);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.sc-mp-foot button:hover:not(:disabled) { background: var(--surface-2); }
.sc-mp-foot button:disabled { opacity: 0.4; cursor: default; }
.sc-mp-legend { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-muted); line-height: 1.7; }
.sc-mp-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--series-3); vertical-align: middle; }
.sc-mp-legend kbd {
  font: inherit; font-size: 10.5px; font-weight: 700; padding: 0 5px; border-radius: 5px; border: 1px solid var(--border); background: var(--surface-2);
}

/* KPI cards double as shortcuts to their section */
.sc-kpi[data-jump] { cursor: pointer; }
.sc-kpi[data-jump]:hover { border-color: rgba(var(--accent-rgb), 0.45); box-shadow: var(--shadow-md); }
.sc-kpi[data-jump]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Status strip: reminder action + loading state */
.sc-status-actions { margin-left: auto; display: flex; gap: 8px; }
#dash { transition: opacity 0.18s ease; }
#dash.sc-loading { opacity: 0.45; pointer-events: none; }

/* Back to top */
.sc-totop {
  position: fixed; right: 22px; bottom: 22px; z-index: 30; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface-1); color: var(--text-primary); box-shadow: var(--shadow-lg); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: transform 0.14s ease, background 0.14s ease;
}
.sc-totop svg { width: 18px; height: 18px; }
.sc-totop:hover { background: var(--surface-2); transform: translateY(-2px); }
.sc-totop.hidden { display: none; }

/* Print / save as PDF */
@media print {
  @page { margin: 12mm; }
  .sidebar, .topbar, .sidebar-toggle, .sidebar-backdrop, .breadcrumbs, .sc-subnav, .sc-hero-controls, .sc-totop, .sc-monthpop,
  .sc-status-actions, .sc-row-actions, #banner, .modal-overlay, .notif-toast-wrap { display: none !important; }
  .app-main { margin-left: 0 !important; }
  .content { padding: 0 !important; }
  body, .app-shell { background: #fff !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; box-shadow: none !important; }
  .sc-hero { padding: 16px 18px; margin-bottom: 12px; }
  .chart-card, .sc-kpi, .table-wrap, .sc-status { break-inside: avoid; }
  .sc-section { break-after: avoid; margin-top: 18px; }
  .sc-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .sc-grid-2 { grid-template-columns: 1fr 1fr; }
  #dash.sc-loading { opacity: 1; }
}


/* =====================================================================
   Form + dashboard changes (2026-10-09): reporter name, rich-text industry,
   with/without breakdown modes, reporter-based status.
   ===================================================================== */
.sf-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sf-mode { margin-bottom: 12px; max-width: 320px; }
.sf-mode select { font-weight: 600; }

/* Rich-text editor (Industry) */
.sf-rte { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-1); overflow: hidden; }
.sf-rte:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18); }
.sf-field.err .sf-rte { border-color: #e34948; }
.sf-rte-bar { display: flex; align-items: center; gap: 2px; padding: 5px 6px; background: var(--surface-2); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.sf-rte-bar button {
  width: 30px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--text-secondary); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font: inherit; font-size: 14px;
}
.sf-rte-bar button svg { width: 16px; height: 16px; }
.sf-rte-bar button:hover { background: var(--surface-1); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.sf-rte-bar button.on { background: rgba(var(--accent-rgb), 0.16); color: var(--accent); }
.sf-rte-bar button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sf-rte-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.sf-rte-area { min-height: 120px; max-height: 320px; overflow-y: auto; padding: 10px 12px; font-size: 14px; line-height: 1.55; color: var(--text-primary); outline: none; position: relative; word-break: break-word; }
.sf-rte-area.is-empty::before { content: attr(data-placeholder); color: var(--text-muted); white-space: pre-line; pointer-events: none; display: block; position: absolute; }
.sf-rte-area p, .sf-rte-area div { margin: 0 0 6px; }
.sf-rte-area ul, .sf-rte-area ol { margin: 0 0 6px; padding-left: 22px; }
.sf-rte-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 5px; font-size: 12px; color: var(--text-muted); }
.sf-count.bad { color: #c0342f; font-weight: 700; }

/* Dashboard: reporter chips / count badge, text answers, rich notes */
.sc-count {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--accent-grad); color: #fff; font-size: 17px; font-weight: 800; box-shadow: var(--shadow-sm);
}
.sc-textnotes { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.sc-textnotes h4 { margin: 0 0 8px; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.sc-note-item { padding: 8px 10px; border-radius: var(--radius-md); background: var(--surface-2); margin-bottom: 6px; font-size: 13px; line-height: 1.5; }
.sc-note-item b { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 2px; }
.sc-note-item small { color: var(--text-muted); font-weight: 500; }
.sc-rich { overflow-wrap: anywhere; }
.sc-industry-notes .sc-rich, .sc-note-item .sc-rich { max-height: 320px; overflow-y: auto; }
@media print { .sc-industry-notes .sc-rich, .sc-note-item .sc-rich { max-height: none; overflow: visible; } }
.sc-rich p { margin: 0 0 4px; }
.sc-rich ul, .sc-rich ol { margin: 0 0 4px; padding-left: 20px; }
.sc-rich li { margin: 1px 0; }
.sc-industry-notes .sc-note-item { margin-bottom: 8px; }
.sc-industry-empty { color: var(--text-muted); font-size: 13px; margin: 0; }
