/*
 * Pokémon EV Trainer Analytics redesign
 * Page-scoped so other Pokemon calculators retain their current treatment.
 */

body.pokemon-trainer-dashboard {
  --trainer-bg: #020716;
  --trainer-bg-soft: #050d24;
  --trainer-panel: #07152f;
  --trainer-panel-deep: #040c1d;
  --trainer-panel-raised: #0a1b3c;
  --trainer-blue: #277dff;
  --trainer-blue-bright: #38bdf8;
  --trainer-cyan: #21d4ff;
  --trainer-violet: #8748ff;
  --trainer-yellow: #ffdc19;
  --trainer-yellow-soft: #fff08a;
  --trainer-green: #79df67;
  --trainer-red: #ff5570;
  --trainer-text: #f7f9ff;
  --trainer-muted: #9fb3d7;
  --trainer-border: rgba(48, 139, 255, 0.7);
  --trainer-border-soft: rgba(69, 143, 255, 0.34);
  --trainer-shadow: 0 18px 44px rgba(0, 3, 15, 0.48);

  min-height: 100vh;
  color: var(--trainer-text);
  font-family:
    Exo,
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background:
    radial-gradient(
      circle at 16% 7%,
      rgba(59, 67, 214, 0.23),
      transparent 28rem
    ),
    radial-gradient(
      circle at 86% 13%,
      rgba(0, 160, 255, 0.16),
      transparent 32rem
    ),
    radial-gradient(
      circle at 66% 58%,
      rgba(96, 38, 201, 0.13),
      transparent 36rem
    ),
    linear-gradient(180deg, #020713 0%, #03091a 46%, #020611 100%);
}

body.pokemon-trainer-dashboard::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(rgba(37, 111, 214, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 111, 214, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    rgba(0, 0, 0, 0.55) 46%,
    transparent 100%
  );
}

body.pokemon-section.pokemon-trainer-dashboard .site-header,
body.pokemon-section.pokemon-trainer-dashboard .site-footer {
  border: 0;
  border-radius: 0;
  background: rgba(2, 7, 22, 0.96);
  box-shadow:
    0 2px 0 var(--trainer-yellow),
    0 18px 40px rgba(0, 4, 20, 0.42);
}

body.pokemon-section.pokemon-trainer-dashboard .site-header::before,
body.pokemon-section.pokemon-trainer-dashboard .site-footer::before {
  background: linear-gradient(90deg, rgba(38, 118, 255, 0.2), transparent 44%);
}

body.pokemon-section.pokemon-trainer-dashboard .site-header .nav-link,
body.pokemon-section.pokemon-trainer-dashboard .site-header .site-nav-toggle {
  border-color: transparent;
  background: transparent;
  color: #dfeaff;
  text-shadow: none;
}

body.pokemon-section.pokemon-trainer-dashboard .site-header .nav-link:hover,
body.pokemon-section.pokemon-trainer-dashboard
  .site-header
  .nav-link:focus-visible,
body.pokemon-section.pokemon-trainer-dashboard
  .site-header
  .site-nav-toggle:hover,
body.pokemon-section.pokemon-trainer-dashboard
  .site-header
  .site-nav-toggle:focus-visible {
  border-color: var(--trainer-cyan);
  background: rgba(31, 115, 222, 0.12);
  color: #ffffff;
}

body.pokemon-trainer-dashboard main.wrap {
  display: grid;
  width: min(1540px, calc(100% - 32px));
  max-width: none;
  gap: 12px;
  margin-inline: auto;
  padding: 22px 0 40px;
}

body.pokemon-trainer-dashboard h1,
body.pokemon-trainer-dashboard h2,
body.pokemon-trainer-dashboard h3,
body.pokemon-trainer-dashboard p {
  text-wrap: pretty;
}

body.pokemon-trainer-dashboard .pokemon-ev-hero,
body.pokemon-trainer-dashboard .pokemon-ev-product-strip,
body.pokemon-trainer-dashboard .pokemon-ev-pack-structure,
body.pokemon-trainer-dashboard .pokemon-ev-contributors,
body.pokemon-trainer-dashboard .pokemon-ev-model-notes,
body.pokemon-trainer-dashboard details.sets,
body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary,
body.pokemon-trainer-dashboard .pokemon-ev-simulation-card,
body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown,
body.pokemon-trainer-dashboard .pokemon-ev-results-table,
body.pokemon-trainer-dashboard .us-pe-card {
  border: 1px solid var(--trainer-border);
  background:
    linear-gradient(145deg, rgba(8, 22, 49, 0.97), rgba(3, 10, 26, 0.98)),
    radial-gradient(
      circle at top right,
      rgba(35, 123, 255, 0.12),
      transparent 38%
    );
  box-shadow:
    var(--trainer-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Hero */
body.pokemon-trainer-dashboard .pokemon-ev-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(440px, 0.92fr);
  gap: clamp(26px, 4vw, 64px);
  min-height: 292px;
  overflow: hidden;
  padding: clamp(28px, 4vw, 50px);
  border-top-color: rgba(93, 159, 255, 0.92);
  border-radius: 18px;
  background:
    linear-gradient(
      118deg,
      rgba(4, 12, 35, 0.98) 0 48%,
      rgba(9, 15, 53, 0.96) 72%,
      rgba(3, 12, 31, 0.98)
    ),
    radial-gradient(
      circle at 12% 18%,
      rgba(55, 89, 255, 0.24),
      transparent 28rem
    );
}

body.pokemon-trainer-dashboard .pokemon-ev-hero::before {
  position: absolute;
  top: 20px;
  left: -36px;
  z-index: -1;
  width: 220px;
  aspect-ratio: 1;
  content: "";
  border: 2px solid rgba(67, 132, 255, 0.2);
  border-radius: 50%;
  opacity: 0.72;
  background:
    linear-gradient(
      transparent 47%,
      rgba(45, 113, 244, 0.32) 47% 53%,
      transparent 53%
    ),
    radial-gradient(
      circle,
      rgba(44, 122, 255, 0.35) 0 8%,
      #071631 9% 13%,
      rgba(55, 125, 255, 0.58) 14% 16%,
      transparent 17% 40%,
      rgba(58, 120, 236, 0.34) 41% 43%,
      transparent 44%
    );
  box-shadow: 0 0 44px rgba(25, 103, 255, 0.14);
}

body.pokemon-trainer-dashboard .pokemon-ev-hero::after {
  position: absolute;
  inset: -30% -5% -30% 34%;
  z-index: -2;
  content: "";
  opacity: 0.62;
  transform: skewX(-21deg);
  background: linear-gradient(
    90deg,
    transparent 0 25%,
    rgba(74, 51, 211, 0.5) 25% 28%,
    transparent 28% 34%,
    rgba(39, 125, 255, 0.22) 34% 39%,
    transparent 39% 62%,
    rgba(98, 52, 224, 0.25) 62% 64%,
    transparent 64%
  );
}

body.pokemon-trainer-dashboard .pokemon-ev-hero__copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 820px;
  padding-left: clamp(0px, 2vw, 34px);
}

body.pokemon-trainer-dashboard .pokemon-ev-eyebrow {
  margin: 0 0 10px;
  color: var(--trainer-cyan);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.pokemon-trainer-dashboard .pokemon-ev-hero h1 {
  display: grid;
  gap: 5px;
  margin: 0;
  color: var(--trainer-cyan);
  font-size: clamp(1.28rem, 2vw, 1.75rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-shadow: 0 0 22px rgba(33, 212, 255, 0.12);
}

body.pokemon-trainer-dashboard .pokemon-ev-hero h1 > span {
  color: #ffffff;
  font-size: clamp(2.75rem, 5.6vw, 5.3rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

body.pokemon-trainer-dashboard .pokemon-ev-hero__lead {
  max-width: 67ch;
  margin: 18px 0 0;
  color: #e6edff;
  font-size: 1rem;
  font-weight: 560;
  line-height: 1.5;
}

body.pokemon-trainer-dashboard .pokemon-ev-hero__notice {
  max-width: 74ch;
  margin: 10px 0 0;
  color: #a8bce0;
  font-size: 0.84rem;
  line-height: 1.5;
}

body.pokemon-trainer-dashboard .pokemon-ev-meta-chips {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  width: 100%;
  gap: 7px;
  margin-top: 0;
}

body.pokemon-trainer-dashboard .pokemon-ev-meta-chips > span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid rgba(55, 132, 255, 0.5);
  border-radius: 7px;
  background: linear-gradient(
    145deg,
    rgba(10, 34, 79, 0.92),
    rgba(5, 17, 43, 0.96)
  );
  color: #e8efff;
  font-size: 0.78rem;
  font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.pokemon-trainer-dashboard .pokemon-ev-meta-chips b {
  color: var(--trainer-cyan);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.pokemon-trainer-dashboard .pokemon-ev-quick-summary {
  position: relative;
  z-index: 1;
  align-self: start;
  min-width: 0;
  overflow: hidden;
  padding: 54px 28px 22px;
  border: 3px solid var(--trainer-yellow);
  border-radius: 6px 24px 6px 24px;
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(34, 126, 255, 0.26),
      transparent 45%
    ),
    linear-gradient(145deg, rgba(7, 27, 65, 0.99), rgba(3, 13, 34, 0.99));
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.42),
    0 0 24px rgba(255, 220, 25, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.pokemon-trainer-dashboard .pokemon-ev-quick-summary h2 {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-width: min(290px, 72%);
  min-height: 40px;
  margin: 0;
  padding: 8px 48px 8px 20px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 24px) 100%, 0 100%);
  background: var(--trainer-yellow);
  color: #091025;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  text-shadow: none;
}

body.pokemon-trainer-dashboard .pokemon-ev-quick-summary dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

body.pokemon-trainer-dashboard .pokemon-ev-quick-summary dl > div {
  min-width: 0;
  padding: 4px 20px;
  border-left: 1px solid rgba(177, 201, 244, 0.28);
}

body.pokemon-trainer-dashboard .pokemon-ev-quick-summary dl > div:first-child {
  padding-left: 0;
  border-left: 0;
}

body.pokemon-trainer-dashboard .pokemon-ev-quick-summary dt {
  color: #dce7ff;
  font-size: 0.86rem;
  font-weight: 650;
}

body.pokemon-trainer-dashboard .pokemon-ev-quick-summary dd {
  margin: 8px 0 0;
  color: #ffffff;
  font-size: clamp(1.3rem, 2.1vw, 2.15rem);
  font-weight: 900;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

body.pokemon-trainer-dashboard #trainerGrossEv {
  color: var(--trainer-yellow);
}

body.pokemon-trainer-dashboard #trainerNetEv {
  color: var(--trainer-green);
}

body.pokemon-trainer-dashboard #trainerEvRange {
  font-size: clamp(1.05rem, 1.7vw, 1.55rem);
}

body.pokemon-trainer-dashboard .pokemon-ev-quick-summary > p {
  margin: 20px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(122, 167, 235, 0.22);
  color: var(--trainer-muted);
  font-size: 0.76rem;
  font-weight: 650;
}

/* Product strip */
body.pokemon-trainer-dashboard .pokemon-ev-product-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 120px;
  overflow: hidden;
  border-radius: 7px;
}

body.pokemon-trainer-dashboard .pokemon-ev-product-strip__body {
  display: grid;
  gap: 13px;
  padding: 16px 22px 18px;
}

body.pokemon-trainer-dashboard .pokemon-ev-product-strip__heading {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

body.pokemon-trainer-dashboard .pokemon-ev-product-strip__heading p,
body.pokemon-trainer-dashboard .pokemon-ev-panel-heading p,
body.pokemon-trainer-dashboard .pokemon-ev-section-heading p {
  margin: 0 0 3px;
  color: var(--trainer-cyan);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

body.pokemon-trainer-dashboard .pokemon-ev-product-strip__heading h2,
body.pokemon-trainer-dashboard .pokemon-ev-panel-heading h2,
body.pokemon-trainer-dashboard .pokemon-ev-section-heading h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.03rem;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: none;
}

body.pokemon-trainer-dashboard .pokemon-ev-data-badge,
body.pokemon-trainer-dashboard .pokemon-ev-panel-heading > span,
body.pokemon-trainer-dashboard .pokemon-ev-section-heading > span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(33, 212, 255, 0.58);
  border-radius: 999px;
  background: rgba(18, 93, 159, 0.14);
  color: #bdefff;
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
}

body.pokemon-trainer-dashboard .pokemon-ev-product-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
}

