/* ============================================================================
   iatronews.gr — Clinical Editorial Utility Design System (v3)
   Zero-bloat vanilla CSS. Optimized for Greek legibility, WCAG AA contrast,
   tabular numerals, pharmacy-counter mobile cards, and 95–100 Lighthouse.
   ============================================================================ */

:root {
  /* Core Surfaces & Clinical Ink (WCAG AA >= 4.5:1 verified) */
  --bg-page: #f7f9fa;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f7;
  --ink-primary: #0f172a;
  --ink-secondary: #334155;
  --ink-muted: #475569; /* 7.1:1 on #fff, 6.4:1 on #f1f5f7 */
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Aegean Medical Teal */
  --brand: #0b6e6e;
  --brand-hover: #085555;
  --brand-soft: #ecfdf5;
  --brand-tint: #eef7f7;
  --brand-border: #bfe0e0;

  /* Semantic Regulatory Status */
  --ok-ink: #065f46;
  --ok-bg: #ecfdf5;
  --ok-border: #a7f3d0;

  --warn-ink: #92400e;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;

  --danger-ink: #991b1b;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-dot: #dc2626;

  /* Phase 4 /erevnes/ Evidence-Tier Palette (distinct from shortage red) */
  --tier-meta-ink: #1e3a8a;
  --tier-meta-bg: #eff6ff;
  --tier-meta-border: #bfdbfe;

  --tier-cohort-ink: #0b5563;
  --tier-cohort-bg: #eef7f7;
  --tier-cohort-border: #b8dfdf;

  /* Shape, Elevation & Measure */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.11);
  --max-w: 1120px;
  --measure-prose: 66ch;

  /* Typography */
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-primary);
  background: var(--bg-page);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--brand);
  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: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.1rem;
  background: var(--ink-primary);
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
  color: #ffffff;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.num {
  font-variant-numeric: tabular-nums;
}

.muted-note {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin: 0.7rem 0 0;
  line-height: 1.55;
}

.page-title {
  margin: 0.25rem 0 0.55rem;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

/* ----------------------------------------------------------------------------
   Header, Scalable Desktop Nav & Option A Mobile Nav + Sub-Rail
   ---------------------------------------------------------------------------- */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  min-height: 56px;
}

@media (min-width: 960px) {
  .header-inner {
    min-height: 64px;
  }
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.16rem;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark:hover {
  text-decoration: none;
  color: var(--ink-primary);
}

.brand-emblem {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: block;
}

.brand-dot {
  color: var(--brand);
}

.brand-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-muted);
  margin-left: 0.35rem;
  padding-left: 0.6rem;
  border-left: 1px solid var(--border);
  display: none;
}

@media (min-width: 1080px) {
  .brand-sub {
    display: inline;
  }
}

.main-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 960px) {
  .main-nav {
    display: flex;
  }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-secondary);
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--brand-tint);
  color: var(--brand);
  text-decoration: none;
}

.nav-link.active {
  font-weight: 600;
}

.nav-link--alert::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger-dot);
  flex-shrink: 0;
}

.nav-link--alert:hover,
.nav-link--alert.active {
  background: var(--danger-bg);
  color: var(--danger-ink);
}

/* Mobile pure-HTML <details> menu inside compact sticky header */
.mobile-menu {
  position: relative;
}

@media (min-width: 960px) {
  .mobile-menu {
    display: none;
  }
}

.mobile-menu__toggle {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--ink-primary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.mobile-menu__toggle::-webkit-details-marker {
  display: none;
}

.mobile-menu[open] .mobile-menu__toggle {
  border-color: var(--brand);
  background: var(--brand-tint);
  color: var(--brand);
}

.mobile-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(280px, calc(100vw - 2rem));
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  z-index: 60;
}

.mobile-menu__panel .nav-link {
  min-height: 44px;
  width: 100%;
  padding: 0.6rem 0.85rem;
}

