:root {
  --primary: #e8b84a;
  --primary-hover: #f3c96a;
  --primary-ink: #1a1404;
  --secondary: #3d7cff;
  --background: #0b1220;
  --surface: #121a2b;
  --surface-alt: #1a2438;
  --text: #f4f7fb;
  --text-muted: #9aa8c0;
  --border: #2a3650;
  --success: #3ddc97;
  --warning: #f0a202;
  --danger: #ff6b6b;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  --radius: 10px;
  --radius-lg: 16px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --header-h: 4.25rem;
  --container: 1180px;
  --narrow: 760px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --focus: 0 0 0 3px var(--background), 0 0 0 5px var(--primary);
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.mg-skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  background: var(--primary);
  color: var(--primary-ink);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 650;
}

.mg-skip:focus {
  top: 1rem;
  color: var(--primary-ink);
}

.mg-container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.mg-container--narrow {
  width: min(100% - 2rem, var(--narrow));
}

.mg-main {
  padding: calc(var(--header-h) + 1.5rem) 0 var(--space-8);
  min-height: 70vh;
}

.mg-main--home {
  padding-top: var(--header-h);
}

.mg-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--background) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.mg-header__inner {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mg-header__brand {
  flex: 0 0 auto;
}

.mg-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mg-logo:hover {
  color: var(--text);
}

.custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.custom-logo {
  height: 36px;
  width: auto;
}

.mg-logo__mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 0.75rem;
  font-weight: 800;
}

.mg-logo__text {
  font-size: 1.05rem;
}

.mg-header__cta {
  margin-left: auto;
  flex: 0 0 auto;
}

.mg-nav {
  margin-left: 0.5rem;
}

.mg-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mg-nav__list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 550;
}

.mg-nav__list a:hover,
.mg-nav__list .current-menu-item > a,
.mg-nav__list .current_page_item > a {
  color: var(--text);
}

.mg-nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.mg-nav-toggle__bars,
.mg-nav-toggle__bars::before,
.mg-nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
  margin: 0 auto;
}

.mg-nav-toggle__bars::before,
.mg-nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.mg-nav-toggle__bars::before {
  top: -6px;
}

.mg-nav-toggle__bars::after {
  top: 6px;
}

.mg-nav-backdrop {
  display: none;
}

.mg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}

.mg-btn--sm {
  min-height: 40px;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
}

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

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

.mg-btn--secondary {
  background: var(--surface-alt);
  color: var(--text);
  border-color: var(--border);
}

.mg-btn--secondary:hover {
  color: var(--text);
  border-color: var(--primary);
}

.mg-btn--ghost,
.mg-btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

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

.mg-btn--text {
  background: none;
  border: 0;
  color: var(--primary);
  min-height: auto;
  padding: 0.25rem 0;
}

.mg-kicker {
  margin: 0 0 0.4rem;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 650;
  color: var(--text);
}

h1 {
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  margin: 0 0 0.75rem;
}

h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.mg-page-header {
  margin-bottom: var(--space-6);
}

.mg-page-header p,
.mg-archive-desc {
  max-width: 42rem;
}

.mg-breadcrumbs {
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}

.mg-breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
}

.mg-breadcrumbs__item:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  opacity: 0.6;
}

.mg-breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.mg-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
  padding: var(--space-7) 0 var(--space-6);
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.mg-hero__copy p {
  font-size: 1.08rem;
  max-width: 38rem;
}

.mg-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 1rem;
}

.mg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mg-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

.mg-hero__visual {
  position: relative;
  min-height: 320px;
}

.mg-phone {
  width: min(100%, 280px);
  margin-inline: auto;
  filter: drop-shadow(var(--shadow));
}

.mg-section {
  padding: var(--space-7) 0;
  width: 100%;
}

.mg-section .mg-section__intro,
.mg-section > h2,
.mg-section > p,
.mg-section > .wp-block-heading,
.mg-section > .wp-block-paragraph {
  width: min(100% - 2rem, var(--narrow));
  margin-left: auto;
  margin-right: auto;
}

