/* Use system fonts to avoid cross-origin font fetch errors. */

:root {
  --bg: #070b12;
  --panel: #0f1522;
  --panel-alt: #0b1320;
  --panel-soft: #101b2e;
  --panel-highlight: #17233b;
  --ink: #e6edf6;
  --muted: #b8c7d9;
  --muted-soft: rgba(159, 176, 194, 0.65);
  --accent: #7aa2ff;
  --accent-iris: #9d76ff;
  --accent-mint: #5ef4ff;
  --accent-soft: rgba(122, 162, 255, 0.25);
  --accent-soft-strong: rgba(122, 162, 255, 0.4);
  --brand-gold: #f8c86b;
  --brand-gold-glow: rgba(248, 200, 107, 0.38);
  --accent-gradient: linear-gradient(
    135deg,
    rgba(122, 162, 255, 0.45),
    rgba(94, 244, 255, 0.35),
    rgba(157, 118, 255, 0.5)
  );
  --accent-gradient-strong: linear-gradient(
    120deg,
    #6c8bff 0%,
    #59e0ff 48%,
    #aa6fff 100%
  );
  --border-color: rgba(255, 255, 255, 0.08);
  --border: 1px solid var(--border-color);
  --surface-border-muted: rgba(255, 255, 255, 0.18);
  --focus-outline-strong: rgba(94, 244, 255, 0.95);
  --radius-pill: 999px;
  --radius-control: 12px;
  --space-2xs: 6px;
  --space-xs: 10px;
  --space-sm: 12px;
  --space-md: 14px;
  --border-strong: 1px solid var(--surface-border-muted);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --gap-sm: 10px;
  --gap: 20px;
  --gap-lg: 28px;
  --pad-sm: 16px;
  --pad: 24px;
  --pad-lg: 32px;
  --ctrl-h: 46px;
  --shadow: 0 20px 48px rgba(4, 12, 32, 0.45);
  --shadow-soft: 0 10px 30px rgba(4, 12, 32, 0.35);
  --shadow-focus:
    0 0 0 2px rgba(7, 11, 20, 0.95), 0 0 0 5px rgba(94, 244, 255, 0.86),
    0 0 28px rgba(94, 244, 255, 0.45);
  --shadow-focus-subtle: 0 0 0 3px rgba(94, 244, 255, 0.45);
  --table-stripe: rgba(255, 255, 255, 0.03);
  --table-stripe-strong: rgba(122, 162, 255, 0.08);
  --success-bg: rgba(22, 172, 120, 0.16);
  --success-border: rgba(54, 220, 162, 0.45);
  --danger-bg: rgba(215, 58, 78, 0.18);
  --danger-border: rgba(255, 106, 130, 0.4);
  --warning-bg: rgba(255, 195, 87, 0.16);
  --warning-border: rgba(255, 211, 130, 0.4);
  --transition-duration: 180ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: 50px 0;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.18em;
  transition:
    color var(--transition-duration) ease,
    filter var(--transition-duration) ease;
}

a:hover,
a:focus-visible {
  color: #b1c2ff;
  text-decoration-thickness: 0.11em;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-150%);
  padding: 0.65rem 1rem;
  border: 2px solid #59e0ff;
  border-radius: 0 0 10px;
  background: #060d1b;
  color: #f8fcff;
  font-weight: 700;
  text-decoration: none;
  z-index: 120;
}

.skip-link:focus-visible {
  transform: translateY(0);
  box-shadow:
    0 0 0 3px rgba(6, 13, 27, 0.98),
    0 0 0 6px rgba(89, 224, 255, 0.95),
    0 0 20px rgba(89, 224, 255, 0.55);
  outline: none;
}