/* Option A: Non-sticky horizontal quick-access pill rail below mobile header */
.mobile-subnav {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mobile-subnav::-webkit-scrollbar {
  display: none;
}

@media (min-width: 960px) {
  .mobile-subnav {
    display: none;
  }
}

.mobile-subnav__inner {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  width: max-content;
  min-width: 100%;
}

.subnav-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-page);
  color: var(--ink-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
}

.subnav-pill.active,
.subnav-pill:hover {
  border-color: var(--brand);
  background: var(--brand-tint);
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.subnav-pill--alert::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger-dot);
  flex-shrink: 0;
}

.subnav-pill--alert.active,
.subnav-pill--alert:hover {
  border-color: var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-ink);
}

/* ----------------------------------------------------------------------------
   Main Layout & Breadcrumbs
   ---------------------------------------------------------------------------- */
main.site-main {
  flex: 1;
  padding: 1.35rem 0 3.25rem;
}

@media (min-width: 768px) {
  main.site-main {
    padding: 1.75rem 0 3.5rem;
  }
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.35rem;
  color: var(--border-strong);
}

.breadcrumbs a {
  color: var(--ink-muted);
}

.breadcrumbs a:hover {
  color: var(--brand);
}

/* ----------------------------------------------------------------------------
   Hero & Search Bar
   ---------------------------------------------------------------------------- */
.hero {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.85rem;
}

@media (min-width: 768px) {
  .hero {
    padding: 2.35rem 2.25rem;
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--brand-tint);
  border: 1px solid var(--brand-border);
  color: var(--brand-hover);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.55rem, 3.2vw, 2.28rem);
  line-height: 1.2;
  letter-spacing: -0.022em;
  color: var(--ink-primary);
}

.hero-lead {
  margin: 0 0 1.35rem;
  font-size: 1.02rem;
  color: var(--ink-secondary);
  max-width: 66ch;
}

.search-box {
  position: relative;
  max-width: 760px;
}

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-input {
  width: 100%;
  min-height: 50px;
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.78rem 1rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--ink-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 110, 110, 0.14);
}

.search-input[aria-busy="true"] {
  padding-right: 2.3rem;
}

.search-spinner {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--brand);
  border-radius: 50%;
  display: none;
  pointer-events: none;
  animation: spin 0.7s linear infinite;
}

.search-input[aria-busy="true"] + .search-spinner {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  max-width: 100%;
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  white-space: normal;
}

.search-form .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--brand-hover);
  color: #ffffff;
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--ink-primary);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  color: var(--ink-primary);
  text-decoration: none;
}

.btn-sm {
  min-height: 36px;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

@media (max-width: 520px) {
  .search-form .btn-search-text {
    display: none;
  }
  .search-form .btn-primary {
    padding: 0.75rem 0.95rem;
    min-width: 50px;
  }
}

.search-hints {
  margin-top: 0.75rem;
  font-size: 0.84rem;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
}

.search-hint-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  font-size: 0.82rem;
  font-weight: 500;
}

.search-hint-chip:hover {
  border-color: var(--brand);
  background: var(--brand-tint);
  color: var(--brand);
  text-decoration: none;
}

.search-results-panel {
  margin-top: 0.55rem;
}

.search-results-panel--overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin-top: 0;
  z-index: 35;
}

.search-results-panel--overlay .search-dropdown {
  max-height: min(65vh, 440px);
  overflow-y: auto;
}

