/* ==========================================================================
   MYLEASE Guides — Master Publication Template
   Enterprise knowledge portal design system
   ========================================================================== */

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

body.page-guide.page-modern {
  background: #f6f7f9;
}

body.page-modern .mg-hero__title,
body.page-modern .mg-summary__heading,
body.page-modern .mg-takeaways__heading,
body.page-modern .mg-related__heading,
body.page-modern .mg-footer-journey__title,
body.page-modern .mg-footer-reading__title,
body.page-modern .mg-faqs__heading,
body.page-modern .mg-checklist__heading,
body.page-modern .mg-cta__title,
body.page-modern .mg-footer-cta__title {
  font-family: 'Chillax', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* --- Article Header Band --- */
.mg-header-band {
  padding: calc(var(--header-height) + 20px) 0 0;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mg-header-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px 40px;
  padding: 28px 24px 24px;
}

.mg-header-band__brand {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  max-width: 520px;
}

.mg-header-band__icon {
  font-size: 28px;
  line-height: 1;
  margin-top: 2px;
}

.mg-header-band__label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.mg-header-band__team {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}

.mg-header-band__tagline {
  margin: 4px 0 0;
  font-size: 14px;
  color: #5b6472;
}

.mg-header-band__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, auto));
  gap: 12px 28px;
  margin: 0;
}

.mg-header-band__meta div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mg-header-band__meta dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b95a5;
}

.mg-header-band__meta dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
}

.mg-header-band__meta dd.mg-audience {
  font-size: 13px;
  line-height: 1.5;
}

/* --- Breadcrumb --- */
.mg-breadcrumb {
  padding: 18px 24px;
  font-size: 13px;
  color: #6b7280;
}

.mg-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mg-breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mg-breadcrumb li:not(:last-child)::after {
  content: '›';
  color: #c4c9d2;
  font-size: 14px;
}

.mg-breadcrumb a {
  color: #5b6472;
  text-decoration: none;
  transition: color 150ms ease;
}

.mg-breadcrumb a:hover {
  color: var(--color-primary);
}

.mg-breadcrumb li[aria-current='page'] {
  color: #1a1a1a;
  font-weight: 500;
}

/* --- Hero --- */
.mg-hero {
  position: relative;
  overflow: hidden;
  background: #1a1a1a;
  color: #fff;
}

.mg-hero__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.42;
}

.mg-hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.88) 0%, rgba(26, 26, 26, 0.55) 55%, rgba(215, 25, 32, 0.25) 100%);
}

.mg-hero__content {
  position: relative;
  z-index: 1;
  padding: 56px 24px 64px;
  max-width: 900px;
}

.mg-hero__title {
  margin: 0;
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.mg-hero__subtitle {
  margin: 18px 0 0;
  max-width: 62ch;
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
}

.mg-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.mg-hero__meta li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
}

.mg-hero__meta li::before {
  content: '•';
  color: var(--color-primary);
  font-size: 16px;
}

/* --- Layout --- */
.mg-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
  padding: 48px 24px 80px;
}

.mg-main {
  min-width: 0;
  max-width: 800px;
}

/* --- Guide Summary --- */
.mg-summary {
  margin-bottom: 48px;
  padding: 28px 32px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(215, 25, 32, 0.04) 0%, rgba(215, 25, 32, 0.01) 100%);
  border: 1px solid rgba(215, 25, 32, 0.12);
  box-shadow: 0 8px 32px rgba(215, 25, 32, 0.04);
}

