/*! THE INDIAN PHARMACIST — V342.5 Mobile-First Editorial Design System
 * Light Default + Explicit Dark Toggle | WCAG 2.2 AA | Real Breakpoints | Clean Intrinsic Reflow */
:root {
  --tip-navy: #0B1F3A;
  --tip-navy-mid: #16325B;
  --tip-teal: #0F766E;
  --tip-teal-hover: #0C5C56;
  --tip-bg: #F9F8F5;
  --tip-surface: #FFFFFF;
  --tip-surface-alt: #F2F5F8;
  --tip-ink: #0F172A;
  --tip-ink-muted: #475569;
  --tip-border: #D5DEE8;
  --tip-ok-bg: #ECFDF5;
  --tip-ok-ink: #065F46;
  --tip-warn-bg: #FFFBEB;
  --tip-warn-ink: #92400E;
  --tip-alert-bg: #FEF2F2;
  --tip-alert-ink: #991B1B;
  --tip-radius: 6px;
  --tip-shadow: 0 1px 3px rgba(11, 31, 58, 0.06);
  --tip-font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tip-font-serif: Georgia, "Times New Roman", Cambria, serif;
}

/* Light mode is default for new visitors; dark mode activated explicitly via toggle */
:root[data-theme="dark"] {
  --tip-bg: #0B1320;
  --tip-surface: #111C2E;
  --tip-surface-alt: #18263D;
  --tip-ink: #F1F5F9;
  --tip-ink-muted: #CBD5E1;
  --tip-border: #2A3F5F;
  --tip-teal: #2DD4BF;
  --tip-teal-hover: #5EEAD4;
  --tip-ok-bg: #064E3B;
  --tip-ok-ink: #A7F3D0;
  --tip-warn-bg: #451A03;
  --tip-warn-ink: #FDE68A;
  --tip-alert-bg: #450A0A;
  --tip-alert-ink: #FECACA;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body.tip-v342 {
  margin: 0;
  background: var(--tip-bg);
  color: var(--tip-ink);
  font-family: var(--tip-font-sans);
  font-size: 17px;       /* Part B3 mobile body target: 16–18px */
  line-height: 1.65;
  overflow-wrap: break-word;
}
img, svg, table { max-width: 100%; }
a { color: var(--tip-teal); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--tip-teal-hover); }
:focus-visible { outline: 3px solid var(--tip-teal); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.tip-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* Masthead & Mobile-First Navigation (Part C1) */
.tip-header {
  background: var(--tip-navy);
  color: #FFFFFF;
  border-bottom: 3px solid var(--tip-teal);
}
.tip-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}
.tip-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #FFFFFF;
  text-decoration: none;
  min-width: 0;
}
.tip-brand:hover { color: #FFFFFF; text-decoration: none; }
.tip-brand img { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; background: #fff; }
.tip-brand-title { font-size: 17px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.2; }
.tip-brand-sub { font-size: 13.5px; color: #CBD5E1; }

.tip-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tip-nav-desktop { display: none; align-items: center; gap: 4px; }
.tip-nav-desktop a {
  color: #E2E8F0;
  font-size: 15.5px; /* Part B3: 15–16px */
  font-weight: 500;
  padding: 10px 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--tip-radius);
}
.tip-nav-desktop a:hover, .tip-nav-desktop a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  text-decoration: none;
}

.tip-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--tip-radius);
  cursor: pointer;
}
.tip-icon-btn:hover { background: rgba(255, 255, 255, 0.2); }

.tip-mobile-drawer {
  background: var(--tip-navy-mid);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding: 12px 16px 18px;
}
.tip-mobile-drawer[hidden] { display: none; }
.tip-mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.tip-mobile-nav-list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 14px;
  font-size: 16px;
  font-weight: 600;
  color: #F8FAFC;
  border-radius: var(--tip-radius);
  background: rgba(255, 255, 255, 0.04);
}
.tip-mobile-nav-list a:hover, .tip-mobile-nav-list a[aria-current="page"] {
  background: var(--tip-teal);
  color: #FFFFFF;
  text-decoration: none;
}

