@import url("https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@400;600;700;800&display=swap");

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ── Base ── */
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
}

body.app-body {
  background: var(--color-white);
}

/* ── Site header ── */
.site-header {
  background: var(--color-white);
  padding: 10px 0;
}

body.is-scenario-page .site-header {
  display: none;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 64px;
  gap: 1.5rem;
}

/* ── Brand ── */
.brand {
  display: flex;
  align-items: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 14px;
}

.logo img {
  width: 302px;
  height: auto;
  object-fit: contain;
}

.name {
  margin: 0;
  color: var(--color-ink);
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.1;
}

.brand-sub {
  margin: 0.1rem 0 0;
  color: var(--color-text);
  font-size: 0.82rem;
  line-height: 1.4;
}

/* ── Site nav ── */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
}

.site-nav-link {
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 140ms ease,
    color 140ms ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.site-nav-link:hover,
.site-nav-link:focus-visible {
  background: var(--color-secondary-background);
  color: var(--color-ink);
  outline: none;
}

.site-nav-link.cta {
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 700;
}

.site-nav-link.cta:hover,
.site-nav-link.cta:focus-visible {
  background: var(--color-primary-hover);
  color: var(--color-white);
}

body.is-authenticated .marketing-nav-link,
body.is-authenticated .privacy-nav-link {
  display: none;
}

.mobile-nav {
  position: relative;
  display: none;
  flex-shrink: 0;
}

.mobile-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-height: 40px;
  padding: 0;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-white);
  color: var(--color-text);
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.mobile-nav-toggle::-webkit-details-marker {
  display: none;
}

.mobile-nav[open] .mobile-nav-toggle {
  border-color: var(--color-tertiary);
  color: var(--color-tertiary);
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.hamburger-icon {
  position: relative;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.hamburger-icon::before {
  top: -6px;
}

.hamburger-icon::after {
  top: 6px;
}

.mobile-nav-panel {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 210px;
  padding: 0.45rem;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-white);
  box-shadow: 0 12px 32px rgba(16, 35, 29, 0.14);
}

.mobile-nav-link {
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
  background: var(--color-tertiary-background);
  color: var(--color-ink);
  outline: none;
}

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

/* ── Layout ── */
main {
  min-height: calc(100vh - 160px);
  padding-bottom: 0;
}

.app-shell {
  width: 100%;
  min-height: auto;
  padding-bottom: 2rem;
}

.site-footer {
  display: flex;
  align-items: center;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 64px;
  color: var(--color-tertiary);
  font-size: 0.88rem;
}

.site-footer a,
.faq-a a,
.legal-page a {
  color: var(--color-primary);
  font-weight: 700;
}

.site-footer a:hover,
.site-footer a:focus-visible,
.faq-a a:hover,
.faq-a a:focus-visible,
.legal-page a:hover,
.legal-page a:focus-visible {
  color: var(--color-primary-hover);
}

/* ═══════════════════════════════════════
   ICON
═══════════════════════════════════════ */

.icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-aqua);
  color: var(--color-secondary);
  flex-shrink: 0;
}

.icon-wrap.red {
  background: #fde8e8;
  color: var(--color-primary);
}

.icon-wrap.sm {
  width: 36px;
  height: 36px;
}

.icon-wrap.lg {
  width: 96px;
  height: 96px;
}

.section-with-icon > .icon-wrap,
.section-heading-with-icon > .icon-wrap {
  background: var(--color-aqua);
  color: var(--color-secondary);
}

/* ═══════════════════════════════════════
   PAGE SECTIONS
═══════════════════════════════════════ */

/* Shared card shell */
.hero,
.section,
.access-panel {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-white);
  box-shadow: 0 4px 24px rgba(16, 35, 29, 0.06);
}

/* Width + spacing for top-level blocks */
main > .hero,
main > .section,
main > .access-panel {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto 1.25rem;
}

/* ── Hero ── */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
  margin-top: 1.5rem;
  border-color: rgba(45, 166, 184, 0.22);
  background: radial-gradient(circle at 78% 38%, rgba(255, 255, 255, 1), transparent 22rem), linear-gradient(135deg, #c8f4fb 0%, #92dbe6 48%, #b9eef5 100%);
  color: #12343a;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(-10deg, rgba(200, 244, 251, 1) 0%, rgba(200, 244, 251, 0.78) 12%, rgba(200, 244, 251, 0) 22%, white 100%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 1.15rem;
  max-width: 720px;
}

.hero .kicker {
  color: var(--color-primary) !important;
}

.hero-pass-rate {
  color: var(--color-primary);
}

.hero-callouts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  max-width: 760px;
  margin-top: 0.2rem;
}

.hero-callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
}