body.pokemon-trainer-dashboard .pokemon-ev-product-stats > div {
  padding: 0 18px;
  border-left: 1px solid rgba(125, 160, 218, 0.23);
}

body.pokemon-trainer-dashboard .pokemon-ev-product-stats > div:first-child {
  padding-left: 0;
  border-left: 0;
}

body.pokemon-trainer-dashboard .pokemon-ev-product-stats dt {
  color: var(--trainer-muted);
  font-size: 0.72rem;
  line-height: 1.2;
}

body.pokemon-trainer-dashboard .pokemon-ev-product-stats dd {
  margin: 5px 0 0;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
}

/* Model snapshot */
body.pokemon-trainer-dashboard .pokemon-ev-insights {
  display: grid;
  grid-template-columns: minmax(390px, 0.78fr) minmax(0, 1.22fr);
  gap: 12px;
}

body.pokemon-trainer-dashboard .pokemon-ev-pack-structure,
body.pokemon-trainer-dashboard .pokemon-ev-contributors {
  min-width: 0;
  overflow: hidden;
  padding: 16px;
  border-radius: 7px;
}

body.pokemon-trainer-dashboard .pokemon-ev-pack-structure {
  border-color: rgba(146, 70, 255, 0.86);
  box-shadow:
    0 18px 42px rgba(0, 2, 14, 0.44),
    inset 0 3px 0 rgba(151, 71, 255, 0.88);
}

body.pokemon-trainer-dashboard .pokemon-ev-contributors {
  border-color: rgba(33, 212, 255, 0.78);
  box-shadow:
    0 18px 42px rgba(0, 2, 14, 0.44),
    inset 0 3px 0 rgba(33, 212, 255, 0.76);
}

body.pokemon-trainer-dashboard .pokemon-ev-panel-heading,
body.pokemon-trainer-dashboard .pokemon-ev-section-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

body.pokemon-trainer-dashboard .pokemon-ev-slot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

body.pokemon-trainer-dashboard .pokemon-ev-slot-card {
  --slot-accent: #4c8fff;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 94px;
  padding: 12px 8px 16px;
  overflow: hidden;
  border: 1px solid rgba(115, 153, 219, 0.35);
  border-radius: 7px;
  background: linear-gradient(
    165deg,
    rgba(15, 34, 75, 0.98),
    rgba(6, 15, 36, 0.98)
  );
  text-align: center;
}

body.pokemon-trainer-dashboard .pokemon-ev-slot-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 5px;
  content: "";
  background: var(--slot-accent);
  box-shadow: 0 0 15px color-mix(in srgb, var(--slot-accent) 55%, transparent);
}

body.pokemon-trainer-dashboard .pokemon-ev-slot-card--common {
  --slot-accent: #a9afbc;
}
body.pokemon-trainer-dashboard .pokemon-ev-slot-card--uncommon {
  --slot-accent: #71d776;
}
body.pokemon-trainer-dashboard .pokemon-ev-slot-card--rare {
  --slot-accent: #3d8dff;
}
body.pokemon-trainer-dashboard .pokemon-ev-slot-card--premium {
  --slot-accent: #a551ff;
}

body.pokemon-trainer-dashboard .pokemon-ev-slot-card strong {
  color: #ffffff;
  font-size: 1.65rem;
  line-height: 1;
}

body.pokemon-trainer-dashboard .pokemon-ev-slot-card span {
  color: #dce7ff;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
}

