/* MTG Article Sidebar 1.5 — one clear action, quiet editorial navigation. */
body.mtgas-enabled .content-block .post-container .row > .post-sidebar {
  position: static !important;
  top: auto !important;
  align-self: start;
  min-width: 0;
}

body.mtgas-enabled .post-sidebar #post-sidebar > .mtgas-widget,
body.mtgas-enabled .content-block .post-container .mtgas-mobile-slot > .mtgas-widget {
  margin: 0;
  padding: 0;
  overflow: visible;
  list-style: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

body.mtgas-enabled .mtgas {
  --mtgas-ink: #29332b;
  --mtgas-muted: #667061;
  --mtgas-olive: #4e6339;
  --mtgas-border: #e4e9dd;
  --mtgas-tint: #f5f8f0;
  color: var(--mtgas-ink);
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  width: 100%;
  max-width: 320px;
  min-width: 0;
}

body.mtgas-enabled .mtgas *,
body.mtgas-enabled .mtgas *::before,
body.mtgas-enabled .mtgas *::after {
  box-sizing: border-box;
}

body.mtgas-enabled .mtgas .mtgas-section {
  display: block;
  margin: 0;
  padding: 0;
  min-width: 0;
}

body.mtgas-enabled .mtgas .mtgas-section + .mtgas-section { margin-top: 24px; }

body.mtgas-enabled .mtgas .mtgas-heading {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--mtgas-ink);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: -.025em;
  text-transform: none;
  text-align: left;
  overflow-wrap: anywhere;
}

body.mtgas-enabled .mtgas .mtgas-finder {
  padding: 20px;
  border: 1px solid #dce5d2;
  border-radius: 14px;
  background: var(--mtgas-tint);
}

body.mtgas-enabled .mtgas .mtgas-finder .mtgas-heading {
  margin-bottom: 8px;
  font-size: 19px;
  line-height: 1.3;
}

body.mtgas-enabled .mtgas .mtgas-finder p {
  margin: 0 0 16px;
  padding: 0;
  color: var(--mtgas-muted);
  font-size: 15px;
  line-height: 1.45;
}

body.mtgas-enabled .mtgas .mtgas-finder-link,
body.mtgas-enabled .mtgas .mtgas-finder-link:visited {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid var(--mtgas-olive);
  border-radius: 8px;
  background: var(--mtgas-olive);
  box-shadow: none;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background-color .16s ease, border-color .16s ease;
}

body.mtgas-enabled .mtgas .mtgas-finder-link svg { flex: 0 0 18px; }

body.mtgas-enabled .mtgas .mtgas-list {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
}

body.mtgas-enabled .mtgas .mtgas-item {
  display: block;
  list-style: none;
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body.mtgas-enabled .mtgas .mtgas-item::before,
body.mtgas-enabled .mtgas .mtgas-item::after { display: none; content: none; }
body.mtgas-enabled .mtgas .mtgas-item + .mtgas-item { border-top: 1px solid var(--mtgas-border); }

body.mtgas-enabled .mtgas .mtgas-related-link {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
  column-gap: 12px;
  width: 100%;
  min-height: 60px;
  margin: 0;
  padding: 14px 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--mtgas-ink);
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease;
}

body.mtgas-enabled .mtgas .mtgas-related .mtgas-item:first-child .mtgas-related-link { padding-top: 4px; }
body.mtgas-enabled .mtgas .mtgas-related-link--text { grid-template-columns: minmax(0, 1fr); }

body.mtgas-enabled .mtgas .mtgas-thumb {
  display: block;
  width: 96px;
  height: 60px;
  margin: 2px 0 0;
  overflow: hidden;
  border-radius: 8px;
  background: #edf0e7;
  flex-shrink: 0;
}

body.mtgas-enabled .mtgas .mtgas-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  box-shadow: none;
  object-fit: cover;
  object-position: center center;
}

