/* ==========================================================================
   Medications: design tokens
   ========================================================================== */
:root {
  --ink: #0c3139;
  --ink-2: #14454e;
  --text: #2a3f45;
  --muted: #5a6d72;
  --faint: #5f7176;
  --line: #e1e8e8;
  --line-strong: #c8d5d6;
  --paper: #fff;
  --canvas: #f6f8f4;
  --wash: #eef4f3;
  --teal-900: #0c3139;
  --teal-700: #136670;
  --teal-600: #1b7a83;
  --teal-300: #8cc3c4;
  --teal-100: #e2f0ef;
  --teal-50: #f1f8f7;
  --lime: #d6ee8f;
  --lime-soft: #f4f9e3;
  --lime-line: #e1efb7;
  --red-700: #a51f30;
  --red-600: #c22d3e;
  --red-100: #fbe2e5;
  --red-50: #fdf3f4;
  --red-line: #f2d0d5;
  --amber-700: #835711;
  --amber-100: #f8ebcf;
  --amber-50: #fdf8ee;
  --amber-line: #efdfbd;
  --serif: "Source Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --radius-lg: 28px;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow-sm: 0 1px 2px rgb(12 49 57 / 0.05), 0 1px 1px rgb(12 49 57 / 0.03);
  --shadow-md:
    0 18px 40px -18px rgb(12 49 57 / 0.22), 0 3px 8px rgb(12 49 57 / 0.05);
  --shadow-lg:
    0 34px 70px -28px rgb(12 49 57 / 0.32), 0 8px 18px rgb(12 49 57 / 0.06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(20px, 4vw, 56px);
  --tabbar-h: 62px;
}

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--tabbar-h) + 28px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 17px/1.65 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
@media (min-width: 960px) {
  body {
    font-size: 18px;
  }
}
a {
  color: inherit;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
button,
input {
  font: inherit;
}
button,
a,
input,
label,
summary {
  touch-action: manipulation;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--teal-600);
  outline-offset: 4px;
  border-radius: 6px;
}
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}
h1,
h2,
h3,
h4 {
  color: var(--ink);
}
h1,
h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}
h1 {
  font-size: clamp(3rem, 7vw, 5.75rem);
}
h2 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
}
h3 {
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -0.01em;
}
p {
  margin-bottom: 1.15rem;
  text-wrap: pretty;
}
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.icon {
  width: 1.2em;
  height: 1.2em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.2em;
}
.icon .dot,
.icon-sprite .dot {
  fill: currentColor;
  stroke: none;
}
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.eyebrow,
.toc-title {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.6;
  color: var(--teal-700);
  margin-bottom: 14px;
}
.lead {
  font-size: clamp(1.15rem, 1.6vw, 1.32rem);
  color: var(--muted);
  line-height: 1.6;
  max-width: 620px;
}
.meta {
  font-size: 0.85rem;
  color: var(--muted);
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--teal-100);
  color: var(--teal-700);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

/* ==========================================================================
   Chrome: banner, header, footer, buttons
   ========================================================================== */
