/* ==========================================================================
   mHealth Zone — Editorial health-tech stylesheet
   Palette: teal #0E7C7B · sky #58B8E8 · white · coral #F26B5E
   Type: "Newsreader" (display, italic accents) + "Karla" (body)
   ========================================================================== */

:root {
  --teal: #0E7C7B;
  --teal-dark: #0A5C5B;
  --teal-deep: #073E3E;
  --sky: #58B8E8;
  --sky-light: #EAF6FC;
  --coral: #F26B5E;
  --coral-dark: #D9503F;
  --ink: #16292E;
  --slate: #46606A;
  --mist: #F4F8F9;
  --line: #DCE8EA;
  --white: #ffffff;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow-sm: 0 1px 3px rgba(7, 62, 62, 0.08);
  --shadow-md: 0 6px 20px rgba(7, 62, 62, 0.10);
  --shadow-lg: 0 16px 44px rgba(7, 62, 62, 0.14);
  --radius: 14px;
  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  font-size: 1.0rem;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  line-height: 1.15;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 em, h2 em, h3 em {
  font-style: italic;
  font-weight: 500;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 44px;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  border: 2px solid transparent;
  font-family: var(--sans);
}
.btn:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
/* Primary: solid teal, white text (AA on white and mist backgrounds) */
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
/* Secondary: outlined */
.btn-ghost { background: transparent; color: var(--teal-dark); border-color: var(--teal); }
.btn-ghost:hover { background: var(--teal); color: #fff; }
/* On dark teal panels: solid white, dark teal text */
.btn-light { background: #fff; color: var(--teal-deep); }
.btn-light:hover { background: var(--sky-light); color: var(--teal-deep); }
/* Secondary on dark teal panels: white outline */
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.72); }
.btn-ghost-light:hover { background: #fff; color: var(--teal-deep); border-color: #fff; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 14px;
}

.section { padding: 84px 0; }
.section-alt { background: var(--mist); }

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 14px; }
.section-head p { color: var(--slate); font-size: 1.05rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.28rem;
  color: var(--ink);
  white-space: nowrap;
}
.logo:hover { color: var(--teal-dark); }
.logo .logo-mark { flex: 0 0 auto; }
.logo span em { font-style: normal; color: var(--teal); }

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
  align-items: center;
}
.main-nav a {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  color: var(--teal);
  border-bottom-color: var(--coral);
}
.nav-cta { margin-left: 8px; }
.main-nav .nav-cta a {
  background: var(--teal);
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  border-bottom: none;
}
.main-nav .nav-cta a:hover { background: var(--teal-dark); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background: var(--teal-deep);
  color: #fff;
  padding: 80px 0 88px;
  border-bottom: 6px solid var(--coral);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}
.hero .eyebrow { color: #FFB3A9; }
.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  margin-bottom: 20px;
}
.hero h1 em { color: #FFB3A9; }
.hero p.lead {
  font-size: 1.12rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 32px;
  max-width: 540px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-art { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-art img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.hero-stats {
  display: flex;
  gap: 44px;
  margin-top: 46px;
  flex-wrap: wrap;
}
.hero-stats .stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.9rem;
  color: #fff;
}
.hero-stats .stat span { color: rgba(255, 255, 255, 0.75); font-size: 0.88rem; }

/* ---------- Page hero (interior) ---------- */
.page-hero {
  background: var(--teal-deep);
  color: #fff;
  padding: 64px 0;
  border-bottom: 6px solid var(--coral);
}
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 14px; }
.page-hero p { color: rgba(255, 255, 255, 0.85); max-width: 640px; font-size: 1.08rem; }
.breadcrumbs {
  font-size: 0.85rem;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.7);
}
.breadcrumbs a { color: rgba(255, 255, 255, 0.9); }
.breadcrumbs a:hover { color: #fff; text-decoration: underline; }
.breadcrumbs span.sep { margin: 0 8px; opacity: 0.5; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--sky-light); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}
.card h3 { font-size: 1.22rem; margin-bottom: 10px; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--teal); }
.card p { color: var(--slate); font-size: 0.95rem; flex: 1; }
.card-meta {
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--slate);
  display: flex;
  gap: 12px;
  align-items: center;
}
.card-link {
  margin-top: 16px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--coral);
}
.card-link:hover { color: var(--coral-dark); }

/* Topic tiles */
.topic-tile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.topic-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--sky); }
.topic-tile .tile-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--sky-light);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.topic-tile h3 { font-size: 1.1rem; margin-bottom: 8px; }
.topic-tile p { color: var(--slate); font-size: 0.92rem; }

/* ---------- Newsletter CTA band ---------- */
.cta-band {
  background: var(--teal-deep);
  color: #fff;
  border-radius: 20px;
  padding: 56px 52px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 12px; }
