/* RNAWiki directory — same editorial system as the live site, built for browsing. */

:root {
  --ink: #20232a;
  --muted: #60656f;
  --quiet: #7b8088;
  --blue: #176fe5;
  --blue-dark: #1258b5;
  --blue-pale: #eaf2ff;
  --line: #dfe2e7;
  --line-strong: #cdd2da;
  --canvas: #ffffff;
  --wash: #f3f4f6;
  --wash-blue: #f1f6ff;
  --caution: #785a17;
  --caution-bg: #fff8e9;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20, 25, 35, .05);
  --shadow: 0 8px 28px rgba(20, 25, 35, .09);
  --max: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.14;
  color: var(--ink);
}

p { margin: 0 0 1em; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 12px 18px; border-radius: 8px;
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 500;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}

.brand {
  font-family: var(--serif);
  font-size: 25px; letter-spacing: -.04em;
  color: var(--ink); text-decoration: none;
}
.brand span { color: var(--blue); }
.brand-small { font-size: 20px; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  padding: 8px 12px; border-radius: 999px;
  color: var(--muted); text-decoration: none;
  font-size: 14.5px; font-weight: 500;
}
.site-nav a:hover { background: var(--wash); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--blue-pale); color: var(--blue-dark); }

/* ---------- Layout ---------- */

main { min-height: 62vh; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

.page-head { padding: 46px 0 26px; }
.page-head .eyebrow { margin-bottom: 10px; }
.page-head h1 { font-size: clamp(34px, 5vw, 52px); }
.page-head .lede { margin-top: 12px; max-width: 620px; color: var(--muted); font-size: 17px; }

.eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
}

/* ---------- Hero ---------- */

.hero { padding: 64px 0 34px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: 56px; align-items: end;
}
.hero h1 { font-size: clamp(40px, 6.2vw, 72px); letter-spacing: -.045em; }
.hero h1 em { font-style: italic; color: var(--blue); }
.hero-deck { margin: 18px 0 26px; max-width: 520px; color: #4b5058; font-size: 17.5px; }

.hero-aside {
  border-left: 1px solid var(--line);
  padding-left: 28px;
}
.hero-aside p { color: #3a3f47; font-family: var(--serif); font-size: 19px; line-height: 1.45; }
.hero-aside .aside-mark {
  display: flex; align-items: center; gap: 6px; margin-bottom: 12px;
  color: var(--blue); font-family: var(--serif); font-size: 40px;
}
.hero-aside .aside-mark span { font-family: var(--sans); font-size: 18px; }

/* ---------- Search ---------- */

.search-shell { position: relative; max-width: 620px; }

.search-box {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 6px 6px 16px;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.search-box:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(23, 111, 229, .12);
}
.search-box .icon { color: var(--quiet); display: flex; flex: 0 0 auto; }
.search-box input {
  flex: 1 1 auto; min-width: 0;
  padding: 11px 0;
  border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 17px; color: var(--ink);
}
.search-box input::placeholder { color: var(--quiet); }
.search-box .button { flex: 0 0 auto; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 22px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--ink); color: #fff;
  font: inherit; font-size: 15px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.button:hover { background: #000; color: #fff; }
.button.primary { background: var(--blue); }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary {
  background: #fff; color: var(--ink); border-color: var(--line-strong);
}
.button.secondary:hover { background: var(--wash); color: var(--ink); }
.button.small { padding: 8px 15px; font-size: 14px; }

/* suggestions */
.suggest {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 8px);
  margin: 0; padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: min(60vh, 440px);
  overflow: auto;
}
.suggest[hidden] { display: none; }
.suggest li { margin: 0; }
.suggest button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--ink);
  font: inherit; text-align: left; cursor: pointer;
}
.suggest button:hover, .suggest button[aria-selected="true"] { background: var(--wash-blue); }
.suggest .s-name { font-weight: 500; }
.suggest .s-meta { margin-left: auto; color: var(--quiet); font-size: 13px; white-space: nowrap; }
.suggest .s-empty { padding: 14px 12px; color: var(--muted); font-size: 14.5px; }

/* ---------- Doors / cards ---------- */