/* Part D: Brand-Led Sandwich Homepage Hero */
.tip-hero {
  background: var(--tip-surface);
  border-bottom: 1px solid var(--tip-border);
  padding: 28px 0 30px;
}
.tip-hero-overline {
  font-size: 13.5px; /* >= 13px floor */
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tip-teal);
  margin: 0 0 8px;
}
.tip-hero-h1 {
  font-family: var(--tip-font-serif);
  font-size: clamp(34px, 8.5vw, 40px); /* Part B3 Mobile: 34–40px */
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--tip-navy);
}
:root[data-theme="dark"] .tip-hero-h1 { color: #F8FAFC; }
.tip-hero-tagline {
  font-family: var(--tip-font-serif);
  font-style: italic;
  font-size: 19px;
  color: var(--tip-teal);
  margin: 0 0 10px;
}
.tip-hero-sub {
  font-size: 17px;
  color: var(--tip-ink-muted);
  max-width: 66ch;
  margin: 0 0 22px;
}

/* Interior Page Typography (Part B3) */
.tip-page-h1 {
  font-family: var(--tip-font-serif);
  font-size: 32px; /* Part B3 Mobile: 30–36px */
  line-height: 1.18;
  margin: 0 0 10px;
  color: var(--tip-ink);
}
.tip-h2 {
  font-family: var(--tip-font-serif);
  font-size: 25px; /* Part B3 Mobile: 24–28px */
  line-height: 1.25;
  margin: 0 0 10px;
  color: var(--tip-ink);
}
.tip-h3 {
  font-size: 20.5px; /* Part B3 Mobile: 20–23px */
  line-height: 1.3;
  margin: 0 0 8px;
  color: var(--tip-ink);
}
.tip-label { font-size: 13.5px; font-weight: 700; color: var(--tip-ink-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* Universal Search Interface (Part E4) */
.tip-search-box { position: relative; width: 100%; max-width: 840px; }
.tip-search-row {
  display: flex;
  align-items: stretch;
  background: var(--tip-surface);
  border: 2px solid var(--tip-navy-mid);
  border-radius: var(--tip-radius);
}
.tip-search-row:focus-within { border-color: var(--tip-teal); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18); }
.tip-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 14px 16px;
  font-size: 17px;
  background: transparent;
  color: var(--tip-ink);
  min-height: 54px;
}
.tip-search-input:focus { outline: none; }
.tip-search-clear {
  border: 0;
  background: transparent;
  color: var(--tip-ink-muted);
  font-size: 15px;
  font-weight: 600;
  padding: 0 16px;
  min-height: 48px;
  cursor: pointer;
}
.tip-search-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tip-filter-chip {
  border: 1px solid var(--tip-border);
  background: var(--tip-surface-alt);
  color: var(--tip-ink);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 13px;
  min-height: 42px;
  border-radius: 4px;
  cursor: pointer;
}
.tip-filter-chip[aria-pressed="true"] {
  background: var(--tip-navy);
  color: #FFFFFF;
  border-color: var(--tip-navy);
}

.tip-sr-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 60px;
  z-index: 50;
  background: var(--tip-surface);
  border: 1px solid var(--tip-border);
  border-radius: var(--tip-radius);
  box-shadow: 0 14px 32px rgba(11, 31, 58, 0.16);
  max-height: 440px;
  overflow-y: auto;
}
.tip-sr-item {
  display: block;
  padding: 13px 16px;
  border-bottom: 1px solid var(--tip-border);
  color: var(--tip-ink);
}
.tip-sr-item:hover, .tip-sr-item.is-active { background: var(--tip-surface-alt); text-decoration: none; }
.tip-sr-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tip-sr-name { font-size: 16.5px; font-weight: 700; color: var(--tip-ink); }
.tip-sr-meta { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tip-sr-sub { font-size: 14.5px; color: var(--tip-ink-muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.tip-sr-brand { color: var(--tip-ok-ink); font-weight: 700; }
.tip-sr-hist { color: var(--tip-warn-ink); font-weight: 600; }
.tip-sr-empty, .tip-sr-error { padding: 16px; font-size: 15.5px; color: var(--tip-ink-muted); }

/* Status Badges (Part B3: 13–14px) */
.tip-badge {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  line-height: 1.3;
}
.tip-b-pub { background: var(--tip-ok-bg); color: var(--tip-ok-ink); }
.tip-b-pending { background: var(--tip-warn-bg); color: var(--tip-warn-ink); }
.tip-b-type { background: var(--tip-surface-alt); color: var(--tip-ink-muted); border-color: var(--tip-border); }

/* Varied Editorial Homepage Sections (Part D3) */
.tip-section { padding: 30px 0; border-bottom: 1px solid var(--tip-border); }
.tip-section-alt { background: var(--tip-surface); }
.tip-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tip-grid-dest { display: grid; grid-template-columns: 1fr; gap: 16px; }
.tip-editorial-row { display: grid; grid-template-columns: 1fr; gap: 18px; }
.tip-dest-block {
  background: var(--tip-surface);
  border: 1px solid var(--tip-border);
  border-left: 4px solid var(--tip-navy);
  border-radius: var(--tip-radius);
  padding: 18px 20px;
}
.tip-dest-block p { margin: 0 0 12px; color: var(--tip-ink-muted); }
.tip-list-clean { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tip-list-clean li { padding-bottom: 8px; border-bottom: 1px solid var(--tip-border); }
.tip-list-clean li:last-child { border-bottom: 0; padding-bottom: 0; }
.tip-list-clean a { font-weight: 600; font-size: 16px; }

/* Non-cramped Governance Metrics (Part D4) */
.tip-metrics-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}
.tip-metric-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 16px;
  background: var(--tip-surface);
  border: 1px solid var(--tip-border);
  border-radius: var(--tip-radius);
}
.tip-metric-num { font-size: 24px; font-weight: 700; color: var(--tip-navy); min-width: 74px; }
:root[data-theme="dark"] .tip-metric-num { color: var(--tip-teal); }
.tip-metric-desc { font-size: 15px; color: var(--tip-ink-muted); }

/* Part C3 & F: Dual Responsive Reference Library (Mobile Cards vs Desktop Table) */
.tip-az-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.tip-az-btn {
  min-width: 38px;
  min-height: 40px;
  border: 1px solid var(--tip-border);
  background: var(--tip-surface);
  color: var(--tip-ink);
  border-radius: 4px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.tip-az-btn.is-active { background: var(--tip-teal); color: #FFFFFF; border-color: var(--tip-teal); }

.tip-lib-cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
.tip-lib-card {
  background: var(--tip-surface);
  border: 1px solid var(--tip-border);
  border-left: 4px solid var(--tip-teal);
  border-radius: var(--tip-radius);
  padding: 16px;
}
.tip-lib-card-title { font-size: 19px; font-weight: 700; margin: 0 0 10px; line-height: 1.3; }
.tip-lib-dl { display: grid; gap: 8px; margin: 0 0 12px; }
.tip-lib-dl div { display: grid; gap: 2px; }
.tip-lib-dl dt { font-size: 13.5px; font-weight: 700; color: var(--tip-ink-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.tip-lib-dl dd { margin: 0; font-size: 15.5px; color: var(--tip-ink); }
.tip-lib-table-wrap { display: none; }

.tip-table { width: 100%; border-collapse: collapse; font-size: 15.5px; /* Part B3: 15–16px */ }
.tip-table th, .tip-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--tip-border); vertical-align: top; }
.tip-table th { background: var(--tip-surface-alt); font-size: 13.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--tip-ink); }
.tip-table tr:hover td { background: var(--tip-surface-alt); }

.tip-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.tip-btn, .tip-btn-sm {
  border: 1px solid var(--tip-border);
  background: var(--tip-surface);
  color: var(--tip-ink);
  padding: 10px 16px;
  min-height: 46px;
  border-radius: var(--tip-radius);
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
}
.tip-btn-sm { min-height: 38px; padding: 6px 12px; font-size: 14px; }
.tip-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Footer */
.tip-footer {
  background: var(--tip-navy);
  color: #CBD5E1;
  padding: 32px 0;
  font-size: 15px;
  margin-top: 28px;
}
.tip-footer a { color: #99F6E4; }
.tip-footer-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }

/* === REAL RESPONSIVE BREAKPOINTS (Part C) === */
@media (min-width: 640px) {
  .tip-wrap { padding: 0 22px; }
  .tip-metrics-list { grid-template-columns: repeat(2, 1fr); }
  .tip-footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  body.tip-v342 { font-size: 17.5px; }
  .tip-grid-dest { grid-template-columns: repeat(2, 1fr); }
  .tip-editorial-row { grid-template-columns: 1.25fr 1fr; }
}

@media (min-width: 960px) {
  /* Switch Reference Library from mobile cards to desktop structured table */
  .tip-lib-cards { display: none; }
  .tip-lib-table-wrap {
    display: block;
    overflow-x: auto;
    border: 1px solid var(--tip-border);
    border-radius: var(--tip-radius);
    background: var(--tip-surface);
  }
}

@media (min-width: 1024px) {
  body.tip-v342 { font-size: 18px; } /* Part B3 Desktop body: 17–19px */
  .tip-nav-desktop { display: flex; }
  #tip-menu-toggle, #tip-mobile-drawer { display: none !important; }
  .tip-hero { padding: 40px 0 42px; }
  .tip-hero-h1 { font-size: 52px; }  /* Part B3 Desktop H1: 48–58px */
  .tip-page-h1 { font-size: 44px; }  /* Part B3 Desktop Page H1: 40–48px */
  .tip-h2 { font-size: 30px; }       /* Part B3 Desktop H2: 28–34px */
  .tip-h3 { font-size: 23px; }       /* Part B3 Desktop H3: 21–25px */
  .tip-footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tip-bg: #0B1320; --tip-surface: #111C2E; --tip-surface-alt: #18263D;
    --tip-ink: #F1F5F9; --tip-ink-muted: #CBD5E1; --tip-border: #2A3F5F;
    --tip-teal: #2DD4BF; --tip-teal-hover: #5EEAD4;
  }
}


/* ==========================================================================
   THE INDIAN PHARMACIST — V342.7 EDITORIAL DESIGN SYSTEM & READABILITY LAYER
   Palette inspired by official masthead: Warm Ivory (#F7F4EC), Midnight Navy
   (#0B2239), Pharmacy Teal (#0E7A74), Refined Slate-Navy Dark (#0D1520).
   ========================================================================== */
:root,
html[data-theme="light"] {
  --tip-ivory: #F7F4EC;
  --tip-paper: #FFFFFF;
  --tip-paper-subtle: #EFECE3;
  --tip-navy: #0B2239;
  --tip-teal: #0E7A74;
  --tip-teal-hover: #0A5F5A;
  --tip-teal-soft: #E6F4F1;
  --tip-ink: #0B2239;
  --tip-ink-secondary: #334155;
  --tip-ink-muted: #526071;
  --tip-rule: #D8D3C5;
  --tip-rule-strong: #B8B1A0;
  --tip-verified-bg: #E6F4F1;
  --tip-verified-fg: #0A5F5A;
  --tip-warn-bg: #FEF7E6;
  --tip-warn-fg: #854D0E;
  --tip-warn-border: #D97706;
  --tip-danger-bg: #FEF2F2;
  --tip-danger-fg: #991B1B;
  --tip-danger-border: #DC2626;
  --tip-pending-bg: #F1F5F9;
  --tip-pending-fg: #334155;
  --tip-font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --tip-font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tip-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Map legacy CSS variables seamlessly to V342.7 tokens */
  --bg-page: var(--tip-ivory);
  --bg-body: var(--tip-ivory);
  --bg-surface: var(--tip-paper);
  --bg-card: var(--tip-paper);
  --bg-subtle: var(--tip-paper-subtle);
  --text-primary: var(--tip-ink);
  --text-secondary: var(--tip-ink-secondary);
  --text-muted: var(--tip-ink-muted);
  --border-subtle: var(--tip-rule);
  --border-color: var(--tip-rule);
  --accent-primary: var(--tip-teal);
  --accent-navy: var(--tip-navy);
}

html[data-theme="dark"] {
  --tip-ivory: #0D1520;
  --tip-paper: #131E2E;
  --tip-paper-subtle: #1A283B;
  --tip-navy: #E2E8F0;
  --tip-teal: #5EEAD4;
  --tip-teal-hover: #99F6E4;
  --tip-teal-soft: #13313A;
  --tip-ink: #EEF2F6;
  --tip-ink-secondary: #CBD5E1;
  --tip-ink-muted: #94A3B8;
  --tip-rule: #263548;
  --tip-rule-strong: #3B4E68;
  --tip-verified-bg: #0F2E2C;
  --tip-verified-fg: #5EEAD4;
  --tip-warn-bg: #2D220D;
  --tip-warn-fg: #FCD34D;
  --tip-warn-border: #F59E0B;
  --tip-danger-bg: #321619;
  --tip-danger-fg: #FCA5A5;
  --tip-danger-border: #EF4444;
  --tip-pending-bg: #1E293B;
  --tip-pending-fg: #CBD5E1;

  --bg-page: var(--tip-ivory);
  --bg-body: var(--tip-ivory);
  --bg-surface: var(--tip-paper);
  --bg-card: var(--tip-paper);
  --bg-subtle: var(--tip-paper-subtle);
  --text-primary: var(--tip-ink);
  --text-secondary: var(--tip-ink-secondary);
  --text-muted: var(--tip-ink-muted);
  --border-subtle: var(--tip-rule);
  --border-color: var(--tip-rule);
  --accent-primary: var(--tip-teal);
  --accent-navy: #E2E8F0;
}

/* Global 4-Level User-Accessible Typography Scale (Small / Default / Large / Extra Large) */
html { font-size: 100%; scroll-behavior: smooth; }
html[data-font-size="sm"] { font-size: 90.625% !important; }   /* ~14.5px base */
html[data-font-size="md"] { font-size: 100% !important; }       /* 16px base (Default) */
html[data-font-size="lg"] { font-size: 115.625% !important; }   /* ~18.5px base */
html[data-font-size="xl"] { font-size: 130% !important; }       /* ~20.8px base */

body {
  background-color: var(--tip-ivory) !important;
  color: var(--tip-ink) !important;
  font-family: var(--tip-font-sans) !important;
  line-height: 1.65 !important;
  overflow-x: clip !important;
  margin: 0;
}

h1, h2, h3, .tip-serif {
  font-family: var(--tip-font-serif);
  color: var(--tip-ink);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

p, li { max-width: 72ch; }
article p, main p { font-size: 1rem; line-height: 1.7; }

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

:focus-visible {
  outline: 3px solid var(--tip-teal) !important;
  outline-offset: 2px !important;
  border-radius: 4px;
}

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

/* Double Navy + Teal Editorial Top Rule (matching official masthead) */
.tip-editorial-topbar {
  height: 7px;
  background: linear-gradient(to bottom, #0B2239 0%, #0B2239 62%, #0E7A74 62%, #0E7A74 100%);
  width: 100%;
}

/* Editorial Header Bar */
.tip-v3427-header {
  background: var(--tip-paper);
  border-bottom: 1px solid var(--tip-rule);
  position: sticky;
  top: 0;
  z-index: 60;
}
.tip-v3427-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.tip-v3427-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--tip-ink);
  font-family: var(--tip-font-serif);
  font-weight: 700;
  font-size: 1.05rem;
}
.tip-v3427-brand img { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; }
.tip-v3427-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.tip-v3427-nav a {
  padding: 7px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--tip-ink-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}
.tip-v3427-nav a:hover,
.tip-v3427-nav a[aria-current="page"] {
  background: var(--tip-teal-soft);
  color: var(--tip-teal);
}

/* Global Font-Size & Readability Control Widget (Aa) */
.tip-a11y-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tip-a11y-trigger,
.tip-theme-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--tip-rule-strong);
  background: var(--tip-paper);
  color: var(--tip-ink);
  font-family: var(--tip-font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
.tip-a11y-trigger:hover,
.tip-theme-pill:hover {
  border-color: var(--tip-teal);
  color: var(--tip-teal);
}
.tip-a11y-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(300px, 92vw);
  background: var(--tip-paper);
  color: var(--tip-ink);
  border: 1px solid var(--tip-rule-strong);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 14px 36px rgba(11, 34, 57, 0.16);
  z-index: 200;
}
.tip-a11y-popover[hidden] { display: none !important; }
.tip-a11y-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--tip-ink);
  margin: 0 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tip-a11y-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.tip-a11y-opt {
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--tip-rule);
  background: var(--tip-paper-subtle);
  color: var(--tip-ink);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.tip-a11y-opt[aria-pressed="true"] {
  background: var(--tip-teal);
  color: #FFFFFF;
  border-color: var(--tip-teal);
}
html[data-theme="dark"] .tip-a11y-opt[aria-pressed="true"] {
  color: #0B2239;
}
.tip-a11y-reset {
  width: 100%;
  min-height: 38px;
  border-radius: 8px;
  border: 1px dashed var(--tip-rule-strong);
  background: transparent;
  color: var(--tip-ink-secondary);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}
