:root {
  --mcg-ink: #14213d;
  --mcg-muted: #52627a;
  --mcg-blue: #155eef;
  --mcg-blue-dark: #0b2b63;
  --mcg-aqua: #0f8276;
  --mcg-soft: #f3f7fc;
  --mcg-line: #dce5f0;
  --mcg-white: #fff;
  --mcg-shadow: 0 18px 45px rgba(15, 35, 70, .10);
}

.mcg-apl-page .site-content { background: #f8fafc; }
.mcg-apl-page .ast-container { max-width: none; padding: 0; }
.mcg-apl-page .content-area { width: 100%; margin: 0; }
.mcg-apl-page .site-main { margin: 0; }
.mcg-apl-landing-page .entry-header { display: none; }
.mcg-apl-landing-page .entry-content { margin: 0; }

.mcg-apl-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 72px;
  color: var(--mcg-ink);
  font-size: 17px;
  line-height: 1.68;
}

.mcg-apl-shell *, .mcg-apl-shell *::before, .mcg-apl-shell *::after { box-sizing: border-box; }
.mcg-apl-shell h1, .mcg-apl-shell h2, .mcg-apl-shell h3 { color: var(--mcg-ink); line-height: 1.16; letter-spacing: -.025em; }
.mcg-apl-shell h1 { font-size: clamp(2.25rem, 5vw, 4.6rem); margin: .1em 0 .28em; }
.mcg-apl-shell h2 { font-size: clamp(1.65rem, 3vw, 2.5rem); margin: 0 0 .55em; }
.mcg-apl-shell h3 { font-size: 1.18rem; margin: 0 0 .5em; }
.mcg-apl-shell p { margin: 0 0 1em; }
.mcg-apl-shell a { color: #0b55c9; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.mcg-apl-shell a:focus-visible, .mcg-apl-shell button:focus-visible, .mcg-apl-shell input:focus-visible, .mcg-apl-shell select:focus-visible { outline: 3px solid #ffbf47; outline-offset: 3px; }

.mcg-apl-kicker, .mcg-apl-eyebrow {
  color: var(--mcg-blue);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.mcg-apl-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 48px;
  align-items: center;
  min-height: 470px;
  padding: clamp(32px, 6vw, 74px);
  color: #fff;
  background: radial-gradient(circle at 85% 20%, rgba(38, 184, 203, .28), transparent 28%), linear-gradient(135deg, #0a214b, #16488f);
  border-radius: 28px;
  box-shadow: var(--mcg-shadow);
  overflow: hidden;
}
.mcg-apl-hero h1, .mcg-apl-hero h2, .mcg-apl-hero .mcg-apl-kicker { color: #fff; }
.mcg-apl-hero h2 { font-size: clamp(2.25rem, 5vw, 4.6rem); margin: .1em 0 .28em; }
.mcg-apl-hero .mcg-apl-kicker { opacity: .78; }
.mcg-apl-lead { max-width: 760px; font-size: clamp(1.08rem, 2vw, 1.3rem); color: #e6eefb; }
.mcg-apl-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 27px; }
.mcg-apl-button, .mcg-apl-shell .mcg-apl-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 10px;
  color: #fff;
  font-weight: 750;
  text-decoration: none;
}
.mcg-apl-shell .mcg-apl-button-primary { background: #fff; color: #0b3474; border-color: #fff; }

.mcg-apl-hero-diagram { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.mcg-apl-hero-diagram span { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.32); border-radius: 22px; background: rgba(255,255,255,.10); font-size: 1.8rem; font-weight: 800; backdrop-filter: blur(4px); }
.mcg-apl-hero-diagram small { display: block; font-size: .82rem; letter-spacing: .05em; }

.mcg-apl-section { margin-top: 76px; }
.mcg-apl-section-head { display: flex; gap: 30px; justify-content: space-between; align-items: end; margin-bottom: 25px; }
.mcg-apl-section-head > p { max-width: 430px; color: var(--mcg-muted); }
.mcg-apl-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.mcg-apl-category-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 255px;
  padding: 26px;
  border: 1px solid var(--mcg-line);
  border-radius: 18px;
  background: #fff;
  color: var(--mcg-ink) !important;
  text-decoration: none !important;
  box-shadow: 0 5px 20px rgba(15,35,70,.045);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.mcg-apl-category-card:hover { transform: translateY(-3px); border-color: #a9c6f4; box-shadow: var(--mcg-shadow); }
.mcg-apl-category-card p { color: var(--mcg-muted); flex: 1; }
.mcg-apl-category-card > span:last-child { color: var(--mcg-blue); font-size: .9rem; font-weight: 750; }
.mcg-apl-category-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 18px; border-radius: 12px; background: #eaf2ff; font-size: 1.3rem; }

.mcg-apl-method, .mcg-apl-category-guide, .mcg-apl-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; }
.mcg-apl-method { padding: clamp(28px, 5vw, 52px); border-radius: 24px; background: #eaf3ff; }
.mcg-apl-method ol { margin: 0; padding-left: 1.25em; }
.mcg-apl-method li + li { margin-top: 12px; }
.mcg-apl-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mcg-apl-guide-grid a { display: block; padding: 24px; border-left: 4px solid var(--mcg-aqua); border-radius: 0 14px 14px 0; background: #fff; color: var(--mcg-ink); text-decoration: none; }
.mcg-apl-guide-grid p { color: var(--mcg-muted); }
.mcg-apl-policy { padding: 30px; border: 1px solid #c9d9e9; border-radius: 18px; background: #fff; }

.mcg-apl-breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 34px; color: var(--mcg-muted); font-size: .9rem; }
.mcg-apl-page-header { max-width: 900px; margin-bottom: 38px; }
.mcg-apl-page-header h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
.mcg-apl-page-header > p:last-child { color: var(--mcg-muted); font-size: 1.1rem; }

.mcg-apl-search { display: grid; grid-template-columns: 1.5fr minmax(220px, .7fr) auto; gap: 12px; align-items: end; padding: 22px; border: 1px solid var(--mcg-line); border-radius: 16px; background: #fff; }
.mcg-apl-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.mcg-apl-search input, .mcg-apl-search select { width: 100%; min-height: 50px; margin: 0; border: 1px solid #aebbc9; border-radius: 8px; background: #fff; color: var(--mcg-ink); }
.mcg-apl-search button, .mcg-apl-copy { min-height: 46px; padding: 10px 18px; border: 0; border-radius: 8px; background: var(--mcg-blue); color: #fff; font-weight: 750; cursor: pointer; }
.mcg-apl-results { margin: 24px 0; color: var(--mcg-muted); }

.mcg-apl-prompt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.mcg-apl-prompt-grid-single { grid-template-columns: 1fr; }
.mcg-apl-prompt-card { min-width: 0; padding: 24px; border: 1px solid var(--mcg-line); border-radius: 18px; background: #fff; box-shadow: 0 5px 18px rgba(15,35,70,.04); }
.mcg-apl-card-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; }
.mcg-apl-reviewed { flex: 0 0 auto; padding: 4px 8px; border-radius: 99px; background: #dff7ef; color: #07594e; font-size: .72rem; font-weight: 750; }
.mcg-apl-prompt-text { max-height: 380px; margin: 18px 0; padding: 18px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid #d5e0ec; border-radius: 12px; background: #f6f8fb; color: #18243a; font: 14px/1.62 ui-monospace, SFMono-Regular, Consolas, monospace; }
.mcg-apl-prompt-text code { white-space: inherit; overflow-wrap: inherit; background: transparent; color: inherit; }
.mcg-apl-variables { color: var(--mcg-muted); font-size: .9rem; overflow-wrap: anywhere; }
.mcg-apl-card-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.mcg-apl-copy.is-copied { background: var(--mcg-aqua); }

.mcg-apl-category-guide { margin-bottom: 34px; }
.mcg-apl-category-guide > div, .mcg-apl-category-guide aside, .mcg-apl-detail-grid section { padding: 27px; border: 1px solid var(--mcg-line); border-radius: 16px; background: #fff; }
.mcg-apl-category-guide ol { margin-bottom: 0; }
.mcg-apl-feature-link { padding: 18px 22px; border-radius: 12px; background: #eaf3ff; }
.mcg-apl-detail { max-width: 930px; }
.mcg-apl-prompt-detail .mcg-apl-prompt-text { max-height: none; }
.mcg-apl-detail-grid { margin: 24px 0; }
.mcg-apl-related { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.mcg-apl-related a { padding: 14px 16px; border: 1px solid var(--mcg-line); border-radius: 10px; background: #fff; }
.mcg-apl-pagination { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 36px; }
.mcg-apl-pagination .page-numbers { display: inline-grid; min-width: 42px; min-height: 42px; place-items: center; padding: 6px 10px; border: 1px solid var(--mcg-line); border-radius: 8px; background: #fff; text-decoration: none; }
.mcg-apl-pagination .current { background: var(--mcg-blue-dark); color: #fff; }
.mcg-apl-empty { padding: 36px; border: 1px dashed #9fb1c7; border-radius: 16px; text-align: center; }

@media (max-width: 900px) {
  .mcg-apl-category-grid, .mcg-apl-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mcg-apl-hero { grid-template-columns: 1fr; min-height: auto; }
  .mcg-apl-hero-diagram { grid-template-columns: repeat(4, 1fr); }
  .mcg-apl-search { grid-template-columns: 1fr 1fr; }
  .mcg-apl-search button { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .mcg-apl-shell { width: min(100% - 28px, 1180px); padding: 26px 0 54px; font-size: 16px; }
  .mcg-apl-hero { gap: 26px; padding: 30px 22px; border-radius: 20px; }
  .mcg-apl-hero h1, .mcg-apl-hero h2 { font-size: 2.3rem; }
  .mcg-apl-hero-diagram { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .mcg-apl-actions, .mcg-apl-button { width: 100%; }
  .mcg-apl-category-grid, .mcg-apl-guide-grid, .mcg-apl-method, .mcg-apl-category-guide, .mcg-apl-detail-grid, .mcg-apl-prompt-grid, .mcg-apl-related, .mcg-apl-search { grid-template-columns: 1fr; }
  .mcg-apl-category-card { min-height: 0; }
  .mcg-apl-section { margin-top: 54px; }
  .mcg-apl-section-head { display: block; }
  .mcg-apl-card-head { display: block; }
  .mcg-apl-reviewed { display: inline-block; margin-bottom: 10px; }
  .mcg-apl-prompt-card { padding: 18px; }
  .mcg-apl-prompt-text { padding: 14px; font-size: 13px; }
	.mcg-apl-prompt-grid .mcg-apl-prompt-text { max-height: 240px; }
	.mcg-apl-prompt-detail .mcg-apl-prompt-text { max-height: none; }
  .mcg-apl-search button { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .mcg-apl-category-card { transition: none; }
}

/* Preserve Kadence mobile drawer states when LiteSpeed UCSS removes hidden rules. */
@media (max-width: 1024px) {
  #mobile-drawer.show-drawer {
    display: block !important;
    left: 0;
    right: 0;
  }

  #mobile-drawer.show-drawer.active .drawer-overlay { opacity: 1; }

  #mobile-drawer.show-drawer.active .drawer-inner {
    opacity: 1;
    transform: translateX(0);
  }

  #mobile-menu .sub-menu.show-drawer { display: block !important; }
}