.doors {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px; margin: 34px 0 10px;
}
.door {
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  padding: 26px 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink); text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.door:hover { border-color: var(--blue); box-shadow: var(--shadow); color: var(--ink); transform: translateY(-1px); }
.door .door-kicker { color: var(--blue); font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.door h2 { font-size: 28px; }
.door p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.door .door-count { margin-top: 16px; font-size: 13.5px; color: var(--quiet); }
.door .door-arrow { position: absolute; right: 22px; top: 24px; color: var(--blue); font-size: 20px; }

/* ---------- Letter strip ---------- */

.az { margin: 30px 0 8px; }
.az-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.az-head h2 { font-size: 20px; }
.az-head span { color: var(--quiet); font-size: 13px; }
.az-row {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.az-row a, .az-row button {
  min-width: 34px; padding: 7px 9px;
  border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 500; text-align: center;
  text-decoration: none; cursor: pointer;
}
.az-row a:hover, .az-row button:hover { background: var(--wash); }
.az-row a.active, .az-row button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.az-row a.dim, .az-row button:disabled { color: #c3c7ce; pointer-events: none; }

/* ---------- Browse toolbar ---------- */

.toolbar {
  position: sticky; top: 61px; z-index: 30;
  padding: 14px 0 12px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.toolbar-row { display: flex; align-items: center; gap: 12px; }
.toolbar .search-shell { flex: 1 1 auto; max-width: 560px; }
.toolbar .search-box { padding-left: 14px; }
.toolbar .search-box input { font-size: 16px; padding: 9px 0; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.chip {
  padding: 7px 13px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: #fff; color: var(--muted);
  font: inherit; font-size: 13.5px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  white-space: nowrap;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .n { opacity: .6; margin-left: 5px; font-weight: 400; }
.chip-sep { width: 1px; height: 22px; background: var(--line-strong); margin: 0 3px; align-self: center; }

.letters {
  display: flex; gap: 2px; overflow-x: auto;
  margin-top: 10px; padding-bottom: 2px;
  scrollbar-width: none;
}
.letters::-webkit-scrollbar { display: none; }
.letters button {
  flex: 0 0 auto;
  min-width: 30px; padding: 5px 8px;
  border: 0; border-radius: 7px;
  background: transparent; color: var(--muted);
  font: inherit; font-size: 13.5px; font-weight: 500;
  cursor: pointer;
}
.letters button:hover { background: var(--wash); color: var(--ink); }
.letters button[aria-pressed="true"] { background: var(--blue-pale); color: var(--blue-dark); }

.result-meta {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 18px 0 6px; color: var(--quiet); font-size: 13.5px;
}
.result-meta strong { color: var(--ink); font-weight: 500; }

/* ---------- Result list ---------- */

.rows { list-style: none; margin: 0 0 40px; padding: 0; border-top: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line); }
.row a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 18px;
  padding: 17px 6px;
  color: var(--ink); text-decoration: none;
  border-radius: 6px;
}
.row a:hover { background: var(--wash-blue); }
.row-name {
  font-size: 17.5px; font-weight: 500; line-height: 1.35;
  overflow-wrap: anywhere;
}
.row-name .mark { display: inline-block; margin-left: 7px; transform: translateY(-1px); color: var(--blue); font-size: 12px; }
.row-sub { margin-top: 3px; color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.row-count { color: var(--quiet); font-size: 12.5px; white-space: nowrap; }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  background: var(--wash); color: var(--muted);
  white-space: nowrap;
}
.tag.rx { background: var(--blue-pale); color: var(--blue-dark); }
.tag.otc { background: #eef7ef; color: #23662f; }
.tag.both { background: var(--caution-bg); color: var(--caution); }
.tag.sup { background: #f6efff; color: #5b3c86; }
.tag-line { display: flex; flex-wrap: wrap; gap: 5px; }

.load-more { display: flex; justify-content: center; padding: 18px 0 56px; }

/* ---------- Entry ---------- */

.entry { padding-bottom: 64px; }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 26px 0 0; color: var(--quiet); font-size: 13.5px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--blue); }
.crumbs .sep { color: #c3c7ce; }

.entry-head { padding: 16px 0 22px; border-bottom: 1px solid var(--line); }
.entry-head h1 { font-size: clamp(32px, 4.6vw, 48px); overflow-wrap: anywhere; }
.entry-sub { margin-top: 10px; color: var(--muted); font-size: 16px; overflow-wrap: anywhere; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

.entry-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; padding-top: 30px; }
.entry-main { min-width: 0; }
.entry-aside { min-width: 0; }

.section { margin-bottom: 34px; }
.section h2 {
  margin-bottom: 12px; font-family: var(--sans);
  font-size: 12px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase;
  color: var(--quiet);
}

.facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.fact { padding: 15px 17px; background: #fff; }
.fact dt { color: var(--quiet); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.fact dd { margin: 4px 0 0; font-size: 15.5px; overflow-wrap: anywhere; }

.ingredients { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.ingredients li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.ingredients li:last-child { border-bottom: 0; }
.ingredients .ing-name { font-weight: 500; }
.ingredients .ing-strength { color: var(--muted); font-size: 13.5px; }

.brand-list { display: flex; flex-wrap: wrap; gap: 7px; }
.brand-chip {
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--wash); color: #4b5058; font-size: 13.5px;
}

/* product table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--wash); color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.code { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-note { margin-top: 10px; color: var(--quiet); font-size: 13px; }

/* aside */
.aside-card {
  padding: 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; margin-bottom: 14px;
}
.aside-card h2 { margin-bottom: 10px; font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--quiet); }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list li:last-child { border-bottom: 0; }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; color: var(--ink); text-decoration: none; font-size: 14.5px; }
.link-list a:hover { color: var(--blue); }
.link-list .arrow { color: var(--quiet); }

.callout {
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--caution-bg); color: #53421d;
  font-size: 13.5px; line-height: 1.5;
}
.callout strong { display: block; margin-bottom: 3px; color: var(--caution); }

/* ---------- Supplements ---------- */

.sup-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; margin: 20px 0 48px;
}
.sup-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.sup-card:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); color: var(--ink); }
.sup-card h3 { font-size: 18px; font-weight: 500; font-family: var(--sans); letter-spacing: -.01em; }
.sup-card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.sup-card .sup-cat { margin-top: auto; padding-top: 8px; color: var(--quiet); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Sources / prose ---------- */

.prose { max-width: 720px; padding-bottom: 60px; }
.prose h2 { margin: 32px 0 10px; font-size: 24px; }
.prose h3 { margin: 24px 0 8px; font-family: var(--sans); font-size: 16px; font-weight: 600; letter-spacing: 0; }
.prose p, .prose li { color: #3f444c; font-size: 16px; line-height: 1.65; }
.prose ul { padding-left: 20px; }

/* states */
.empty { padding: 48px 0 64px; text-align: center; }
.empty h2 { font-size: 26px; margin-bottom: 8px; }
.empty p { color: var(--muted); }

.skeleton { padding: 20px 0; }
.skeleton div {
  height: 14px; margin-bottom: 12px; border-radius: 6px;
  background: linear-gradient(90deg, #f1f2f4 25%, #f8f9fa 37%, #f1f2f4 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}
.skeleton div:nth-child(2) { width: 82%; }
.skeleton div:nth-child(3) { width: 64%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.error-box { margin: 40px 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--wash); }
.error-box h2 { font-size: 22px; margin-bottom: 8px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 36px 24px 44px; background: #fbfbfc; }
.footer-inner {
  max-width: var(--max); margin: 0 auto 18px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px;
}
.site-footer p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; font-size: 14px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--blue); }
.footer-note { max-width: var(--max); margin: 0 auto; color: var(--quiet) !important; font-size: 12.5px !important; line-height: 1.6; }
.footer-attribution { max-width: var(--max); margin: 16px auto 0; }
.footer-attribution summary { color: var(--muted); font-size: 12.5px; cursor: pointer; }
.footer-attribution p { margin-top: 8px; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-aside { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
  .entry-grid { grid-template-columns: 1fr; gap: 26px; }
  .entry-aside { order: 2; }
  .sup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .header-inner { padding: 12px 18px; flex-wrap: wrap; gap: 6px 14px; }
  .site-nav { gap: 0; flex-wrap: wrap; }
  .site-nav a { padding: 7px 9px; font-size: 14px; }
  .letters { flex-wrap: wrap; overflow-x: visible; row-gap: 4px; }
  .wrap { padding: 0 18px; }
  .hero { padding: 40px 0 24px; }
  .hero h1 { font-size: clamp(34px, 10vw, 46px); }
  .hero-deck { font-size: 16px; }
  .search-box { padding-left: 13px; }
  .search-box input { font-size: 16px; }
  .search-box .button { padding: 11px 16px; }
  .doors { grid-template-columns: 1fr; }
  .toolbar { top: 57px; }
  .toolbar-row { flex-wrap: wrap; }
  .toolbar .search-shell { max-width: none; }
  .row a { grid-template-columns: 1fr; }
  .row-side { flex-direction: row; align-items: center; justify-content: space-between; }
  .facts { grid-template-columns: 1fr; }
  .sup-grid { grid-template-columns: 1fr; }
  .page-head { padding: 32px 0 18px; }
  .hero-aside { display: none; }
  .chips {
    flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }
  #result-note { display: none; }
  .suggest { max-height: min(46vh, 360px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .toolbar, .entry-aside, .button { display: none !important; }
  body { font-size: 12pt; }
  a { color: #000; text-decoration: none; }
}

/* ---------- Drug classes ---------- */

.class-filter { max-width: 520px; margin: 0 0 28px; }

.class-grid {
  list-style: none; margin: 0 0 26px; padding: 0;
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
}

.class-card a {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px; min-height: 82px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--canvas); text-decoration: none; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.class-card a:hover {
  border-color: var(--line-strong); box-shadow: var(--shadow-sm);
  transform: translateY(-1px); color: var(--ink);
}
.class-name { font-size: 15.5px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.class-count { color: var(--quiet); font-size: 12.5px; }

@media (max-width: 560px) {
  .class-grid { grid-template-columns: minmax(0, 1fr); }
  .class-card a { min-height: 0; }
}

.group-section { margin-bottom: 40px; }
.list-head {
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--quiet);
  margin: 0 0 14px;
}
.group-grid { grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }
.group-card a { gap: 6px; min-height: 108px; background: var(--wash-blue); border-color: #d8e4f8; }
.group-card .class-blurb { color: var(--muted); font-size: 13px; line-height: 1.45; }

.tag-link { text-decoration: none; background: var(--blue-pale); color: var(--blue-dark); }
.tag-link:hover { background: #dfeaff; color: var(--blue-dark); }

/* ---------------- deep editorial (L2/L3) ---------------- */
.editorial-deep .glance-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; margin: 0 0 2rem; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden;
}
.editorial-deep .glance-grid > div { background: var(--canvas); padding: .85rem 1rem; }
.editorial-deep .glance-grid dt {
  font: 600 .68rem/1.2 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--quiet);
}
.editorial-deep .glance-grid dd { margin: .3rem 0 0; font-size: .92rem; color: var(--ink); }

.editorial-deep .mechanism-chain { list-style: none; margin: 0 0 1.1rem; padding: 0; counter-reset: step; }
.editorial-deep .mechanism-chain li {
  position: relative; padding: .6rem 0 .6rem 2.6rem; border-left: 2px solid var(--blue-pale);
  counter-increment: step;
}
.editorial-deep .mechanism-chain li::before {
  content: counter(step); position: absolute; left: -.9rem; top: .55rem; width: 1.75rem; height: 1.75rem;
  display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: #fff;
  font: 600 .78rem/1 var(--sans);
}
.editorial-deep .mechanism-chain strong { display: block; font-size: .95rem; }
.editorial-deep .mechanism-chain span { color: var(--muted); font-size: .92rem; }

.editorial-deep .use-list, .editorial-deep .watch-list, .editorial-deep .interaction-list { list-style: none; margin: 0; padding: 0; }
.editorial-deep .use-list li {
  display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; align-items: baseline;
  padding: .7rem 0; border-bottom: 1px solid var(--line);
}
.editorial-deep .use-list li span:last-child { grid-column: 2; color: var(--muted); font-size: .9rem; }
.editorial-deep .use-status {
  font: 600 .66rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem .5rem; border-radius: 999px; white-space: nowrap;
}
.editorial-deep .use-approved { background: #e9f6ee; color: #1c6b3c; }
.editorial-deep .use-off-label { background: var(--caution-bg); color: var(--caution); }
.editorial-deep .use-studied { background: var(--wash-blue); color: var(--blue-dark); }
.editorial-deep .use-traditional { background: var(--wash); color: var(--muted); }

.editorial-deep .dosing blockquote {
  margin: 0 0 .6rem; padding: 1rem 1.15rem; background: var(--wash-blue);
  border-left: 3px solid var(--blue); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink); font-size: .95rem;
}

.editorial-deep .watch-list li, .editorial-deep .interaction-list li {
  display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; align-items: start;
  padding: .7rem 0; border-bottom: 1px solid var(--line);
}
.editorial-deep .watch-list strong, .editorial-deep .interaction-list strong { display: block; font-size: .95rem; }
.editorial-deep .watch-list .freq, .editorial-deep .interaction-list span {
  grid-column: 1; color: var(--muted); font-size: .88rem;
}

.grade-chip {
  font: 600 .64rem/1 var(--sans); letter-spacing: .05em; text-transform: uppercase;
  padding: .32rem .5rem; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line-strong); color: var(--muted);
}
.grade-established, .grade-regulatory_fact { background: #e9f6ee; color: #1c6b3c; border-color: #cbe8d7; }
.grade-systematic_review { background: var(--blue-pale); color: var(--blue-dark); border-color: #cfe0ff; }
.grade-randomised_trial { background: #eef3ff; color: #2f4f8f; border-color: #dbe4f7; }
.grade-observational { background: var(--wash); color: var(--muted); }
.grade-mechanistic { background: #f5f0ff; color: #5b3f96; border-color: #e5dcfa; }
.grade-traditional_use { background: var(--caution-bg); color: var(--caution); border-color: #f0e1bd; }
.grade-not_established { background: #fdf0f0; color: #8a2f2f; border-color: #f3d5d5; }

.editorial-deep .history .beat { padding: .2rem 0 .9rem 1.2rem; border-left: 2px solid var(--line); }
.editorial-deep .history .beat h3 {
  margin: 0 0 .3rem; font: 600 .72rem/1.2 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--blue-dark);
}
.editorial-deep .history .beat p { margin: 0; }

.editorial-deep .finding-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .88rem; }
.editorial-deep .finding-table th {
  text-align: left; font: 600 .68rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--quiet); padding: 0 0 .5rem; border-bottom: 1px solid var(--line-strong);
}
.editorial-deep .finding-table td { padding: .6rem .8rem .6rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.editorial-deep .uncertainty { background: var(--wash); border-radius: var(--radius-sm); padding: .8rem 1rem; font-size: .92rem; }
.editorial-deep .source-group { margin-bottom: 1rem; }
.editorial-deep .source-group h3 {
  margin: 0 0 .35rem; font: 600 .68rem/1.2 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--quiet);
}
@media (max-width: 640px) {
  .editorial-deep .glance-grid { grid-template-columns: 1fr 1fr; }
  .editorial-deep .finding-table { display: block; overflow-x: auto; }
}
.editorial-deep .glance-note { margin: -1.4rem 0 2rem; font-size: .78rem; color: var(--quiet); }
.editorial-deep .status-chip, .status-chip {
  display: inline-block; font: 600 .68rem/1 var(--sans); letter-spacing: .07em; text-transform: uppercase;
  padding: .4rem .6rem; border-radius: 999px; background: #e9f6ee; color: #1c6b3c; border: 1px solid #cbe8d7;
}
.editorial-deep .status-chip.review, .status-chip.review { background: var(--caution-bg); color: var(--caution); border-color: #f0e1bd; }
.editorial-deep .editorial-top { margin-bottom: 1rem; }

/* combination product pages */
.editorial-combo .combo-list { list-style: none; margin: 0; padding: 0; }
.editorial-combo .combo-list li { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.editorial-combo .combo-name { font-weight: 600; font-size: 1.02rem; }
.editorial-combo .combo-class { display: block; margin-top: .2rem; font-size: .78rem; color: var(--quiet); }
.editorial-combo .combo-list p { margin: .4rem 0 0; color: var(--muted); font-size: .92rem; }
.editorial-combo .combo-warning { background: var(--caution-bg); border-radius: var(--radius-sm); padding: 1rem 1.15rem; }
.editorial-combo .combo-warning h2 { color: var(--caution); }

/* Long source-record tables collapse behind a summary to keep entry pages short. */
.records-more { margin-top: 12px; }
.records-more > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent, #1f6feb);
  padding: 8px 0;
}
.records-more[open] > summary { margin-bottom: 8px; }

.canonical-note {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--accent, #1f6feb);
  background: color-mix(in srgb, var(--accent, #1f6feb) 7%, transparent);
  font-size: 14px;
  border-radius: 0 8px 8px 0;
}

/* Related entries: peers in the same drug class, kept compact. */
.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.related-list li { border-bottom: 1px solid var(--line); }
.related-list a { display: block; padding: 9px 0; color: var(--ink); text-decoration: none; font-size: 14.5px; }
.related-list a:hover { color: var(--blue); }
.related-list span { display: block; color: var(--quiet); font-size: 12.5px; padding-bottom: 7px; }
