:root {
  --bg: #e8e8e5;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --ink: #0e1014;
  --muted: #5b6068;
  --line: #dcdfe3;
  --accent-a: #3f83f8;
  --accent-b: #1a56db;
  --accent-c: #1e429f;
  --accent-d: #8a8f96;
  --shadow: none;
  --report-paper: #ffffff;
  --report-paper-2: #fafaf9;
  --report-paper-3: #f4f4f2;
  --report-ink: #0e1014;
  --report-ink-2: #2a2d33;
  --report-ink-3: #5b6068;
  --report-muted: #8a8f96;
  --report-line: #dcdfe3;
  --report-line-2: #eaecef;
  --report-accent: #1a56db;
  --report-pos: #057a55;
  --report-neg: #c81e1e;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
}

body [hidden] {
  display: none !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(14, 16, 20, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 16, 20, 0.018) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.52), transparent 92%);
}

.shell {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 24px 56px;
}

.app-shell {
  display: block;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 16px;
}

.auth-card {
  width: min(1040px, 100%);
  padding: 32px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.auth-card h1 {
  max-width: 11ch;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.auth-panel {
  padding: 24px;
  border-radius: 22px;
  border: 1px solid rgba(47, 107, 47, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(119, 184, 42, 0.08));
}

.auth-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.auth-button,
.sign-out-button,
.auth-link-button {
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-button {
  min-height: 52px;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 0;
}

.auth-button-primary {
  background: var(--accent-b);
  color: #fff;
}

.auth-button-secondary {
  background: var(--ink);
  color: #fff;
}

.auth-button:disabled,
.auth-form input:disabled {
  cursor: progress;
  opacity: 0.68;
}

.auth-feedback {
  min-height: 28px;
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.auth-feedback.has-message {
  padding: 12px 14px;
  border: 1px solid rgba(47, 107, 47, 0.14);
  background: rgba(255, 255, 255, 0.72);
}

.auth-feedback.is-error {
  color: #92400e;
  border-color: rgba(146, 64, 14, 0.24);
  background: rgba(255, 251, 235, 0.9);
}

.auth-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.auth-link-button,
.sign-out-button {
  padding: 12px 16px;
  border-radius: 0;
  background: var(--report-paper-2);
  color: var(--ink);
}

.session-bar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  max-width: 940px;
  margin: 20px auto 0;
  padding: 8px 0;
  border-radius: 0;
}

.session-bar.card {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

.session-copy-block {
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.session-bar .eyebrow {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.25;
}

.session-bar strong {
  display: inline;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.25;
}

.session-copy {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.session-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}

.session-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 0;
  background: var(--report-paper-2);
  border: 1px solid var(--line);
  color: var(--accent-b);
  font-size: 0.84rem;
  font-weight: 700;
}

.session-bar .sign-out-button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid transparent;
  background: rgba(19, 38, 26, 0.06);
  font-size: 0.84rem;
}

.hero {
  display: none;
  max-width: 940px;
  margin: 32px auto 22px;
  padding: 56px 72px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
}

.brand-name {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-badge {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  color: var(--accent-b);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-b);
  font-size: 12px;
  font-weight: 700;
}

h1, h2, h3 {
  font-family: "Source Serif 4", Georgia, serif;
  margin: 0;
  line-height: 1;
}

h1 {
  font-size: clamp(2.6rem, 5.6vw, 5rem);
  margin-bottom: 16px;
  max-width: 9ch;
}

.hero h1 {
  max-width: min(100%, 22ch);
}

h2 {
  font-size: 1.65rem;
  margin-bottom: 4px;
}

h3 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.lede, .subtle, label, table {
  color: var(--muted);
}

.lede {
  max-width: 58ch;
  font-size: 1.08rem;
  line-height: 1.62;
}

.card,
.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow);
}

.card {
  padding: 22px;
}

.controls {
  display: grid;
  gap: 18px;
  max-width: 940px;
  margin-right: auto;
  margin-left: auto;
  margin-bottom: 20px;
  padding: 24px;
  border-top: 1.5px solid var(--ink);
}

.controls-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.controls h2 {
  font-family: "Inter", "Avenir Next", sans-serif;
  font-size: 1.2rem;
  line-height: 1.2;
}

.controls-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.view-mode-toggle {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--report-paper-2);
}

