/**
 * Design system, professional layout (8px grid)
 *
 * Container: max-width 1200px, centered, horizontal padding 20px
 * Sections: vertical padding up to 60px; inner stack gap 24px (3×8)
 * Type: H1 36px / H2 28px / H3 22px (capped with clamp on small screens)
 * Body: 16px, line-height 1.6 · Buttons: 44px min height, 10px 20px padding, 14px type
 * Cards: 20px padding, 10px radius, 20px gap
 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Design tokens ========== */
:root {
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 40px;
  --space-section: 60px;

  --space-unit: var(--space-xs);

  --container-max: 1200px;
  --section-pad-y: clamp(40px, 4.5vw, 60px);
  --section-pad-x: 20px;
  --section-content-gap: 24px;
  --section-intro-gap: 16px;

  --h1-size: clamp(1.75rem, 1.2vw + 1.25rem, 2.25rem);
  --h2-size: clamp(1.375rem, 1vw + 1rem, 1.75rem);
  --h3-size: clamp(1.125rem, 0.5vw + 1rem, 1.375rem);
  --card-title-size: clamp(1rem, 0.25vw + 0.95rem, 1.125rem);
  --body-size: 16px;
  --body-lh: 1.6;
  --heading-lh: 1.28;

  --btn-height: 44px;
  --btn-pad-x: 20px;
  --btn-pad-y: 10px;
  --btn-font-size: 14px;
  --card-radius: 10px;
  --icon-radius: 10px;
  --card-padding: 20px;
  --card-gap: 20px;
}

.layout-container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--section-pad-x);
  padding-right: var(--section-pad-x);
  box-sizing: border-box;
}

/* When both classes are used, honor readable column width (layout-container alone loads after Tailwind and would win otherwise). */
.layout-container.max-w-readable {
  max-width: min(var(--container-max), 36rem);
}

.layout-section {
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

/* Stack section blocks with consistent rhythm (intro → grids → asides) */
.layout-section > .layout-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--section-content-gap);
  width: 100%;
}

/* Left-align section intros; readable width cap (prose column inside full container) */
.layout-section > .layout-container > .section-intro {
  align-self: flex-start;
  width: 100%;
  max-width: min(100%, 36rem);
}

.layout-section > .layout-container > .section-intro.max-w-readable {
  max-width: min(100%, 36rem);
}

.layout-section > .layout-container > .layout-grid {
  width: 100%;
}

/* Tight FAQ / definition lists (home + inner pages) */
#main .home-faq-dl {
  width: 100%;
  margin: 0;
}

#main .home-faq-dl > div {
  margin: 0;
  padding-top: var(--space-md);
}

#main .home-faq-dl > div:first-child {
  padding-top: var(--space-sm);
}

#main .home-faq-dl dd {
  margin-top: var(--space-xs);
}

/* Loose link row after grids: align to same left edge as intros */
.layout-section > .layout-container > p.text-left {
  align-self: flex-start;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.layout-section > .layout-container > ol.relative.max-w-2xl {
  align-self: flex-start;
  width: 100%;
  max-width: min(100%, 42rem);
}

/* Eyebrow → heading → copy: one vertical rhythm, no ad-hoc Tailwind margins */
.section-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--section-intro-gap);
}

.section-intro > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

#main .section-intro > h1,
#main .section-intro > h2 {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.section-intro .text-base,
.section-intro .text-lg,
.section-intro .text-sm {
  line-height: var(--body-lh);
}

/* Same left edge as container; drop centered mx-auto on intros */
#main .section-intro.mx-auto {
  margin-left: 0 !important;
  margin-right: auto !important;
}

@media (max-width: 639px) {
  :root {
    --section-pad-y: clamp(32px, 6vw, 48px);
    --section-pad-x: 20px;
    --section-content-gap: 16px;
    --section-intro-gap: var(--space-xs);
    --card-padding: 16px;
    --card-gap: 16px;
  }
}

/* Home: calmer banding, alternate soft stripes instead of harsh flips */
body.page-home #main > section.layout-section {
  border-bottom: 1px solid rgba(24, 24, 27, 0.07);
  background-color: #fafafa;
}

body.page-home #main > section.layout-section:nth-of-type(even) {
  background-color: #ffffff;
}

html[data-theme='dark'] body.page-home #main > section.layout-section {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background-color: #18181b;
}

html[data-theme='dark'] body.page-home #main > section.layout-section:nth-of-type(even) {
  background-color: #141416;
}

html[data-theme='dark'] body.page-home .home-guide-head,
html[data-theme='dark'] body.page-home .reading-path__intro {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Home: Overview, editorial intro + lighter topic cards */
body.page-home #main > section.home-overview.layout-section {
  background: linear-gradient(165deg, rgba(99, 102, 241, 0.07) 0%, rgba(250, 250, 251, 1) 32%, #ffffff 58%);
  border-bottom: 1px solid rgba(24, 24, 27, 0.06);
}

html[data-theme='dark'] body.page-home #main > section.home-overview.layout-section {
  background: linear-gradient(165deg, rgba(99, 102, 241, 0.12) 0%, #18181b 38%, #141416 100%);
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

/* Overview lead: centred column, relaxed rhythm */
.home-overview .home-overview__lead {
  align-self: center;
  width: 100%;
  max-width: min(40rem, 100%);
  margin-inline: auto;
  margin-bottom: 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.1rem, 2.8vw, 1.65rem);
  text-align: center;
}

.home-overview .home-overview__lead .section-intro {
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 100%;
}

.home-overview .home-overview__prose {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: clamp(1.35rem, 3.2vw, 1.85rem) clamp(1.15rem, 4vw, 2.1rem);
  border-radius: 1.1rem;
  border: 1px solid rgba(99, 102, 241, 0.12);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 44px -30px rgba(99, 102, 241, 0.38);
  text-align: center;
}

.home-overview .home-overview__prose p {
  margin: 0 0 1.05em;
  font-size: clamp(0.98rem, 1.05vw, 1.0625rem);
  line-height: 1.8;
  color: rgb(63 63 70);
}

.home-overview .home-overview__prose p:last-child {
  margin-bottom: 0;
}

html[data-theme='dark'] .home-overview .home-overview__prose {
  background: rgba(24, 24, 27, 0.62);
  border-color: rgba(129, 140, 248, 0.2);
  box-shadow: 0 16px 48px -28px rgba(0, 0, 0, 0.5);
}

html[data-theme='dark'] .home-overview .home-overview__prose p {
  color: rgb(212 212 216);
}

.layout-section > .layout-container > .home-overview__grid {
  width: 100%;
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(24, 24, 27, 0.07);
  gap: 1rem;
  grid-template-columns: 1fr;
}

html[data-theme='dark'] .layout-section > .layout-container > .home-overview__grid {
  border-top-color: rgba(255, 255, 255, 0.08);
}

@media (min-width: 640px) {
  .layout-section > .layout-container > .home-overview__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.15rem;
  }
}

@media (min-width: 1024px) {
  .layout-section > .layout-container > .home-overview__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.05rem 1.2rem;
  }
}

.home-overview__grid > li {
  min-width: 0;
  height: 100%;
}

.home-overview__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  height: 100%;
  box-sizing: border-box;
  padding: 1rem 1.05rem 1.1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(24, 24, 27, 0.08);
  background: #ffffff;
  box-shadow: 0 2px 14px -6px rgba(24, 24, 27, 0.12);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-overview__card:hover {
  border-color: rgba(99, 102, 241, 0.28);
  box-shadow: 0 12px 36px -16px rgba(99, 102, 241, 0.22);
}

html[data-theme='dark'] .home-overview__card {
  background: rgba(24, 24, 27, 0.55);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 2px 18px -8px rgba(0, 0, 0, 0.45);
}

html[data-theme='dark'] .home-overview__card:hover {
  border-color: rgba(129, 140, 248, 0.35);
  box-shadow: 0 14px 40px -18px rgba(99, 102, 241, 0.25);
}