body.pokemon-trainer-dashboard .pokemon-ev-panel-note {
  margin: 12px 0 0;
  color: var(--trainer-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

body.pokemon-trainer-dashboard .pokemon-ev-contributors__table-wrap {
  margin-top: 10px;
  overflow-x: hidden;
}

body.pokemon-trainer-dashboard .pokemon-ev-contributors__table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.82rem;
}

body.pokemon-trainer-dashboard .pokemon-ev-contributors__table th,
body.pokemon-trainer-dashboard .pokemon-ev-contributors__table td {
  min-width: 0;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(108, 149, 216, 0.19);
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: left;
}

body.pokemon-trainer-dashboard .pokemon-ev-contributors__table th:nth-child(1),
body.pokemon-trainer-dashboard .pokemon-ev-contributors__table td:nth-child(1) {
  width: 30%;
}

body.pokemon-trainer-dashboard .pokemon-ev-contributors__table th:nth-child(2),
body.pokemon-trainer-dashboard .pokemon-ev-contributors__table td:nth-child(2) {
  width: 20%;
}

body.pokemon-trainer-dashboard .pokemon-ev-contributors__table th:nth-child(3),
body.pokemon-trainer-dashboard .pokemon-ev-contributors__table td:nth-child(3) {
  width: 13%;
}

body.pokemon-trainer-dashboard .pokemon-ev-contributors__table th:nth-child(4),
body.pokemon-trainer-dashboard .pokemon-ev-contributors__table td:nth-child(4) {
  width: 14%;
}

body.pokemon-trainer-dashboard .pokemon-ev-contributors__table th:nth-child(5),
body.pokemon-trainer-dashboard .pokemon-ev-contributors__table td:nth-child(5) {
  width: 23%;
}

body.pokemon-trainer-dashboard .pokemon-ev-contributors__table thead th {
  color: #c1d2ef;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.pokemon-trainer-dashboard
  .pokemon-ev-contributors__table
  tbody
  tr:last-child
  td {
  border-bottom: 0;
}

body.pokemon-trainer-dashboard .pokemon-ev-contributors__table td:first-child {
  color: #ffffff;
  font-weight: 750;
}

body.pokemon-trainer-dashboard .pokemon-ev-contributors__table td:last-child {
  color: var(--trainer-green);
  font-weight: 800;
}

body.pokemon-trainer-dashboard .pokemon-ev-contributor-rank {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 7px;
  border-radius: 50%;
  background: rgba(45, 127, 255, 0.2);
  color: var(--trainer-cyan);
  font-size: 0.7rem;
  font-weight: 900;
}

/* Disclosure panels */
body.pokemon-trainer-dashboard .pokemon-ev-model-notes,
body.pokemon-trainer-dashboard details.sets,
body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary {
  overflow: hidden;
  padding: 0;
  border-radius: 7px;
}

body.pokemon-trainer-dashboard .pokemon-ev-model-notes > summary,
body.pokemon-trainer-dashboard details.sets > summary,
body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 50px;
  margin: 0;
  padding: 11px 16px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(
    90deg,
    rgba(11, 31, 69, 0.98),
    rgba(5, 16, 39, 0.98)
  );
  color: #ffffff;
}

body.pokemon-trainer-dashboard
  .pokemon-ev-model-notes
  > summary::-webkit-details-marker,
body.pokemon-trainer-dashboard details.sets > summary::-webkit-details-marker,
body.pokemon-trainer-dashboard
  .pokemon-ev-detailed-summary
  > summary::-webkit-details-marker {
  display: none;
}

body.pokemon-trainer-dashboard .pokemon-ev-model-notes > summary span,
body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary > summary span {
  color: #f4f8ff;
  font-size: 0.9rem;
  font-weight: 800;
}

body.pokemon-trainer-dashboard .pokemon-ev-model-notes > summary small,
body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary > summary small {
  color: var(--trainer-muted);
  font-size: 0.72rem;
  font-weight: 650;
}

body.pokemon-trainer-dashboard .pokemon-ev-model-notes > summary::after,
body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary > summary::after {
  grid-column: 2;
  grid-row: 1 / span 2;
  content: "⌄";
  color: var(--trainer-cyan);
  font-size: 1.2rem;
  transition: transform 160ms ease;
}

body.pokemon-trainer-dashboard .pokemon-ev-model-notes[open] > summary::after,
body.pokemon-trainer-dashboard
  .pokemon-ev-detailed-summary[open]
  > summary::after {
  transform: rotate(180deg);
}

body.pokemon-trainer-dashboard .pokemon-ev-model-notes__body {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid var(--trainer-border-soft);
}

body.pokemon-trainer-dashboard .pokemon-ev-model-notes__body p {
  margin: 0;
  color: #c5d3ec;
  line-height: 1.55;
}

body.pokemon-trainer-dashboard .pokemon-ev-model-notes__body .mini {
  margin: 2px 0;
}

/* Included pools */
body.pokemon-trainer-dashboard details.sets {
  border-color: rgba(43, 127, 255, 0.8);
  background: linear-gradient(
    90deg,
    rgba(8, 28, 67, 0.98),
    rgba(3, 13, 32, 0.98)
  );
}

body.pokemon-trainer-dashboard details.sets > summary {
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding-inline: 18px;
  border: 0;
  border-radius: 0;
}

body.pokemon-trainer-dashboard .pokemon-ev-pools-summary {
  display: flex;
  gap: 11px;
  align-items: center;
}

body.pokemon-trainer-dashboard .pokemon-ev-pools-summary > b {
  color: #e2ecff;
  font-size: 0.9rem;
  transform: rotate(45deg);
}

body.pokemon-trainer-dashboard .pokemon-ev-pools-summary > span {
  display: grid;
  gap: 2px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 850;
}

body.pokemon-trainer-dashboard .pokemon-ev-pools-summary small {
  color: var(--trainer-muted);
  font-size: 0.68rem;
  font-weight: 600;
}

body.pokemon-trainer-dashboard .pokemon-ev-pool-count {
  color: #d8e6ff;
  font-size: 0.74rem;
  font-weight: 650;
  white-space: nowrap;
}

body.pokemon-trainer-dashboard .pokemon-ev-pool-count b {
  color: var(--trainer-yellow);
}

body.pokemon-trainer-dashboard details.sets > summary .chev {
  float: none;
  color: var(--trainer-cyan);
}

body.pokemon-trainer-dashboard details.sets .include-list {
  padding: 18px;
  border-top: 1px solid var(--trainer-border-soft);
  background: rgba(3, 12, 30, 0.76);
}

body.pokemon-trainer-dashboard details.sets .include-list .col {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 8px 12px;
}

body.pokemon-trainer-dashboard details.sets .include-list label {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid rgba(77, 133, 216, 0.26);
  border-radius: 6px;
  background: rgba(9, 27, 61, 0.62);
  color: #e4edff;
  font-size: 0.78rem;
  font-weight: 650;
}

body.pokemon-trainer-dashboard details.sets .include-list label:hover,
body.pokemon-trainer-dashboard details.sets .include-list label:focus-within {
  border-color: rgba(33, 212, 255, 0.62);
  background: rgba(12, 44, 84, 0.72);
}

body.pokemon-trainer-dashboard input[type="checkbox"] {
  accent-color: var(--trainer-blue);
}

/* Calculator control tiles */
body.pokemon-trainer-dashboard .pokemon-ev-calculator-shell {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.pokemon-trainer-dashboard .pokemon-ev-calculator-shell > .settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(260px, 0.94fr);
  gap: 12px;
  align-items: stretch;
}

body.pokemon-trainer-dashboard .pokemon-ev-calculator-shell .section {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(65, 145, 255, 0.76);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(13, 35, 77, 0.98), rgba(5, 16, 39, 0.98)),
    radial-gradient(
      circle at top right,
      rgba(45, 126, 255, 0.16),
      transparent 46%
    );
  box-shadow:
    0 14px 32px rgba(0, 3, 17, 0.4),
    inset 4px 0 0 rgba(70, 146, 255, 0.7);
}

body.pokemon-trainer-dashboard .pokemon-ev-fees-control {
  grid-column: 1;
  grid-row: 1;
}

body.pokemon-trainer-dashboard .pokemon-ev-value-control {
  grid-column: 2;
  grid-row: 1;
}

body.pokemon-trainer-dashboard .pokemon-ev-advanced-control {
  grid-column: 3;
  grid-row: 1;
}

body.pokemon-trainer-dashboard .pokemon-ev-fees-control .form-row > .small,
body.pokemon-trainer-dashboard .pokemon-ev-value-control .form-row > .small,
body.pokemon-trainer-dashboard
  .pokemon-ev-advanced-control__body
  .form-row
  > .small {
  display: none;
}

body.pokemon-trainer-dashboard .pokemon-ev-calculator-shell .section h3 {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px;
  color: #f6f9ff;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  text-shadow: none;
}

body.pokemon-trainer-dashboard
  .pokemon-ev-calculator-shell
  .section
  h3::before {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid rgba(33, 212, 255, 0.42);
  border-radius: 5px;
  background: rgba(31, 108, 196, 0.18);
  color: var(--trainer-cyan);
  content: "◆";
  font-size: 0.65rem;
}

body.pokemon-trainer-dashboard .pokemon-ev-fees-control h3::before {
  content: "%";
}
body.pokemon-trainer-dashboard .pokemon-ev-purchase-control h3::before {
  content: "▣";
}