.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
}
.skip:focus {
  top: 16px;
}
.draft-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 10px;
  padding: 9px 16px;
  background: #fff6dc;
  color: #5f420b;
  font-size: 0.84rem;
  text-align: center;
  border-bottom: 1px solid #f1e2b6;
}
.draft-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d9961a;
  box-shadow: 0 0 0 4px rgb(217 150 26 / 0.18);
}
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 5;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(145deg, #154752, var(--teal-900));
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.12),
    0 6px 14px -6px rgb(12 49 57 / 0.5);
  flex: none;
}
.brand-m {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  transform: translate(-1px, -2px);
}
.brand-plus {
  position: absolute;
  top: 3px;
  right: 6px;
  color: var(--lime);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
}
.brand-mark.small {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
.brand-mark.small .brand-m {
  font-size: 1.35rem;
}
.brand-mark.small .brand-plus {
  font-size: 0.8rem;
  right: 4px;
}
.brand-text {
  display: grid;
  line-height: 1.15;
}
.brand-name {
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand-sub {
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-top: 4px;
}
.site-nav {
  display: flex;
  gap: 4px;
}
.site-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 550;
  color: var(--ink);
  padding: 9px 14px;
  border-radius: 10px;
  transition: background 0.2s;
}
.site-nav a:hover {
  background: var(--canvas);
}
.site-nav .subtle {
  color: var(--muted);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  color: #fff;
  background: var(--teal-900);
  border: 1px solid var(--teal-900);
  border-radius: 14px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.3;
  cursor: pointer;
  box-shadow: 0 10px 22px -12px rgb(12 49 57 / 0.7);
  transition:
    background 0.2s,
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.button:hover {
  background: var(--ink-2);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -12px rgb(12 49 57 / 0.75);
}
.button.light {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
  box-shadow: none;
}
.button.light:hover {
  background: #e3f4ad;
}
.button.secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: none;
}
.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 18px;
  border-radius: 14px;
  background: rgb(255 255 255 / 0.8);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.3;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.25s var(--ease);
}
.chip-link .icon {
  color: var(--teal-700);
}
.chip-link:hover {
  border-color: var(--teal-600);
  background: #fff;
  transform: translateY(-1px);
}
.chip-link.danger {
  background: var(--red-50);
  border-color: var(--red-line);
  color: var(--red-700);
}
.chip-link.danger .icon {
  color: var(--red-700);
}
.chip-link.danger:hover {
  border-color: var(--red-600);
}
.site-footer {
  background: var(--teal-900);
  color: #b9cfcc;
  font-size: 0.88rem;
  padding: 44px 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 28px;
  align-items: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand .brand-mark {
  background: rgb(255 255 255 / 0.08);
  box-shadow: none;
}
.footer-mark {
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}
.site-footer p {
  margin: 0;
  max-width: 560px;
}
.site-footer .footer-meta {
  text-align: right;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: #8fb0ac;
}

/* ==========================================================================
   Hero art shared by home and drug pages
   ========================================================================== */
.hero-art {
  position: absolute;
  pointer-events: none;
  width: min(820px, 80vw);
  right: -140px;
  top: -120px;
}
.hero-rings circle {
  fill: none;
  stroke: var(--teal-700);
  stroke-opacity: 0.1;
  stroke-width: 1.2;
}
.hero-orbit circle {
  fill: var(--teal-600);
  opacity: 0.35;
}

/* ==========================================================================
   Home
   ========================================================================== */
.home-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--canvas) 0%, #fff 100%);
  padding: clamp(56px, 8vw, 104px) 0 clamp(56px, 7vw, 96px);
}
.home-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}
.home-hero h1 {
  margin: 0 0 26px;
  font-size: clamp(2.7rem, 5vw, 4.7rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.home-hero .lead {
  margin-bottom: 34px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.showcase {
  position: relative;
  height: 600px;
}
.show-card {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  display: grid;
  align-content: start;
}
.show-guide {
  width: 330px;
  left: 0;
  top: 40px;
  padding: 26px;
  gap: 4px;
  z-index: 2;
  animation: float 9s ease-in-out infinite;
}
.show-guide .pill {
  justify-self: start;
  margin-bottom: 12px;
}
.show-name {
  font-family: var(--serif);
  font-size: 2.3rem;
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.show-generic {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  margin-bottom: 14px;
}
.show-fact {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}
.show-fact .icon {
  color: var(--teal-700);
}
.show-fact b {
  color: var(--ink);
  font-weight: 650;
}
.show-fx {
  width: 300px;
  right: 0;
  top: 392px;
  padding: 22px 24px;
  gap: 12px;
  z-index: 3;
  animation: float 9s ease-in-out -4.5s infinite;
}
.show-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-700);
}
.show-bar {
  display: grid;
  grid-template-columns: 86px 1fr 46px;
  gap: 10px;
  align-items: center;
  font-size: 0.8rem;
  color: var(--ink);
}
.show-bar svg {
  width: 100%;
  height: 8px;
  border-radius: 99px;
}
.show-bar b {
  font-size: 0.75rem;
  text-align: right;
  color: var(--muted);
  font-weight: 600;
}
.show-paper {
  width: 210px;
  height: 290px;
  right: 40px;
  top: 10px;
  padding: 22px;
  gap: 9px;
  transform: rotate(7deg);
  z-index: 1;
  box-shadow: var(--shadow-md);
}
.show-paper-brand {
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--ink);
}
.show-paper-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.show-paper i {
  display: block;
  height: 7px;
  border-radius: 4px;
  background: var(--wash);
}
.show-paper i.short {
  width: 62%;
}
.show-paper i.red {
  height: 26px;
  background: var(--red-50);
  border-left: 3px solid var(--red-600);
}
.show-paper-foot {
  font-size: 0.6rem;
  color: var(--faint);
  justify-self: end;
  margin-top: 6px;
}
@keyframes float {
  50% {
    translate: 0 -8px;
  }
}
.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  padding-top: 64px;
  padding-bottom: 56px;
}
.feature {
  border-top: 1px solid var(--line-strong);
  padding-top: 24px;
}
.feature-icon,
.g-icon,
.fact-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: var(--teal-100);
  color: var(--teal-700);
}
.feature-icon .icon,
.g-icon .icon {
  width: 24px;
  height: 24px;
}
.feature h2 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 18px 0 8px;
  line-height: 1.35;
}
.feature p {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
}
.library {
  padding-top: 40px;
  padding-bottom: 104px;
}
.library-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.library-heading h2 {
  margin: 0;
}
.library-heading .eyebrow {
  margin-bottom: 8px;
}
.library-count {
  font-size: 0.88rem;
  color: var(--muted);
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr));
  gap: 24px;
}
.drug-card {
  display: grid;
  align-content: start;
  padding: 30px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, var(--canvas) 100%);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    border-color 0.2s;
}
.drug-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-300);
}
.drug-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drug-card-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--teal-900);
  color: #fff;
  transition: transform 0.35s var(--ease);
}
.drug-card:hover .drug-card-arrow {
  transform: translateX(3px);
}
.drug-card h3 {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 26px 0 16px;
}
.drug-card h3 span {
  display: block;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--muted);
  letter-spacing: 0;
  margin-top: 6px;
}
.drug-card > p {
  color: var(--muted);
  font-size: 0.98rem;
}
.drug-card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 24px;
}
.drug-card-facts > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 550;
  color: var(--ink);
}
.drug-card-facts .icon {
  color: var(--teal-700);
}
.card-link {
  font-weight: 650;
  font-size: 0.92rem;
  color: var(--teal-700);
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.empty {
  padding: 36px;
  background: var(--canvas);
  border-radius: var(--radius);
  margin-top: 24px;
}
.empty h3 {
  margin-bottom: 10px;
}
.empty p {
  margin: 0;
  color: var(--muted);
}

/* ==========================================================================
   Drug hero and tabs
   ========================================================================== */
.drug-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--canvas) 0%, #fff 100%);
  padding: 36px 0 clamp(48px, 6vw, 80px);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.75fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: end;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: clamp(28px, 4vw, 48px);
}
.breadcrumb a {
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.breadcrumb .icon {
  width: 14px;
  height: 14px;
  color: var(--faint);
}
.breadcrumb [aria-current] {
  color: var(--ink);
  font-weight: 600;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin-bottom: 18px;
}
.hero-eyebrow .pill {
  letter-spacing: 0.01em;
  text-transform: none;
  font-size: 0.8rem;
}
.drug-title {
  font-size: clamp(3.6rem, 9vw, 7.4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0;
}
.drug-generic {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  color: var(--muted);
  margin: 12px 0 22px;
}
.hero-lead {
  margin-bottom: 32px;
}
.essentials {
  position: relative;
  background: rgb(255 255 255 / 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 30px 24px;
  box-shadow: var(--shadow-lg);
}
.essentials::before {
  content: "";
  position: absolute;
  inset: 0 30px auto;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--teal-700), var(--lime));
}
.facts {
  margin: 0;
}
.fact {
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-areas: "icon label" "icon value";
  column-gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.fact-icon {
  grid-area: icon;
}
.fact-icon .icon {
  width: 22px;
  height: 22px;
}
.fact dt {
  grid-area: label;
  font-size: 0.8rem;
  color: var(--muted);
  align-self: end;
}
.fact dd {
  grid-area: value;
  margin: 0;
  font-weight: 650;
  color: var(--ink);
  font-size: 1.05rem;
  align-self: start;
}
.essentials-meta {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 18px 0 0;
  line-height: 1.55;
}
.essentials-meta .icon {
  color: var(--teal-700);
  margin-top: 1px;
}
.tab-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(255 255 255 / 0.9);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tab-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--tabbar-h);
}
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  align-self: stretch;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 550;
  transition: color 0.2s;
}
.tabs > a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  transition: background 0.2s;
}
.tabs > a:hover {
  color: var(--ink);
}
.tabs > a[aria-current] {
  color: var(--ink);
  font-weight: 650;
}
.tabs > a[aria-current]::after {
  background: var(--teal-700);
}
.tabs > a[aria-current] .icon {
  color: var(--teal-700);
}
.tab-tag,
.tab-count {
  font-size: 0.7rem;
  font-weight: 650;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--teal-100);
  color: var(--teal-700);
}
.tab-count {
  background: var(--canvas);
  color: var(--muted);
  border: 1px solid var(--line);
}
.tab-print {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  white-space: nowrap;
  transition: border-color 0.2s;
}
.tab-print:hover {
  border-color: var(--teal-600);
}

