/* ── Roblec Client Portal — Brand Styles ──
   Derived from askroblec.com visual identity.
   Colors, fonts, and spacing match the main site. */

:root {
  /* Brand palette (from askroblec.com) */
  --color-navy: #0A1628;
  --color-navy-light: #8A94A6;
  --color-yellow: #E8C840;
  --color-white: #FFFFFF;
  --color-warm-gray: #F4F3F0;
  --color-slate: #5A6677;
  --color-rule: #D8D8D4;
  --color-ink: #111111;
  --color-footer-navy: #0D1B2E;

  /* Dashboard palette (from report template) */
  --bg: #F5F0E8;
  --bg-warm: #EDE8DD;
  --surface: #FFFFFF;
  --navy: #1A1A2E;
  --navy-muted: #4A4A64;
  --gold: #C4912E;
  --gold-bg: #F0E0C0;
  --gold-hover: #B3821F;
  --text: #1A1A2E;
  --text-secondary: #6B6B7B;
  --text-muted: #9B9BA8;
  --border: #DDD8CE;
  --border-light: #E8E3DA;
  --green: #2D7A4F;
  --green-bg: #E8F5ED;
  --red: #A83232;
  --red-bg: #FAEAEA;
  --amber: #8B6914;
  --amber-bg: #FFF4D6;

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
::selection { background: var(--gold-bg); color: var(--navy); }

/* ── LOGIN PAGE ── */
.login-page {
  background: var(--color-navy);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: var(--color-white);
  width: 100%;
  max-width: 420px;
  padding: 48px 40px;
  border-radius: 2px;
  box-shadow: 4px 4px 0 0 rgba(0,0,0,0.15);
  border: 1.5px solid var(--color-rule);
}

.login-logo {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-navy);
  text-align: center;
  margin-bottom: 8px;
}

.login-subtitle {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--color-slate);
  text-align: center;
  margin-bottom: 36px;
}

.login-field {
  margin-bottom: 20px;
}

.login-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.login-field input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--font-sans);
  background: var(--color-warm-gray);
  border: 1.5px solid var(--color-rule);
  border-radius: 2px;
  color: var(--color-navy);
  outline: none;
  transition: border-color 0.15s;
}

.login-field input:focus {
  border-color: var(--color-navy);
  background: var(--color-white);
}

.login-btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  background: var(--color-yellow);
  color: var(--color-navy);
  border: 2px solid var(--color-navy);
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 3px 3px 0 0 var(--color-ink);
  transition: all 0.15s;
  margin-top: 8px;
}

.login-btn:hover {
  box-shadow: 5px 5px 0 0 var(--color-ink);
}

.login-error {
  background: var(--red-bg);
  color: var(--red);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid rgba(168,50,50,0.15);
}