.tip-a11y-reset:hover { border-color: var(--tip-teal); color: var(--tip-teal); }

/* Editorial Masthead Hero (Homepage) */
.tip-masthead-hero {
  background: var(--tip-ivory);
  border-bottom: 1px solid var(--tip-rule);
  padding: 36px 18px 34px;
  text-align: center;
}
.tip-masthead-inner { max-width: 820px; margin: 0 auto; }
.tip-masthead-logo {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: block;
  margin: 0 auto 14px;
  box-shadow: 0 6px 20px rgba(11, 34, 57, 0.12);
}
.tip-masthead-kicker {
  font-family: var(--tip-font-serif);
  font-size: 1rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--tip-ink-secondary);
  margin: 0 0 4px;
  padding-left: 0.42em;
}
.tip-masthead-title {
  font-family: var(--tip-font-serif);
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--tip-ink);
  margin: 0;
  line-height: 1.08;
}
.tip-masthead-rule {
  width: 96px;
  height: 2px;
  background: var(--tip-teal);
  margin: 14px auto 10px;
}
.tip-masthead-subtitle {
  font-family: var(--tip-font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--tip-teal);
  margin: 0 0 10px;
}
.tip-masthead-lead {
  font-size: 1rem;
  color: var(--tip-ink-secondary);
  margin: 0 auto 22px;
  max-width: 60ch;
}