.view-mode-toggle button,
.export-button {
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.view-mode-toggle button {
  padding: 10px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  transition: none;
}

.view-mode-toggle button.is-active {
  background: var(--accent-b);
  color: #fff;
}

.export-button {
  padding: 12px 18px;
  border-radius: 0;
  background: var(--ink);
  color: #fff;
  transition: transform 160ms ease, opacity 160ms ease;
}

.export-button[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
}

.export-button:not([disabled]):hover {
  transform: translateY(-1px);
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.control-field {
  min-width: 0;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 44px;
}

.report-summary {
  display: block;
  margin-bottom: 20px;
}

.partner-report-document {
  display: block;
  max-width: 940px;
  margin: 0 auto;
  padding: 56px 72px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.18), 0 2px 6px -2px rgba(0, 0, 0, 0.06);
}

.report-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 22px;
  align-items: start;
}

.report-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--accent-b);
  font-size: 0.88rem;
  font-weight: 700;
}

.report-brand-logo {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.lede.compact {
  max-width: 50ch;
  margin-top: 12px;
  font-size: 1rem;
}

.report-meta {
  display: grid;
  gap: 12px;
}

.report-meta-item {
  padding: 16px 18px;
  border-radius: 0;
  background: var(--report-paper-2);
  border: 1px solid var(--line);
}

.report-meta-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-meta-item strong {
  color: var(--ink);
  font-size: 1.1rem;
}

.report-highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.report-highlight {
  padding: 16px 18px;
  border-radius: 0;
  background: var(--report-paper);
  border: 1px solid var(--line);
}

.report-highlight span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-highlight strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
}

.report-highlight small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.control-note {
  margin: 0;
  padding: 14px 16px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.controls-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 0;
  background: var(--report-paper-2);
  border: 1px solid var(--line);
  color: var(--accent-b);
  font-size: 0.88rem;
  font-weight: 700;
}

.status-chip.is-loading {
  background: rgba(119, 184, 42, 0.12);
}

.status-chip.is-loading::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  animation: pulseDot 1.15s ease-in-out infinite;
}

.status-copy {
  margin: 0;
}

label {
  display: block;
  margin-bottom: 9px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

select,
input[type="date"] {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: 0;
  color: var(--ink);
  font: inherit;
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

select {
  appearance: none;
}

select:focus,
input[type="date"]:focus {
  outline: none;
  border-color: rgba(47, 107, 47, 0.28);
  box-shadow:
    0 0 0 4px rgba(119, 184, 42, 0.12),
    inset 0 1px 0 rgba(47, 107, 47, 0.04);
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.preset-label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.preset-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preset-group button {
  border: 1px solid rgba(47, 107, 47, 0.12);
  background: var(--report-paper);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 0;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: none;
}

.preset-group button:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 107, 47, 0.2);
}

.preset-group button.is-active {
  background: var(--accent-b);
  color: #fff;
  border-color: transparent;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.kpi {
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: var(--accent-b);
}

.kpi .label {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.kpi .value {
  display: block;
  margin-top: 12px;
  font-size: 2rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 400;
  color: var(--ink);
}

.kpi .hint {
  display: block;
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--muted);
}

.layout-two {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.layout-two > * {
  min-width: 0;
}

.bottom-layout {
  gap: 28px;
  margin-top: 26px;
}

body.partner-report-mode #story-grid .card:last-child,
body.partner-report-mode #partner-overview-card {
  display: none;
}

body.partner-report-mode .hero-copy {
  min-height: 0;
}

body.partner-report-mode #partner-layout {
  grid-template-columns: 1fr;
}

body.partner-report-mode .report-summary {
  display: block;
}

.chart-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  margin-bottom: 16px;
}

.section-subhead {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin: 20px 0 14px;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.spotlight-card {
  padding: 14px 0;
  border-radius: 0;
  background: var(--report-paper);
  border: 0;
  border-bottom: 1px solid var(--report-line-2);
}

.spotlight-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.spotlight-value {
  display: block;
  margin-bottom: 8px;
  font-size: 1.75rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 400;
  color: var(--accent-b);
}

.spotlight-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.reading-list {
  display: grid;
  gap: 0;
}

.reading-item {
  padding: 14px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--report-line-2);
}

.reading-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.reading-item span {
  color: var(--muted);
  line-height: 1.45;
}

.table-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--report-paper-2);
}

.table-mode-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.table-mode-toggle button.is-active {
  background: var(--accent-b);
  color: #fff;
  box-shadow: none;
}

.chart-wrap {
  flex: 1 1 auto;
  min-width: 0;
  min-height: clamp(360px, 32vw, 560px);
  aspect-ratio: 760 / 300;
  padding: 8px 0 0;
}

#timeline-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

body.partner-report-mode .chart-wrap {
  min-height: clamp(400px, 38vw, 620px);
}

.bars {
  display: grid;
  gap: 12px;
}

.bars.compact {
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 10px;
  align-items: center;
}