body.pokemon-trainer-dashboard .pokemon-ev-calculator-shell .section-body {
  display: grid;
  gap: 11px;
}

body.pokemon-trainer-dashboard .pokemon-ev-purchase-control .section-body {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.pokemon-trainer-dashboard .pokemon-ev-calculator-shell .form-row {
  min-width: 0;
  margin: 0;
}

body.pokemon-trainer-dashboard .pokemon-ev-calculator-shell label {
  margin-bottom: 5px;
  color: #dbe6fa;
  font-size: 0.72rem;
  font-weight: 700;
}

body.pokemon-trainer-dashboard
  .pokemon-ev-calculator-shell
  input:not([type="checkbox"]),
body.pokemon-trainer-dashboard .pokemon-ev-calculator-shell select {
  min-height: 42px;
  border: 1px solid rgba(76, 139, 233, 0.58);
  border-radius: 6px;
  background: #06132d;
  color: #ffffff;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.32);
}

body.pokemon-trainer-dashboard .pokemon-ev-calculator-shell input:focus-visible,
body.pokemon-trainer-dashboard
  .pokemon-ev-calculator-shell
  select:focus-visible {
  border-color: var(--trainer-cyan);
  outline: 2px solid rgba(33, 212, 255, 0.62);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(33, 212, 255, 0.1);
}

body.pokemon-trainer-dashboard .pokemon-ev-calculator-shell .small {
  color: #8ea5cb;
  font-size: 0.65rem;
  line-height: 1.4;
}

body.pokemon-trainer-dashboard .pokemon-ev-calculator-shell .section-actions {
  margin-top: 10px;
}

body.pokemon-trainer-dashboard #resetSift,
body.pokemon-trainer-dashboard #selectAllSets,
body.pokemon-trainer-dashboard #deselectAllSets,
body.pokemon-trainer-dashboard #toggleDebug {
  min-height: 36px;
  border: 1px solid rgba(42, 169, 255, 0.58);
  border-radius: 6px;
  background: linear-gradient(145deg, #123c80, #0a275a);
  color: #dff5ff;
  font-size: 0.72rem;
  font-weight: 750;
  text-shadow: none;
  box-shadow: none;
}

body.pokemon-trainer-dashboard .pokemon-ev-calc-action {
  grid-column: 4;
  grid-row: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-content: stretch;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 220, 25, 0.7);
  border-radius: 7px;
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 237, 93, 0.17),
      transparent 50%
    ),
    linear-gradient(145deg, rgba(25, 32, 52, 0.98), rgba(5, 14, 34, 0.98));
  box-shadow: var(--trainer-shadow);
}

body.pokemon-trainer-dashboard
  .pokemon-ev-calc-action
  > .pokemon-ev-purchase-control {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.pokemon-trainer-dashboard
  .pokemon-ev-calc-action
  > .pokemon-ev-purchase-control::before {
  content: none;
}

body.pokemon-trainer-dashboard .pokemon-ev-calc-action #calcEV {
  display: flex;
  align-self: end;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 94px;
  margin: 0;
  padding: 16px 20px;
  clip-path: polygon(
    7px 0,
    calc(100% - 7px) 0,
    100% 7px,
    100% calc(100% - 7px),
    calc(100% - 7px) 100%,
    7px 100%,
    0 calc(100% - 7px),
    0 7px
  );
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(
      circle at 10% 12%,
      rgba(255, 255, 255, 0.36),
      transparent 26%
    ),
    linear-gradient(160deg, #fff45f 0%, #ffdc19 52%, #f7b900 100%);
  color: #091024;
  font-size: clamp(1.12rem, 1.5vw, 1.55rem);
  font-style: italic;
  font-weight: 950;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  box-shadow:
    0 12px 26px rgba(255, 193, 0, 0.22),
    inset 0 0 0 3px rgba(7, 15, 35, 0.25);
}

body.pokemon-trainer-dashboard .pokemon-ev-calc-action #calcEV b {
  font-size: 1.55em;
  line-height: 1;
}

body.pokemon-trainer-dashboard .pokemon-ev-calc-action #calcEV:hover,
body.pokemon-trainer-dashboard .pokemon-ev-calc-action #calcEV:focus-visible {
  color: #040b1c;
  filter: brightness(1.07) saturate(1.05);
  transform: translateY(-1px);
  box-shadow:
    0 16px 34px rgba(255, 193, 0, 0.3),
    inset 0 0 0 3px rgba(7, 15, 35, 0.28);
}

body.pokemon-trainer-dashboard .pokemon-ev-calc-action > small {
  color: #a9bad8;
  font-size: 0.66rem;
  line-height: 1.35;
  text-align: center;
}

body.pokemon-trainer-dashboard .pokemon-ev-advanced-control {
  min-height: 0;
  padding: 0 !important;
}

body.pokemon-trainer-dashboard .pokemon-ev-advanced-control > summary {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 55px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

body.pokemon-trainer-dashboard
  .pokemon-ev-advanced-control
  > summary::-webkit-details-marker {
  display: none;
}

body.pokemon-trainer-dashboard .pokemon-ev-advanced-control > summary::before {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid rgba(33, 212, 255, 0.42);
  border-radius: 5px;
  background: rgba(31, 108, 196, 0.18);
  color: var(--trainer-cyan);
  content: "◆";
  font-size: 0.65rem;
}

body.pokemon-trainer-dashboard .pokemon-ev-advanced-control > summary span {
  color: #f6f9ff;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

body.pokemon-trainer-dashboard .pokemon-ev-advanced-control > summary small {
  display: none;
}

body.pokemon-trainer-dashboard .pokemon-ev-advanced-control > summary::after {
  grid-column: 3;
  grid-row: 1;
  content: "⌄";
  color: var(--trainer-cyan);
  font-size: 1.2rem;
  transition: transform 160ms ease;
}

body.pokemon-trainer-dashboard .pokemon-ev-advanced-control[open] > summary {
  border-bottom: 1px solid rgba(69, 130, 216, 0.35);
}

body.pokemon-trainer-dashboard
  .pokemon-ev-advanced-control[open]
  > summary::after {
  transform: rotate(180deg);
}

body.pokemon-trainer-dashboard .pokemon-ev-advanced-control__body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

body.pokemon-trainer-dashboard .pokemon-ev-advanced-control__body > h3 {
  margin: 0 !important;
}

body.pokemon-trainer-dashboard
  .pokemon-ev-advanced-control__body
  .section-body {
  grid-template-columns: minmax(0, 1fr);
}

/* Result band */
body.pokemon-trainer-dashboard .pokemon-ev-result-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  overflow: hidden;
  border: 1px solid rgba(61, 139, 255, 0.72);
  border-radius: 7px;
  background: #061129;
  box-shadow: var(--trainer-shadow);
}

body.pokemon-trainer-dashboard .pokemon-ev-result-band__item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 18px;
  align-items: center;
  min-height: 82px;
  padding: 14px clamp(20px, 3vw, 44px);
  overflow: hidden;
  background: linear-gradient(
    110deg,
    rgba(12, 38, 85, 0.98),
    rgba(5, 18, 43, 0.98)
  );
}

body.pokemon-trainer-dashboard .pokemon-ev-result-band__item::after {
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  content: "";
  background: var(--result-accent, var(--trainer-blue));
  box-shadow: 0 0 18px var(--result-accent, var(--trainer-blue));
}

body.pokemon-trainer-dashboard .pokemon-ev-result-band__item--low {
  --result-accent: var(--trainer-red);
  background:
    linear-gradient(110deg, rgba(111, 24, 48, 0.7), rgba(15, 25, 60, 0.96) 74%),
    #08132d;
}

body.pokemon-trainer-dashboard .pokemon-ev-result-band__item--mid {
  --result-accent: var(--trainer-blue);
  background:
    linear-gradient(110deg, rgba(13, 47, 102, 0.96), rgba(6, 19, 46, 0.98)),
    #08132d;
}

body.pokemon-trainer-dashboard .pokemon-ev-result-band__item--high {
  --result-accent: var(--trainer-green);
  background:
    linear-gradient(110deg, rgba(8, 48, 50, 0.96), rgba(15, 79, 43, 0.78)),
    #08132d;
}