/* ==========================================================================
   Guide layout and contents
   ========================================================================== */
.guide-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  padding-top: 24px;
  padding-bottom: 120px;
}
.guide-content {
  max-width: 820px;
  min-width: 0;
}
.toc {
  position: sticky;
  top: calc(var(--tabbar-h) + 36px);
  align-self: start;
  max-height: calc(100vh - var(--tabbar-h) - 60px);
  overflow-y: auto;
  padding: 40px 4px 12px 0;
  scrollbar-width: thin;
}
.toc-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}
.toc-nav a {
  display: flex;
  gap: 12px;
  margin-left: -2px;
  padding: 8px 12px 8px 16px;
  border-left: 2px solid transparent;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
}
.toc-num {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.toc-nav a:hover {
  color: var(--ink);
}
.toc-nav a.is-active {
  color: var(--ink);
  font-weight: 650;
  border-left-color: var(--teal-700);
  background: linear-gradient(90deg, var(--teal-50), transparent);
}
.toc-nav a.is-active .toc-num {
  color: var(--teal-700);
}
.toc-nav a.is-urgent,
.toc-mobile a.is-urgent {
  color: var(--red-700);
}
.toc-nav a.is-urgent.is-active {
  border-left-color: var(--red-600);
  background: linear-gradient(90deg, var(--red-50), transparent);
}
.toc-print {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding: 16px;
  border-radius: 18px;
  background: var(--canvas);
  border: 1px solid var(--line);
  text-decoration: none;
  transition:
    border-color 0.2s,
    transform 0.3s var(--ease);
}
.toc-print:hover {
  border-color: var(--teal-300);
  transform: translateY(-2px);
}
.toc-print-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--teal-900);
  color: #fff;
  flex: none;
}
.toc-print strong {
  display: block;
  font-size: 0.9rem;
  color: var(--ink);
}
.toc-print small {
  display: block;
  line-height: 1.4;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--muted);
}
.toc-mobile {
  display: none;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.g-section {
  padding: clamp(48px, 6vw, 72px) 0;
  border-top: 1px solid var(--line);
}
.g-section:first-child,
.g-section.hiw,
.g-section.hiw + .g-section {
  border-top: 0;
}
.g-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
}
.g-head h2 {
  margin: 0;
}
.g-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin: 2px 0 8px;
}
.g-kicker > span {
  color: var(--teal-700);
  font-variant-numeric: tabular-nums;
}
.g-kicker.light {
  color: #a9c7c4;
}
.g-kicker.light > span {
  color: var(--lime);
}
.g-body p {
  max-width: 68ch;
}
.large-copy {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.3vw, 1.75rem);
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: -0.01em;
  max-width: 34em;
}
.tip-card {
  margin: 0 0 24px;
  padding: 22px 26px;
  border-radius: var(--radius);
  background: var(--lime-soft);
  border: 1px solid var(--lime-line);
}
.tip-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.tip-card h3 .icon {
  color: #5c7a14;
}
.tip-card p {
  margin: 0;
}
.tone-caution {
  margin-top: 32px;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--amber-line);
  border-radius: var(--radius-lg);
  background: var(--amber-50);
}
.tone-caution + .tone-caution {
  margin-top: 20px;
}
.tone-caution + .g-section {
  border-top: 0;
}
.tone-caution .g-icon {
  background: var(--amber-100);
  color: var(--amber-700);
}
.tone-caution .g-kicker > span {
  color: var(--amber-700);
}
.tone-urgent .g-icon {
  background: var(--red-100);
  color: var(--red-700);
}
.tone-urgent .g-kicker,
.tone-urgent .g-kicker > span {
  color: var(--red-700);
}
.alert-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.alert-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 26px;
  border-radius: var(--radius);
  background: var(--red-50);
  border: 1px solid var(--red-line);
}
.alert-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  color: var(--red-700);
  border: 1px solid var(--red-line);
}
.alert-icon .icon {
  width: 24px;
  height: 24px;
}
.alert-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--red-700);
  margin: 4px 0 6px;
}
.alert-item p:last-child {
  margin: 0;
}
.alert-item.emergency {
  background: linear-gradient(135deg, #b42235, #8f1828);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 20px 40px -24px rgb(165 31 48 / 0.8);
  padding: 26px 28px;
}
.alert-item.emergency .alert-icon {
  border-color: transparent;
  box-shadow: 0 0 0 6px rgb(255 255 255 / 0.16);
}
.alert-item.emergency .alert-label {
  color: #ffd5da;
}
.alert-item.emergency p:last-child {
  font-size: 1.12rem;
  font-weight: 550;
  line-height: 1.5;
}

/* Citations */
.cites {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
}
.cites-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--faint);
  margin-right: 4px;
}
.cite {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 26px;
  padding: 0 7px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--teal-700);
  font-size: 0.76rem;
  font-weight: 650;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.cite:hover,