.home-overview__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  font-size: 0.875rem;
  color: rgb(79 70 229);
  background: rgba(99, 102, 241, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

html[data-theme='dark'] .home-overview__icon {
  color: rgb(165 180 252);
  background: rgba(99, 102, 241, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.home-overview__card-body {
  min-width: 0;
}

.home-overview__card-body h3 {
  margin: 0;
}

.home-overview__card-copy {
  margin: 0.45rem 0 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgb(82 82 91);
}

html[data-theme='dark'] .home-overview__card-copy {
  color: rgb(161 161 170);
}

.home-overview__code {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgb(63 63 70);
  background: rgba(24, 24, 27, 0.06);
}

html[data-theme='dark'] .home-overview__code {
  color: rgb(228 228 231);
  background: rgba(255, 255, 255, 0.08);
}

/* Home overview, “field notes” alternate layout (mosaic + lab margin + dot field) */
body.page-home #main > section.home-overview.home-overview--fieldnotes.layout-section {
  background-color: #f6f5f8;
  background-image: radial-gradient(rgba(99, 102, 241, 0.09) 1px, transparent 1px);
  background-size: 14px 14px;
  border-bottom: 1px solid rgba(24, 24, 27, 0.07);
}

html[data-theme='dark'] body.page-home #main > section.home-overview.home-overview--fieldnotes.layout-section {
  background-color: #121214;
  background-image: radial-gradient(rgba(165, 180, 252, 0.07) 1px, transparent 1px);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.page-home .home-overview--fieldnotes .home-overview__shell {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

body.page-home .home-overview--fieldnotes .home-overview__lead {
  align-self: stretch;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  margin-bottom: 0;
  align-items: flex-start;
  text-align: left;
  gap: 1.15rem;
}

body.page-home .home-overview--fieldnotes .home-overview__lead .section-intro {
  align-items: flex-start;
  text-align: left;
  max-width: min(42rem, 100%);
}

body.page-home .home-overview--fieldnotes .home-overview__intro-text > p.text-xs {
  display: inline-flex;
  padding: 0.2rem 0.55rem 0.2rem 0.65rem;
  border-radius: 0.25rem 0.75rem 0.75rem 0.25rem;
  border: 1px dashed rgba(99, 102, 241, 0.45);
  background: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.26em;
  color: #4338ca;
}

html[data-theme='dark'] body.page-home .home-overview--fieldnotes .home-overview__intro-text > p.text-xs {
  background: rgba(24, 24, 27, 0.75);
  border-color: rgba(129, 140, 252, 0.45);
  color: #c7d2fe;
}

body.page-home .home-overview--fieldnotes #home-about-heading {
  margin-top: 0.65rem;
  font-size: clamp(1.65rem, 3.8vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  background: linear-gradient(96deg, #18181b 5%, #4f46e5 50%, #0f766e 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme='dark'] body.page-home .home-overview--fieldnotes #home-about-heading {
  background: linear-gradient(96deg, #f4f4f5 0%, #a5b4fc 45%, #2dd4bf 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.page-home .home-overview--fieldnotes .home-overview__prose {
  text-align: left;
  max-width: min(52rem, 100%);
  margin-inline: 0;
  padding: 1.1rem 0 1.1rem 1.15rem;
  border-radius: 0;
  border: none;
  border-left: 3px solid rgba(99, 102, 241, 0.55);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(24, 24, 27, 0.06);
}

html[data-theme='dark'] body.page-home .home-overview--fieldnotes .home-overview__prose {
  background: rgba(24, 24, 27, 0.45);
  border-left-color: rgba(129, 140, 252, 0.65);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

@media (min-width: 768px) {
  body.page-home .home-overview--fieldnotes .home-overview__prose {
    column-count: 2;
    column-gap: 2rem;
    column-fill: balance;
  }

  body.page-home .home-overview--fieldnotes .home-overview__prose p {
    break-inside: avoid;
    margin-bottom: 0;
  }

  body.page-home .home-overview--fieldnotes .home-overview__prose p + p {
    margin-top: 0;
  }
}

body.page-home .home-overview--fieldnotes .home-overview__grid {
  width: 100%;
  margin-top: 0.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(24, 24, 27, 0.12);
  gap: 0.65rem;
  display: grid;
  grid-template-columns: 1fr;
}

html[data-theme='dark'] body.page-home .home-overview--fieldnotes .home-overview__grid {
  border-top-color: rgba(255, 255, 255, 0.12);
}

@media (min-width: 640px) and (max-width: 1099px) {
  body.page-home .home-overview--fieldnotes .home-overview__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 0.85rem;
  }
}

@media (min-width: 1100px) {
  body.page-home .home-overview--fieldnotes .home-overview__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.7rem 0.75rem;
  }

  body.page-home .home-overview--fieldnotes .home-overview__grid > li:nth-child(12n + 1),
  body.page-home .home-overview--fieldnotes .home-overview__grid > li:nth-child(12n + 2),
  body.page-home .home-overview--fieldnotes .home-overview__grid > li:nth-child(12n + 3) {
    grid-column: span 2;
  }

  body.page-home .home-overview--fieldnotes .home-overview__grid > li:nth-child(12n + 4),
  body.page-home .home-overview--fieldnotes .home-overview__grid > li:nth-child(12n + 5) {
    grid-column: span 3;
  }

  body.page-home .home-overview--fieldnotes .home-overview__grid > li:nth-child(12n + 6),
  body.page-home .home-overview--fieldnotes .home-overview__grid > li:nth-child(12n + 7),
  body.page-home .home-overview--fieldnotes .home-overview__grid > li:nth-child(12n + 8) {
    grid-column: span 2;
  }

  body.page-home .home-overview--fieldnotes .home-overview__grid > li:nth-child(12n + 9),
  body.page-home .home-overview--fieldnotes .home-overview__grid > li:nth-child(12n + 10) {
    grid-column: span 3;
  }

  body.page-home .home-overview--fieldnotes .home-overview__grid > li:nth-child(12n + 11),
  body.page-home .home-overview--fieldnotes .home-overview__grid > li:nth-child(12n + 12) {
    grid-column: span 3;
  }
}

body.page-home .home-overview--fieldnotes .home-overview__card {
  border-radius: 0.2rem 1rem 1rem 0.2rem;
  border: 1px solid rgba(24, 24, 27, 0.08);
  border-top: 2px solid rgba(99, 102, 241, 0.35);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 2px 0 rgba(99, 102, 241, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.page-home .home-overview--fieldnotes .home-overview__grid > li:nth-child(even) .home-overview__card {
  border-top-color: rgba(14, 116, 144, 0.45);
  box-shadow: 0 2px 0 rgba(14, 116, 144, 0.12);
}

html[data-theme='dark'] body.page-home .home-overview--fieldnotes .home-overview__card {
  background: rgba(24, 24, 27, 0.72);
  border-color: rgba(255, 255, 255, 0.08);
  border-top-color: rgba(129, 140, 252, 0.4);
  box-shadow: 0 2px 0 rgba(99, 102, 241, 0.2);
}

html[data-theme='dark'] body.page-home .home-overview--fieldnotes .home-overview__grid > li:nth-child(even) .home-overview__card {
  border-top-color: rgba(45, 212, 191, 0.4);
  box-shadow: 0 2px 0 rgba(45, 212, 191, 0.15);
}

body.page-home .home-overview--fieldnotes .home-overview__card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.28);
  box-shadow: 0 10px 28px -14px rgba(99, 102, 241, 0.35);
}

body.page-home .home-overview--fieldnotes .home-overview__icon {
  border-radius: 999px;
  width: 2.35rem;
  height: 2.35rem;
}

html[dir='rtl'] body.page-home .home-overview--fieldnotes .home-overview__prose {
  border-left: none;
  border-right: 3px solid rgba(99, 102, 241, 0.55);
  padding-left: 0;
  padding-right: 1.15rem;
}

html[dir='rtl'][data-theme='dark'] body.page-home .home-overview--fieldnotes .home-overview__prose {
  border-right-color: rgba(129, 140, 252, 0.65);
}

@media (min-width: 640px) {
  /* First section after hero keeps full top padding */
  main > .layout-section-hero + .layout-section {
    padding-top: var(--section-pad-y);
  }
}

.layout-section-hero {
  padding-top: calc(4.25rem + var(--section-pad-y));
  padding-bottom: var(--section-pad-y);
  box-sizing: border-box;
  min-height: 0;
}

.layout-section--download {
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
}

/* Home: space between icon, title, and copy in download band */
#main #download .relative.layout-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--card-gap);
}

/* Home page only: left-align download strip (body.page-home on index.html) */
body.page-home #main #download .relative.layout-container {
  align-items: flex-start;
}

#main #download h2 {
  margin-top: 0;
}

.layout-footer {
  padding-top: calc(var(--section-pad-y) + var(--space-sm));
  padding-bottom: calc(var(--section-pad-y) + var(--space-sm));
  box-sizing: border-box;
  margin-top: 0;
}

footer.layout-footer .layout-container {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}

footer.layout-footer .layout-container > p.border-t {
  margin-top: 0 !important;
  padding-top: var(--card-gap);
}

footer.layout-footer nav[aria-label='Footer'] {
  row-gap: var(--space-xs);
  column-gap: var(--card-gap);
}

footer.layout-footer .footer-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

footer.layout-footer .footer-nav__icon {
  font-size: 0.8125rem;
  width: 1em;
  text-align: center;
  opacity: 0.88;
}

.layout-card {
  padding: var(--card-padding);
  border-radius: var(--card-radius);
  box-sizing: border-box;
}

.layout-grid {
  display: grid;
  gap: var(--card-gap);
  align-items: stretch;
}

/* Card grids: responsive columns without ad-hoc breakpoint utilities */
.layout-grid.layout-grid--autofit {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.layout-section > .layout-container > .layout-grid--autofit {
  width: 100%;
}

/* Row-wise equal height: stretch grid cells; do not override .flex rows (icon + text) */
.layout-grid > li,
.layout-grid > article {
  min-width: 0;
  min-height: 0;
}

.layout-grid > li.flex {
  height: 100%;
  align-self: stretch;
}

.layout-grid > li:not(.flex) {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.layout-grid > li:not(.flex) > .layout-card {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
}

.browse-topics__grid.layout-grid > li {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.browse-topics__grid.layout-grid > li > a.browse-topics__card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 100%;
  width: 100%;
}

.layout-grid > article.layout-card {
  height: 100%;
  min-height: 0;
}

.layout-grid > div.layout-card {
  height: 100%;
  min-height: 0;
}

/* Card titles: 16–18px, tight line-height */
#main article.layout-card h2.font-display.text-lg,
#main .layout-card h3.font-display.text-base {
  font-size: var(--card-title-size);
  line-height: var(--heading-lh);
}

#main .layout-card h2.font-display.text-xl {
  font-size: var(--card-title-size);
  line-height: var(--heading-lh);
}

#main .layout-card h3.font-display.text-lg {
  font-size: var(--card-title-size);
  line-height: var(--heading-lh);
}

