:root {
  --ink: #071114;
  --ink-soft: #182a31;
  --muted: #4a5f67;
  --paper: #f3efe6;
  --paper-2: #e8e2d4;
  --line: rgba(12, 26, 31, 0.14);
  --accent: #0f6e6a;
  --accent-deep: #0a4f4c;
  --warn: #9a3412;
  --ok: #166534;
  --danger: #991b1b;
  --card: rgba(255, 253, 248, 0.94);
  --shadow: 0 18px 50px rgba(12, 26, 31, 0.08);
  --radius: 18px;
  --max: 1120px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-ui: "Outfit", "Segoe UI", sans-serif;
  --text: 1.15rem;
  --leading: 1.72;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(15, 110, 106, 0.18), transparent 55%),
    radial-gradient(900px 500px at 95% 5%, rgba(154, 52, 18, 0.1), transparent 50%),
    linear-gradient(180deg, #f7f3ea 0%, var(--paper) 40%, #ebe4d6 100%);
  min-height: 100vh;
  line-height: var(--leading);
}

.brand-mini,
.nav,
.side-nav,
.btn,
.filter-btn,
.meta-list strong,
.kicker,
.pdf-chip,
.phase-jump a,
.side-nav-toggle {
  font-family: var(--font-ui);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-deep);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 99;
  background: white;
  padding: 8px 12px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(247, 243, 234, 0.88);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.brand-mini {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.95rem;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  color: var(--accent-deep);
  border-bottom-color: rgba(15, 110, 106, 0.45);
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }
}