.mg-section .mg-grid,
.mg-section .mg-table-wrap,
.mg-section .mg-download,
.mg-section .mg-cta,
.mg-section .mg-faq,
.mg-section .mg-notice,
.mg-section .wp-block-group.mg-grid,
.mg-section .wp-block-group.mg-table-wrap,
.mg-section .wp-block-group.mg-cta,
.mg-section .wp-block-group.mg-notice {
  width: min(100% - 2rem, var(--container));
  margin-left: auto;
  margin-right: auto;
}

.mg-is-home .mg-content > * {
  max-width: min(100% - 2rem, var(--container));
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.mg-is-home .mg-content > .mg-section--surface,
.mg-is-home .mg-content > .mg-section--alt,
.mg-is-home .mg-content > .wp-block-group.mg-section--surface,
.mg-is-home .mg-content > .wp-block-group.mg-section--alt {
  max-width: none;
  width: 100%;
}

.mg-section--surface {
  background: var(--surface);
}

.mg-section--alt {
  background: var(--surface-alt);
}

.mg-section__intro {
  max-width: 44rem;
  margin-bottom: var(--space-6);
}

.mg-grid {
  display: grid;
  gap: 1rem;
}

.mg-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

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

.mg-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.mg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.mg-section--surface .mg-card,
.mg-section--alt .mg-card {
  background: var(--background);
}

.mg-card h3 {
  margin-top: 0.35rem;
}

.mg-card p:last-child {
  margin-bottom: 0;
}

.mg-card__icon {
  width: 36px;
  height: 36px;
  color: var(--primary);
}

.mg-sports-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  background:
    linear-gradient(180deg, transparent 20%, rgba(11, 18, 32, 0.92) 100%),
    radial-gradient(circle at 80% 0%, color-mix(in srgb, var(--primary) 28%, transparent), transparent 50%),
    var(--surface-alt);
}

.mg-sports-card:hover {
  color: var(--text);
  border-color: var(--primary);
}

.mg-sports-card strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.mg-sports-card span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.mg-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.mg-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.mg-table th,
.mg-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.mg-table th {
  width: 34%;
  color: var(--text);
  font-weight: 600;
  background: var(--surface-alt);
}

.mg-table td {
  color: var(--text-muted);
}

.mg-table tr:last-child th,
.mg-table tr:last-child td {
  border-bottom: 0;
}

.mg-notice {
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  color: var(--text-muted);
}

.mg-notice--warning {
  border-left-color: var(--warning);
}

.mg-notice--success {
  border-left-color: var(--success);
}

.mg-download {
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--primary) 16%, transparent), transparent 46%),
    var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.mg-download__title {
  margin-top: 0;
}

.mg-download .mg-btn {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.mg-download__note {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.mg-steps {
  counter-reset: mgstep;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.mg-steps li {
  counter-increment: mgstep;
  position: relative;
  padding: 0 0 1.25rem 3rem;
  color: var(--text-muted);
}

.mg-steps li::before {
  content: counter(mgstep);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
}

.mg-faq {
  display: grid;
  gap: 0.65rem;
}

.mg-faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.15rem 1rem 0.15rem;
}

.mg-faq-item summary {
  cursor: pointer;
  font-weight: 650;
  padding: 0.9rem 0;
  list-style: none;
}

.mg-faq-item summary::-webkit-details-marker {
  display: none;
}

.mg-faq-item summary::after {
  content: "+";
  float: right;
  color: var(--primary);
  font-weight: 400;
}

.mg-faq-item[open] summary::after {
  content: "–";
}

.mg-faq-item p:last-child {
  margin-bottom: 1rem;
}

.mg-cta {
  text-align: center;
  padding: var(--space-7) 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.mg-cta p {
  max-width: 36rem;
  margin-inline: auto;
}

.mg-article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.mg-article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mg-article-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--surface-alt);
  overflow: hidden;
}

.mg-article-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mg-article-card__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--primary) 35%, transparent), transparent 45%),
    var(--surface-alt);
}

.mg-article-card__body {
  padding: 1rem 1.1rem 1.2rem;
}

