/* ==============================
   TIHNA BLOG — Blog Stylesheet
   Extends main site design system
   Dark premium · Teal #00C9A7
   Cabinet Grotesk + Satoshi
   ============================== */

/* Import shared tokens — same as main site */
:root {
  --bg:        #09090B;
  --surface:   #111113;
  --surface2:  #18181B;
  --surface3:  #222225;
  --border:    rgba(255,255,255,0.08);
  --divider:   rgba(255,255,255,0.05);
  --text:      #F4F4F5;
  --muted:     #A1A1AA;
  --faint:     #52525B;
  --teal:      #00C9A7;
  --teal-dim:  rgba(0,201,167,0.10);
  --teal-glow: 0 0 40px rgba(0,201,167,0.18);
  --blue:      #7DD3FC;
  --purple:    #A78BFA;
  --amber:     #F59E0B;
  --font-d:    'Cabinet Grotesk', 'Helvetica Neue', sans-serif;
  --font-b:    'Satoshi', 'Inter', sans-serif;
  --ease:      cubic-bezier(0.16,1,0.3,1);

  /* Text scale */
  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
body {
  font-family: var(--font-b);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  line-height: 1.65;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-d); line-height: 1.15; text-wrap: balance; }
p, li { text-wrap: pretty; }
ul { list-style: none; }
::selection { background: rgba(0,201,167,.2); color: var(--text); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- LAYOUT --- */
.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 3rem); }
.container-narrow { width: 100%; max-width: 740px; margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 3rem); }
.teal { color: var(--teal); }

/* --- BUTTONS --- */
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--teal); color: #09090B !important;
  font-family: var(--font-b); font-weight: 700;
  border-radius: 9999px; border: none; cursor: pointer;
  transition: background 180ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease);
  font-size: var(--text-sm); padding: .65rem 1.5rem;
  text-decoration: none;
}
.btn-primary:hover { background: #00b396; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,201,167,.3); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.06); color: var(--text);
  font-family: var(--font-b); font-weight: 600;
  border-radius: 9999px; border: 1px solid var(--border); cursor: pointer;
  transition: background 180ms var(--ease);
  font-size: var(--text-sm); padding: .55rem 1.25rem;
  text-decoration: none;
}
.btn-ghost:hover { background: rgba(255,255,255,.11); }

/* --- NAV --- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(9,9,11,.88);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--divider);
}
.nav-inner {
  display: flex; align-items: center; gap: 2.5rem;
  max-width: 1180px; margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
  height: 64px;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo a { display: flex; align-items: center; }
.nav-links { display: flex; align-items: center; gap: 2rem; flex: 1; }
.nav-links a { font-size: .875rem; font-weight: 500; color: var(--muted); transition: color 180ms var(--ease); }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { color: var(--teal); }
.nav-right { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.hamburger { display: none; flex-direction: column; gap: 5px; padding: .375rem; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 180ms var(--ease); }
.mobile-menu { display: none; flex-direction: column; gap: 1rem; padding: 1.5rem clamp(1.25rem,5vw,3rem) 2rem; border-top: 1px solid var(--divider); }
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 1rem; font-weight: 500; color: var(--muted); }
.mobile-menu .btn-primary { align-self: flex-start; margin-top: .5rem; }
@media (max-width: 768px) { .nav-links { display: none; } .nav-right .btn-primary { display: none; } .hamburger { display: flex; } }
@media (max-width: 480px) { .nav-right .btn-sm:not(.hamburger) { display: none; } }

/* --- BLOG INDEX HEADER --- */
.blog-hero {
  padding-block: clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--divider);
  text-align: center;
}
.blog-hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--text-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 1.25rem;
}
.blog-hero h1 {
  font-family: var(--font-d);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
  max-width: 700px;
  margin-inline: auto;
}
.blog-hero p {
  font-size: var(--text-lg);
  color: var(--muted);
  max-width: 560px;
  margin-inline: auto;
  line-height: 1.6;
}