#main {
  overflow-x: hidden;
  max-width: 100vw;
  box-sizing: border-box;
}

#main img,
#main video,
#main picture,
#main svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

#main figure {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.layout-container img,
.layout-container video,
.layout-container picture {
  max-width: 100%;
  height: auto;
}

#main h1 {
  font-size: var(--h1-size);
  line-height: 1.22;
  margin-top: var(--space-xs);
  margin-bottom: var(--space-sm) !important;
}

@media (min-width: 640px) {
  #main h1 {
    margin-top: var(--space-xs);
    margin-bottom: var(--space-sm) !important;
  }
}

#main h2 {
  font-size: var(--h2-size);
  line-height: var(--heading-lh);
  margin-top: var(--space-xs);
  margin-bottom: var(--space-xs) !important;
}

@media (min-width: 640px) {
  #main h2 {
    margin-top: var(--space-sm);
    margin-bottom: var(--space-xs) !important;
  }
}

/* Stack body text tight under headings */
#main h1 + *,
#main h2 + * {
  margin-top: 0 !important;
}

/* Titles immediately under section kickers */
#main p.text-xs.font-bold.uppercase.tracking-\[0\.22em\] + h1,
#main p.text-xs.font-bold.uppercase.tracking-\[0\.22em\] + h2 {
  margin-top: var(--section-intro-gap);
}

/* Card bodies: first heading uses card padding for top air */
#main .layout-card > h2:first-child {
  margin-top: 0;
}

#main .layout-card > h3:first-child {
  margin-top: 0;
  margin-bottom: var(--space-xs);
}

#main nav[aria-label='Breadcrumb'] {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

#main h3 {
  font-size: var(--h3-size);
  line-height: var(--heading-lh);
  margin-top: var(--space-xs);
  margin-bottom: var(--space-xs);
}

@media (min-width: 640px) {
  #main h3 {
    margin-top: var(--space-sm);
    margin-bottom: var(--space-xs);
  }
}

#main p {
  font-size: var(--body-size);
  line-height: var(--body-lh);
}

#main .text-base {
  font-size: var(--body-size);
  line-height: var(--body-lh);
}

#main p.text-xs,
#main .text-xs:not(.btn),
#main .type-label,
#main figcaption {
  font-size: 0.75rem;
  line-height: 1.5;
}

/* Body-sized prose in cards / inner pages (Tailwind text-sm + loose leading → system type) */
#main .text-sm.leading-6,
#main .text-sm.leading-7 {
  font-size: var(--body-size);
  line-height: var(--body-lh);
}

/* FAQ, compact rows, shared radius */
.faq-accordion {
  border-radius: var(--card-radius);
}

.faq-accordion details summary {
  padding: var(--space-sm) var(--space-md);
  gap: var(--space-md);
  align-items: center;
}

@media (min-width: 640px) {
  .faq-accordion details summary {
    padding: var(--space-md) var(--space-lg);
  }
}

.faq-accordion details > p.border-t {
  margin: 0;
  padding: var(--space-sm) var(--space-md) var(--space-md);
  font-size: var(--body-size);
  line-height: var(--body-lh);
}

@media (min-width: 640px) {
  .faq-accordion details > p.border-t {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
    padding-bottom: var(--space-md);
  }
}

body.inner-page #main {
  padding-top: 3.25rem;
  box-sizing: border-box;
}

/* How it works, Blogs, Fixes: room to read, not the ultra-tight home density */
body.page-longform {
  --section-pad-y: clamp(40px, 4.5vw, 60px);
  --section-content-gap: 24px;
  --section-intro-gap: 16px;
  --card-padding: 20px;
  --card-gap: 20px;
  --body-lh: 1.6;
}

@media (min-width: 640px) {
  body.page-longform {
    --section-content-gap: 24px;
    --card-padding: 20px;
    --card-gap: 20px;
  }
}

@media (min-width: 1024px) {
  body.page-longform {
    --section-content-gap: 24px;
  }
}

@media (max-width: 639px) {
  body.page-longform {
    --section-pad-y: clamp(32px, 6vw, 48px);
    --section-content-gap: 16px;
    --card-padding: 16px;
    --card-gap: 16px;
  }
}

body.page-longform .layout-section > .layout-container > .layout-grid + .layout-grid {
  margin-top: var(--space-lg);
}

@media (min-width: 640px) {
  body.page-longform .layout-section > .layout-container > .layout-grid + .layout-grid {
    margin-top: var(--space-xl);
  }
}

body.page-longform .layout-section > .layout-container > .section-intro.max-w-readable {
  max-width: min(100%, 42rem);
}

body.page-longform .layout-grid.layout-grid--autofit {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 272px), 1fr));
}

@media (min-width: 900px) {
  body.page-longform .layout-grid.layout-grid--autofit {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  }
}