body.pokemon-trainer-dashboard .pokemon-ev-result-band__item > span {
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--result-accent);
  font-size: 0.82rem;
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.pokemon-trainer-dashboard .pokemon-ev-result-band__item > strong {
  color: #ffffff;
  font-size: clamp(1.28rem, 2.1vw, 1.95rem);
  font-weight: 900;
  line-height: 1.05;
  text-align: right;
}

body.pokemon-trainer-dashboard .pokemon-ev-result-band__item > small {
  color: #93a9cc;
  font-size: 0.64rem;
  text-align: right;
}

/* Detailed table disclosure */
body.pokemon-trainer-dashboard .pokemon-ev-model-notes > summary > span,
body.pokemon-trainer-dashboard .pokemon-ev-model-notes > summary > small,
body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary > summary > span,
body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary > summary > small {
  grid-column: 1;
}

body.pokemon-trainer-dashboard .pokemon-ev-model-notes > summary > small,
body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary > summary > small {
  grid-row: 2;
}

body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary > .summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--trainer-border-soft);
}

body.pokemon-trainer-dashboard
  .pokemon-ev-detailed-summary
  > .summary.summary-single-table {
  grid-template-columns: minmax(0, 1fr);
}

body.pokemon-trainer-dashboard
  .pokemon-ev-detailed-summary
  > .summary.summary-single-table
  > .box:not([hidden]) {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
}

body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary .summary .box {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(66, 131, 221, 0.38);
  border-radius: 7px;
  background: rgba(5, 17, 42, 0.9);
  box-shadow: none;
}

body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary .summary h3,
body.pokemon-trainer-dashboard .us-pe-card h3 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  text-shadow: none;
}

body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary .mini,
body.pokemon-trainer-dashboard .us-pe-card .mini,
body.pokemon-trainer-dashboard .pokemon-ev-model-notes .mini {
  width: 100%;
  color: #dce7f9;
}

body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary table.mini {
  table-layout: fixed;
}

body.pokemon-trainer-dashboard
  .pokemon-ev-detailed-summary
  table.mini
  thead
  th:first-child {
  width: 46%;
}

body.pokemon-trainer-dashboard
  .pokemon-ev-detailed-summary
  table.mini
  thead
  th:not(:first-child) {
  width: 18%;
}

body.pokemon-trainer-dashboard
  .pokemon-ev-detailed-summary
  table.mini
  tbody
  th {
  overflow-wrap: normal;
  word-break: normal;
}

body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary .mini th,
body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary .mini td,
body.pokemon-trainer-dashboard .us-pe-card .mini th,
body.pokemon-trainer-dashboard .us-pe-card .mini td,
body.pokemon-trainer-dashboard .pokemon-ev-model-notes .mini th,
body.pokemon-trainer-dashboard .pokemon-ev-model-notes .mini td {
  padding: 8px 9px;
  border-color: rgba(96, 142, 209, 0.24);
}

body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary .mini thead th,
body.pokemon-trainer-dashboard .us-pe-card .mini thead th,
body.pokemon-trainer-dashboard .pokemon-ev-model-notes .mini thead th {
  background: rgba(16, 47, 96, 0.76);
  color: #cce2ff;
}

body.pokemon-trainer-dashboard
  .pokemon-ev-detailed-summary
  .mini
  td:nth-child(n + 2) {
  font-weight: 750;
}

body.pokemon-trainer-dashboard .us-pe-card {
  margin: 0;
  padding: 18px;
  border-radius: 7px;
}

body.pokemon-trainer-dashboard .us-pe-card[hidden] {
  display: none !important;
}

/* Simulation panel */
body.pokemon-trainer-dashboard .pokemon-ev-simulation-card {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: clamp(18px, 3vw, 24px);
  border-radius: 7px;
  border-color: rgba(54, 133, 255, 0.76);
  background:
    radial-gradient(
      circle at 82% 0,
      rgba(33, 212, 255, 0.1),
      transparent 26rem
    ),
    linear-gradient(145deg, rgba(7, 19, 43, 0.99), rgba(3, 10, 25, 0.99));
}

body.pokemon-trainer-dashboard
  .pokemon-ev-simulation-card
  > .pokemon-ev-section-heading {
  gap: 14px 20px;
  align-items: flex-start;
}

body.pokemon-trainer-dashboard .pokemon-ev-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 560px;
  color: #dbe8fa;
  font-size: 0.78rem;
  font-weight: 750;
}

body.pokemon-trainer-dashboard .pokemon-ev-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(63, 151, 255, 0.5);
  border-radius: 999px;
  background: rgba(5, 19, 43, 0.78);
}

body.pokemon-trainer-dashboard .pokemon-ev-chart-legend i {
  display: inline-block;
  flex: 0 0 auto;
}

body.pokemon-trainer-dashboard .pokemon-ev-chart-legend__bars {
  width: 16px;
  height: 9px;
  border-radius: 2px;
  background: linear-gradient(180deg, #b9ddff, #315c9f);
}

body.pokemon-trainer-dashboard .pokemon-ev-chart-legend__band {
  width: 18px;
  height: 10px;
  border: 1px dashed rgba(255, 141, 240, 0.92);
  border-radius: 3px;
  background: rgba(255, 141, 240, 0.12);
}

body.pokemon-trainer-dashboard .pokemon-ev-chart-legend__mid {
  width: 3px;
  height: 16px;
  border-radius: 999px;
  background: var(--trainer-cyan);
  box-shadow: 0 0 10px rgba(33, 212, 255, 0.48);
}

body.pokemon-trainer-dashboard .pokemon-ev-simulation-card .sim-chart-wrap {
  min-height: 280px;
  height: clamp(280px, 28vw, 330px);
  padding: 12px;
  border: 1px solid rgba(64, 139, 242, 0.56);
  border-radius: 7px;
  background:
    linear-gradient(rgba(84, 137, 213, 0.12) 1px, transparent 1px),
    linear-gradient(180deg, rgba(5, 16, 37, 0.98), rgba(2, 9, 24, 0.98));
  background-size: 100% 25%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -18px 40px rgba(0, 0, 0, 0.18);
}

body.pokemon-trainer-dashboard .pokemon-ev-chart-readout {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(64, 139, 242, 0.48);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(7, 20, 45, 0.92), rgba(4, 12, 29, 0.94)),
    radial-gradient(circle at 0 0, rgba(33, 212, 255, 0.08), transparent 28%);
}

body.pokemon-trainer-dashboard .pokemon-ev-chart-band {
  color: #c9efff;
  font-size: 0.98rem;
  font-weight: 850;
}

body.pokemon-trainer-dashboard .pokemon-ev-chart-readout p {
  margin: 0;
  color: #8fa7cd;
  font-size: 0.78rem;
  line-height: 1.45;
}

body.pokemon-trainer-dashboard .sim-chart-tooltip {
  border-color: rgba(33, 212, 255, 0.72);
  background: rgba(2, 9, 25, 0.96);
  color: #eef8ff;
}