/* Editorial Content Sections & Lists (avoiding generic dashboard card bloat) */
.tip-ed-section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 34px 18px;
  border-bottom: 1px solid var(--tip-rule);
}
.tip-ed-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.tip-ed-section-head h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  margin: 0;
}
.tip-ed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px 26px;
}
.tip-ed-item {
  padding: 14px 0;
  border-top: 2px solid var(--tip-rule);
}
.tip-ed-item h3 {
  font-size: 1.08rem;
  margin: 0 0 6px;
}
.tip-ed-item h3 a {
  color: var(--tip-ink);
  text-decoration: none;
}
.tip-ed-item h3 a:hover { color: var(--tip-teal); text-decoration: underline; }
.tip-ed-item p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--tip-ink-secondary);
}
.tip-ed-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tip-teal);
  margin-bottom: 4px;
}

/* Monograph Section Jump Navigation & Calibrated Safety Callouts */
.tip-mono-toc {
  background: var(--tip-paper-subtle);
  border: 1px solid var(--tip-rule);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 20px;
}
.tip-mono-toc summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--tip-ink);
  font-size: 0.95rem;
}
.tip-mono-toc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.tip-mono-toc-links a {
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--tip-paper);
  border: 1px solid var(--tip-rule);
  color: var(--tip-ink);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}