.cite:focus-visible {
  background: var(--teal-100);
  border-color: var(--teal-300);
}
.cite-tip {
  position: absolute;
  z-index: 30;
  bottom: calc(100% + 10px);
  left: -8px;
  width: 290px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--teal-900);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 0.18s,
    transform 0.25s var(--ease);
}
.cite-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 16px;
  border: 6px solid transparent;
  border-top-color: var(--teal-900);
}
.cite-tip-pub {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--lime);
  margin-bottom: 4px;
}
.cite:hover .cite-tip,
.cite:focus-visible .cite-tip {
  opacity: 1;
  transform: none;
}
@media (hover: none), (max-width: 680px) {
  .cite-tip {
    display: none;
  }
}

/* ==========================================================================
   How it works
   ========================================================================== */
.g-section.hiw {
  padding-top: 8px;
}
.hiw-panel {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: clamp(28px, 5vw, 56px);
  color: #dbe8e6;
  background:
    radial-gradient(
      120% 80% at 100% 0%,
      rgb(214 238 143 / 0.16),
      transparent 55%
    ),
    radial-gradient(
      90% 70% at 0% 100%,
      rgb(127 196 196 / 0.2),
      transparent 60%
    ),
    var(--teal-900);
  box-shadow: var(--shadow-lg);
}
.hiw-title {
  color: #fff;
  white-space: pre-line;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.04;
  margin-bottom: 20px;
}
.hiw-intro {
  max-width: 58ch;
  color: #c3d8d5;
}
.hiw .cites-label {
  color: #86a7a3;
}
.hiw .cite {
  background: rgb(255 255 255 / 0.06);
  border-color: rgb(255 255 255 / 0.2);
  color: #fff;
}
.hiw .cite:hover,
.hiw .cite:focus-visible {
  background: rgb(255 255 255 / 0.14);
}
.hiw .cite-tip {
  background: #fff;
  color: var(--ink);
}
.hiw .cite-tip::after {
  border-top-color: #fff;
}
.hiw .cite-tip-pub {
  color: var(--teal-700);
}
.hiw-diagram {
  margin: 44px 0 0;
}
.hiw-drug {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  margin: 0 auto;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  box-shadow: 0 0 0 8px rgb(214 238 143 / 0.12);
}
.hiw-halo {
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 1px solid rgb(214 238 143 / 0.6);
  animation: halo 3.2s var(--ease) infinite;
}
@keyframes halo {
  from {
    transform: scale(1);
    opacity: 0.9;
  }
  to {
    transform: scale(1.35, 1.8);
    opacity: 0;
  }
}
.hiw-links {
  display: block;
  width: 100%;
  height: 64px;
  overflow: visible;
}
.hiw-links.bottom {
  height: 72px;
}
.hiw-links path {
  fill: none;
  stroke: rgb(214 238 143 / 0.32);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.hiw-links path.flow {
  stroke: var(--lime);
  stroke-width: 2;
  stroke-dasharray: 3 14;
  animation: flow 1.6s linear infinite;
}
@keyframes flow {
  to {
    stroke-dashoffset: -34;
  }
}
.hiw-receptors {
  display: flex;
}
.receptor {
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
}
.receptor-shape {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.06);
  border: 1px solid rgb(214 238 143 / 0.35);
  margin-bottom: 8px;
}
.receptor-shape svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--lime);
  stroke-width: 2.4;
  stroke-linecap: round;
}
.receptor-name {
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
}
.receptor-label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8fb0ac;
  font-weight: 650;
}
.hiw-nodes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.hiw-nodes li {
  position: relative;
  padding: 24px;
  border-radius: 22px;
  background: rgb(255 255 255 / 0.06);
  border: 1px solid rgb(255 255 255 / 0.12);
  transition:
    background 0.3s,
    transform 0.4s var(--ease);
}
.hiw-nodes li:hover {
  background: rgb(255 255 255 / 0.09);
  transform: translateY(-3px);
}
.hiw-node-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: rgb(214 238 143 / 0.14);
  color: var(--lime);
  margin-bottom: 18px;
}
.hiw-node-icon .icon {
  width: 24px;
  height: 24px;
}
.hiw-node-num {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #7f9f9b;
  font-variant-numeric: tabular-nums;
}
.hiw-nodes h3 {
  color: #fff;
  font-size: 1.12rem;
  margin-bottom: 8px;
}
.hiw-nodes p {
  color: #bed3d0;
  font-size: 0.95rem;
  margin: 0;
}
.hiw-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  color: var(--lime);
  font-weight: 650;
  font-size: 0.95rem;
}
.hiw-more .icon {
  transition: transform 0.3s var(--ease);
}
.hiw-more:hover .icon {
  transform: translateX(4px);
}