.mg-summary__heading {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.mg-summary__body {
  font-size: 17px;
  line-height: 1.75;
  color: #2d3748;
}

.mg-summary__body p {
  margin: 0;
}

/* --- Table of Contents --- */
.mg-toc {
  margin-bottom: 40px;
  padding: 24px 28px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.mg-toc--mobile {
  display: none;
}

.mg-toc__heading {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5b6472;
}

.mg-toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mg-toc__list li {
  margin: 0;
}

.mg-toc__list a {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  line-height: 1.45;
  color: #4a5568;
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 12px;
  margin-left: -12px;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.mg-toc__list a:hover {
  color: var(--color-primary);
}

.mg-toc__list a.is-active {
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  font-weight: 600;
}

.mg-toc__list .mg-toc__item--h3 a {
  padding-left: 24px;
  font-size: 13px;
  color: #6b7280;
}

/* --- Article Typography --- */
.mg-article {
  font-size: 17px;
  line-height: 1.8;
  color: #2d3748;
}

.mg-article > * + * {
  margin-top: 28px;
}

.mg-article h2 {
  margin: 56px 0 0;
  padding-top: 8px;
  font-family: 'Chillax', sans-serif;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.mg-article h2:first-child {
  margin-top: 0;
}

.mg-article h3 {
  margin: 40px 0 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  color: #1a1a1a;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.mg-article p {
  margin: 20px 0 0;
}

.mg-article ul,
.mg-article ol {
  margin: 20px 0 0;
  padding-left: 24px;
}

.mg-article li + li {
  margin-top: 10px;
}

.mg-article li::marker {
  color: var(--color-primary);
}

.mg-article blockquote {
  margin: 32px 0 0;
  padding: 24px 28px;
  border-left: 4px solid var(--color-primary);
  border-radius: 0 16px 16px 0;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.mg-article blockquote p {
  margin: 0;
  font-size: 18px;
  font-style: italic;
  line-height: 1.65;
  color: #374151;
}

.mg-article blockquote cite {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  color: #6b7280;
}

.mg-article figure {
  margin: 36px 0 0;
}

.mg-article figure img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.mg-article figure.mg-figure--screenshot img {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.mg-article figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: #6b7280;
  text-align: center;
}

.mg-article .mg-table-wrap {
  margin: 32px 0 0;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.mg-article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: #fff;
}

.mg-article th,
.mg-article td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mg-article th {
  background: #f8f9fb;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5b6472;
}

.mg-article tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 768px) {
  .mg-article .mg-table-wrap {
    overflow-x: visible;
    max-width: 100%;
    margin-inline: 0;
    padding-inline: 0;
  }

  .mg-article .mg-table-wrap table {
    width: 100%;
    min-width: 0;
  }

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

  .mg-article .mg-table-wrap tbody tr {
    display: block;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .mg-article .mg-table-wrap tbody tr:last-child {
    border-bottom: 0;
  }

  .mg-article .mg-table-wrap td {
    display: block;
    min-width: 0;
    padding: 0;
    border: none;
    font-size: 13px;
    line-height: 1.55;
    color: #374151;
  }

  .mg-article .mg-table-wrap td + td {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
  }

  .mg-article .mg-table-wrap td:first-child {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
  }

  .mg-article .mg-table-wrap td:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-primary);
  }
}

/* --- Callouts --- */
.mg-callout {
  display: flex;
  gap: 20px;
  margin-top: 48px;
  padding: 28px 32px;
  border-radius: 20px;
}

.mg-callout__icon {
  display: none;
}

.mg-callout--tip .mg-callout__heading::before {
  content: '💡 ';
}

.mg-callout--insight .mg-callout__heading::before {
  content: '📊 ';
}

.mg-callout__heading {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}

.mg-callout__content {
  font-size: 16px;
  line-height: 1.7;
  color: #374151;
}

.mg-callout__content p {
  margin: 0;
}

.mg-callout__content p + p {
  margin-top: 12px;
}

.mg-callout--tip {
  background: rgba(215, 25, 32, 0.05);
  border: 1px solid rgba(215, 25, 32, 0.15);
  border-left: 4px solid var(--color-primary);
}

.mg-callout--tip .mg-callout__heading {
  color: var(--color-primary);
}

.mg-callout--insight {
  background: linear-gradient(135deg, #f0f4f8 0%, #e8edf3 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-left: 4px solid #2d4a6f;
}

.mg-callout--insight .mg-callout__heading {
  color: #2d4a6f;
}

/* --- Checklist --- */
.mg-checklist {
  margin-top: 64px;
}

.mg-checklist__heading {
  margin: 0 0 24px;
  font-size: clamp(22px, 3vw, 28px);
  color: #1a1a1a;
}

.mg-checklist__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mg-checklist__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px 22px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.mg-checklist__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.mg-checklist__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(215, 25, 32, 0.1);
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 700;
}

.mg-checklist__text {
  font-size: 15px;
  line-height: 1.55;
  color: #374151;
}

/* --- Key Takeaways --- */
.mg-takeaways {
  margin-top: 64px;
}

.mg-takeaways__heading {
  margin: 0 0 28px;
  font-size: clamp(22px, 3vw, 28px);
  color: #1a1a1a;
}

.mg-takeaways__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.mg-takeaway {
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 12px;
  row-gap: 4px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.mg-takeaway__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(215, 25, 32, 0.08);
  color: var(--color-primary);
  font-size: 16px;
  margin-bottom: 0;
  grid-row: 1 / span 2;
  align-self: start;
}

.mg-takeaway__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.35;
}

.mg-takeaway__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #5b6472;
}

/* --- FAQs --- */
.mg-faqs {
  margin-top: 64px;
}

.mg-faqs__heading {
  margin: 0 0 24px;
  font-size: clamp(22px, 3vw, 28px);
  color: #1a1a1a;
}

.mg-faqs__list .faq__item {
  margin-bottom: 12px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  transition: box-shadow 200ms ease, border-color 200ms ease;
}

.mg-faqs__list .faq__item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.mg-faqs__list .faq__item--open {
  border-color: rgba(215, 25, 32, 0.2);
  box-shadow: 0 6px 24px rgba(215, 25, 32, 0.06);
}

.mg-faqs__list .faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 280ms ease;
}