.bar-track {
  height: 14px;
  background: rgba(31, 51, 38, 0.08);
  border-radius: 0;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 0;
  background: var(--accent-b);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.legend-swatch {
  width: 13px;
  height: 13px;
  border-radius: 0;
  box-shadow: none;
}

.partner-overview {
  display: grid;
  gap: 12px;
}

.partner-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 0.8fr));
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--report-paper);
}

.partner-row-title strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.partner-row-title span,
.partner-stat small {
  color: var(--muted);
}

.partner-stat strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

.outbound-list {
  display: grid;
  gap: 10px;
}

.outbound-item {
  padding: 14px 16px;
  border-radius: 0;
  background: var(--report-paper-2);
  border: 1px solid var(--line);
}

.outbound-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 6px;
}

.outbound-topline strong {
  color: var(--ink);
}

.outbound-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.94rem;
}

.outbound-domain {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.mix-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.table-wrap {
  overflow: auto;
}

.table-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 14px;
}

.load-more-button {
  border: 0;
  padding: 12px 16px;
  border-radius: 0;
  background: var(--accent-b);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.load-more-button[disabled] {
  opacity: 0.5;
  cursor: progress;
}

.table-wrap.is-loading {
  position: relative;
}

.table-wrap.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.48) 50%, rgba(255,255,255,0) 100%);
  animation: shimmer 1.2s linear infinite;
  pointer-events: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

th, td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: var(--panel-strong);
  color: var(--ink);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tbody tr:hover {
  background: rgba(119, 184, 42, 0.08);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 0;
  background: var(--report-paper-2);
  color: var(--accent-b);
  font-size: 0.82rem;
  font-weight: 700;
}

.empty {
  padding: 30px 0;
  color: var(--muted);
}

.empty.is-loading {
  color: var(--accent-b);
  font-weight: 700;
}

.delta {
  color: var(--report-muted);
  font-variant-numeric: tabular-nums;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.delta.up,
.delta.new {
  color: var(--report-pos);
}

.delta.dn {
  color: var(--report-neg);
}

.report-footer {
  display: none;
}

body.partner-report-mode {
  background: #e8e8e5;
  color: var(--report-ink);
  font-family: "Inter", "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
}

body.partner-report-mode::before {
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(14, 16, 20, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 16, 20, 0.018) 1px, transparent 1px);
}

body.partner-report-mode .shell {
  max-width: 1040px;
}

body.partner-report-mode .session-bar {
  max-width: 940px;
  margin: 18px auto 22px;
  border-bottom-color: var(--report-line);
  color: var(--report-ink);
}

body.partner-report-mode .session-bar .eyebrow,
body.partner-report-mode .session-copy {
  color: var(--report-ink-3);
}

body.partner-report-mode .session-badge {
  border-color: var(--report-line);
  background: var(--report-paper);
  color: var(--report-accent);
}

body.partner-report-mode .session-bar .sign-out-button {
  border-color: var(--report-line);
  background: transparent;
  color: var(--report-ink);
}

body.partner-report-mode .controls {
  position: relative;
  max-width: 940px;
  margin: 0 auto 22px;
  border-radius: 0;
  border: 1px solid var(--report-line);
  border-top: 1.5px solid var(--report-ink);
  background: var(--report-paper);
  color: var(--report-ink);
  box-shadow: none;
}

body.partner-report-mode .controls h2,
body.partner-report-mode .controls .eyebrow,
body.partner-report-mode .controls label,
body.partner-report-mode .controls .subtle,
body.partner-report-mode .controls .control-note,
body.partner-report-mode .controls .preset-label {
  color: var(--report-ink-3);
}

body.partner-report-mode .controls h2 {
  font-family: "Inter", "Avenir Next", sans-serif;
  font-size: 1.2rem;
  line-height: 1.2;
}

body.partner-report-mode .controls select,
body.partner-report-mode .controls input[type="date"] {
  min-height: 46px;
  border-radius: 0;
  border-color: var(--report-line);
  background: var(--report-paper);
  color: var(--report-ink);
  box-shadow: none;
}

body.partner-report-mode .controls select option {
  color: var(--report-ink);
}

body.partner-report-mode .view-mode-toggle,
body.partner-report-mode .preset-group button {
  border-radius: 0;
  border-color: var(--report-line);
  background: var(--report-paper-2);
}

body.partner-report-mode .view-mode-toggle button,
body.partner-report-mode .preset-group button {
  color: var(--report-ink-3);
}

body.partner-report-mode .view-mode-toggle button.is-active,
body.partner-report-mode .preset-group button.is-active {
  background: var(--report-accent);
  color: #fff;
}

body.partner-report-mode .export-button {
  border-radius: 0;
  background: var(--report-accent);
}

