/* ============================================
   CircadianShield — Marketing Website Styles
   ============================================ */

/* --- Custom Properties --- */
:root {
  --color-bg: #0a0e27;
  --color-bg-light: #111538;
  --color-bg-card: #141937;
  --color-accent: #f59e0b;
  --color-accent-hover: #d97706;
  --color-accent-glow: rgba(245, 158, 11, 0.15);
  --color-text: #f0f0f0;
  --color-text-muted: #9ca3af;
  --color-text-dim: #6b7280;
  --color-border: #1e2448;
  --color-indigo: #6366f1;
  --color-indigo-muted: rgba(99, 102, 241, 0.15);
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", Menlo, monospace;
  --max-width: 1200px;
  --nav-height: 72px;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background-color: var(--color-bg);
  overflow-x: hidden;
  scrollbar-color: var(--color-border) var(--color-bg);
}

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

body {
  font-family: var(--font-stack);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

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

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

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

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

img, svg, video {
  max-width: 100%;
  height: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section {
  padding: 80px 0;
}

.section--alt {
  background-color: var(--color-bg-light);
}

.section__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 16px;
}

.section__subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 640px;
}

.section__header {
  text-align: center;
  margin-bottom: 48px;
}

.section__header .section__subtitle {
  margin: 0 auto;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-stack);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn--primary {
  background: var(--color-accent);
  color: #0a0e27 !important;
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-bg);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25);
}

.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn--sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

.btn--lg {
  padding: 18px 36px;
  font-size: 1.125rem;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(10, 14, 39, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

.nav__logo:hover {
  color: var(--color-text);
}

.nav__logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-text);
}

.nav__link--active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.nav__cta {
  margin-left: 8px;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav__hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--color-accent-glow);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: 24px;
}

.hero__title {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  max-width: 800px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--color-text) 40%, var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__subtitle {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 36px;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero__image {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.hero__image img,
.hero__image svg {
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

/* --- Problem Section --- */
.problem {
  text-align: center;
}

.problem__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 32px;
  margin-top: 40px;
}

.problem__item {
  padding: 32px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.problem__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #ef4444;
}

.problem__item h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.problem__item p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

/* --- How It Works --- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 32px;
  counter-reset: step;
}

.step {
  text-align: center;
  padding: 40px 24px;
  position: relative;
}

.step__number {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  background: var(--color-accent-glow);
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
}

.step h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.step p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

/* --- Feature Cards --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 24px;
}

.feature-card {
  padding: 32px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  background: var(--color-accent-glow);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  color: var(--color-accent);
}

.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* --- Science Callout --- */
.callout {
  background: linear-gradient(135deg, var(--color-bg-card), var(--color-bg-light));
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.callout::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.callout__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-indigo);
  background: var(--color-indigo-muted);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.callout h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 12px;
}

.callout p {
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 24px;
}

/* --- Platform Badges --- */
.platforms {
  text-align: center;
}

.platforms__grid {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.platform-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 32px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  min-width: 260px;
  text-decoration: none;
  transition: all var(--transition);
}

.platform-badge:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.platform-badge__icon {
  font-size: 2rem;
}

.platform-badge__text {
  text-align: left;
}

.platform-badge__label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.platform-badge__name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

/* --- Footer --- */
.footer {
  background: var(--color-bg-light);
  border-top: 1px solid var(--color-border);
  padding: 48px 0 32px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
}

.footer__brand p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-top: 12px;
  max-width: 280px;
}

.footer__col h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  margin-bottom: 16px;
}

.footer__col ul li {
  margin-bottom: 10px;
}

.footer__col ul a {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.footer__col ul a:hover {
  color: var(--color-text);
}

.footer__bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  text-align: center;
  color: var(--color-text-dim);
  font-size: 0.8125rem;
}

/* --- Features Page --- */
.feature-detail {
  padding: 48px 0;
  border-bottom: 1px solid var(--color-border);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.feature-detail:last-child {
  border-bottom: none;
}

.feature-detail__icon {
  width: 64px;
  height: 64px;
  background: var(--color-accent-glow);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 16px;
  color: var(--color-accent);
}

.feature-detail__content h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.feature-detail__content p {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.feature-detail__visual {
  display: none;
}

.feature-detail__list {
  list-style: none;
  padding: 0;
}

.feature-detail__list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.feature-detail__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.6;
}

/* --- Science Page --- */
.science-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--color-border);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.science-section:last-child {
  border-bottom: none;
}