.btn,
.button,
.site-home-link,
.global-nav .nav-link,
.global-nav .nav-submenu a,
.promo-banner,
.hero-banner-btn,
.affiliate-cta-link {
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
details > summary:focus-visible {
  box-shadow: var(--shadow-focus);
  border-color: rgba(122, 162, 255, 0.65);
  outline: 2px solid var(--focus-outline-strong);
  outline-offset: 2px;
}

::selection {
  background: rgba(122, 162, 255, 0.35);
  color: var(--ink);
}

header {
  display: flex;
  width: 100%;
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

main,
.wrap,
.page-width {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 50px 0;
}

.site-title {
  font-family:
    "Cinzel",
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  font-weight: 700;
  color: var(--brand-gold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow:
    0 12px 30px rgba(14, 10, 4, 0.48),
    0 0 24px var(--brand-gold-glow);
  display: inline-block;
  line-height: 1;
}

.site-title-primary {
  display: inline-block;
}

.site-title-secondary {
  display: inline-block;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  letter-spacing: 0.14em;
}

@supports (-webkit-background-clip: text) {
  .site-title {
    background: linear-gradient(130deg, #fdf2cc 0%, #f8c86b 45%, #f4b54f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-align: center;
  }
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

footer a {
  color: #fff0cc;
}

footer .global-nav .nav-menu {
  display: inline-flex;
}
footer .global-nav ul.nav-menu li.nav-item a.nav-link {
  border: none;
}
footer .global-nav ul.nav-menu li.nav-item a.nav-link:hover {
  color: var(--ink);
  background: none;
}

.hidden {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  border: 1px solid rgba(122, 162, 255, 0.35);
  background: linear-gradient(
    180deg,
    rgba(23, 16, 52, 0.8),
    rgba(8, 14, 30, 0.94)
  );
  box-shadow: 0 12px 32px rgba(2, 7, 20, 0.55);
  backdrop-filter: blur(4px);
}

.site-header-utility {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px var(--gap);
  background: linear-gradient(
    90deg,
    rgba(80, 38, 145, 0.95),
    rgba(46, 31, 102, 0.95)
  );
  color: #efe5ff;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(248, 200, 107, 0.55);
  padding: 8px clamp(10px, 3vw, 18px);
}

.site-header-main {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 26px);
  padding: 10px clamp(12px, 3vw, 18px);
}

.site-home-link {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  height: 38px;
  padding: 8px 14px;
  color: #fff5dc;
  text-decoration: none;
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    Roboto,
    Arial,
    sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid rgba(255, 223, 151, 0.88);
  border-radius: 999px;
  background: rgba(46, 32, 92, 0.94);
}

.site-home-link:hover,
.site-home-link:focus-visible {
  color: #ffffff;
  border-color: rgba(255, 235, 186, 0.96);
  background: rgba(62, 44, 122, 0.96);
}

.site-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(248, 200, 107, 0.62);
  border-radius: 999px;
  background: rgba(24, 18, 56, 0.92);
  color: #f6f2ff;
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    Roboto,
    Arial,
    sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.site-nav-toggle-bar {
  display: block;
  width: 14px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: currentColor;
}

.site-nav-toggle-label {
  line-height: 1.2;
}

.site-header.is-floating .site-header-main {
  flex-wrap: nowrap;
  gap: 12px;
  padding: 8px 12px;
}

.site-header.is-floating .site-banner {
  display: none;
}

.site-header.is-floating .site-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-header.is-floating .site-nav-toggle {
  display: none;
}

.site-header.is-floating .global-nav {
  flex: 1;
  min-width: 0;
}

.site-header.is-floating .global-nav .nav-menu {
  flex-wrap: nowrap;
  justify-content: flex-start;
  padding-bottom: 2px;
}

.global-nav {
  margin-top: 0;
}

.global-nav .nav-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.global-nav .nav-item {
  position: relative;
  padding-bottom: 0;
}

.global-nav .nav-link {
  color: #f6f2ff;
  text-decoration: none;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 38px;
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    Roboto,
    Arial,
    sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  transition:
    color var(--transition-duration) ease,
    border-color var(--transition-duration) ease,
    background var(--transition-duration) ease;
}

.global-nav .nav-link .nav-label-fab-short {
  display: none;
}

@media (max-width: 920px) and (min-width: 801px) {
  .site-header .global-nav .nav-link .nav-label-fab-full {
    display: none;
  }

  .site-header .global-nav .nav-link .nav-label-fab-short {
    display: inline;
  }
}

.global-nav .nav-link:hover,
.global-nav .nav-link:focus-visible {
  color: #ffffff;
  border-color: rgba(122, 162, 255, 0.55);
  background: rgba(101, 65, 190, 0.35);
}

.global-nav .nav-submenu {
  list-style: none;
  margin: 10px 0 0;
  padding: 10px 12px;
  background: rgba(12, 18, 30, 0.95);
  border: 1px solid rgba(122, 162, 255, 0.3);
  border-radius: 14px;
  position: absolute;
  top: 28px;
  left: 0;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
  box-shadow: 0 18px 40px rgba(6, 16, 40, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition:
    opacity var(--transition-duration) ease,
    transform var(--transition-duration) ease;
}

.global-nav .nav-item:focus-within > .nav-submenu,
.global-nav .nav-item:hover > .nav-submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.global-nav .nav-submenu a {
  color: #dbe6ff;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.global-nav .nav-submenu a:hover,
.global-nav .nav-submenu a:focus-visible {
  border-color: rgba(122, 162, 255, 0.5);
}

.site-banner {
  text-align: center;
}
.site-banner img {
  margin: 0;
}

.site-banner img {
  width: min(290px, 70vw);
  height: auto;
  display: block;
}

.site-header .site-banner {
  flex: 0 1 auto;
}

.site-header .global-nav {
  flex: 1;
}

h1 {
  margin: 4px 0 2px;
  font-size: clamp(1.65rem, 2.6vw + 1rem, 2.1rem);
  font-family:
    "Cinzel",
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-gold);
  text-shadow: 0 0 24px var(--brand-gold-glow);
  line-height: 1.15;
  text-align: center;
}

@supports (-webkit-background-clip: text) {
  h1 {
    background: linear-gradient(130deg, #fdf2cc 0%, #f8c86b 45%, #f4b54f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

.site-footer {
  border: 1px solid rgba(122, 162, 255, 0.3);
  background: linear-gradient(
    180deg,
    rgba(11, 18, 40, 0.95),
    rgba(8, 14, 33, 0.98)
  );
  box-shadow: 0 14px 32px rgba(2, 8, 20, 0.45);
  padding: clamp(18px, 4vw, 26px);
  padding-top: clamp(8px, 4vw, 14px);
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 1fr;
  gap: clamp(14px, 3vw, 24px);
  align-items: start;
}

.site-footer .global-nav .nav-menu {
  justify-content: flex-start;
}

.site-footer .site-banner img {
  width: min(220px, 70vw);
}

.site-footer-copy {
  margin: 10px 0 0;
  color: #b4c2d8;
  max-width: 38ch;
}

.site-footer-heading {
  margin: 0 0 10px;
  font-family: "Cinzel", "Inter", system-ui, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-gold);
}

/* Magic pages: emulate mtgev-style black/gold chrome for global shell. */
body.magic-sets-page .site-header {
  border-color: rgba(201, 156, 84, 0.62);
  background: linear-gradient(
    180deg,
    rgba(16, 16, 18, 0.98),
    rgba(6, 7, 11, 0.98)
  );
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}

body.magic-sets-page .site-header.is-floating {
  border-color: rgba(216, 171, 97, 0.72);
}

.site-header-main {
  margin: 0 auto;
}

body.magic-sets-page .site-header .global-nav .nav-link,
body.magic-sets-page .site-footer .global-nav .nav-link {
  color: #ead7af;
  border: 1px solid rgba(201, 156, 84, 0.36);
  background: rgba(24, 19, 14, 0.75);
}

body.magic-sets-page .site-header .global-nav .nav-link:hover,
body.magic-sets-page .site-header .global-nav .nav-link:focus-visible,
body.magic-sets-page .site-footer .global-nav .nav-link:hover,
body.magic-sets-page .site-footer .global-nav .nav-link:focus-visible {
  color: #fff0cc;
  border-color: rgba(236, 194, 118, 0.72);
  background: rgba(56, 43, 26, 0.9);
}

body.magic-sets-page .site-header .global-nav .nav-submenu,
body.magic-sets-page .site-footer .global-nav .nav-submenu {
  border-color: rgba(201, 156, 84, 0.46);
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    rgba(18, 13, 9, 0.98),
    rgba(8, 8, 11, 0.98)
  );
}

body.magic-sets-page .site-footer {
  border-color: rgba(201, 156, 84, 0.5);
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    rgba(13, 13, 16, 0.98),
    rgba(7, 7, 9, 0.99)
  );
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

body.magic-sets-page .site-footer-heading {
  color: #e8c27a;
  letter-spacing: 0.08em;
}

body.magic-sets-page .site-footer .small,
body.magic-sets-page .site-footer .muted {
  color: #b9ab91;
}

@media (max-width: 800px) {
  body.magic-sets-page .site-header,
  body.magic-sets-page .site-footer {
    border-radius: 6px;
  }

  body.magic-sets-page .site-header .site-nav-toggle {
    border-color: rgba(201, 156, 84, 0.62);
    background: rgba(22, 18, 13, 0.95);
    color: #ead7af;
  }

  body.magic-sets-page .site-header.nav-open .site-nav-toggle {
    background: rgba(55, 42, 25, 0.95);
  }
}

@media (max-width: 800px) {
  .site-header-main {
    flex-direction: column;
    align-items: stretch;
  }

  .site-header .site-nav-toggle {
    display: inline-flex;
    align-self: flex-end;
  }

  .site-header .global-nav {
    display: none;
    margin-top: 8px;
  }

  .site-header.nav-open .global-nav {
    display: block;
    width: 100%;
    flex-basis: 100%;
  }

  .site-header.nav-open .site-nav-toggle {
    background: rgba(46, 31, 102, 0.96);
  }

  .site-header.is-floating .site-header-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "home menu"
      ". nav";
    align-items: center;
    column-gap: 10px;
    row-gap: 8px;
    padding: 10px clamp(12px, 3vw, 18px);
  }

  .site-header.is-floating .site-banner {
    display: none;
  }

  .site-header.is-floating .site-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-area: home;
    justify-self: start;
    align-self: center;
  }

  .site-header.is-floating .site-nav-toggle {
    display: inline-flex;
    grid-area: menu;
    justify-self: end;
    align-self: center;
    margin: 0;
  }

  .site-header.is-floating .global-nav {
    grid-area: nav;
    width: min(280px, 100%);
    justify-self: end;
    margin-top: 0;
    flex: 0 1 auto;
  }

  .site-header.is-floating .global-nav .nav-menu {
    flex-wrap: wrap;
    overflow-x: visible;
    justify-content: center;
    padding-bottom: 0;
  }

  .site-header .site-banner {
    display: flex;
    justify-content: center;
  }

  .site-header .global-nav .nav-menu {
    justify-content: center;
  }

  .global-nav .nav-menu {
    flex-direction: column;
    align-items: stretch;
  }

  .global-nav .nav-submenu {
    position: static;
    margin-top: 8px;
    box-shadow: none;
  }

  .site-header .global-nav .nav-item--commander > .nav-submenu {
    display: none;
  }

  .site-footer-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: linear-gradient(
    140deg,
    rgba(17, 23, 37, 0.9),
    rgba(12, 18, 30, 0.95)
  );
  border: var(--border);
  border-radius: var(--radius);
  padding: var(--pad);
  box-shadow: var(--shadow);
  transition:
    transform var(--transition-duration) ease,
    box-shadow var(--transition-duration) ease;
}

.card.sets {
  padding: 0 var(--pad);
}

.set-navigator {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.set-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.set-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #d6c7a9;
  font-size: 0.85rem;
}

.set-control input,
.set-control select {
  background: linear-gradient(
    180deg,
    rgba(17, 13, 26, 0.95),
    rgba(12, 16, 29, 0.95)
  );
  border: 1px solid rgba(189, 147, 74, 0.42);
  border-radius: 12px;
  color: #f4ebd8;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
}

.set-control input::placeholder {
  color: rgba(234, 219, 188, 0.58);
}

.set-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.set-row {
  display: grid;
  grid-template-columns: minmax(220px, 350px) 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(28, 22, 38, 0.9), rgba(14, 18, 30, 0.86)),
    radial-gradient(
      circle at top right,
      rgba(125, 94, 180, 0.18),
      transparent 48%
    );
  border: 1px solid rgba(198, 160, 97, 0.35);
  box-shadow: inset 0 0 0 1px rgba(242, 228, 195, 0.05);
}

.set-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 350px;
}

.set-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.set-title {
  font-size: 1rem;
  font-weight: 650;
  color: #f5e9cd;
}

.set-date {
  font-size: 0.9rem;
  color: #cdbf9e;
  letter-spacing: 0.02em;
}

.set-symbol {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: invert(1) drop-shadow(0 0 7px rgba(201, 167, 99, 0.55));
}

.set-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  flex: 1;
}

.set-tools .btn {
  padding-inline: 14px;
}

.set-row[data-hidden="true"] {
  display: none;
}

.magic-sets-page {
  background:
    radial-gradient(
      circle at 12% -8%,
      rgba(188, 145, 70, 0.2),
      transparent 40%
    ),
    radial-gradient(
      circle at 88% -12%,
      rgba(95, 58, 128, 0.25),
      transparent 42%
    ),
    linear-gradient(180deg, #120f1a 0%, #0a0d14 50%, #090b10 100%);
}

.magic-sets-page .page-intro {
  border: 1px solid rgba(196, 154, 84, 0.42);
  border-radius: 18px;
  padding: clamp(20px, 4vw, 30px);
  background:
    linear-gradient(155deg, rgba(30, 24, 43, 0.95), rgba(14, 18, 30, 0.94)),
    radial-gradient(
      circle at top right,
      rgba(208, 162, 86, 0.15),
      transparent 44%
    );
  box-shadow:
    0 20px 44px rgba(2, 4, 8, 0.55),
    inset 0 0 0 1px rgba(236, 214, 172, 0.08);
}

.magic-sets-page .set-navigator {
  border: 1px solid rgba(196, 154, 84, 0.4);
  background:
    linear-gradient(145deg, rgba(25, 22, 37, 0.93), rgba(12, 16, 26, 0.95)),
    radial-gradient(
      circle at top right,
      rgba(71, 102, 191, 0.18),
      transparent 52%
    );
  box-shadow:
    0 24px 54px rgba(3, 7, 17, 0.62),
    inset 0 0 0 1px rgba(243, 220, 176, 0.07);
}

.magic-sets-page .set-tools .btn {
  border-color: rgba(225, 186, 111, 0.55);
  color: #1c160b;
  background: linear-gradient(102deg, #e9c986 0%, #d8a755 55%, #f3dea8 100%);
  box-shadow:
    0 10px 22px rgba(176, 128, 47, 0.32),
    inset 0 0 0 1px rgba(255, 243, 214, 0.5);
}

.magic-sets-page .set-tools .btn:hover,
.magic-sets-page .set-tools .btn:focus-visible {
  filter: brightness(1.05);
}


.magic-sets-page .set-community-cta {
  border: 1px solid rgba(196, 154, 84, 0.4);
  background:
    linear-gradient(145deg, rgba(25, 22, 37, 0.93), rgba(12, 16, 26, 0.95)),
    radial-gradient(
      circle at top right,
      rgba(71, 102, 191, 0.18),
      transparent 52%
    );
  box-shadow:
    0 24px 54px rgba(3, 7, 17, 0.62),
    inset 0 0 0 1px rgba(243, 220, 176, 0.07);
}

.magic-sets-page .set-community-cta h2 {
  margin-top: 0;
}

.magic-sets-page .set-community-cta p {
  margin-bottom: 18px;
  color: #d9d5cd;
}

.magic-sets-page .set-community-cta .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .set-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .set-controls {
    grid-template-columns: 1fr;
  }
}

.card:hover,
.card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 28px 60px rgba(6, 16, 40, 0.55);
}

.badge,
.pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(
    120deg,
    rgba(122, 162, 255, 0.32),
    rgba(94, 244, 255, 0.22)
  );
  color: #dbe6ff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(122, 162, 255, 0.3);
}

