/* Metadata Editor — Theme Stylesheet (1:1 parity with Chakra UI layout & typography) */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  color: #1A202C;
  background: #FFFFFF;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #1A202C;
  background: #FFFFFF;
}

main.me-main {
  flex: 1;
}

:focus-visible {
  outline: 2px solid #3182CE;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Containers */
.me-container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.me-container--hub {
  max-width: 1100px;
}

.me-container--article {
  max-width: 820px;
}

.me-container--narrow {
  max-width: 800px;
}

/* Header */
.me-header {
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  position: sticky;
  top: 0;
  z-index: 20;
}

.me-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.me-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2B6CB0;
  text-decoration: none;
}

.me-brand:hover {
  color: #2C5282;
  text-decoration: none;
}

.me-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .me-nav {
    display: flex;
  }
  .me-menu-toggle {
    display: none !important;
  }
}

.me-nav__link {
  font-size: 0.875rem;
  font-weight: 400;
  color: #4A5568;
  text-decoration: none;
  transition: color 0.15s ease;
}

.me-nav__link:hover,
.me-nav__link--active {
  color: #2B6CB0;
}

.me-nav__link--active {
  font-weight: 600;
}

.me-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  color: #2D3748;
}

.me-menu-toggle:hover {
  background: #EDF2F7;
}

/* Language Menu */
.me-lang-menu {
  position: relative;
}

.me-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 0.375rem;
  cursor: pointer;
  color: #2D3748;
}

.me-lang-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 200px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 0.35rem 0;
  z-index: 30;
}

.me-lang-menu.is-open .me-lang-dropdown {
  display: block;
}

.me-lang-dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #2D3748;
  text-decoration: none;
}

.me-lang-dropdown a:hover {
  background: #EDF2F7;
}

.me-lang-dropdown a[aria-current="true"] {
  font-weight: 600;
  color: #2B6CB0;
}

/* Mobile Drawer */
.me-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 40;
}

.me-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: #FFFFFF;
  z-index: 50;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  flex-direction: column;
}

body.me-drawer-open .me-drawer-backdrop {
  display: block;
}

body.me-drawer-open .me-drawer {
  display: flex;
}

.me-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #E2E8F0;
  font-weight: 700;
  font-size: 1.125rem;
}

.me-drawer__close {
  background: transparent;
  border: 0;
  font-size: 1.25rem;
  cursor: pointer;
  color: #4A5568;
  padding: 0.25rem 0.5rem;
}

.me-drawer__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
}

.me-drawer__link {
  padding: 0.5rem 0;
  color: #2D3748;
  text-decoration: none;
  font-size: 1rem;
}

.me-drawer__link--active,
.me-drawer__link:hover {
  color: #2B6CB0;
}

.me-drawer__link--active {
  font-weight: 600;
}

/* Hero Banners */
.me-hero {
  color: #FFFFFF;
  padding: 2.5rem 0;
  text-align: center;
}

@media (min-width: 768px) {
  .me-hero {
    padding: 4rem 0;
  }
}

.me-hero--blue {
  background: #2B6CB0;
}

.me-hero--green {
  background: #2F855A;
}

.me-hero--red {
  background: #C53030;
}

.me-hero__h1 {
  margin: 0 0 0.75rem;
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .me-hero__h1 {
    font-size: 2.5rem;
  }
  .me-hero--home .me-hero__h1 {
    font-size: 3rem;
  }
}

.me-hero__lead {
  margin: 0 auto;
  max-width: 700px;
  font-size: 1.0625rem;
  line-height: 1.65;
  opacity: 0.92;
}

@media (min-width: 768px) {
  .me-hero__lead {
    font-size: 1.1875rem;
  }
}

.me-byline {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: #718096;
}

.me-byline a {
  color: inherit;
  text-decoration: underline;
}

.me-byline--light {
  color: rgba(255, 255, 255, 0.85);
}