.science-section h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.science-section p {
  color: var(--color-text-muted);
  line-height: 1.75;
  max-width: 800px;
  margin-bottom: 16px;
}

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

.science-callout-box {
  background: var(--color-bg-card);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 20px 0;
}

.science-callout-box p {
  margin-bottom: 0;
  font-style: italic;
  color: var(--color-text);
}

.science-ref {
  font-size: 0.8125rem;
  color: var(--color-text-dim);
  font-style: normal;
  display: block;
  margin-top: 8px;
}

/* --- FAQ --- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1.0625rem;
  font-weight: 600;
  font-family: var(--font-stack);
  color: var(--color-text);
  transition: color var(--transition);
}

.faq-question:hover {
  color: var(--color-accent);
}

.faq-question__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-left: 16px;
  position: relative;
}

.faq-question__icon::before,
.faq-question__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--color-text-muted);
  border-radius: 1px;
  transition: transform var(--transition);
}

.faq-question__icon::before {
  width: 14px;
  height: 2px;
  transform: translate(-50%, -50%);
}

.faq-question__icon::after {
  width: 2px;
  height: 14px;
  transform: translate(-50%, -50%);
}

.faq-item[aria-expanded="true"] .faq-question__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer__inner {
  padding: 0 0 20px;
  color: var(--color-text-muted);
  line-height: 1.7;
  font-size: 0.9375rem;
}

.faq-item[aria-expanded="true"] .faq-answer {
  max-height: 500px;
}

/* --- Download Page --- */
.download-hero {
  text-align: center;
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 60px;
}

.download-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
}

.download-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}

.download-card--featured {
  border-color: var(--color-accent);
  position: relative;
}

.download-card--featured::before {
  content: "Available Now";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: var(--color-bg);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: 100px;
}

.download-card__icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.download-card h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.download-card__version {
  color: var(--color-text-dim);
  font-size: 0.875rem;
  margin-bottom: 24px;
}

.download-card .btn {
  width: 100%;
  margin-bottom: 24px;
}

.download-card__reqs {
  text-align: left;
}

.download-card__reqs h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-dim);
  margin-bottom: 8px;
}

.download-card__reqs li {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  padding: 4px 0;
  padding-left: 20px;
  position: relative;
}

.download-card__reqs li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: 0.75rem;
}

/* --- Page Header (shared across subpages) --- */
.page-header {
  text-align: center;
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 40px;
}

.page-header__title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 12px;
}

.page-header__subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Responsive: Mobile --- */
@media (max-width: 768px) {
  .section {
    padding: 56px 0;
  }

  .nav__links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    z-index: 999;
  }

  .nav__links--open {
    display: flex;
  }

  .nav__cta {
    margin-left: 0;
  }

  .nav__hamburger {
    display: flex;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 48px);
    padding-bottom: 48px;
  }

  .hero__title {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
    max-width: 320px;
  }

  .feature-detail {
    padding: 32px 0;
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

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

  .callout {
    padding: 32px 20px;
  }

  .download-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 375px) {
  .container {
    padding: 0 16px;
  }

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

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.2s; }
.animate-in:nth-child(4) { animation-delay: 0.3s; }
.animate-in:nth-child(5) { animation-delay: 0.4s; }
.animate-in:nth-child(6) { animation-delay: 0.5s; }


/* ============================================
   Blog Styles
   ============================================ */

/* --- Reading Progress Bar --- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), #f97316);
  z-index: 2000;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* --- Blog Index Page --- */
.blog-hero {
  text-align: center;
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 48px;
}

.blog-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.blog-filter__btn {
  padding: 8px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-stack);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.blog-filter__btn:hover,
.blog-filter__btn--active {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-glow);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 28px;
  margin-bottom: 60px;
}

.blog-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  border-color: rgba(245, 158, 11, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  color: inherit;
}

.blog-card__body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.blog-card__category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--color-accent-glow);
  color: var(--color-accent);
  border: 1px solid rgba(245, 158, 11, 0.2);
  white-space: nowrap;
}

.blog-card__category--science {
  background: var(--color-indigo-muted);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.25);
}

.blog-card__category--health {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.2);
}

.blog-card__category--productivity {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.2);
}

.blog-card__date {
  font-size: 0.8125rem;
  color: var(--color-text-dim);
}

.blog-card__read-time {
  font-size: 0.8125rem;
  color: var(--color-text-dim);
  margin-left: auto;
}