body.partner-report-mode .partner-report-document {
  display: block;
  max-width: 940px;
  margin: 0 auto;
  padding: 56px 72px;
  background: var(--report-paper);
  box-shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.18), 0 2px 6px -2px rgba(0, 0, 0, 0.06);
}

.partner-report-document .card,
.partner-report-document .kpi,
.partner-report-document .spotlight-card {
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.partner-report-document .card {
  padding: 0;
}

.report-summary,
body.partner-report-mode .report-summary {
  margin: 0 0 44px;
}

.report-letterhead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding-bottom: 22px;
  margin-bottom: 28px;
  border-bottom: 1.5px solid var(--report-ink);
}

.report-letterhead .report-brand-logo {
  width: 28px;
  height: 28px;
}

.report-letterhead span {
  display: block;
  color: var(--report-ink-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.report-letterhead strong {
  display: block;
  margin-top: 4px;
  color: var(--report-ink);
  font-size: 13px;
  font-weight: 700;
}

.report-letterhead-meta {
  text-align: right;
}

.report-hero {
  margin-bottom: 44px;
}

.report-hero h2 {
  max-width: 720px;
  color: var(--report-ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2.15rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.08;
}

.report-hero p:last-child {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--report-ink-2);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
  line-height: 1.55;
}

.report-section-head,
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-top: 14px;
  margin: 0 0 18px;
  border-top: 1.5px solid var(--report-ink);
}

.report-section-head h3,
.section-head h2 {
  margin: 0;
  color: var(--report-ink);
  font-family: "Inter", "Avenir Next", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.35;
  text-transform: uppercase;
}

.report-section-head span,
.section-head .subtle {
  margin: 0;
  color: var(--report-ink-3);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-align: right;
  text-transform: uppercase;
}

body.partner-report-mode .eyebrow {
  color: var(--report-accent);
  font-family: "Inter", "Avenir Next", sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.report-kpi-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 720px;
  margin-bottom: 24px;
}

.report-kpi {
  padding: 18px 20px 18px 0;
}

.report-kpi + .report-kpi {
  padding-left: 20px;
}

.report-kpi span:first-child {
  display: block;
  color: var(--report-ink-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.report-kpi strong {
  display: block;
  margin-top: 10px;
  color: var(--report-ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 36px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.report-kpi small {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  margin-top: 10px;
  color: var(--report-muted);
  font-size: 11px;
  line-height: 1.4;
}

.report-kpi em {
  color: var(--report-muted);
  font-style: normal;
}

.report-narrative {
  max-width: 720px;
  color: var(--report-ink-2);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
  line-height: 1.55;
}

.report-narrative p {
  margin: 0;
}

.report-narrative p + p {
  margin-top: 10px;
}

.report-narrative strong {
  color: var(--report-ink);
  font-weight: 600;
}

.report-data-status {
  display: grid;
  grid-template-columns: minmax(150px, auto) 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--report-line);
  border-bottom: 1px solid var(--report-line);
  color: var(--report-ink-2);
  font-size: 0.86rem;
  line-height: 1.45;
}

.report-data-status strong {
  color: var(--report-accent);
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.report-data-status.status-partial strong,
.report-data-status.status-limited strong {
  color: var(--report-ink-3);
}

.report-outbound-strip {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px 16px;
  align-items: baseline;
  margin-top: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--report-line);
  border-bottom: 1px solid var(--report-line);
}

.report-outbound-strip span:first-child,
.report-outbound-strip small {
  color: var(--report-ink-3);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.report-outbound-strip strong {
  color: var(--report-ink);
  font-variant-numeric: tabular-nums;
}

.report-signal-strip {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: start;
  max-width: 720px;
  margin: 6px 0 24px;
  padding: 14px 0;
  border-top: 1px solid var(--report-line);
  border-bottom: 1px solid var(--report-line);
}

.report-signal-strip > span,
.report-signal-item small {
  color: var(--report-ink-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.report-signal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}

.report-signal-item strong {
  display: block;
  margin-top: 6px;
  color: var(--report-ink);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

body.partner-report-mode #story-grid {
  display: block;
  margin-bottom: 44px;
}

.layout-two {
  grid-template-columns: 1fr;
  gap: 44px;
  margin-bottom: 44px;
}

#partner-layout {
  grid-template-columns: 1fr;
}

body.partner-report-mode #story-grid .card:last-child,
body.partner-report-mode #partner-overview-card,
body.partner-report-mode #table-mode-toggle,
body.partner-report-mode #load-more-table {
  display: none !important;
}

#kpi-grid {
  display: none !important;
}

body.partner-report-mode #story-grid .section-head .eyebrow,
body.partner-report-mode #story-grid .section-head .subtle {
  display: none;
}

body.partner-report-mode #executive-summary {
  display: block;
}

.report-outlook-list {
  display: grid;
  gap: 0;
}

.report-outlook-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
}