.me-updated {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: #718096;
}

.me-updated--light {
  color: rgba(255, 255, 255, 0.75);
}

/* Tool Widget Shell */
.me-tool-box {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
  .me-tool-box {
    padding: 2rem;
  }
}

.me-tool-box__heading {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

.me-tool-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #4A5568;
}

.me-widget-placeholder {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #BEE3F8;
  border-radius: 0.75rem;
  background: #EBF8FF;
  color: #4A5568;
  font-size: 0.9375rem;
}

.me-widget-placeholder--red {
  border-color: #FED7D7;
  background: #FFF5F5;
}

/* Breadcrumbs */
.me-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: #718096;
  margin-bottom: 1rem;
}

.me-breadcrumbs a {
  color: #4A5568;
  text-decoration: none;
}

.me-breadcrumbs a:hover {
  color: #2B6CB0;
  text-decoration: underline;
}

.me-breadcrumbs__sep {
  color: #CBD5E0;
}

/* Sections & Grids */
.me-section {
  padding-top: 2.75rem;
  padding-bottom: 2.75rem;
}

.me-section__h2 {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1A202C;
}

.me-section__h2--center {
  text-align: center;
}

.me-section__h3 {
  margin: 2rem 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: #1A202C;
}

.me-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .me-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .me-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.me-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

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