body.page-longform .blog-lead-list,
body.page-longform .blog-page-toc {
  align-self: flex-start;
  width: 100%;
  max-width: min(100%, 42rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: var(--btn-height);
  height: auto;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  font-size: var(--btn-font-size);
  font-weight: 600;
  line-height: 1.25;
  box-sizing: border-box;
  border-radius: var(--card-radius);
  text-decoration: none;
  font-style: normal;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.btn i[class*='fa-'] {
  flex-shrink: 0;
  line-height: 1;
  width: 1.15em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  vertical-align: middle;
}

.btn--hero-solid {
  background: #fff;
  color: #18181b;
  border: 1px solid transparent;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.btn--hero-solid:hover {
  background: #f4f4f5;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.btn--hero-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fafafa;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn--hero-ghost:hover {
  border-color: rgba(129, 140, 248, 0.45);
  background: rgba(255, 255, 255, 0.1);
}

.btn--accent {
  min-height: var(--btn-height);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  font-size: var(--btn-font-size);
  font-weight: 700;
  background: #6366f1;
  color: #fff;
  border-radius: var(--card-radius);
  border: none;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.btn--accent:hover {
  background: #4f46e5;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  article.group:hover {
    transform: none !important;
  }
  .fixed-download-btn.at-section {
    transform: translateY(-50%);
  }
  .animate-ping {
    animation: none !important;
  }
}
#site-nav {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 9, 11, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
#site-nav.nav-scrolled {
  border-bottom-color: rgba(24, 24, 27, 0.08);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(24, 24, 27, 0.04), 0 20px 50px -28px rgba(24, 24, 27, 0.12);
}
#site-nav .brand-wordmark {
  color: #fafafa;
}
#site-nav.nav-scrolled .brand-wordmark {
  color: #18181b;
}
#site-nav .brand-mark {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
#site-nav.nav-scrolled .brand-mark {
  background: #fff;
  border-color: rgba(24, 24, 27, 0.08);
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.05);
}
#site-nav .nav-link {
  color: rgba(255, 255, 255, 0.72);
}
#site-nav .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
#site-nav.nav-scrolled .nav-link {
  color: #52525b;
}
#site-nav.nav-scrolled .nav-link:hover {
  color: #18181b;
  background: rgba(99, 102, 241, 0.08);
}
#site-nav .nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--btn-height);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  font-size: var(--btn-font-size);
  font-weight: 600;
  line-height: 1.25;
  box-sizing: border-box;
  border-radius: var(--card-radius);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(34, 211, 238, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
}
#site-nav .nav-cta:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.55), rgba(34, 211, 238, 0.35));
}
#site-nav.nav-scrolled .nav-cta {
  background: #18181b;
  border-color: transparent;
  color: #fff;
}
#site-nav.nav-scrolled .nav-cta:hover {
  background: #27272a;
}
#site-nav.nav-scrolled .nav-primary {
  border-top-color: rgba(24, 24, 27, 0.1);
}
/* Inner pages: light header on load (no dark hero under nav) */
body.inner-page #site-nav {
  border-bottom-color: rgba(24, 24, 27, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(24, 24, 27, 0.04), 0 20px 50px -28px rgba(24, 24, 27, 0.12);
}
body.inner-page #site-nav .brand-wordmark {
  color: #18181b;
}
body.inner-page #site-nav .brand-mark {
  background: #fff;
  border-color: rgba(24, 24, 27, 0.08);
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.05);
}
body.inner-page #site-nav .nav-link {
  color: #52525b;
}
body.inner-page #site-nav .nav-link:hover {
  color: #18181b;
  background: rgba(99, 102, 241, 0.08);
}
body.inner-page #site-nav .nav-cta {
  background: #18181b;
  border-color: transparent;
  color: #fff;
}
body.inner-page #site-nav .nav-cta:hover {
  background: #27272a;
}
body.inner-page #site-nav .nav-primary {
  border-top-color: rgba(24, 24, 27, 0.1);
}
#site-nav .nav-link.nav-link-active {
  color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
}
body.inner-page #site-nav .nav-link.nav-link-active {
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.12);
}
#site-nav.nav-scrolled .nav-link.nav-link-active {
  color: #4f46e5;
}
.back-to-top {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 60;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #18181b;
  border: 1px solid rgba(24, 24, 27, 0.08);
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(24, 24, 27, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, box-shadow 0.2s, border-color 0.2s;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 12px 36px rgba(99, 102, 241, 0.2);
}
.back-to-top:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 3px;
}
.fixed-download-btn {
  position: fixed;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 55;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.65rem 0.5rem;
  border-radius: 9999px;
  background: linear-gradient(165deg, #6366f1 0%, #4f46e5 45%, #312e81 100%);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 40px rgba(79, 70, 229, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, filter 0.2s;
}
.fixed-download-btn i {
  font-size: 1.05rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}
.fixed-download-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 16px 48px rgba(79, 70, 229, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}
.fixed-download-btn.at-section {
  transform: translateY(-50%) scale(1.07);
}
.fixed-download-btn:focus-visible {
  outline: 2px solid #a5b4fc;
  outline-offset: 3px;
}
@media (max-width: 640px) {
  .fixed-download-btn span {
    display: none;
  }
  .fixed-download-btn {
    padding: 0.75rem;
    min-width: 3rem;
  }
}
details summary::-webkit-details-marker {
  display: none;
}
.media-pad {
  background: linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
  padding: var(--card-padding);
  border-radius: var(--card-radius);
  border: 1px solid rgba(24, 24, 27, 0.06);
}
.media-pad--hero {
  padding: var(--card-padding);
}
.media-pad img {
  display: block;
  max-width: 100%;
  border-radius: var(--card-radius);
}
.media-pad--hero img {
  height: auto;
  border-radius: var(--card-radius);
}
.media-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--card-radius);
  background: linear-gradient(145deg, #eef2ff 0%, #e0e7ff 50%, #cffafe 100%);
  border: 1px solid rgba(99, 102, 241, 0.18);
  margin-bottom: var(--space-sm);
  line-height: 0;
}
.media-icon img {
  width: 2.25rem;
  height: 2.25rem;
}

/* Program page: main window + optional per-feature photos (images/program/*.jpg) */
.program-feature-card {
  padding: 0;
}
.program-feature-card__body {
  padding: var(--card-padding);
  position: relative;
}
.program-shot {
  position: relative;
  border-bottom: 1px solid rgba(24, 24, 27, 0.09);
  background: linear-gradient(160deg, #eef2ff 0%, #f4f4f5 45%, #ecfeff 100%);
}
html[data-theme='dark'] .program-shot {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.14) 0%, rgba(24, 24, 27, 0.55) 55%, rgba(6, 182, 212, 0.08) 100%);
}
.program-shot__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(11rem, 28vh);
  object-fit: cover;
  object-position: center top;
}
.program-page-shot__frame {
  overflow: hidden;
  border-radius: var(--card-radius);
  line-height: 0;
  box-shadow:
    0 1px 0 rgba(24, 24, 27, 0.04),
    0 18px 50px -24px rgba(24, 24, 27, 0.14);
}
.program-page-shot__frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(22rem, 45vh);
  object-fit: cover;
  object-position: center top;
}
html[data-theme='dark'] .program-page-shot__frame {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 20px 50px -24px rgba(0, 0, 0, 0.45);
}

/* Hero screenshot frame : flat, no checker pattern */
.hero-checker-frame {
  display: block;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
  line-height: 0;
  background: transparent;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 16px 48px -24px rgba(0, 0, 0, 0.55);
}
.hero-checker-frame img {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  vertical-align: top;
}

/* Full screenshot at column width : no max-height cap (caps caused perceived crop / small preview) */
.hero-screenshot-img {
  display: block;
  max-height: none;
  width: 100%;
  height: auto;
}
.glass-hero-panel {
  border-radius: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  box-shadow: 0 32px 100px -32px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.glass-hero-inner {
  border-radius: 1.25rem;
  background: #fff;
  padding: 1.125rem;
  box-shadow: 0 24px 60px -20px rgba(24, 24, 27, 0.2);
}
.timeline-line::before {
  content: '';
  position: absolute;
  left: 1.125rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(180deg, #6366f1, rgba(99, 102, 241, 0.12), rgba(34, 211, 238, 0.35));
  border-radius: 2px;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  transition: color 0.2s, background 0.2s;
}

.nav-link__icon {
  font-size: 0.8125rem;
  width: 1em;
  text-align: center;
  opacity: 0.92;
}
.code-inline {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 0.375rem;
  background: rgba(24, 24, 27, 0.06);
  color: #3f3f46;
}
.code-inline--on-dark {
  background: rgba(255, 255, 255, 0.1);
  color: #e4e4e7;
}

/* ========== Theme: light / dark ========== */
html[data-theme='dark'] {
  color-scheme: dark;
}
html[data-theme='light'] {
  color-scheme: light;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.lang-switch__link {
  color: #71717a;
  text-decoration: none;
  padding: 0.2rem 0.35rem;
  border-radius: 0.375rem;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.lang-switch__link:hover {
  color: #3f3f46;
}
.lang-switch__link--active,
.lang-switch__link[aria-current='true'] {
  color: #6366f1;
}
.lang-switch__sep {
  color: #a1a1aa;
  user-select: none;
}
html[data-theme='dark'] #site-nav .lang-switch__link {
  color: rgba(255, 255, 255, 0.55);
}
html[data-theme='dark'] #site-nav .lang-switch__link:hover {
  color: rgba(255, 255, 255, 0.9);
}
html[data-theme='dark'] #site-nav .lang-switch__link--active,
html[data-theme='dark'] #site-nav .lang-switch__link[aria-current='true'] {
  color: #a5b4fc;
}
html[data-theme='dark'] #site-nav .lang-switch__sep {
  color: rgba(255, 255, 255, 0.35);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--btn-height);
  height: var(--btn-height);
  min-width: var(--btn-height);
  padding: 0;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}