/* ==========================================================================
   Dose steps
   ========================================================================== */
.dose-steps {
  margin: 0 0 32px;
  padding: clamp(24px, 3.5vw, 34px);
  border-radius: var(--radius-lg);
  background: var(--canvas);
  border: 1px solid var(--line);
}
.dose-head {
  display: grid;
  gap: 4px;
}
.dose-head .eyebrow {
  margin: 0;
}
.dose-head p:last-child {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
  max-width: 60ch;
}
.dose-track {
  list-style: none;
  padding: 0;
  margin: 28px 0 20px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: end;
  gap: 10px;
}
.dose-step {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}
.dose-amount {
  order: 1;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  white-space: nowrap;
}
.dose-bar {
  order: 2;
  display: block;
  height: 40px;
  border-radius: 12px 12px 6px 6px;
  transform-origin: bottom;
  transition: transform 0.9s var(--ease);
}
.dose-timing {
  order: 3;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.3;
}
.dose-step:nth-child(2) .dose-bar {
  height: 62px;
}
.dose-step:nth-child(3) .dose-bar {
  height: 84px;
}
.dose-step:nth-child(4) .dose-bar {
  height: 106px;
}
.dose-step:nth-child(5) .dose-bar {
  height: 128px;
}
.dose-step:nth-child(6) .dose-bar {
  height: 150px;
}
.dose-step:nth-child(7) .dose-bar {
  height: 166px;
}
.dose-step:nth-child(n + 8) .dose-bar {
  height: 180px;
}
.stage-start .dose-bar,
.lg.start::before {
  background: linear-gradient(180deg, var(--teal-600), var(--teal-700));
}
.stage-next .dose-bar,
.lg.next::before {
  background: linear-gradient(180deg, #5aa9ad, #3b9298);
}
.stage-optional .dose-bar,
.lg.optional::before {
  background: repeating-linear-gradient(
    -45deg,
    var(--teal-100),
    var(--teal-100) 6px,
    #fff 6px,
    #fff 12px
  );
  box-shadow: inset 0 0 0 1.5px var(--teal-300);
}
.stage-start .dose-timing,
.stage-next .dose-timing {
  color: var(--ink);
  font-weight: 600;
}
.dose-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 0.8rem;
  color: var(--muted);
}
.lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lg::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 4px;
}
.dose-steps .cites {
  margin-top: 14px;
}
.dose-step:nth-child(2) .dose-bar {
  transition-delay: 0.08s;
}
.dose-step:nth-child(3) .dose-bar {
  transition-delay: 0.16s;
}
.dose-step:nth-child(4) .dose-bar {
  transition-delay: 0.24s;
}
.dose-step:nth-child(5) .dose-bar {
  transition-delay: 0.32s;
}
.dose-step:nth-child(n + 6) .dose-bar {
  transition-delay: 0.4s;
}
.js .dose-steps.is-pending .dose-bar {
  transform: scaleY(0.02);
}

/* ==========================================================================
   Side effects
   ========================================================================== */