.btn,
button,
.button {
  appearance: none;
  -webkit-appearance: none;
  height: var(--ctrl-h);
  padding: 0 clamp(16px, 4vw, 22px);
  border-radius: 12px;
  border: 1px solid rgba(225, 186, 111, 0.55);
  background: linear-gradient(102deg, #e9c986 0%, #d8a755 55%, #f3dea8 100%);
  color: #1c160b;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    transform var(--transition-duration) ease,
    box-shadow var(--transition-duration) ease,
    filter var(--transition-duration) ease;
  box-shadow:
    0 10px 22px rgba(176, 128, 47, 0.32),
    inset 0 0 0 1px rgba(255, 243, 214, 0.5);
}

.notice,
.note-red {
  margin-block: clamp(16px, 4vw, 22px);
  padding: clamp(14px, 4vw, 22px);
  border-radius: var(--radius);
  border: var(--border);
  background: var(--panel-highlight);
  box-shadow: var(--shadow-soft);
  font-weight: 600;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.notice::before,
.note-red::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.9;
  pointer-events: none;
}

.notice::before {
  background: linear-gradient(
    120deg,
    rgba(122, 162, 255, 0.18),
    rgba(94, 244, 255, 0.1)
  );
}

.notice.yellow {
  border-color: var(--warning-border);
  color: #fff5d6;
  background: linear-gradient(
    140deg,
    rgba(255, 195, 87, 0.12),
    rgba(255, 215, 120, 0.1)
  );
  box-shadow: 0 24px 50px rgba(34, 18, 0, 0.45);
}

.notice.yellow::before {
  background: linear-gradient(
    130deg,
    rgba(255, 195, 87, 0.35),
    rgba(255, 231, 176, 0.2)
  );
}

.note-red::before {
  background: linear-gradient(
    130deg,
    rgba(215, 58, 78, 0.28),
    rgba(255, 114, 148, 0.22)
  );
}

.notice > *,
.note-red > * {
  position: relative;
  z-index: 1;
}

.notice {
  border-color: rgba(122, 162, 255, 0.45);
  color: #d9e6ff;
}

.note-red {
  border-color: var(--danger-border);
  background: linear-gradient(
    135deg,
    rgba(215, 58, 78, 0.32),
    rgba(255, 106, 130, 0.18)
  );
  color: #ffe2e8;
  box-shadow: 0 24px 38px rgba(38, 4, 18, 0.55);
}

.btn::after,
.button::after {
  content: "›";
  opacity: 0.75;
  font-size: 1.2rem;
  line-height: 1;
  transform: translateY(-1px);
}

.btn-secondary,
.button-secondary {
  background: linear-gradient(
    120deg,
    rgba(122, 162, 255, 0.22),
    rgba(12, 18, 30, 0.95)
  );
  box-shadow: inset 0 0 0 1px rgba(122, 162, 255, 0.25);
  color: var(--ink);
}

.btn-secondary::after,
.button-secondary::after {
  display: none;
}

button:hover,
.btn:hover,
.button:hover,
button:focus-visible,
.btn:focus-visible,
.button:focus-visible {
  color: #1c160b;
  transform: translateY(-2px);
  filter: brightness(1.03);
  box-shadow: 0 18px 44px rgba(30, 48, 88, 0.55);
}

.btn.is-quiet,
.button.is-quiet {
  background: rgba(122, 162, 255, 0.14);
  box-shadow: none;
}

.btn.is-quiet::after,
.button.is-quiet::after {
  display: none;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  height: var(--ctrl-h);
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--panel-alt);
  color: var(--ink);
  font: inherit;
  width: 100%;
  transition:
    border-color var(--transition-duration) ease,
    box-shadow var(--transition-duration) ease,
    background var(--transition-duration) ease;
}