/* Left-edge sections drawer */
.side-nav-toggle {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  width: 2.15rem;
  height: 3.4rem;
  padding: 0;
  border: 1.5px solid rgba(12, 26, 31, 0.16);
  border-left: none;
  border-radius: 0 14px 14px 0;
  background: rgba(247, 243, 234, 0.96);
  box-shadow: 4px 0 16px rgba(12, 26, 31, 0.1);
  cursor: pointer;
  display: grid;
  place-items: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.side-nav-arrow {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2.5px solid var(--accent-deep);
  border-bottom: 2.5px solid var(--accent-deep);
  transform: rotate(-45deg);
  transition: transform 0.22s ease;
  margin-left: -2px;
}

.side-nav-toggle[aria-expanded="true"] {
  left: min(18rem, 86vw);
  background: #fff;
  border-color: rgba(15, 110, 106, 0.35);
}

.side-nav-toggle[aria-expanded="true"] .side-nav-arrow {
  transform: rotate(135deg);
  margin-left: 2px;
}

.side-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(12, 26, 31, 0.28);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.side-nav-backdrop[hidden] {
  display: none;
}

.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 55;
  width: min(18rem, 86vw);
  background: rgba(247, 243, 234, 0.98);
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 28px rgba(12, 26, 31, 0.12);
  padding: 1.15rem 0.85rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(-105%);
  transition: transform 0.24s ease;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.side-nav.open {
  transform: translateX(0);
}

.side-nav-title {
  margin: 0 0 0.55rem;
  padding: 0.2rem 0.55rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.side-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.72rem 0.55rem;
  border-radius: 10px;
}

.side-nav a:hover,
.side-nav a:active {
  color: var(--accent-deep);
  background: rgba(15, 110, 106, 0.08);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.hero {
  padding: 1rem 0 0.35rem;
  display: block;
  position: relative;
}

.hero::after { display: none; }

.hero-brand {
  max-width: 40rem;
}

.hero-eyebrow {
  margin: 0 0 0.2rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  line-height: 1;
  letter-spacing: -0.035em;
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}

.hero-top,
.hero-tagline,
.hero-board,
.hero-now-block,
.hero-side,
.hero-board-title,
.hero-facts,
.hero-path,
.hero-ids,
.hero-flags { display: none; }

.kicker {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 0.65rem;
}

.hero-sub {
  font-family: var(--font-ui);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 550;
  color: var(--accent-deep);
  margin: 0 0 0.85rem;
  letter-spacing: -0.01em;
  max-width: 40rem;
}

.hero-lead {
  font-size: clamp(1.12rem, 2.2vw, 1.28rem);
  line-height: 1.72;
  color: var(--ink-soft);
  max-width: 42rem;
  margin: 0 0 1.35rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border: 1.5px solid transparent;
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  min-height: 2.25rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  line-height: 1.15;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: #f7f3ea;
  box-shadow: 0 6px 16px rgba(7, 17, 20, 0.14);
}

.btn-primary:hover {
  background: var(--accent-deep);
}

.btn-ghost {
  background: rgba(255, 253, 248, 0.9);
  border-color: rgba(12, 26, 31, 0.16);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--accent-deep);
  color: var(--accent-deep);
  background: #fff;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (max-width: 860px) {
  .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.stat {
  padding: 1rem 1.05rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.stat .label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.stat .value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 650;
  margin-top: 0.25rem;
  letter-spacing: -0.025em;
}

.stat.ok .value {
  color: var(--ok);
}

.stat.warn .value {
  color: var(--warn);
}

.stat.danger .value {
  color: var(--danger);
}

section {
  padding: 2.75rem 0 0.5rem;
  scroll-margin-top: 78px;
}

.section-head {
  margin-bottom: 1.45rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(12, 26, 31, 0.12);
  position: relative;
}

.section-head::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 3.25rem;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4.2vw, 3.05rem);
  margin: 0 0 0.45rem;
  letter-spacing: -0.035em;
  font-weight: 700;
  line-height: 1.05;
  color: var(--ink);
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 44rem;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 450;
  line-height: 1.55;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.meta-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.meta-list li {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.meta-list strong {
  color: var(--muted);
  font-weight: 650;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.chip {
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.chip.danger {
  border-color: rgba(153, 27, 27, 0.35);
  color: var(--danger);
  background: rgba(153, 27, 27, 0.06);
}

.chip.ok {
  border-color: rgba(22, 101, 52, 0.3);
  color: var(--ok);
  background: rgba(22, 101, 52, 0.06);
}

.chip.warn {
  border-color: rgba(154, 52, 18, 0.3);
  color: var(--warn);
  background: rgba(154, 52, 18, 0.06);
}

.story {
  font-size: 1.12rem;
  line-height: 1.7;
}

.story-phase {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 1.35rem 0 0.55rem;
  color: var(--accent-deep);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(15, 110, 106, 0.22);
}

.story-phase:first-child {
  margin-top: 0;
}

.story ul {
  margin: 0 0 0.35rem;
  padding-left: 1.2rem;
}

.story li {
  margin: 0 0 0.45rem;
  padding-left: 0.15rem;
  color: var(--ink-soft);
}

.story li:last-child {
  margin-bottom: 0;
}

.story b {
  font-family: var(--font-ui);
  font-weight: 650;
  color: var(--ink);
  font-size: 0.94em;
  letter-spacing: -0.01em;
}

.story p {
  margin: 0 0 1.05rem;
}

.story p:last-child {
  margin-bottom: 0;
}

/* ?? Compact patient + story arc ?? */
.patient-card {
  padding: 1.15rem 1.25rem 1.2rem;
}

.id-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
}

@media (max-width: 700px) {
  .id-grid {
    grid-template-columns: 1fr;
  }
}

.id-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.id-item.id-wide {
  grid-column: 1 / -1;
}

.id-label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.id-val {
  font-size: 0.98rem;
  color: var(--ink);
  line-height: 1.4;
}

.id-val em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.9em;
}

.dx-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.resist-note {
  margin: 0.85rem 0 0;
}

/* Pre-XDR journey — mobile-first vertical; desktop horizontal */
.prexdr-journey {
  margin-top: 1.35rem;
  padding: 1rem 0.9rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.prexdr-journey-head {
  margin-bottom: 0.95rem;
}

.prexdr-journey-head h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.prexdr-journey-head p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.journey-track {
  list-style: none !important;
  margin: 0;
  padding: 0 0 0 0.1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  width: 100%;
}

.journey-track > li {
  list-style: none !important;
}

.journey-track::before {
  content: "";
  position: absolute;
  top: 1.15rem;
  bottom: 1.15rem;
  left: 0.62rem;
  width: 2px;
  background: linear-gradient(180deg, #0f6e6a, rgba(15, 110, 106, 0.18));
  z-index: 0;
}

.journey-stop {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.85rem;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 0 0.85rem;
  box-sizing: border-box;
}

.journey-dot {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 1.05rem;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent-deep);
  box-shadow: 0 0 0 4px rgba(15, 110, 106, 0.1);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

.journey-stop.is-start .journey-dot {
  background: var(--accent-deep);
}

.journey-stop.is-contam .journey-dot {
  border-color: #a16207;
  box-shadow: 0 0 0 4px rgba(161, 98, 7, 0.14);
}

.journey-stop.is-warn .journey-dot {
  border-color: #c2410c;
  box-shadow: 0 0 0 4px rgba(194, 65, 12, 0.12);
}

.journey-stop.is-good .journey-dot {
  border-color: #15803d;
  box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.12);
}

.journey-stop.is-now .journey-dot {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  animation: journey-pulse 1.8s ease-in-out infinite;
}

@keyframes journey-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(15, 110, 106, 0.16);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(15, 110, 106, 0.08);
  }
}

.journey-card {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  box-sizing: border-box;
}

.journey-card time {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 0.2rem;
}

.journey-stop.is-contam .journey-card time {
  color: #a16207;
}

.journey-stop.is-warn .journey-card time {
  color: #c2410c;
}

.journey-stop.is-good .journey-card time {
  color: #15803d;
}

.journey-card h4 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}