.mg-article-card__title {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.mg-article-card__title a {
  color: var(--text);
  text-decoration: none;
}

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

.mg-article-card__meta {
  margin: 0;
  font-size: 0.85rem;
}

.mg-related {
  margin-top: var(--space-7);
}

.mg-layout {
  display: grid;
  gap: 2rem;
}

.mg-layout--sidebar {
  grid-template-columns: minmax(0, 1fr) 280px;
}

.mg-article__meta {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.mg-article__hero {
  margin: 0 0 1.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.mg-article__hero img {
  width: 100%;
}

.mg-toc {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 0 0 1.5rem;
}

.mg-toc__title {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-weight: 650;
}

.mg-toc__list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
}

.mg-widget {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.mg-widget__title {
  font-size: 1rem;
}

.mg-post-nav .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0 0;
}

.mg-post-nav__label {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.mg-post-nav a {
  display: block;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem;
}

.mg-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.mg-form input,
.mg-form textarea,
.mg-search__input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  font: inherit;
}

.mg-form__hp {
  position: absolute;
  left: -9999px;
}

.mg-search {
  display: flex;
  gap: 0.5rem;
  max-width: 28rem;
}

.mg-footer {
  border-top: 1px solid var(--border);
  background: #080d18;
  padding: var(--space-7) 0 1.5rem;
}

.mg-footer__grid {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}

.mg-footer__heading {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

.mg-footer__list a {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
}

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

.mg-footer__bottom {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.mg-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 0;
}

.mg-footer__legal a {
  color: var(--text-muted);
  text-decoration: none;
}

.mg-content .alignwide {
  max-width: var(--container);
}

.mg-content > * {
  max-width: var(--narrow);
  margin-left: auto;
  margin-right: auto;
}

.mg-content > .alignwide,
.mg-content > .mg-hero,
.mg-content > .mg-section,
.mg-page .mg-content > .wp-block-group.alignwide,
.mg-page .mg-content > .wp-block-group.alignfull {
  max-width: var(--container);
  width: min(100% - 2rem, var(--container));
}

.mg-page .mg-content > .wp-block-group.alignfull {
  width: 100%;
  max-width: none;
}

.mg-is-home .mg-page-header,
.mg-is-home .mg-page > .mg-container .mg-page-header {
  display: none;
}

.wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.wp-block-button__link {
  border-radius: var(--radius) !important;
}

.page-numbers {
  display: inline-flex;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}

.page-numbers a,
.page-numbers span {
  min-width: 40px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.page-numbers .current {
  border-color: var(--primary);
  color: var(--primary);
}

@media (max-width: 1024px) {
  .mg-hero,
  .mg-grid--3,
  .mg-grid--4,
  .mg-article-grid,
  .mg-footer__grid,
  .mg-layout--sidebar {
    grid-template-columns: 1fr 1fr;
  }

  .mg-nav__list a {
    padding-inline: 0.5rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 880px) {
  .mg-header__cta {
    order: 2;
    margin-left: 0;
  }

  .mg-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 3;
    margin-left: auto;
  }

  .mg-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(100%, 22rem);
    background: var(--background);
    border-left: 1px solid var(--border);
    padding: 5rem 1.25rem 2rem;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.22s ease, visibility 0.22s ease;
    z-index: 60;
    overflow-y: auto;
  }

  .mg-nav.is-open {
    transform: translateX(0);
    visibility: visible;
  }

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

  .mg-nav__list a {
    width: 100%;
    font-size: 1.05rem;
  }

  .mg-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 55;
  }

  .mg-nav-backdrop[hidden] {
    display: none;
  }

  body.mg-nav-open {
    overflow: hidden;
  }
}

@media (max-width: 720px) {
  .mg-hero,
  .mg-grid--2,
  .mg-grid--3,
  .mg-grid--4,
  .mg-article-grid,
  .mg-footer__grid,
  .mg-layout--sidebar,
  .mg-post-nav .nav-links {
    grid-template-columns: 1fr;
  }

  .mg-hero {
    padding-top: 2rem;
    gap: 1.5rem;
  }

  .mg-hero__visual {
    min-height: 0;
    order: -1;
  }

  .mg-phone {
    width: min(100%, 220px);
  }

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

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

  .mg-table th,
  .mg-table td {
    display: block;
    width: 100%;
  }

  .mg-table th {
    border-bottom: 0;
    padding-bottom: 0.2rem;
  }
}

@media (max-width: 360px) {
  html {
    font-size: 16px;
  }

  .mg-logo__text {
    max-width: 9.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