.tip-mono-toc-links a:hover { border-color: var(--tip-teal); color: var(--tip-teal); }

.tip-safety-critical {
  border-left: 4px solid var(--tip-danger-border);
  background: var(--tip-danger-bg);
  color: var(--tip-danger-fg);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 12px 0;
}
.tip-safety-caution {
  border-left: 4px solid var(--tip-warn-border);
  background: var(--tip-warn-bg);
  color: var(--tip-warn-fg);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 12px 0;
}
.tip-pharmacist-checklist {
  border-left: 4px solid var(--tip-teal);
  background: var(--tip-teal-soft);
  color: var(--tip-ink);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  margin: 14px 0;
}

/* Responsive Accessible Tables */
.tip-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--tip-rule);
  border-radius: 8px;
  background: var(--tip-paper);
  margin: 14px 0;
}
.tip-table-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}
.tip-table-scroll th {
  background: var(--tip-paper-subtle);
  color: var(--tip-ink);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--tip-rule-strong);
  font-weight: 700;
}
.tip-table-scroll td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--tip-rule);
  vertical-align: top;
  color: var(--tip-ink);
}

/* Clean Editorial Trust Footer */
.tip-v3427-footer {
  background: var(--tip-paper-subtle);
  border-top: 2px solid var(--tip-navy);
  padding: 32px 18px;
  color: var(--tip-ink-secondary);
  font-size: 0.92rem;
}
.tip-v3427-footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.tip-v3427-footer h3 {
  font-size: 0.96rem;
  margin: 0 0 8px;
  color: var(--tip-ink);
}
.tip-v3427-footer ul { list-style: none; padding: 0; margin: 0; }
.tip-v3427-footer li { margin-bottom: 6px; }
.tip-v3427-footer a { color: var(--tip-ink-secondary); text-decoration: none; }
.tip-v3427-footer a:hover { color: var(--tip-teal); text-decoration: underline; }

/* Mobile Adaptation (360px / 390px / 430px) */
@media (max-width: 900px) {
  .tip-v3427-nav { display: none; }
  .tip-v3427-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid var(--tip-rule);
  }
  .tip-v3427-nav.is-open a { padding: 10px 12px; }
}
@media (max-width: 480px) {
  .tip-masthead-hero { padding: 24px 14px 24px; }
  .tip-masthead-logo { width: 88px; height: 88px; }
  .tip-ed-section { padding: 24px 14px; }
  .tip-a11y-trigger span.tip-a11y-label { display: none; }
}


/* V343.0 Platform Cohesion: Unified Editorial Header Top Rule & Breadcrumb Styling */
.tip-global-header {
  border-top: 5px solid #0B2239 !important;
  box-shadow: inset 0 2px 0 #0E7A74 !important;
}
.tip-v343-bc a { color: var(--tip-teal); text-decoration: none; font-weight: 600; }
.tip-v343-bc a:hover { text-decoration: underline; }


/* ==========================================================================
   THE INDIAN PHARMACIST — V344 CLINICAL COUNTER UX, PRINT & A11Y LAYER
   Preserves V342.7 WCAG AA palette tokens; raises interactive targets >=44px.
   ========================================================================== */
@media (forced-colors: active) {
  :focus-visible { outline: 3px solid Highlight !important; outline-offset: 2px !important; }
  .tip-safety-critical, .tip-safety-caution { border: 2px solid CanvasText !important; }
}

.tip-a11y-trigger, .tip-theme-pill, .tip-az-btn, .tip-chip, .tip-btn-44 {
  min-width: 44px !important;
  min-height: 44px !important;
}

/* Layer A: Compact Dispensing Strip (always first, never collapsed) */
.tip-dispensing-strip {
  background: var(--tip-paper);
  border: 1px solid var(--tip-rule-strong);
  border-top: 4px solid var(--tip-navy);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 14px 0 20px;
}
.tip-dispensing-strip-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--tip-rule);
  margin-bottom: 12px;
}
.tip-dispensing-strip-title {
  font-family: var(--tip-font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tip-ink);
  margin: 0;
}
.tip-dispensing-dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px 18px;
  margin: 0;
}
.tip-dispensing-row {
  padding: 6px 0;
  border-bottom: 1px solid var(--tip-rule);
}
.tip-dispensing-row dt {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--tip-ink-secondary);
  margin: 0 0 2px;
}
.tip-dispensing-row dd {
  margin: 0;
  font-size: 1rem;
  color: var(--tip-ink);
  word-break: break-word;
}
.tip-dispensing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--tip-rule);
}
.tip-dispensing-actions a,
.tip-dispensing-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--tip-rule-strong);
  background: var(--tip-paper-subtle);
  color: var(--tip-ink);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.tip-dispensing-actions a:hover,
.tip-dispensing-actions button:hover {
  border-color: var(--tip-teal);
  color: var(--tip-teal);
}
.tip-alert-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--tip-danger-border);
  background: var(--tip-danger-bg);
  color: var(--tip-danger-fg);
  font-weight: 700;
  font-size: 0.9rem;
}
.tip-status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--tip-rule-strong);
  background: var(--tip-paper-subtle);
  color: var(--tip-ink);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Stack Dispensing Strip cleanly on mobile and Extra Large font scale */
html[data-font-size="xl"] .tip-dispensing-dl,
@media (max-width: 480px) {
  .tip-dispensing-dl { grid-template-columns: 1fr; }
}
html[data-font-size="xl"] .tip-dispensing-dl { grid-template-columns: 1fr !important; }