.journey-facts {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.journey-facts > div {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr);
  gap: 0.4rem;
  align-items: baseline;
  padding: 0.38rem 0;
  border-top: 1px solid rgba(12, 26, 31, 0.08);
  min-width: 0;
}

.journey-facts dt {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.journey-facts dd {
  margin: 0;
  min-width: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.journey-facts dd b {
  color: var(--ink);
}

.journey-facts dd.muted {
  color: var(--muted);
}

.journey-facts dd.ok {
  color: #15803d;
}

.journey-facts dd.pending {
  color: #c2410c;
}

.journey-facts dd.contam {
  color: #a16207;
}

.jf-sub {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

a.jf-link {
  color: var(--accent-deep);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

a.jf-link:hover {
  color: #0a5250;
}

a.jf-link.ok {
  color: #15803d;
}

a.jf-link.ok:hover {
  color: #166534;
}

a.jf-link.contam {
  color: #a16207;
}

a.jf-link.contam:hover {
  color: #854d0e;
}

/* Desktop / wide tablet: horizontal months */
@media (min-width: 981px) {
  .prexdr-journey {
    padding: 1.15rem 1.1rem 1.25rem;
  }

  .journey-track {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0;
    align-items: stretch;
  }

  .journey-track::before {
    top: 0.72rem;
    bottom: auto;
    left: 8%;
    right: 8%;
    width: auto;
    height: 2px;
    background: linear-gradient(90deg, #0f6e6a, rgba(15, 110, 106, 0.22));
  }

  .journey-stop {
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    padding: 0;
  }

  .journey-dot {
    margin-top: 0;
  }

  .journey-card {
    width: 100%;
    flex: 1;
    padding: 0.7rem 0.55rem 0.75rem;
  }

  .journey-card h4 {
    font-size: 0.92rem;
  }

  .journey-facts > div {
    grid-template-columns: 3.6rem minmax(0, 1fr);
    gap: 0.3rem;
  }

  .journey-facts dd {
    font-size: 0.8rem;
  }
}

.story-arc {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 860px) {
  .story-arc {
    grid-template-columns: 1fr;
  }
}

.phase-card {
  margin: 0;
  padding: 1rem 1.15rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--card);
  box-shadow: var(--shadow);
}

.phase-card:nth-child(4),
.phase-card:nth-child(5) {
  border-left-color: #c2410c;
}

.phase-card:nth-child(6) {
  border-left-color: #b91c1c;
}

.phase-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.4rem;
}

.phase-num {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  background: rgba(15, 110, 106, 0.1);
  padding: 0.18rem 0.4rem;
  border-radius: 6px;
}

.phase-meta time {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.phase-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.phase-lead {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.phase-card ul {
  margin: 0;
  padding-left: 1.05rem;
}

.phase-card li {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.phase-card li:last-child {
  margin-bottom: 0;
}

.phase-card b {
  font-family: var(--font-ui);
  font-weight: 650;
  color: var(--ink);
  font-size: 0.94em;
}

.story-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.25rem 0 0;
}

.brief-lead {
  font-size: 1.18rem;
  line-height: 1.7;
}

.brief-box {
  background: linear-gradient(145deg, rgba(15, 110, 106, 0.12), rgba(255, 255, 255, 0.6));
  border: 1px solid rgba(15, 110, 106, 0.25);
  font-size: 1.08rem;
  line-height: 1.72;
}

.brief-box b {
  font-family: var(--font-ui);
  font-weight: 650;
}

.timeline {
  position: relative;
  margin: 1.5rem 0 0;
  padding-left: 1.25rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(15, 110, 106, 0.15));
}

.t-item {
  position: relative;
  padding: 0 0 1.5rem 1.2rem;
}

.t-item::before {
  content: "";
  position: absolute;
  left: -1.02rem;
  top: 0.45rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 110, 106, 0.15);
}

.t-item.critical::before {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(153, 27, 27, 0.15);
}

.t-item.good::before {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(22, 101, 52, 0.15);
}

.t-date {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}

.t-item h3 {
  margin: 0.2rem 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.28rem;
  letter-spacing: -0.025em;
  font-weight: 650;
}

.t-item > p {
  margin: 0 0 0.65rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.65;
}

.t-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.55rem;
}

.thumb {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.thumb:hover img {
  transform: scale(1.05);
}

.thumb .cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.35rem 0.45rem;
  font-size: 0.68rem;
  background: linear-gradient(transparent, rgba(12, 26, 31, 0.78));
  color: #fff;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.02rem;
  line-height: 1.5;
}

th,
td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
}

tr:last-child td {
  border-bottom: none;
}

.charts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.charts.charts-stack {
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (max-width: 980px) {
  .charts {
    grid-template-columns: 1fr;
  }
}

.chart-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-family: var(--font-display);
}

.chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  margin: 0 0 0.35rem;
}