.theme-toggle:focus-visible {
  outline: 2px solid #a5b4fc;
  outline-offset: 2px;
}
.theme-toggle:active {
  transform: scale(0.96);
}
.theme-toggle__icon {
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
}
.theme-toggle__icon--sun {
  display: none;
}
.theme-toggle__icon--moon {
  display: block;
}
html[data-theme='light'] .theme-toggle__icon--sun {
  display: block;
}
html[data-theme='light'] .theme-toggle__icon--moon {
  display: none;
}
html[data-theme='light'] .theme-toggle {
  border-color: rgba(24, 24, 27, 0.12);
  background: rgba(24, 24, 27, 0.04);
  color: #3f3f46;
}
html[data-theme='light'] .theme-toggle:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.35);
  color: #18181b;
}
html[data-theme='dark'] body.inner-page .theme-toggle {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
}
html[data-theme='dark'] body.inner-page .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

@media (prefers-reduced-motion: no-preference) {
  html.theme-is-transitioning body,
  html.theme-is-transitioning #site-nav,
  html.theme-is-transitioning #main,
  html.theme-is-transitioning footer,
  html.theme-is-transitioning .layout-section,
  html.theme-is-transitioning .layout-section-hero,
  html.theme-is-transitioning #download,
  html.theme-is-transitioning .theme-home-hero .absolute {
    transition:
      background-color 0.35s ease,
      border-color 0.35s ease,
      color 0.3s ease,
      box-shadow 0.35s ease;
  }
}

/* Light theme: home shell + shared chrome */
html[data-theme='light'] #site-nav {
  border-bottom-color: rgba(24, 24, 27, 0.08) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
html[data-theme='light'] #site-nav.nav-scrolled {
  box-shadow: 0 1px 0 rgba(24, 24, 27, 0.04), 0 20px 50px -28px rgba(24, 24, 27, 0.12);
}
html[data-theme='light'] #site-nav .brand-wordmark {
  color: #18181b !important;
}
html[data-theme='light'] #site-nav .brand-mark {
  background: #fff !important;
  border-color: rgba(24, 24, 27, 0.08) !important;
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.05) !important;
}
html[data-theme='light'] #site-nav .nav-link {
  color: #52525b !important;
}
html[data-theme='light'] #site-nav .nav-link:hover {
  color: #18181b !important;
  background: rgba(99, 102, 241, 0.08) !important;
}
html[data-theme='light'] #site-nav .nav-cta {
  background: #18181b !important;
  border-color: transparent !important;
  color: #fff !important;
}
html[data-theme='light'] #site-nav .nav-cta:hover {
  background: #27272a !important;
}
html[data-theme='light'] #site-nav .nav-primary {
  border-top-color: rgba(24, 24, 27, 0.1) !important;
}
html[data-theme='light'] #site-nav .nav-link.nav-link-active {
  color: #4f46e5 !important;
  background: rgba(99, 102, 241, 0.12) !important;
}

html[data-theme='light'] body.bg-zinc-950 {
  background-color: #f4f4f5 !important;
  color: #52525b;
}

html[data-theme='light'] .theme-home-hero > .absolute.inset-0:first-child {
  background-color: #f1f5f9 !important;
}
html[data-theme='light'] .theme-home-hero .pointer-events-none.absolute.rounded-full {
  opacity: 0.45;
}
html[data-theme='light'] .theme-home-hero .text-white {
  color: #18181b !important;
}
html[data-theme='light'] .theme-home-hero .text-zinc-400,
html[data-theme='light'] .theme-home-hero .text-zinc-500 {
  color: #52525b !important;
}
html[data-theme='light'] .theme-home-hero [class*='border-white'] {
  border-color: rgba(24, 24, 27, 0.1) !important;
}
html[data-theme='light'] .theme-home-hero p.inline-flex.rounded-full.border {
  border-color: rgba(99, 102, 241, 0.28) !important;
  background: rgba(99, 102, 241, 0.1) !important;
  color: #4338ca !important;
}
html[data-theme='light'] .theme-home-hero .text-indigo-200 {
  color: #4338ca !important;
}
html[data-theme='light'] .btn--hero-ghost {
  background: rgba(24, 24, 27, 0.04) !important;
  color: #27272a !important;
  border-color: rgba(24, 24, 27, 0.12) !important;
}
html[data-theme='light'] .btn--hero-ghost:hover {
  border-color: rgba(99, 102, 241, 0.4) !important;
  background: rgba(99, 102, 241, 0.08) !important;
}
html[data-theme='light'] .hero-checker-frame {
  background: transparent;
  box-shadow: 0 0 0 1px rgba(24, 24, 27, 0.1), 0 16px 48px -24px rgba(24, 24, 27, 0.12);
}
html[data-theme='light'] .theme-home-hero .code-inline {
  background: rgba(24, 24, 27, 0.06);
  color: #52525b;
}
html[data-theme='light'] .theme-home-hero li .fa-check {
  color: #0891b2 !important;
}

html[data-theme='light'] #download > .absolute.inset-0 {
  background: linear-gradient(135deg, #e8eaff 0%, #ede9fe 45%, #f4f4f5 100%) !important;
}
html[data-theme='light'] #download [class*='border-white'] {
  border-color: rgba(24, 24, 27, 0.1) !important;
}
html[data-theme='light'] #download span[class*='bg-white'] {
  background: rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 12px 40px -20px rgba(99, 102, 241, 0.25) !important;
}
html[data-theme='light'] #download .text-white,
html[data-theme='light'] #download .font-semibold.text-white {
  color: #18181b !important;
}
html[data-theme='light'] #download p[class*='text-indigo-100'] {
  color: #3f3f46 !important;
}
html[data-theme='light'] #download p[class*='text-indigo-200'] {
  color: #71717a !important;
}
html[data-theme='light'] #download {
  border-top-color: rgba(24, 24, 27, 0.08) !important;
}

html[data-theme='light'] footer.layout-footer {
  background-color: #f4f4f5 !important;
  border-top-color: rgba(24, 24, 27, 0.1) !important;
  color: #52525b !important;
}
html[data-theme='light'] footer .text-white {
  color: #18181b !important;
}
html[data-theme='light'] footer .border-white\/10,
html[data-theme='light'] footer [class*='border-white'] {
  border-color: rgba(24, 24, 27, 0.1) !important;
}
html[data-theme='light'] footer .bg-white\/5 {
  background: rgba(255, 255, 255, 0.9) !important;
}

