/* PharmGuess — Softro SaaS theme (light + violet) */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap");

:root {
  --bg: #f8fafc;
  --bg2: #eef2ff;
  --card: #ffffff;
  --card2: #eef2ff;
  --line: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-dim: rgba(124, 58, 237, 0.12);
  --accent2: #06b6d4;
  --pink: #ec4899;
  --dark: #0f172a;
  --fire: #f59e0b;
  --fire2: #ef4444;
  --good: #10b981;
  --good-dim: rgba(16, 185, 129, 0.12);
  --bad: #ef4444;
  --bad-dim: rgba(239, 68, 68, 0.1);
  --warn: #f59e0b;
  --radius: 20px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 20px 50px rgba(15, 23, 42, 0.14);
  --glow: 0 8px 24px rgba(124, 58, 237, 0.35);
  --ring: 0 0 0 3px rgba(124, 58, 237, 0.18);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: "Manrope", "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background:
    radial-gradient(1000px 600px at 90% -10%, rgba(124, 58, 237, 0.08) 0%, transparent 55%),
    radial-gradient(800px 500px at -10% 20%, rgba(6, 182, 212, 0.07) 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}
img {
  max-width: 100%;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
em {
  color: var(--accent);
  font-style: normal;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: min(760px, 100% - 32px);
  margin-inline: auto;
}

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand:hover {
  text-decoration: none;
}
.brand-accent {
  color: var(--accent);
}
.brand-pill {
  width: 14px;
  height: 22px;
  border-radius: 8px;
  background: linear-gradient(160deg, var(--accent), var(--accent2));
  display: inline-block;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.45);
}
.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: auto;
}
.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}
.site-nav a:hover {
  color: var(--accent);
  background: var(--accent-dim);
  text-decoration: none;
}
.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-dim);
}
.header-streak {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow);
}

/* ── Flame ──────────────────────────────────────────── */
.flame {
  display: inline-block;
  transform-origin: 50% 90%;
  animation: flicker 1.6s ease-in-out infinite;
}
.flame.bump {
  animation: flicker 1.6s ease-in-out infinite, bump 0.55s cubic-bezier(0.2, 1.6, 0.4, 1);
}
@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  25% { transform: scale(1.08) rotate(2deg); }
  50% { transform: scale(0.97) rotate(-1deg); }
  75% { transform: scale(1.05) rotate(1deg); }
}
@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.7) rotate(-8deg); filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.85)); }
  100% { transform: scale(1); }
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  cursor: pointer;
  color: var(--text);
  background: var(--card);
  border-color: var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover:not(:disabled) {
  transform: translateY(-3px);
}
.btn:active {
  transform: translateY(0) scale(0.99);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: var(--glow);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.45);
}
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-link {
  background: none;
  border: none;
  color: var(--muted);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 8px 10px;
}
.btn-link:hover {
  color: var(--bad);
}
.btn-big {
  width: 100%;
  font-size: 1.1rem;
  padding: 16px 24px;
  border-radius: 12px;
}
.btn-daily {
  width: 100%;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 24px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(6, 182, 212, 0.12));
  border: 1.5px solid rgba(124, 58, 237, 0.45);
  color: var(--text);
  box-shadow: none;
}
.btn-daily:hover:not(:disabled) {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.2);
  transform: translateY(-3px);
}
.daily-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--accent);
}
.daily-status {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}
.btn-daily.is-done .daily-title {
  color: var(--good);
}

/* ── Hero / home ────────────────────────────────────── */
.page {
  padding: 26px 0 60px;
}
.hero,
.page-hero {
  text-align: center;
  padding: 36px 0 12px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 10px;
}
h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6vw, 2.9rem);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 12px;
  letter-spacing: -0.03em;
  color: var(--text);
}
h1 em {
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 56ch;
  margin: 0 auto 18px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat span:last-child {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat-fire {
  font-size: 1.7rem;
}

.cat-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 18px 0 22px;
}
.chip {
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.3);
}
.chip[aria-pressed="true"] b {
  opacity: 0.9;
}
.chip b {
  font-weight: 800;
  opacity: 0.7;
}
.hint-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin: 12px 0 0;
}

