/* Live tracker pages (/trackers/) and the homepage tracker strip.
   Article-layout rules mirror the inline styles of publications/google_willow.html;
   chart, table and pill rules mirror publications/top100banks-pqc-report.html. */

:root {
  --color-primary: #1e3d7b;
  --color-secondary: #5c4b8b;
  --color-gray: #6c757d;
  --color-danger: #dc3545;
  --color-warning: #f39c12;
  --color-success: #28a745;
  --pqc-yes: #1f8a5b;
  --pqc-no: #c8414b;
  --pqc-unknown: #8a939b;
}

/* ---------- Article layout ---------- */

.publication-hero {
  background: linear-gradient(135deg, #1e3d7b 0%, #5c4b8b 100%);
  color: #fff;
  padding: 3rem 1rem;
}

.publication-hero h1 {
  color: #fff;
  font-size: 2.2rem;
}

.hero-kicker {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.2rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.publication-content {
  padding: 4rem 0;
  background: #fff;
}

.section-content {
  max-width: 800px;
  margin: 0 auto;
}

.section-content h2 {
  color: var(--color-primary);
  margin: 3rem 0 1rem 0;
}

.section-content p {
  line-height: 1.8;
  margin-bottom: 1.5rem;
  overflow-wrap: break-word;
}

.publication-meta-box {
  background: #f5f7fa;
  padding: 2rem;
  border-radius: 4px;
  margin-bottom: 3rem;
}

.meta-item {
  margin-bottom: 1rem;
  display: flex;
  gap: 1rem;
}

.meta-label {
  font-weight: 600;
  color: var(--color-gray);
  min-width: 120px;
}

.info-box {
  background: #e7f3ff;
  border: 1px solid #b6d4fe;
  border-radius: 4px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.info-box h3 {
  color: #084298;
  margin-top: 0;
}

.vulnerability-alert {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 4px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.vulnerability-alert h3 {
  color: #856404;
  margin-top: 0;
}

.figure-container {
  margin: 2.5rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.figure-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 1rem;
  text-align: center;
}

.figure-content {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
  background: #fff;
  border-radius: 8px;
  padding: 1rem 0.5rem;
}

.figure-caption {
  font-size: 0.85rem;
  color: #555;
  text-align: center;
  margin: 1rem 0 0 0;
}

.chart-svg {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
}

.btn-primary {
  display: inline-block;
  background: var(--color-secondary);
  color: #fff;
  padding: 12px 30px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 1rem;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: #4a3d73;
  text-decoration: none;
}

.references {
  font-size: 0.95rem;
  line-height: 1.7;
  padding-left: 1.25rem;
}

.references li {
  margin-bottom: 0.75rem;
}

.references a {
  word-break: break-word;
}

/* ---------- Tables ---------- */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

.mini-table,
.bank-table,
.tracker-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.9rem;
}

.mini-table th,
.mini-table td,
.bank-table th,
.bank-table td,
.tracker-table th,
.tracker-table td {
  border: 1px solid #d9dee7;
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.mini-table th,
.bank-table th,
.tracker-table th {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

.mini-table tbody tr:nth-child(even),
.bank-table tbody tr:nth-child(even),
.tracker-table tbody tr:nth-child(even) {
  background: #f7f9fc;
}

.tracker-table {
  min-width: 640px;
}

.tracker-table .row-note {
  display: block;
  font-size: 0.8rem;
  color: #555;
  margin-top: 0.25rem;
}

.tracker-table tr.is-past td {
  color: #6c757d;
}

.bank-table {
  font-size: 0.82rem;
  min-width: 980px;
}

.bank-table code {
  font-size: 0.8rem;
  white-space: nowrap;
}

.data-view {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.data-view summary {
  cursor: pointer;
  color: var(--color-primary);
  font-weight: 600;
}

.num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

.muted {
  color: #6c757d;
}

.pill {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.pill-yes { background: #d6efe3; color: #145c3c; }
.pill-partly { background: #fcebcf; color: #7a4d07; }
.pill-no { background: #f6d9dc; color: #8a2630; }
.pill-unknown { background: #e6e9ec; color: #4a535b; }
.pill-mandatory { background: #f6d9dc; color: #8a2630; }
.pill-guidance { background: #dfe8f7; color: #1e3d7b; }
.pill-draft { background: #e6e9ec; color: #4a535b; }
.pill-announced { background: #fcebcf; color: #7a4d07; }
.pill-preprint { background: #fcebcf; color: #7a4d07; }
.pill-reviewed { background: #d6efe3; color: #145c3c; }

.grp {
  display: block;
  font-size: 0.75rem;
  color: #555;
  margin-top: 0.2rem;
}

/* ---------- Tracker components ---------- */

.tracker-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  border-left: 4px solid var(--color-secondary);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin: 0 0 2rem 0;
}

.tracker-headline-value {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
}

.tracker-headline-label {
  font-size: 1.15rem;
  font-weight: 600;
  color: #2c3e50;
}

.tracker-headline-detail {
  flex-basis: 100%;
  margin: 0.25rem 0 0 0 !important;
  color: #555;
  font-size: 0.95rem;
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.stat-tile {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-top: 4px solid var(--pqc-unknown);
}

.stat-tile.stat-good { border-top-color: var(--pqc-yes); }
.stat-tile.stat-bad { border-top-color: var(--pqc-no); }
.stat-tile.stat-neutral { border-top-color: var(--color-primary); }

.stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.4;
  margin-top: 0.25rem;
}

.changelog {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
  border-left: 3px solid #d9dee7;
}

.changelog li {
  padding: 0 0 1rem 1.25rem;
  position: relative;
}

.changelog li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.45rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--color-secondary);
}

.changelog time {
  display: block;
  font-weight: 600;
  color: var(--color-primary);
  font-size: 0.9rem;
}

.milestone-list {
  list-style: none;
  padding: 0;
}

.milestone-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.milestone-list li:last-child {
  border-bottom: none;
}

.milestone-date {
  font-weight: 600;
  color: var(--color-secondary);
  margin-right: 0.5rem;
}

.jurisdiction {
  margin: 2.5rem 0;
  padding-top: 0.5rem;
  border-top: 1px solid #e3e7ee;
}

.jurisdiction h3 {
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.jurisdiction-meta {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.75rem !important;
  line-height: 1.6 !important;
}

.source-note {
  font-size: 0.8rem;
  color: #6c757d;
}

.download-list {
  list-style: none;
  padding: 0;
}

.download-list li {
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .publication-hero h1 {
    font-size: 1.6rem;
  }

  .figure-container {
    padding: 1rem;
  }

  .publication-meta-box {
    padding: 1.25rem;
  }

  .meta-item {
    flex-direction: column;
    gap: 0.1rem;
  }

  .tracker-headline {
    padding: 1.25rem;
  }

  .tracker-headline-value {
    font-size: 2rem;
  }
}