input:not([type="checkbox"]):not([type="radio"]):hover,
select:hover,
textarea:hover {
  border-color: rgba(122, 162, 255, 0.4);
}

input:not([type="checkbox"]):not([type="radio"]):focus-visible,
select:focus-visible,
textarea:focus-visible {
  background: var(--panel-highlight);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

summary {
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

details {
  background: var(--panel-alt);
  border: var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition:
    border-color var(--transition-duration) ease,
    background var(--transition-duration) ease;
}

details > summary {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

details[open] > summary {
  background: rgba(122, 162, 255, 0.1);
}

details[open] > summary::after {
  transform: rotate(0deg);
}

details .content {
  padding: 0 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--muted);
}

details .content ul {
  margin: 0;
  padding-left: 20px;
}

details .content li {
  margin-bottom: 6px;
}

.table,
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: transparent;
}

table thead th {
  text-align: left;
  padding: 12px 10px;
  background: var(--panel);
  color: #d9e4f1;
  font-weight: 600;
  letter-spacing: 0.4px;
  position: sticky;
  top: 0;
  z-index: 1;
}

table tbody td,
table tbody th {
  padding: 12px 10px;
  border-top: var(--border);
}

table tbody tr:nth-child(odd) {
  background: var(--table-stripe);
}

table tbody tr:hover {
  background: rgba(122, 162, 255, 0.06);
}

table th:first-child,
table td:first-child {
  text-align: left;
}

table th:not(:first-child),
table td:not(:first-child) {
  text-align: right;
}

.table-note,
.note,
.muted,
.small {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (prefers-contrast: more) {
  :root {
    --muted: #d4deec;
    --border-color: rgba(255, 255, 255, 0.35);
  }

  a {
    color: #c7d8ff;
  }

  .card,
  .section,
  .panel,
  .block,
  .site-header,
  .site-footer {
    border: 2px solid rgba(255, 255, 255, 0.45);
  }
}

@media (forced-colors: active) {
  * {
    forced-color-adjust: auto;
  }

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible,
  summary:focus-visible {
    outline: 2px solid Highlight;
  }
}

.section,
.panel,
.block {
  background: var(--panel-alt);
  border: var(--border);
  border-radius: 12px;
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title,
.section h2,
.section h3,
.card h2,
.card h3 {
  margin: 0;
  color: #f4f7ff;
  letter-spacing: 0.25px;
}

.section-actions,
.actions-row,
.btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.row-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.summary,
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap);
  margin-top: 12px;
}

.summary .box,
.metrics-grid .box {
  background: var(--panel-alt);
  border: var(--border);
  border-radius: 12px;
  padding: 16px;
}

.mini {
  font-size: 0.94rem;
}

.mini th,
.mini td {
  border: var(--border);
  padding: 8px 10px;
  text-align: right;
}

.mini th:first-child,
.mini td:first-child {
  text-align: left;
}

.mini .section-row td {
  background: rgba(122, 162, 255, 0.08);
  font-weight: 700;
  color: #cfe0ff;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.alert,
.callout {
  border-radius: 12px;
  padding: 18px 22px;
  border: 1px solid rgba(122, 162, 255, 0.35);
  background: rgba(122, 162, 255, 0.12);
}

.alert.alert--success {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.alert.alert--danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
}

.alert.alert--warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(122, 162, 255, 0.08), rgba(11, 15, 20, 0.7)),
    var(--panel);
  border-radius: var(--radius);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-copy p {
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0;
}

.card-logo {
  max-width: 300px;
}

.hero-media img {
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 3vw, 18px);
}