.home-explain {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 34px 0 22px;
}
.explain-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.explain-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.explain-card b {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.explain-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}
.explain-num {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-dim);
  font-size: 0.8rem;
}
.banner-link {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(6, 182, 212, 0.12));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  font-weight: 700;
  color: var(--text);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.banner-link:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* ── Quiz ───────────────────────────────────────────── */
.quiz-top {
  margin-bottom: 18px;
}
.progress {
  height: 8px;
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.3, 1, 0.4, 1);
}
.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.quiz-meta b {
  color: var(--text);
}
.streak-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  color: var(--text);
  box-shadow: var(--shadow);
}

.hints {
  display: grid;
  gap: 10px;
}
.hint-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  animation: hintIn 0.4s cubic-bezier(0.2, 1, 0.3, 1) both;
}
.hint-card.locked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  background: var(--bg2);
  border-style: dashed;
  border-left-style: dashed;
  border-left-color: var(--line);
  box-shadow: none;
}
.hint-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 5px;
}
.hint-card.locked .hint-label {
  color: var(--muted);
  margin-bottom: 0;
}
.hint-text {
  margin: 0;
  font-size: 0.98rem;
}
.hint-pts {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--fire);
  white-space: nowrap;
}
@keyframes hintIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.reveal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.answer-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.answer-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.answer-wrap #answer-input {
  width: 100%;
  box-sizing: border-box;
}
.suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-hover);
  max-height: 280px;
  overflow-y: auto;
  animation: hintIn 0.15s ease both;
}
.suggest[hidden] {
  display: none;
}
.suggest li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
}
.suggest li .sg-class {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
  flex-shrink: 0;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.suggest li:hover,
.suggest li[aria-selected="true"] {
  background: var(--accent-dim);
  color: var(--accent);
}
.suggest li .sg-mark {
  color: var(--accent);
  font-weight: 700;
}
.suggest .sg-empty {
  cursor: default;
  color: var(--muted);
  font-size: 0.85rem;
}
.suggest .sg-empty:hover {
  background: transparent;
  color: var(--muted);
}
#answer-input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 1.05rem;
  color: var(--text);
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
#answer-input::placeholder {
  color: #9ca3af;
}
#answer-input:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
}
#answer-input:disabled {
  opacity: 0.6;
}
.answer-row .btn-primary {
  padding-inline: 26px;
}
.shake {
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

.miss-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #b45309;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 12px 0 0;
}