/* --- Related Guides --- */
.mg-related {
  margin-top: 64px;
}

.mg-related__heading {
  margin: 0 0 24px;
  font-size: clamp(22px, 3vw, 28px);
  color: #1a1a1a;
}

.mg-related__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.mg-related-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.mg-related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  border-color: rgba(215, 25, 32, 0.15);
}

.mg-related-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #8b95a5;
}

.mg-related-card__category {
  color: var(--color-primary);
}

.mg-related-card__title {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: #1a1a1a;
}

.mg-related-card__text {
  margin: 0;
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
  color: #5b6472;
}

.mg-related-card__link {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
}

/* --- CTA --- */
.mg-cta {
  position: relative;
  margin-top: 64px;
  padding: 56px 40px;
  border-radius: 24px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.mg-cta__pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(215, 25, 32, 0.15), transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(215, 25, 32, 0.08), transparent 40%);
  pointer-events: none;
}

.mg-cta__title,
.mg-cta__subtitle,
.mg-cta__actions {
  position: relative;
  z-index: 1;
}

.mg-cta__title {
  margin: 0;
  font-size: clamp(26px, 3.5vw, 36px);
  line-height: 1.2;
}

.mg-cta__subtitle {
  margin: 16px auto 0;
  max-width: 52ch;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
}

.mg-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
}

.mg-cta__btn {
  min-width: 200px;
}

.mg-cta__btn--outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.mg-cta__btn--outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* --- Author --- */
.mg-author {
  margin-top: 48px;
}

.mg-author__card {
  padding: 32px 36px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

.mg-author__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.mg-author__name {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
}

.mg-author__bio {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: #5b6472;
}

/* --- Disclaimer --- */
.mg-disclaimer {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 13px;
  line-height: 1.7;
  color: #8b95a5;
}

.mg-disclaimer p {
  margin: 0;
}

.mg-disclaimer p + p {
  margin-top: 8px;
}

/* --- Official MYLEASE Guide Footer --- */
.mg-guide-footer {
  margin-top: 72px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.mg-guide-footer > * + * {
  margin-top: 56px;
}

.mg-footer-cta {
  position: relative;
  padding: 56px 40px;
  border-radius: 24px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.mg-footer-cta__pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(215, 25, 32, 0.18), transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(215, 25, 32, 0.1), transparent 40%);
  pointer-events: none;
}

.mg-footer-cta__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.mg-footer-cta__title {
  margin: 0;
  font-size: clamp(26px, 3.5vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.mg-footer-cta__desc {
  margin: 16px auto 0;
  max-width: 56ch;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
}

.mg-footer-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.mg-footer-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease, border-color 200ms ease;
}

.mg-footer-cta__btn--primary {
  background: var(--color-primary);
  color: #fff;
  border: 1px solid var(--color-primary);
}

.mg-footer-cta__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(215, 25, 32, 0.35);
}

.mg-footer-cta__btn--outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.mg-footer-cta__btn--outline:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.55);
}