.me-grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .me-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .me-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Cards */
.me-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.me-card-link:hover {
  border-color: #63B3ED;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}

.me-card-link--compact {
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
}

.me-card-link--compact:hover {
  transform: none;
}

.me-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.me-card-icon--blue { background: #EBF8FF; color: #3182CE; }
.me-card-icon--green { background: #F0FFF4; color: #38A169; }
.me-card-icon--red { background: #FFF5F5; color: #E53E3E; }

.me-card-title {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1A202C;
}

.me-card-title--blue {
  font-size: 1rem;
  font-weight: 600;
  color: #2C5282;
}

.me-card-meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  color: #718096;
  margin: 0 0 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.me-card-desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #4A5568;
}

.me-soft-card {
  background: #F7FAFC;
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.me-soft-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.me-soft-card__title--blue { color: #2B6CB0; }
.me-soft-card__title--green { color: #2F855A; }
.me-soft-card__title--red { color: #C53030; }

.me-step-circle {
  width: 60px;
  height: 60px;
  border-radius: 9999px;
  background: #EBF8FF;
  color: #2B6CB0;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

/* Inline Elements & Prose */
.me-prose {
  color: #2D3748;
  line-height: 1.75;
  font-size: 1.0625rem;
}

.me-prose p {
  margin: 0 0 1rem;
}

.me-prose h2,
.me-article h2 {
  margin: 2.5rem 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1A202C;
  scroll-margin-top: 80px;
}

.me-prose h3,
.me-article h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: #1A202C;
  scroll-margin-top: 80px;
}

.me-prose ul,
.me-prose ol,
.me-article ul,
.me-article ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.me-prose li,
.me-article li {
  margin-bottom: 0.45rem;
}

.me-article {
  color: #2D3748;
  line-height: 1.75;
  font-size: 1.0625rem;
}

.me-article p {
  margin: 0 0 1rem;
}

.me-strong,
.me-article strong {
  font-weight: 600;
  color: #1A202C;
}

.me-inline-code,
.me-article :not(pre) > code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  background: #EDF2F7;
  color: #1A202C;
  padding: 0.12rem 0.35rem;
  border-radius: 0.25rem;
  word-break: break-word;
}

.me-inline-link,
.me-article a {
  color: #2B6CB0;
  text-decoration: underline;
}

.me-inline-link:hover,
.me-article a:hover {
  color: #2C5282;
}

.me-article pre,
.me-code-block {
  background: #171923;
  color: #EDF2F7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 1rem;
  border-radius: 0.375rem;
  overflow-x: auto;
  margin: 0 0 1.25rem;
}

.me-article pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.me-note,
.me-article blockquote {
  margin: 0 0 1.25rem;
  border-left: 4px solid #4299E1;
  background: #EBF8FF;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  color: #2D3748;
}

.me-note p:last-child,
.me-article blockquote p:last-child {
  margin-bottom: 0;
}

/* Tables */
.me-table-wrap,
.me-article figure.wp-block-table {
  margin: 0 0 1.5rem;
  border: 1px solid #E2E8F0;
  border-radius: 0.375rem;
  overflow-x: auto;
}

.me-table,
.me-article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.me-table thead,
.me-article thead {
  background: #F7FAFC;
}

.me-table th,
.me-article th {
  text-align: left;
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  color: #2D3748;
  border-bottom: 1px solid #E2E8F0;
}

.me-table td,
.me-article td {
  padding: 0.65rem 0.85rem;
  vertical-align: top;
  border-bottom: 1px solid #EDF2F7;
  color: #2D3748;
}

.me-table tr:last-child td,
.me-article tr:last-child td {
  border-bottom: 0;
}

/* Article Header, Facts & TOC */
.me-page-h1 {
  margin: 0 0 0.75rem;
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.2;
  color: #1A202C;
}

@media (min-width: 768px) {
  .me-page-h1 {
    font-size: 2.25rem;
  }
}

.me-facts-box {
  border: 1px solid #E2E8F0;
  border-radius: 0.5rem;
  background: #F7FAFC;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}

.me-facts-box__title {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #718096;
}

.me-facts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.me-facts-table th {
  width: 38%;
  text-align: left;
  padding: 0.35rem 0.75rem 0.35rem 0;
  font-weight: 600;
  color: #4A5568;
  vertical-align: top;
}

.me-facts-table td {
  padding: 0.35rem 0;
  color: #1A202C;
  vertical-align: top;
}

.me-toc {
  border: 1px solid #E2E8F0;
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.me-toc__title {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.me-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.me-toc__list a {
  font-size: 0.875rem;
  color: #2B6CB0;
  text-decoration: none;
}

.me-toc__list a:hover {
  text-decoration: underline;
}

/* FAQ Accordion */
.me-faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.me-faq-item {
  border: 1px solid #E2E8F0;
  border-radius: 0.375rem;
  background: #FFFFFF;
}

.me-faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  color: #1A202C;
}

.me-faq-trigger:hover {
  background: #F7FAFC;
}

.me-faq-trigger h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.me-faq-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: #718096;
}

.me-faq-item.is-open .me-faq-chevron {
  transform: rotate(180deg);
}

.me-faq-panel {
  display: none;
  padding: 0 1.25rem 1rem;
  color: #4A5568;
  line-height: 1.7;
  font-size: 0.95rem;
}

.me-faq-item.is-open .me-faq-panel {
  display: block;
}

/* Footer */
.me-footer {
  background: #F7FAFC;
  border-top: 1px solid #E2E8F0;
  margin-top: 4rem;
}

.me-footer__inner {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.me-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .me-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .me-footer__grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
  .me-footer__grid--5 {
    grid-template-columns: repeat(5, 1fr);
  }
}

.me-footer__heading {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #718096;
}

.me-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.me-footer__links a {
  font-size: 0.875rem;
  color: #4A5568;
  text-decoration: none;
}

.me-footer__links a:hover {
  color: #2B6CB0;
}

.me-footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #E2E8F0;
  font-size: 0.875rem;
  color: #718096;
}

@media (min-width: 768px) {
  .me-footer__bottom {
    flex-direction: row;
  }
}

.me-footer__bottom a {
  color: #2B6CB0;
  text-decoration: none;
}

.me-footer__bottom a:hover {
  text-decoration: underline;
}

/* AdSense container */
.me-ad-slot {
  margin: 1.5rem 0;
  text-align: center;
  width: 100%;
}