.login-footer {
  text-align: center;
  margin-top: 32px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* ── TOP NAV ── */
.topnav {
  background: var(--navy);
  padding: 0 40px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topnav-logo {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
}

.topnav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topnav-user {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.3px;
}

.topnav-user strong {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}

.topbar-btn {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.3px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-decoration: none;
}

.topbar-btn:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}

.topnav-cta {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 7px 18px;
  border-radius: 2px;
  background: var(--gold);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
  text-decoration: none;
}

.topnav-cta:hover { background: var(--gold-hover); }

/* ── PAGE TABS ── */
.page-tabs {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
}

.page-tab {
  padding: 14px 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

.page-tab:hover { color: var(--text-secondary); }
.page-tab.active { color: var(--navy); border-bottom-color: var(--navy); font-weight: 600; }

/* ── LAYOUT ── */
.container { max-width: 1280px; margin: 0 auto; padding: 32px 40px 60px; }

/* ── REPORT HEADER ── */
.report-header { margin-bottom: 32px; }
.report-title {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 6px;
}

.report-meta {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.2px;
  margin-bottom: 16px;
}

.report-context {
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--navy);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
  border-radius: 0 4px 4px 0;
}

.report-context strong { color: var(--navy); font-weight: 600; }

/* ── CONTROLS BAR ── */
.controls-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.control-group { display: flex; align-items: center; gap: 8px; }
.control-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

select {
  padding: 6px 28px 6px 10px;
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239B9BA8' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

select:focus { border-color: var(--navy); }

.filter-group { display: flex; gap: 0; }
.filter-btn {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.filter-btn:not(:first-child) { border-left: none; }
.filter-btn:first-child { border-radius: 4px 0 0 4px; }
.filter-btn:last-child { border-radius: 0 4px 4px 0; }
.filter-btn:hover { color: var(--text-secondary); background: var(--bg-warm); }
.filter-btn.active { color: var(--navy); background: var(--bg-warm); font-weight: 600; border-color: var(--border); }

/* ── KPI CARDS ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px 24px;
  transition: border-color 0.15s;
}

.kpi-card:hover { border-color: var(--navy); }
.kpi-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.kpi-value {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--navy);
  letter-spacing: -0.3px;
}

.kpi-delta { font-size: 11px; font-weight: 600; margin-top: 4px; }
.kpi-delta.up { color: var(--green); }
.kpi-delta.down { color: var(--red); }
.kpi-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.conf-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; }
.conf-h { background: var(--green); }
.conf-m { background: var(--amber); }
.conf-l { background: var(--red); }

/* ── PANELS ── */
.panel-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.panel-row.single { grid-template-columns: 1fr; }
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.panel-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-title { font-size: 12px; font-weight: 600; letter-spacing: 0.3px; color: var(--navy); }
.panel-badge {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
}

.badge-modeled { background: var(--amber-bg); color: var(--amber); }
.badge-measured { background: var(--green-bg); color: var(--green); }
.panel-body { padding: 16px 20px; }
.chart-wrap { position: relative; height: 240px; }
.chart-wrap.short { height: 200px; }
.chart-wrap.tall { height: 280px; }

/* ── VIEWS ── */
.view { display: none; animation: viewIn 0.25s ease; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ── TABLES ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.data-table th:hover { color: var(--text-secondary); }
.data-table th .sort-arrow { margin-left: 3px; opacity: 0.3; font-size: 9px; }
.data-table th.sorted .sort-arrow { opacity: 1; color: var(--navy); }
.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  color: var(--text-secondary);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.1s; cursor: pointer; }
.data-table tbody tr:hover { background: var(--bg-warm); }
.brand-cell { display: flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 500; }
.brand-marker { width: 3px; height: 14px; border-radius: 1px; flex-shrink: 0; }
.delta { font-size: 11px; font-weight: 600; }
.delta.pos { color: var(--green); }
.delta.neg { color: var(--red); }
.share-bar { display: flex; align-items: center; gap: 8px; min-width: 100px; }
.share-track { flex: 1; height: 3px; background: var(--border-light); border-radius: 2px; overflow: hidden; }
.share-fill { height: 100%; background: var(--navy); border-radius: 2px; }
.share-val { font-size: 11px; min-width: 36px; color: var(--text-secondary); }
.mix-text { font-size: 10px; color: var(--text-muted); }

/* ── ACTIVITY FEED ── */
.feed-list { display: flex; flex-direction: column; }
.feed-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}

.feed-row:last-child { border-bottom: none; }
.feed-row:hover { background: var(--bg-warm); }
.feed-date { font-size: 11px; color: var(--text-muted); padding-top: 1px; font-variant-numeric: tabular-nums; }
.feed-headline { font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 4px; line-height: 1.4; }
.feed-detail { font-size: 11px; color: var(--text-muted); line-height: 1.7; }
.feed-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.feed-tag {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 8px;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.feed-signal { font-size: 11px; font-weight: 600; padding-top: 1px; white-space: nowrap; }
.signal-up { color: var(--green); }
.signal-down { color: var(--red); }
.signal-new { color: var(--gold); }
.signal-neutral { color: var(--text-secondary); }

/* ── DEEP DIVE ── */
.dd-selector { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.dd-btn {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dd-btn:hover { border-color: var(--navy); color: var(--text-secondary); }
.dd-btn.active { color: var(--navy); background: var(--bg-warm); border-color: var(--navy); font-weight: 600; }
.dd-btn .dd-marker { width: 3px; height: 12px; border-radius: 1px; display: inline-block; }

.dd-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.dd-brand-name { font-family: var(--font-serif); font-size: 28px; font-weight: 400; color: var(--navy); }
.dd-brand-meta { font-size: 12px; color: var(--text-muted); }

.context-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.context-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 20px;
}

.context-label { font-size: 10px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.context-value { font-family: var(--font-serif); font-size: 22px; color: var(--navy); }
.context-vs { font-size: 10px; margin-top: 4px; color: var(--text-muted); }
.vs-up { color: var(--green); }
.vs-down { color: var(--red); }

/* ── METHODOLOGY ── */
.methodology {
  margin-top: 40px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.methodology h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.methodology p { font-size: 11px; color: var(--text-muted); line-height: 1.7; margin-bottom: 6px; }
.methodology strong { color: var(--text-secondary); }
.conf-legend { display: flex; gap: 20px; margin-top: 10px; }
.conf-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-secondary); }

/* ── FOOTER ── */
.dashboard-footer {
  text-align: center;
  padding: 24px;
  font-size: 10px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 40px;
  letter-spacing: 0.3px;
}

/* ── ADMIN PAGE ── */
.admin-header {
  margin-bottom: 32px;
}

.admin-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 6px;
}

.admin-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.admin-section {
  margin-bottom: 32px;
}

.admin-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.dashboard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px 24px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: block;
}

.dashboard-card:hover {
  border-color: var(--navy);
  box-shadow: 2px 2px 0 0 rgba(0,0,0,0.08);
}

.dashboard-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.dashboard-card-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.dashboard-card-id {
  font-size: 10px;
  font-family: monospace;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 8px;
  display: inline-block;
}

/* ── ERROR PAGE ── */
.error-page {
  text-align: center;
  padding: 80px 40px;
}

.error-page h1 {
  font-family: var(--font-serif);
  font-size: 48px;
  color: var(--navy);
  margin-bottom: 12px;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.error-page a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}

/* ── UX REMEDIATION (wave 2) ──
   Channel-filter honesty, KPI click-through, onboarding hints,
   export buttons, and the demoted Demand Context (traffic) section. */

/* Channel filter status banner (P1) */
.filter-banner {
  margin: -8px 0 24px;
  padding: 10px 14px;
  background: var(--amber-bg);
  border: 1px solid rgba(139,105,20,0.25);
  border-radius: 4px;
  font-size: 11px;
  color: var(--amber);
  line-height: 1.7;
}

.filter-banner strong { font-weight: 700; }
.filter-why {
  border-bottom: 1px dotted var(--amber);
  cursor: help;
  font-weight: 600;
}

/* "This panel ignores the channel filter" badge — visible only while filtering */
.filter-na {
  display: none;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 8px;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 3px;
  white-space: nowrap;
}

body.channel-filtered .filter-na { display: inline-block; }

/* Selected channel emphasis in the spend-table mix column */
.mix-hl { color: var(--navy); font-weight: 700; font-size: 11px; }

/* Panel header action cluster (badge + export button) */
.panel-actions { display: flex; align-items: center; gap: 8px; }

/* Export buttons (P5) */
.export-btn {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}

.export-btn:hover { color: var(--navy); border-color: var(--navy); }

/* Clickable KPI cards (P3) */
.kpi-clickable { cursor: pointer; }
.kpi-clickable:hover { border-color: var(--navy); box-shadow: 2px 2px 0 0 rgba(0,0,0,0.06); }
.kpi-clickable:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.kpi-hint {
  font-size: 10px;
  font-weight: 600;
  color: var(--gold);
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.15s;
}

.kpi-clickable:hover .kpi-hint,
.kpi-clickable:focus-visible .kpi-hint { opacity: 1; }

/* Definition tooltips (P4) — dotted underline signals "hover me" */
.has-tip { border-bottom: 1px dotted var(--text-muted); cursor: help; }
.conf-dot[title] { cursor: help; }
.panel-badge[title] { cursor: help; }

/* Start-here hint (P4) */
.start-hint {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 4px 4px 0;
  padding: 12px 44px 12px 16px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.start-hint strong { color: var(--navy); }
.start-hint .hint-link {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
}

.start-hint-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 16px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
}

.start-hint-close:hover { color: var(--navy); }

/* Demand Context — collapsed traffic section inside Spend Analysis (C3) */
.context-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 16px;
}

.context-section > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 20px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.context-section > summary::-webkit-details-marker { display: none; }
.context-section > summary:hover .context-summary-title { color: var(--gold-hover); }
.context-summary-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--navy);
  white-space: nowrap;
  transition: color 0.15s;
}