/* Preserve each editor-selected focal point at every viewport size. */
body.mtgas-enabled .mtgas .mtgas-thumb[data-image-focus="top-left"] img { object-position: left top; }
body.mtgas-enabled .mtgas .mtgas-thumb[data-image-focus="top"] img { object-position: center top; }
body.mtgas-enabled .mtgas .mtgas-thumb[data-image-focus="top-right"] img { object-position: right top; }
body.mtgas-enabled .mtgas .mtgas-thumb[data-image-focus="left"] img { object-position: left center; }
body.mtgas-enabled .mtgas .mtgas-thumb[data-image-focus="right"] img { object-position: right center; }
body.mtgas-enabled .mtgas .mtgas-thumb[data-image-focus="bottom-left"] img { object-position: left bottom; }
body.mtgas-enabled .mtgas .mtgas-thumb[data-image-focus="bottom"] img { object-position: center bottom; }
body.mtgas-enabled .mtgas .mtgas-thumb[data-image-focus="bottom-right"] img { object-position: right bottom; }

body.mtgas-enabled .mtgas .mtgas-copy { display: block; min-width: 0; }

body.mtgas-enabled .mtgas .mtgas-link-title {
  display: block;
  color: inherit;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
  word-break: normal;
}

body.mtgas-enabled .mtgas .mtgas-description {
  display: block;
  margin-top: 4px;
  color: var(--mtgas-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

/* Useful links are supporting navigation, without a second competing card. */
body.mtgas-enabled .mtgas .mtgas-help .mtgas-heading { margin-bottom: 4px; font-size: 16px; }

body.mtgas-enabled .mtgas .mtgas-help-link {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 16px;
  align-items: start;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 11px 0;
  border: 0;
  border-radius: 5px;
  box-shadow: none;
  background: transparent;
  color: var(--mtgas-ink);
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease;
}

body.mtgas-enabled .mtgas .mtgas-help-icon,
body.mtgas-enabled .mtgas .mtgas-arrow { display: block; margin-top: 2px; color: var(--mtgas-olive); }
body.mtgas-enabled .mtgas svg { display: block; flex-shrink: 0; max-width: 100%; pointer-events: none; }

body.mtgas-enabled .mtgas .mtgas-help-title {
  display: block;
  color: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

body.mtgas-enabled .mtgas .mtgas-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin: 4px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--mtgas-border);
  border-radius: 8px;
  background: #fff;
  color: var(--mtgas-olive);
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  cursor: pointer;
}

body.mtgas-enabled .mtgas .mtgas-more[aria-expanded="true"] svg { transform: rotate(180deg); }
/* Explicit component display rules must never override the native hidden state. */
body.mtgas-enabled .mtgas .mtgas-item[hidden],
body.mtgas-enabled .mtgas .mtgas-more[hidden] { display: none !important; }

body.mtgas-enabled .mtgas a:visited { color: var(--mtgas-ink); }
body.mtgas-enabled .mtgas .mtgas-finder-link:visited { color: #fff; }

body.mtgas-enabled .mtgas a:focus-visible,
body.mtgas-enabled .mtgas button:focus-visible {
  outline: 2px solid var(--mtgas-olive);
  outline-offset: 4px;
}

body.mtgas-enabled .mtgas a:focus-visible .mtgas-link-title,
body.mtgas-enabled .mtgas a:focus-visible .mtgas-help-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (hover: hover) {
  body.mtgas-enabled .mtgas .mtgas-related-link:hover,
  body.mtgas-enabled .mtgas .mtgas-help-link:hover,
  body.mtgas-enabled .mtgas .mtgas-more:hover { background-color: #f0f4e9; }
  body.mtgas-enabled .mtgas a:hover .mtgas-link-title,
  body.mtgas-enabled .mtgas a:hover .mtgas-help-title {
    color: #465d30;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }
  body.mtgas-enabled .mtgas .mtgas-finder-link:hover {
    border-color: #3e512c;
    background: #3e512c;
    color: #fff;
    text-decoration: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.mtgas-enabled .mtgas a,
  body.mtgas-enabled .mtgas button { transition: none; }
}

@media (min-width: 1100px) {
  body.mtgas-enabled .content-block .post-container .row > .post-sidebar.mtgas-can-stick {
    position: sticky !important;
    top: var(--mtgas-sticky-top, 96px) !important;
  }
}

@media (max-width: 991px) {
  body.mtgas-enabled .content-block .post-container > .row { display: flex; flex-direction: column; }
  body.mtgas-enabled .content-block .post-container > .row::before,
  body.mtgas-enabled .content-block .post-container > .row::after { display: none; }
  body.mtgas-enabled .content-block .post-container > .row > .col-md-8 { order: 1; width: 100%; min-width: 0; }
  body.mtgas-enabled .content-block .post-container .row > .post-sidebar {
    order: 2;
    display: block;
    float: none;
    width: 100%;
    margin-top: 24px;
    margin-bottom: 24px;
  }
  body.mtgas-enabled .post-sidebar #post-sidebar { display: block; margin: 0; padding: 0; }
  body.mtgas-enabled .mtgas { max-width: none; }
  body.mtgas-enabled .mtgas .mtgas-finder { padding: 18px; }
  body.mtgas-enabled .mtgas .mtgas-related-link { grid-template-columns: 88px minmax(0, 1fr); }
  body.mtgas-enabled .mtgas .mtgas-related-link--text { grid-template-columns: minmax(0, 1fr); }
  body.mtgas-enabled .mtgas .mtgas-thumb { width: 88px; height: 55px; }
  body.mtgas-enabled .mtgas .mtgas-link-title { font-size: 16px; }

  /* The mobile slot contains the original widget, never a duplicated sidebar. */
  body.mtgas-enabled .mtgas-mobile-slot {
    display: block;
    width: 100%;
    margin: 24px 0 28px;
    padding: 20px 0 0;
    list-style: none;
    border-top: 1px solid var(--mtgas-border, #e4e9dd);
  }
  body.mtgas-enabled .mtgas-mobile-slot > .mtgas-widget { margin: 0; padding: 0; }
  body.mtgas-enabled .content-block .post-container .row > .post-sidebar.mtgas-mobile-empty { display: none; }
}

/* A 320px desktop preview is a rail, not a 320px phone. */
body.mtgas-enabled.mtgas-preview-desktop .mtgas { max-width: 320px; }
body.mtgas-enabled.mtgas-preview-desktop .mtgas .mtgas-finder { padding: 20px; }
body.mtgas-enabled.mtgas-preview-desktop .mtgas .mtgas-related-link { grid-template-columns: 96px minmax(0, 1fr); }
body.mtgas-enabled.mtgas-preview-desktop .mtgas .mtgas-related-link--text { grid-template-columns: minmax(0, 1fr); }
body.mtgas-enabled.mtgas-preview-desktop .mtgas .mtgas-thumb { width: 96px; height: 60px; }
body.mtgas-enabled.mtgas-preview-desktop .mtgas .mtgas-link-title { font-size: 15px; }
body.mtgas-enabled.mtgas-preview-desktop .post-sidebar,
body.mtgas-enabled.mtgas-preview-mobile .post-sidebar { margin-top: 0 !important; margin-bottom: 0 !important; }

body.mtgas-no-results .content-block .post-container > .row > .col-md-12.post-single-content {
  max-width: 820px;
  float: none;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 359px) {
  body.mtgas-enabled:not(.mtgas-preview-desktop) .mtgas .mtgas-related-link { grid-template-columns: 76px minmax(0, 1fr); column-gap: 10px; }
  body.mtgas-enabled:not(.mtgas-preview-desktop) .mtgas .mtgas-related-link--text { grid-template-columns: minmax(0, 1fr); }
  body.mtgas-enabled:not(.mtgas-preview-desktop) .mtgas .mtgas-thumb { width: 76px; height: 48px; }
}

@media (forced-colors: active) {
  body.mtgas-enabled .mtgas .mtgas-finder,
  body.mtgas-enabled .mtgas .mtgas-more { border-color: CanvasText; }
  body.mtgas-enabled .mtgas .mtgas-finder-link,
  body.mtgas-enabled .mtgas .mtgas-finder-link:visited {
    border-color: ButtonText;
    background: ButtonFace;
    color: ButtonText;
  }
  body.mtgas-enabled .mtgas a:focus-visible,
  body.mtgas-enabled .mtgas button:focus-visible { outline-color: Highlight; }
}

@media print {
  body.mtgas-enabled .post-sidebar,
  body.mtgas-enabled .mtgas-mobile-slot { display: none !important; }
}