.report-outlook-item:first-child {
  padding-top: 0;
}

.report-outlook-item span {
  color: var(--report-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.report-outlook-item p {
  margin: 0;
  color: var(--report-ink-2);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.98rem;
  line-height: 1.5;
}

body.partner-report-mode #partner-layout {
  display: block;
  margin-bottom: 44px;
}

body.partner-report-mode .chart-wrap {
  min-height: 260px;
  aspect-ratio: 760 / 220;
  padding-top: 0;
}

body.partner-report-mode .legend {
  padding-top: 12px;
  margin-top: 14px;
}

body.partner-report-mode .legend-swatch {
  border-radius: 0;
  box-shadow: none;
}

.legend-swatch.is-dashed {
  height: 3px;
}

body.partner-report-mode .layout-two:not(#partner-layout) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 44px;
}

body:not(.partner-report-mode) .layout-two:not(#partner-layout) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

body.partner-report-mode .layout-two:not(#partner-layout) .card {
  min-width: 0;
}

body.partner-report-mode h3 {
  color: var(--report-ink);
  font-family: "Inter", "Avenir Next", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.partner-report-mode .bar-row {
  grid-template-columns: 92px minmax(0, 1fr) 56px 60px;
  gap: 10px;
  color: var(--report-ink-2);
  font-size: 12.5px;
}

body.partner-report-mode .bar-row.no-comparison {
  grid-template-columns: 92px minmax(0, 1fr) 56px;
}

body.partner-report-mode .bar-row > span:first-child,
body.partner-report-mode .bar-row strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

body.partner-report-mode .bar-track {
  height: 8px;
  border-radius: 0;
  background: var(--report-line-2);
}

body.partner-report-mode .bar-fill {
  border-radius: 0;
  background: var(--report-accent);
}

body.partner-report-mode .report-bar-row.rank-2 .bar-fill,
body.partner-report-mode .report-bar-row.rank-3 .bar-fill {
  background: var(--report-ink-3);
}

body.partner-report-mode .report-bar-row.rank-4 .bar-fill {
  background: var(--report-muted);
}

body.partner-report-mode .table-wrap {
  overflow: visible;
}

body.partner-report-mode .report-summary,
body.partner-report-mode #partner-layout,
body.partner-report-mode #mix-layout,
body.partner-report-mode #insight-table-card,
body.partner-report-mode .report-footer {
  break-inside: avoid-page;
  page-break-inside: avoid;
}

body.partner-report-mode table {
  color: var(--report-ink-2);
  font-family: "Inter", "Avenir Next", sans-serif;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

body.partner-report-mode th,
body.partner-report-mode td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--report-line);
}

body.partner-report-mode th {
  position: static;
  background: var(--report-paper);
  border-bottom: 1.2px solid var(--report-ink);
  color: var(--report-ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

body.partner-report-mode td:nth-child(3),
body.partner-report-mode td:nth-child(4),
body.partner-report-mode td:nth-child(5),
body.partner-report-mode td:nth-child(6),
body.partner-report-mode th:nth-child(3),
body.partner-report-mode th:nth-child(4),
body.partner-report-mode th:nth-child(5),
body.partner-report-mode th:nth-child(6) {
  text-align: right;
}

body.partner-report-mode .total-row {
  background: var(--report-paper-2);
  border-top: 1.5px solid var(--report-ink);
  color: var(--report-ink);
  font-weight: 700;
}

body.partner-report-mode .table-footer {
  margin-top: 12px;
}

.report-footer,
body.partner-report-mode .report-footer {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding-top: 20px;
  border-top: 1.5px solid var(--report-ink);
}

.report-footer span,
body.partner-report-mode .report-footer span {
  color: var(--report-ink-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.report-footer strong,
body.partner-report-mode .report-footer strong {
  display: block;
  margin-top: 7px;
  color: var(--report-ink);
}

.report-footer p,
body.partner-report-mode .report-footer p {
  margin: 7px 0 0;
  color: var(--report-ink-3);
  font-size: 12px;
  line-height: 1.45;
}

@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes pulseDot {
  0%, 100% {
    opacity: 0.45;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@media screen {
  .controls,
  body.partner-report-mode .controls {
    gap: 14px;
    max-width: 940px;
    margin-bottom: 20px;
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-top: 2px solid var(--ink);
    background: rgba(255, 255, 255, 0.96);
  }

  .controls-top {
    align-items: center;
    gap: 14px;
  }

  .controls h2,
  body.partner-report-mode .controls h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.05rem;
    line-height: 1.15;
  }

  .controls .eyebrow {
    margin-bottom: 5px;
    font-size: 0.72rem;
  }

  .controls-actions {
    gap: 10px;
  }

  .view-mode-toggle,
  body.partner-report-mode .view-mode-toggle {
    gap: 4px;
    padding: 3px;
    border-radius: 6px;
    background: #f7f8f6;
  }

  .view-mode-toggle button,
  body.partner-report-mode .view-mode-toggle button {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
  }

  .export-button,
  body.partner-report-mode .export-button {
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 4px;
    background: var(--accent-b);
    font-size: 0.92rem;
  }

  .controls-grid {
    grid-template-columns: minmax(150px, 0.9fr) minmax(220px, 1.25fr) repeat(2, minmax(140px, 0.85fr));
    gap: 10px;
  }

  .controls label,
  body.partner-report-mode .controls label,
  .preset-label,
  body.partner-report-mode .controls .preset-label {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .controls select,
  .controls input[type="date"],
  body.partner-report-mode .controls select,
  body.partner-report-mode .controls input[type="date"] {
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 4px;
    background-color: #fff;
    font-size: 0.96rem;
  }

  .control-field:has(#partner-filter) select {
    border-color: rgba(14, 90, 31, 0.26);
    box-shadow: inset 3px 0 0 rgba(14, 90, 31, 0.14);
  }

  .preset-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
  }

  .preset-group {
    gap: 8px;
  }

  .preset-group button,
  body.partner-report-mode .preset-group button {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.86rem;
  }

  .controls-status {
    gap: 10px;
    padding-top: 0;
  }

  .status-chip {
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
  }

  .status-copy {
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .control-note,
  body.partner-report-mode .controls .control-note {
    padding: 10px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.4;
  }
}

@media (max-width: 1100px) {
  .auth-grid,
  .story-grid,
  .layout-two,
  .mix-grid,
  .kpis {
    grid-template-columns: 1fr;
  }

  .controls-top,
  .report-summary-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .controls-grid {
    grid-template-columns: 1fr 1fr;
  }

  .report-highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .shell {
    padding: 18px 14px 40px;
  }

  .auth-card {
    padding: 24px 18px;
    border-radius: 22px;
  }

  .card,
  .kpi,
  .meta-card {
    border-radius: 18px;
  }

  .session-bar {
    margin: 16px 14px 0;
    padding: 16px 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  .bar-row {
    grid-template-columns: 100px 1fr auto;
  }

  .spotlight-grid,
  .partner-row,
  .report-highlight-grid {
    grid-template-columns: 1fr;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .section-head {
    flex-direction: column;
    gap: 8px;
  }

  .section-head > * {
    min-width: 0;
  }

  .chart-wrap {
    min-height: 320px;
  }

  .controls-grid {
    grid-template-columns: 1fr;
  }

  .controls-actions,
  .view-mode-toggle,
  .preset-group,
  .session-actions {
    width: 100%;
  }

  .view-mode-toggle {
    justify-content: space-between;
  }

  .session-actions {
    justify-content: space-between;
  }

  body.partner-report-mode .shell {
    padding: 14px;
  }

  body.partner-report-mode .controls {
    padding: 18px;
  }

  body.partner-report-mode .partner-report-document {
    padding: 32px 24px;
  }

  .partner-report-document {
    padding: 32px 24px;
  }

  .report-letterhead,
  body.partner-report-mode .report-footer {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .report-letterhead-meta {
    text-align: left;
  }

  .report-kpi-row,
  body.partner-report-mode .layout-two:not(#partner-layout) {
    grid-template-columns: 1fr;
  }

  .report-kpi {
    padding: 18px 0;
  }

  .report-kpi + .report-kpi {
    padding-left: 0;
    border-top: 1px solid var(--report-line);
    border-left: 0;
  }

  .report-signal-strip,
  .report-signal-list {
    grid-template-columns: 1fr;
  }

  body.partner-report-mode .bar-row {
    grid-template-columns: 78px minmax(0, 1fr) 52px;
  }

  body.partner-report-mode .bar-row.no-comparison {
    grid-template-columns: 78px minmax(0, 1fr) 52px;
  }

  body.partner-report-mode .bar-row .delta {
    grid-column: 3;
  }

  body.partner-report-mode .table-wrap {
    overflow-x: auto;
  }

  body.partner-report-mode table {
    min-width: 560px;
  }
}

@media screen and (min-width: 560px) and (max-width: 700px) {
  .controls-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .controls-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .view-mode-toggle,
  .preset-group {
    width: auto;
  }

  .export-button {
    white-space: nowrap;
  }
}

@media screen and (max-width: 559px) {
  .view-mode-toggle button {
    flex: 1;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 14mm 15mm;
  }

  * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body {
    background: #fff;
    color: #13261a;
    font-size: 9.2pt;
  }

  html {
    background: #fff !important;
  }

  body::before,
  .session-bar,
  .hero,
  .controls,
  .view-mode-toggle,
  .export-button {
    display: none !important;
  }

  .load-more-button {
    display: none !important;
  }

  body.partner-report-mode #story-grid .card:last-child,
  body.partner-report-mode #partner-overview-card,
  body.partner-report-mode #bottom-layout .card:last-child {
    display: none !important;
  }

  .shell {
    max-width: none;
    padding: 0;
  }

  .story-grid,
  .layout-two,
  .report-summary-grid,
  .spotlight-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .mix-grid,
  .kpis {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .bottom-layout {
    margin-top: 14px;
  }

  .card,
  .kpi,
  .spotlight-card,
  .partner-row,
  .outbound-item,
  .table-wrap,
  table,
  tr,
  svg {
    box-shadow: none;
    backdrop-filter: none;
    background: #fff;
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .report-summary {
    display: block !important;
    margin-bottom: 10px;
  }

  .card,
  .kpi {
    border-color: rgba(19, 38, 26, 0.12);
  }

  .card {
    padding: 10px 12px;
    border-radius: 14px;
  }

  .kpi {
    padding: 10px 12px;
    border-radius: 14px;
  }

  body.partner-report-mode .partner-report-document .card,
  body.partner-report-mode .partner-report-document .kpi,
  body.partner-report-mode .partner-report-document .spotlight-card {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  h1,
  h2,
  h3 {
    color: #13261a;
  }

  h2 {
    font-size: 15pt;
    line-height: 1.08;
  }

  h3 {
    font-size: 10pt;
    margin-bottom: 6px;
  }

  .eyebrow {
    margin-bottom: 4px;
    font-size: 7.2pt;
  }

  .lede,
  .subtle,
  .control-note,
  .reading-item span,
  .outbound-domain,
  .outbound-metrics,
  .partner-row-title span {
    color: #4f5f55;
  }

  .report-summary .lede {
    max-width: none;
    margin-top: 6px;
    font-size: 8.8pt;
    line-height: 1.35;
  }

  .report-summary-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(180px, 0.75fr) !important;
    gap: 12px !important;
  }

  .report-brand {
    margin-bottom: 8px;
    font-size: 7.8pt;
  }

  .report-brand-logo {
    width: 22px;
    height: 22px;
  }

  .report-meta {
    gap: 6px;
  }

  .report-meta-item {
    background: #fff;
    padding: 9px 10px;
    border-radius: 12px;
  }

  .report-highlight {
    background: #fff;
    padding: 9px 10px;
    border-radius: 12px;
  }

  .report-highlight-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-top: 10px;
  }

  .report-highlight span,
  .report-meta-item span,
  .kpi .label {
    font-size: 7pt;
  }

  .report-highlight strong,
  .kpi .value {
    margin-top: 6px;
    font-size: 16pt;
  }

  .report-highlight small,
  .kpi .hint {
    margin-top: 5px;
    font-size: 7.8pt;
    line-height: 1.25;
  }

  body.partner-report-mode #kpi-grid {
    display: none !important;
  }

  body.partner-report-mode .story-grid {
    grid-template-columns: 1fr !important;
  }

  body.partner-report-mode .spotlight-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .spotlight-card {
    padding: 9px 10px;
    border-radius: 12px;
  }

  .spotlight-card strong {
    margin-bottom: 5px;
    font-size: 8.6pt;
  }

  .spotlight-value {
    margin-bottom: 4px;
    font-size: 15pt;
  }

  .spotlight-card p {
    font-size: 7.8pt;
    line-height: 1.28;
  }

  body.partner-report-mode #partner-layout {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body.partner-report-mode .layout-two:not(#partner-layout) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .chart-card {
    display: block !important;
  }

  .chart-wrap {
    height: 190pt;
    min-height: 0;
    aspect-ratio: auto;
    padding-top: 0;
  }

  body.partner-report-mode .chart-wrap {
    height: 190pt;
    min-height: 0;
  }

  #timeline-chart svg {
    height: 190pt !important;
  }

  body.partner-report-mode #timeline-legend {
    display: none;
  }

  .legend {
    margin-top: 8px;
    gap: 10px;
  }

  .legend-item {
    font-size: 8.5pt;
  }

  .table-wrap {
    overflow: visible;
  }

  .bar-row {
    grid-template-columns: 54px 1fr auto;
    gap: 6px;
    font-size: 8pt;
  }

  .bar-track {
    height: 8px;
  }

  table {
    font-size: 7.6pt;
  }

  th,
  td {
    padding: 4px 5px;
  }

  th {
    position: static;
  }

  .pill {
    padding: 3px 8px;
    font-size: 7.8pt;
  }

  body.partner-report-mode {
    background: #fff !important;
    color: var(--report-ink);
    font-family: "Inter", Arial, sans-serif;
    font-size: 8.8pt;
  }

  body.partner-report-mode .shell {
    padding: 0;
  }

  body.partner-report-mode .partner-report-document {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0 !important;
    box-shadow: none;
  }

  body.partner-report-mode .report-summary,
  body.partner-report-mode #partner-layout,
  body.partner-report-mode .layout-two:not(#partner-layout) {
    margin-bottom: 14pt;
  }

  body.partner-report-mode .report-hero {
    margin-bottom: 14pt;
  }

  body.partner-report-mode #partner-layout {
    break-before: auto;
    page-break-before: auto;
  }

  body.partner-report-mode .report-footer {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.partner-report-mode .report-hero h2 {
    font-size: 26pt;
  }

  body.partner-report-mode .report-hero p:last-child,
  body.partner-report-mode .report-narrative,
  .report-outlook-item p {
    font-size: 10pt;
    line-height: 1.42;
  }

  body.partner-report-mode .report-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-width: 124mm;
  }

  body.partner-report-mode .report-kpi {
    padding: 12pt 10pt 12pt 0;
  }

  body.partner-report-mode .report-kpi + .report-kpi {
    padding-left: 10pt;
    border-top: 0;
  }

  body.partner-report-mode .report-kpi strong {
    font-size: 23pt;
  }

  body.partner-report-mode #executive-summary.spotlight-grid {
    display: block !important;
  }

  body.partner-report-mode #story-grid {
    break-after: auto;
    page-break-after: auto;
  }

  body.partner-report-mode #story-grid .card {
    padding-top: 0;
  }

  body.partner-report-mode .report-outlook-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }

  body.partner-report-mode .report-outlook-item {
    display: block;
    min-height: 64pt;
    padding: 8pt 10pt 6pt;
  }

  body.partner-report-mode .report-outlook-item span {
    display: block;
    margin-bottom: 12pt;
    font-size: 8pt;
  }

  body.partner-report-mode .report-outlook-item p {
    font-size: 9.1pt;
    line-height: 1.35;
  }

  body.partner-report-mode .section-head,
  body.partner-report-mode .report-section-head {
    border-top-color: #d8ddd9 !important;
    break-after: avoid;
    page-break-after: avoid;
  }

  body.partner-report-mode .report-letterhead {
    border-bottom-color: #1f2522 !important;
  }

  body.partner-report-mode .report-data-status,
  body.partner-report-mode .report-outbound-strip,
  body.partner-report-mode .report-signal-strip,
  body.partner-report-mode th,
  body.partner-report-mode td,
  body.partner-report-mode .total-row,
  body.partner-report-mode .report-footer {
    border-color: #d8ddd9 !important;
  }

  body.partner-report-mode .report-kpi,
  body.partner-report-mode .report-narrative,
  body.partner-report-mode .report-signal-strip,
  body.partner-report-mode .report-outlook-item,
  body.partner-report-mode #partner-layout,
  body.partner-report-mode #mix-layout,
  body.partner-report-mode #insight-table-card,
  body.partner-report-mode table,
  body.partner-report-mode tr {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  body.partner-report-mode #insight-table-card {
    break-before: auto;
    page-break-before: auto;
  }

  body.partner-report-mode .chart-wrap,
  body.partner-report-mode #timeline-chart svg {
    height: 138pt !important;
  }

  body.partner-report-mode #timeline-legend {
    display: flex !important;
  }

  body.partner-report-mode .layout-two:not(#partner-layout) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.partner-report-mode .bar-row {
    grid-template-columns: 64pt minmax(72pt, 1fr) 34pt 28pt;
    gap: 6pt;
    font-size: 7.5pt;
  }

  body.partner-report-mode .bar-row.no-comparison {
    grid-template-columns: 64pt minmax(72pt, 1fr) 34pt;
  }

  body.partner-report-mode .bar-track {
    height: 7pt;
    background: #e6ebe7 !important;
  }

  body.partner-report-mode .bar-fill {
    min-width: 2pt;
    background: var(--report-accent) !important;
  }

  body.partner-report-mode .delta.flat {
    color: var(--report-muted);
  }

  body.partner-report-mode .report-footer {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14pt;
  }
}