.fx {
  margin-bottom: 40px;
}
.fx-intro {
  border-left: 3px solid var(--teal-700);
  padding-left: 24px;
  margin-bottom: 32px;
}
.fx-intro h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.fx-intro p {
  max-width: 64ch;
}
.fx-explorer {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  column-gap: 24px;
  align-items: start;
}
.fx-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin-bottom: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.fx-legend .icon {
  fill: var(--teal-700);
  stroke: none;
  width: 14px;
}
.fx-radio {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}
.fx-row {
  grid-column: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name pct" "desc one" "bar bar";
  column-gap: 16px;
  padding: 18px 20px;
  margin-bottom: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.25s;
}
.fx-row:hover {
  border-color: var(--teal-300);
}
.fx-radio:checked + .fx-row {
  border-color: var(--teal-700);
  background: var(--teal-50);
  box-shadow: inset 0 0 0 1px var(--teal-700);
}
.fx-radio:focus-visible + .fx-row {
  outline: 3px solid var(--teal-600);
  outline-offset: 3px;
}
.fx-name {
  grid-area: name;
  font-weight: 650;
  color: var(--ink);
}
.fx-desc {
  grid-area: desc;
  font-size: 0.84rem;
  color: var(--muted);
}
.fx-pct {
  grid-area: pct;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.fx-one-in {
  grid-area: one;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
}
.fx-bar {
  grid-area: bar;
  display: block;
  width: 100%;
  height: 10px;
  margin-top: 12px;
  border-radius: 99px;
  overflow: hidden;
}
.fx-track {
  fill: #e6eded;
}
.fx-fill {
  fill: var(--teal-700);
  transform-box: fill-box;
  transform-origin: left center;
  transition: transform 1.1s var(--ease);
}
.fx-radio:checked + .fx-row .fx-fill {
  fill: var(--teal-900);
}
.js .fx.is-pending .fx-fill,
.js .showcase.is-pending .fx-fill {
  transform: scaleX(0);
}
.fx-panel {
  display: none;
  grid-column: 2;
  grid-row: 1 / span 30;
  position: sticky;
  top: calc(var(--tabbar-h) + 24px);
  padding: 26px 28px 22px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.fx-radio:checked + .fx-row + .fx-panel {
  display: block;
}
.fx-panel-title {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin-bottom: 6px;
}
.natural-frequency {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.natural-frequency strong {
  display: block;
  font-size: clamp(3rem, 5vw, 3.8rem);
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.fx-panel-copy {
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.fx-panel-copy strong {
  color: var(--ink);
}
.fx-exact {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.people {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 0 auto 14px;
}
.people .on {
  fill: var(--teal-700);
}
.people .off {
  fill: #dde7e7;
}
.fx-radio:checked + .fx-row + .fx-panel .people .on {
  animation: person-in 0.5s var(--ease) both;
}
.people .r1 {
  animation-delay: 0.04s !important;
}
.people .r2 {
  animation-delay: 0.08s !important;
}
.people .r3 {
  animation-delay: 0.12s !important;
}
.people .r4 {
  animation-delay: 0.16s !important;
}
.people .r5 {
  animation-delay: 0.2s !important;
}
.people .r6 {
  animation-delay: 0.24s !important;
}
.people .r7 {
  animation-delay: 0.28s !important;
}
.people .r8 {
  animation-delay: 0.32s !important;
}
.people .r9 {
  animation-delay: 0.36s !important;
}
@keyframes person-in {
  from {
    fill: #dde7e7;
  }
}
.people-key {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}
.key-on,
.key-off {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--teal-700);
}
.key-off {
  background: #dde7e7;
  margin-left: 10px;
}
.fx-context {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  padding: 18px 22px;
  border-radius: 18px;
  background: var(--canvas);
  font-size: 0.92rem;
  color: var(--muted);
}
.fx-context .icon {
  color: var(--teal-700);
  margin-top: 3px;
}
.fx-context p {
  margin: 0;
}
.fx-others {
  margin-top: 40px;
}
.fx-others h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.fx-others > p {
  font-size: 0.95rem;
  color: var(--muted);
}
.fx-other-list {
  list-style: none;
  margin: 18px 0 14px;
  padding: 0;
  border-top: 1px solid var(--line);
}
.fx-other-list li {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(90px, 1.1fr) 64px;
  grid-template-areas: "name bar pct" "desc bar pct";
  column-gap: 20px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.fx-other-list .fx-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.fx-other-list .fx-bar {
  margin: 0;
  height: 8px;
}
.fx-other-list .fx-fill {
  fill: var(--teal-600);
}
.fx-other-list .fx-pct {
  font-size: 0.95rem;
  font-weight: 650;
}
.evidence-details {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.evidence-details summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 0;
  cursor: pointer;
  font-weight: 650;
  color: var(--ink);
  list-style: none;
}
.evidence-details summary::-webkit-details-marker {
  display: none;
}
.evidence-details summary .icon {
  color: var(--teal-700);
}
.evidence-details summary::after {
  content: "+";
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--teal-700);
  transition: transform 0.3s var(--ease);
}
.evidence-details[open] summary::after {
  transform: rotate(45deg);
}
.evidence-body {
  padding-bottom: 22px;
  font-size: 0.95rem;
}
.evidence-table-scroll {
  overflow-x: auto;
  margin: 8px 0 18px;
}
.evidence-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}
.evidence-table caption {
  text-align: left;
  font-size: 0.85rem;
  color: var(--muted);
  padding-bottom: 8px;
}
.evidence-table th,
.evidence-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}
.evidence-table th:first-child {
  text-align: left;
}
.evidence-table thead th {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 650;
  background: var(--canvas);
}
.evidence-table small {
  display: block;
  font-weight: 450;
  color: var(--faint);
}
.safety-jump {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--red-50);
  border: 1px solid var(--red-line);
  color: var(--red-700);
  font-weight: 650;
  font-size: 0.95rem;
  text-decoration: none;
  transition: border-color 0.2s;
}
.safety-jump:hover {
  border-color: var(--red-600);
}

/* Frequency categories: the label's range, never an exact rate */
.fb.after-fx {
  margin-top: 56px;
}
.fb {
  margin-bottom: 40px;
}
.fb-axis {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.fb-axis-line {
  flex: 0 1 140px;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), var(--teal-700));
  position: relative;
}
.fb-axis-line::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3px;
  border: 3.5px solid transparent;
  border-left: 6px solid var(--teal-700);
  border-right: 0;
}
.fb-scale {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.fb-band {
  display: grid;
  grid-template-columns: minmax(200px, 0.8fr) minmax(0, 1.6fr);
  column-gap: 28px;
  row-gap: 12px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.fb-word {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
  margin: 0;
}
.fb-range {
  margin: 2px 0 10px;
  font-size: 0.9rem;
  color: var(--muted);
}
.fb-meter {
  display: inline-flex;
  gap: 4px;
}
.fb-meter i {
  width: 26px;
  height: 8px;
  border-radius: 4px;
  background: #dde7e7;
}
.fb-meter i.on {
  background: var(--teal-700);
  box-shadow: 0 0 0 3px var(--teal-100);
}
.fb-meter.unknown i {
  background: transparent;
  border: 1px dashed var(--line-strong);
}
.fb-effects {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fb-effects li {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--canvas);
  border: 1px solid var(--line);
  max-width: 100%;
}
.fb-effect {
  font-weight: 620;
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.35;
}
.fb-note {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}
.receptor-shape.glyph-enzyme svg,
.receptor-shape.glyph-channel svg,
.receptor-shape.glyph-transporter svg {
  stroke-width: 2.1;
  stroke-linejoin: round;
}
@media (max-width: 680px) {
  .fb-band {
    grid-template-columns: 1fr;
    padding: 18px 0;
  }
  .fb-range {
    margin-bottom: 8px;
  }
  .fb-effects li {
    padding: 8px 12px;
  }
}

/* ==========================================================================
   Take-home band
   ========================================================================== */
.take-home {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  margin-top: 40px;
  padding: clamp(32px, 4.5vw, 52px);
  border-radius: 32px;
  color: #c9dcd9;
  background:
    radial-gradient(
      80% 120% at 0% 100%,
      rgb(214 238 143 / 0.18),
      transparent 60%
    ),
    var(--teal-900);
}
.take-home h2 {
  color: #fff;
  margin-bottom: 10px;
}
.take-home .eyebrow {
  color: var(--lime);
}
.take-home-copy p:not(.eyebrow) {
  margin-bottom: 24px;
}
.take-home-art {
  position: relative;
  height: 190px;
}
.mini-page {
  position: absolute;
  display: grid;
  align-content: start;
  gap: 8px;
  width: 124px;
  height: 172px;
  padding: 18px 14px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 40px -18px rgb(0 0 0 / 0.5);
}
.mini-page.one {
  left: 0;
  top: 10px;
  transform: rotate(-6deg);
}
.mini-page.two {
  left: 76px;
  top: 0;
  transform: rotate(5deg);
}
.mini-page i {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--wash);
}
.mini-page i:first-child {
  height: 14px;
  width: 70%;
  background: var(--teal-100);
}
.mini-page.two i:nth-child(3) {
  height: 22px;
  background: var(--red-50);
  border-left: 3px solid var(--red-600);
}

/* ==========================================================================
   Clinician and reference views
   ========================================================================== */
.view-head {
  padding-top: 40px;
}
.view-title {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  margin-bottom: 18px;
  max-width: 14ch;
}
.pathway {
  margin: 40px 0 8px;
  padding: clamp(22px, 3.5vw, 34px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background-color: #fbfcfb;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -1px -1px;
}
.pathway-head,
.pathway-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr) 56px minmax(
      0,
      1.15fr
    );
}
.pathway-head span {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 12px;
}
.pathway-head span:nth-child(2) {
  grid-column: 3;
}
.pathway-head span:nth-child(3) {
  grid-column: 5;
}
.pw-col {
  display: flex;
  flex-direction: column;
  min-height: 210px;
}
.pw-slot {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 6px 0;
}
.pw-node {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line-strong);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  box-shadow: var(--shadow-sm);
}
.pw-node.agonist {
  background: var(--teal-900);
  border-color: var(--teal-900);
  color: #fff;
}
.pw-node.agonist .icon {
  color: var(--lime);
}
.pw-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 3px solid var(--teal-600);
  flex: none;
}
.effect-node .icon {
  color: var(--teal-700);
}
.pw-links {
  width: 100%;
  height: 100%;
}
.pw-links path {
  fill: none;
  stroke: var(--teal-300);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.pathway figcaption {
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--muted);
}
.pathway + .g-section {
  border-top: 0;
}
.g-section.clinical .g-icon {
  background: var(--canvas);
  border: 1px solid var(--line);
}
.refs-summary {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--canvas);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}
.refs-summary .toc-title {
  margin-bottom: 8px;
}
.refs-stats {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.refs-stats dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 650;
}
.refs-stats dd {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
}
.reference-list {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  gap: 14px;
}
.reference {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 20px;
  padding: 24px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  transition:
    border-color 0.2s,
    box-shadow 0.3s;
}
.reference:target {
  border-color: var(--teal-600);
  box-shadow:
    0 0 0 4px var(--teal-100),
    var(--shadow-md);
}
.ref-num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--teal-900);
  color: #fff;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
}
.ref-pub {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal-700);
  margin-bottom: 6px;
}
.reference h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}
.reference h3 a {
  text-decoration: none;
}
.reference h3 a:hover {
  text-decoration: underline;
}
.reference h3 .icon {
  width: 15px;
  height: 15px;
  margin-left: 6px;
  color: var(--teal-700);
}
.ref-note {
  font-size: 0.93rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.ref-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  font-size: 0.8rem;
  color: var(--muted);
}
.ref-cited {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.ref-cited > span {
  font-weight: 650;
}
.ref-cited a {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--canvas);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s;
}
.ref-cited a:hover {
  border-color: var(--teal-300);
}