/* --- BLOG FILTER TABS --- */
.blog-filters {
  display: flex; align-items: center; gap: .5rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--divider);
  overflow-x: auto;
  scrollbar-width: none;
}
.blog-filters::-webkit-scrollbar { display: none; }
.filter-btn {
  display: inline-flex; align-items: center;
  font-size: var(--text-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: .4rem .9rem; border-radius: 9999px;
  border: 1px solid var(--border);
  color: var(--muted); background: transparent;
  cursor: pointer; white-space: nowrap;
  transition: all 180ms var(--ease);
}
.filter-btn:hover { border-color: var(--teal); color: var(--teal); }
.filter-btn.active { background: var(--teal-dim); border-color: var(--teal); color: var(--teal); }

/* --- BLOG GRID --- */
.blog-grid-section { padding-block: clamp(2.5rem, 5vw, 4rem); }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
/* Feature card spans 2 columns */
.blog-card--feature {
  grid-column: span 2;
}
@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-card--feature { grid-column: span 2; }
}
@media (max-width: 560px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card--feature { grid-column: span 1; }
}

/* --- BLOG CARD --- */
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 220ms var(--ease), transform 220ms var(--ease), box-shadow 220ms var(--ease);
  text-decoration: none; color: var(--text);
}
.blog-card:hover {
  border-color: rgba(0,201,167,.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.blog-card__img {
  width: 100%; aspect-ratio: 16/9; overflow: hidden;
  background: var(--surface2);
  flex-shrink: 0;
}
.blog-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.blog-card:hover .blog-card__img img { transform: scale(1.04); }

/* Gradient placeholder for cards without images */
.blog-card__img--gradient {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16/9;
}
.blog-card--feature .blog-card__img { aspect-ratio: 16/7; }

.blog-card__body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.blog-card__meta { display: flex; align-items: center; gap: .75rem; margin-bottom: .875rem; }
.blog-card__tag {
  font-size: var(--text-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--teal); background: var(--teal-dim);
  padding: .2rem .6rem; border-radius: 4px;
}
.blog-card__read-time { font-size: var(--text-xs); color: var(--faint); }
.blog-card__title {
  font-family: var(--font-d); font-weight: 700;
  font-size: var(--text-lg); line-height: 1.25;
  color: var(--text); margin-bottom: .625rem;
  transition: color 180ms var(--ease);
}
.blog-card:hover .blog-card__title { color: var(--teal); }
.blog-card--feature .blog-card__title { font-size: var(--text-xl); }
.blog-card__excerpt { font-size: var(--text-sm); color: var(--muted); line-height: 1.6; flex: 1; margin-bottom: 1.25rem; max-width: 60ch; }
.blog-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.blog-card__cta { font-size: var(--text-xs); font-weight: 600; color: var(--teal); display: flex; align-items: center; gap: .3rem; transition: gap 180ms var(--ease); }
.blog-card:hover .blog-card__cta { gap: .55rem; }

/* Gradient backgrounds for cards */
.grad-sleep  { background: linear-gradient(135deg, #0f1a2e 0%, #0d2b2b 100%); }
.grad-calm   { background: linear-gradient(135deg, #1a1528 0%, #0d2033 100%); }
.grad-focus  { background: linear-gradient(135deg, #1a2010 0%, #0d2520 100%); }
.grad-science{ background: linear-gradient(135deg, #1a1010 0%, #201520 100%); }

/* Icon decoration inside gradient cards */
.card-icon {
  width: 64px; height: 64px;
  background: rgba(0,201,167,.12); border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}

/* --- ARTICLE PAGE --- */
.article-header {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--divider);
}
.article-header .breadcrumb {
  display: flex; align-items: center; gap: .5rem;
  font-size: var(--text-xs); color: var(--faint); margin-bottom: 1.5rem;
}
.article-header .breadcrumb a { color: var(--muted); transition: color 180ms var(--ease); }
.article-header .breadcrumb a:hover { color: var(--teal); }
.article-header .breadcrumb span { color: var(--faint); }
.article-tag {
  display: inline-flex; align-items: center;
  font-size: var(--text-xs); font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--teal); background: var(--teal-dim);
  padding: .25rem .7rem; border-radius: 4px; margin-bottom: 1rem;
}
.article-header h1 {
  font-family: var(--font-d); font-weight: 800;
  font-size: clamp(1.75rem, 1rem + 3vw, 3rem);
  line-height: 1.12; color: var(--text);
  margin-bottom: 1.25rem;
  max-width: 820px;
}
.article-meta {
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  font-size: var(--text-xs); color: var(--muted);
}
.article-meta__item { display: flex; align-items: center; gap: .35rem; }
.article-meta__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }

/* --- KEY TAKEAWAYS BOX --- */
.key-takeaways {
  background: var(--teal-dim);
  border: 1px solid rgba(0,201,167,.2);
  border-left: 3px solid var(--teal);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}
.key-takeaways h3 {
  font-family: var(--font-d); font-weight: 700; font-size: var(--text-base);
  color: var(--teal); margin-bottom: 1rem; letter-spacing: .02em;
  text-transform: uppercase; font-size: var(--text-xs);
}
.key-takeaways ul { list-style: none; }
.key-takeaways li {
  padding: .375rem 0;
  padding-left: 1.25rem;
  position: relative;
  font-size: var(--text-sm);
  color: var(--text);
  line-height: 1.55;
  border: none;
}
.key-takeaways li::before {
  content: '→';
  position: absolute; left: 0;
  color: var(--teal); font-weight: 700;
}

/* --- ARTICLE BODY --- */
.article-body {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.article-content {
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--text);
  max-width: 72ch;
}
.article-content h2 {
  font-family: var(--font-d); font-weight: 700;
  font-size: var(--text-xl);
  color: var(--text);
  margin-top: 2.75rem; margin-bottom: .875rem;
  padding-top: .25rem;
  border-top: 1px solid var(--divider);
}
.article-content h3 {
  font-family: var(--font-d); font-weight: 600;
  font-size: var(--text-lg);
  color: var(--text);
  margin-top: 2rem; margin-bottom: .625rem;
}
.article-content h4 {
  font-family: var(--font-d); font-weight: 600;
  font-size: var(--text-base);
  color: var(--teal);
  margin-top: 1.5rem; margin-bottom: .5rem;
  text-transform: uppercase; letter-spacing: .04em;
  font-size: var(--text-xs);
}
.article-content p {
  margin-bottom: 1.4rem;
  max-width: 72ch;
}
.article-content a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 180ms var(--ease);
}
.article-content a:hover { color: #00b396; }
.article-content ul, .article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li {
  margin-bottom: .5rem;
  font-size: var(--text-base);
  line-height: 1.65;
  max-width: 68ch;
}
.article-content strong { color: var(--text); font-weight: 700; }
.article-content em { color: var(--muted); }
.article-content hr {
  border: none; border-top: 1px solid var(--divider);
  margin: 2.5rem 0;
}

/* --- DATA TABLES --- */
.article-content table {
  width: 100%; border-collapse: collapse;
  margin: 1.5rem 0; font-size: var(--text-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
}
.article-content th {
  background: var(--surface2);
  font-family: var(--font-d); font-weight: 700;
  color: var(--teal); font-size: var(--text-xs);
  letter-spacing: .05em; text-transform: uppercase;
  padding: .75rem 1rem; text-align: left;
  border-bottom: 1px solid var(--border);
}
.article-content td {
  padding: .7rem 1rem; color: var(--text);
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
}
.article-content tr:last-child td { border-bottom: none; }
.article-content tr:nth-child(even) td { background: rgba(255,255,255,.02); }

/* --- ARTICLE SIDEBAR LAYOUT --- */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
}

/* --- SIDEBAR --- */
.article-sidebar { position: sticky; top: 88px; }
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.sidebar-card__title {
  font-family: var(--font-d); font-weight: 700;
  font-size: var(--text-xs); color: var(--teal);
  letter-spacing: .07em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.sidebar-toc a {
  display: block; font-size: var(--text-xs);
  color: var(--muted); padding: .35rem 0;
  border-left: 2px solid var(--divider); padding-left: .75rem;
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
  line-height: 1.45;
}
.sidebar-toc a:hover, .sidebar-toc a.active { color: var(--teal); border-left-color: var(--teal); }
.sidebar-cta-text { font-size: var(--text-xs); color: var(--muted); margin-bottom: 1rem; line-height: 1.55; }

/* --- ARTICLE CTA BLOCK --- */
.article-cta {
  background: linear-gradient(135deg, rgba(0,201,167,.08) 0%, rgba(0,201,167,.04) 100%);
  border: 1px solid rgba(0,201,167,.2);
  border-radius: 16px;
  padding: 2rem 2.25rem;
  margin: 3rem 0;
  text-align: center;
}
.article-cta h3 {
  font-family: var(--font-d); font-weight: 700;
  font-size: var(--text-lg);
  color: var(--text); margin-bottom: .625rem;
  max-width: 100%;
}
.article-cta p {
  font-size: var(--text-sm); color: var(--muted);
  margin-bottom: 1.25rem; max-width: 100%;
}
.article-cta .btn-primary { margin-inline: auto; }

/* --- RELATED ARTICLES --- */
.related-section {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--divider);
}
.related-section h2 {
  font-family: var(--font-d); font-weight: 700;
  font-size: var(--text-xl); margin-bottom: 1.75rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 768px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .related-grid { grid-template-columns: 1fr; } }

/* --- FOOTER --- */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--divider);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem; align-items: center;
}
@media (max-width: 600px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.footer-text { font-size: var(--text-xs); color: var(--faint); line-height: 1.6; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { font-size: var(--text-xs); color: var(--muted); transition: color 180ms var(--ease); }
.footer-links a:hover { color: var(--teal); }
.footer-disclaimer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--divider);
  font-size: var(--text-xs); color: var(--faint); line-height: 1.65;
}

/* --- FONT LOAD --- */
@import url('https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@800,700,600,500&f[]=satoshi@700,600,500,400&display=swap');

/* --- SCIENCE CITATIONS BLOCK --- */
.citations-block {
  margin: 2.5rem 0 1.5rem;
  padding: 1.75rem 2rem;
  background: var(--surface2);
  border: 1px solid rgba(0,201,167,.18);
  border-left: 3px solid var(--teal);
  border-radius: 12px;
}
.citations-block__title {
  display: flex; align-items: center; gap: .625rem;
  font-family: var(--font-d); font-weight: 700;
  font-size: var(--text-sm); color: var(--teal);
  text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: 1.25rem;
}
.citations-block__title svg { flex-shrink: 0; }
.citations-list {
  display: flex; flex-direction: column; gap: .75rem;
  list-style: none; padding: 0; margin: 0;
}
.citations-list li {
  font-size: var(--text-xs); color: var(--muted); line-height: 1.6;
  padding-left: 1.25rem; position: relative;
}
.citations-list li::before {
  content: counter(cite-counter);
  counter-increment: cite-counter;
  position: absolute; left: 0;
  color: var(--teal); font-weight: 700; font-size: .7rem;
}
.citations-list { counter-reset: cite-counter; }
.citations-list a {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--teal);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--text-xs);
  background: rgba(0,201,167,.08);
  border: 1px solid rgba(0,201,167,.3);
  border-radius: 6px;
  padding: .3rem .7rem;
  margin-top: .35rem;
  transition: background 160ms, border-color 160ms;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0,201,167,.2);
  position: relative;
  z-index: 5;
  cursor: pointer;
}
.citations-list a::after {
  content: '\2197';
  font-size: .7rem;
  opacity: .8;
}
.citations-list a:hover,
.citations-list a:active {
  background: rgba(0,201,167,.18);
  border-color: var(--teal);
}

/* inline body links — make them clearly tappable on mobile */
.article-content a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0,201,167,.5);
  transition: color 180ms, text-decoration-color 180ms;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0,201,167,.2);
  cursor: pointer;
}
.article-content a:hover,
.article-content a:active {
  color: #00e6bf;
  text-decoration-color: var(--teal);
}