/* Card value contribution mix */
body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown {
  position: relative;
  display: grid;
  gap: 20px;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  padding: clamp(20px, 3vw, 28px);
  border-radius: 7px;
  border-color: rgba(135, 72, 255, 0.82);
  background:
    radial-gradient(
      circle at 84% 8%,
      rgba(39, 125, 255, 0.2),
      transparent 25rem
    ),
    radial-gradient(
      circle at 10% 100%,
      rgba(135, 72, 255, 0.16),
      transparent 22rem
    ),
    linear-gradient(145deg, rgba(8, 20, 48, 0.99), rgba(4, 11, 29, 0.99));
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--trainer-cyan),
    var(--trainer-violet) 48%,
    var(--trainer-yellow) 78%,
    transparent
  );
  content: "";
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(72, 123, 199, 0.46);
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__heading {
  display: grid;
  gap: 5px;
  min-width: 0;
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__heading > p,
body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__heading > h2 {
  margin: 0;
}

body.pokemon-trainer-dashboard
  .pokemon-ev-value-breakdown__heading
  > p:first-child {
  color: var(--trainer-cyan);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__heading h2 {
  color: #ffffff;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  line-height: 1.1;
  text-shadow: 0 0 20px rgba(33, 212, 255, 0.16);
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__description {
  max-width: 700px;
  color: var(--trainer-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: 0 0 auto;
  min-width: 218px;
  padding: 4px;
  border: 1px solid rgba(56, 142, 255, 0.66);
  border-radius: 999px;
  background: rgba(2, 9, 25, 0.82);
  box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.48);
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__switch button {
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: #b9ccef;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 850;
  cursor: pointer;
}

body.pokemon-trainer-dashboard
  .pokemon-ev-value-breakdown__switch
  button[aria-pressed="true"] {
  background: linear-gradient(
    180deg,
    #b8f2ff,
    var(--trainer-cyan) 58%,
    #159cd4
  );
  color: #031020;
  box-shadow:
    0 6px 16px rgba(33, 212, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body.pokemon-trainer-dashboard
  .pokemon-ev-value-breakdown__switch
  button:focus-visible {
  outline: 2px solid var(--trainer-yellow-soft);
  outline-offset: 2px;
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__body {
  display: grid;
  grid-template-columns: minmax(190px, 0.58fr) minmax(0, 1.42fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
  min-width: 0;
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__visual {
  display: grid;
  place-items: center;
  gap: 12px;
  min-width: 0;
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__donut {
  --pokemon-value-breakdown-gradient: conic-gradient(
    rgba(79, 115, 174, 0.28) 0 100%
  );

  position: relative;
  display: grid;
  place-items: center;
  width: clamp(176px, 17vw, 220px);
  aspect-ratio: 1;
  border: 1px solid rgba(83, 166, 255, 0.74);
  border-radius: 50%;
  background: var(--pokemon-value-breakdown-gradient);
  box-shadow:
    0 0 0 8px rgba(3, 11, 28, 0.92),
    0 0 0 9px rgba(71, 132, 219, 0.46),
    0 18px 42px rgba(0, 0, 0, 0.4),
    0 0 32px rgba(33, 212, 255, 0.12);
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__donut::before {
  position: absolute;
  width: 56%;
  aspect-ratio: 1;
  border: 1px solid rgba(66, 135, 222, 0.62);
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 50% 34%,
      rgba(38, 72, 139, 0.42),
      transparent 62%
    ),
    #06132d;
  box-shadow:
    inset 0 0 25px rgba(0, 0, 0, 0.52),
    0 0 18px rgba(0, 0, 0, 0.34);
  content: "";
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__center {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  width: 52%;
  min-width: 0;
  text-align: center;
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__center span {
  color: #a8bce1;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__center strong {
  min-width: 0;
  color: var(--trainer-yellow-soft);
  font-size: clamp(0.92rem, 1.8vw, 1.28rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-shadow: 0 0 15px rgba(255, 220, 25, 0.22);
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__lead {
  max-width: 270px;
  margin: 0;
  color: #e8f3ff;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__legend {
  display: grid;
  gap: 8px;
  min-width: 0;
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto minmax(58px, auto);
  gap: 6px 12px;
  align-items: center;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid rgba(66, 112, 181, 0.56);
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(12, 30, 67, 0.94),
    rgba(5, 15, 38, 0.84)
  );
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--pokemon-breakdown-color);
  box-shadow: 0 0 11px
    color-mix(in srgb, var(--pokemon-breakdown-color) 60%, transparent);
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__name {
  min-width: 0;
  color: #f1f6ff;
  font-size: 0.88rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__amount,
body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__percent {
  color: #dbe9ff;
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__percent {
  color: #91dfff;
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__track {
  grid-column: 2 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(66, 93, 139, 0.5);
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--pokemon-breakdown-color);
  box-shadow: 0 0 12px
    color-mix(in srgb, var(--pokemon-breakdown-color) 55%, transparent);
  transition: width 180ms ease;
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed rgba(69, 143, 255, 0.58);
  border-radius: 8px;
  color: var(--trainer-muted);
  text-align: center;
}

body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(65, 111, 179, 0.42);
  color: #9fb3d7;
  font-size: 0.76rem;
  line-height: 1.4;
}

body.pokemon-trainer-dashboard
  .pokemon-ev-value-breakdown__footer
  span:first-child {
  color: #d7e7ff;
  font-weight: 750;
}

/* Card value table */
body.pokemon-trainer-dashboard .pokemon-ev-results-table {
  min-width: 0;
  overflow-x: auto;
  padding: 0 0 12px;
  border-radius: 7px;
}

body.pokemon-trainer-dashboard
  .pokemon-ev-results-table
  > .pokemon-ev-section-heading {
  position: sticky;
  left: 0;
  padding: 14px 16px 10px;
}

body.pokemon-trainer-dashboard .pokemon-ev-results-table .table-tools {
  position: sticky;
  left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  padding: 0 16px 12px;
  border-bottom: 1px solid rgba(66, 130, 220, 0.34);
}

body.pokemon-trainer-dashboard .pokemon-ev-results-table #sortBy {
  display: none !important;
}

body.pokemon-trainer-dashboard #btnGroupGreen,
body.pokemon-trainer-dashboard #sortBy {
  min-height: 38px;
  border: 1px solid rgba(48, 153, 255, 0.58);
  border-radius: 6px;
  background: #071b3d;
  color: #dff4ff;
  font-size: 0.72rem;
  font-weight: 750;
  text-shadow: none;
  box-shadow: none;
}

body.pokemon-trainer-dashboard #btnGroupGreen.pokemon-ev-green-toggle {
  display: inline-grid;
  grid-template-columns: auto 34px 24px;
  gap: 9px;
  align-items: center;
  min-height: 38px;
  padding: 6px 10px 6px 12px;
  cursor: pointer;
}

body.pokemon-trainer-dashboard
  #btnGroupGreen.pokemon-ev-green-toggle::after {
  display: none;
  content: none;
}

body.pokemon-trainer-dashboard .pokemon-ev-green-toggle__label {
  color: #e7f5ff;
  letter-spacing: 0.025em;
}

body.pokemon-trainer-dashboard .pokemon-ev-green-toggle__track {
  position: relative;
  display: block;
  width: 34px;
  height: 18px;
  border: 1px solid rgba(123, 160, 207, 0.64);
  border-radius: 999px;
  background: #152b4d;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.44);
}

body.pokemon-trainer-dashboard .pokemon-ev-green-toggle__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #c5d5eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  transition:
    transform 150ms ease,
    background-color 150ms ease;
}

body.pokemon-trainer-dashboard
  #btnGroupGreen.pokemon-ev-green-toggle[aria-pressed="true"]
  .pokemon-ev-green-toggle__track {
  border-color: rgba(121, 223, 103, 0.88);
  background: rgba(66, 174, 74, 0.86);
  box-shadow:
    inset 0 1px 4px rgba(0, 0, 0, 0.3),
    0 0 10px rgba(121, 223, 103, 0.2);
}

body.pokemon-trainer-dashboard
  #btnGroupGreen.pokemon-ev-green-toggle[aria-pressed="true"]
  .pokemon-ev-green-toggle__knob {
  background: #f5fff3;
  transform: translateX(16px);
}

body.pokemon-trainer-dashboard .pokemon-ev-green-toggle__state {
  color: #91a8c8;
  font-size: 0.68rem;
  text-align: left;
}

body.pokemon-trainer-dashboard
  #btnGroupGreen.pokemon-ev-green-toggle[aria-pressed="true"]
  .pokemon-ev-green-toggle__state {
  color: var(--trainer-green);
}

body.pokemon-trainer-dashboard
  #btnGroupGreen.pokemon-ev-green-toggle:focus-visible {
  outline: 2px solid var(--trainer-cyan);
  outline-offset: 2px;
}

body.pokemon-trainer-dashboard #evTable {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
}

body.pokemon-trainer-dashboard #evTable th,
body.pokemon-trainer-dashboard #evTable td {
  padding: 12px 12px;
  border-color: rgba(71, 123, 198, 0.2);
  color: #dce7f7;
  font-size: 0.9rem;
  line-height: 1.4;
}

body.pokemon-trainer-dashboard #evTable thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #0b2858, #071a3c);
  color: #dff1ff;
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

body.pokemon-trainer-dashboard #evTable thead th.pokemon-ev-sortable-heading {
  padding: 0;
}

body.pokemon-trainer-dashboard .pokemon-ev-sort-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: inherit;
  text-shadow: inherit;
  box-shadow: none;
  cursor: pointer;
}

body.pokemon-trainer-dashboard
  #evTable
  thead
  th.center
  .pokemon-ev-sort-button {
  justify-content: center;
}

body.pokemon-trainer-dashboard .pokemon-ev-sort-button:hover {
  background: rgba(33, 212, 255, 0.1);
  color: #ffffff;
}

body.pokemon-trainer-dashboard .pokemon-ev-sort-button:focus-visible {
  outline: 2px solid var(--trainer-cyan);
  outline-offset: -3px;
}

body.pokemon-trainer-dashboard .pokemon-ev-sort-indicator {
  position: absolute;
  right: 3px;
  color: #78a9d9;
  font-size: 0.78rem;
}

body.pokemon-trainer-dashboard .pokemon-ev-sort-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.pokemon-trainer-dashboard
  .pokemon-ev-sort-button.is-active
  .pokemon-ev-sort-indicator {
  color: var(--trainer-yellow-soft);
}

body.pokemon-trainer-dashboard #evTable tbody tr {
  background: rgba(4, 14, 35, 0.7);
  transition:
    filter 120ms ease,
    box-shadow 120ms ease;
}

body.pokemon-trainer-dashboard #evTable tbody tr:nth-child(even) {
  background: rgba(7, 23, 53, 0.72);
}

body.pokemon-trainer-dashboard #evTable tbody tr:hover {
  background: rgba(15, 50, 101, 0.84);
}

body.pokemon-trainer-dashboard #evTable tbody tr.ge {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 60%),
    linear-gradient(
      90deg,
      rgba(16, 116, 86, 0.72) 0%,
      rgba(9, 76, 76, 0.54) 46%,
      rgba(5, 23, 48, 0.88) 100%
    );
  box-shadow:
    inset 4px 0 0 rgba(93, 238, 171, 0.94),
    inset 0 1px 0 rgba(93, 238, 171, 0.14),
    inset 0 -1px 0 rgba(93, 238, 171, 0.14);
}