.mg-footer-journey__title {
  margin: 0 0 28px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.02em;
  color: #1a1a1a;
  text-align: center;
}

.mg-solution-link-wrap {
  margin: 0 0 32px;
}

.mg-solution-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 28px;
  border-radius: 16px;
  border: 1px solid rgba(215, 25, 32, 0.15);
  background: rgba(215, 25, 32, 0.04);
  text-decoration: none;
  color: inherit;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.mg-solution-link:hover {
  border-color: rgba(215, 25, 32, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.mg-solution-link__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.mg-solution-link__title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.mg-solution-link__text {
  font-size: 14px;
  line-height: 1.6;
  color: #6b7280;
}

.mg-solution-link__cta {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
}

.mg-footer-journey__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.mg-journey-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px 24px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.mg-journey-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  border-color: rgba(215, 25, 32, 0.12);
}

.mg-journey-card__icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 16px;
}

.mg-journey-card__title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.mg-journey-card__text {
  margin: 0;
  flex: 1;
  font-size: 15px;
  line-height: 1.65;
  color: #5b6472;
}

.mg-journey-card__btn {
  display: inline-flex;
  align-items: center;
  margin-top: 20px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(215, 25, 32, 0.08);
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 200ms ease, color 200ms ease, transform 200ms ease;
}

.mg-journey-card:hover .mg-journey-card__btn {
  background: var(--color-primary);
  color: #fff;
}

.mg-footer-author__card {
  padding: 36px 40px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fb 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

.mg-footer-author__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.mg-footer-author__name {
  margin: 0;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.02em;
  color: #1a1a1a;
}

.mg-footer-author__tagline {
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
}

.mg-footer-author__desc {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.75;
  color: #5b6472;
}

.mg-footer-author__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 28px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.mg-footer-author__meta dt {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8b95a5;
}

.mg-footer-author__meta dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}

.mg-footer-reading__title {
  margin: 0 0 24px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.02em;
  color: #1a1a1a;
}

.mg-footer-reading__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.mg-reading-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.mg-reading-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  border-color: rgba(215, 25, 32, 0.15);
}

.mg-reading-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #8b95a5;
}

.mg-reading-card__category {
  color: var(--color-primary);
}

.mg-reading-card__title {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: #1a1a1a;
}

.mg-reading-card__text {
  margin: 0;
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
  color: #5b6472;
}

.mg-reading-card__btn {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(215, 25, 32, 0.08);
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  align-self: flex-start;
  transition: background 200ms ease, color 200ms ease;
}

.mg-reading-card:hover .mg-reading-card__btn {
  background: var(--color-primary);
  color: #fff;
}

.mg-footer-disclaimer {
  padding: 28px 32px;
  border-radius: 16px;
  background: #f3f4f6;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.mg-footer-disclaimer p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #6b7280;
}

.mg-footer-disclaimer p + p {
  margin-top: 10px;
}

.mg-footer-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 20px 0 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.mg-footer-nav__link,
.mg-footer-nav__home {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 200ms ease;
}

.mg-footer-nav__link {
  color: #374151;
}

.mg-footer-nav__link:hover {
  color: var(--color-primary);
}

.mg-footer-nav__link--prev {
  justify-self: start;
  text-align: left;
}

.mg-footer-nav__link--next {
  justify-self: end;
  text-align: right;
}

.mg-footer-nav__link.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.mg-footer-nav__home {
  justify-self: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #1a1a1a;
  white-space: nowrap;
}

.mg-footer-nav__home:hover {
  border-color: rgba(215, 25, 32, 0.2);
  color: var(--color-primary);
}

/* --- Sidebar --- */
.mg-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mg-sidebar__label {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5b6472;
}

.mg-sidebar__block {
  padding: 22px 20px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.mg-toc--desktop {
  margin: 0;
  padding: 22px 20px;
  max-height: calc(100vh - var(--header-height) - 80px);
  overflow-y: auto;
}

.mg-toc--desktop .mg-toc__list a {
  font-size: 13px;
  padding: 6px 0 6px 12px;
}

.mg-sidebar__search-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  font-size: 14px;
  background: #f8f9fb;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.mg-sidebar__search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.1);
  background: #fff;
}