.hero-callout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid rgba(0, 112, 124, 0.7);
  border-radius: 999px;
  color: #087280;
  background: var(--color-white);
  flex-shrink: 0;
}

.hero-callout strong,
.hero-callout small {
  display: block;
}

.hero-callout strong {
  color: var(--color-ink);
  font-size: 0.88rem;
  line-height: 1.2;
}

.hero-callout small {
  margin-top: 0.15rem;
  color: var(--color-text);
  font-size: 0.78rem;
  line-height: 1.25;
}

.hero-wave {
  position: absolute;
  inset: 0;
  z-index: 1;
  color: rgba(23, 132, 153, 0.4);
  pointer-events: none;
  overflow: hidden;
}

.hero-wave svg {
  position: absolute;
  top: 12%;
  left: -6%;
  width: 112%;
  height: 42%;
}

.hero-wave__line,
.hero-wave__pulse {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
}

.hero-wave__line {
  stroke-width: 3;
}

.hero-wave__line--dotted {
  stroke-dasharray: 2 14;
}

.hero-wave__pulse {
  stroke-width: 4;
}

.hero-tooth {
  position: absolute;
  right: clamp(1.5rem, 4vw, 3rem);
  bottom: clamp(1.1rem, 3vw, 2.25rem);
  z-index: 2;
  width: clamp(110px, 14vw, 160px);
  height: clamp(110px, 14vw, 160px);
  pointer-events: none;
}

.hero-tooth img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.7;
  filter: drop-shadow(0 8px 16px rgba(18, 86, 98, 0.12));
}

/* ── Kicker ── */

.kicker,
.kicker-red {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kicker {
  color: var(--color-tertiary) !important;
}

.kicker-red {
  color: var(--color-primary) !important;
}

/* ── Headings ── */
.title {
  margin: 0;
  color: var(--color-ink);
  font-family: var(--font-serif);
  font-size: 2.8rem;
  line-height: 1.04;
  font-weight: 700;
}

.subtitle {
  margin: 0;
  color: var(--color-text);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero h2,
.section h2,
.access-panel h2 {
  margin: 0;
  color: var(--color-ink);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
}

/* ── Buttons ── */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0.6rem 1.15rem;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-primary-hover);
  color: var(--color-white);
  outline: none;
}

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

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--color-secondary);
  color: var(--color-white);
  outline: none;
}

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

.btn-tertiary:hover,
.btn-tertiary:focus-visible {
  background: var(--color-tertiary);
  color: var(--color-white);
  outline: none;
}

.btn-full {
  width: 100%;
}