body.pokemon-trainer-dashboard #evTable tbody tr.lt {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 60%),
    linear-gradient(
      90deg,
      rgba(126, 39, 71, 0.7) 0%,
      rgba(78, 31, 66, 0.55) 46%,
      rgba(5, 23, 48, 0.88) 100%
    );
  box-shadow:
    inset 4px 0 0 rgba(255, 95, 132, 0.94),
    inset 0 1px 0 rgba(255, 95, 132, 0.13),
    inset 0 -1px 0 rgba(255, 95, 132, 0.13);
}

body.pokemon-trainer-dashboard #evTable tbody tr.ge:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 60%),
    linear-gradient(
      90deg,
      rgba(20, 143, 101, 0.78) 0%,
      rgba(10, 91, 86, 0.62) 46%,
      rgba(7, 33, 62, 0.92) 100%
    );
}

body.pokemon-trainer-dashboard #evTable tbody tr.lt:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 60%),
    linear-gradient(
      90deg,
      rgba(153, 47, 81, 0.78) 0%,
      rgba(96, 36, 76, 0.63) 46%,
      rgba(7, 33, 62, 0.92) 100%
    );
}

body.pokemon-trainer-dashboard #evTable a {
  color: #8ddfff;
  font-weight: 750;
}

body.pokemon-trainer-dashboard #evTable a:hover,
body.pokemon-trainer-dashboard #evTable a:focus-visible {
  color: #ffffff;
}

body.pokemon-trainer-dashboard #evTable tfoot td {
  border-top: 1px solid rgba(255, 220, 25, 0.42);
  background: linear-gradient(
    90deg,
    rgba(38, 45, 45, 0.96),
    rgba(7, 24, 53, 0.98)
  );
  color: var(--trainer-yellow-soft);
  font-weight: 800;
}

body.pokemon-trainer-dashboard .pokemon-ev-results-table > label,
body.pokemon-trainer-dashboard .pokemon-ev-results-table > #status,
body.pokemon-trainer-dashboard .pokemon-ev-results-table > #notes {
  position: sticky;
  left: 0;
  margin-inline: 16px;
  color: #93a9cd;
}