.cta-band p { color: rgba(255, 255, 255, 0.85); }
.newsletter-form { display: flex; gap: 12px; flex-wrap: wrap; }
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 8px;
  border: none;
  font-family: var(--sans);
  font-size: 0.95rem;
}
.newsletter-form input[type="email"]:focus { outline: 3px solid var(--sky); }

/* ---------- About strip ---------- */
.about-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-strip .about-art { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.about-art img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.about-strip h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 16px; }
.about-strip p { color: var(--slate); margin-bottom: 16px; }

/* ---------- Prose (long-form) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.65rem; margin: 44px 0 16px; }
.prose h3 { font-size: 1.25rem; margin: 30px 0 12px; }
.prose p { margin-bottom: 18px; color: #2A424A; }
.prose ul, .prose ol { margin: 0 0 20px 24px; color: #2A424A; }
.prose li { margin-bottom: 8px; }
.prose blockquote {
  border-left: 4px solid var(--coral);
  background: var(--mist);
  padding: 20px 26px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 26px 0;
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--teal-deep);
}
.prose strong { color: var(--ink); }

/* ---------- Service detail ---------- */
.service-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 56px;
  align-items: start;
}
.service-aside { position: sticky; top: 100px; display: grid; gap: 24px; }
.aside-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.aside-card.teal { background: var(--teal-deep); color: #fff; border: none; }
.aside-card.teal h3 { color: #fff; }
.aside-card.teal p { color: rgba(255, 255, 255, 0.85); }
.aside-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.aside-card p { color: var(--slate); font-size: 0.93rem; margin-bottom: 18px; }
.aside-card ul { list-style: none; }
.aside-card ul li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.aside-card ul li:last-child { border-bottom: none; }
.aside-card ul li a { color: var(--ink); font-weight: 500; }
.aside-card ul li a:hover { color: var(--teal); }
.aside-card ul li a[aria-current="page"] { color: var(--coral); font-weight: 600; }

.feature-list { list-style: none; margin: 24px 0; display: grid; gap: 14px; }
.feature-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--mist);
  border-radius: 10px;
  padding: 16px 18px;
}
.feature-list li::before {
  content: "✓";
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 2px;
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 800px; display: grid; gap: 14px; }
.faq-list details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}
.faq-list summary {
  font-weight: 600;
  font-family: var(--serif);
  font-size: 1.06rem;
  cursor: pointer;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: 34px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--coral);
  font-size: 1.4rem;
  font-weight: 400;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { margin-top: 12px; color: var(--slate); font-size: 0.96rem; }

/* ---------- Blog post: 3-column layout ---------- */
.post-hero { padding: 56px 0 40px; }
.post-hero .post-kicker {
  color: var(--coral);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}
.post-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 12px 0 16px; max-width: 820px; overflow-wrap: anywhere; }
.post-hero .post-meta { color: var(--slate); font-size: 0.92rem; display: flex; gap: 10px 14px; flex-wrap: wrap; min-width: 0; }
.post-featured {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin: 34px 0 0;
  max-width: 100%;
}
.post-featured img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.post-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
  padding: 56px 0 84px;
}

.toc {
  position: sticky;
  top: 100px;
  border-left: 3px solid var(--line);
  padding-left: 0;
}
.toc h2 {
  font-family: var(--sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--slate);
  margin-bottom: 14px;
  padding-left: 18px;
}
.toc ul { list-style: none; }
.toc li a {
  display: block;
  padding: 8px 0 8px 18px;
  font-size: 0.88rem;
  color: var(--slate);
  border-left: 3px solid transparent;
  margin-left: -3px;
  line-height: 1.45;
}
.toc li a:hover { color: var(--teal); }
.toc li a.active {
  color: var(--teal-dark);
  font-weight: 600;
  border-left-color: var(--coral);
}