/* Four Task Cards on Homepage */
.tip-task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.tip-task-card {
  display: block;
  padding: 16px 18px;
  background: var(--tip-paper);
  border: 1px solid var(--tip-rule-strong);
  border-left: 4px solid var(--tip-teal);
  border-radius: 8px;
  text-decoration: none;
  color: var(--tip-ink);
  min-height: 44px;
}
.tip-task-card:hover { border-color: var(--tip-teal); background: var(--tip-paper-subtle); }
.tip-task-card strong { display: block; font-family: var(--tip-font-serif); font-size: 1.08rem; margin-bottom: 4px; color: var(--tip-ink); }
.tip-task-card span { display: block; font-size: 0.94rem; color: var(--tip-ink-secondary); }

/* Session-only checklist checkboxes */
.tip-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  min-height: 44px;
}
.tip-check-item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--tip-teal);
}

/* Mobile library cards (<=640px) vs Desktop table */
.tip-lib-cards-wrap { display: none; }
.tip-lib-table-wrap { display: block; }
@media (max-width: 640px) {
  .tip-lib-cards-wrap { display: grid; gap: 10px; }
  .tip-lib-table-wrap { display: none; }
}
.tip-lib-card {
  background: var(--tip-paper);
  border: 1px solid var(--tip-rule);
  border-radius: 8px;
  padding: 12px 14px;
}
.tip-lib-card a { font-family: var(--tip-font-serif); font-weight: 700; font-size: 1.05rem; color: var(--tip-ink); text-decoration: none; display: inline-block; padding: 4px 0; }
.tip-lib-card a:hover { color: var(--tip-teal); text-decoration: underline; }
.tip-lib-meta { font-size: 0.92rem; color: var(--tip-ink-secondary); margin-top: 4px; }

/* A4 Print Stylesheet (Dispensing Strip + Pharmacist Checklist + URL + Disclaimer) */
@media print {
  @page { size: A4 portrait; margin: 14mm; }
  body { background: #FFFFFF !important; color: #000000 !important; font-size: 12pt !important; line-height: 1.45 !important; }
  header, footer, nav, .tip-global-header, .tip-v3427-header, .tip-global-footer, .tip-v3427-footer,
  .tip-mono-toc, .tip-dispensing-actions, .tip-a11y-wrap, .tip-search-shell, .no-print,
  .tip-v343-bc, #sec-crosslinks, aside, .mono-glance { display: none !important; }
  .tip-dispensing-strip, .tip-pharmacist-checklist, .tip-safety-critical, .tip-safety-caution {
    background: #FFFFFF !important;
    color: #000000 !important;
    border: 1.5pt solid #000000 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .tip-dispensing-strip::after {
    content: "Source: https://theindianpharmacist.com — Educational reference only; not a prescription and not peer-reviewed clinical sign-off.";
    display: block;
    margin-top: 10pt;
    padding-top: 6pt;
    border-top: 1pt solid #000000;
    font-size: 9.5pt;
  }
  a { color: #000000 !important; text-decoration: underline !important; }
}


/* ==========================================================================
   THE INDIAN PHARMACIST — V345 SINGLE-DESK EDITORIAL POLISH
   ========================================================================== */
/* Kill floating position:fixed Back-to-Top button everywhere (moves to footer) */
#tip-back-to-top, .tip-back-to-top, .back-to-top-float { display: none !important; }

/* Single-row <64px mobile header */
.tip-v3427-header, .tip-global-header { min-height: 56px; }
.tip-v3427-header-inner { padding: 6px 14px !important; min-height: 56px; }
.tip-v3427-brand img { width: 40px !important; height: 40px !important; }
@media (max-width: 480px) {
  .tip-brand-tagline, .tip-masthead-tagline-mobile-hide { display: none !important; }
  .tip-v3427-header-inner { flex-wrap: nowrap !important; gap: 6px !important; }
  .tip-v3427-brand { font-size: 0.92rem !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Body links: teal, underlined only on hover/focus */
main a { color: var(--tip-teal); text-decoration: none; }
main a:hover, main a:focus-visible { text-decoration: underline; }

/* V345 2x2 Hairline Task Grid (no icons, no shadows) */
.tip-v345-tasks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 22px 0 0;
  text-align: left;
}
@media (max-width: 600px) { .tip-v345-tasks { grid-template-columns: 1fr; } }
.tip-v345-task {
  display: block;
  padding: 14px 16px;
  background: var(--tip-paper);
  border: 1px solid rgba(11, 34, 57, 0.18);
  border-radius: 6px;
  text-decoration: none;
  color: var(--tip-ink);
  min-height: 44px;
}
html[data-theme="dark"] .tip-v345-task { border-color: var(--tip-rule); }
.tip-v345-task:hover { border-color: var(--tip-teal); text-decoration: none; }
.tip-v345-task strong { display: block; font-family: var(--tip-font-serif); font-size: 1.05rem; color: var(--tip-ink); margin-bottom: 3px; }
.tip-v345-task span { display: block; font-size: 0.95rem; color: var(--tip-ink-secondary); }

/* V345 Definition List for 9 Destinations */
.tip-v345-dest-dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 24px;
  margin: 0;
}
.tip-v345-dest-item { padding: 10px 0; border-top: 1px solid rgba(11, 34, 57, 0.18); }
html[data-theme="dark"] .tip-v345-dest-item { border-top-color: var(--tip-rule); }
.tip-v345-dest-item dt { font-family: var(--tip-font-serif); font-size: 1.04rem; font-weight: 700; margin: 0 0 3px; }
.tip-v345-dest-item dt a { color: var(--tip-teal); }
.tip-v345-dest-count { font-family: var(--tip-font-sans); font-size: 1rem; font-weight: 400; color: var(--tip-ink-muted); margin-left: 6px; }
.tip-v345-dest-item dd { margin: 0; font-size: 0.95rem; color: var(--tip-ink-secondary); }

/* V345 section.tip-strip (3px navy top rule, white card on ivory) */
section.tip-strip {
  background: var(--tip-paper);
  border: 1px solid rgba(11, 34, 57, 0.18);
  border-top: 3px solid var(--tip-navy);
  border-radius: 6px;
  padding: 16px 18px;
  margin: 14px 0 20px;
}
html[data-theme="dark"] section.tip-strip { border-color: var(--tip-rule); border-top: 3px solid var(--tip-teal); }
section.tip-strip dl {
  display: grid;
  grid-template-columns: minmax(150px, 210px) 1fr;
  gap: 8px 16px;
  margin: 0;
}
section.tip-strip dt {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--tip-ink-secondary);
  padding: 6px 0;
  border-bottom: 1px solid rgba(11, 34, 57, 0.12);
}
section.tip-strip dd {
  margin: 0;
  font-size: 1rem;
  color: var(--tip-ink);
  padding: 6px 0;
  border-bottom: 1px solid rgba(11, 34, 57, 0.12);
}
@media (max-width: 640px) {
  section.tip-strip dl { grid-template-columns: 1fr; gap: 2px; }
  section.tip-strip dt { border-bottom: none; padding-bottom: 0; }
}
html[data-font-size="xl"] section.tip-strip dl { grid-template-columns: 1fr !important; }

/* Ensure Library never prints both table and cards */
@media print {
  .tip-lib-cards-wrap { display: none !important; }
  section.tip-strip { background: #FFFFFF !important; color: #000000 !important; border: 1.5pt solid #000000 !important; }
  section.tip-strip::after {
    content: "Educational reference for students and pharmacists; not a prescription and not a peer-reviewed clinical sign-off.";
    display: block; margin-top: 8pt; padding-top: 6pt; border-top: 1pt solid #000000; font-size: 9.5pt;
  }
}


/* ==========================================================================
   THE INDIAN PHARMACIST — V346 FIRST-SCREEN PHONE LAYOUT & EDITORIAL POLISH
   ========================================================================== */
abbr, abbr[title] {
  text-decoration: none !important;
  border-bottom: none !important;
  cursor: inherit;
}

/* 52px single-row header */
.tip-v346-header {
  background: var(--tip-paper);
  border-bottom: 1px solid rgba(11, 34, 57, 0.18);
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 80;
}
html[data-theme="dark"] .tip-v346-header { border-bottom-color: var(--tip-rule); }
.tip-v346-header-inner {
  max-width: 1160px;
  height: 52px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tip-v346-home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--tip-ink);
  min-width: 44px;
  min-height: 44px;
}
.tip-v346-home-link img { width: 32px; height: 32px; border-radius: 50%; display: block; }
.tip-v346-desktop-wordmark {
  font-family: var(--tip-font-serif);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--tip-ink);
  white-space: nowrap;
}
.tip-v346-nav-desktop {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}
.tip-v346-nav-desktop a {
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--tip-ink-secondary);
  text-decoration: none;
  white-space: nowrap;
}
.tip-v346-nav-desktop a:hover, .tip-v346-nav-desktop a[aria-current="page"] {
  color: var(--tip-teal);
  text-decoration: underline;
}
.tip-v346-icon-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}
.tip-v346-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid rgba(11, 34, 57, 0.18);
  border-radius: 8px;
  background: var(--tip-paper);
  color: var(--tip-ink);
  font-family: var(--tip-font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}