/* Shared interactive finish */
body.pokemon-trainer-dashboard button,
body.pokemon-trainer-dashboard summary,
body.pokemon-trainer-dashboard select,
body.pokemon-trainer-dashboard input {
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

body.pokemon-trainer-dashboard summary:hover {
  background-color: rgba(18, 51, 104, 0.96);
}

body.pokemon-trainer-dashboard summary:focus-visible,
body.pokemon-trainer-dashboard button:focus-visible,
body.pokemon-trainer-dashboard a:focus-visible {
  outline: 2px solid var(--trainer-yellow);
  outline-offset: 3px;
}

body.pokemon-trainer-dashboard .debug.open {
  margin-top: 12px;
  border-color: rgba(45, 141, 255, 0.5);
  background: rgba(4, 16, 39, 0.9);
}

body.pokemon-trainer-dashboard .debug .box {
  border-color: rgba(65, 133, 226, 0.3);
  background: rgba(8, 27, 62, 0.72);
}

/* Responsive layout */
@media (max-width: 1240px) {
  body.pokemon-trainer-dashboard .pokemon-ev-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  body.pokemon-trainer-dashboard .pokemon-ev-quick-summary {
    width: 100%;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-calculator-shell > .settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.pokemon-trainer-dashboard .pokemon-ev-fees-control {
    grid-column: 1;
    grid-row: 1;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-value-control {
    grid-column: 2;
    grid-row: 1;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-advanced-control {
    grid-column: 1;
    grid-row: 2;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-calc-action {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 1040px) {
  body.pokemon-trainer-dashboard .pokemon-ev-insights {
    grid-template-columns: minmax(0, 1fr);
  }

  body.pokemon-trainer-dashboard .pokemon-ev-product-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 0;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-product-stats > div:nth-child(4) {
    padding-left: 0;
    border-left: 0;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary > .summary {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  body.pokemon-trainer-dashboard main.wrap {
    width: min(100% - 20px, 1540px);
    padding-top: 12px;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-hero {
    min-height: 0;
    padding: 24px 18px;
    border-radius: 12px;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-hero::before {
    left: -106px;
    opacity: 0.45;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-hero__copy {
    padding-left: 0;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-hero h1 > span {
    font-size: clamp(2.25rem, 12vw, 3.45rem);
  }

  body.pokemon-trainer-dashboard .pokemon-ev-hero__lead {
    font-size: 0.9rem;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-meta-chips > span {
    min-height: 34px;
    padding: 6px 9px;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-quick-summary {
    padding: 52px 18px 18px;
    border-width: 2px;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-quick-summary dl {
    grid-template-columns: minmax(0, 1fr);
  }

  body.pokemon-trainer-dashboard .pokemon-ev-quick-summary dl > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    padding: 10px 0;
    border-top: 1px solid rgba(177, 201, 244, 0.2);
    border-left: 0;
  }

  body.pokemon-trainer-dashboard
    .pokemon-ev-quick-summary
    dl
    > div:first-child {
    border-top: 0;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-quick-summary dd {
    margin: 0;
    font-size: 1.35rem;
    text-align: right;
  }

  body.pokemon-trainer-dashboard #trainerEvRange {
    font-size: 1.05rem;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-product-strip__body {
    padding: 14px;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-product-strip__heading {
    align-items: center;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-data-badge {
    display: none;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-product-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.pokemon-trainer-dashboard .pokemon-ev-product-stats > div,
  body.pokemon-trainer-dashboard .pokemon-ev-product-stats > div:nth-child(4) {
    padding-inline: 10px;
    border-left: 1px solid rgba(125, 160, 218, 0.23);
  }

  body.pokemon-trainer-dashboard
    .pokemon-ev-product-stats
    > div:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.pokemon-trainer-dashboard details.sets > summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-pool-count {
    display: none;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-calculator-shell > .settings {
    grid-template-columns: minmax(0, 1fr);
  }

  body.pokemon-trainer-dashboard .pokemon-ev-fees-control,
  body.pokemon-trainer-dashboard .pokemon-ev-value-control,
  body.pokemon-trainer-dashboard .pokemon-ev-calc-action,
  body.pokemon-trainer-dashboard .pokemon-ev-advanced-control {
    grid-column: 1;
    grid-row: auto;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-fees-control {
    order: 1;
  }
  body.pokemon-trainer-dashboard .pokemon-ev-value-control {
    order: 2;
  }
  body.pokemon-trainer-dashboard .pokemon-ev-advanced-control {
    order: 3;
  }
  body.pokemon-trainer-dashboard .pokemon-ev-calc-action {
    order: 4;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-result-band {
    grid-template-columns: minmax(0, 1fr);
  }

  body.pokemon-trainer-dashboard .pokemon-ev-result-band__item {
    min-height: 70px;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-simulation-card .sim-chart-wrap {
    min-height: 260px;
    height: 280px;
  }

  body.pokemon-trainer-dashboard
    .pokemon-ev-simulation-card
    > .pokemon-ev-section-heading {
    flex-direction: column;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-chart-legend {
    justify-content: flex-start;
    max-width: none;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-section-heading {
    align-items: flex-start;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-section-heading > span {
    white-space: normal;
  }
}

@media (max-width: 520px) {
  body.pokemon-trainer-dashboard main.wrap {
    width: min(100% - 12px, 1540px);
    gap: 8px;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-hero {
    padding: 22px 14px;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-eyebrow {
    font-size: 0.7rem;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-hero h1 {
    font-size: 1.05rem;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-product-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  body.pokemon-trainer-dashboard .pokemon-ev-contributors__table {
    font-size: 0.78rem;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-contributors__table th,
  body.pokemon-trainer-dashboard .pokemon-ev-contributors__table td {
    padding: 6px 4px;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-product-stats > div,
  body.pokemon-trainer-dashboard .pokemon-ev-product-stats > div:nth-child(4),
  body.pokemon-trainer-dashboard
    .pokemon-ev-product-stats
    > div:nth-child(odd) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 7px 0;
    border-top: 1px solid rgba(125, 160, 218, 0.18);
    border-left: 0;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-product-stats dd {
    margin: 0;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-purchase-control .section-body,
  body.pokemon-trainer-dashboard
    .pokemon-ev-advanced-control__body
    .section-body {
    grid-template-columns: minmax(0, 1fr);
  }

  body.pokemon-trainer-dashboard .pokemon-ev-calc-action #calcEV {
    min-height: 76px;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-model-notes > summary small,
  body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary > summary small,
  body.pokemon-trainer-dashboard .pokemon-ev-pools-summary small {
    display: none;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-result-band__item {
    padding-inline: 18px;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-simulation-card,
  body.pokemon-trainer-dashboard .us-pe-card {
    padding: 12px;
  }
}

body.pokemon-trainer-dashboard .pokemon-ev-hero--long-title h1 > span {
  font-size: clamp(2.35rem, 4.25vw, 4.2rem);
  letter-spacing: -0.045em;
}
/* Shared adapter safeguards: all calculator data remains visible without horizontal scrolling. */
html:has(body.pokemon-trainer-dashboard),
body.pokemon-trainer-dashboard {
  max-width: 100%;
  overflow-x: hidden;
}

body.pokemon-trainer-dashboard main.wrap > *,
body.pokemon-trainer-dashboard .pokemon-ev-calculator-shell > * {
  min-width: 0;
  max-width: 100%;
}

body.pokemon-trainer-dashboard .pokemon-ev-hero__context {
  max-width: 74ch;
  margin: 8px 0 0;
  color: #9eb3d8;
  font-size: 0.78rem;
  line-height: 1.45;
}

body.pokemon-trainer-dashboard .pokemon-ev-hero__context strong {
  color: #d9e6ff;
}

body.pokemon-trainer-dashboard #calculator-status {
  margin: 0;
  padding: 9px 12px;
  border: 1px solid rgba(51, 139, 255, 0.34);
  border-radius: 6px;
  background: rgba(5, 18, 43, 0.8);
  color: #a9bddf;
}

body.pokemon-trainer-dashboard .pokemon-ev-contribution-value,
body.pokemon-trainer-dashboard .pokemon-ev-contribution-meter {
  display: block;
}

body.pokemon-trainer-dashboard .pokemon-ev-contribution-meter {
  height: 4px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(113, 154, 218, 0.18);
}

body.pokemon-trainer-dashboard .pokemon-ev-contribution-meter > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--trainer-blue), var(--trainer-green));
}

body.pokemon-trainer-dashboard .pokemon-ev-results-table,
body.pokemon-trainer-dashboard .pokemon-ev-results-table .table-wrap {
  max-width: 100%;
  overflow-x: hidden;
}

body.pokemon-trainer-dashboard #evTable {
  min-width: 0;
}

body.pokemon-trainer-dashboard #evTable th,
body.pokemon-trainer-dashboard #evTable td,
body.pokemon-trainer-dashboard .mini th,
body.pokemon-trainer-dashboard .mini td {
  overflow-wrap: anywhere;
}

@media (max-width: 1080px) {
  body.pokemon-trainer-dashboard #evTable {
    display: block;
    width: 100%;
    table-layout: auto;
  }

  body.pokemon-trainer-dashboard #evTable thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body.pokemon-trainer-dashboard #evTable tbody {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 10px;
    padding: 12px;
  }

  body.pokemon-trainer-dashboard #evTable tbody tr {
    display: grid;
    align-content: start;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(64, 137, 237, 0.34);
    border-radius: 7px;
    background: linear-gradient(
      145deg,
      rgba(9, 28, 63, 0.96),
      rgba(4, 14, 34, 0.98)
    );
    box-shadow: inset 3px 0 0 rgba(54, 132, 244, 0.5);
  }

  body.pokemon-trainer-dashboard #evTable tbody th,
  body.pokemon-trainer-dashboard #evTable tbody td {
    display: grid;
    grid-template-columns: minmax(104px, 0.42fr) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: auto !important;
    min-width: 0;
    min-height: 42px;
    padding: 9px 10px;
    border-bottom: 1px solid rgba(73, 129, 205, 0.17);
    text-align: left !important;
    white-space: normal;
  }

  body.pokemon-trainer-dashboard #evTable tbody th::before,
  body.pokemon-trainer-dashboard #evTable tbody td::before {
    color: #8fa8cf;
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  body.pokemon-trainer-dashboard #evTable tbody tr > :last-child {
    border-bottom: 0;
  }

  body.pokemon-trainer-dashboard #evTable tfoot {
    display: grid;
    gap: 7px;
    padding: 0 12px 12px;
  }

  body.pokemon-trainer-dashboard #evTable tfoot tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 220, 25, 0.26);
    border-radius: 6px;
  }

  body.pokemon-trainer-dashboard #evTable tfoot th,
  body.pokemon-trainer-dashboard #evTable tfoot td {
    display: block;
    width: auto !important;
    min-width: 0;
    padding: 9px 10px;
    text-align: left !important;
  }

  body.pokemon-trainer-dashboard #evTable tfoot tr > :last-child {
    color: var(--trainer-yellow-soft);
    text-align: right !important;
  }
}

@media (max-width: 760px) {
  body.pokemon-trainer-dashboard .pokemon-ev-detailed-summary .mini,
  body.pokemon-trainer-dashboard .pokemon-ev-model-notes .mini,
  body.pokemon-trainer-dashboard .us-pe-card .mini {
    width: 100%;
    table-layout: fixed;
    font-size: 0.68rem;
  }
}

@media (max-width: 600px) {
  body.pokemon-trainer-dashboard .pokemon-ev-contributors__table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
  }

  body.pokemon-trainer-dashboard .pokemon-ev-contributors__table,
  body.pokemon-trainer-dashboard .pokemon-ev-contributors__table tbody {
    display: block;
    width: 100%;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-contributors__table tbody tr {
    display: grid;
    gap: 0;
    padding: 7px 9px;
    border-top: 1px solid rgba(75, 143, 230, 0.24);
  }

  body.pokemon-trainer-dashboard
    .pokemon-ev-contributors__table
    tbody
    tr:first-child {
    border-top: 0;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-contributors__table tbody td {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: auto !important;
    padding: 5px 0;
    border: 0;
  }

  body.pokemon-trainer-dashboard
    .pokemon-ev-contributors__table
    tbody
    td::before {
    color: #89a3cc;
    content: attr(data-label);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}

@media (max-width: 760px) {
  body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__header {
    align-items: stretch;
    flex-direction: column;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__switch {
    align-self: start;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__body {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__donut {
    width: clamp(164px, 48vw, 194px);
  }
}

@media (max-width: 520px) {
  body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown {
    gap: 16px;
    padding: 16px 14px;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__switch {
    align-self: stretch;
    min-width: 0;
    width: 100%;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__item {
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 6px 9px;
    padding: 9px 10px;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__percent {
    display: none;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__track {
    grid-column: 2 / -1;
  }

  body.pokemon-trainer-dashboard .pokemon-ev-value-breakdown__footer {
    display: grid;
  }
}

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

/* Hide the pack-structure and contributor snapshot only in portrait mobile layouts. */
@media (max-width: 799px) and (orientation: portrait) {
  body.pokemon-trainer-dashboard .pokemon-ev-insights {
    display: none;
  }
}
