/* analytics.css — supplement to style.css for analytics pages */

/* ── Nav active state ──────────────────────────────────────────────────────── */
nav a.nav-active {
  color: var(--color-accent, #c8b89a);
  font-weight: 500;
}

/* ── Analytics index ───────────────────────────────────────────────────────── */
.analytics-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid rgba(200, 184, 154, 0.15);
  margin-bottom: 2.5rem;
}

.analytics-header h1 {
  font-family: "DM Serif Display", serif;
  font-size: 2.4rem;
  margin: 0 0 0.75rem;
}

.analytics-intro {
  color: rgba(200, 184, 154, 0.7);
  max-width: 56ch;
  line-height: 1.7;
  margin: 0;
}

.analytics-empty {
  padding: 3rem 0;
  color: rgba(200, 184, 154, 0.6);
  font-size: 0.95rem;
}

/* ── Report grid (index page) ──────────────────────────────────────────────── */
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  padding-bottom: 4rem;
}

.report-card {
  border: 1px solid rgba(200, 184, 154, 0.18);
  border-radius: 8px;
  transition: border-color 0.15s, background-color 0.15s;
}

.report-card:hover {
  border-color: rgba(200, 184, 154, 0.45);
  background-color: rgba(200, 184, 154, 0.04);
}

.report-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
}

.report-card-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  line-height: 1.4;
}

.report-card-desc {
  font-size: 0.9rem;
  color: rgba(200, 184, 154, 0.65);
  line-height: 1.6;
  margin: 0 0 1rem;
  flex: 1;
}

.report-card-stats {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.stat-pill {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}

.stat-pass   { background: rgba(29, 158, 117, 0.18); color: #1d9e75; }
.stat-fail   { background: rgba(216, 90,  48,  0.18); color: #d85a30; }
.stat-review { background: rgba(186, 117, 23, 0.18); color: #ba7517; }

.report-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(200, 184, 154, 0.45);
  border-top: 1px solid rgba(200, 184, 154, 0.1);
  padding-top: 0.75rem;
  margin-top: auto;
}

/* ── Report full page ──────────────────────────────────────────────────────── */
.report-full {
  padding-top: 2.5rem;
  padding-bottom: 5rem;
}

.report-breadcrumb {
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}

.report-breadcrumb a {
  color: rgba(200, 184, 154, 0.6);
  text-decoration: none;
}

.report-breadcrumb a:hover {
  color: rgba(200, 184, 154, 0.9);
}

.report-title {
  font-family: "DM Serif Display", serif;
  font-size: 2.2rem;
  margin: 0 0 0.5rem;
}

.report-desc {
  color: rgba(200, 184, 154, 0.65);
  max-width: 64ch;
  line-height: 1.7;
  margin: 0 0 1.5rem;
}

.report-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(200, 184, 154, 0.12);
  border-bottom: 1px solid rgba(200, 184, 154, 0.12);
  margin-bottom: 2.5rem;
}

.report-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.report-meta-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(200, 184, 154, 0.45);
}

.report-meta-value {
  font-size: 0.88rem;
  color: rgba(200, 184, 154, 0.85);
}

/* ── Summary tiles ─────────────────────────────────────────────────────────── */
.summary-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 640px) {
  .summary-tiles { grid-template-columns: repeat(2, 1fr); }
}

.summary-tile {
  padding: 1.25rem 1rem;
  border: 1px solid rgba(200, 184, 154, 0.18);
  border-radius: 8px;
  text-align: center;
}

.tile-number {
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.tile-label {
  font-size: 0.78rem;
  color: rgba(200, 184, 154, 0.55);
}

.tile-pass   .tile-number { color: #1d9e75; }
.tile-fail   .tile-number { color: #d85a30; }
.tile-review .tile-number { color: #ba7517; }

/* ── Charts ────────────────────────────────────────────────────────────────── */
.charts-section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
  .charts-section { grid-template-columns: 1fr; }
}

/* ── Methodology box ───────────────────────────────────────────────────────── */
.methodology-box {
  background: rgba(200, 184, 154, 0.04);
  border: 1px solid rgba(200, 184, 154, 0.12);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.methodology-box h2 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 1rem;
}

.threshold-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.threshold-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(200, 184, 154, 0.45);
  border-bottom: 1px solid rgba(200, 184, 154, 0.12);
}

.threshold-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(200, 184, 154, 0.07);
  color: rgba(200, 184, 154, 0.8);
  vertical-align: top;
}

.threshold-table td:nth-child(2) {
  font-family: "DM Mono", monospace;
  color: #ba7517;
  white-space: nowrap;
}

/* ── Results table ─────────────────────────────────────────────────────────── */
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.results-toolbar h2 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: rgba(200, 184, 154, 0.6);
}

.filter-group select,
.filter-group input {
  background: transparent;
  border: 1px solid rgba(200, 184, 154, 0.2);
  color: rgba(200, 184, 154, 0.85);
  border-radius: 4px;
  padding: 0.35rem 0.6rem;
  font-size: 0.875rem;
  font-family: "DM Sans", sans-serif;
  outline: none;
}

.filter-group select:focus,
.filter-group input:focus {
  border-color: rgba(200, 184, 154, 0.45);
}

.filter-group input {
  min-width: 220px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(200, 184, 154, 0.12);
  border-radius: 8px;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.results-table th {
  text-align: left;
  padding: 0.65rem 1rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(200, 184, 154, 0.45);
  border-bottom: 1px solid rgba(200, 184, 154, 0.15);
  white-space: nowrap;
}

.results-table td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid rgba(200, 184, 154, 0.06);
  color: rgba(200, 184, 154, 0.75);
  vertical-align: middle;
}

.results-table tr:last-child td { border-bottom: none; }

.results-table tr:hover td {
  background: rgba(200, 184, 154, 0.04);
}

.col-ticker code {
  font-family: "DM Mono", monospace;
  font-size: 0.82rem;
  color: #c8b89a;
}

.col-ratio {
  font-family: "DM Mono", monospace;
  font-size: 0.82rem;
  text-align: right;
}

/* Row-level tint */
.row-non_compliant td { opacity: 0.65; }
.row-review td { opacity: 0.8; }

/* Status badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
}

.badge-pass   { background: rgba(29, 158, 117, 0.18); color: #1d9e75; }
.badge-fail   { background: rgba(216, 90,  48,  0.18); color: #d85a30; }
.badge-review { background: rgba(186, 117, 23, 0.18); color: #ba7517; }

.results-count {
  font-size: 0.8rem;
  color: rgba(200, 184, 154, 0.4);
  text-align: right;
  padding: 0.5rem 1rem;
  margin: 0;
}