@media (max-width: 640px) {
  .citations-block { padding: 1.25rem 1.25rem; }
  /* On mobile, each citation link becomes a full-width button */
  .citations-list li {
    display: flex;
    flex-direction: column;
    gap: .4rem;
  }
  .citations-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .65rem 1rem;
    font-size: .8125rem;
    border-radius: 8px;
    background: rgba(0,201,167,.1);
    border-color: rgba(0,201,167,.35);
    min-height: 44px;
  }
}

/* ============================================================
   BLOG RESPONSIVE — Full device coverage
   ============================================================ */

/* ── sm: iPad portrait (768–1023px) ── */
@media (max-width: 1023px) and (min-width: 768px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
  .article-body { max-width: 720px; margin-inline: auto; }
  .related-grid { grid-template-columns: repeat(2,1fr); }
}

/* ── xs + 2xs: mobile (≤ 767px) ── */
@media (max-width: 767px) {
  /* Nav */
  .nav-inner { padding-inline: 1.25rem; height: 60px; }

  /* Blog hero */
  .blog-hero { padding-block: clamp(2.5rem,6vw,4rem); }
  .blog-hero h1 { font-size: clamp(1.75rem,6vw,2.5rem); }

  /* Article */
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
  .article-body { max-width: 100%; }

  /* Article header */
  .article-header h1 { font-size: clamp(1.625rem,5.5vw,2.25rem); line-height: 1.2; }
  .article-header { padding-block: clamp(2.5rem,6vw,4rem); }

  /* Prose */
  .prose h2 { font-size: clamp(1.25rem,4.5vw,1.75rem); }
  .prose h3 { font-size: clamp(1.125rem,4vw,1.375rem); }
  .prose p, .prose li { font-size: .9375rem; }
  .prose blockquote { padding: 1rem 1.25rem; font-size: .9375rem; }
  .prose table { font-size: .8125rem; }
  .prose table th, .prose table td { padding: .5rem .75rem; }

  /* Article CTA */
  .article-cta { padding: 1.5rem 1.25rem; }
  .article-cta .btn-primary { width: 100%; justify-content: center; }

  /* Citations */
  .citations-block { padding: 1.25rem 1.25rem; }

  /* Related */
  .related-grid { grid-template-columns: 1fr; }
  .related-section h2 { font-size: 1.375rem; }

  /* Blog index cards */
  .blog-grid { grid-template-columns: 1fr !important; }
  .blog-card { border-radius: 16px; }
}