.feedback {
  margin-top: 16px;
  border-radius: var(--radius);
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  animation: hintIn 0.35s ease both;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.feedback.good {
  background: var(--good-dim);
  border-color: rgba(16, 185, 129, 0.45);
}
.feedback.bad {
  background: var(--bad-dim);
  border-color: rgba(239, 68, 68, 0.4);
}
.feedback-icon {
  font-size: 1.6rem;
}
.feedback-body {
  flex: 1;
  min-width: 200px;
}
.feedback-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  margin: 0 0 2px;
}
.feedback.good .feedback-title { color: var(--good); }
.feedback.bad .feedback-title { color: var(--bad); }
.feedback-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.feedback-sub b {
  color: var(--text);
}
.points-pop {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--good);
  animation: pop 0.5s cubic-bezier(0.2, 1.8, 0.4, 1) both;
  font-variant-numeric: tabular-nums;
}
@keyframes pop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ── Summary ────────────────────────────────────────── */
.summary-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.summary-score {
  margin: 8px 0 2px;
  font-variant-numeric: tabular-nums;
}
.summary-score b {
  font-family: var(--font-display);
  font-size: clamp(3rem, 14vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.summary-score span {
  font-size: 1.5rem;
  color: var(--muted);
}
#sum-solved {
  color: var(--muted);
  margin: 4px 0 22px;
}
.summary-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.summary-stats > div {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 10px;
}
.summary-stats b {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.summary-stats span {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.big-streak .flame-big {
  font-size: 2rem;
}
.share-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.summary-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.share-note {
  color: var(--good);
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 1.2em;
  margin: 6px 0 0;
}

/* ── Ads ────────────────────────────────────────────── */
.ad-slot {
  margin: 22px 0;
  min-height: 0;
}
.ad-placeholder {
  display: grid;
  place-items: center;
  min-height: 90px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  color: #9ca3af;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.ad-footer {
  width: min(760px, 100% - 32px);
  margin-inline: auto;
}
.ad-summary .ad-placeholder {
  min-height: 120px;
}

/* ── Footer ─────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid transparent;
  background: var(--dark);
  padding: 30px 0 40px;
  margin-top: 20px;
  color: #cbd5e1;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap:wrap;
}
.site-footer .brand {
  color: #ffffff;
}
.foot-note {
  color: #94a3b8;
  font-size: 0.85rem;
  margin: 8px 0 0;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-content: flex-start;
}
.site-footer nav a {
  color: #94a3b8;
  font-size: 0.9rem;
}
.site-footer nav a:hover {
  color: var(--accent2);
}
.foot-legal {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  color: #64748b;
  font-size: 0.78rem;
}

/* ── Encyclopedia ───────────────────────────────────── */
.enc-search {
  display: block;
  margin: 0 auto 16px;
  max-width: 520px;
}
.enc-search input {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 12px 20px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.enc-search input:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
}
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
}
.toc-chip {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  transition: all 0.25s ease;
}
.toc-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
  transform: translateY(-2px);
}
.toc-chip b {
  color: var(--accent);
}
.enc-category {
  margin-top: 38px;
  scroll-margin-top: 80px;
}
.enc-category h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.count-pill {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 999px;
  padding: 3px 10px;
  vertical-align: middle;
}
.drug-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.drug-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.drug-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.drug-card[hidden] {
  display: none;
}
.drug-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.drug-card-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
}
.drug-class {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 8px;
  border-radius: 6px;
  text-align: right;
}
.drug-hints {
  margin: 0;
  display: grid;
  gap: 8px;
}
.drug-hints > div {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 8px;
  font-size: 0.85rem;
}
.drug-hints dt {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 2px;
}
.drug-hints dd {
  margin: 0;
}
.enc-empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
}

/* ── Content pages ──────────────────────────────────── */
.content {
  padding-bottom: 40px;
}
.content h1 {
  font-size: clamp(1.7rem, 5vw, 2.4rem);
}
.content h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  margin: 34px 0 10px;
  color: var(--accent);
}
.content p,
.content li {
  color: #374151;
}
.content .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 16px 0;
  box-shadow: var(--shadow);
}
.content ol,
.content ul {
  padding-left: 22px;
}
.content li {
  margin-bottom: 8px;
}
.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.95rem;
}
.contact-mail {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 22px;
  margin: 10px 0;
  color: var(--accent);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.contact-mail:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* ── 404 ────────────────────────────────────────────── */
.nf {
  text-align: center;
  padding: 70px 0;
}
.nf-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 20vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── View transitions ───────────────────────────────── */
.view {
  animation: viewIn 0.35s ease both;
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 560px) {
  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    overflow-x: auto;
  }
  .answer-row {
    flex-direction: column;
  }
  .answer-row .btn-primary {
    width: 100%;
  }
  .stats-row {
    grid-template-columns: 1fr;
  }
  .stat {
    justify-content: space-between;
    padding-inline: 16px;
  }
  .drug-hints > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .summary-card {
    padding: 24px 16px;
  }
}

@media (min-width: 900px) {
  .container {
    width: min(860px, 100% - 40px);
  }
}