.context-summary-sub { font-size: 11px; color: var(--text-muted); flex: 1; min-width: 200px; line-height: 1.6; }
.context-chevron { font-size: 10px; color: var(--text-muted); margin-left: auto; transition: transform 0.15s; }
.context-section[open] .context-chevron { transform: rotate(180deg); }
.context-section-body { padding: 16px 20px 4px; border-top: 1px solid var(--border-light); }
.context-section-body .panel-row { margin-bottom: 16px; }

/* Activity feed empty state when the channel filter matches nothing (P1) */
.feed-empty {
  padding: 32px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}

.feed-empty-reset {
  background: none;
  border: none;
  border-bottom: 1px solid var(--gold);
  color: var(--navy);
  font-weight: 600;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .context-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-row { grid-template-columns: 1fr; }
  .topnav { padding: 0 16px; }
  .page-tabs { padding: 0 16px; }
  .feed-row { grid-template-columns: 80px 1fr auto; gap: 12px; }
}

@media (max-width: 600px) {
  .container { padding: 20px 16px 40px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .context-grid { grid-template-columns: 1fr; }
  .login-card { padding: 36px 24px; }
  .report-title { font-size: 28px; }
  .dd-header { flex-direction: column; gap: 4px; }
  .feed-row { grid-template-columns: 1fr; gap: 8px; }
  .topnav-user { display: none; }
}

/* ── DATA METHODOLOGY PASS (wave 3) ──
   Sample-data banner, honest-badging support, platform detections, feed framing,
   taxonomy note, and the /methodology page. Appended only — no earlier rules edited. */

/* Sample-data status banner — under the top nav, above the tabs; dismiss is per page-load */
.data-status-banner {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--amber-bg); border-bottom: 1px solid var(--border);
  padding: 8px 40px; font-size: 12px; color: var(--amber); line-height: 1.5;
}
.data-status-banner strong { font-weight: 700; }
.data-status-close {
  background: none; border: none; color: var(--amber); font-size: 16px; line-height: 1;
  cursor: pointer; padding: 2px 6px; flex-shrink: 0;
}
.data-status-close:hover { color: var(--gold-hover); }