/* Dark theme: inner pages */
html[data-theme='dark'] body.inner-page {
  background-color: #09090b !important;
  color: #a1a1aa !important;
}
html[data-theme='dark'] body.inner-page .text-ink-900 {
  color: #fafafa !important;
}
html[data-theme='dark'] body.inner-page .text-ink-600 {
  color: #a1a1aa !important;
}
html[data-theme='dark'] body.inner-page .text-ink-500 {
  color: #a1a1aa !important;
}
html[data-theme='dark'] body.inner-page .text-ink-400 {
  color: #71717a !important;
}
html[data-theme='dark'] body.inner-page .bg-page {
  background-color: #18181b !important;
}
html[data-theme='dark'] body.inner-page .bg-surface {
  background-color: #27272a !important;
}
html[data-theme='dark'] body.inner-page .border-line {
  border-color: rgba(255, 255, 255, 0.1) !important;
}
html[data-theme='dark'] body.inner-page #site-nav {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(9, 9, 11, 0.82) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: none;
}
html[data-theme='dark'] body.inner-page #site-nav.nav-scrolled {
  background: rgba(24, 24, 27, 0.94) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35), 0 20px 50px -28px rgba(0, 0, 0, 0.45);
}
html[data-theme='dark'] body.inner-page #site-nav .brand-wordmark {
  color: #fafafa !important;
}
html[data-theme='dark'] body.inner-page #site-nav .brand-mark {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme='dark'] body.inner-page #site-nav .nav-link {
  color: rgba(255, 255, 255, 0.72) !important;
}
html[data-theme='dark'] body.inner-page #site-nav .nav-link:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}
html[data-theme='dark'] body.inner-page #site-nav .nav-cta {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.55), rgba(34, 211, 238, 0.3)) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  color: #fff !important;
}
html[data-theme='dark'] body.inner-page #site-nav .nav-cta:hover {
  filter: brightness(1.08);
}
html[data-theme='dark'] body.inner-page #site-nav .nav-primary {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}
html[data-theme='dark'] body.inner-page #site-nav .nav-link.nav-link-active {
  color: #a5b4fc !important;
  background: rgba(99, 102, 241, 0.18) !important;
}
html[data-theme='dark'] body.inner-page .code-inline {
  background: rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
}
html[data-theme='dark'] body.inner-page .media-pad {
  background: linear-gradient(180deg, #27272a 0%, #18181b 100%);
  border-color: rgba(255, 255, 255, 0.08);
}
html[data-theme='dark'] body.inner-page details.group[open] {
  background: rgba(99, 102, 241, 0.1) !important;
}
html[data-theme='dark'] body.inner-page details summary {
  color: #fafafa !important;
}
html[data-theme='dark'] body.inner-page details .text-ink-600,
html[data-theme='dark'] body.inner-page details .text-ink-800 {
  color: #d4d4d8 !important;
}
html[data-theme='dark'] footer.layout-footer {
  background-color: #09090b !important;
  border-top-color: rgba(255, 255, 255, 0.1) !important;
  color: #a1a1aa !important;
}
html[data-theme='dark'] footer .text-zinc-600 {
  color: #71717a !important;
}
html[data-theme='dark'] footer [class*='border-white'] {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ========== Home: suggested reading path & guide map heads ========== */
.reading-path__intro {
  max-width: 36rem;
  margin-bottom: 0;
  padding-bottom: var(--card-gap);
  border-bottom: 1px solid rgba(24, 24, 27, 0.09);
}
html[data-theme='light'] .reading-path__intro {
  border-bottom-color: rgba(24, 24, 27, 0.08);
}
.home-guide-head {
  margin-bottom: 0;
  padding-bottom: var(--section-intro-gap);
  border-bottom: 1px solid rgba(24, 24, 27, 0.09);
}
html[data-theme='light'] .home-guide-head {
  border-bottom-color: rgba(24, 24, 27, 0.08);
}
.home-guide-head.section-intro {
  gap: var(--section-intro-gap);
}
.home-guide-head .reading-path__lede {
  max-width: 36rem;
  margin-left: 0;
  margin-right: auto;
}
.home-guide-head--compact {
  padding-bottom: var(--section-intro-gap);
}
.home-guide-head--compact .reading-path__title {
  margin-bottom: 0 !important;
}
.browse-topics__grid {
  list-style: none;
  margin: 0;
}
.browse-topics .browse-topics__card.layout-card {
  padding: var(--card-padding);
}
.browse-topics__blurb {
  max-width: 20rem;
}

.browse-topics .browse-topics__icon {
  width: 1.75rem;
  height: 1.75rem;
}

.browse-topics .browse-topics__icon i {
  font-size: 0.75rem;
}

/* Home, “Jump in”: split intro + numbered rail rows (non-traditional browse block) */
body.page-home #main > section.browse-topics.browse-topics--rail {
  background: linear-gradient(128deg, rgba(99, 102, 241, 0.07) 0%, transparent 42%),
    linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
  border-bottom-color: rgba(24, 24, 27, 0.06);
}

html[data-theme='dark'] body.page-home #main > section.browse-topics.browse-topics--rail {
  background: linear-gradient(128deg, rgba(99, 102, 241, 0.11) 0%, transparent 48%),
    linear-gradient(180deg, #141416 0%, #18181b 100%);
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

body.page-home .browse-topics--rail .browse-topics__shell {
  display: grid;
  gap: 1.75rem;
  align-items: start;
}

@media (min-width: 960px) {
  body.page-home .browse-topics--rail .browse-topics__shell {
    grid-template-columns: minmax(0, 0.4fr) minmax(0, 1fr);
    gap: 2rem 2.75rem;
  }

  body.page-home .browse-topics--rail .browse-topics__intro {
    position: sticky;
    top: 5.75rem;
  }
}

body.page-home .browse-topics--rail .browse-topics__intro.home-guide-head {
  border-bottom: none;
  padding-bottom: 0;
  max-width: none;
}

body.page-home .browse-topics--rail .reading-path__eyebrow {
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.32em;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.38);
  background: linear-gradient(118deg, rgba(99, 102, 241, 0.14), rgba(34, 211, 238, 0.1));
  color: #4338ca;
}

html[data-theme='dark'] body.page-home .browse-topics--rail .reading-path__eyebrow {
  color: #c7d2fe;
  border-color: rgba(165, 180, 252, 0.35);
  background: linear-gradient(118deg, rgba(99, 102, 241, 0.22), rgba(34, 211, 238, 0.08));
}

body.page-home .browse-topics--rail #browse-heading {
  margin-top: 0.85rem;
  margin-bottom: 0 !important;
  font-size: clamp(1.9rem, 4.5vw, 3.05rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  background: linear-gradient(102deg, #18181b 8%, #4f46e5 45%, #0e7490 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme='dark'] body.page-home .browse-topics--rail #browse-heading {
  background: linear-gradient(102deg, #fafafa 0%, #a5b4fc 38%, #5eead4 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.page-home .browse-topics--rail .reading-path__lede {
  margin-top: 1.1rem;
  max-width: 30rem;
  padding: 1.05rem 1.15rem 1.1rem 1.2rem;
  border-radius: 0 1.2rem 1.2rem 0;
  border-left: 4px solid #6366f1;
  background: rgba(99, 102, 241, 0.07);
  font-size: 0.9375rem;
  line-height: 1.68;
}

html[data-theme='dark'] body.page-home .browse-topics--rail .reading-path__lede {
  background: rgba(99, 102, 241, 0.12);
  border-left-color: #818cf8;
  color: rgb(212 212 216);
}

body.page-home .browse-topics--rail .browse-topics__grid.layout-grid {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  counter-reset: browse-rail;
}

body.page-home .browse-topics--rail .browse-topics__grid > li {
  counter-increment: browse-rail;
}

body.page-home .browse-topics--rail .browse-topics__grid > li > a.browse-topics__card {
  display: grid;
  grid-template-columns: 2.65rem 2.5rem minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 0.65rem;
  row-gap: 0.15rem;
  min-height: 0;
  height: auto;
  padding: 0.95rem 1rem 0.95rem 0.85rem;
  text-align: left;
  border-radius: 0 1.05rem 1.05rem 0;
  border: 1px solid rgba(24, 24, 27, 0.09);
  border-left: 3px solid #6366f1;
  box-shadow: 0 2px 18px -10px rgba(99, 102, 241, 0.25);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.96) 0%, rgba(250, 250, 250, 0.99) 100%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

html[data-theme='dark'] body.page-home .browse-topics--rail .browse-topics__grid > li > a.browse-topics__card {
  background: linear-gradient(100deg, rgba(24, 24, 27, 0.92) 0%, rgba(24, 24, 27, 0.68) 100%);
  border-color: rgba(255, 255, 255, 0.09);
  border-left-color: #818cf8;
  box-shadow: 0 2px 22px -10px rgba(0, 0, 0, 0.45);
}

body.page-home .browse-topics--rail .browse-topics__grid > li:nth-child(2) > a {
  border-left-color: #0e7490;
}
body.page-home .browse-topics--rail .browse-topics__grid > li:nth-child(3) > a {
  border-left-color: #7c3aed;
}
body.page-home .browse-topics--rail .browse-topics__grid > li:nth-child(4) > a {
  border-left-color: #059669;
}
body.page-home .browse-topics--rail .browse-topics__grid > li:nth-child(5) > a {
  border-left-color: #d97706;
}

body.page-home .browse-topics--rail .browse-topics__grid > li > a:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 28px -12px rgba(99, 102, 241, 0.35);
}

body.page-home .browse-topics--rail .browse-topics__card::before {
  content: counter(browse-rail, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1 / span 2;
  justify-self: center;
  align-self: center;
  font-family: Sora, system-ui, sans-serif;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: rgba(99, 102, 241, 0.28);
}

html[data-theme='dark'] body.page-home .browse-topics--rail .browse-topics__card::before {
  color: rgba(165, 180, 252, 0.35);
}

body.page-home .browse-topics--rail .browse-topics__icon {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.55rem;
}

body.page-home .browse-topics--rail .browse-topics__name {
  grid-column: 3;
  grid-row: 1;
  margin-top: 0 !important;
  font-size: 1.05rem;
}

body.page-home .browse-topics--rail .browse-topics__blurb {
  grid-column: 3;
  grid-row: 2;
  max-width: none;
  margin-top: 0 !important;
  font-size: 0.8125rem;
  line-height: 1.45;
}

body.page-home .browse-topics--rail .browse-topics__go {
  grid-column: 4;
  grid-row: 1 / span 2;
  align-self: center;
  margin-top: 0 !important;
}

@media (max-width: 719px) {
  body.page-home .browse-topics--rail .browse-topics__grid > li > a.browse-topics__card {
    grid-template-columns: 2.35rem 2.35rem minmax(0, 1fr) auto;
    padding: 0.85rem 0.75rem 0.85rem 0.65rem;
  }

  body.page-home .browse-topics--rail .browse-topics__card::before {
    font-size: 1.05rem;
  }

  body.page-home .browse-topics--rail .browse-topics__name {
    font-size: 0.98rem;
  }
}

html[dir='rtl'] body.page-home .browse-topics--rail .browse-topics__grid > li > a.browse-topics__card {
  border-radius: 1.05rem 0 0 1.05rem;
  border-left: 1px solid rgba(24, 24, 27, 0.09);
  border-right-width: 3px;
  border-right-style: solid;
  border-right-color: #6366f1;
}

html[dir='rtl'] body.page-home .browse-topics--rail .browse-topics__grid > li:nth-child(2) > a {
  border-right-color: #0e7490;
}
html[dir='rtl'] body.page-home .browse-topics--rail .browse-topics__grid > li:nth-child(3) > a {
  border-right-color: #7c3aed;
}
html[dir='rtl'] body.page-home .browse-topics--rail .browse-topics__grid > li:nth-child(4) > a {
  border-right-color: #059669;
}
html[dir='rtl'] body.page-home .browse-topics--rail .browse-topics__grid > li:nth-child(5) > a {
  border-right-color: #d97706;
}

html[dir='rtl'] body.page-home .browse-topics--rail .browse-topics__grid > li > a:hover {
  transform: translateX(-4px);
}

html[dir='rtl'] body.page-home .browse-topics--rail .reading-path__lede {
  border-radius: 1.2rem 0 0 1.2rem;
  border-left: none;
  border-right: 4px solid #6366f1;
}

html[dir='rtl'][data-theme='dark'] body.page-home .browse-topics--rail .reading-path__lede {
  border-right-color: #818cf8;
}

.reading-path__list {
  list-style: none;
  margin: var(--card-gap) 0 0;
  padding: 0;
  display: grid;
  gap: var(--card-gap);
  grid-template-columns: 1fr;
  align-items: stretch;
}
@media (min-width: 640px) and (max-width: 1279px) {
  .reading-path__list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .reading-path__list > .reading-path__step:nth-child(1),
  .reading-path__list > .reading-path__step:nth-child(2),
  .reading-path__list > .reading-path__step:nth-child(3) {
    grid-column: span 2;
  }
  .reading-path__list > .reading-path__step:nth-child(4),
  .reading-path__list > .reading-path__step:nth-child(5) {
    grid-column: span 3;
  }
}
@media (min-width: 1280px) {
  .reading-path__list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.reading-path__step {
  display: flex;
  flex-direction: row;
  gap: var(--card-gap);
  align-items: flex-start;
  margin: 0;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}
.reading-path__num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: Sora, system-ui, sans-serif;
  line-height: 1;
  color: #fff;
  background: linear-gradient(145deg, #6366f1 0%, #7c3aed 52%, #4f46e5 100%);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.32);
}
.reading-path__body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.reading-path__link {
  display: block;
  text-decoration: none;
  line-height: 1.3;
}
.reading-path__eyebrow {
  margin-top: 0;
  margin-bottom: 0;
}

/* Section kickers: single step to heading (avoid kicker margin + heading margin doubling) */
#main p.text-xs.font-bold.uppercase.tracking-\[0\.22em\] {
  margin-top: 0;
  margin-bottom: 0;
}

#main .section-intro > p.text-xs.font-bold.uppercase.tracking-\[0\.22em\] {
  margin-bottom: 0;
}

#main article.layout-card.flex.flex-col > p.text-xs.font-bold.uppercase {
  margin-top: 0;
  margin-bottom: var(--space-md);
}

#main .reading-path__title {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

#main .home-guide-head:not(.section-intro) .reading-path__title {
  margin-top: var(--space-sm) !important;
  margin-bottom: var(--card-gap) !important;
}