.chart-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

@media (max-width: 760px) {
  .chart-card {
    padding: 0.9rem 0.95rem 1rem;
  }

  .chart-canvas-wrap {
    height: 150px;
  }

  .chart-card .note {
    margin-top: 0.35rem;
    font-size: 0.86rem;
    line-height: 1.4;
  }
}

.chart-logs {
  margin-top: 0.65rem;
}

.chart-logs > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-deep);
  padding: 0.45rem 0.75rem;
  border: 1.5px solid rgba(15, 110, 106, 0.28);
  border-radius: 999px;
  background: rgba(15, 110, 106, 0.06);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.chart-logs > summary::-webkit-details-marker {
  display: none;
}

.chart-logs > summary::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid var(--accent-deep);
  border-bottom: 2px solid var(--accent-deep);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
  margin-top: -2px;
}

.chart-logs[open] > summary::after {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.chart-logs[open] > summary {
  margin-bottom: 0.55rem;
  background: rgba(15, 110, 106, 0.1);
}

.chart-logs-count {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
}

.chart-logs-standalone > summary {
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}

.chart-table-wrap {
  margin-top: 0;
  overflow: visible;
  max-height: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
}

.chart-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.chart-data-table thead th {
  background: #f3f6f5;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.chart-data-table td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid rgba(15, 110, 106, 0.1);
  color: var(--ink-soft);
}

.chart-data-table tr:last-child td {
  border-bottom: none;
}

.chart-data-table td:last-child {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.chart-data-table b {
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 650;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.filter-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.filter-btn.active {
  background: var(--ink);
  color: #f7f3ea;
  border-color: var(--ink);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.7rem;
}

.g-item[hidden] {
  display: none !important;
}

.note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.qa ol {
  margin: 0;
  padding-left: 1.15rem;
}

.qa li {
  margin-bottom: 0.55rem;
}

.med-month {
  margin-bottom: 1.1rem;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-left: 5px solid var(--accent);
}

.med-month.phase-hrze { border-left-color: #0f766e; }
.med-month.phase-hmono { border-left-color: #0369a1; }
.med-month.phase-private { border-left-color: #c2410c; }
.med-month.phase-switch { border-left-color: #a16207; }
.med-month.phase-prexdr { border-left-color: #b91c1c; }

.med-month-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0;
  padding: 0.85rem 1.1rem 0.7rem;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 110, 106, 0.04);
}

.med-month-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.med-phase-label {
  margin: 0.2rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.med-tag {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  align-self: center;
}

.med-tag.edit {
  border-color: rgba(154, 52, 18, 0.35);
  color: var(--warn);
  background: rgba(154, 52, 18, 0.08);
}

.med-tag.solid {
  border-color: rgba(15, 110, 106, 0.35);
  color: var(--accent-deep);
  background: rgba(15, 110, 106, 0.1);
}

.med-year {
  margin: 1.35rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid rgba(15, 110, 106, 0.25);
}

.med-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  margin-bottom: 0.85rem;
  padding: 0.75rem 1rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
}

.med-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-soft);
}

.swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 4px;
  display: inline-block;
}

.sw-tb { background: #0e7490; }
.sw-dm { background: #1d4ed8; }
.sw-ot { background: #b45309; }
.sw-new { background: #16a34a; }
.sw-stop { background: #dc2626; }
.sw-warn { background: #ea580c; }

.med-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(7, 17, 20, 0.04);
  border: 1px solid var(--line);
  font-family: var(--font-ui);
}

.med-jump-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: 0.35rem;
}

.med-jump-label:first-child {
  margin-left: 0;
}

.med-jump a {
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  color: var(--accent-deep);
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(15, 110, 106, 0.2);
}

.med-jump a:hover {
  background: rgba(15, 110, 106, 0.12);
}

.med-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

@media (max-width: 900px) {
  .med-cols {
    grid-template-columns: 1fr;
  }
}

.med-col {
  padding: 0.85rem 1rem 1rem;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.med-col:last-child {
  border-right: none;
}

@media (max-width: 900px) {
  .med-col {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .med-col:last-child {
    border-bottom: none;
  }
}

.med-col h4 {
  margin: 0 0 0.55rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
}

.med-col-tb {
  background: rgba(14, 116, 144, 0.04);
}
.med-col-tb h4 {
  color: #0e7490;
  background: rgba(14, 116, 144, 0.12);
}

.med-col-dm {
  background: rgba(29, 78, 216, 0.035);
}
.med-col-dm h4 {
  color: #1d4ed8;
  background: rgba(29, 78, 216, 0.1);
}

.med-col-ot {
  background: rgba(180, 83, 9, 0.04);
}
.med-col-ot h4 {
  color: #b45309;
  background: rgba(180, 83, 9, 0.1);
}

.med-subhead {
  margin: 0.55rem 0 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.med-subhead.highlight {
  color: #92400e;
  background: linear-gradient(180deg, #fde68a 0%, #fbbf24 100%);
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}

.med-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.med-list li {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 0.35rem 0.5rem;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px dashed rgba(12, 26, 31, 0.08);
  font-size: 0.92rem;
  line-height: 1.35;
}

.med-list li:last-child {
  border-bottom: none;
}

@media (max-width: 600px) {
  .med-list li {
    grid-template-columns: 1fr;
    gap: 0.1rem;
    padding: 0.5rem 0;
  }
}

.m-name {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
}

.m-dose {
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.m-when {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
}

@media (max-width: 600px) {
  .m-when {
    text-align: left;
  }
}

.med-list .guess .m-name,
.med-list .guess .m-dose,
.med-list .guess .m-when {
  color: var(--warn);
  font-style: italic;
}

.med-foot-note {
  margin-top: 0.75rem;
}

/* scoped chip colors on name spans */
.med-color-scope .m-name.med-tb {
  color: #0c4a6e;
  background: rgba(14, 165, 233, 0.16);
  padding: 0.05em 0.35em;
  border-radius: 0.3em;
}
.med-color-scope .m-name.med-new {
  color: #14532d;
  background: rgba(34, 197, 94, 0.16);
  padding: 0.05em 0.35em;
  border-radius: 0.3em;
}
.med-color-scope .m-name.med-stop {
  color: #7f1d1d;
  background: rgba(239, 68, 68, 0.14);
  padding: 0.05em 0.35em;
  border-radius: 0.3em;
}
.med-color-scope .m-name.med-off {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: #991b1b;
}
.med-color-scope .m-name.med-critical {
  color: #7c2d12;
  background: rgba(249, 115, 22, 0.18);
  padding: 0.05em 0.35em;
  border-radius: 0.3em;
}

.disclaimer {
  margin-top: 2.5rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px dashed rgba(154, 52, 18, 0.4);
  background: rgba(154, 52, 18, 0.05);
  color: var(--warn);
  font-size: 0.9rem;
}

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 16, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.lightbox.open {
  display: flex;
}

.lightbox img,
.lightbox embed {
  max-width: min(99vw, 1800px);
  max-height: 96vh;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
  cursor: zoom-out;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 0;
  background: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
}

.lightbox-cap {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.9rem;
  max-width: 90vw;
  text-align: center;
}

@media (max-width: 860px) {
  .meta-list li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* Story + reports page */
.page-hero {
  padding: 2rem 0 1.35rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  letter-spacing: -0.04em;
  margin: 0 0 0.7rem;
  line-height: 1.02;
  font-weight: 700;
}

.page-hero p {
  margin: 0;
  max-width: 48rem;
  color: var(--ink-soft);
  font-size: 1.15rem;
  line-height: 1.65;
}

.phase-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.25rem 0 0.5rem;
}

.phase-jump a {
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 650;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
}

.phase-jump a:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

.explain-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.85rem 0 0;
  position: sticky;
  top: 0.65rem;
  z-index: 30;
  padding: 0.45rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 110, 106, 0.22);
  background: rgba(255, 252, 246, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(12, 26, 31, 0.08);
  width: fit-content;
  max-width: 100%;
}

.explain-btn {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
}

.explain-btn:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

.explain-btn.is-active {
  border-color: rgba(15, 110, 106, 0.45);
  background: rgba(15, 110, 106, 0.12);
  color: var(--accent-deep);
}

.story-card-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  align-items: start;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.story-card-head:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 8px;
}

.story-card-head .when {
  grid-column: 1;
}

.story-card-head h2 {
  grid-column: 1;
  margin: 0.15rem 0 0;
}

.story-toggle {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15, 110, 106, 0.08);
  color: var(--accent-deep);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

.story-block.is-open .story-toggle {
  background: rgba(15, 110, 106, 0.18);
}

.story-body {
  display: none;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.story-block.is-open .story-body {
  display: block;
}

.story-block:not(.is-open) .story-card {
  padding-bottom: 1rem;
}

/* Compact report thumbs on timeline — zoom via lightbox */
.story-rail .report-grid {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.65rem;
}

@media (min-width: 900px) {
  .story-rail .report-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

.story-rail .report-tile img {
  aspect-ratio: 3 / 4;
  min-height: 0;
  max-height: 180px;
}

.story-rail .report-tile.landscape img {
  aspect-ratio: 4 / 3;
  min-height: 0;
  max-height: 140px;
}

.story-rail .report-tile .rt-cap {
  padding: 0.55rem 0.65rem 0.7rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.story-rail .report-tile .rt-cap b {
  font-size: 0.88rem;
  margin-bottom: 0.15rem;
}

.story-rail .report-tile .rt-cap .finding {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-rail .opinion-pair .report-tile img {
  max-height: 180px;
}

.story-rail {
  position: relative;
  margin: 1.5rem 0 3rem;
  padding-left: 0;
}

.story-rail::before {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(15, 110, 106, 0.12));
}

@media (max-width: 720px) {
  .story-rail::before {
    left: 0.85rem;
  }
}

.story-block {
  position: relative;
  margin: 0 0 1.75rem;
  padding: 0 0 0 3.2rem;
  scroll-margin-top: 80px;
}

@media (max-width: 720px) {
  .story-block {
    padding-left: 2.4rem;
  }
}

.story-block::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 1.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(15, 110, 106, 0.14);
  z-index: 1;
}

@media (max-width: 720px) {
  .story-block::before {
    left: 0.55rem;
  }
}

.story-block.critical::before {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(153, 27, 27, 0.14);
}

.story-block.good::before {
  background: var(--ok);
  box-shadow: 0 0 0 5px rgba(22, 101, 52, 0.14);
}

.story-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.45rem 1.45rem 1.55rem;
  box-shadow: var(--shadow);
}

.story-card .when {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.story-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.8vw, 1.85rem);
  margin: 0.35rem 0 0.85rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
  font-weight: 650;
}

.story-card .happen {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: 1.14rem;
  line-height: 1.75;
  max-width: 62ch;
}

.story-card .happen p {
  margin: 0 0 0.75rem;
}

.story-card .happen p:last-child {
  margin-bottom: 0;
}

.meaning {
  margin: 0 0 1.15rem;
  padding: 0.95rem 1.05rem;
  border-radius: 12px;
  background: rgba(15, 110, 106, 0.09);
  border-left: 4px solid var(--accent);
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ink);
  max-width: 65ch;
}

.meaning.danger {
  background: rgba(153, 27, 27, 0.08);
  border-left-color: var(--danger);
}

.meaning.ok {
  background: rgba(22, 101, 52, 0.09);
  border-left-color: var(--ok);
}

.meaning strong {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.report-label {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.7rem;
}

.meds-block {
  margin-top: 1.25rem;
  padding-top: 1.05rem;
  border-top: 1px dashed rgba(15, 110, 106, 0.35);
}

.meds-block > .report-label {
  color: var(--accent-deep);
  font-size: 1rem;
}

.meds-list {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--ink);
  max-width: 62ch;
}

.meds-list li {
  margin-bottom: 0.55rem;
}

/* Medicine names ? colored chips */
.meds-list b,
.meds-list strong,
.att-table b,
.med-color-scope .med-cols b,
.med-color-scope .med-cols strong {
  color: #0a4f4c;
  background: rgba(15, 110, 106, 0.14);
  padding: 0.08em 0.4em;
  border-radius: 0.35em;
  font-weight: 700;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Important highlighter (yellow) */
.meds-list mark,
mark.hl,
.happen mark,
.meaning mark,
.att-table mark.hl {
  background: linear-gradient(180deg, #fde68a 0%, #fbbf24 100%);
  color: #78350f;
  padding: 0.08em 0.35em;
  border-radius: 0.3em;
  font-weight: 700;
}

/* TB / continuing regimen ? blue-teal emphasis */
.meds-list .med-tb,
.meds-list b.med-tb,
.att-table b.med-tb,
.med-color-scope b.med-tb {
  color: #0c4a6e;
  background: rgba(14, 165, 233, 0.18);
}

/* Started / new ? green */
.meds-list .med-new,
.meds-list b.med-new,
.att-table b.med-new,
.med-color-scope b.med-new {
  color: #14532d;
  background: rgba(34, 197, 94, 0.18);
}

/* Stopped / removed ? red */
.meds-list .med-stop,
.meds-list b.med-stop,
.att-table b.med-stop,
.med-color-scope b.med-stop {
  color: #7f1d1d;
  background: rgba(239, 68, 68, 0.16);
}

/* Strike drug names that are off */
.meds-list .med-off,
.meds-list b.med-off,
.att-table b.med-off {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: #991b1b;
}

/* Critical Pre-XDR / resistance turn */
.meds-list .med-critical,
.meds-list b.med-critical,
.att-table b.med-critical,
.med-color-scope b.med-critical {
  color: #7c2d12;
  background: rgba(249, 115, 22, 0.2);
}

.report-tile .rt-cap b {
  color: #0a4f4c;
}

.report-label.meds-title,
.meds-block > .report-label:first-child {
  display: inline-block;
  background: rgba(15, 110, 106, 0.12);
  color: var(--accent-deep);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

@media (min-width: 900px) {
  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Opinion / multi-page slips: front left, back/next right */
.opinion-stack {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.opinion-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 252, 246, 0.65);
}

.opinion-pair-label {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.opinion-pair .report-grid {
  display: contents;
}

.opinion-pair > .report-tile {
  margin: 0;
}

@media (min-width: 800px) {
  .opinion-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .opinion-pair.is-single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
  }
}

.parcha-card-duo {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
}

.parcha-duo-views {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 900px) {
  .parcha-duo-views {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.parcha-duo-views .parcha-view {
  min-height: 240px;
}

.parcha-page-tag {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 1;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  pointer-events: none;
}

.report-tile {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
  display: flex;
  flex-direction: column;
}

.report-tile img {
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 320px;
  max-height: 520px;
  object-fit: contain;
  object-position: top center;
  background: #f0ebe0;
  transition: transform 0.35s ease;
}

.report-tile.landscape img {
  aspect-ratio: 4 / 3;
  min-height: 260px;
  max-height: 420px;
}

.report-tile:hover img {
  transform: scale(1.02);
}

.report-tile .rt-cap {
  padding: 0.8rem 0.95rem 0.95rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.98);
  font-family: var(--font-ui);
}

.report-tile .rt-cap b {
  display: block;
  color: var(--ink);
  font-size: 1.08rem;
  margin-bottom: 0.3rem;
  font-weight: 700;
}

.report-tile .rt-cap .finding {
  display: block;
  margin-top: 0.4rem;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--ink);
  font-family: var(--font-body);
}

.pdf-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.pdf-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 110, 106, 0.3);
  background: rgba(15, 110, 106, 0.08);
  color: var(--accent-deep);
}

.pdf-chip:hover {
  background: rgba(15, 110, 106, 0.15);
}

.phase-banner {
  margin: 2rem 0 1.25rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(12, 26, 31, 0.94), rgba(15, 110, 106, 0.88));
  color: #f7f3ea;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.back-home {
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

/* Homepage: full timeline CTA */
.timeline-cta {
  background: linear-gradient(145deg, rgba(15, 110, 106, 0.14), rgba(255, 255, 255, 0.7));
  border: 1px solid rgba(15, 110, 106, 0.28);
}

.timeline-cta-lead {
  margin: 0 0 1.1rem;
  font-size: 1.12rem;
  line-height: 1.7;
  max-width: 48rem;
}

.timeline-cta-lead b {
  font-family: var(--font-ui);
  color: var(--accent-deep);
}

.att-note {
  margin-top: 0.85rem;
}

.att-table td {
  vertical-align: top;
  line-height: 1.55;
}

.xray-grid {
  margin-top: 0.5rem;
}

.reports-index {
  display: grid;
  gap: 1.35rem;
}

.report-date-group h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.55rem;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
}

.report-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.report-links li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.02rem;
  line-height: 1.5;
}

.report-links li:last-child {
  border-bottom: none;
}

.report-links .rd {
  font-family: var(--font-ui);
  font-weight: 650;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  min-width: 6.5rem;
  flex-shrink: 0;
}

.report-links a {
  font-family: var(--font-ui);
  font-weight: 550;
  text-decoration: none;
  color: var(--accent-deep);
  border-bottom: 1px solid rgba(10, 79, 76, 0.25);
}

.report-links a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

@media (min-width: 800px) {
  .reports-index {
    grid-template-columns: 1fr 1fr;
  }
}


/* ========== OPD Parchae page ========== */
.parchae-page { padding-bottom: 3rem; }
.parchae-hero { margin-bottom: 1.25rem; }
.parcha-filters {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.5rem; padding: 0.65rem;
  border-radius: 14px; background: rgba(7, 17, 20, 0.04); border: 1px solid var(--line);
  position: sticky; top: 3.4rem; z-index: 30; backdrop-filter: blur(10px);
}
.parcha-filter {
  font-family: var(--font-ui); font-size: 0.78rem; font-weight: 700;
  border: 1px solid rgba(15, 110, 106, 0.25); background: rgba(255, 253, 248, 0.95);
  color: var(--accent-deep); padding: 0.4rem 0.75rem; border-radius: 999px; cursor: pointer;
}
.parcha-filter:hover { background: rgba(15, 110, 106, 0.1); }
.parcha-filter.is-active { background: var(--accent-deep); color: #fff; border-color: var(--accent-deep); }
.parcha-cat-head { margin: 2rem 0 1rem; padding-bottom: 0.45rem; border-bottom: 2px solid rgba(15, 110, 106, 0.28); }
.parcha-cat-head h2 { margin: 0; font-family: var(--font-display); font-size: clamp(1.75rem, 3vw, 2.15rem); letter-spacing: -0.03em; font-weight: 700; line-height: 1.1; }
.parcha-cat-head p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.98rem; }
.parcha-card {
  display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1rem 1.25rem; margin-bottom: 1.35rem; padding: 1rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow);
}
@media (max-width: 800px) { .parcha-card { grid-template-columns: 1fr; } }
.parcha-meta-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin-bottom: 0.45rem; }
.parcha-meta time {
  font-family: var(--font-ui); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted);
}
.parcha-badge {
  font-family: var(--font-ui); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 0.2rem 0.5rem; border-radius: 6px;
}
.badge-med { color: #1d4ed8; background: rgba(29, 78, 216, 0.12); }
.badge-tb { color: #0e7490; background: rgba(14, 116, 144, 0.14); }
.badge-prv { color: #c2410c; background: rgba(194, 65, 12, 0.12); }
.badge-neuro { color: #0e7490; background: rgba(14, 116, 144, 0.14); }
.badge-card { color: #166534; background: rgba(22, 101, 52, 0.12); }
.parcha-meta h3 { margin: 0 0 0.4rem; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.02em; }
.parcha-note { margin: 0 0 0.75rem; font-size: 0.95rem; color: var(--ink-soft); line-height: 1.5; }
.parcha-open { font-family: var(--font-ui); font-size: 0.8rem; font-weight: 700; text-decoration: none; color: var(--accent-deep); }
.parcha-open:hover { text-decoration: underline; }
.parcha-view {
  position: relative; margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  background: #0b1214; cursor: zoom-in; min-height: 280px;
}
.parcha-view img { width: 100%; max-height: 82vh; height: auto; object-fit: contain; background: #111; display: block; }
.parcha-hint {
  position: absolute; left: 0.75rem; bottom: 0.75rem; font-family: var(--font-ui); font-size: 0.72rem;
  font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.55); padding: 0.3rem 0.55rem; border-radius: 6px; pointer-events: none;
}
.parcha-card.is-hidden, .parcha-cat-head.is-hidden { display: none; }

/* Omnacortil — simple dose ladder */
.omna-scope { margin-bottom: 2.25rem; }
.omna-simple-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.omna-simple-head b { color: var(--ink); }
.omna-dose-ladder {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.omna-dose-ladder li {
  display: grid;
  grid-template-columns: minmax(7.5rem, 10rem) minmax(0, 1fr);
  gap: 0.35rem 1rem;
  align-items: start;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  position: relative;
}
.omna-dose-ladder li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  bottom: 0.85rem;
  width: 4px;
  border-radius: 4px;
  background: #c2410c;
}
.omna-dose-ladder li.is-stop::before { background: #b91c1c; }
.omna-when {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--ink);
  grid-row: 1 / 3;
  padding-left: 0.55rem;
}
.omna-dose-big {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.omna-how {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}
.omna-off { color: var(--danger, #b91c1c); }
.omna-note {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
@media (max-width: 560px) {
  .omna-dose-ladder li {
    grid-template-columns: 1fr;
  }
  .omna-when { grid-row: auto; }
}

.omna-dose-ladder li.is-stop {
  border-color: rgba(185, 28, 28, 0.35);
  background: rgba(185, 28, 28, 0.05);
}