/* ── 2xs: iPhone (≤ 479px) ── */
@media (max-width: 479px) {
  .container { padding-inline: 1.25rem; }
  .container-narrow { padding-inline: 1.25rem; }
  .article-header h1 { font-size: clamp(1.5rem,7vw,2rem); }
  .article-meta { flex-direction: column; gap: .5rem; align-items: flex-start; }
  .article-cta h3 { font-size: 1.125rem; }
  .citations-list li { font-size: .8125rem; }
  .btn-primary { min-height: 44px; }
}

/* Safe area insets for blog */
@supports (padding: max(0px)) {
  @media (max-width: 479px) {
    .footer { padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
  }
}

/* ===== ARTICLE HERO IMAGE ===== */
.article-hero-img {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 2.5rem;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/7;
}
.article-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== BLOG CARD IMAGE — real photos ===== */
.blog-card__img {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  background: #0d1a1a;
}
.blog-card--feature .blog-card__img {
  aspect-ratio: 16/7;
}
.blog-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.blog-card:hover .blog-card__img img {
  transform: scale(1.04);
}

/* Responsive hero image */
@media (max-width: 768px) {
  .article-hero-img {
    border-radius: 10px;
    margin-bottom: 1.75rem;
    aspect-ratio: 16/9;
  }
}

/* =====================================================
   Study Modal — bottom sheet overlay
   ===================================================== */
#study-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: flex-end;
  justify-content: center;
}
#study-modal-overlay.is-open {
  display: flex;
}
#study-modal-sheet {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: #111214;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px 20px 0 0;
  padding: 2rem 1.75rem 2.5rem;
  transform: translateY(100%);
  transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 88svh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#study-modal-sheet.is-visible {
  transform: translateY(0);
}
#study-modal-drag-bar {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  margin: 0 auto 1.5rem;
}
#study-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: none;
  color: #aaa;
  font-size: 1.25rem;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms, color 200ms;
}
#study-modal-close:hover { background: rgba(255,255,255,0.14); color: #fff; }
#study-modal-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3em 0.85em;
  border-radius: 100px;
  margin-bottom: 0.6rem;
}
#study-modal-journal {
  font-size: 0.8rem;
  color: #666;
  margin: 0 0 0.6rem;
  letter-spacing: 0.02em;
}
#study-modal-title {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 1rem;
  line-height: 1.35;
  padding-right: 2rem;
}
#study-modal-stat-box {
  background: rgba(0,201,167,0.08);
  border: 1px solid rgba(0,201,167,0.2);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
#study-modal-stat {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #00C9A7;
}
#study-modal-finding {
  font-size: 0.9rem;
  color: #b0b0b0;
  line-height: 1.65;
  margin: 0 0 1.5rem;
}
#study-modal-open-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: transparent;
  border: 1.5px solid rgba(0,201,167,0.45);
  color: #00C9A7;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  margin-bottom: 0.75rem;
  transition: background 200ms, border-color 200ms;
  cursor: pointer;
  min-height: 48px;
}
#study-modal-open-btn:hover { background: rgba(0,201,167,0.08); border-color: #00C9A7; }
#study-modal-cta {
  display: block;
  width: 100%;
  text-align: center;
  background: #00C9A7;
  color: #09090B;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  transition: opacity 200ms;
  min-height: 48px;
}
#study-modal-cta:hover { opacity: 0.9; }

@media (min-width: 641px) {
  #study-modal-sheet {
    border-radius: 20px;
    margin-bottom: 2rem;
    max-width: 560px;
  }
}