.blog-card__title {
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
  color: var(--color-text);
}

.blog-card:hover .blog-card__title {
  color: var(--color-accent);
}

.blog-card__excerpt {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 20px;
}

.blog-card__cta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
}

.blog-card__cta-arrow {
  transition: transform var(--transition);
}

.blog-card:hover .blog-card__cta-arrow {
  transform: translateX(4px);
}

/* --- Blog Article Page --- */
.article-header {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 40px;
  max-width: 800px;
  margin: 0 auto;
}

.article-header .blog-card__meta {
  margin-bottom: 16px;
}

.article-header__title {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  line-height: 1.2;
  margin-bottom: 16px;
}

.article-header__lead {
  font-size: 1.1875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 720px;
}

.article-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.article-author__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), #f97316);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.article-author__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}

.article-author__role {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* --- Article Body --- */
.article-body {
  padding-top: 100px;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 64px;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--color-text-muted);
}

.article-body h1 {
  font-size: 2.25rem;
  margin: 0 0 24px;
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.article-body h2 {
  font-size: 1.625rem;
  margin: 56px 0 20px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

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

.article-body h3 {
  font-size: 1.25rem;
  margin: 36px 0 14px;
  color: var(--color-text);
}

.article-body p {
  color: var(--color-text-muted);
  line-height: 1.85;
  margin-bottom: 22px;
  font-size: 1.0625rem;
}

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

.article-body ul,
.article-body ol {
  list-style: none;
  margin: 16px 0 24px;
  padding: 0;
}

.article-body ul li,
.article-body ol li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: var(--color-text-muted);
  line-height: 1.7;
  font-size: 1rem;
}

.article-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.7;
}

.article-body ol {
  counter-reset: article-ol;
}

.article-body ol li::before {
  counter-increment: article-ol;
  content: counter(article-ol) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-accent);
  opacity: 1;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
}

.article-body blockquote {
  background: var(--color-bg-card);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 24px 28px;
  margin: 36px 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.article-body blockquote p {
  margin-bottom: 0;
  font-style: italic;
  color: var(--color-text);
  line-height: 1.75;
  font-size: 1.0625rem;
}

.article-body blockquote cite {
  display: block;
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--color-text-dim);
  font-style: normal;
}

.article-body a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: rgba(245, 158, 11, 0.35);
  text-underline-offset: 2px;
}

.article-body a:hover {
  color: var(--color-accent-hover);
  text-decoration-color: var(--color-accent-hover);
}

.article-body strong {
  color: var(--color-text);
  font-weight: 600;
}

.article-body .article-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 40px 0;
}

/* Article callout (key takeaway box) */
.article-callout {
  background: linear-gradient(135deg, var(--color-bg-card), var(--color-bg-light));
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 28px 0;
  position: relative;
  overflow: hidden;
}

.article-callout::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), #f97316, transparent);
}

.article-callout__label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.article-callout p {
  margin-bottom: 0;
  color: var(--color-text);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* --- Article: Table, Code, Image, HR (generated content) --- */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.article-body th, .article-body td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border, #1e2448);
}

