/* ==========================================================================
   vyera.com — Drug Pricing Reference
   Clean single-column layout · Sans-serif · Teal accent
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Custom Properties
   -------------------------------------------------------------------------- */

:root {
  /* Surfaces */
  --color-bg: #ffffff;
  --color-surface: #f8fafb;

  /* Text */
  --color-text: #1a1a2e;
  --color-text-secondary: #4a5568;
  --color-text-muted: #718096;

  /* Accent — teal */
  --color-accent: #0f7b6c;
  --color-accent-hover: #0a5d52;
  --color-accent-light: #e6f5f2;

  /* Borders */
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;

  /* Footer */
  --color-footer-bg: #f1f5f9;
  --color-footer-text: #64748b;

  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1.125rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;

  /* Leading */
  --leading-tight: 1.3;
  --leading-body: 1.7;

  /* Layout */
  --content-width: 720px;
  --page-width: 1120px;
  --gutter: 1.5rem;
}


/* --------------------------------------------------------------------------
   2. Reset / Base
   -------------------------------------------------------------------------- */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}


/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--color-text);
}

h1 {
  font-size: var(--text-3xl);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-2xl);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--color-accent);
}

h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.25rem;
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-accent-hover);
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.35rem;
}

li > ul, li > ol {
  margin-top: 0.35rem;
  margin-bottom: 0;
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}

code {
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
  font-size: 0.875em;
  background: var(--color-surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

pre {
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
  font-size: var(--text-sm);
  background: var(--color-surface);
  padding: 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--color-border);
}

pre code {
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
}


/* --------------------------------------------------------------------------
   4. Top Navigation Bar
   -------------------------------------------------------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.nav-brand:hover {
  color: var(--color-accent-hover);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-links a:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

.nav-links a[aria-current="page"] {
  color: var(--color-accent);
  background: var(--color-accent-light);
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Mobile nav panel (hidden by default) */
.nav-mobile {
  display: none;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 0.5rem var(--gutter) 1rem;
}

.nav-mobile.is-open {
  display: block;
}

.nav-mobile a {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--color-border);
}

.nav-mobile a:last-child {
  border-bottom: none;
}

.nav-mobile a:hover {
  color: var(--color-accent);
}


/* --------------------------------------------------------------------------
   5. Page Layout
   -------------------------------------------------------------------------- */

.page-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 4rem;
}


/* --------------------------------------------------------------------------
   6. Article Styles
   -------------------------------------------------------------------------- */

.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-top: 3px solid var(--color-accent);
  padding-top: 2rem;
}

.article-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: var(--leading-tight);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.article-dek {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: 1.55;
}

.article-body {
  font-size: var(--text-base);
  line-height: var(--leading-body);
}


/* --------------------------------------------------------------------------
   7. Tables
   -------------------------------------------------------------------------- */

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem;
  font-size: var(--text-sm);
}

.article-body thead {
  border-bottom: 2px solid var(--color-accent);
}

.article-body th {
  font-weight: 600;
  text-align: left;
  padding: 0.75rem;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
}

.article-body td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.article-body tbody tr:nth-child(even) {
  background: var(--color-surface);
}

.article-body tbody tr:last-child td {
  border-bottom: 2px solid var(--color-border-strong);
}

/* Responsive table wrapper */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0 2rem;
}

.table-wrap table {
  margin: 0;
}


/* --------------------------------------------------------------------------
   8. Blockquotes & Callouts
   -------------------------------------------------------------------------- */