/* ==========================================================================
   Admin, sign in and messages
   ========================================================================== */
.auth {
  padding-top: 72px;
  padding-bottom: 104px;
  min-height: 70vh;
  max-width: 760px;
}
.auth h1,
.admin h1 {
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  margin: 12px 0 18px;
}
.auth form {
  max-width: 430px;
  margin-top: 32px;
}
.auth label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.auth input[type="password"] {
  display: block;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 13px 14px;
  margin-bottom: 24px;
}
.form-error {
  background: var(--red-50);
  color: var(--red-700);
  padding: 14px;
  border-radius: 12px;
}
.admin {
  padding-top: 60px;
  padding-bottom: 104px;
  min-height: 70vh;
}
.admin-heading,
.admin-drug-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.admin-drug {
  border: 1px solid var(--line);
  padding: 32px;
  border-radius: var(--radius);
  margin-top: 28px;
  box-shadow: var(--shadow-sm);
}
.admin-drug h2 {
  margin: 15px 0 8px;
  font-size: 2.2rem;
}
.admin-drug p {
  color: var(--muted);
  font-size: 0.9rem;
}
.badge {
  font-size: 0.8rem;
  background: var(--wash);
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.badge.visible {
  background: #e0edcb;
  color: #324d24;
}
.admin-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.admin details {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 0.9rem;
}
.admin summary {
  cursor: pointer;
}
.history {
  list-style: none;
  padding: 0;
}
.history li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.history span {
  color: var(--muted);
  font-size: 0.8rem;
}

/* ==========================================================================
   Scroll reveal (progressive: content is visible without JavaScript)
   ========================================================================== */
.js .reveal.is-pending {
  opacity: 0;
  transform: translateY(18px);
}
.js .reveal {
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .showcase {
    transform: scale(0.9);
    transform-origin: right center;
  }
}
@media (max-width: 1023px) {
  :root {
    --tabbar-h: 54px;
  }
  html {
    scroll-padding-top: calc(var(--tabbar-h) + 64px);
  }
  .guide-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 0;
  }
  .toc {
    display: none;
  }
  .toc-mobile {
    display: block;
    position: sticky;
    top: var(--tabbar-h);
    z-index: 15;
    margin: 0 calc(var(--gutter) * -1);
    background: rgb(255 255 255 / 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .toc-mobile summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px var(--gutter);
    cursor: pointer;
    list-style: none;
    font-size: 0.9rem;
  }
  .toc-mobile summary::-webkit-details-marker {
    display: none;
  }
  .toc-mobile-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
  }
  .toc-mobile-current {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 650;
    color: var(--ink);
  }
  .toc-mobile summary .icon {
    color: var(--teal-700);
    transition: transform 0.3s var(--ease);
  }
  .toc-mobile[open] summary .icon {
    transform: rotate(180deg);
  }
  .toc-mobile ol {
    list-style: none;
    margin: 0;
    padding: 4px var(--gutter) 14px;
    max-height: 60vh;
    overflow-y: auto;
  }
  .toc-mobile a {
    display: flex;
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
    font-size: 0.95rem;
  }
  .refs-layout .refs-aside {
    display: none;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  .essentials {
    max-width: 560px;
  }
  .home-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .showcase {
    display: none;
  }
  .tab-print {
    display: none;
  }
}
@media (max-width: 860px) {
  .fx-explorer {
    grid-template-columns: minmax(0, 1fr);
  }
  .fx-panel {
    grid-column: 1;
    grid-row: auto;
    position: static;
    margin: 0 0 16px;
    box-shadow: var(--shadow-sm);
  }
  .hiw-nodes {
    grid-template-columns: minmax(0, 1fr);
  }
  .hiw-links.bottom {
    height: 28px;
  }
  .hiw-links.bottom path {
    display: none;
  }
  .take-home {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .take-home-art {
    display: none;
  }
  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .site-footer .footer-meta {
    text-align: left;
  }
  .pathway-head,
  .pathway-grid {
    grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(
        0,
        1.1fr
      );
  }
  .pw-node {
    font-size: 0.8rem;
    padding: 10px;
    gap: 6px;
  }
  .pw-node .icon {
    display: none;
  }
}
@media (max-width: 680px) {
  body {
    font-size: 16.5px;
  }
  .brand-sub {
    display: none;
  }
  .site-nav a:first-child {
    display: none;
  }
  .header-inner {
    min-height: 66px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions > * {
    justify-content: center;
  }
  .hero-art {
    width: 520px;
    right: -260px;
    top: -60px;
    opacity: 0.7;
  }
  .breadcrumb {
    margin-bottom: 24px;
  }
  .essentials {
    padding: 24px 22px 20px;
  }
  .features {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-top: 40px;
  }
  .feature {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 16px;
  }
  .feature h2 {
    margin: 2px 0 6px;
  }
  .feature p {
    grid-column: 2;
  }
  .tabs > a {
    padding: 0 10px;
    font-size: 0.9rem;
    gap: 7px;
  }
  .tabs > a .icon,
  .tab-tag {
    display: none;
  }
  .g-head {
    gap: 14px;
  }
  .g-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }
  .g-icon .icon {
    width: 21px;
    height: 21px;
  }
  .tone-caution {
    margin-left: calc(var(--gutter) * -0.5);
    margin-right: calc(var(--gutter) * -0.5);
  }
  .alert-item {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
  }
  .alert-icon {
    width: 40px;
    height: 40px;
  }
  .alert-icon .icon {
    width: 20px;
    height: 20px;
  }
  .hiw-panel {
    border-radius: 26px;
    margin: 0 calc(var(--gutter) * -0.5);
  }
  .receptor-shape {
    width: 54px;
    height: 54px;
  }
  .dose-track {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 8px;
  }
  .dose-step {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-areas: "amount bar" "amount timing";
    column-gap: 14px;
    text-align: left;
    align-items: center;
  }
  .dose-amount {
    grid-area: amount;
    margin: 0;
    font-size: 1.15rem;
  }
  .dose-bar {
    grid-area: bar;
    height: 14px !important;
    width: 30%;
    border-radius: 6px;
    transform-origin: left;
  }
  .dose-timing {
    grid-area: timing;
    margin-top: 4px;
  }
  .dose-step:nth-child(2) .dose-bar {
    width: 44%;
  }
  .dose-step:nth-child(3) .dose-bar {
    width: 58%;
  }
  .dose-step:nth-child(4) .dose-bar {
    width: 72%;
  }
  .dose-step:nth-child(5) .dose-bar {
    width: 86%;
  }
  .dose-step:nth-child(n + 6) .dose-bar {
    width: 100%;
  }
  .js .dose-steps.is-pending .dose-bar {
    transform: scaleX(0.02);
  }
  .fx-intro {
    padding-left: 18px;
  }
  .fx-row {
    padding: 16px;
  }
  .fx-panel {
    padding: 22px 20px 18px;
  }
  .fx-other-list li {
    grid-template-columns: minmax(0, 1fr) 56px;
    grid-template-areas: "name pct" "desc pct" "bar bar";
  }
  .fx-other-list .fx-bar {
    margin-top: 8px;
  }
  .reference {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 20px;
  }
  .ref-num {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    border-radius: 12px;
  }
  .admin-heading,
  .admin-drug-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-drug {
    padding: 22px;
  }
  .history li {
    flex-direction: column;
    gap: 4px;
  }
}
@media (max-width: 420px) {
  .pathway-head,
  .pathway-grid {
    grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr) 16px minmax(
        0,
        1.1fr
      );
  }
  .pathway {
    padding: 18px 14px;
  }
  .pw-node {
    font-size: 0.74rem;
    padding: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
