
:root {
  --ink: #1a2332;
  --muted: #5c6b7a;
  --line: #d5dde5;
  --paper: #ffffff;
  --card: #ffffff;
  --accent: #0d6e6e;
  --accent-soft: #c8e6e4;
  --success: #1f7a4d;
  --warn: #8a5a12;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}
header {
  padding: 1.1rem 1.25rem 0.5rem;
}
header h1 { margin: 0; font-size: 1.45rem; }
header .nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  align-items: center;
}
header a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
header a:hover { text-decoration: underline; }
header a.site-home-link:hover { text-decoration: none; }

.site-home-nav {
  margin-bottom: 0.6rem;
}
.site-home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent) !important;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(13, 110, 110, 0.15);
}
.site-home-link:hover {
  background: #b8e4e1;
  border-color: #0a5858;
  text-decoration: none !important;
}
.site-home-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}
header p, .sub {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 70rem;
}
main {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.5rem 1.25rem 1.75rem;
  width: 100%;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  width: 100%;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
@media (max-width: 800px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
.kpi {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  background: #fff;
}
.kpi .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}
.kpi .value {
  margin-top: 0.15rem;
  font-size: 1.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.chart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 0.75rem;
  align-items: stretch;
}
@media (max-width: 900px) {
  .chart-row { grid-template-columns: 1fr; }
}
.chart-wrap {
  position: relative;
  height: min(62vh, 580px);
  min-height: 480px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem;
}
.consort-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
  overflow: auto;
  max-height: none;
  min-height: 480px;
  height: min(62vh, 580px);
}
.consort-panel .consort-tip {
  border: none;
  box-shadow: none;
  padding: 0;
  max-width: none;
}
.consort-panel .consort-hint {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.62rem;
  text-align: center;
}
.consort-tip-root {
  display: none;
}
.consort-tip {
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 2px;
  box-shadow: 0 4px 18px rgba(26, 35, 50, 0.14);
  padding: 0.4rem 0.55rem 0.5rem;
  font-size: 0.64rem;
  color: var(--ink);
  line-height: 1.2;
}
.consort-date {
  font-weight: 700;
  font-size: 0.7rem;
  margin-bottom: 0.3rem;
  text-align: center;
}
.consort-box {
  border: 1.5px solid var(--ink);
  background: #fff;
  padding: 0.2rem 0.4rem;
  text-align: center;
  margin: 0 auto;
  max-width: none;
  width: 100%;
}
.consort-box.consort-ok { border-color: #1f7a4d; }
.consort-box.consort-bad { border-color: #c45c26; }
.consort-box.consort-vaers { border-style: dashed; border-color: #5b3cc4; }
.consort-title {
  font-weight: 600;
  font-size: 0.62rem;
}
.consort-n {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 0.05rem;
  font-size: 0.72rem;
}
.consort-sub {
  color: var(--muted);
  font-size: 0.58rem;
  margin-top: 0.04rem;
}
.consort-arrow {
  text-align: center;
  color: var(--ink);
  font-size: 0.75rem;
  line-height: 1;
  margin: 0.02rem 0;
}
.consort-exclude {
  display: flex;
  gap: 0.35rem;
  align-items: baseline;
  justify-content: flex-start;
  border-left: 2px solid var(--muted);
  margin: 0.05rem 0 0.05rem 0.9rem;
  padding: 0.12rem 0.4rem;
  color: var(--muted);
  font-size: 0.6rem;
  max-width: none;
}
.consort-exclude-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.55rem;
  color: var(--ink);
  white-space: nowrap;
}
.consort-split {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  align-items: stretch;
}
.consort-split .consort-box {
  margin: 0;
  flex: 1;
  max-width: none;
  min-width: 0;
  width: auto;
}
.consort-side {
  margin-top: 0.3rem;
  display: flex;
  justify-content: center;
}
.consort-side .consort-box {
  width: 100%;
}
.legend-note {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.no-page {
  color: var(--warn);
  font-size: 0.82rem;
  font-weight: 600;
}
a.symptom-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
a.symptom-link:hover { text-decoration: underline; }
table.dataTable tbody td { vertical-align: middle; }
#cases-table {
  width: 100% !important;
  table-layout: fixed;
}
#cases-table th,
#cases-table td {
  padding: 0.3rem 0.35rem;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
#cases-table th.col-age,
#cases-table td.col-age { width: 3.2rem; white-space: nowrap; }
#cases-table th.col-sex,
#cases-table td.col-sex { width: 2.2rem; white-space: nowrap; text-align: center; }
#cases-table th.col-days,
#cases-table td.col-days { width: 3.2rem; white-space: nowrap; }
#cases-table th.col-care,
#cases-table td.col-care { width: 3rem; white-space: nowrap; }
#cases-table th.col-vaers,
#cases-table td.col-vaers { width: 3.4rem; white-space: nowrap; }
#cases-table th.col-brand,
#cases-table td.col-brand { width: 5.5rem; white-space: nowrap; }
#cases-table th.col-date,
#cases-table td.col-date { width: 5.6rem; white-space: nowrap; }
#cases-table th.col-outcome,
#cases-table td.col-outcome { width: 5.5rem; white-space: nowrap; }
#cases-table th.col-registrant,
#cases-table td.col-registrant { width: 8.5rem; white-space: nowrap; }
table.dataTable td.freetext-cell {
  white-space: normal;
  overflow: hidden;
  max-width: none;
  font-size: 0.72rem;
  line-height: 1.3;
}
#cases-table thead th,
#symptom-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
}
.dt-container .dt-info {
  display: inline-block;
  margin: 0.25rem 0.85rem 0.25rem 0;
  padding: 0.4rem 0.75rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