.article-body blockquote {
  border-left: 3px solid var(--color-accent);
  background: var(--color-accent-light);
  margin: 1.75rem 0;
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  color: var(--color-text);
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

/* Callout / key stat box */
.callout {
  background: var(--color-accent-light);
  border-left: 4px solid var(--color-accent);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 6px 6px 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* Fact box — inline stat display */
.fact-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
}

.fact-item {
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.fact-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.fact-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.2;
}


/* --------------------------------------------------------------------------
   9. In-Page Table of Contents (article sidebar on wide screens)
   -------------------------------------------------------------------------- */

.toc {
  display: none;
}

@media (min-width: 1100px) {
  .article-wrapper {
    position: relative;
  }

  .toc {
    display: block;
    position: sticky;
    top: 88px; /* nav height + spacing */
    float: left;
    width: 200px;
    margin-left: calc(-200px - 3rem);
    font-size: var(--text-sm);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }

  .toc-title {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
  }

  .toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .toc-list a {
    display: block;
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 0.3rem 0 0.3rem 0.75rem;
    border-left: 2px solid var(--color-border);
    transition: color 0.15s ease, border-color 0.15s ease;
    line-height: 1.4;
  }

  .toc-list a:hover {
    color: var(--color-text);
    border-left-color: var(--color-border-strong);
  }

  .toc-list a.is-active {
    color: var(--color-accent);
    border-left-color: var(--color-accent);
    font-weight: 500;
  }
}


/* --------------------------------------------------------------------------
   10. Homepage — Hero + Card Grid
   -------------------------------------------------------------------------- */

.home-content {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 3rem var(--gutter) 4rem;
}

.home-hero {
  max-width: var(--content-width);
  margin: 0 auto 3rem;
  text-align: center;
}

.home-hero h1 {
  font-size: var(--text-3xl);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.home-hero p {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.75rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  border-color: var(--color-border-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.card-title {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.card-title a {
  color: var(--color-text);
  text-decoration: none;
}

.card-title a:hover {
  color: var(--color-accent);
}

.card-summary {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.card-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}


/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--color-footer-bg);
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 3rem;
}

.footer-name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.footer-disclaimer {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-footer-text);
  margin-bottom: 1.25rem;
  max-width: 600px;
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: var(--text-sm);
  color: var(--color-footer-text);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-nav a:hover {
  color: var(--color-accent);
}


/* --------------------------------------------------------------------------
   12. Figures
   -------------------------------------------------------------------------- */

.article-figure {
  margin: 2rem 0;
}

.article-figure img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.article-figure figcaption {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  text-align: center;
}


/* --------------------------------------------------------------------------
   13. Timeline
   -------------------------------------------------------------------------- */

.timeline {
  margin: 2rem 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--color-border-strong);
}

.timeline-entry {
  position: relative;
  padding-bottom: 1.75rem;
}

.timeline-entry:last-child {
  padding-bottom: 0;
}

.timeline-entry::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.4rem;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: var(--color-accent);
  border-radius: 50%;
}

.timeline-date {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.timeline-content {
  font-size: var(--text-base);
  line-height: var(--leading-body);
}

.timeline-content p:last-child {
  margin-bottom: 0;
}


/* --------------------------------------------------------------------------
   14. Pull Quote
   -------------------------------------------------------------------------- */

.pull-quote {
  border-left: 4px solid var(--color-accent);
  margin: 2.5rem 0;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  background: var(--color-accent-light);
  border-radius: 0 6px 6px 0;
}

.pull-quote p {
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.pull-quote cite {
  font-size: var(--text-sm);
  font-style: normal;
  color: var(--color-text-muted);
  display: block;
}


/* --------------------------------------------------------------------------
   15. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  :root {
    --text-3xl: 1.875rem;
    --text-2xl: 1.5rem;
    --text-xl: 1.25rem;
    --text-base: 1rem;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .home-content {
    padding-top: 2rem;
  }

  .home-hero {
    margin-bottom: 2rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .page-content {
    padding: 2rem var(--gutter) 3rem;
  }

  .article-header {
    padding-top: 1.5rem;
  }

  .article-title {
    font-size: var(--text-2xl);
  }

  .article-dek {
    font-size: var(--text-base);
  }

  h2 {
    font-size: var(--text-xl);
  }

  /* Tables scroll horizontally on mobile */
  .article-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .fact-box {
    gap: 1rem 1.5rem;
  }

  .fact-value {
    font-size: var(--text-xl);
  }
}

@media (max-width: 480px) {
  :root {
    --text-3xl: 1.5rem;
    --gutter: 1rem;
  }

  .nav-inner {
    height: 56px;
  }

  .fact-box {
    flex-direction: column;
    gap: 1rem;
  }

  .footer-nav {
    flex-direction: column;
    gap: 0.75rem;
  }
}