html[data-theme="dark"] .tip-v346-icon-btn { border-color: var(--tip-rule); }
.tip-v346-icon-btn:hover { border-color: var(--tip-teal); color: var(--tip-teal); }

@media (max-width: 960px) {
  .tip-v346-nav-desktop { display: none; }
}
@media (max-width: 480px) {
  .tip-v346-desktop-wordmark { display: none !important; }
}

/* Menu Dialog (contains 9 links + Theme toggle; focus trapped) */
dialog.tip-v346-dialog {
  width: min(340px, 92vw);
  margin: auto;
  padding: 18px;
  border: 1px solid var(--tip-rule-strong);
  border-radius: 10px;
  background: var(--tip-paper);
  color: var(--tip-ink);
  box-shadow: 0 16px 40px rgba(11, 34, 57, 0.25);
}
dialog.tip-v346-dialog::backdrop { background: rgba(11, 34, 57, 0.55); }
.tip-v346-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--tip-rule);
  margin-bottom: 10px;
}
.tip-v346-dialog-links { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.tip-v346-dialog-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--tip-ink);
  font-weight: 600;
  text-decoration: none;
}
.tip-v346-dialog-links a:hover { background: var(--tip-teal-soft); color: var(--tip-teal); }

/* Compact First-Screen Home Masthead + 4-Task Hairline List (fits 390x844 without scrolling) */
.tip-v346-home-top {
  max-width: 680px;
  margin: 0 auto;
  padding: 14px 16px 16px;
}
.tip-v346-h1 {
  font-family: var(--tip-font-serif);
  font-size: clamp(1.7rem, 8vw, 2.35rem);
  line-height: 1.05;
  text-align: center;
  color: var(--tip-ink);
  margin: 4px 0 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.tip-v346-rule {
  width: 48px;
  height: 2px;
  background: var(--tip-teal);
  margin: 0 auto 8px;
}
.tip-v346-tagline {
  text-align: center;
  font-size: 0.94rem;
  color: var(--tip-ink-muted);
  margin: 0 0 14px;
}
.tip-v346-task-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  border-top: 1px solid rgba(11, 34, 57, 0.18);
}
html[data-theme="dark"] .tip-v346-task-list { border-top-color: var(--tip-rule); }
.tip-v346-task-list li {
  border-bottom: 1px solid rgba(11, 34, 57, 0.18);
}
html[data-theme="dark"] .tip-v346-task-list li { border-bottom-color: var(--tip-rule); }
.tip-v346-task-list a {
  display: block;
  padding: 12px 0;
  min-height: 44px;
  text-decoration: none;
  color: var(--tip-ink);
}
.tip-v346-task-list a:hover .tip-v346-task-title { color: var(--tip-teal); text-decoration: underline; }
.tip-v346-task-title {
  display: block;
  font-family: var(--tip-font-serif);
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--tip-ink);
  line-height: 1.25;
}
.tip-v346-task-sub {
  display: block;
  font-size: 0.92rem;
  color: var(--tip-ink-muted);
  margin-top: 2px;
}
.tip-brand-note {
  font-size: 0.86rem;
  color: var(--tip-ink-secondary);
  margin-top: 4px;
  display: block;
}