.post-body { min-width: 0; }
.post-body h2 { font-size: 1.6rem; margin: 42px 0 16px; scroll-margin-top: 100px; }
.post-body h2:first-of-type { margin-top: 0; }
.post-body h3 { font-size: 1.22rem; margin: 28px 0 12px; }
.post-body p { margin-bottom: 18px; color: #2A424A; }
.post-body ul, .post-body ol { margin: 0 0 20px 24px; color: #2A424A; }
.post-body li { margin-bottom: 8px; }
.post-body blockquote {
  border-left: 4px solid var(--coral);
  background: var(--mist);
  padding: 20px 26px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 26px 0;
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--teal-deep);
}

.post-aside { position: sticky; top: 100px; display: grid; gap: 24px; }
.cta-card {
  background: var(--teal-deep);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
}
.cta-card h3 { color: #fff; font-size: 1.25rem; margin-bottom: 10px; }
.cta-card p { color: rgba(255, 255, 255, 0.85); font-size: 0.92rem; margin-bottom: 20px; }
.cta-card form { display: grid; gap: 12px; }
.cta-card input[type="email"] {
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  font-family: var(--sans);
  font-size: 0.92rem;
}
.cta-card input[type="email"]:focus { outline: 3px solid var(--sky); }
.cta-card .btn { width: 100%; text-align: center; }
.cta-card .fine { font-size: 0.75rem; color: rgba(255, 255, 255, 0.65); margin: 10px 0 0; }

.related-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.related-card h3 { font-size: 1.02rem; margin-bottom: 14px; }
.related-card ul { list-style: none; }
.related-card li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.related-card li:last-child { border-bottom: none; padding-bottom: 0; }
.related-card a { font-size: 0.9rem; font-weight: 500; color: var(--ink); line-height: 1.45; display: block; }
.related-card a:hover { color: var(--teal); }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 20px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-form label {
  font-weight: 600;
  font-size: 0.88rem;
  display: block;
  margin-bottom: 8px;
}
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--mist);
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
}
.contact-info h2 { font-size: 1.7rem; margin-bottom: 16px; }
.contact-info > p { color: var(--slate); margin-bottom: 30px; }
.info-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.info-item:last-of-type { border-bottom: none; }
.info-item .info-icon {
  flex: 0 0 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--sky-light);
  display: grid;
  place-items: center;
}
.info-item h3 { font-size: 1.02rem; margin-bottom: 4px; }
.info-item p, .info-item a { color: var(--slate); font-size: 0.94rem; }
.info-item a:hover { color: var(--teal); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--teal-deep);
  color: rgba(255, 255, 255, 0.78);
  padding: 68px 0 0;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 44px;
  padding-bottom: 52px;
}
.footer-brand .logo { color: #fff; margin-bottom: 16px; }
.footer-brand .logo span em { color: var(--sky); }
.footer-brand p { font-size: 0.92rem; max-width: 300px; }
.site-footer h4 {
  color: #fff;
  font-family: var(--sans);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 11px; }
.site-footer ul a { color: rgba(255, 255, 255, 0.78); font-size: 0.93rem; }
.site-footer ul a:hover { color: var(--sky); }
.footer-contact li { display: flex; gap: 10px; font-size: 0.93rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}
.footer-bottom a { color: rgba(255, 255, 255, 0.78); margin-left: 18px; }
.footer-bottom a:hover { color: var(--sky); }

/* ---------- Legal pages ---------- */
.legal-body { max-width: 780px; padding: 64px 0 90px; }
.legal-body h2 { font-size: 1.4rem; margin: 38px 0 14px; }
.legal-body p, .legal-body li { color: #2A424A; }
.legal-body ul { margin: 0 0 18px 24px; }
.legal-body p { margin-bottom: 16px; }
.legal-updated { color: var(--slate); font-size: 0.9rem; margin-bottom: 34px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  /* Stack the 3-column post layout: TOC first, article, then CTA aside */
  .post-layout { grid-template-columns: 1fr; gap: 40px; }
  .toc {
    position: static;
    border: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--mist);
    padding: 22px 24px;
  }
  .toc h2, .toc li a { padding-left: 0; }
  .toc li a { border-left: none; margin-left: 0; }
  .post-aside { position: static; }
  .card-grid, .card-grid.four { grid-template-columns: repeat(2, 1fr); }
  .service-layout { grid-template-columns: 1fr; }
  .service-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .hero-grid, .about-strip, .contact-layout { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 1fr; padding: 40px 30px; }
  .post-layout { grid-template-columns: 1fr; gap: 40px; }
  .post-aside { position: static; }

  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    inset: 74px 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateY(-130%);
    transition: transform 0.28s ease;
    z-index: 150;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 24px;
  }
  .main-nav li { border-bottom: 1px solid var(--line); }
  .main-nav li:last-child { border-bottom: none; }
  .main-nav a { display: block; padding: 15px 4px; border-bottom: none; }
  .main-nav .nav-cta { margin: 14px 0 0; }
  .main-nav .nav-cta a { text-align: center; }
}

@media (max-width: 560px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }
  .container,
  .post-hero,
  .post-layout,
  .post-body,
  .toc {
    min-width: 0;
    max-width: 100%;
  }
  .post-hero h1 {
    width: 100%;
    max-width: 100%;
    font-size: clamp(1.75rem, 8vw, 2.05rem);
    line-height: 1.12;
  }
  .post-hero .post-meta {
    display: block;
  }
  .post-hero .post-meta span,
  .post-hero .post-meta time {
    display: inline;
    overflow-wrap: anywhere;
  }
  .card-grid, .card-grid.two, .card-grid.four { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .hero { padding: 64px 0 72px; }
  .footer-grid { grid-template-columns: 1fr; }
}