#main .reading-path__lede {
  font-size: var(--body-size);
  line-height: var(--body-lh);
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
#main .reading-path__text {
  font-size: var(--body-size);
  line-height: var(--body-lh);
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Home hero: 20px column gap, compact vertical rhythm (8px grid) */
.theme-home-hero .relative.layout-container.grid {
  gap: var(--card-gap) !important;
}
.theme-home-hero #hero-heading {
  font-size: clamp(1.625rem, 2vw + 0.85rem, 2rem);
  line-height: 1.2;
}
@media (min-width: 640px) {
  .theme-home-hero #hero-heading {
    font-size: var(--h1-size);
  }
}
.theme-home-hero p.max-w-lg.text-zinc-400 {
  font-size: var(--body-size);
  line-height: var(--body-lh);
}
.theme-home-hero ul.text-sm {
  font-size: var(--body-size);
  line-height: var(--body-lh);
}

#main .reading-path__link.text-lg {
  font-size: var(--h3-size);
  line-height: 1.3;
}

@media (prefers-reduced-motion: reduce) {
  html.theme-is-transitioning body,
  html.theme-is-transitioning #site-nav,
  html.theme-is-transitioning #main,
  html.theme-is-transitioning footer {
    transition: none !important;
  }
}

/* ========== Hebrew / RTL (Il/) ========== */
html[lang='he'],
html[dir='rtl'] {
  direction: rtl;
}

body.locale-rtl,
html[dir='rtl'] body {
  font-family: Heebo, 'DM Sans', system-ui, sans-serif;
}

html[dir='rtl'] .sr-only:focus {
  left: auto;
  right: 1rem;
}

html[dir='rtl'] .fixed-download-btn {
  right: auto;
  left: 0.75rem;
}

html[dir='rtl'] .back-to-top {
  left: auto;
  right: 1.25rem;
}

html[dir='rtl'] .site-lang-switch__panel {
  right: auto;
  left: 0;
}

html[dir='rtl'] .border-l-2 {
  border-left-width: 0;
  border-right-width: 2px;
}

html[dir='rtl'] .pl-4,
html[dir='rtl'] .pl-5,
html[dir='rtl'] .pl-7 {
  padding-left: 0;
}

html[dir='rtl'] .pl-4 {
  padding-right: 1rem;
}

html[dir='rtl'] .pl-5 {
  padding-right: 1.25rem;
}

html[dir='rtl'] .pl-7 {
  padding-right: 1.75rem;
}

html[dir='rtl'] .blog-article__back .fa-arrow-left::before {
  content: '\f061';
}

html[dir='rtl'] .browse-topics__go .fa-arrow-right,
html[dir='rtl'] .fa-arrow-right.text-xs {
  transform: scaleX(-1);
}

html[dir='rtl'] details summary.flex {
  text-align: right;
}

html[dir='rtl'] .hero-checker-frame,
html[dir='rtl'] .program-page-shot__frame {
  direction: ltr;
}

/* Language switcher (navbar; hrefs filled by main.js for relative locale homes) */
#site-nav .site-lang-switch {
  flex-shrink: 0;
}
.site-lang-switch {
  position: relative;
}
.site-lang-switch__summary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  cursor: pointer;
  border-radius: 0.5rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}
.site-lang-switch__summary::-webkit-details-marker {
  display: none;
}
.site-lang-switch__summary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.site-lang-switch__current {
  font-weight: 700;
  letter-spacing: 0.06em;
}
.site-lang-switch__caret {
  font-size: 0.5rem;
  opacity: 0.65;
  transition: transform 0.2s ease;
}
.site-lang-switch[open] .site-lang-switch__caret {
  transform: rotate(180deg);
}
.site-lang-switch__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 60;
  min-width: 10.5rem;
  max-height: min(70vh, 22rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c0c14;
  padding: 0.25rem;
  box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.55);
}
.site-lang-switch__nav {
  display: flex;
  flex-direction: column;
  touch-action: pan-y;
}
.site-lang-switch__link {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #a1a1aa;
  border-radius: 0.45rem;
  text-decoration: none;
}
.site-lang-switch__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.site-lang-switch__link--active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
html[data-theme='light'] .site-lang-switch__summary {
  color: #3f3f46;
  border-color: rgba(24, 24, 27, 0.12);
  background: rgba(255, 255, 255, 0.85);
}
html[data-theme='light'] .site-lang-switch__panel {
  background: #fff;
  border-color: rgba(24, 24, 27, 0.1);
  box-shadow: 0 12px 40px -12px rgba(24, 24, 27, 0.2);
}
html[data-theme='light'] .site-lang-switch__link {
  color: #52525b;
}
html[data-theme='light'] .site-lang-switch__link--active {
  color: #18181b;
  background: #eef2ff;
}