/* ==========================================================================
   THE INDIAN PHARMACIST — V447 SOLID NAVY BAR & REFERENCE APP LAYOUT
   ========================================================================== */
abbr, abbr[title] { text-decoration: none !important; border-bottom: none !important; }
#tip-a11y-root, #tip-back-to-top, .tip-back-to-top { display: none !important; }

/* 60px opaque navy top bar — position: sticky only; ZERO fixed/absolute on bar contents */
.tip-v447-bar {
  background: #0B2239;
  color: #FFFFFF;
  height: 60px;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 80;
  box-shadow: 0 1px 2px rgba(11, 34, 57, 0.06);
}
.tip-v447-bar-inner {
  max-width: 1120px;
  height: 60px;
  margin: 0 auto;
  padding: 0 12px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tip-v447-brand {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: #FFFFFF !important;
  min-height: 44px;
  flex-shrink: 0;
}
.tip-v447-emblem {
  position: static;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  padding: 2px;
  box-sizing: border-box;
  display: block;
  flex-shrink: 0;
}
.tip-v447-brand-title {
  position: static;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
  color: #FFFFFF !important;
  white-space: nowrap;
  margin: 0;
}
.tip-v447-desk-nav {
  display: none;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
}
.tip-v447-desk-nav a {
  color: #E2E8F0 !important;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.tip-v447-desk-nav a:hover, .tip-v447-desk-nav a[aria-current="page"] {
  color: #5EEAD4 !important;
  text-decoration: underline;
}
.tip-v447-actions {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.tip-v447-bar-btn {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #FFFFFF;
  font-family: var(--tip-font-sans);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.tip-v447-bar-btn:hover { background: rgba(255, 255, 255, 0.12); }
.tip-v447-bar-btn:focus-visible { outline: 3px solid #5EEAD4 !important; outline-offset: -2px !important; }

/* In-flow Readability Panel (drops down below bar, never floats over headings) */
.tip-v447-aa-drawer {
  background: var(--tip-paper);
  border-bottom: 1px solid var(--tip-rule-strong);
  padding: 12px 16px;
}
.tip-v447-aa-drawer[hidden] { display: none !important; }
.tip-v447-aa-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tip-v447-aa-btns { display: flex; flex-wrap: wrap; gap: 6px; }

/* In-flow Search Drawer on Inner Pages (pushes content down, never floats) */
.tip-v447-search-drawer {
  background: var(--tip-ivory);
  border-bottom: 1px solid var(--tip-rule);
  padding: 12px 16px;
}
.tip-v447-search-drawer[hidden] { display: none !important; }

/* Homepage First Screen Container */
.tip-v447-home {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 16px 24px;
}

/* Search Field: 52px white, radius 12px, 1.5px border, left magnifying glass */
.tip-v447-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--tip-paper);
  height: 52px;
  border-radius: 12px;
  border: 1.5px solid rgba(11, 34, 57, 0.35);
  padding: 0 10px 0 16px;
  box-shadow: 0 1px 2px rgba(11, 34, 57, 0.06);
}
html[data-theme="dark"] .tip-v447-search-box { border-color: var(--tip-rule-strong); }
.tip-v447-search-box:focus-within { outline: 3px solid var(--tip-teal); outline-offset: 2px; }
.tip-v447-search-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--tip-ink);
  font-family: var(--tip-font-sans);
  font-size: 16px;
  outline: none;
}

/* Four Choices: 2x2 Grid (4-column single row >=800px), equal white cards, ALL 4 titles navy 16px */
.tip-v447-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.tip-v447-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--tip-paper);
  border: 1px solid rgba(11, 34, 57, 0.14);
  border-radius: 14px;
  padding: 12px;
  min-height: 84px;
  max-height: 104px;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(11, 34, 57, 0.06);
  text-decoration: none !important;
  color: var(--tip-ink) !important;
}
html[data-theme="dark"] .tip-v447-card { border-color: var(--tip-rule); }
.tip-v447-card:hover { border-color: var(--tip-teal); text-decoration: none !important; }
.tip-v447-card-title {
  display: block;
  font-family: var(--tip-font-sans);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--tip-ink) !important;
  text-decoration: none !important;
}
.tip-v447-card-sub {
  display: block;
  font-family: var(--tip-font-sans);
  font-size: 13px;
  line-height: 1.3;
  color: var(--tip-ink-muted) !important;
  margin-top: 4px;
  text-decoration: none !important;
}

/* Browse Section */
.tip-v447-browse-head {
  font-family: var(--tip-font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tip-ink);
  margin: 22px 0 6px;
}
.tip-v447-browse-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(11, 34, 57, 0.16);
}
html[data-theme="dark"] .tip-v447-browse-list { border-top-color: var(--tip-rule); }
.tip-v447-browse-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  border-bottom: 1px solid rgba(11, 34, 57, 0.16);
  gap: 12px;
}
html[data-theme="dark"] .tip-v447-browse-row { border-bottom-color: var(--tip-rule); }
.tip-v447-browse-row a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-size: 16px;
  font-weight: 600;
  color: var(--tip-ink);
  text-decoration: none;
}
.tip-v447-browse-row a:hover { color: var(--tip-teal); text-decoration: underline; }
.tip-v447-browse-count {
  font-size: 15px;
  color: var(--tip-ink-muted);
  font-variant-numeric: tabular-nums;
}

/* Library: Table from 800px up, Cards below 800px, never both */
@media (min-width: 800px) {
  .tip-v447-desk-nav { display: flex; }
  .tip-v447-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tip-lib-table-wrap { display: block !important; }
  .tip-lib-cards-wrap { display: none !important; }
}
@media (max-width: 799px) {
  .tip-lib-table-wrap { display: none !important; }
  .tip-lib-cards-wrap { display: grid !important; gap: 10px; }
}