.search-dropdown {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.search-group-label {
  padding: 0.5rem 0.95rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink-primary);
  text-decoration: none;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover,
.search-item[aria-selected="true"] {
  background: var(--brand-tint);
  text-decoration: none;
}

.search-item__main {
  min-width: 0;
  flex: 1;
}

.search-item__meta {
  flex-shrink: 0;
  justify-content: flex-end;
}

.search-item-title {
  font-weight: 600;
  color: var(--ink-primary);
  overflow-wrap: anywhere;
}

.search-item-sub {
  font-size: 0.84rem;
  color: var(--ink-muted);
  margin-top: 0.12rem;
}

.search-empty {
  padding: 1rem;
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

/* ----------------------------------------------------------------------------
   Metrics Strip, Definition Meta Grid & Section Headings
   ---------------------------------------------------------------------------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  margin-top: 1.4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 680px) {
  .stat-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stat-item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

a.stat-item:hover {
  text-decoration: none;
}

a.stat-item:hover .stat-value {
  color: var(--brand);
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.stat-value--danger {
  color: var(--danger-ink);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-top: 0.15rem;
}

/* Clean key-value definition grid for brand metadata (handles long Greek MAH names) */
.meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem 1.5rem;
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 680px) {
  .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.meta-grid__item dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin: 0 0 0.18rem;
}

.meta-grid__item dd {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--ink-primary);
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.meta-grid__item--mah dd {
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

.section {
  margin-bottom: 2.15rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.section-link {
  font-size: 0.9rem;
  font-weight: 600;
}

/* ----------------------------------------------------------------------------
   Surfaces, Grids, Shortage Feed & Badges
   ---------------------------------------------------------------------------- */
.surface {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .surface {
    padding: 1.45rem 1.65rem;
  }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 1rem;
}

.card-link {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  color: var(--ink-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card-link:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.card-kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--brand);
}

.card-title {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink-primary);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  margin: 0;
}

/* Compact homepage shortage feed (zero horizontal scroll on mobile) */
.shortage-feed {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.shortage-feed__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink-primary);
}

.shortage-feed__row:last-child {
  border-bottom: none;
}

a.shortage-feed__row:hover {
  background: var(--brand-tint);
  text-decoration: none;
}

.shortage-feed__main {
  min-width: 0;
  flex: 1 1 240px;
}

.shortage-feed__name {
  font-weight: 600;
  color: var(--ink-primary);
  display: block;
}

a.shortage-feed__row:hover .shortage-feed__name {
  color: var(--brand);
}

.shortage-feed__meta {
  font-size: 0.84rem;
  color: var(--ink-muted);
  margin-top: 0.15rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
  line-height: 1.3;
}

.badge-ok {
  color: var(--ok-ink);
  background: var(--ok-bg);
  border-color: var(--ok-border);
}

.badge-danger {
  color: var(--danger-ink);
  background: var(--danger-bg);
  border-color: var(--danger-border);
}

.badge-warn {
  color: var(--warn-ink);
  background: var(--warn-bg);
  border-color: var(--warn-border);
}

.badge-neutral {
  color: var(--ink-secondary);
  background: var(--bg-subtle);
  border-color: var(--border);
}

/* Phase 4 Evidence-Tier Badges */
.badge-tier-meta {
  color: var(--tier-meta-ink);
  background: var(--tier-meta-bg);
  border-color: var(--tier-meta-border);
}

.badge-tier-rct {
  color: var(--ok-ink);
  background: var(--ok-bg);
  border-color: var(--ok-border);
}

.badge-tier-cohort {
  color: var(--tier-cohort-ink);
  background: var(--tier-cohort-bg);
  border-color: var(--tier-cohort-border);
}

.badge-tier-obs {
  color: var(--ink-muted);
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.badge--wrap {
  border-radius: var(--radius-sm);
  white-space: normal;
  line-height: 1.35;
}

/* ----------------------------------------------------------------------------
   Callouts / Regulatory Alerts
   ---------------------------------------------------------------------------- */
.callout {
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-left-width: 4px;
  margin-bottom: 1.15rem;
}

.callout a:not(.btn) {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.callout-danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  border-left-color: var(--danger-ink);
  color: var(--danger-ink);
}

.callout-danger a:not(.btn) {
  color: #7f1d1d;
  font-weight: 600;
}

.callout-warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  border-left-color: var(--warn-ink);
  color: var(--warn-ink);
}

.callout-warn a:not(.btn) {
  color: #78350f;
  font-weight: 600;
}

.callout-info {
  background: var(--brand-tint);
  border-color: var(--brand-border);
  border-left-color: var(--brand);
  color: var(--ink-primary);
}

.callout-title {
  font-weight: 700;
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
}

.callout p {
  margin: 0;
  font-size: 0.92rem;
}

.callout-actions {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.callout-actions .btn {
  text-decoration: none;
  white-space: normal;
  text-align: left;
}

.callout a.btn-primary,
.callout a.btn-primary:hover {
  color: #ffffff;
}

.callout a.btn-secondary,
.callout a.btn-secondary:hover {
  color: var(--ink-primary);
}

/* ----------------------------------------------------------------------------
   Co-Pay Tier Switcher & Retail-vs-Reference Explainer (/farmaka/{slug})
   ---------------------------------------------------------------------------- */
.copay-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
  padding: 0.8rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.copay-toolbar__label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-primary);
}

