/* ============================================================
   Coffee Shop Brief — custom styles
   Overrides Tabloy tokens and adds report-specific components.
   ============================================================ */

:root {
  --t-accent: #8B5E3C;
  --t-accent-2: #C8A27A;
  --t-accent-contrast: #FFFFFF;
  --t-accent-soft: #F3EAE0;
  --t-radius: 10px;
  --t-font: 'Source Sans 3', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-theme="dark"] {
  --t-accent: #C8A27A;
  --t-accent-2: #8B5E3C;
  --t-accent-soft: #3A2E24;
}

/* ---------- Report hero ---------- */
.t-report-hero {
  padding: var(--t-space-8) 0 var(--t-space-7);
  background: var(--t-accent-soft);
  border-bottom: 1px solid var(--t-border);
}

.t-report-hero .t-eyebrow {
  margin-bottom: var(--t-space-2);
}

.t-report-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 var(--t-space-4);
  color: var(--t-text);
  max-width: 18ch;
}

.t-report-hero .t-lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--t-text-2);
  max-width: 70ch;
  margin-bottom: var(--t-space-6);
}

.t-report-hero .t-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--t-space-6);
  margin-top: var(--t-space-5);
}

.t-report-hero .t-stat {
  flex: 1 1 180px;
  min-width: 160px;
}

.t-report-hero .t-stat-value,
.t-report-hero .t-kpi-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--t-accent);
  line-height: 1.2;
}

.t-report-hero .t-stat-label,
.t-report-hero .t-kpi-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--t-text);
  margin-top: var(--t-space-1);
}

.t-report-hero .t-stat-hint,
.t-report-hero .t-kpi-hint {
  display: block;
  font-size: 0.8125rem;
  color: var(--t-text-muted);
  margin-top: var(--t-space-1);
}

/* ---------- Finding cards ---------- */
.t-finding-card {
  background: var(--t-surface);
  border: 1px solid var(--t-border);
  border-radius: var(--t-radius);
  padding: var(--t-space-5);
  box-shadow: var(--t-shadow);
  display: flex;
  flex-direction: column;
  gap: var(--t-space-3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.t-finding-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.t-finding-number {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--t-accent);
  line-height: 1.1;
}

.t-finding-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: var(--t-text);
}

.t-finding-card p {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--t-text-2);
  margin: 0;
  flex: 1;
}

.t-finding-source {
  font-size: 0.8125rem;
  color: var(--t-text-muted);
  border-top: 1px solid var(--t-border);
  padding-top: var(--t-space-3);
}

/* ---------- Source table ---------- */
.t-source-table {
  font-size: 0.875rem;
}

.t-source-table th,
.t-source-table td {
  padding: var(--t-space-3) var(--t-space-4);
  vertical-align: top;
}

.t-source-table td:first-child {
  font-weight: 600;
  color: var(--t-text);
}

.t-source-table td:last-child {
  color: var(--t-text-2);
  max-width: 34ch;
}

.t-source-table a {
  color: var(--t-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.t-source-table a:hover {
  color: var(--t-accent-2);
}

/* ---------- Cost table ---------- */
.t-cost-table th[scope="col"] {
  white-space: nowrap;
}

.t-cost-table td.t-num,
.t-cost-table th.t-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.t-cost-table tbody th[scope="row"] {
  font-weight: 600;
  color: var(--t-text);
  text-align: left;
}

.t-cost-table td:nth-child(4) {
  color: var(--t-text-2);
  max-width: 36ch;
}

/* ---------- Example cards (city fee examples) ---------- */
.t-example-card {
  display: flex;
  flex-direction: column;
  gap: var(--t-space-3);
  padding: var(--t-space-5);
}

.t-example-card .t-kpi-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--t-accent);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.t-example-card .t-kpi-value .t-small {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--t-text-muted);
  margin-left: 2px;
}

.t-example-card .t-text-2 {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--t-text-2);
  margin: 0;
}

/* ---------- Break-even table ---------- */
.t-break-even-table {
  font-size: 0.9375rem;
}

.t-break-even-table th,
.t-break-even-table td {
  padding: var(--t-space-3) var(--t-space-4);
}

.t-break-even-table td:first-child {
  font-weight: 500;
  color: var(--t-text);
}

.t-break-even-table td:nth-child(3) {
  color: var(--t-text-muted);
  max-width: 32ch;
}

.t-break-even-table .t-row-accent {
  background: var(--t-accent-soft);
}

.t-break-even-table .t-row-accent td {
  font-weight: 600;
  color: var(--t-text);
}

/* ---------- Section title refinements ---------- */
.t-section-title h2 {
  font-size: 1.75rem;
  letter-spacing: -0.01em;
  margin-bottom: var(--t-space-2);
}

.t-section-title p {
  font-size: 1rem;
  color: var(--t-text-muted);
  max-width: 60ch;
  margin-top: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .t-report-hero {
    padding: var(--t-space-6) 0 var(--t-space-5);
  }

  .t-report-hero h1 {
    font-size: 1.75rem;
  }

  .t-report-hero .t-lead {
    font-size: 1rem;
  }

  .t-report-hero .t-stat-row {
    gap: var(--t-space-4);
  }

  .t-report-hero .t-stat {
    flex-basis: 100%;
  }

  .t-finding-number {
    font-size: 1.5rem;
  }

  .t-example-card .t-kpi-value {
    font-size: 1.5rem;
  }

  .t-source-table,
  .t-cost-table,
  .t-break-even-table {
    font-size: 0.8125rem;
  }

  .t-source-table th,
  .t-source-table td,
  .t-cost-table th,
  .t-cost-table td,
  .t-break-even-table th,
  .t-break-even-table td {
    padding: var(--t-space-2) var(--t-space-3);
  }
}