/* MTG Category Explorer: one search field, then the articles. */
.mtg-ce {
  --ce-ink: #26372c;
  --ce-muted: #6b7567;
  --ce-accent: #5f7845;
  --ce-line: #e5e9e1;
  --ce-soft: #f7f8f5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: center;
  column-gap: 32px;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 28px 52px;
  color: var(--ce-ink);
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.mtg-ce, .mtg-ce *, .mtg-ce *::before, .mtg-ce *::after { box-sizing: border-box; }
.mtg-ce :where(h1, h2, p, form, figure) { margin: 0; }
.mtg-ce :where(button, input) { font: inherit; }
.mtg-ce a { color: inherit; text-decoration: none; box-shadow: none; }
.mtg-ce a:hover { color: inherit; text-decoration: none; }
.mtg-ce :where(button, input, a):focus-visible { outline: 2px solid #737d6d; outline-offset: 3px; }
.mtg-ce [hidden] { display: none !important; }
.mtg-ce svg { display: block; flex: 0 0 auto; }
.mtg-ce .mtg-ce-hero { min-width: 0; margin: 0; padding: 0; }
.mtg-ce .mtg-ce-title { margin: 0; color: var(--ce-ink); font-size: 28px; font-weight: 700; letter-spacing: -.035em; line-height: 1.2; overflow-wrap: anywhere; }
.mtg-ce .mtg-ce-controls, .mtg-ce .mtg-ce-form, .mtg-ce .mtg-ce-search-field { min-width: 0; width: 100%; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.mtg-ce .mtg-ce-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.mtg-ce .mtg-ce-search { display: flex; align-items: center; gap: 0; width: 100%; min-width: 0; height: 46px; padding: 0 1px 0 14px; border: 1px solid var(--ce-line); border-radius: 10px; background: var(--ce-soft); transition: border-color .15s ease, background .15s ease; }
.mtg-ce .mtg-ce-search:focus-within { border-color: #939d8c; background: #fff; }
.mtg-ce .mtg-ce-search > svg { width: 18px; height: 18px; margin-right: 10px; color: #7d8876; }
.mtg-ce .mtg-ce-search input[type="search"] { display: block; flex: 1 1 auto; width: 100%; min-width: 0; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0; outline: 0; color: var(--ce-ink); background: transparent; box-shadow: none; font-family: inherit; font-size: 14px; font-weight: 400; line-height: normal; -webkit-appearance: none; appearance: none; }
.mtg-ce .mtg-ce-search input[type="search"]:focus,
.mtg-ce .mtg-ce-search input[type="search"]:focus-visible { border: 0; outline: 0; box-shadow: none; }
.mtg-ce .mtg-ce-search input::placeholder { color: #6b7567; font: inherit; opacity: 1; }
.mtg-ce.is-enhanced .mtg-ce-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.mtg-ce .mtg-ce-search [data-ce-clear],
.mtg-ce .mtg-ce-submit { display: inline-flex; flex: 0 0 44px; align-items: center; justify-content: center; width: 44px; min-width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 8px; color: #6b7862; background: transparent; box-shadow: none; font-size: 14px; font-weight: 500; line-height: 1; text-transform: none; cursor: pointer; transition: color .15s ease, background .15s ease; }
.mtg-ce .mtg-ce-search [data-ce-clear]:hover,
.mtg-ce .mtg-ce-submit:hover { color: #344a2a; background: #edf1e8; }
.mtg-ce .mtg-ce-search [data-ce-clear] > svg { width: 16px; height: 16px; }
.mtg-ce .mtg-ce-submit > svg { width: 19px; height: 19px; }
.mtg-ce .mtg-ce-feedback { grid-column: 1 / -1; margin: 0; color: var(--ce-muted); font-size: 12px; line-height: 1.6; }
.mtg-ce .mtg-ce-feedback:not(.is-error) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.mtg-ce .mtg-ce-feedback a { display: inline-block; padding: 6px 0; color: #455b30; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.mtg-ce .mtg-ce-feedback.is-error { margin-top: 12px; color: #775837; }
.mtg-ce .mtg-ce-results { grid-column: 1 / -1; min-width: 0; width: 100%; margin: 22px 0 0; scroll-margin-top: calc(var(--mtg-sn-offset, 84px) + 18px); }
.mtg-ce .mtg-ce-results-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 16px; }
.mtg-ce .mtg-ce-result-count { color: var(--ce-muted); font-size: 12px; font-weight: 500; line-height: 1.5; }
.mtg-ce .mtg-ce-reset { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; max-width: 100%; padding: 6px 0; color: #54664a; font-size: 12px; font-weight: 600; line-height: 1.4; text-decoration: underline; text-underline-offset: 3px; }
.mtg-ce .mtg-ce-reset:hover { color: #344a2a; }
.mtg-ce .mtg-ce-reset > svg { width: 15px; height: 15px; }
.mtg-ce .mtg-ce-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; transition: opacity .15s ease; }
.mtg-ce .mtg-ce-results[aria-busy="true"] .mtg-ce-grid { opacity: .6; }
.mtg-ce .mtg-ce-card { display: flex; flex-direction: column; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.mtg-ce .mtg-ce-cover { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #f0f3e9; }
.mtg-ce .mtg-ce-cover img { display: block; width: 100%; max-width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; object-fit: cover; transition: transform .25s ease; }
.mtg-ce .mtg-ce-cover:hover img { transform: scale(1.025); }
.mtg-ce .mtg-ce-cover > svg { width: 32px; height: 32px; color: #a7b89a; }
.mtg-ce .mtg-ce-card-body { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; padding: 13px 0 0; }
.mtg-ce .mtg-ce-card-title { margin: 0; color: var(--ce-ink); font-size: 18px; font-weight: 650; letter-spacing: -.02em; line-height: 1.4; overflow-wrap: anywhere; }
.mtg-ce .mtg-ce-card-title a { display: block; color: inherit; }
.mtg-ce .mtg-ce-card-title a:hover { color: #4c663a; }
.mtg-ce .mtg-ce-card-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; min-width: 0; margin-top: auto; padding-top: 8px; color: var(--ce-muted); font-size: 12px; font-weight: 400; line-height: 1.5; }
.mtg-ce .mtg-ce-card-authors { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; gap: 0 12px; min-width: 0; max-width: 100%; }
.mtg-ce .mtg-ce-card-author { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; min-height: 32px; padding: 4px 0; color: #4d5c49; font-size: 13px; font-weight: 500; line-height: 1.4; }
.mtg-ce .mtg-ce-card-author:hover { color: var(--ce-accent); }
.mtg-ce .mtg-ce-card-avatar { display: block; flex: 0 0 24px; width: 24px; min-width: 24px; max-width: 24px; height: 24px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: var(--ce-soft); box-shadow: none; object-fit: cover; }
.mtg-ce .mtg-ce-card-avatar-fallback { display: inline-flex; align-items: center; justify-content: center; color: var(--ce-accent); font-size: 10px; font-weight: 600; line-height: 1; letter-spacing: 0; }
.mtg-ce .mtg-ce-card-author-name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtg-ce .mtg-ce-card-date { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; max-width: 100%; white-space: nowrap; }
.mtg-ce .mtg-ce-meta-dot { color: #a0a89c; }
.mtg-ce .mtg-ce-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 30px 0 0; padding: 0; }
.mtg-ce .mtg-ce-page { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--ce-line); border-radius: 8px; color: #64705c; background: transparent; font-size: 12px; font-weight: 600; line-height: 1.3; }
.mtg-ce .mtg-ce-page:hover { border-color: #bdc9ae; color: #344a2a; background: var(--ce-soft); }
.mtg-ce .mtg-ce-page[aria-current="page"] { border-color: var(--ce-accent); color: #fff; background: var(--ce-accent); }
.mtg-ce .mtg-ce-pagination > span { padding: 0 4px; color: var(--ce-muted); font-size: 12px; }
.mtg-ce .mtg-ce-empty { margin: 0; padding: 36px 16px; border-top: 1px solid var(--ce-line); text-align: center; }
.mtg-ce .mtg-ce-empty > svg { width: 24px; height: 24px; margin: 0 auto 12px; color: #8a9d7b; }
.mtg-ce .mtg-ce-empty h2 { margin: 0 0 8px; color: var(--ce-ink); font-size: 21px; font-weight: 650; letter-spacing: -.02em; line-height: 1.3; }
.mtg-ce .mtg-ce-empty p { max-width: 390px; margin: 0 auto; color: var(--ce-muted); font-size: 13px; line-height: 1.6; }

@media (max-width: 1023px) {
  .mtg-ce { column-gap: 24px; padding-right: 24px; padding-left: 24px; }
  .mtg-ce .mtg-ce-title { font-size: 26px; }
  .mtg-ce .mtg-ce-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 22px; }
}
@media (max-width: 820px) {
  .mtg-ce { grid-template-columns: minmax(0, 1fr); row-gap: 0; padding-top: 22px; }
  .mtg-ce .mtg-ce-controls { margin-top: 14px; }
  .mtg-ce .mtg-ce-results { margin-top: 22px; }
}
@media (max-width: 640px) {
  .mtg-ce { padding: 20px 16px 36px; }
  .mtg-ce .mtg-ce-title { font-size: 24px; letter-spacing: -.03em; }
  .mtg-ce .mtg-ce-search input[type="search"] { font-size: 16px; }
  .mtg-ce .mtg-ce-results { margin-top: 20px; }
  .mtg-ce .mtg-ce-results-bar { margin-bottom: 12px; }
  .mtg-ce .mtg-ce-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .mtg-ce .mtg-ce-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: start; column-gap: 14px; height: auto; padding: 16px 0; border-bottom: 1px solid var(--ce-line); }
  .mtg-ce .mtg-ce-card:first-child { padding-top: 0; }
  .mtg-ce .mtg-ce-cover { width: 104px; height: 78px; aspect-ratio: auto; border-radius: 8px; }
  .mtg-ce .mtg-ce-card-body { min-height: 78px; padding: 0; }
  .mtg-ce .mtg-ce-card-body:only-child { grid-column: 1 / -1; min-height: 0; }
  .mtg-ce .mtg-ce-card-title { font-size: 16px; font-weight: 650; letter-spacing: -.015em; line-height: 1.38; }
  .mtg-ce .mtg-ce-card-title a { min-height: 44px; }
  .mtg-ce .mtg-ce-card-footer { padding-top: 7px; font-size: 12px; }
  .mtg-ce .mtg-ce-card-author { min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
  .mtg-ce .mtg-ce-pagination { margin-top: 24px; }
  .mtg-ce .mtg-ce-empty { padding: 28px 6px; }
  .mtg-ce .mtg-ce-empty h2 { font-size: 20px; }
}
@media (min-width: 400px) and (max-width: 640px) {
  .mtg-ce .mtg-ce-card { grid-template-columns: 112px minmax(0, 1fr); }
  .mtg-ce .mtg-ce-cover { width: 112px; height: 84px; }
  .mtg-ce .mtg-ce-card-body { min-height: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  .mtg-ce *, .mtg-ce *::before, .mtg-ce *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .mtg-ce .mtg-ce-cover:hover img { transform: none; }
}
@media (forced-colors: active) {
  .mtg-ce :where(a, button, input):focus-visible { outline: 2px solid Highlight; }
  .mtg-ce .mtg-ce-search input[type="search"]:focus-visible { outline: 2px solid Highlight; outline-offset: -3px; }
  .mtg-ce .mtg-ce-search, .mtg-ce .mtg-ce-page { border-color: CanvasText; }
  .mtg-ce .mtg-ce-page[aria-current="page"] { border: 2px solid Highlight; }
}