.inline {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.table-footnote {
  font-size: 0.85rem;
  color: var(--muted);
}

.faq-feedback,
.feedback-card {
  margin-top: 20px;
  padding: 20px 24px;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(122, 162, 255, 0.1),
    rgba(94, 244, 255, 0.12)
  );
  border: 1px dashed rgba(122, 162, 255, 0.45);
  color: var(--ink);
}

.highlight-row {
  background: rgba(122, 162, 255, 0.1);
}

.metric-sparkle {
  position: relative;
  isolation: isolate;
}

.metric-sparkle::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(
    circle at top right,
    rgba(122, 162, 255, 0.28),
    transparent 55%
  );
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-duration) ease;
}

.metric-sparkle:hover::after,
.metric-sparkle:focus-within::after {
  opacity: 1;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    text-align: left;
  }
}

@media (max-width: 600px) {
  .card,
  .section,
  .panel,
  .block {
    padding: 20px;
  }

  header {
    padding-block: 24px 12px;
  }

  .btn,
  button,
  .button {
    width: 100%;
  }
}

@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;
  }
}
.site-header {
  background: linear-gradient(
    150deg,
    rgba(11, 18, 34, 0.98),
    rgba(10, 16, 28, 0.95)
  );
  border-bottom: 1px solid rgba(122, 162, 255, 0.25);
  box-shadow: 0 20px 48px rgba(6, 16, 40, 0.35);
}