/* ── Product preview card ── */
.preview-card {
  display: grid;
  gap: 1rem;
  padding: 1.35rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.preview-dl {
  display: grid;
  gap: 1rem;
  margin: 0;
}

.preview-dl-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.preview-dl-item .icon-wrap {
  margin-top: 0.1rem;
}

.preview-dl dt {
  margin-bottom: 0.25rem;
  color: var(--color-tertiary);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.preview-dl dd {
  margin: 0;
  color: var(--color-text);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ── Sections ── */
.section {
  padding: 1.5rem;
}

.section-with-icon {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.section-heading-with-icon {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.section-body {
  display: grid;
  gap: 0.65rem;
  flex: 1;
}

.section > p,
.section-body > p {
  margin: 0;
  color: var(--color-text);
  line-height: 1.6;
}

/* ── How it works card grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.85rem;
}

.info-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.85rem;
  row-gap: 0.35rem;
  align-items: start;
  padding: 1.15rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-white);
}

.info-card .icon-wrap {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: start;
}

.info-card h3 {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  color: var(--color-ink);
  font-size: 0.98rem;
  font-weight: 700;
  align-self: center;
}

.info-card p {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  color: var(--color-text);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ── Clinical Skills coverage ── */
.coverage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.coverage-card {
  display: grid;
  gap: 0.55rem;
  padding: 1.2rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-white);
}

.coverage-number {
  margin: 0;
  color: var(--color-tertiary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.coverage-card h3 {
  margin: 0;
  color: var(--color-ink);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}

.coverage-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.05rem;
  color: var(--color-text);
}

.coverage-list li {
  color: var(--color-text);
  font-size: 0.9rem;
  line-height: 1.58;
}

/* ── Checklist ── */
.checklist {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  color: var(--color-text);
  font-size: 0.92rem;
  line-height: 1.5;
}

.checklist li svg {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--color-tertiary);
}

/* ── FAQ ── */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 0.85rem;
}

.faq-item {
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-white);
}

.faq-q {
  margin: 0;
  color: var(--color-ink);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.faq-a {
  margin: 0;
  color: var(--color-text);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ── Access / waitlist panel ── */
.access-panel {
  display: grid;
  gap: 1.25rem;
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.form-header {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.form-header-text {
  display: grid;
  gap: 0.2rem;
}

/* ── Form ── */
.form {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.form input {
  flex: 1;
  min-height: 40px;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-ink);
  background: var(--color-white);
  font: inherit;
  font-size: 0.92rem;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.form input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.12);
  outline: none;
}

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

.form-success {
  margin: 0;
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 600;
}

.form-error {
  margin: 0;
  color: var(--color-primary);
  font-size: 0.9rem;
}

/* ── Legal pages ── */
.legal-page {
  display: grid;
  gap: 1rem;
  width: min(880px, calc(100% - 2rem));
  margin: 2rem auto 3rem;
  padding: 2rem;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-white);
}

.legal-page h1,
.legal-page h2,
.legal-page p,
.legal-page ul {
  margin: 0;
}

.legal-page h1 {
  color: var(--color-ink);
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.05;
}

.legal-page h2 {
  margin-top: 1rem;
  color: var(--color-ink);
  font-size: 1.2rem;
  line-height: 1.25;
}

.legal-page p,
.legal-page li {
  color: var(--color-text);
  line-height: 1.65;
}

.legal-page ul {
  display: grid;
  gap: 0.45rem;
  padding-left: 1.2rem;
}

.legal-updated {
  color: var(--color-tertiary);
  font-weight: 800;
}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */

@media (max-width: 860px) {
  .hero,
  .card-grid,
  .coverage-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 1.5rem;
  }
  .title {
    font-size: 2.1rem;
  }
  .hero-callouts {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }
  .section,
  .legal-page {
    padding: 1.15rem;
  }

  .section-with-icon,
  .section-heading-with-icon {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.9rem;
    row-gap: 0.65rem;
  }

  .section-with-icon > .icon-wrap,
  .section-heading-with-icon > .icon-wrap {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .section-with-icon > .section-body,
  .section-heading-with-icon > .section-body {
    display: contents;
  }

  .section-with-icon .kicker,
  .section-heading-with-icon .kicker,
  .section-heading-with-icon .kicker-red {
    grid-column: 2;
  }

  .section-with-icon h2,
  .section-heading-with-icon h2 {
    grid-column: 2;
  }

  .section-with-icon .section-body > p:not(.kicker),
  .section-heading-with-icon .section-body > p:not(.kicker):not(.kicker-red) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .hero-wave {
    opacity: 0.38;
  }

  .hero-wave svg {
    top: 5%;
    left: -40%;
    width: 190%;
    height: 28%;
  }

  .hero-tooth {
    right: -1.4rem;
    bottom: 1rem;
    width: 112px;
    height: 112px;
    opacity: 0.54;
  }
}

@media (max-width: 600px) {
  .site-nav {
    display: none;
  }
  .mobile-nav {
    display: block;
  }
  .logo img {
    width: 239px;
  }
  .form {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ═══════════════════════════════════════
   BLOG
═══════════════════════════════════════ */

/* ── Blog page wrapper ── */
.blog-page {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  gap: 1.25rem;
  padding-bottom: 3rem;
}

/* ── Blog index header ── */
.blog-header {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.55rem;
}

.blog-title {
  margin: 0;
  color: var(--color-ink);
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.08;
}

.blog-subtitle {
  margin: 0;
  color: var(--color-text);
  font-size: 1.05rem;
  line-height: 1.65;
}

.blog-empty {
  color: var(--color-text);
}

/* ── Blog card grid (recent posts) ── */
.blog-cards-section {
  display: grid;
}

.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-white);
  box-shadow: 0 4px 24px rgba(16, 35, 29, 0.05);
  transition:
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.blog-card:hover {
  box-shadow: 0 8px 32px rgba(16, 35, 29, 0.1);
  border-color: var(--color-secondary);
}

.blog-card-body {
  display: grid;
  gap: 0.45rem;
}

.blog-card-title {
  margin: 0;
  color: var(--color-ink);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}

.blog-card-link {
  color: inherit;
  text-decoration: none;
}

.blog-card-link:hover {
  color: var(--color-primary);
}

.blog-card-excerpt {
  margin: 0;
  color: var(--color-text);
  font-size: 0.9rem;
  line-height: 1.6;
}

.blog-view-count {
  margin: 0;
  color: var(--color-secondary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.blog-card-read-more {
  align-self: flex-start;
}

/* ── Blog archive (older posts) ── */
.blog-archive {
  display: grid;
  gap: 0.75rem;
}

.blog-archive-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
}

.blog-archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-white);
  transition: background 120ms ease;
}

.blog-archive-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.blog-archive-item:last-child {
  border-bottom: none;
}

.blog-archive-item:hover {
  background: var(--color-surface);
}

.blog-archive-link {
  color: var(--color-ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  line-height: 1.4;
}

.blog-archive-link:hover {
  color: var(--color-primary);
}

.blog-archive-date {
  color: var(--color-text);
  font-size: 0.82rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Blog post (article page) ── */
.blog-post {
  width: min(780px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  gap: 0;
  padding-bottom: 3rem;
}

.blog-post-header {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.6rem;
}

.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 0.25rem;
  justify-self: start;
}

.blog-back-link:hover {
  color: var(--color-ink);
}

.blog-post-title {
  margin: 0;
  color: var(--color-ink);
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.1;
}

.blog-post-body .blog-post-title {
  margin-bottom: 0.75em;
}

.blog-post-description {
  margin: 0;
  color: var(--color-text);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ── Post body: Markdown output ── */
.blog-post-body {
  margin-top: 1.25rem;
  font-size: 1.02rem;
  line-height: 1.72;
  color: var(--color-text);
  min-width: 0;
}

.blog-post-body h2,
.blog-post-body h3,
.blog-post-body h4 {
  color: var(--color-ink);
  font-family: var(--font-serif);
  margin: 1.8em 0 0.55em;
  line-height: 1.25;
}

.blog-post-body h2 {
  font-size: 1.4rem;
}
.blog-post-body h3 {
  font-size: 1.15rem;
}

.blog-post-body p {
  margin: 0 0 1.1em;
}
.blog-post-body p:last-child {
  margin-bottom: 0;
}

.blog-post-body strong {
  color: var(--color-ink);
  font-weight: 700;
}

.blog-post-body a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-post-body a:hover {
  color: var(--color-primary-hover);
}

.blog-post-body ul,
.blog-post-body ol {
  padding-left: 1.4rem;
  margin: 0 0 1.1em;
}

.blog-post-body li {
  margin-bottom: 0.4em;
}

.blog-post-body hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2em 0;
}

.blog-post-body blockquote {
  border-left: 3px solid var(--color-secondary);
  margin: 1.5em 0;
  padding: 0.5em 1.25em;
  background: var(--color-secondary-background);
  border-radius: 0 8px 8px 0;
  color: var(--color-ink);
  font-style: italic;
}

.blog-post-body img {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--color-border);
}

.blog-post-body code {
  background: var(--color-surface);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-size: 0.9em;
}

/* ── Tables ── */

/* Wrapper added automatically by the Eleventy wrap-tables transform.
   Allows wide tables to scroll horizontally on mobile without
   pushing the page wider than the viewport. */
.blog-post-body .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* momentum scroll on iOS */
  margin: 1.75em 0;
  border-radius: 10px;
  /* Subtle scroll hint shadow on the right edge when content overflows */
  background:
    linear-gradient(to right, var(--color-white) 30%, transparent) left center,
    linear-gradient(to left, var(--color-border) 0%, transparent) right center;
  background-size:
    40px 100%,
    12px 100%;
  background-repeat: no-repeat;
  background-attachment: local, scroll;
}

.blog-post-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0; /* margin is on .table-scroll wrapper */
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.93rem;
  box-shadow: 0 2px 12px rgba(16, 35, 29, 0.06);
}

.blog-post-body thead {
  background: var(--color-secondary);
}

.blog-post-body thead th {
  padding: 0.75rem 1rem;
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

.blog-post-body thead th:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* Striped rows */
.blog-post-body tbody tr:nth-child(odd) {
  background: var(--color-white);
}

.blog-post-body tbody tr:nth-child(even) {
  background: var(--color-secondary-background);
}

/* Row hover */
.blog-post-body tbody tr {
  transition: background 120ms ease;
}

.blog-post-body tbody tr:hover {
  background: var(--color-secondary-background);
}

.blog-post-body tbody td {
  padding: 0.7rem 1rem;
  color: var(--color-text);
  line-height: 1.55;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.blog-post-body tbody td:not(:last-child) {
  border-right: 1px solid var(--color-border);
}

.blog-post-body tbody tr:last-child td {
  border-bottom: none;
}

/* First column emphasis */
.blog-post-body tbody td:first-child {
  font-weight: 600;
  color: var(--color-ink);
}

.blog-post-footer {
  margin-top: 1.25rem;
  display: flex;
}

/* ── Blog responsive ── */
@media (max-width: 860px) {
  .blog-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .blog-card-grid {
    grid-template-columns: 1fr;
  }

  .blog-archive-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .blog-post-body thead th {
    white-space: normal;
    padding: 0.55rem 0.6rem;
  }
  .blog-post-body tbody td {
    padding: 0.55rem 0.6rem;
  }
  .blog-post-body table {
    font-size: 0.85rem;
  }
}