.mg-sidebar__search-results {
  margin-top: 10px;
}

.mg-sidebar__search-results a {
  display: block;
  padding: 10px 0;
  font-size: 13px;
  color: #4a5568;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mg-sidebar__search-results a:hover {
  color: var(--color-primary);
}

.mg-sidebar__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mg-sidebar__links li + li {
  margin-top: 4px;
}

.mg-sidebar__links a {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  color: #4a5568;
  text-decoration: none;
  transition: color 150ms ease;
}

.mg-sidebar__links a:hover {
  color: var(--color-primary);
}

.mg-sidebar__guides {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mg-sidebar__guides li + li {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.mg-sidebar__guides a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.mg-sidebar__guides a:hover .mg-sidebar__guide-title {
  color: var(--color-primary);
}

.mg-sidebar__guide-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #1a1a1a;
  transition: color 150ms ease;
}

.mg-sidebar__guide-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #8b95a5;
}

.mg-sidebar__downloads {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mg-sidebar__downloads li + li {
  margin-top: 10px;
}

.mg-sidebar__downloads a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #4a5568;
  text-decoration: none;
  transition: color 150ms ease;
}

.mg-sidebar__downloads a:hover {
  color: var(--color-primary);
}

.mg-sidebar__downloads svg {
  flex-shrink: 0;
  color: var(--color-primary);
}

.mg-sidebar__cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mg-sidebar__cta-btn {
  display: block;
  padding: 14px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}

.mg-sidebar__cta-btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.mg-sidebar__cta-btn--primary:hover {
  background: var(--color-primary-dark);
}

.mg-sidebar__cta-btn--outline {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: #1a1a1a;
}

.mg-sidebar__cta-btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* --- Error state --- */
.mg-error {
  padding: 80px 24px;
  text-align: center;
}

.mg-error__title {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
}

.mg-error__text {
  margin: 0 0 24px;
  font-size: 16px;
  color: #5b6472;
}

.mg-error__btn {
  display: inline-block;
}

/* --- Responsive --- */
@media (max-width: 1100px) {
  .mg-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .mg-takeaways__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mg-sidebar {
    position: static;
    order: 2;
    margin-top: 48px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .mg-toc--desktop {
    display: none;
  }

  .mg-toc--mobile {
    display: block;
  }

  .mg-sidebar__cta {
    grid-column: 1 / -1;
    flex-direction: row;
  }

  .mg-sidebar__cta-btn {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .mg-header-band__inner {
    flex-direction: column;
  }

  .mg-header-band__meta {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .mg-hero__content {
    padding: 40px 24px 48px;
  }

  .mg-main {
    max-width: none;
  }

  .mg-checklist__grid,
  .mg-takeaways__grid,
  .mg-related__grid,
  .mg-footer-journey__grid,
  .mg-footer-reading__grid {
    grid-template-columns: 1fr;
  }

  .mg-footer-author__meta {
    grid-template-columns: 1fr;
  }

  .mg-footer-nav {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .mg-footer-nav__link--prev,
  .mg-footer-nav__link--next {
    justify-self: center;
    text-align: center;
  }

  .mg-footer-cta {
    padding: 40px 24px;
  }

  .mg-footer-cta__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .mg-footer-author__card {
    padding: 28px 24px;
  }

  .mg-sidebar {
    grid-template-columns: 1fr;
  }

  .mg-sidebar__cta {
    flex-direction: column;
  }

  .mg-cta {
    padding: 40px 24px;
  }

  .mg-cta__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .mg-summary {
    padding: 22px 20px;
  }

  .mg-callout {
    flex-direction: column;
    padding: 22px 20px;
  }
}

@media (max-width: 480px) {
  .mg-header-band__meta {
    grid-template-columns: 1fr;
  }
}

/* Keep guide reading content visible — scroll-reveal can fail on mobile
   (iOS + overflow-x:hidden) leaving opacity:0 blocks unreadable */
body.page-guide .reveal {
  opacity: 1;
  transform: none;
}

body.page-guide .mg-article figure img {
  display: block;
  max-width: 100%;
  height: auto;
}