.copay-toolbar__sub {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink-muted);
}

.tier-switcher {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.22rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.tier-btn {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-secondary);
  cursor: pointer;
}

.tier-btn:hover {
  color: var(--ink-primary);
}

.tier-btn[aria-pressed="true"] {
  background: var(--bg-surface);
  color: var(--brand);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.inline-explainer {
  margin-bottom: 0.9rem;
  font-size: 0.87rem;
  color: var(--ink-secondary);
}

.inline-explainer summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand);
  padding: 0.2rem 0;
}

.inline-explainer__body {
  margin-top: 0.45rem;
  padding: 0.8rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  line-height: 1.55;
}

.inline-explainer__body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.copay-excess {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--warn-ink);
}

.barcode-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.copy-chip {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.14rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  cursor: pointer;
}

.copy-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-tint);
}

/* ----------------------------------------------------------------------------
   Data Tables & Mobile Pharmacy-Counter Card Transformation
   ---------------------------------------------------------------------------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.data-table th {
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.78rem 0.9rem;
  border-bottom: 1px solid var(--border);
  white-space: normal;
}

.data-table td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: #fafcfd;
}

.price-cell {
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 860px) {
  .data-table th.col-num,
  .data-table td.col-num {
    text-align: right;
  }

  .data-table--packages {
    table-layout: fixed;
  }
  .data-table--packages .col-pkg    { width: 39%; }
  .data-table--packages .col-retail { width: 14%; }
  .data-table--packages .col-ref    { width: 14%; }
  .data-table--packages .col-copay  { width: 20%; }
  .data-table--packages .col-status { width: 13%; }

  .data-table--shortages {
    table-layout: fixed;
  }
  .data-table--shortages .col-drug      { width: 38%; }
  .data-table--shortages .col-substance { width: 22%; }
  .data-table--shortages .col-reason    { width: 26%; }
  .data-table--shortages .col-restore   { width: 14%; }
}

/* Mobile Card Layout (< 860px) — Zero horizontal scroll at the pharmacy counter */
@media (max-width: 859px) {
  .table-wrap--cards {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
  }

  .table-wrap--cards .data-table,
  .table-wrap--cards tbody {
    display: block;
  }

  .table-wrap--cards thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .table-wrap--cards tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.95rem 1rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
  }

  .table-wrap--cards .data-table--packages tbody tr {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem 0.5rem;
  }

  .table-wrap--cards td {
    display: block;
    padding: 0;
    border-bottom: none;
  }

  .table-wrap--cards td.cell-primary {
    grid-column: 1 / -1;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
  }

  .table-wrap--cards td.cell-full {
    grid-column: 1 / -1;
  }

  .table-wrap--cards td.cell-status {
    grid-column: 1 / -1;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border);
  }

  .table-wrap--cards td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--ink-muted);
    margin-bottom: 0.15rem;
  }
}

/* ----------------------------------------------------------------------------
   ATC Filter Chips & Form Filters
   ---------------------------------------------------------------------------- */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-height: 40px;
  padding: 0.42rem 0.78rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.chip:hover,
.chip.active {
  border-color: var(--brand);
  background: var(--brand-tint);
  color: var(--brand);
  text-decoration: none;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.filter-bar select,
.filter-bar input,
.form-input {
  font-family: var(--font-sans);
  font-size: 0.96rem;
  min-height: 44px;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--ink-primary);
}

.filter-bar select:focus,
.filter-bar input:focus,
.form-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 110, 110, 0.14);
}

/* ----------------------------------------------------------------------------
   Editorial /odigos/ Prose & FAQ Accordion
   ---------------------------------------------------------------------------- */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
}