.article-body th {
  font-weight: 600;
  color: var(--color-text, #f0f0f0);
  background: var(--color-bg-card, #141937);
}

.article-body td {
  color: var(--color-text-muted, #9ca3af);
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm, 8px);
  margin: 1.5rem 0;
}

.article-body code {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--color-accent, #f59e0b);
}

.article-body pre {
  background: var(--color-bg-card, #141937);
  border: 1px solid var(--color-border, #1e2448);
  padding: 1.5rem;
  border-radius: var(--radius, 12px);
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.article-body pre code {
  background: none;
  padding: 0;
  color: var(--color-text, #f0f0f0);
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--color-border, #1e2448);
  margin: 2.5rem 0;
}

/* Template article layout */
main.article-body section {
  padding: 0;
  margin-bottom: 1.5rem;
}

main.article-body nav {
  position: static;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-dim, #6b7280);
}

main.article-body nav a {
  color: var(--color-accent, #f59e0b);
  text-decoration: none;
}

main.article-body nav a:hover {
  color: var(--color-accent-hover, #d97706);
}

@media (max-width: 768px) {
  .article-body table {
    display: block;
    overflow-x: auto;
  }
}

/* --- Related Posts --- */
.related-posts {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.related-posts__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--color-text);
}

.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 16px;
}

.related-post-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-post-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-2px);
  color: inherit;
}

.related-post-card__category {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.related-post-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}

.related-post-card:hover .related-post-card__title {
  color: var(--color-accent);
}

.related-post-card__date {
  font-size: 0.8125rem;
  color: var(--color-text-dim);
  margin-top: auto;
}

/* --- Article CTA Box --- */
.article-cta-box {
  margin-top: 48px;
  padding: 36px 40px;
  background: linear-gradient(135deg, var(--color-bg-card), var(--color-bg-light));
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.article-cta-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.article-cta-box h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: #f0f0f0;
}

.article-body .article-cta-box h3 {
  color: #f0f0f0;
}

.article-cta-box p,
.article-body .article-cta-box p {
  color: #d1d5db;
  margin-bottom: 20px;
  font-size: 0.9375rem;
}

.article-cta-box .btn--primary {
  color: #0a0e27;
  font-weight: 700;
}

/* --- Responsive Blog --- */
@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .article-header {
    padding-top: calc(var(--nav-height) + 40px);
    padding-bottom: 28px;
  }

  .article-body h1 {
  font-size: 2.25rem;
  margin: 0 0 24px;
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.article-body h2 {
    font-size: 1.3125rem;
    margin-top: 32px;
  }

  .article-cta-box {
    padding: 28px 20px;
  }

  .related-posts__grid {
    grid-template-columns: 1fr;
  }
}

/* ── Article Format Elements ──────────────────────────────
   Shared styles for callouts, stat blocks, process flows,
   timelines, comparison charts, TL;DR and key takeaway boxes.
   Used by org-factory content generation across all sites. */

/* ── Callout Boxes ──────────────────────────────────────── */
.callout {
  border-left: 4px solid var(--accent, #1A6CFF);
  background: rgba(26, 108, 255, 0.08);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  font-size: 0.95em;
  line-height: 1.6;
}
.callout strong:first-child {
  display: inline;
  margin-right: 4px;
}
.callout-tip {
  border-left-color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
}
.callout-warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}
.callout-info {
  border-left-color: var(--accent, #1A6CFF);
  background: rgba(26, 108, 255, 0.08);
}

/* ── Stat Blocks ────────────────────────────────────────── */
.stat-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--stat-bg, rgba(26, 108, 255, 0.06));
  border: 1px solid var(--stat-border, rgba(26, 108, 255, 0.15));
  border-radius: 12px;
  padding: 24px 20px;
  margin: 24px 0;
}
.stat-number {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--accent, #1A6CFF);
}
.stat-label {
  font-size: 0.9em;
  color: var(--text-muted, #666);
  margin-top: 8px;
  max-width: 280px;
}

/* ── TL;DR Box ──────────────────────────────────────────── */
.tldr-box {
  background: var(--tldr-bg, #f0f7ff);
  border: 1px solid var(--tldr-border, #c8ddf5);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 24px 0;
}
.tldr-box h3 {
  margin: 0 0 12px;
  font-size: 1em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent, #1A6CFF);
}
.tldr-box ul {
  margin: 0;
  padding-left: 20px;
}
.tldr-box li {
  margin-bottom: 6px;
  line-height: 1.5;
}

/* ── Key Takeaway Box ───────────────────────────────────── */
.key-takeaway {
  border: 2px solid var(--accent, #1A6CFF);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 32px 0;
  background: var(--takeaway-bg, rgba(26, 108, 255, 0.03));
}
.key-takeaway h3 {
  margin: 0 0 12px;
  font-size: 1.05em;
  font-weight: 700;
  color: var(--accent, #1A6CFF);
}
.key-takeaway ul {
  margin: 0;
  padding-left: 20px;
}
.key-takeaway li {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* ── Process Flow ───────────────────────────────────────── */
.process-flow {
  margin: 28px 0;
  padding-left: 8px;
}
.process-step {
  display: flex;
  gap: 16px;
  position: relative;
  padding-bottom: 24px;
}
.process-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background: var(--accent, #1A6CFF);
  opacity: 0.3;
}
.step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent, #1A6CFF);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9em;
}
.step-content {
  flex: 1;
  padding-top: 4px;
}
.step-content strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05em;
}
.step-content p {
  margin: 0;
  color: var(--text-muted, #555);
  line-height: 1.5;
}

/* ── Timeline ───────────────────────────────────────────── */
.timeline {
  margin: 28px 0;
  padding-left: 8px;
  border-left: 3px solid var(--timeline-line, rgba(26, 108, 255, 0.2));
}
.timeline-item {
  position: relative;
  padding: 0 0 24px 24px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent, #1A6CFF);
  border: 2px solid #fff;
}
.timeline-date {
  display: block;
  font-weight: 700;
  font-size: 0.85em;
  color: var(--accent, #1A6CFF);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.timeline-content {
  line-height: 1.5;
  color: var(--text-body, #333);
}

/* ── Comparison Chart ───────────────────────────────────── */
.comparison-chart {
  margin: 24px 0;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--chart-border, #e5e7eb);
}
.comparison-chart table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92em;
}
.comparison-chart th {
  background: var(--chart-header-bg, #f8fafc);
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  border-bottom: 2px solid var(--chart-border, #e5e7eb);
}
.comparison-chart td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--chart-border, #e5e7eb);
}
.comparison-chart tr:last-child td {
  border-bottom: none;
}
.comparison-chart tr:hover td {
  background: var(--chart-hover, rgba(26, 108, 255, 0.04));
}

/* ── Mobile Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .stat-number { font-size: 2.2rem; }
  .stat-block { padding: 18px 16px; }
  .callout { padding: 12px 16px; }
  .tldr-box, .key-takeaway { padding: 16px 18px; }
  .process-step { gap: 12px; }
  .step-number { width: 30px; height: 30px; font-size: 0.8em; }
  .process-step:not(:last-child)::before { left: 14px; }
  .comparison-chart { font-size: 0.85em; }
  .comparison-chart th, .comparison-chart td { padding: 8px 10px; }
}
/* Light mode for article pages — full-width white background below nav */
.article-body {
  background-color: #ffffff;
  color: #1a1a2e;
  padding-left: 48px;
  padding-right: 48px;
  padding-bottom: 80px;
  max-width: 100%;
  position: relative;
}

.article-body article {
  max-width: 800px;
  margin: 0 auto;
}

.article-body h1 {
  color: #111827;
}

.article-body h2 {
  color: #1a1a2e;
  border-top-color: #e5e7eb;
}

.article-body h3 {
  color: #1f2937;
}

.article-body p {
  color: #374151;
}

.article-body a {
  color: #f59e0b;
}

.article-body a:hover {
  color: #d97706;
}

.article-body strong {
  color: #111827;
}

.article-body ul li,
.article-body ol li {
  color: #374151;
}

.article-body blockquote {
  background: #f9fafb;
  border-left-color: #f59e0b;
  color: #4b5563;
}

.article-body table {
  background: #ffffff;
}

.article-body th {
  background: #f3f4f6;
  color: #111827;
}

.article-body td {
  color: #374151;
  border-color: #e5e7eb;
}

.article-body code {
  background: #f3f4f6;
  color: #1f2937;
}

.article-body pre {
  background: #1e1e2e;
  color: #e5e7eb;
}

.article-body hr {
  border-color: #e5e7eb;
}

.article-body img {
  border-radius: 8px;
}

/* Light-background components on white article body */
.article-body .tldr-box,
.article-body .key-takeaway {
  background: #f9fafb;
  border-color: #e5e7eb;
  color: #374151;
}

.article-body .tldr-box h3,
.article-body .key-takeaway h3 {
  color: #111827;
}

.article-body .stat-block {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.article-body .stat-number {
  color: #f59e0b;
}

.article-body .stat-label {
  color: #6b7280;
}

.article-body .pro-tip,
.article-body .callout,
.article-body .callout-tip,
.article-body .callout-warning,
.article-body .callout-info {
  background: rgba(245, 158, 11, 0.10);
  border-left-color: #f59e0b;
  color: #d1d5db;
}

.article-body .callout-tip {
  background: rgba(34, 197, 94, 0.10);
  border-left-color: #22c55e;
}

.article-body .callout-info {
  background: rgba(99, 102, 241, 0.10);
  border-left-color: #6366f1;
}

.article-body .callout p,
.article-body .pro-tip p,
.article-body .callout-tip p,
.article-body .callout-warning p,
.article-body .callout-info p {
  color: #d1d5db;
  max-width: none;
}

.article-body .callout strong,
.article-body .pro-tip strong,
.article-body .callout-tip strong,
.article-body .callout-warning strong,
.article-body .callout-info strong {
  color: #f0f0f0;
}

@media (max-width: 768px) {
  .article-body {
    padding-left: 20px;
    padding-right: 20px;
  }
}