/* Point-of-use positioning note (C4) at the top of a view */
.view-note {
  font-size: 12px; color: var(--text-secondary); line-height: 1.7;
  background: var(--surface); border: 1px solid var(--border-light); border-left: 3px solid var(--gold);
  border-radius: 4px; padding: 10px 14px; margin-bottom: 16px;
}

/* Caption under a chart explaining what the visual does / doesn't support (S2) */
.panel-caption {
  font-size: 10px; color: var(--text-muted); line-height: 1.6;
  padding: 8px 2px 0; border-top: 1px dashed var(--border-light); margin-top: 10px;
}

/* Feed header framing (C2 + C4) */
.feed-note { padding: 12px 20px; border-bottom: 1px solid var(--border-light); }
.feed-note p { font-size: 11px; color: var(--text-muted); line-height: 1.7; margin: 0 0 4px; }
.feed-note p:last-child { margin-bottom: 0; }

/* Per-event detection timing line (C2) */
.feed-detected { font-size: 10px; color: var(--text-muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.feed-illustrative {
  display: inline-block; font-size: 9px; font-weight: 600; letter-spacing: 0.4px;
  text-transform: uppercase; color: var(--amber); background: var(--amber-bg);
  border-radius: 3px; padding: 0 5px; margin-left: 4px; cursor: help;
}

/* Taxonomy note inside Demand Context (S5) */
.taxonomy-note {
  font-size: 11px; color: var(--text-secondary); line-height: 1.7;
  background: var(--bg-warm); border: 1px solid var(--border-light); border-radius: 4px;
  padding: 10px 14px; margin-bottom: 16px;
}
.taxonomy-note strong { color: var(--navy); }
.taxonomy-note em { font-style: normal; font-weight: 600; color: var(--navy-muted); }

/* New Platform Detections panel (C1) */
.pd-intro { font-size: 11px; color: var(--text-muted); line-height: 1.7; padding: 12px 20px; border-bottom: 1px solid var(--border-light); }
.pd-list { display: flex; flex-direction: column; }
.pd-row {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 16px; align-items: center;
  padding: 12px 20px; border-bottom: 1px solid var(--border-light);
}
.pd-row:last-child { border-bottom: none; }
.pd-row:hover { background: var(--bg-warm); }
.pd-brand { font-size: 12px; font-weight: 600; color: var(--navy); }
.pd-platform { font-size: 13px; font-weight: 600; color: var(--navy); }
.pd-dates { font-size: 10px; color: var(--text-muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.pd-status { font-size: 11px; font-weight: 600; text-align: right; max-width: 260px; line-height: 1.5; }
.pd-active { color: var(--green); }
.pd-ceased { color: var(--red); }

/* Methodology link + page */
.method-link { font-size: 11px; font-weight: 600; color: var(--gold-hover); text-decoration: none; display: inline-block; margin-top: 10px; }
.method-link:hover { text-decoration: underline; }
.method-page { max-width: 860px; }
.method-section {
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 24px 28px; margin-bottom: 20px;
}
.method-section h2 {
  font-family: var(--font-serif); font-size: 20px; font-weight: 400; color: var(--navy);
  margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px;
}
.method-num {
  font-family: var(--font-sans); font-size: 11px; font-weight: 700; color: var(--gold);
  border: 1px solid var(--gold); border-radius: 50%; width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  position: relative; top: -2px;
}
.method-section p { font-size: 12px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 10px; }
.method-section p:last-child { margin-bottom: 0; }
.method-section ul { margin: 0 0 10px 18px; }
.method-section li { font-size: 12px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 8px; }
.method-section strong { color: var(--navy); }
.method-caveat { font-size: 11px; color: var(--text-muted); font-style: italic; }
.method-q { font-family: var(--font-serif); font-size: 15px; color: var(--navy); }
.method-vs-table { margin-top: 12px; }
.method-vs-table th:first-child { width: 110px; }
.method-vs-table td { vertical-align: top; font-size: 11px; line-height: 1.6; }
.method-vs-table tbody tr { cursor: default; }
.method-vs-table tbody tr:hover { background: none; }
.method-vs-label { font-weight: 600; color: var(--navy); }
.method-back { margin: 4px 0 8px; }