@media (min-width: 900px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
}

.article-meta {
  font-size: 0.84rem;
  color: var(--ink-muted);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin: 0 0 1.35rem;
}

.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prose {
  max-width: var(--measure-prose);
  font-size: 1.03rem;
  line-height: 1.72;
}

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.prose h2 {
  font-size: 1.32rem;
  line-height: 1.3;
  margin: 2rem 0 0.7rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  letter-spacing: -0.015em;
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.prose h3 {
  font-size: 1.08rem;
  margin: 1.35rem 0 0.45rem;
}

.prose p {
  margin: 0 0 1rem;
  color: var(--ink-secondary);
}

.prose ul,
.prose ol {
  margin: 0 0 1.2rem;
  padding-left: 1.35rem;
  color: var(--ink-secondary);
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}

.prose th,
.prose td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.8rem;
  text-align: left;
}

.prose th {
  background: var(--bg-subtle);
  color: var(--ink-primary);
  font-weight: 600;
}

.faq-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  padding: 0.4rem 1rem;
}

.faq-item[open] {
  border-color: var(--brand-border);
}

.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-primary);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--brand);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0.25rem 0 0.7rem;
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--ink-secondary);
}

/* ----------------------------------------------------------------------------
   Stateless Checklist Tool (/odigos/ergaleia/)
   ---------------------------------------------------------------------------- */
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1.25rem;
}

.check-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-height: 56px;
  padding: 0.85rem 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.check-option:hover {
  border-color: var(--brand);
}

.check-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-tint);
}

.check-option input {
  margin-top: 0.2rem;
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
  flex-shrink: 0;
}

.checklist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

/* ----------------------------------------------------------------------------
   Phase 3 Extensible Pattern: Newsletter Signup Blocks (Listmonk + SES)
   ---------------------------------------------------------------------------- */
.newsletter-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  background: var(--brand-tint);
  border: 1px solid var(--brand-border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 820px) {
  .newsletter-card {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
  }
}

.newsletter-card__title {
  margin: 0.25rem 0 0.45rem;
  font-size: 1.18rem;
  line-height: 1.3;
}

.newsletter-card__desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.newsletter-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.newsletter-form__row .form-input {
  flex: 1 1 200px;
}

.newsletter-tabs {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.newsletter-tab {
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.newsletter-tab.active {
  background: var(--bg-surface);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.45;
  cursor: pointer;
}

.consent-check input {
  margin-top: 0.15rem;
  accent-color: var(--brand);
}

/* ----------------------------------------------------------------------------
   Phase 4 Extensible Pattern: /erevnes/ Science Desk Articles
   ---------------------------------------------------------------------------- */
.byline-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0.85rem 0 1.35rem;
}

.study-snapshot {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin: 0 0 1.5rem;
}

.study-snapshot__heading {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.study-snapshot__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.8rem 1.2rem;
  margin: 0;
}

.study-snapshot dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.study-snapshot dd {
  margin: 0.15rem 0 0;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink-primary);
}

.chart-figure {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.chart-figure__head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.8rem;
}

.chart-figure__head span {
  font-size: 0.83rem;
  color: var(--ink-muted);
}

.chart-figure__canvas svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-figure__source {
  margin: 0.65rem 0 0;
  font-size: 0.79rem;
  color: var(--ink-muted);
}

.citation-box {
  margin-top: 2rem;
  padding: 1.15rem 1.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
}

.citation-box__ref {
  margin: 0.35rem 0 0.8rem;
  font-size: 0.92rem;
  color: var(--ink-primary);
  line-height: 1.55;
}

.citation-box__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.citation-box__note {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

/* ----------------------------------------------------------------------------
   Footer & Print Styles
   ---------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-disclaimer {
  max-width: 70ch;
  margin-top: 0.6rem;
  line-height: 1.55;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.15rem;
  align-content: flex-start;
}

@media print {
  .site-header,
  .mobile-subnav,
  .site-footer,
  .breadcrumbs,
  .no-print {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .surface,
  .hero {
    border: none;
    box-shadow: none;
    padding: 0;
  }
}