/* Hindi (Devanagari) typography */
html[data-lang='hi'] body {
  font-family: 'Noto Sans Devanagari', 'DM Sans', system-ui, sans-serif;
}
html[data-lang='hi'] .font-display {
  font-family: 'Noto Sans Devanagari', Sora, system-ui, sans-serif;
}

/* ========== Blog index & article pages ========== */
.blog-index-grid {
  display: grid;
  gap: var(--space-lg);
  width: 100%;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .blog-index-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.blog-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.blog-card__media-link {
  display: block;
  text-decoration: none;
}

.blog-card__figure {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  background: #e4e4e7;
}

html[data-theme='dark'] .blog-card__figure {
  background: #27272a;
}

.blog-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.blog-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: var(--card-padding);
  gap: var(--space-xs);
}

.blog-card__title {
  margin: 0;
  font-family: Sora, system-ui, sans-serif;
  font-size: var(--card-title-size);
  font-weight: 600;
  line-height: var(--heading-lh);
}

.blog-card__title a {
  color: #18181b;
  text-decoration: none;
}

.blog-card__title a:hover {
  color: #6366f1;
}

html[data-theme='dark'] .blog-card__title a {
  color: #fafafa;
}

html[data-theme='dark'] .blog-card__title a:hover {
  color: #a5b4fc;
}

.blog-card__excerpt {
  flex: 1;
  margin: 0;
  font-size: var(--body-size);
  line-height: var(--body-lh);
}

.blog-card__read-more {
  margin-top: var(--space-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #6366f1;
  text-decoration: none;
}

.blog-card__read-more:hover {
  color: #4f46e5;
}

.blog-index-toc {
  align-self: stretch;
  width: 100%;
  max-width: min(100%, 40rem);
  margin-left: auto;
  margin-right: auto;
}

body.page-blog-article .blog-article__header {
  margin-left: auto;
  margin-right: auto;
  max-width: min(100%, 42rem);
  width: 100%;
  text-align: center;
}

/* Legacy blog index (locales without .blog-index-reading wrapper) */
body.page-blog-index #blogs .layout-container > .section-intro.max-w-readable {
  text-align: left;
  max-width: min(100%, 40rem);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

body.page-blog-index #blogs .layout-container > .section-intro.max-w-readable p {
  line-height: 1.65;
}

body.page-blog-index #blogs .layout-container > .section-intro.max-w-readable p.text-base {
  line-height: 1.7;
  margin-bottom: 1rem;
}

body.page-blog-index #blogs .layout-container > .blog-lead-list:not(.blog-index-reading__list) {
  max-width: min(100%, 40rem);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  line-height: 1.65;
  text-align: left;
}

body.page-blog-index #blogs .layout-container > nav.blog-index-toc:not(.blog-index-reading__toc) {
  align-self: stretch;
  max-width: min(100%, 40rem);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  padding: 1.25rem 1.25rem 1.35rem;
  text-align: left;
}

@media (min-width: 640px) {
  body.page-blog-index #blogs .layout-container > nav.blog-index-toc:not(.blog-index-reading__toc) {
    padding: 1.5rem 1.5rem 1.6rem;
  }
}

body.page-blog-index #blogs .layout-container > nav.blog-index-toc:not(.blog-index-reading__toc) > p {
  margin: 0 0 1rem;
}

body.page-blog-index #blogs .layout-container > nav.blog-index-toc:not(.blog-index-reading__toc) > ul {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  justify-content: flex-start;
  margin-top: 0;
  text-align: left;
}

@media (min-width: 640px) {
  body.page-blog-index #blogs .layout-container > nav.blog-index-toc:not(.blog-index-reading__toc) > ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.5rem;
    row-gap: 0.4rem;
  }
}

body.page-blog-index #blogs .layout-container > nav.blog-index-toc:not(.blog-index-reading__toc) > ul a {
  display: block;
  padding: 0.35rem 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.45;
}

html[data-theme='dark'] body.page-blog-index #blogs .layout-container > nav.blog-index-toc:not(.blog-index-reading__toc) > ul a {
  color: #a5b4fc;
}

html[data-theme='dark'] body.page-blog-index #blogs .layout-container > nav.blog-index-toc:not(.blog-index-reading__toc) > ul a:hover {
  color: #c7d2fe;
}
body.page-blog-index #blogs .layout-container {
  align-items: stretch;
}

body.page-blog-index .blog-index-reading {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: min(100%, 40rem);
  margin-left: auto;
  margin-right: auto;
  align-items: stretch;
  gap: 1.5rem;
  padding-bottom: var(--space-lg);
}

@media (min-width: 640px) {
  body.page-blog-index .blog-index-reading {
    gap: 2rem;
    padding-bottom: var(--space-xl);
  }
}

body.page-blog-index .blog-index-reading__crumb {
  margin: 0;
  text-align: left;
}

body.page-blog-index .blog-index-reading__intro {
  margin: 0 !important;
  padding: 0 !important;
  max-width: 100% !important;
  width: 100%;
  text-align: left;
}

body.page-blog-index .blog-index-reading__eyebrow {
  margin: 0 0 0.5rem;
}

body.page-blog-index .blog-index-reading__title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 2vw + 1rem, 2.125rem);
  line-height: 1.22;
}

body.page-blog-index .blog-index-reading__lede {
  margin: 0 0 1rem;
  line-height: 1.7;
  font-size: 1rem;
}

body.page-blog-index .blog-index-reading__sublede {
  margin: 0;
  line-height: 1.65;
  font-size: 0.9375rem;
}

body.page-blog-index .blog-index-reading__list.blog-lead-list {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding-left: 1.25rem;
  padding-right: 0.25rem;
  list-style-position: outside;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  line-height: 1.65;
  text-align: left;
}

body.page-blog-index .blog-index-reading__toc.blog-index-toc {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  padding: 1.25rem 1.25rem 1.35rem;
  text-align: left;
}

@media (min-width: 640px) {
  body.page-blog-index .blog-index-reading__toc.blog-index-toc {
    padding: 1.5rem 1.5rem 1.6rem;
  }
}

body.page-blog-index .blog-index-reading__toc-title {
  margin: 0 0 1rem;
}

body.page-blog-index .blog-index-toc__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

@media (min-width: 640px) {
  body.page-blog-index .blog-index-toc__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.5rem;
    row-gap: 0.4rem;
  }
}

body.page-blog-index .blog-index-toc__link {
  display: block;
  padding: 0.35rem 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #6366f1;
  text-decoration: none;
  line-height: 1.45;
}

body.page-blog-index .blog-index-toc__link:hover {
  color: #4f46e5;
  text-decoration: underline;
  text-underline-offset: 3px;
}

html[data-theme='dark'] body.page-blog-index .blog-index-toc__link {
  color: #a5b4fc;
}

html[data-theme='dark'] body.page-blog-index .blog-index-toc__link:hover {
  color: #c7d2fe;
}

body.page-blog-article .blog-article__inner > nav[aria-label='Breadcrumb'] {
  text-align: center;
}

.blog-article__inner {
  width: 100%;
  max-width: min(100%, 42rem);
  margin-left: auto;
  margin-right: auto;
}

.blog-article__hero {
  margin: var(--space-lg) auto 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--card-radius);
  border: 1px solid rgba(24, 24, 27, 0.09);
  background: #e4e4e7;
}

html[data-theme='dark'] .blog-article__hero {
  border-color: rgba(255, 255, 255, 0.1);
  background: #27272a;
}

.blog-article__hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.blog-article__body {
  margin-top: var(--space-lg);
  font-size: var(--body-size);
  line-height: var(--body-lh);
}

.blog-article__body > p,
.blog-article__body > ul {
  margin-top: 0;
  margin-bottom: var(--space-md);
}

.blog-article__body > p:last-child,
.blog-article__body > ul:last-child {
  margin-bottom: 0;
}

.blog-article__body h2 {
  margin: var(--space-lg) 0 var(--space-sm);
  font-family: Sora, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #27272a;
}

html[data-theme='dark'] .blog-article__body h2 {
  color: #fafafa;
}

.blog-article__footer {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(24, 24, 27, 0.09);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: space-between;
}

html[data-theme='dark'] .blog-article__footer {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.blog-article__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #6366f1;
  text-decoration: none;
}

.blog-article__back:hover {
  color: #4f46e5;
}
