.calc-page {
  --cell: 28px;
  --gridline: rgba(255, 255, 255, 0.28);
}

.calc-page .page-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.calc-page .meta-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px 24px;
  margin: 0;
  padding: 0;
}

.calc-page .meta-list li {
  display: grid;
  grid-template-columns: minmax(72px, max-content) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  line-height: 1.2;
}

.calc-page .meta-label {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #9fb4d8;
  line-height: 1.2;
}

.calc-page .meta-value {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.25em;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.2;
}

@media (max-width: 640px) {
  .calc-page .meta-list {
    gap: 8px;
  }

  .calc-page .meta-list li {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 4px;
  }
}

.calc-page .sub {
  display: none;
}

.calc-page .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(122, 162, 255, 0.35);
  background: linear-gradient(
    135deg,
    rgba(122, 162, 255, 0.16),
    rgba(94, 244, 255, 0.14)
  );
  color: #d5e1ff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.calc-page .snapshot-basis-card {
  display: grid;
  gap: 6px;
  align-self: flex-start;
  width: min(100%, 300px);
  margin-top: 4px;
  padding: 16px;
  border: 1px solid rgba(75, 149, 190, 0.55);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(11, 22, 36, 0.96), rgba(15, 24, 39, 0.96)),
    radial-gradient(
      circle at 16% 12%,
      rgba(228, 177, 65, 0.18),
      transparent 34%
    );
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.calc-page .snapshot-basis-card__kicker {
  color: #f0bd47;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.calc-page .snapshot-basis-card strong {
  color: #ffffff;
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  font-weight: 820;
  line-height: 1.08;
}

.calc-page .snapshot-basis-card span:last-child {
  color: #c8d5ea;
  font-size: 0.86rem;
  line-height: 1.35;
}

.calc-page .acr-content-snapshot {
  display: grid;
  gap: 18px;
  border-color: rgba(218, 164, 56, 0.48);
  background:
    linear-gradient(145deg, rgba(8, 15, 26, 0.98), rgba(11, 22, 36, 0.96)),
    radial-gradient(circle at 8% 10%, rgba(232, 184, 76, 0.16), transparent 36%);
}

.calc-page .acr-content-snapshot__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.calc-page .section-kicker {
  margin: 0 0 6px;
  color: #f0bd47;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.calc-page .acr-content-snapshot h2,
.calc-page .acr-content-snapshot h3 {
  color: #ffe68f;
}

.calc-page .acr-content-snapshot h2 {
  margin-bottom: 8px;
}

.calc-page .acr-content-snapshot__header p:not(.section-kicker) {
  max-width: 70ch;
  margin: 0;
  color: #d5e1f2;
  line-height: 1.55;
}

.calc-page .acr-snapshot-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.calc-page .acr-snapshot-stats div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(218, 164, 56, 0.28);
  border-radius: 8px;
  background: rgba(7, 15, 27, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.calc-page .acr-snapshot-stats dt {
  margin-bottom: 6px;
  color: #f0bd47;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.calc-page .acr-snapshot-stats dd {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 760;
}

.calc-page .acr-snapshot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 18px;
  align-items: start;
}

.calc-page .acr-snapshot-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(122, 162, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(10, 19, 32, 0.94), rgba(13, 24, 38, 0.9)),
    radial-gradient(circle at 0 0, rgba(218, 164, 56, 0.12), transparent 34%);
}

.calc-page .acr-snapshot-panel h3 {
  margin-bottom: 8px;
}

.calc-page .acr-snapshot-panel p {
  margin-top: 0;
}

.calc-page .acr-pack-structure-list {
  display: grid;
  margin: 14px 0 12px;
  border: 1px solid rgba(122, 162, 255, 0.18);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(7, 15, 27, 0.68);
}

.calc-page .acr-pack-structure-row {
  display: grid;
  grid-template-columns: 18px minmax(112px, 0.36fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 58px;
  padding: 12px;
  color: #d9e7fb;
}

.calc-page .acr-pack-structure-row + .acr-pack-structure-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.calc-page .acr-pack-structure-row strong {
  color: #fff2a8;
  font-size: 0.95rem;
  line-height: 1.25;
  padding-top: 1px;
}

.calc-page .acr-pack-structure-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.calc-page .acr-pack-structure-description {
  color: #dce8f7;
  line-height: 1.35;
}

.calc-page .acr-pack-structure-detail {
  color: #acd2ff;
  font-size: 0.88rem;
  line-height: 1.4;
}

.calc-page .acr-pack-structure-row__marker {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #66d384;
  box-shadow: 0 0 12px rgba(102, 211, 132, 0.72);
  margin-top: 5px;
}

.calc-page
  .acr-pack-structure-row[data-slot="landScene"]
  .acr-pack-structure-row__marker {
  background: #e8edf4;
  box-shadow: 0 0 12px rgba(232, 237, 244, 0.64);
}

.calc-page
  .acr-pack-structure-row[data-slot="rareMythic"]
  .acr-pack-structure-row__marker {
  background: #ff9f43;
  box-shadow: 0 0 12px rgba(255, 159, 67, 0.68);
}

.calc-page
  .acr-pack-structure-row[data-slot="foilWildcard"]
  .acr-pack-structure-row__marker {
  background: #55a9ff;
  box-shadow: 0 0 12px rgba(85, 169, 255, 0.68);
}

.calc-page
  .acr-pack-structure-row[data-slot="boosterFun"]
  .acr-pack-structure-row__marker {
  background: #ffd35b;
  box-shadow: 0 0 12px rgba(255, 211, 91, 0.74);
}

.calc-page .acr-top-contributor-detail {
  display: block;
  margin-top: 3px;
  color: #9fc6ff;
  font-size: 0.82rem;
  line-height: 1.25;
}

@media (max-width: 860px) {
  .calc-page .acr-content-snapshot__header,
  .calc-page .acr-snapshot-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .calc-page .acr-snapshot-stats {
    grid-template-columns: 1fr;
  }

  .calc-page .acr-pack-structure-row {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .calc-page .acr-pack-structure-copy {
    grid-column: 2;
  }
}

.calc-page .hero-banner-btn {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  margin: 12px 0 18px;
  font-weight: 760;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1c1206;
  background: linear-gradient(92deg, #f4df6c 0%, #f2b63c 50%, #f7e49d 100%);
  border: 1px solid rgba(255, 219, 116, 0.8);
  border-radius: var(--radius);
  box-shadow:
    0 14px 34px rgba(244, 191, 64, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  text-decoration: none;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    filter 120ms ease;
}

.calc-page .hero-banner-btn:hover,
.calc-page .hero-banner-btn:focus-visible {
  color: #1c1206;
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow:
    0 18px 38px rgba(244, 191, 64, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.calc-page .card {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 3vw, 20px);
}
.calc-page .card[hidden] {
  display: none;
}

.calc-page .card h2,
.calc-page .card h3 {
  color: #f7e4b0;
}

.calc-page details.sets {
  background: var(--panel);
  border: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.calc-page details.sets > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 700;
  border-bottom: var(--border);
  background: var(--panel-alt);
  user-select: none;
  letter-spacing: 0.3px;
}

.calc-page details.sets[open] > summary {
  background: rgba(122, 162, 255, 0.12);
}

.calc-page details.sets > summary .chev {
  float: right;
  opacity: 0.8;
  transition: transform var(--transition-duration) ease;
}

.calc-page details[open] .chev {
  transform: rotate(90deg);
}

.calc-page .include-list {
  padding: 16px 18px 20px;
  display: grid;
  gap: 14px;
}

.calc-page .include-list .col {
  display: grid;
  gap: 8px;
}

.calc-page .include-list label {
  font-weight: 500;
  color: #c7d3e0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.calc-page .include-list input[type="checkbox"] {
  width: auto;
  height: auto;
}

.calc-page .btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.calc-page .btn-sm {
  height: calc(var(--ctrl-h) - 6px);
  font-size: 0.9rem;
  padding-inline: 14px;
}

.calc-page .sim-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-page .sim-chart-wrap {
  width: 100%;
  height: 220px;
  background: rgba(9, 12, 18, 0.45);
  border: 1px solid rgba(120, 136, 168, 0.35);
  border-radius: 12px;
  padding: 8px;
  position: relative;
}

.calc-page .sim-chart-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.calc-page .sim-chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(12, 16, 24, 0.95);
  border: 1px solid rgba(122, 162, 255, 0.45);
  color: #dbe5ff;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.25;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.calc-page .sim-chart-tooltip[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}

.calc-page input[type="number"],
.calc-page select {
  height: calc(var(--ctrl-h) - 4px);
  padding: 0 12px;
  border-radius: 10px;
  background: var(--panel-alt);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.calc-page input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.calc-page input[type="number"]::-webkit-inner-spin-button,
.calc-page input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.calc-page input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.calc-page .input-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.calc-page .input-stepper input[type="number"] {
  flex: 1;
  min-width: 0;
}

.calc-page .input-stepper .stepper-btn {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  height: calc(var(--ctrl-h) - 4px);
  padding: 0;
  font-size: 1.3rem;
  font-weight: 640;
  line-height: 1;
}

.calc-page .input-stepper .stepper-btn::after {
  display: none;
}

.calc-page .input-stepper .stepper-btn:hover,
.calc-page .input-stepper .stepper-btn:focus-visible {
  transform: none;
}

.calc-page .input-stepper .stepper-btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(122, 162, 255, 0.45);
}

.calc-page .settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(12px, 3vw, 20px);
}

.calc-page .tag.tag-muted {
  background: rgba(122, 162, 255, 0.08);
  color: rgba(213, 225, 255, 0.65);
  box-shadow: inset 0 0 0 1px rgba(122, 162, 255, 0.16);
}

.calc-page .row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.calc-page .section {
  background: var(--panel-alt);
  border: var(--border);
  border-radius: 12px;
  padding: clamp(16px, 3vw, 20px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-soft);
}

.calc-page .section h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #f3f7ff;
}

.calc-page .section-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calc-page .section-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.calc-page .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-page .row-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.calc-page label {
  font-weight: 600;
  color: #dee6f6;
}

.calc-page .field-label-with-info {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
}

.calc-page .field-info-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.calc-page .field-info-button {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid rgba(122, 162, 255, 0.45);
  border-radius: 50%;
  background: rgba(122, 162, 255, 0.1);
  color: #cfe0ff;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
  cursor: help;
}

.calc-page .field-info-button:focus-visible {
  outline: 2px solid rgba(122, 162, 255, 0.72);
  outline-offset: 3px;
}

.calc-page .field-info-tooltip {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: calc(100% + 9px);
  width: max-content;
  max-width: min(260px, 82vw);
  padding: 7px 9px;
  border: 1px solid rgba(122, 162, 255, 0.45);
  border-radius: 8px;
  background: rgba(12, 16, 24, 0.96);
  color: #dbe5ff;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.3;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.36);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.calc-page .field-info-wrap:hover .field-info-tooltip,
.calc-page .field-info-wrap:focus-within .field-info-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.calc-page .check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #dbe6ff;
}

.calc-page .intro {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.calc-page .page-intro {
  gap: clamp(8px, 2vw, 12px);
  padding-bottom: clamp(12px, 2vw, 16px);
}

.calc-page .page-intro p {
  margin: 6px 0;
}

.calc-page .page-intro .notice {
  margin: 4px 0 0;
}

.calc-page .small {
  font-size: 0.88rem;
  color: var(--muted);
}

.calc-page .hidden {
  display: none !important;
}

.calc-page .summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(14px, 3vw, 20px);
  margin-top: 16px;
}

.calc-page .summary.summary-single-table {
  grid-template-columns: minmax(0, 1fr);
}

.calc-page .summary .box {
  background: var(--panel-alt);
  border: var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

.calc-page .summary h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: #f2f6ff;
}

.calc-page .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap);
  align-items: flex-end;
}

.calc-page .form-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-page .summary-card {
  gap: clamp(16px, 3vw, 24px);
}

.calc-page .summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.calc-page .summary-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  padding-top: 4px;
}

.calc-page .summary-controls .form-item {
  flex: 1 1 240px;
}

.calc-page .summary-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-page .summary-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.calc-page .summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--gap);
}

.calc-page .summary-grid .box {
  background: var(--panel-alt);
  border: var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-page .summary-grid .label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.calc-page .summary-grid .value {
  font-size: 1.45rem;
  font-weight: 700;
  color: #f6f8ff;
}

.calc-page .summary-grid .note {
  font-size: 0.85rem;
  color: var(--muted);
}

.calc-page .mini {
  font-size: 0.94rem;
}

.calc-page .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.calc-page .mini th,
.calc-page .mini td {
  border: var(--border);
  padding: 8px 10px;
  text-align: right;
}

.calc-page .mini th:first-child,
.calc-page .mini td:first-child {
  text-align: left;
}

.calc-page .mini .section-row td {
  background: rgba(122, 162, 255, 0.08);
  font-weight: 700;
  color: #cfe0ff;
}

.estimated-roi-table-container {
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.estimated-roi-table-box {
  min-width: 0;
}

.estimated-roi-table-container > table {
  width: 100%;
  margin: 0;
}

@media (max-width: 420px) {
  .estimated-roi-table-container > .mini.estimated-roi-table {
    font-size: 0.82rem;
  }

  .estimated-roi-table-container > .mini.estimated-roi-table th,
  .estimated-roi-table-container > .mini.estimated-roi-table td {
    padding: 7px 5px;
  }

  .estimated-roi-table-container > .mini.estimated-roi-table th:first-child {
    overflow-wrap: anywhere;
  }
}

.calc-page .us-pe-card {
  min-width: 0;
}

.calc-page .affiliate-disclosure {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 6px 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(248, 200, 107, 0.28);
  border-radius: 8px;
  background: rgba(248, 200, 107, 0.09);
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.45;
}

.calc-page .tev-store-sales-banner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(94, 244, 255, 0.32);
  border-radius: 12px;
  background:
    linear-gradient(
      135deg,
      rgba(94, 244, 255, 0.13),
      rgba(122, 162, 255, 0.09)
    ),
    rgba(9, 14, 24, 0.72);
  box-shadow: var(--shadow-soft);
}

.calc-page .tev-store-sales-banner[hidden] {
  display: none;
}

.calc-page .tev-store-sales-copy {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.calc-page .tev-store-sales-eyebrow {
  color: #9fefff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.calc-page .tev-store-sales-title {
  color: #f5f8ff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.calc-page .tev-store-sales-offer {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

.calc-page .tev-store-sales-price {
  color: #ffe27d;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 850;
  line-height: 1.1;
}

.calc-page .tev-store-sales-regular {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.2;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.calc-page .tev-store-sales-detail {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.calc-page .tev-store-sales-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  align-self: center;
  justify-content: center;
  min-height: 38px;
  min-width: 128px;
  max-width: 100%;
  padding: 0 18px;
  border: 1px solid rgba(255, 219, 116, 0.68);
  border-radius: 999px;
  background: linear-gradient(92deg, #f4df6c 0%, #f2b63c 100%);
  color: #1c1206;
  font-size: 0.82rem;
  font-weight: 820;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(244, 191, 64, 0.22);
}

.calc-page .tev-store-sales-button:hover,
.calc-page .tev-store-sales-button:focus-visible {
  color: #1c1206;
  filter: brightness(1.04);
  text-decoration: none;
}

.calc-page #usPeTable {
  max-width: 100%;
}

.calc-page #usPeTable th,
.calc-page #usPeTable td {
  overflow-wrap: anywhere;
}

.calc-page textarea {
  min-height: 88px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--panel-alt);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.calc-page .main-table {
  margin-top: 16px;
  font-size: 0.96rem;
}

.calc-page .main-table caption {
  padding: 0 0 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
}

.calc-page .main-table tbody tr:hover {
  background: rgba(122, 162, 255, 0.06);
}

.calc-page .main-table tbody tr.green {
  background: rgba(56, 189, 147, 0.08);
}

.calc-page .main-table tbody tr.red {
  background: rgba(248, 113, 113, 0.07);
}

.calc-page .main-table tbody tr.muted-row {
  opacity: 0.55;
}

.calc-page .center {
  text-align: center;
  white-space: nowrap;
}

.calc-page .right {
  text-align: right;
}

.calc-page .table-card {
  gap: clamp(14px, 3vw, 20px);
}

.calc-page .table-tools {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.calc-page .table-tools .tool-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

.calc-page .deck-label {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 4px;
}

.calc-page .table-wrap {
  overflow: auto;
  border-radius: 12px;
}

.calc-page .summary-table {
  border: var(--border);
  border-radius: 12px;
  background: var(--panel-alt);
  box-shadow: var(--shadow-soft);
}

.calc-page .summary-table table {
  min-width: 980px;
}

.calc-page .summary-table table thead th {
  background: rgba(122, 162, 255, 0.12);
}

.calc-page .decision-cell {
  min-width: 190px;
}

.calc-page .decision-pill,
.calc-page .decision-inline {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-weight: 760;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.calc-page .decision-pill {
  padding: 5px 10px;
  font-size: 0.74rem;
}

.calc-page .decision-inline {
  padding: 2px 8px;
  font-size: 0.72rem;
  vertical-align: baseline;
}

.calc-page .decision-pill--open,
.calc-page .decision-inline--open {
  color: #9ff7d7;
  background: var(--success-bg);
  box-shadow: inset 0 0 0 1px var(--success-border);
}

.calc-page .decision-pill--sealed,
.calc-page .decision-inline--sealed {
  color: #dbe6ff;
  background: rgba(122, 162, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(122, 162, 255, 0.34);
}

.calc-page .decision-pill--check,
.calc-page .decision-inline--check {
  color: #fff2c4;
  background: var(--warning-bg);
  box-shadow: inset 0 0 0 1px var(--warning-border);
}

.calc-page .decision-note {
  display: block;
  margin-top: 6px;
  max-width: 22ch;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.calc-page .delta-positive,
.calc-page .delta-negative {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 760;
}

.calc-page .delta-positive {
  color: #83efcc;
}

.calc-page .delta-negative {
  color: #ff9aaa;
}

.calc-page .result-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: clamp(16px, 4vw, 28px);
}

.calc-page .summary-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-page .summary-head h2 {
  margin: 0;
  font-size: clamp(1.2rem, 1.6vw + 1rem, 1.45rem);
  color: #f5f8ff;
}

.calc-page .summary-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.calc-page .result-block {
  background: var(--panel-alt);
  border: var(--border);
  border-radius: 12px;
  padding: clamp(16px, 3vw, 22px);
  margin-bottom: clamp(16px, 4vw, 24px);
  box-shadow: var(--shadow-soft);
}

.calc-page .result-block:last-of-type {
  margin-bottom: 0;
}

.calc-page .result-block summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  font-weight: 650;
  letter-spacing: 0.3px;
  color: #f5f8ff;
}

.calc-page .result-block summary::-webkit-details-marker,
.calc-page .result-block summary::marker {
  display: none;
}

.calc-page .result-title,
.calc-page .result-subtitle {
  grid-column: 1 / 2;
}

.calc-page .result-title {
  font-size: 1.05rem;
}

.calc-page .result-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.calc-page .result-block summary::after {
  content: "▸";
  grid-column: 2 / 3;
  grid-row: 1 / span 2;
  font-size: 0.85rem;
  color: var(--muted);
  transition:
    transform var(--transition-duration) ease,
    color var(--transition-duration) ease;
}

.calc-page .result-block[open] summary::after {
  transform: rotate(90deg);
  color: #c5d4eb;
}

.calc-page details[open] .result-subtitle {
  color: #c5d4eb;
}

.calc-page .result-meta {
  margin-top: 10px;
  line-height: 1.5;
}

.calc-page .card-rows {
  margin-top: 16px;
  overflow-x: auto;
}

.calc-page .card-rows table {
  min-width: 560px;
}

.calc-page .top-ev-contributors-panel {
  min-width: 0;
  overflow: hidden;
}

.calc-page .top-ev-contributors-table-wrap {
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
}

.calc-page .top-ev-contributors-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.calc-page .top-ev-contributors-table th,
.calc-page .top-ev-contributors-table td {
  padding-inline: clamp(6px, 1.8vw, 10px);
  overflow-wrap: anywhere;
  white-space: normal;
}

.calc-page .top-ev-contributors-table th:nth-child(1),
.calc-page .top-ev-contributors-table td:nth-child(1) {
  width: 7%;
  text-align: center;
}

.calc-page .top-ev-contributors-table th:nth-child(2),
.calc-page .top-ev-contributors-table td:nth-child(2) {
  width: 51%;
}

.calc-page .top-ev-contributors-table th:nth-child(3),
.calc-page .top-ev-contributors-table td:nth-child(3),
.calc-page .top-ev-contributors-table th:nth-child(4),
.calc-page .top-ev-contributors-table td:nth-child(4) {
  width: 21%;
  text-align: right;
  overflow-wrap: normal;
  white-space: normal;
}

.calc-page .top-ev-contributors-table .top-ev-contributors-empty {
  color: #aebed2;
  font-weight: 700;
  text-align: left;
  white-space: normal;
}

@media (max-width: 560px) {
  .calc-page .top-ev-contributors-table {
    font-size: 0.86rem;
  }

  .calc-page .top-ev-contributors-table th,
  .calc-page .top-ev-contributors-table td {
    padding-inline: 6px;
  }
}

.calc-page .source-note {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-left: 6px;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.calc-page .source-note::before {
  content: "•";
  font-size: 0.7rem;
  opacity: 0.75;
}

.calc-page tr.sift-ok {
  background: var(--success-bg);
  outline: 1px solid var(--success-border);
}

.calc-page tr.sift-bad {
  background: var(--danger-bg);
  outline: 1px solid var(--danger-border);
}

.calc-page .footnotes {
  width: min(1200px, 100%);
  margin: 24px auto 0;
  padding: 0 clamp(16px, 4vw, 24px);
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-page .status {
  margin-top: 8px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.calc-page .status.loading::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  animation: calc-spin 0.8s linear infinite;
}

.calc-page .loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.88);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-duration) ease;
}

.calc-page .loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.calc-page .loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.calc-page .loading-text {
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--ink);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.calc-page .spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  animation: calc-spin 1s linear infinite;
}

@keyframes calc-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.calc-page tr.ge {
  background: var(--success-bg);
  outline: 1px solid var(--success-border);
}

.calc-page tr.lt {
  background: var(--danger-bg);
  outline: 1px solid var(--danger-border);
}

.calc-page .table-tools {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.calc-page .table-tools label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d5e1ff;
}
.calc-page .table-tools .tool-item.tool-toggle,
.calc-page .table-tools .tool-item.tool-note {
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.calc-page .table-tools .tool-item .tool-label-spacer {
  visibility: hidden;
  display: inline-flex;
  align-items: center;
}
.calc-page .table-tools .tool-item.tool-toggle label,
.calc-page .table-tools .tool-item.tool-note .small {
  margin: 0;
  height: calc(var(--ctrl-h) - 4px);
}
.calc-page .table-tools .tool-item.tool-note .small {
  display: inline-flex;
  align-items: center;
}

.calc-page .tips {
  background: var(--panel-alt);
  border: var(--border);
  border-radius: 12px;
  padding: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.calc-page .tips ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.calc-page .kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--gap);
  margin-top: 10px;
}

.calc-page .kpi {
  background: var(--panel-alt);
  border: var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
}

.calc-page .kpi h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #f4f7ff;
}

.calc-page .kpi .v {
  font-size: 1.35rem;
  font-weight: 700;
}

.calc-page .chartwrap {
  background: var(--panel-alt);
  border: var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-top: 14px;
  box-shadow: var(--shadow-soft);
}

.calc-page .drop {
  border: 2px dashed rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  transition:
    border-color var(--transition-duration) ease,
    background var(--transition-duration) ease;
}

.calc-page .drop:hover {
  border-color: rgba(122, 162, 255, 0.6);
  background: rgba(122, 162, 255, 0.08);
}

.calc-page .t-center {
  text-align: center;
}

.calc-page .t-left {
  text-align: left;
}

.calc-page .sort-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.calc-page .sort-ind {
  opacity: 0.85;
  font-size: 0.85em;
}

.calc-page th[data-sort="none"] .sort-ind::after {
  content: "⇅";
}
.calc-page th[data-sort="asc"] .sort-ind::after {
  content: "▲";
}
.calc-page th[data-sort="desc"] .sort-ind::after {
  content: "▼";
}

.calc-page .heatwrap {
  margin-top: 12px;
  overflow: auto;
}

.calc-page .hm-header {
  display: grid;
  grid-template-columns: 120px repeat(31, var(--cell));
  gap: 2px;
  align-items: center;
}

.calc-page .hm-header .hm-month-label {
  font-weight: 700;
  text-align: left;
  padding: 6px 4px;
  color: #ffffff;
}

.calc-page .hm-header .hm-day {
  font-size: 0.85rem;
  text-align: center;
  color: #ffffff;
  border: 1px solid var(--gridline);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 0;
}

.calc-page .hm-body {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.calc-page .hm-row {
  display: grid;
  grid-template-columns: 120px repeat(31, var(--cell));
  gap: 2px;
  align-items: center;
}

.calc-page .hm-row .hm-month {
  color: #ffffff;
  text-align: left;
  padding: 4px 6px;
  border: 1px solid var(--gridline);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.calc-page .hm-cell {
  position: relative;
  width: var(--cell);
  height: var(--cell);
  border: 1px solid var(--gridline);
  border-radius: 4px;
  background: #000;
  box-sizing: border-box;
}

.calc-page .hm-cell[data-v="0"] {
  background: #000;
}

.calc-page .hm-cell .star {
  position: absolute;
  inset: 2px;
  display: block;
}

.calc-page .hm-cell .star svg {
  width: 100%;
  height: 100%;
  fill: #ffffff;
  stroke: #ffffff;
}

/* Shared Magic calculator rollout layer. This is intentionally opt-in and
   excludes ACR's deeper page-specific redesign. */
.calc-page.magic-calculator-page:not(.acr-page) {
  --magic-calc-bg: #07080e;
  --magic-calc-panel: rgba(7, 13, 23, 0.96);
  --magic-calc-panel-soft: rgba(10, 18, 30, 0.92);
  --magic-calc-panel-warm: rgba(31, 25, 18, 0.9);
  --magic-calc-gold: #f6b72f;
  --magic-calc-gold-bright: #ffe79a;
  --magic-calc-gold-deep: #a86a12;
  --magic-calc-ink: #151006;
  --magic-calc-text: #f4f7ff;
  --magic-calc-muted: #c8d7ea;
  --magic-calc-border: rgba(218, 171, 89, 0.52);
  --magic-calc-border-soft: rgba(218, 171, 89, 0.28);
  /* Match the ACR canvas while preserving this legacy calculator layout. */
  background:
    radial-gradient(
      circle at 16% 8%,
      rgba(75, 23, 33, 0.62),
      transparent 34rem
    ),
    radial-gradient(
      circle at 86% 12%,
      rgba(45, 22, 50, 0.48),
      transparent 32rem
    ),
    radial-gradient(
      circle at 55% 92%,
      rgba(58, 23, 14, 0.42),
      transparent 40rem
    ),
    linear-gradient(180deg, #0d0610, #070a0f 42%, #09050a);
  color: var(--magic-calc-text);
}

body.calc-page.magic-calculator-page:not(.acr-page) main.wrap {
  width: min(1200px, calc(100% - clamp(28px, 5vw, 72px)));
  padding-block: clamp(34px, 6vw, 74px);
}

.calc-page.magic-calculator-page:not(.acr-page) .site-header,
.calc-page.magic-calculator-page:not(.acr-page) .site-footer {
  border-color: rgba(218, 171, 89, 0.58);
  background: linear-gradient(
    180deg,
    rgba(14, 13, 15, 0.98),
    rgba(5, 6, 10, 0.98)
  );
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}

.calc-page.magic-calculator-page:not(.acr-page) .site-title {
  color: var(--magic-calc-gold);
  text-shadow:
    0 2px 0 #7d4d0f,
    0 10px 24px rgba(246, 183, 47, 0.32);
}

.calc-page.magic-calculator-page:not(.acr-page)
  .site-header
  .global-nav
  .nav-link,
.calc-page.magic-calculator-page:not(.acr-page)
  .site-footer
  .global-nav
  .nav-link {
  border-color: rgba(218, 171, 89, 0.38);
  background: rgba(22, 17, 13, 0.78);
  color: #ead7af;
}

.calc-page.magic-calculator-page:not(.acr-page)
  .site-header
  .global-nav
  .nav-link:hover,
.calc-page.magic-calculator-page:not(.acr-page)
  .site-header
  .global-nav
  .nav-link:focus-visible,
.calc-page.magic-calculator-page:not(.acr-page)
  .site-footer
  .global-nav
  .nav-link:hover,
.calc-page.magic-calculator-page:not(.acr-page)
  .site-footer
  .global-nav
  .nav-link:focus-visible {
  border-color: rgba(255, 224, 137, 0.72);
  background: rgba(56, 43, 26, 0.92);
  color: #fff0cc;
}

.calc-page.magic-calculator-page:not(.acr-page) .card,
.calc-page.magic-calculator-page:not(.acr-page) .section,
.calc-page.magic-calculator-page:not(.acr-page) .summary .box,
.calc-page.magic-calculator-page:not(.acr-page) .summary-card,
.calc-page.magic-calculator-page:not(.acr-page) .summary-table,
.calc-page.magic-calculator-page:not(.acr-page) .result-block,
.calc-page.magic-calculator-page:not(.acr-page) .us-pe-card,
.calc-page.magic-calculator-page:not(.acr-page) .table-card,
.calc-page.magic-calculator-page:not(.acr-page) .faq-feedback,
.calc-page.magic-calculator-page:not(.acr-page) .note-gray,
.calc-page.magic-calculator-page:not(.acr-page) .callout {
  border-color: var(--magic-calc-border-soft);
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(246, 183, 47, 0.08),
      transparent 42%
    ),
    linear-gradient(145deg, rgba(8, 15, 26, 0.96), rgba(5, 10, 18, 0.98));
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 232, 154, 0.05);
}

.calc-page.magic-calculator-page:not(.acr-page) .page-intro > * {
  min-width: 0;
  max-width: 100%;
}

.calc-page.magic-calculator-page:not(.acr-page) .page-intro {
  display: grid;
  gap: clamp(14px, 2.4vw, 20px);
  border-color: var(--magic-calc-border);
  border-radius: 18px;
  padding: clamp(26px, 4.6vw, 46px);
  background:
    radial-gradient(circle at 14% 0, rgba(111, 17, 38, 0.48), transparent 40%),
    radial-gradient(
      circle at 92% 12%,
      rgba(246, 183, 47, 0.13),
      transparent 36%
    ),
    linear-gradient(145deg, rgba(20, 11, 21, 0.98), rgba(7, 12, 21, 0.98));
}

.calc-page.magic-calculator-page:not(.acr-page) .page-intro h1 {
  width: 100%;
  min-width: 0;
  max-width: 960px;
  margin: 0;
  color: var(--magic-calc-gold);
  font-family: "Cinzel", Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 6.5vw, 5.2rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.98;
  text-shadow:
    0 2px 0 #7d4d0f,
    0 5px 0 rgba(70, 38, 5, 0.55),
    0 16px 34px rgba(0, 0, 0, 0.62),
    0 18px 42px rgba(246, 183, 47, 0.22);
  overflow-wrap: anywhere;
  -webkit-text-fill-color: currentColor;
}

.calc-page.magic-calculator-page:not(.acr-page) .page-intro p {
  max-width: 86ch;
  color: var(--magic-calc-text);
  font-size: clamp(1rem, 0.32vw + 0.94rem, 1.12rem);
  line-height: 1.58;
}

.calc-page.magic-calculator-page:not(.acr-page) .page-intro p strong {
  color: #fff6dc;
}

.calc-page.magic-calculator-page:not(.acr-page) .page-intro code {
  color: var(--magic-calc-gold-bright);
  background: rgba(246, 183, 47, 0.08);
}

.calc-page.magic-calculator-page:not(.acr-page) .page-intro .sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  max-width: 100%;
  margin-top: 4px;
}

.calc-page.magic-calculator-page:not(.acr-page) .pill {
  min-height: 30px;
  padding: 6px 14px;
  border-color: rgba(218, 171, 89, 0.58);
  background:
    linear-gradient(180deg, rgba(10, 18, 28, 0.94), rgba(7, 11, 18, 0.94)),
    radial-gradient(circle at 15% 0, rgba(246, 183, 47, 0.16), transparent 42%);
  color: var(--magic-calc-gold-bright);
  font-size: 0.79rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  line-height: 1.1;
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 154, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.28);
}

.calc-page.magic-calculator-page:not(.acr-page) h2,
.calc-page.magic-calculator-page:not(.acr-page) h3,
.calc-page.magic-calculator-page:not(.acr-page) .summary h3,
.calc-page.magic-calculator-page:not(.acr-page) .summary-head h2,
.calc-page.magic-calculator-page:not(.acr-page) .result-title,
.calc-page.magic-calculator-page:not(.acr-page) .card > h3 {
  color: var(--magic-calc-gold-bright);
  text-shadow: 0 8px 20px rgba(246, 183, 47, 0.14);
}

.calc-page.magic-calculator-page:not(.acr-page) .small,
.calc-page.magic-calculator-page:not(.acr-page) .muted,
.calc-page.magic-calculator-page:not(.acr-page) .summary-meta,
.calc-page.magic-calculator-page:not(.acr-page) .result-subtitle,
.calc-page.magic-calculator-page:not(.acr-page) .table-note {
  color: var(--magic-calc-muted);
}

.calc-page.magic-calculator-page:not(.acr-page) label,
.calc-page.magic-calculator-page:not(.acr-page) .check {
  color: #edf4ff;
}

.calc-page.magic-calculator-page:not(.acr-page) input,
.calc-page.magic-calculator-page:not(.acr-page) select,
.calc-page.magic-calculator-page:not(.acr-page) textarea {
  min-height: 44px;
  border-color: rgba(218, 171, 89, 0.38);
  background: rgba(5, 10, 18, 0.96);
  color: var(--magic-calc-text);
}

.calc-page.magic-calculator-page:not(.acr-page) input:focus-visible,
.calc-page.magic-calculator-page:not(.acr-page) select:focus-visible,
.calc-page.magic-calculator-page:not(.acr-page) textarea:focus-visible {
  outline: 2px solid rgba(255, 224, 137, 0.72);
  outline-offset: 2px;
  border-color: rgba(255, 224, 137, 0.78);
  box-shadow: 0 0 0 4px rgba(246, 183, 47, 0.16);
}

.calc-page.magic-calculator-page:not(.acr-page) input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.calc-page.magic-calculator-page:not(.acr-page)
  input[type="number"]::-webkit-outer-spin-button,
.calc-page.magic-calculator-page:not(.acr-page)
  input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.calc-page.magic-calculator-page:not(.acr-page) details.sets {
  overflow: hidden;
  border-color: var(--magic-calc-border);
  background: var(--magic-calc-panel);
}

.calc-page.magic-calculator-page:not(.acr-page) details.sets > summary {
  min-height: 64px;
  margin: 0;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(218, 171, 89, 0.24);
  background: linear-gradient(
    90deg,
    rgba(77, 58, 22, 0.78) 0%,
    rgba(8, 18, 29, 0.94) 48%,
    rgba(8, 18, 29, 0.94) 100%
  );
  color: #fff1ca;
}

.calc-page.magic-calculator-page:not(.acr-page) details.sets > summary .chev {
  color: var(--magic-calc-gold-bright);
}

.calc-page.magic-calculator-page:not(.acr-page) .include-list {
  padding: 18px 22px 20px;
}

.calc-page.magic-calculator-page:not(.acr-page) .include-list .col {
  display: grid;
  gap: 10px;
}

.calc-page.magic-calculator-page:not(.acr-page) .include-list label {
  color: #eaf3ff;
}

.calc-page.magic-calculator-page:not(.acr-page) .btn,
.calc-page.magic-calculator-page:not(.acr-page) .button,
.calc-page.magic-calculator-page:not(.acr-page) button:not(.site-nav-toggle) {
  min-height: 44px;
  border-color: rgba(255, 224, 137, 0.9);
  color: var(--magic-calc-ink);
  background:
    linear-gradient(180deg, #fff1b7 0%, #f6c242 47%, #c7800c 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.58), transparent);
  box-shadow:
    0 12px 24px rgba(246, 183, 47, 0.24),
    inset 0 1px 0 rgba(255, 250, 213, 0.95),
    inset 0 -2px 0 rgba(103, 61, 7, 0.75);
  text-shadow: none;
  -webkit-text-fill-color: var(--magic-calc-ink);
}

.calc-page.magic-calculator-page:not(.acr-page) .btn:hover,
.calc-page.magic-calculator-page:not(.acr-page) .btn:focus-visible,
.calc-page.magic-calculator-page:not(.acr-page) .button:hover,
.calc-page.magic-calculator-page:not(.acr-page) .button:focus-visible,
.calc-page.magic-calculator-page:not(.acr-page)
  button:not(.site-nav-toggle):hover,
.calc-page.magic-calculator-page:not(.acr-page)
  button:not(.site-nav-toggle):focus-visible {
  color: var(--magic-calc-ink);
  filter: brightness(1.05) saturate(1.08);
  transform: translateY(-1px);
  -webkit-text-fill-color: var(--magic-calc-ink);
}

.calc-page.magic-calculator-page:not(.acr-page) .settings {
  align-items: stretch;
}

.calc-page.magic-calculator-page:not(.acr-page) .section {
  border-radius: 14px;
}

.calc-page.magic-calculator-page:not(.acr-page) .section h3 {
  color: var(--magic-calc-gold-bright);
  font-size: 1.12rem;
}

.calc-page.magic-calculator-page:not(.acr-page) .summary {
  gap: clamp(12px, 2.2vw, 18px);
}

.calc-page.magic-calculator-page:not(.acr-page) .summary .box,
.calc-page.magic-calculator-page:not(.acr-page) .summary-grid .box {
  border-color: rgba(218, 171, 89, 0.34);
  min-width: 0;
  overflow: hidden;
}

.calc-page.magic-calculator-page:not(.acr-page) .summary .box strong,
.calc-page.magic-calculator-page:not(.acr-page) .summary-grid .value,
.calc-page.magic-calculator-page:not(.acr-page) .right {
  color: var(--magic-calc-gold-bright);
  font-weight: 800;
}

.calc-page.magic-calculator-page:not(.acr-page) .us-pe-card .summary-head,
.calc-page.magic-calculator-page:not(.acr-page) .result-summary .summary-head {
  border-bottom: 1px solid rgba(218, 171, 89, 0.18);
  padding-bottom: 10px;
}

.calc-page.magic-calculator-page:not(.acr-page) .sim-chart-wrap {
  border: 1px solid rgba(218, 171, 89, 0.32);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(7, 13, 23, 0.96), rgba(4, 8, 14, 0.98)),
    radial-gradient(circle at 50% 0, rgba(246, 183, 47, 0.1), transparent 42%);
  padding: clamp(12px, 2.5vw, 18px);
}

.calc-page.magic-calculator-page:not(.acr-page) .table-tools {
  padding: 12px;
  border: 1px solid rgba(218, 171, 89, 0.22);
  border-radius: 12px;
  background: rgba(5, 10, 18, 0.68);
}

.calc-page.magic-calculator-page:not(.acr-page) table thead th {
  background: rgba(13, 19, 31, 0.98);
  color: var(--magic-calc-gold-bright);
}

.calc-page.magic-calculator-page:not(.acr-page) table tbody td,
.calc-page.magic-calculator-page:not(.acr-page) table tbody th,
.calc-page.magic-calculator-page:not(.acr-page) .mini td,
.calc-page.magic-calculator-page:not(.acr-page) .mini th {
  border-color: rgba(218, 171, 89, 0.18);
  overflow-wrap: anywhere;
}

.calc-page.magic-calculator-page:not(.acr-page) .mini {
  width: 100%;
  max-width: 100%;
}

.calc-page.magic-calculator-page:not(.acr-page) .mini caption {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.calc-page.magic-calculator-page:not(.acr-page) table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.025);
}

.calc-page.magic-calculator-page:not(.acr-page) .main-table tbody tr.green {
  background: rgba(12, 86, 70, 0.52);
}

.calc-page.magic-calculator-page:not(.acr-page) .main-table tbody tr.red {
  background: rgba(93, 28, 45, 0.42);
}

.calc-page.magic-calculator-page:not(.acr-page) .main-table a {
  color: #9dcdff;
}

.calc-page.magic-calculator-page:not(.acr-page) .table-wrap,
.calc-page.magic-calculator-page:not(.acr-page) .card-rows {
  border: 1px solid rgba(218, 171, 89, 0.24);
  background: rgba(4, 9, 16, 0.76);
}

@media (max-width: 900px) {
  body.calc-page.magic-calculator-page:not(.acr-page) main.wrap {
    width: min(100% - 24px, 1200px);
    padding-block: 28px;
  }

  .calc-page.magic-calculator-page:not(.acr-page) .page-intro {
    padding: clamp(20px, 6vw, 28px);
  }

  .calc-page.magic-calculator-page:not(.acr-page) .settings {
    grid-template-columns: 1fr;
  }

  .calc-page.magic-calculator-page:not(.acr-page) .table-tools {
    align-items: stretch;
  }

  .calc-page.magic-calculator-page:not(.acr-page) .table-tools .tool-item {
    min-width: min(100%, 220px);
  }
}

@media (max-width: 560px) {
  body.calc-page.magic-calculator-page:not(.acr-page) main.wrap {
    width: min(100% - 18px, 1200px);
  }

  .calc-page.magic-calculator-page:not(.acr-page) .page-intro h1 {
    font-size: clamp(1.95rem, 10.4vw, 2.55rem);
    line-height: 1.02;
  }

  .calc-page.magic-calculator-page:not(.acr-page) .page-intro .sub {
    display: grid;
    grid-template-columns: 1fr;
  }

  .calc-page.magic-calculator-page:not(.acr-page) .pill {
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 36px;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .calc-page.magic-calculator-page:not(.acr-page) details.sets > summary {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 56px;
    padding: 14px 16px;
  }

  .calc-page.magic-calculator-page:not(.acr-page) .include-list {
    padding: 14px 16px 18px;
  }

  .calc-page.magic-calculator-page:not(.acr-page) .btns,
  .calc-page.magic-calculator-page:not(.acr-page) .inline,
  .calc-page.magic-calculator-page:not(.acr-page) .section-actions {
    align-items: stretch;
  }

  .calc-page.magic-calculator-page:not(.acr-page) .btns > *,
  .calc-page.magic-calculator-page:not(.acr-page) .inline > *,
  .calc-page.magic-calculator-page:not(.acr-page) .section-actions > * {
    width: 100%;
    justify-content: center;
  }

  .calc-page.magic-calculator-page:not(.acr-page) .input-stepper .stepper-btn {
    width: 46px;
    min-width: 46px;
  }

  .calc-page.magic-calculator-page:not(.acr-page) .summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .calc-page.magic-calculator-page:not(.acr-page) .mini {
    table-layout: fixed;
    font-size: 0.78rem;
  }

  .calc-page.magic-calculator-page:not(.acr-page) .mini th,
  .calc-page.magic-calculator-page:not(.acr-page) .mini td {
    padding: 7px 5px;
    line-height: 1.25;
  }

  .calc-page.magic-calculator-page:not(.acr-page) .mini th:first-child,
  .calc-page.magic-calculator-page:not(.acr-page) .mini td:first-child {
    width: 42%;
  }

  .calc-page.magic-calculator-page:not(.acr-page)
    #sealedPriceTable
    th:first-child,
  .calc-page.magic-calculator-page:not(.acr-page)
    #sealedPriceTable
    td:first-child {
    width: 23%;
  }

  .calc-page.magic-calculator-page:not(.acr-page) .sim-chart-wrap {
    min-height: 220px;
  }
}

/* ACR Beyond Booster redesign refinements */
.calc-page.acr-page {
  --acr-gold: #f2bd45;
  --acr-gold-bright: #ffe89a;
  --acr-gold-deep: #a86814;
  --acr-ink: #140d05;
  --acr-panel: rgba(7, 15, 27, 0.94);
  --acr-panel-strong: rgba(9, 18, 31, 0.98);
}

.calc-page .page-intro.acr-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
  gap: 14px clamp(22px, 4vw, 36px);
  align-items: start;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid rgba(242, 189, 69, 0.54);
  border-radius: 14px;
  background:
    radial-gradient(
      circle at 18% 8%,
      rgba(242, 189, 69, 0.16),
      transparent 28%
    ),
    radial-gradient(
      circle at 84% 10%,
      rgba(57, 104, 128, 0.2),
      transparent 32%
    ),
    linear-gradient(145deg, rgba(20, 16, 29, 0.98), rgba(7, 13, 23, 0.98));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.calc-page .acr-masthead h1 {
  grid-column: 1;
  margin: 0 0 6px;
  max-width: 880px;
  background: linear-gradient(
    180deg,
    #fff3b2 0%,
    #ffd766 34%,
    #d18a1b 58%,
    #fff0a5 76%,
    #c06f10 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: #f6bd3e;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(2.05rem, 3vw, 2.95rem);
  font-weight: 800;
  letter-spacing: 0.025em;
  line-height: 1.08;
  text-align: left;
  text-transform: uppercase;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.35px rgba(67, 36, 5, 0.82);
  text-shadow:
    0 1px 0 rgba(255, 244, 186, 0.7),
    0 2px 0 rgba(92, 48, 5, 0.94),
    0 5px 10px rgba(0, 0, 0, 0.58),
    0 0 22px rgba(242, 189, 69, 0.24);
}

.calc-page .acr-masthead p {
  grid-column: 1;
  max-width: 82ch;
  margin: 0;
  color: #eef5ff;
  font-size: 1rem;
  font-weight: 560;
  line-height: 1.6;
}

.calc-page .acr-masthead .sub {
  display: flex;
  grid-column: 1;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.calc-page .acr-masthead .pill {
  border-color: rgba(242, 189, 69, 0.42);
  background: rgba(7, 15, 27, 0.72);
  color: #ffeec0;
  letter-spacing: 0.06em;
}

.calc-page .acr-masthead .snapshot-basis-card,
.calc-page .acr-masthead .acr-quick-summary {
  grid-column: 2;
  width: 100%;
  min-width: 0;
}

.calc-page .acr-masthead .snapshot-basis-card {
  grid-row: 1;
  margin: 0;
  border-color: rgba(242, 189, 69, 0.42);
  background:
    linear-gradient(145deg, rgba(8, 19, 32, 0.98), rgba(10, 28, 42, 0.94)),
    radial-gradient(circle at 10% 0, rgba(242, 189, 69, 0.18), transparent 40%);
}

.calc-page .acr-masthead .snapshot-basis-card strong {
  color: #ffffff;
  font-size: clamp(1.18rem, 1.7vw, 1.42rem);
}

.calc-page .acr-quick-summary {
  display: grid;
  grid-row: 2 / span 4;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(242, 189, 69, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(9, 17, 29, 0.98), rgba(12, 23, 35, 0.94)),
    radial-gradient(circle at 100% 0, rgba(242, 189, 69, 0.12), transparent 36%);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.calc-page .acr-quick-summary h2 {
  margin: 0;
  color: var(--acr-gold-bright);
  font-size: 1rem;
}

.calc-page .acr-quick-summary dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.calc-page .acr-quick-summary dl div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.calc-page .acr-quick-summary dl div:first-child {
  border-top: 0;
}

.calc-page .acr-quick-summary dt {
  color: #c8d6e9;
  font-size: 0.9rem;
}

.calc-page .acr-quick-summary dd {
  margin: 0;
  color: #ffffff;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.calc-page .acr-quick-summary p {
  margin: 0;
  color: #aebed2;
  font-size: 0.82rem;
}

.calc-page .acr-content-snapshot {
  gap: 22px;
  padding: clamp(22px, 4vw, 28px);
  border-color: rgba(242, 189, 69, 0.58);
  border-radius: 12px;
  background:
    radial-gradient(circle at 12% 0, rgba(242, 189, 69, 0.13), transparent 30%),
    linear-gradient(145deg, rgba(5, 13, 23, 0.98), rgba(8, 22, 36, 0.98));
}

.calc-page.acr-page .acr-content-snapshot h2,
.calc-page.acr-page .acr-content-snapshot h3,
.calc-page.acr-page .section h3,
.calc-page.acr-page .summary h3,
.calc-page.acr-page .summary-head h2,
.calc-page.acr-page .result-block .result-title,
.calc-page.acr-page .card > h3 {
  color: var(--acr-gold-bright);
  text-shadow: 0 0 18px rgba(242, 189, 69, 0.18);
}

.calc-page .acr-content-snapshot h2 {
  color: #f0bd47;
  font-weight: 850;
  text-shadow: 0 0 18px rgba(240, 189, 71, 0.24);
}

.calc-page .acr-content-snapshot__header {
  align-items: stretch;
}

.calc-page .acr-snapshot-stats div {
  border-color: rgba(242, 189, 69, 0.3);
  background:
    linear-gradient(145deg, rgba(8, 16, 28, 0.96), rgba(9, 23, 36, 0.9)),
    radial-gradient(circle at 10% 0, rgba(242, 189, 69, 0.12), transparent 38%);
}

.calc-page .acr-snapshot-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.calc-page .acr-snapshot-grid--single .acr-snapshot-panel {
  max-width: 760px;
}

.calc-page .acr-snapshot-panel {
  border-color: rgba(122, 162, 255, 0.24);
  background:
    linear-gradient(145deg, rgba(8, 16, 28, 0.98), rgba(10, 23, 36, 0.94)),
    radial-gradient(circle at 0 0, rgba(242, 189, 69, 0.12), transparent 34%);
}

.calc-page .acr-pack-structure-list {
  border-color: rgba(122, 162, 255, 0.2);
  background: rgba(7, 15, 27, 0.78);
}

.calc-page .acr-pack-structure-row {
  grid-template-columns: 18px minmax(132px, 0.34fr) minmax(0, 1fr);
  min-height: 66px;
  padding: 12px 14px;
}

.calc-page .acr-pack-structure-row strong {
  color: #fff0a8;
}

.calc-page.acr-page details.sets {
  gap: 0;
  padding: 0 !important;
  border: 1px solid rgba(242, 189, 69, 0.68);
  border-radius: 12px;
  background:
    linear-gradient(
      90deg,
      rgba(75, 61, 29, 0.84),
      rgba(15, 32, 47, 0.94) 58%,
      rgba(10, 22, 36, 0.98)
    ),
    linear-gradient(145deg, rgba(6, 13, 23, 0.98), rgba(8, 20, 33, 0.98));
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.calc-page.acr-page details.sets > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  margin: 0;
  padding: 18px 22px;
  border-bottom: 0;
  border-radius: 11px;
  background: linear-gradient(
    90deg,
    rgba(83, 67, 30, 0.92),
    rgba(14, 32, 48, 0.98) 58%,
    rgba(8, 20, 34, 1)
  );
}

.calc-page.acr-page details.sets[open] > summary {
  border-bottom: 1px solid rgba(242, 189, 69, 0.34);
  border-radius: 11px 11px 0 0;
  background: linear-gradient(
    90deg,
    rgba(92, 73, 31, 0.96),
    rgba(14, 34, 51, 1) 58%,
    rgba(8, 21, 35, 1)
  );
}

.calc-page.acr-page .sets-summary-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.calc-page.acr-page .sets-summary-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff2bd;
  font-size: 1.16rem;
  font-weight: 820;
}

.calc-page.acr-page .sets-summary-title::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: linear-gradient(135deg, #fff4b7, var(--acr-gold) 55%, #9e5f12);
  box-shadow: 0 0 14px rgba(242, 189, 69, 0.62);
  transform: rotate(45deg);
}

.calc-page.acr-page .sets-summary-subtitle {
  color: #d7e3f2;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.35;
}

.calc-page.acr-page .sets-summary-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(242, 189, 69, 0.52);
  border-radius: 999px;
  background: rgba(242, 189, 69, 0.1);
  color: #fff0b0;
  font-size: 0.84rem;
  font-weight: 820;
  white-space: nowrap;
}

.calc-page.acr-page details.sets > summary .chev {
  float: none;
  color: var(--acr-gold-bright);
  opacity: 1;
}

.calc-page.acr-page .include-list {
  padding: 20px 22px 20px;
  background: rgba(6, 13, 23, 0.46);
}

.calc-page.acr-page .include-list .col {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px 18px;
}

.calc-page.acr-page .include-list label {
  color: #e8f1ff;
  font-weight: 700;
}

.calc-page.acr-page .include-list input[type="checkbox"] {
  accent-color: var(--acr-gold);
}

.calc-page.acr-page .include-actions {
  margin-top: 2px;
}

.calc-page.acr-page .include-sift-note {
  margin-top: 0;
  padding: 10px 12px;
  border: 1px solid rgba(242, 189, 69, 0.46);
  border-radius: 8px;
  background: rgba(8, 26, 38, 0.78);
  color: #dcecff;
}

.calc-page.acr-page .include-sift-note strong {
  color: #ffeaa5;
}

.calc-page.acr-page #calcEV,
.calc-page.acr-page #resetSift,
.calc-page.acr-page #selectAllSets,
.calc-page.acr-page #deselectAllSets,
.calc-page.acr-page .input-stepper .stepper-btn,
.calc-page.acr-page .manafolio-calculator-add-button {
  border: 1px solid rgba(255, 226, 139, 0.92);
  background: linear-gradient(
    180deg,
    #fff1a8 0%,
    #ffd45f 18%,
    #ecad27 55%,
    #b77415 100%
  );
  color: var(--acr-ink);
  font-weight: 850;
  text-shadow: 0 1px 0 rgba(255, 242, 180, 0.45);
  box-shadow:
    0 13px 26px rgba(207, 139, 28, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -2px 0 rgba(79, 44, 5, 0.42);
}

.calc-page.acr-page #calcEV {
  min-height: 50px;
  width: min(420px, 100%);
  margin-inline: auto;
  font-size: 1.06rem;
}

.calc-page.acr-page #calcEV::after,
.calc-page.acr-page #selectAllSets::after,
.calc-page.acr-page #deselectAllSets::after,
.calc-page.acr-page #resetSift::after {
  color: rgba(20, 13, 5, 0.78);
}

.calc-page.acr-page #calcEV:hover,
.calc-page.acr-page #calcEV:focus-visible,
.calc-page.acr-page #resetSift:hover,
.calc-page.acr-page #resetSift:focus-visible,
.calc-page.acr-page #selectAllSets:hover,
.calc-page.acr-page #selectAllSets:focus-visible,
.calc-page.acr-page #deselectAllSets:hover,
.calc-page.acr-page #deselectAllSets:focus-visible,
.calc-page.acr-page .input-stepper .stepper-btn:hover,
.calc-page.acr-page .input-stepper .stepper-btn:focus-visible,
.calc-page.acr-page .manafolio-calculator-add-button:hover,
.calc-page.acr-page .manafolio-calculator-add-button:focus-visible {
  color: var(--acr-ink);
  filter: saturate(1.08) brightness(1.04);
  box-shadow:
    0 16px 32px rgba(207, 139, 28, 0.38),
    0 0 0 2px rgba(255, 226, 139, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    inset 0 -2px 0 rgba(79, 44, 5, 0.42);
}

.calc-page.acr-page .section {
  border-color: rgba(242, 189, 69, 0.24);
  background:
    linear-gradient(145deg, rgba(9, 17, 29, 0.95), rgba(11, 23, 36, 0.92)),
    radial-gradient(circle at 0 0, rgba(242, 189, 69, 0.08), transparent 32%);
}

@media (max-width: 960px) {
  .calc-page.acr-page .page-intro.acr-masthead {
    grid-template-columns: 1fr;
  }

  .calc-page.acr-page .acr-masthead h1,
  .calc-page.acr-page .acr-masthead p,
  .calc-page.acr-page .acr-masthead .sub,
  .calc-page.acr-page .acr-masthead .snapshot-basis-card,
  .calc-page.acr-page .acr-masthead .acr-quick-summary {
    grid-column: 1;
    grid-row: auto;
  }

  .calc-page.acr-page .acr-masthead .snapshot-basis-card,
  .calc-page.acr-page .acr-masthead .acr-quick-summary {
    max-width: 520px;
  }
}

@media (max-width: 620px) {
  .calc-page.acr-page details.sets > summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .calc-page.acr-page .sets-summary-badge {
    display: none;
  }

  .calc-page.acr-page .acr-quick-summary dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .calc-page.acr-page .acr-quick-summary dd {
    text-align: left;
  }
}

/* ACR Mythic Card Frame pass */
body.calc-page.acr-page {
  --acr-gold: #f6b72f;
  --acr-gold-bright: #ffe6a3;
  --acr-gold-deep: #a96d15;
  --acr-ivory: #fff2d2;
  --acr-text: #eaf0f8;
  --acr-muted: #bfc9d6;
  --acr-panel: #0c1018;
  --acr-panel-soft: #0a121c;
  --acr-border: #8e754a;
  --acr-ink: #151008;
  background:
    radial-gradient(
      circle at 16% 8%,
      rgba(75, 23, 33, 0.62),
      transparent 34rem
    ),
    radial-gradient(
      circle at 86% 12%,
      rgba(45, 22, 50, 0.48),
      transparent 32rem
    ),
    radial-gradient(
      circle at 55% 92%,
      rgba(58, 23, 14, 0.42),
      transparent 40rem
    ),
    linear-gradient(180deg, #0d0610, #070a0f 42%, #09050a);
}

.calc-page.acr-page .site-footer {
  padding-block: clamp(12px, 2.4vw, 18px);
}

.calc-page.acr-page .site-footer .global-nav {
  margin-bottom: 8px;
}

.calc-page.acr-page .site-footer .small.muted {
  margin: 2px 0 6px;
  color: var(--acr-gold);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow:
    0 1px 0 rgba(255, 230, 163, 0.46),
    0 0 14px rgba(246, 183, 47, 0.2);
}

.calc-page.acr-page .site-footer > div:last-child {
  margin-top: 0;
}

.calc-page.acr-page .page-intro.acr-masthead {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1fr) minmax(286px, 360px);
  gap: 14px clamp(18px, 3vw, 30px);
  overflow: hidden;
  padding: clamp(26px, 4vw, 36px);
  border-color: rgba(142, 117, 74, 0.94);
  background:
    radial-gradient(
      circle at 16% 8%,
      rgba(75, 23, 33, 0.42),
      transparent 28rem
    ),
    radial-gradient(
      circle at 82% 24%,
      rgba(45, 22, 50, 0.34),
      transparent 26rem
    ),
    linear-gradient(108deg, rgba(22, 10, 16, 0.98), rgba(11, 16, 24, 0.99));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 230, 163, 0.08);
}

.calc-page.acr-page .page-intro.acr-masthead::before,
.calc-page.acr-page .page-intro.acr-masthead::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(246, 183, 47, 0.28);
  border-radius: 50%;
  pointer-events: none;
}

.calc-page.acr-page .page-intro.acr-masthead::before {
  right: 132px;
  top: 64px;
  width: 250px;
  height: 250px;
}

.calc-page.acr-page .page-intro.acr-masthead::after {
  right: 176px;
  top: 94px;
  width: 166px;
  height: 166px;
}

.calc-page.acr-page .acr-masthead h1 {
  margin-bottom: 8px;
  background: none;
  color: var(--acr-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 3.35vw, 3.35rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.06;
  text-transform: none;
  -webkit-text-fill-color: currentColor;
  -webkit-text-stroke: 0;
  text-shadow:
    0 1px 0 rgba(255, 230, 163, 0.62),
    0 3px 0 rgba(90, 50, 6, 0.96),
    0 8px 18px rgba(0, 0, 0, 0.58),
    0 0 24px rgba(246, 183, 47, 0.24);
}

.calc-page.acr-page .acr-masthead p {
  color: var(--acr-text);
  font-size: 1.01rem;
  font-weight: 520;
  line-height: 1.55;
}

.calc-page.acr-page .acr-masthead p strong {
  color: #ffffff;
  font-weight: 800;
}

.calc-page.acr-page .field-info-button {
  border-color: rgba(246, 183, 47, 0.58);
  background: rgba(246, 183, 47, 0.12);
  color: var(--acr-gold-bright);
  box-shadow: 0 0 10px rgba(246, 183, 47, 0.14);
}

.calc-page.acr-page .field-info-button:hover,
.calc-page.acr-page .field-info-button:focus-visible {
  border-color: rgba(255, 230, 163, 0.88);
  background: rgba(246, 183, 47, 0.2);
}

.calc-page.acr-page .field-info-button:focus-visible {
  outline-color: rgba(255, 230, 163, 0.78);
}

.calc-page.acr-page .field-info-tooltip {
  border-color: rgba(142, 117, 74, 0.86);
  background: rgba(13, 9, 7, 0.96);
  color: var(--acr-ivory);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 230, 163, 0.08);
}

.calc-page.acr-page input[type="number"]:focus-visible,
.calc-page.acr-page input[type="search"]:focus-visible,
.calc-page.acr-page select:focus-visible {
  border-color: rgba(255, 230, 163, 0.96);
  outline: 2px solid rgba(255, 230, 163, 0.78);
  outline-offset: 2px;
  box-shadow:
    0 0 0 4px rgba(246, 183, 47, 0.16),
    0 0 18px rgba(246, 183, 47, 0.12);
}

.calc-page.acr-page .acr-summary-card {
  grid-column: 2;
  grid-row: 1 / span 4;
  display: grid;
  gap: 16px;
  align-self: start;
  width: 100%;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(142, 117, 74, 0.88);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(11, 18, 28, 0.98), rgba(9, 14, 22, 0.98)),
    radial-gradient(circle at 100% 0, rgba(246, 183, 47, 0.12), transparent 36%);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.calc-page.acr-page .acr-masthead .sub {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 9px;
  justify-self: start;
  align-self: start;
  width: auto;
  max-width: 100%;
  margin-top: 18px;
}

.calc-page.acr-page .acr-masthead .pill {
  flex: 0 0 auto;
  justify-content: center;
  width: auto;
  min-width: 0;
  min-height: 30px;
  padding: 5px 15px;
  border-color: rgba(242, 189, 69, 0.72);
  background:
    linear-gradient(180deg, rgba(12, 20, 30, 0.96), rgba(5, 9, 16, 0.98)),
    rgba(8, 13, 21, 0.96);
  color: var(--acr-ivory);
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 163, 0.16),
    inset 0 -1px 0 rgba(246, 183, 47, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.2);
  text-shadow: 0 0 10px rgba(246, 183, 47, 0.16);
}

.calc-page.acr-page .acr-summary-card .snapshot-basis-card,
.calc-page.acr-page .acr-summary-card .acr-quick-summary {
  grid-column: auto;
  grid-row: auto;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.calc-page.acr-page .acr-masthead .snapshot-basis-card {
  gap: 6px;
}

.calc-page.acr-page .acr-masthead .snapshot-basis-card strong {
  color: var(--acr-gold-bright);
}

.calc-page.acr-page .acr-masthead .snapshot-basis-card span:last-child {
  color: var(--acr-muted);
}

.calc-page.acr-page .acr-quick-summary {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.calc-page.acr-page .acr-quick-summary h2,
.calc-page.acr-page .section-kicker,
.calc-page.acr-page .acr-snapshot-stats dt,
.calc-page.acr-page .summary-head h2,
.calc-page.acr-page .result-subtitle {
  color: var(--acr-gold);
}

.calc-page.acr-page .acr-quick-summary dt {
  color: var(--acr-muted);
}

.calc-page.acr-page .acr-quick-summary dd {
  color: var(--acr-text);
  white-space: normal;
}

.calc-page.acr-page #acrQuickGross,
.calc-page.acr-page #acrQuickNet,
.calc-page.acr-page #acrQuickLow,
.calc-page.acr-page #acrQuickMid,
.calc-page.acr-page #acrQuickHigh {
  color: var(--acr-gold-bright);
}

.calc-page.acr-page .acr-value-positive {
  color: var(--acr-gold-bright) !important;
  font-weight: 900;
  text-shadow: 0 0 14px rgba(246, 183, 47, 0.24);
}

.calc-page.acr-page .acr-value-negative {
  color: #ffb1a6 !important;
  font-weight: 900;
  text-shadow: 0 0 14px rgba(255, 91, 74, 0.22);
}

.calc-page.acr-page .acr-value-neutral {
  color: var(--acr-text) !important;
  font-weight: 850;
}

.calc-page.acr-page #boxLossChanceRow:not([hidden]) {
  --acr-money-row-color: var(--acr-gold);
  --acr-money-row-glow: rgba(246, 183, 47, 0.2);
  --acr-money-row-fill: rgba(246, 183, 47, 0.1);
  --acr-money-row-fill-soft: rgba(246, 183, 47, 0.04);
  --acr-money-row-border: rgba(246, 183, 47, 0.32);
  --acr-money-row-weight: 850;

  background:
    linear-gradient(
      90deg,
      var(--acr-money-row-fill),
      var(--acr-money-row-fill-soft)
    ),
    rgba(8, 13, 21, 0.82);
  outline: 1px solid var(--acr-money-row-border);
}

.calc-page.acr-page #boxLossChanceRow:not([hidden]) th,
.calc-page.acr-page #boxLossChanceRow:not([hidden]) td {
  color: var(--acr-money-row-color);
  font-weight: var(--acr-money-row-weight);
  text-shadow: 0 0 14px var(--acr-money-row-glow);
}

.calc-page.acr-page #boxLossChanceRow.is-loss-risk.risk-1 {
  --acr-money-row-color: #ffb6a8;
  --acr-money-row-glow: rgba(255, 105, 81, 0.2);
  --acr-money-row-fill: rgba(255, 105, 81, 0.11);
  --acr-money-row-fill-soft: rgba(255, 105, 81, 0.035);
  --acr-money-row-border: rgba(255, 105, 81, 0.28);
  --acr-money-row-weight: 800;
}

.calc-page.acr-page #boxLossChanceRow.is-loss-risk.risk-2 {
  --acr-money-row-color: #ff927f;
  --acr-money-row-glow: rgba(255, 95, 76, 0.28);
  --acr-money-row-fill: rgba(255, 95, 76, 0.16);
  --acr-money-row-fill-soft: rgba(255, 95, 76, 0.05);
  --acr-money-row-border: rgba(255, 95, 76, 0.36);
  --acr-money-row-weight: 850;
}

.calc-page.acr-page #boxLossChanceRow.is-loss-risk.risk-3 {
  --acr-money-row-color: #ff8d82;
  --acr-money-row-glow: rgba(255, 74, 68, 0.36);
  --acr-money-row-fill: rgba(255, 74, 68, 0.22);
  --acr-money-row-fill-soft: rgba(255, 74, 68, 0.07);
  --acr-money-row-border: rgba(255, 74, 68, 0.46);
  --acr-money-row-weight: 900;
}

.calc-page.acr-page #boxLossChanceRow.is-loss-risk.risk-4 {
  --acr-money-row-color: #ff786f;
  --acr-money-row-glow: rgba(255, 61, 59, 0.44);
  --acr-money-row-fill: rgba(255, 61, 59, 0.28);
  --acr-money-row-fill-soft: rgba(255, 61, 59, 0.09);
  --acr-money-row-border: rgba(255, 61, 59, 0.56);
  --acr-money-row-weight: 950;
}

.calc-page.acr-page #boxLossChanceRow.is-gain-chance.gain-1 {
  --acr-money-row-color: #fff1b8;
  --acr-money-row-glow: rgba(255, 230, 163, 0.2);
  --acr-money-row-fill: rgba(246, 183, 47, 0.11);
  --acr-money-row-fill-soft: rgba(246, 183, 47, 0.035);
  --acr-money-row-border: rgba(246, 183, 47, 0.3);
  --acr-money-row-weight: 800;
}

.calc-page.acr-page #boxLossChanceRow.is-gain-chance.gain-2 {
  --acr-money-row-color: #ffe081;
  --acr-money-row-glow: rgba(246, 183, 47, 0.28);
  --acr-money-row-fill: rgba(246, 183, 47, 0.16);
  --acr-money-row-fill-soft: rgba(246, 183, 47, 0.05);
  --acr-money-row-border: rgba(246, 183, 47, 0.38);
  --acr-money-row-weight: 850;
}

.calc-page.acr-page #boxLossChanceRow.is-gain-chance.gain-3 {
  --acr-money-row-color: #ffc847;
  --acr-money-row-glow: rgba(246, 183, 47, 0.34);
  --acr-money-row-fill: rgba(246, 183, 47, 0.22);
  --acr-money-row-fill-soft: rgba(246, 183, 47, 0.07);
  --acr-money-row-border: rgba(246, 183, 47, 0.48);
  --acr-money-row-weight: 900;
}

.calc-page.acr-page #boxLossChanceRow.is-gain-chance.gain-4 {
  --acr-money-row-color: #f6b72f;
  --acr-money-row-glow: rgba(246, 183, 47, 0.42);
  --acr-money-row-fill: rgba(246, 183, 47, 0.28);
  --acr-money-row-fill-soft: rgba(246, 183, 47, 0.09);
  --acr-money-row-border: rgba(246, 183, 47, 0.58);
  --acr-money-row-weight: 950;
}

.calc-page.acr-page .acr-content-snapshot {
  gap: 20px;
  padding: clamp(20px, 3vw, 28px);
  border-color: rgba(142, 117, 74, 0.94);
  background:
    radial-gradient(
      circle at 82% 14%,
      rgba(169, 109, 21, 0.22),
      transparent 20rem
    ),
    linear-gradient(145deg, rgba(8, 17, 27, 0.99), rgba(11, 15, 22, 0.99));
}

.calc-page.acr-page .acr-content-snapshot__header {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(142, 117, 74, 0.42);
}

.calc-page.acr-page .acr-content-snapshot__header > div {
  max-width: 820px;
}

.calc-page.acr-page .acr-content-snapshot h2,
.calc-page.acr-page .acr-content-snapshot h3,
.calc-page.acr-page .section h3,
.calc-page.acr-page .summary h3,
.calc-page.acr-page .result-block .result-title,
.calc-page.acr-page .card > h3 {
  color: var(--acr-ivory);
  text-shadow:
    0 1px 0 rgba(169, 109, 21, 0.65),
    0 0 16px rgba(246, 183, 47, 0.16);
}

.calc-page.acr-page .acr-content-snapshot__header p:not(.section-kicker),
.calc-page.acr-page .acr-snapshot-panel p,
.calc-page.acr-page .small,
.calc-page.acr-page .muted {
  color: var(--acr-muted);
}

.calc-page.acr-page .acr-snapshot-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(142, 117, 74, 0.64);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(58, 46, 24, 0.7), rgba(9, 18, 29, 0.96)),
    radial-gradient(circle at 0 0, rgba(246, 183, 47, 0.12), transparent 36%);
}

.calc-page.acr-page .acr-snapshot-stats div {
  border: 0;
  border-left: 1px solid rgba(142, 117, 74, 0.34);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.calc-page.acr-page .acr-snapshot-stats div:first-child {
  border-left: 0;
}

.calc-page.acr-page .acr-snapshot-stats dd {
  color: var(--acr-text);
  font-size: 1.05rem;
}

.calc-page.acr-page .acr-snapshot-grid {
  grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.78fr);
  gap: 18px;
  align-items: start;
}

.calc-page.acr-page .acr-snapshot-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.calc-page.acr-page .acr-snapshot-grid--single .acr-snapshot-panel {
  max-width: none;
}

.calc-page.acr-page .acr-snapshot-panel,
.calc-page.acr-page .summary .box,
.calc-page.acr-page .result-block,
.calc-page.acr-page .section {
  border-color: rgba(63, 75, 91, 0.95);
  background:
    linear-gradient(145deg, rgba(10, 18, 28, 0.98), rgba(9, 15, 24, 0.96)),
    radial-gradient(circle at 0 0, rgba(246, 183, 47, 0.08), transparent 34%);
}

.calc-page.acr-page .acr-pack-structure-panel,
.calc-page.acr-page .acr-contributors-panel {
  overflow: hidden;
  padding: 0;
}

.calc-page.acr-page .acr-pack-structure-panel h3,
.calc-page.acr-page .acr-pack-structure-panel > p,
.calc-page.acr-page .acr-contributors-panel h3,
.calc-page.acr-page .acr-contributors-panel > p {
  padding-inline: 18px;
}

.calc-page.acr-page .acr-pack-structure-panel h3,
.calc-page.acr-page .acr-contributors-panel h3 {
  margin: 0;
  padding-top: 18px;
}

.calc-page.acr-page .acr-pack-structure-panel > p,
.calc-page.acr-page .acr-contributors-panel > p {
  margin-bottom: 0;
}

.calc-page.acr-page .acr-pack-structure-list {
  margin: 16px 0 0;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.calc-page.acr-page .acr-pack-structure-row {
  grid-template-columns: 18px minmax(128px, 0.26fr) minmax(0, 1fr);
  gap: 12px 16px;
  min-height: 0;
  padding: 14px 18px;
}

.calc-page.acr-page .acr-pack-structure-row strong {
  padding-top: 0;
}

.calc-page.acr-page .acr-pack-structure-footnote,
.calc-page.acr-page #acrPackStructureFootnote {
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 12, 20, 0.34);
}

.calc-page.acr-page .acr-contributors-panel h3 {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(142, 117, 74, 0.42);
  background:
    linear-gradient(90deg, rgba(68, 52, 23, 0.62), rgba(8, 15, 24, 0)),
    rgba(7, 13, 22, 0.42);
}

.calc-page.acr-page .acr-contributors-panel .top-ev-contributors-table-wrap {
  padding: 12px 14px 4px;
}

.calc-page.acr-page .top-ev-contributors-table {
  border-collapse: separate;
  border-spacing: 0 8px;
}

.calc-page.acr-page .top-ev-contributors-table th,
.calc-page.acr-page .top-ev-contributors-table td {
  padding-block: 8px;
}

.calc-page.acr-page .top-ev-contributors-table thead th {
  border-bottom: 0;
  color: var(--acr-gold);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.calc-page.acr-page .top-ev-contributors-table tbody td {
  border-top: 1px solid rgba(63, 75, 91, 0.72);
  border-bottom: 1px solid rgba(63, 75, 91, 0.72);
  background: rgba(9, 18, 29, 0.72);
}

.calc-page.acr-page .top-ev-contributors-table tbody td:first-child {
  border-left: 1px solid rgba(63, 75, 91, 0.72);
  border-radius: 8px 0 0 8px;
}

.calc-page.acr-page .top-ev-contributors-table tbody td:last-child {
  border-right: 1px solid rgba(63, 75, 91, 0.72);
  border-radius: 0 8px 8px 0;
}

.calc-page.acr-page .top-ev-contributors-table th:nth-child(1),
.calc-page.acr-page .top-ev-contributors-table td:nth-child(1) {
  width: 9%;
}

.calc-page.acr-page .top-ev-contributors-table th:nth-child(2),
.calc-page.acr-page .top-ev-contributors-table td:nth-child(2) {
  width: 49%;
}

.calc-page.acr-page .top-ev-contributors-table th:nth-child(3),
.calc-page.acr-page .top-ev-contributors-table td:nth-child(3) {
  width: 19%;
}

.calc-page.acr-page .top-ev-contributors-table th:nth-child(4),
.calc-page.acr-page .top-ev-contributors-table td:nth-child(4) {
  width: 23%;
}

.calc-page.acr-page .calculator-settings-card {
  border-color: rgba(142, 117, 74, 0.94);
  background:
    radial-gradient(
      circle at 8% 0,
      rgba(246, 183, 47, 0.11),
      transparent 28rem
    ),
    linear-gradient(145deg, rgba(8, 17, 27, 0.99), rgba(11, 15, 22, 0.99));
}

.calc-page.acr-page .calculator-settings-card .section {
  border-color: rgba(142, 117, 74, 0.76);
  background:
    linear-gradient(145deg, rgba(10, 18, 28, 0.98), rgba(8, 13, 21, 0.96)),
    radial-gradient(circle at 0 0, rgba(246, 183, 47, 0.1), transparent 34%);
}

/* Keep the Magic-wide settings surface as concise as the ACR reference. */
.calc-page.acr-page .calculator-settings-card .form-row > .small,
.calc-page.acr-page .calculator-settings-card .form-row:has(#useSiftEV) {
  display: none;
}

.calc-page.acr-page .acr-calculator-notes {
  gap: 10px;
  padding: clamp(16px, 3vw, 20px);
  border-color: rgba(142, 117, 74, 0.82);
  background:
    linear-gradient(145deg, rgba(8, 17, 27, 0.94), rgba(10, 15, 22, 0.96)),
    radial-gradient(circle at 0 0, rgba(246, 183, 47, 0.08), transparent 30%);
}

.calc-page.acr-page .acr-calculator-notes h2 {
  margin: 0;
  color: var(--acr-gold);
  font-size: 1rem;
}

.calc-page.acr-page .acr-calculator-notes ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--acr-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.calc-page.acr-page .acr-calculator-notes strong {
  color: var(--acr-gold-bright);
}

.calc-page.acr-page .acr-simulation-card {
  gap: 16px;
  padding: clamp(18px, 3vw, 24px);
  border-color: rgba(142, 117, 74, 0.94);
  background:
    radial-gradient(
      circle at 82% 0,
      rgba(246, 183, 47, 0.12),
      transparent 26rem
    ),
    linear-gradient(145deg, rgba(8, 17, 27, 0.99), rgba(8, 12, 19, 0.99));
}

.calc-page.acr-page .acr-chart-heading {
  display: flex;
  gap: 14px 20px;
  align-items: flex-start;
  justify-content: space-between;
}

.calc-page.acr-page .acr-chart-heading h3 {
  margin: 2px 0 0;
  color: var(--acr-ivory);
  text-shadow:
    0 1px 0 rgba(169, 109, 21, 0.65),
    0 0 16px rgba(246, 183, 47, 0.16);
}

.calc-page.acr-page .acr-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 520px;
  color: #d7e0ec;
  font-size: 0.8rem;
  font-weight: 750;
}

.calc-page.acr-page .acr-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(142, 117, 74, 0.58);
  border-radius: 999px;
  background: rgba(8, 13, 21, 0.74);
}

.calc-page.acr-page .acr-chart-legend i {
  display: inline-block;
  flex: 0 0 auto;
}

.calc-page.acr-page .acr-chart-legend__bars {
  width: 16px;
  height: 9px;
  border-radius: 2px;
  background: linear-gradient(180deg, #ffe9b6, #6b748b);
}

.calc-page.acr-page .acr-chart-legend__band {
  width: 18px;
  height: 10px;
  border: 1px dashed rgba(246, 183, 47, 0.95);
  border-radius: 3px;
  background: rgba(246, 183, 47, 0.16);
}

.calc-page.acr-page .acr-chart-legend__mid {
  width: 3px;
  height: 16px;
  border-radius: 999px;
  background: var(--acr-gold-bright);
  box-shadow: 0 0 10px rgba(246, 183, 47, 0.42);
}

.calc-page.acr-page .acr-simulation-card .sim-chart-wrap {
  height: clamp(270px, 32vw, 330px);
  padding: 12px;
  border-color: rgba(142, 117, 74, 0.86);
  background:
    radial-gradient(
      circle at 18% 0,
      rgba(246, 183, 47, 0.08),
      transparent 24rem
    ),
    linear-gradient(180deg, rgba(9, 16, 25, 0.98), rgba(5, 10, 17, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -18px 40px rgba(0, 0, 0, 0.18);
}

.calc-page.acr-page .sim-chart-tooltip {
  border-color: rgba(246, 183, 47, 0.66);
  background: rgba(13, 9, 7, 0.94);
  color: var(--acr-ivory);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 230, 163, 0.08);
}

.calc-page.acr-page .acr-chart-readout {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(142, 117, 74, 0.62);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(10, 18, 28, 0.9), rgba(8, 13, 20, 0.9)),
    radial-gradient(circle at 0 0, rgba(246, 183, 47, 0.08), transparent 26%);
}

.calc-page.acr-page .acr-chart-band {
  color: var(--acr-gold-bright);
  font-size: 0.98rem;
  font-weight: 850;
}

.calc-page.acr-page .acr-chart-markers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.calc-page.acr-page .acr-chart-markers[hidden] {
  display: none;
}

.calc-page.acr-page .acr-chart-markers span {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(142, 117, 74, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(246, 183, 47, 0.1), rgba(246, 183, 47, 0.03)),
    rgba(8, 13, 21, 0.72);
}

.calc-page.acr-page .acr-chart-markers b {
  color: var(--acr-muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.calc-page.acr-page .acr-chart-markers strong {
  color: var(--acr-gold-bright);
  font-size: 0.98rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.calc-page.acr-page .acr-chart-readout p {
  margin: 0;
  color: var(--acr-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.calc-page.acr-page #evTable thead th {
  padding: 0;
  border-color: rgba(63, 75, 91, 0.95);
  background:
    linear-gradient(180deg, rgba(15, 23, 35, 0.98), rgba(8, 14, 23, 0.98)),
    radial-gradient(circle at 50% 0, rgba(246, 183, 47, 0.1), transparent 58%);
  color: var(--acr-text);
  vertical-align: middle;
}

.calc-page.acr-page #evTable thead th + th {
  border-left-color: rgba(142, 117, 74, 0.24);
}

.calc-page.acr-page .acr-sort-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 850;
  text-align: inherit;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.calc-page.acr-page .acr-sort-button > span:first-child {
  white-space: nowrap;
}

.calc-page.acr-page .acr-sort-button:hover {
  color: var(--acr-gold-bright);
  background: linear-gradient(
    180deg,
    rgba(246, 183, 47, 0.12),
    rgba(246, 183, 47, 0.035)
  );
}

.calc-page.acr-page .acr-sort-button:focus-visible {
  outline: 2px solid rgba(255, 230, 163, 0.72);
  outline-offset: -4px;
}

.calc-page.acr-page .acr-sort-button[data-sort-state="asc"],
.calc-page.acr-page .acr-sort-button[data-sort-state="desc"] {
  color: var(--acr-gold);
  background:
    linear-gradient(180deg, rgba(246, 183, 47, 0.14), rgba(246, 183, 47, 0.04)),
    radial-gradient(circle at 50% 0, rgba(255, 230, 163, 0.14), transparent 72%);
  box-shadow:
    inset 0 -2px 0 var(--acr-gold),
    inset 0 1px 0 rgba(255, 230, 163, 0.08);
}

.calc-page.acr-page .acr-sort-button__indicator {
  display: inline-grid;
  place-items: center;
  width: 1em;
  height: 1em;
  color: rgba(191, 201, 214, 0.62);
  font-size: 0.72em;
  line-height: 1;
  transform: translateY(-0.5px);
}

.calc-page.acr-page .acr-sort-button__indicator::before {
  content: "\2195";
}

.calc-page.acr-page
  .acr-sort-button[data-sort-state="asc"]
  .acr-sort-button__indicator,
.calc-page.acr-page
  .acr-sort-button[data-sort-state="desc"]
  .acr-sort-button__indicator {
  color: var(--acr-gold-bright);
  filter: drop-shadow(0 0 6px rgba(246, 183, 47, 0.35));
}

.calc-page.acr-page
  .acr-sort-button[data-sort-state="asc"]
  .acr-sort-button__indicator::before {
  content: "\25b2";
}

.calc-page.acr-page
  .acr-sort-button[data-sort-state="desc"]
  .acr-sort-button__indicator::before {
  content: "\25bc";
}

.calc-page.acr-page .main-table th.center .acr-sort-button {
  justify-content: center;
}

.calc-page.acr-page #evTable tfoot td {
  padding: 12px 14px;
  border-top: 1px solid rgba(246, 183, 47, 0.34);
  border-bottom: 0;
  background:
    linear-gradient(90deg, rgba(68, 52, 23, 0.78), rgba(8, 15, 24, 0.94)),
    rgba(8, 13, 21, 0.9);
  color: var(--acr-ivory);
  font-weight: 850;
}

.calc-page.acr-page #evTable tfoot tr:first-child td:first-child {
  border-left: 1px solid rgba(142, 117, 74, 0.72);
  border-radius: 8px 0 0 8px;
  color: var(--acr-gold-bright);
  letter-spacing: 0.01em;
  text-shadow: 0 0 12px rgba(246, 183, 47, 0.18);
}

.calc-page.acr-page #evTable tfoot tr:first-child td:last-child {
  border-right: 1px solid rgba(142, 117, 74, 0.72);
  border-radius: 0 8px 8px 0;
  color: var(--acr-gold-bright);
  font-size: 1rem;
  text-align: center;
  text-shadow: 0 0 14px rgba(246, 183, 47, 0.22);
}

.calc-page.acr-page #evTable tfoot tr:not(:first-child) td {
  background: rgba(8, 13, 21, 0.72);
  color: var(--acr-muted);
  font-size: 0.84rem;
}

.calc-page.acr-page .acr-green-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px 6px 14px;
  border: 1px solid rgba(142, 117, 74, 0.82);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(10, 18, 28, 0.98), rgba(8, 13, 21, 0.96)),
    radial-gradient(circle at 0 0, rgba(246, 183, 47, 0.12), transparent 58%);
  color: var(--acr-ivory);
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.calc-page.acr-page .acr-green-switch:hover {
  border-color: rgba(246, 183, 47, 0.84);
}

.calc-page.acr-page .acr-green-switch:focus-within {
  border-color: rgba(255, 230, 163, 0.9);
  outline: 2px solid rgba(255, 230, 163, 0.72);
  outline-offset: 2px;
  box-shadow:
    0 0 0 4px rgba(246, 183, 47, 0.14),
    0 14px 26px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.calc-page.acr-page .acr-green-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.calc-page.acr-page .acr-green-switch__label {
  white-space: nowrap;
}

.calc-page.acr-page .acr-green-switch__track {
  position: relative;
  flex: 0 0 auto;
  width: 58px;
  height: 30px;
  border: 1px solid rgba(191, 201, 214, 0.26);
  border-radius: 999px;
  background: linear-gradient(180deg, #0a111b, #111b29);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.calc-page.acr-page .acr-green-switch__thumb {
  position: absolute;
  top: 50%;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f5f8ff, #9eaabe);
  box-shadow:
    0 2px 7px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateY(-50%);
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.calc-page.acr-page .acr-green-switch__state {
  min-width: 2.1em;
  color: #d7e0ec;
  text-align: left;
}

.calc-page.acr-page .acr-green-switch input:checked + .acr-green-switch__track {
  border-color: rgba(255, 230, 163, 0.96);
  background: linear-gradient(180deg, #ffeaa2 0%, #f6b72f 54%, #c77d10 100%);
  box-shadow:
    0 0 18px rgba(246, 183, 47, 0.24),
    inset 0 1px 0 rgba(255, 247, 212, 0.78),
    inset 0 -2px 0 rgba(84, 47, 5, 0.4);
}

.calc-page.acr-page
  .acr-green-switch
  input:checked
  + .acr-green-switch__track
  .acr-green-switch__thumb {
  background: linear-gradient(180deg, #fff8dc, #5b3508);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.48),
    0 0 10px rgba(255, 230, 163, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transform: translate(28px, -50%);
}

.calc-page.acr-page .acr-green-switch input:checked ~ .acr-green-switch__state {
  color: var(--acr-gold-bright);
}

.calc-page.acr-page
  .acr-green-switch
  input:focus-visible
  + .acr-green-switch__track {
  outline: 2px solid rgba(255, 230, 163, 0.78);
  outline-offset: 3px;
}

.calc-page.acr-page .acr-pack-structure-list {
  border-color: rgba(63, 75, 91, 0.95);
  background: rgba(7, 13, 22, 0.72);
}

.calc-page.acr-page .acr-pack-structure-row strong {
  color: var(--acr-ivory);
}

.calc-page.acr-page .acr-pack-structure-description {
  color: var(--acr-text);
}

.calc-page.acr-page .acr-pack-structure-detail,
.calc-page.acr-page .acr-top-contributor-detail {
  color: #a9c8ee;
}

.calc-page.acr-page .top-ev-contributors-table th {
  color: var(--acr-gold);
}

.calc-page.acr-page .top-ev-contributors-table td:nth-child(4) {
  color: var(--acr-gold-bright);
  font-weight: 850;
}

.calc-page.acr-page details.sets {
  border-color: rgba(142, 117, 74, 0.94);
  background:
    linear-gradient(90deg, rgba(65, 51, 25, 0.9), rgba(10, 22, 34, 0.99) 54%),
    rgba(8, 17, 27, 0.99);
}

.calc-page.acr-page details.sets > summary,
.calc-page.acr-page details.sets[open] > summary {
  background: linear-gradient(
    90deg,
    rgba(75, 61, 29, 0.98),
    rgba(11, 26, 40, 0.99) 58%,
    rgba(8, 18, 30, 1)
  );
}

.calc-page.acr-page details.sets > summary:hover,
.calc-page.acr-page details.sets > summary:focus-visible {
  border-color: rgba(255, 230, 163, 0.8);
  outline: 2px solid rgba(255, 230, 163, 0.72);
  outline-offset: -4px;
  box-shadow:
    inset 4px 0 0 rgba(246, 183, 47, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 20px rgba(246, 183, 47, 0.1);
}

.calc-page.acr-page .sets-summary-title {
  color: var(--acr-ivory);
}

.calc-page.acr-page .sets-summary-subtitle,
.calc-page.acr-page .include-list label {
  color: var(--acr-text);
}

.calc-page.acr-page .include-list label {
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.calc-page.acr-page .include-list label:hover,
.calc-page.acr-page .include-list label:focus-within {
  border-color: rgba(246, 183, 47, 0.66);
  background: rgba(246, 183, 47, 0.08);
  box-shadow: inset 3px 0 0 rgba(246, 183, 47, 0.5);
}

.calc-page.acr-page .include-list input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(255, 230, 163, 0.82);
  outline-offset: 3px;
}

.calc-page.acr-page .sets-summary-badge,
.calc-page.acr-page .include-sift-note strong {
  color: var(--acr-gold-bright);
}

.calc-page.acr-page .include-sift-note {
  border-color: rgba(142, 117, 74, 0.82);
  background: rgba(8, 17, 27, 0.82);
}

.calc-page.acr-page #calcEV,
.calc-page.acr-page #resetSift,
.calc-page.acr-page #selectAllSets,
.calc-page.acr-page #deselectAllSets,
.calc-page.acr-page .input-stepper .stepper-btn,
.calc-page.acr-page .manafolio-calculator-add-button {
  border-color: rgba(255, 230, 163, 0.98);
  background: linear-gradient(180deg, #fff0a9 0%, #f6b72f 52%, #d69012 100%);
  color: var(--acr-ink);
  box-shadow:
    0 14px 28px rgba(214, 144, 18, 0.34),
    inset 0 1px 0 rgba(255, 247, 212, 0.78),
    inset 0 -2px 0 rgba(84, 47, 5, 0.45);
}

.calc-page.acr-page #resetSift,
.calc-page.acr-page #selectAllSets,
.calc-page.acr-page #deselectAllSets,
.calc-page.acr-page .input-stepper .stepper-btn {
  min-height: 44px;
}

@media (max-width: 960px) {
  .calc-page.acr-page .page-intro.acr-masthead {
    grid-template-columns: minmax(0, 1fr);
  }

  .calc-page.acr-page .page-intro.acr-masthead > * {
    min-width: 0;
    max-width: 100%;
  }

  .calc-page.acr-page .acr-masthead .sub {
    justify-self: stretch;
    width: 100%;
    min-width: 0;
  }

  .calc-page.acr-page .acr-masthead .pill {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .calc-page.acr-page .acr-snapshot-grid {
    grid-template-columns: 1fr;
  }

  .calc-page.acr-page .acr-chart-heading {
    display: grid;
  }

  .calc-page.acr-page .acr-chart-legend {
    justify-content: flex-start;
  }

  .calc-page.acr-page .acr-summary-card {
    grid-column: 1;
    grid-row: auto;
    align-self: start;
    max-width: 520px;
  }
}

@media (max-width: 760px) {
  .calc-page.acr-page .acr-masthead .sub {
    display: grid;
    grid-template-columns: 1fr;
    justify-self: stretch;
  }

  .calc-page.acr-page .acr-masthead .pill:last-child {
    grid-column: auto;
  }

  .calc-page.acr-page .acr-masthead .pill {
    width: 100%;
  }

  .calc-page.acr-page .acr-snapshot-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calc-page.acr-page .acr-snapshot-stats div:nth-child(odd) {
    border-left: 0;
  }

  .calc-page.acr-page .acr-snapshot-stats div:nth-child(n + 3) {
    border-top: 1px solid rgba(142, 117, 74, 0.34);
  }

  .calc-page.acr-page .acr-pack-structure-row {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .calc-page.acr-page .acr-pack-structure-copy {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .calc-page.acr-page .acr-snapshot-stats {
    grid-template-columns: 1fr;
  }

  .calc-page.acr-page .acr-snapshot-stats div,
  .calc-page.acr-page .acr-snapshot-stats div:nth-child(odd) {
    border-left: 0;
  }

  .calc-page.acr-page .acr-snapshot-stats div + div {
    border-top: 1px solid rgba(142, 117, 74, 0.34);
  }

  .calc-page.acr-page .top-ev-contributors-table {
    font-size: 0.84rem;
  }
}

@media (max-width: 1149px) {
  .settings .section.monte-carlo-section,
  .monte-carlo-section {
    display: none;
  }
}

/* Keep a safety net for future calculator pages that forget the shared class. */
@supports selector(.calc-page .settings .section:has(#confLevel)) {
  @media (max-width: 1149px) {
    .calc-page .settings .section:has(#confLevel) {
      display: none;
    }
  }
}

@media (max-width: 720px) {
  main.wrap details.sets {
    display: none;
  }
}

@media (max-width: 720px) {
  .calc-page details.sets {
    display: none;
  }

  .calc-page.magic-calculator-page:not(.acr-page) details.sets {
    display: block;
  }
}

@media (max-width: 960px) {
  .calc-page .row-inline {
    grid-template-columns: 1fr;
  }

  .calc-page .summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .calc-page .wrap {
    padding-inline: clamp(14px, 4vw, 20px);
  }

  .calc-page .settings {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 799px) {
  .calc-page .main-table,
  .calc-page .table-card {
    display: none;
  }
}

@media (max-width: 560px) {
  .calc-page h1 {
    font-size: 1.6rem;
  }
}

.calc-page.acr-page .acr-mobile-sort-controls,
.calc-page.acr-page .acr-mobile-ev-total,
.calc-page.acr-page .acr-mobile-ev-cards,
.calc-page.acr-page .acr-mobile-show-more {
  display: none;
}

.calc-page.acr-page .acr-advanced-section {
  gap: 0;
  overflow: hidden;
  padding: 0;
}

.calc-page.acr-page .acr-advanced-section summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 30px;
  gap: 8px 12px;
  align-items: center;
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid rgba(142, 117, 74, 0.62);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8, 15, 24, 0.98), rgba(8, 17, 27, 0.98)),
    linear-gradient(90deg, rgba(246, 183, 47, 0.12), rgba(246, 183, 47, 0));
  list-style: none;
  cursor: pointer;
  box-shadow:
    inset 4px 0 0 rgba(246, 183, 47, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.calc-page.acr-page .acr-advanced-section summary:hover,
.calc-page.acr-page .acr-advanced-section summary:focus-visible {
  background:
    linear-gradient(135deg, rgba(10, 18, 28, 0.98), rgba(8, 17, 27, 0.98)),
    linear-gradient(90deg, rgba(246, 183, 47, 0.2), rgba(246, 183, 47, 0.02));
  border-color: rgba(246, 183, 47, 0.78);
  box-shadow:
    inset 4px 0 0 rgba(246, 183, 47, 0.78),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 18px rgba(246, 183, 47, 0.08);
}

.calc-page.acr-page .acr-advanced-section summary:focus-visible {
  outline: 2px solid rgba(255, 230, 163, 0.68);
  outline-offset: -4px;
}

.calc-page.acr-page .acr-advanced-section[open] summary {
  margin-bottom: 14px;
  border-color: rgba(246, 183, 47, 0.76);
  border-radius: 10px 10px 0 0;
  box-shadow:
    inset 4px 0 0 rgba(246, 183, 47, 0.78),
    inset 0 -1px 0 rgba(142, 117, 74, 0.38);
}

.calc-page.acr-page .acr-advanced-section .section-body {
  padding: 0 clamp(16px, 3vw, 20px) clamp(16px, 3vw, 20px);
}

.calc-page.acr-page .acr-advanced-summary-title {
  display: grid;
  grid-column: 1;
  gap: 2px;
  min-width: 0;
}

.calc-page.acr-page .acr-advanced-summary-title > span:first-child {
  color: var(--acr-ivory);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.12;
  text-shadow:
    0 1px 0 rgba(169, 109, 21, 0.65),
    0 0 14px rgba(246, 183, 47, 0.18);
}

.calc-page.acr-page .acr-advanced-summary-title > span:last-child {
  color: var(--acr-muted);
  font-size: 0.8rem;
  font-weight: 760;
  line-height: 1.15;
}

.calc-page.acr-page .acr-advanced-section summary::-webkit-details-marker,
.calc-page.acr-page .acr-advanced-section summary::marker {
  display: none;
}

.calc-page.acr-page .acr-advanced-section summary::after {
  content: "\25b8";
  color: var(--acr-gold-bright);
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 160ms ease;
}

.calc-page.acr-page .acr-advanced-section summary::after {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(246, 183, 47, 0.54);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(246, 183, 47, 0.16), rgba(246, 183, 47, 0.04)),
    rgba(8, 13, 21, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 14px rgba(246, 183, 47, 0.12);
}

.calc-page.acr-page .acr-advanced-section[open] summary::after {
  transform: rotate(90deg);
}

.calc-page.acr-page .acr-advanced-summary-note {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  padding: 4px 8px;
  border: 1px solid rgba(246, 183, 47, 0.48);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(246, 183, 47, 0.14), rgba(246, 183, 47, 0.04)),
    rgba(8, 13, 21, 0.42);
  color: var(--acr-gold-bright);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
}

.calc-page.acr-page .acr-pack-structure-row {
  display: block;
  min-height: 0;
  padding: 0;
}

.calc-page.acr-page .acr-pack-structure-summary {
  display: grid;
  grid-template-columns: 18px minmax(128px, 0.26fr) minmax(0, 1fr);
  gap: 12px 16px;
  align-items: start;
  padding: 14px 18px;
  list-style: none;
  background:
    linear-gradient(90deg, rgba(22, 38, 61, 0.82), rgba(10, 18, 28, 0.5)),
    rgba(8, 13, 21, 0.46);
  transition:
    background 160ms ease,
    box-shadow 160ms ease;
}

.calc-page.acr-page .acr-pack-structure-copy {
  padding: 0 18px 14px clamp(164px, 31%, 210px);
}

@media (max-width: 1149px) {
  .calc-page.acr-page .settings .section.monte-carlo-section,
  .calc-page.acr-page .monte-carlo-section {
    display: flex;
  }
}

@supports selector(.calc-page .settings .section:has(#confLevel)) {
  @media (max-width: 1149px) {
    .calc-page.acr-page .settings .section.monte-carlo-section:has(#confLevel) {
      display: flex;
    }
  }
}

@media (max-width: 799px) {
  body.calc-page.acr-page,
  .calc-page.acr-page {
    overflow-x: clip;
  }

  body.calc-page.acr-page main.wrap,
  .calc-page.acr-page .wrap,
  .calc-page.acr-page .card,
  .calc-page.acr-page .section,
  .calc-page.acr-page .summary,
  .calc-page.acr-page .main-table,
  .calc-page.acr-page .table-tools {
    min-width: 0;
  }

  .calc-page.acr-page .main-table {
    display: block;
  }

  .calc-page.acr-page #evTable {
    display: none;
  }

  .calc-page.acr-page .table-tools {
    align-items: stretch;
    position: static;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(142, 117, 74, 0.72);
    border-radius: 8px;
    background:
      linear-gradient(145deg, rgba(9, 16, 25, 0.98), rgba(7, 12, 20, 0.98)),
      radial-gradient(circle at 0 0, rgba(246, 183, 47, 0.12), transparent 32%);
    box-shadow:
      0 14px 30px rgba(0, 0, 0, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  .calc-page.acr-page .acr-green-switch,
  .calc-page.acr-page .acr-mobile-sort-controls {
    width: 100%;
  }

  .calc-page.acr-page .acr-mobile-sort-controls {
    display: grid;
    gap: 10px;
  }

  .calc-page.acr-page .acr-mobile-card-filter,
  .calc-page.acr-page .acr-mobile-sort-panel {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(142, 117, 74, 0.62);
    border-radius: 8px;
    background: rgba(8, 13, 21, 0.7);
  }

  .calc-page.acr-page .acr-mobile-sort-controls label,
  .calc-page.acr-page .acr-mobile-sort-label {
    color: var(--acr-gold-bright);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .calc-page.acr-page .acr-mobile-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .calc-page.acr-page #acrMobileCardFilter {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(142, 117, 74, 0.82);
    border-radius: 8px;
    background:
      linear-gradient(180deg, rgba(9, 16, 25, 0.98), rgba(6, 11, 18, 0.98)),
      rgba(8, 13, 21, 0.96);
    color: var(--acr-ivory);
    font: inherit;
  }

  .calc-page.acr-page #acrMobileCardFilter::placeholder {
    color: rgba(191, 201, 214, 0.72);
  }

  .calc-page.acr-page #acrMobileCardFilter:focus-visible {
    background:
      linear-gradient(180deg, rgba(12, 20, 31, 0.99), rgba(7, 12, 20, 0.99)),
      rgba(8, 13, 21, 0.98);
  }

  .calc-page.acr-page .acr-mobile-filter-clear {
    width: auto;
    min-width: 70px;
    min-height: 44px;
    padding-inline: 12px;
    border: 1px solid rgba(246, 183, 47, 0.58);
    border-radius: 8px;
    background: rgba(246, 183, 47, 0.1);
    color: var(--acr-gold-bright);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 850;
    cursor: pointer;
  }

  .calc-page.acr-page .acr-mobile-filter-clear:hover,
  .calc-page.acr-page .acr-mobile-filter-clear:focus-visible {
    border-color: rgba(255, 230, 163, 0.9);
    background: rgba(246, 183, 47, 0.18);
    color: var(--acr-gold-bright);
    outline: 2px solid rgba(255, 230, 163, 0.74);
    outline-offset: 2px;
    box-shadow: 0 0 16px rgba(246, 183, 47, 0.16);
  }

  .calc-page.acr-page .acr-mobile-filter-clear[hidden] {
    display: none;
  }

  .calc-page.acr-page .acr-mobile-filter-count {
    color: #e0e8f2;
    font-size: 0.78rem;
    font-weight: 740;
    line-height: 1.3;
  }

  .calc-page.acr-page .acr-mobile-sort-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
  }

  .calc-page.acr-page .acr-mobile-sort-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 6px;
    min-width: 0;
  }

  .calc-page.acr-page .acr-mobile-sort-option {
    width: 100%;
    min-height: 44px;
    padding: 8px 11px;
    border: 1px solid rgba(142, 117, 74, 0.72);
    border-radius: 8px;
    background:
      linear-gradient(180deg, rgba(14, 23, 35, 0.98), rgba(7, 12, 20, 0.98)),
      rgba(8, 13, 21, 0.92);
    color: var(--acr-text);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 820;
    line-height: 1.1;
    overflow-wrap: anywhere;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  .calc-page.acr-page .acr-mobile-sort-option:hover,
  .calc-page.acr-page .acr-mobile-sort-option:focus-visible {
    border-color: rgba(255, 230, 163, 0.84);
    color: var(--acr-gold-bright);
    outline: 2px solid rgba(255, 230, 163, 0.72);
    outline-offset: 2px;
    box-shadow:
      0 0 16px rgba(246, 183, 47, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .calc-page.acr-page .acr-mobile-sort-option[data-sort-state="asc"],
  .calc-page.acr-page .acr-mobile-sort-option[data-sort-state="desc"] {
    border-color: rgba(255, 230, 163, 0.96);
    background: linear-gradient(180deg, #fff0a9 0%, #f6b72f 52%, #d69012 100%);
    color: var(--acr-ink);
    text-shadow: 0 1px 0 rgba(255, 247, 212, 0.58);
    box-shadow:
      0 10px 20px rgba(214, 144, 18, 0.26),
      inset 0 1px 0 rgba(255, 247, 212, 0.78),
      inset 0 -2px 0 rgba(84, 47, 5, 0.45);
  }

  .calc-page.acr-page
    .acr-mobile-sort-option[data-sort-state="asc"]:focus-visible,
  .calc-page.acr-page
    .acr-mobile-sort-option[data-sort-state="desc"]:focus-visible {
    color: var(--acr-ink);
    outline-color: rgba(255, 250, 220, 0.92);
  }

  .calc-page.acr-page .acr-mobile-sort-direction {
    display: inline-flex;
    width: auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 94px;
    min-height: 44px;
    padding-inline: 14px;
    border: 1px solid rgba(255, 230, 163, 0.82);
    border-radius: 8px;
    background: linear-gradient(180deg, #fff0a9 0%, #f6b72f 52%, #d69012 100%);
    color: var(--acr-ink);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 850;
    cursor: pointer;
    box-shadow:
      0 10px 20px rgba(214, 144, 18, 0.24),
      inset 0 1px 0 rgba(255, 247, 212, 0.72),
      inset 0 -2px 0 rgba(84, 47, 5, 0.42);
  }

  .calc-page.acr-page .acr-mobile-sort-direction:hover,
  .calc-page.acr-page .acr-mobile-sort-direction:focus-visible {
    filter: saturate(1.08) brightness(1.04);
    outline: 2px solid rgba(255, 250, 220, 0.92);
    outline-offset: 2px;
    box-shadow:
      0 12px 24px rgba(214, 144, 18, 0.3),
      0 0 0 4px rgba(246, 183, 47, 0.14),
      inset 0 1px 0 rgba(255, 247, 212, 0.78),
      inset 0 -2px 0 rgba(84, 47, 5, 0.42);
  }

  .calc-page.acr-page .acr-mobile-sort-direction::before {
    content: "\2191";
    font-size: 1rem;
    line-height: 1;
  }

  .calc-page.acr-page
    .acr-mobile-sort-direction[data-direction="desc"]::before {
    content: "\2193";
  }

  .calc-page.acr-page .acr-mobile-ev-total {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(142, 117, 74, 0.84);
    border-radius: 8px;
    background:
      linear-gradient(90deg, rgba(68, 52, 23, 0.68), rgba(8, 15, 24, 0.94)),
      rgba(8, 15, 24, 0.92);
    color: var(--acr-muted);
    font-size: 0.9rem;
    font-weight: 750;
  }

  .calc-page.acr-page .acr-mobile-ev-total strong {
    color: var(--acr-gold-bright);
    font-size: 1rem;
  }

  .calc-page.acr-page .acr-mobile-ev-cards {
    display: grid;
    gap: 12px;
    margin-top: 12px;
  }

  .calc-page.acr-page .acr-mobile-ev-card {
    display: grid;
    gap: 12px;
    overflow: hidden;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(63, 75, 91, 0.95);
    border-left: 3px solid rgba(191, 201, 214, 0.52);
    border-radius: 8px;
    background:
      linear-gradient(145deg, rgba(10, 18, 28, 0.98), rgba(9, 15, 24, 0.96)),
      radial-gradient(circle at 0 0, rgba(246, 183, 47, 0.08), transparent 34%);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  }

  .calc-page.acr-page .acr-mobile-ev-card.ge {
    border-left-color: rgba(112, 223, 151, 0.86);
  }

  .calc-page.acr-page .acr-mobile-ev-card.lt {
    border-left-color: rgba(255, 159, 67, 0.72);
  }

  .calc-page.acr-page .acr-mobile-ev-card__head {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .calc-page.acr-page .acr-mobile-ev-card__head h4 {
    margin: 0;
    color: var(--acr-ivory);
    font-size: 1.03rem;
    line-height: 1.25;
  }

  .calc-page.acr-page .acr-mobile-ev-card__head a {
    color: inherit;
    text-decoration-color: rgba(255, 230, 163, 0.58);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }

  .calc-page.acr-page .acr-mobile-ev-card__head a:focus-visible {
    border-radius: 4px;
    color: var(--acr-gold-bright);
    outline: 2px solid rgba(255, 230, 163, 0.78);
    outline-offset: 3px;
  }

  .calc-page.acr-page .acr-mobile-ev-card__head > span,
  .calc-page.acr-page .acr-mobile-ev-card__meta {
    color: #e0e8f2;
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .calc-page.acr-page .acr-mobile-ev-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .calc-page.acr-page .acr-mobile-ev-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .calc-page.acr-page .acr-mobile-ev-metric {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 8px;
    border: 1px solid rgba(63, 75, 91, 0.78);
    border-radius: 8px;
    background: rgba(6, 12, 20, 0.48);
  }

  .calc-page.acr-page .acr-mobile-ev-metric span {
    color: #e0e8f2;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.15;
    text-transform: uppercase;
  }

  .calc-page.acr-page .acr-mobile-ev-metric strong {
    color: var(--acr-text);
    font-size: 0.98rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .calc-page.acr-page .acr-mobile-ev-metric.is-primary strong {
    color: var(--acr-gold-bright);
  }

  .calc-page.acr-page .acr-mobile-show-more:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    margin-top: 12px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 230, 163, 0.9);
    border-radius: 8px;
    background: linear-gradient(180deg, #fff0a9 0%, #f6b72f 52%, #d69012 100%);
    color: var(--acr-ink);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    text-shadow: 0 1px 0 rgba(255, 247, 212, 0.58);
    box-shadow:
      0 12px 24px rgba(214, 144, 18, 0.26),
      inset 0 1px 0 rgba(255, 247, 212, 0.78),
      inset 0 -2px 0 rgba(84, 47, 5, 0.45);
    cursor: pointer;
  }

  .calc-page.acr-page .acr-mobile-show-more:hover,
  .calc-page.acr-page .acr-mobile-show-more:focus-visible {
    color: var(--acr-ink);
    filter: saturate(1.08) brightness(1.04);
    outline: 2px solid rgba(255, 250, 220, 0.92);
    outline-offset: 2px;
    box-shadow:
      0 14px 28px rgba(214, 144, 18, 0.32),
      0 0 0 4px rgba(246, 183, 47, 0.14),
      inset 0 1px 0 rgba(255, 247, 212, 0.78),
      inset 0 -2px 0 rgba(84, 47, 5, 0.42);
  }
}

@media (max-width: 760px) {
  body.calc-page.acr-page main.wrap {
    display: flex;
    flex-direction: column;
  }

  .calc-page.acr-page .page-intro.acr-masthead {
    order: 1;
  }

  .calc-page.acr-page .calculator-settings-card {
    order: 2;
  }

  .calc-page.acr-page details.sets {
    order: 3;
  }

  .calc-page.acr-page .acr-content-snapshot {
    order: 4;
  }

  body.calc-page.acr-page.magic-ev-layout main.wrap > .us-pe-card {
    order: 5;
  }

  body.calc-page.acr-page.magic-ev-layout main.wrap > .acr-simulation-card {
    order: 6;
  }

  body.calc-page.acr-page.magic-ev-layout main.wrap > .acr-results-card {
    order: 7;
  }

  body.calc-page.acr-page.magic-ev-layout main.wrap > .acr-calculator-notes {
    order: 8;
  }

  .calc-page.acr-page .page-intro.acr-masthead::before,
  .calc-page.acr-page .page-intro.acr-masthead::after {
    opacity: 0.22;
    transform: scale(0.72);
    transform-origin: top right;
  }

  .calc-page.acr-page .acr-content-snapshot {
    padding: 18px;
  }
}

@media (max-width: 720px) {
  .calc-page.acr-page details.sets,
  body.calc-page.acr-page main.wrap details.sets {
    display: block;
  }
}

@media (max-width: 640px) {
  .calc-page.acr-page .page-intro.acr-masthead {
    gap: 10px;
    min-width: 0;
    padding: 16px 14px;
  }

  .calc-page.acr-page .acr-masthead .sub {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    justify-self: stretch;
    min-width: 0;
    width: 100%;
    margin-top: 0;
  }

  .calc-page.acr-page .acr-masthead .pill:last-child {
    grid-column: auto;
  }

  .calc-page.acr-page .acr-masthead h1 {
    max-width: 100%;
    font-size: clamp(1.64rem, 9.5vw, 2.25rem);
    line-height: 1.03;
    margin-bottom: 0;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  .calc-page.acr-page .acr-masthead p {
    max-width: 100%;
    font-size: 0.9rem;
    line-height: 1.42;
    overflow-wrap: break-word;
  }

  .calc-page.acr-page .acr-masthead .pill {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-height: 28px;
    padding: 5px 10px;
    font-size: 0.72rem;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  .calc-page.acr-page .acr-summary-card {
    max-width: none;
    gap: 10px;
    padding: 12px;
  }

  .calc-page.acr-page .acr-chart-legend {
    gap: 6px;
    justify-content: flex-start;
  }

  .calc-page.acr-page .acr-chart-legend span {
    min-height: 34px;
    padding: 5px 9px;
  }

  .calc-page.acr-page .acr-simulation-card .sim-chart-wrap {
    height: clamp(280px, 82vw, 320px);
    padding: 10px;
  }

  .calc-page.acr-page .acr-chart-readout {
    gap: 8px;
    padding: 11px;
  }

  .calc-page.acr-page .acr-chart-markers span {
    padding: 9px 10px;
  }

  .calc-page.acr-page .field-label-with-info {
    flex-wrap: wrap;
  }

  .calc-page.acr-page .field-info-wrap {
    display: contents;
  }

  .calc-page.acr-page .field-info-button {
    display: none;
  }

  .calc-page.acr-page .field-info-tooltip {
    position: static;
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--acr-muted);
    opacity: 1;
    transform: none;
  }

  .calc-page.acr-page .acr-ev-summary-table,
  .calc-page.acr-page .acr-purchase-summary-table {
    display: block;
  }

  .calc-page.acr-page .acr-ev-summary-table caption,
  .calc-page.acr-page .acr-purchase-summary-table caption {
    display: block;
    text-align: left;
  }

  .calc-page.acr-page .acr-ev-summary-table thead,
  .calc-page.acr-page .acr-purchase-summary-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .calc-page.acr-page .acr-ev-summary-table tbody,
  .calc-page.acr-page .acr-purchase-summary-table tbody {
    display: grid;
    gap: 10px;
  }

  .calc-page.acr-page .acr-ev-summary-table tbody tr,
  .calc-page.acr-page .acr-purchase-summary-table tbody tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid rgba(63, 75, 91, 0.95);
    border-radius: 8px;
    background: rgba(8, 13, 21, 0.68);
  }

  .calc-page.acr-page .acr-ev-summary-table tbody th,
  .calc-page.acr-page .acr-ev-summary-table tbody td,
  .calc-page.acr-page .acr-purchase-summary-table tbody th,
  .calc-page.acr-page .acr-purchase-summary-table tbody td {
    min-width: 0;
    border: 0;
    text-align: left;
  }

  .calc-page.acr-page .acr-ev-summary-table tbody th,
  .calc-page.acr-page .acr-purchase-summary-table tbody th {
    grid-column: 1 / -1;
    padding: 9px 10px;
    border-bottom: 1px solid rgba(63, 75, 91, 0.72);
    background: rgba(246, 183, 47, 0.08);
    color: var(--acr-ivory);
    font-weight: 800;
  }

  .calc-page.acr-page .acr-ev-summary-table tbody td,
  .calc-page.acr-page .acr-purchase-summary-table tbody td {
    display: grid;
    gap: 3px;
    padding: 8px 10px;
    color: var(--acr-gold-bright);
    font-weight: 850;
  }

  .calc-page.acr-page .acr-ev-summary-table tbody td::before,
  .calc-page.acr-page .acr-purchase-summary-table tbody td::before {
    color: var(--acr-muted);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .calc-page.acr-page .acr-ev-summary-table tbody td:nth-of-type(1)::before {
    content: "Low";
  }

  .calc-page.acr-page .acr-ev-summary-table tbody td:nth-of-type(2)::before {
    content: "Mid";
  }

  .calc-page.acr-page .acr-ev-summary-table tbody td:nth-of-type(3)::before {
    content: "High";
  }

  .calc-page.acr-page .acr-ev-summary-table tbody td[colspan] {
    grid-column: 1 / -1;
  }

  .calc-page.acr-page .acr-ev-summary-table tbody td[colspan]::before {
    content: "Value";
  }

  .calc-page.acr-page
    .acr-purchase-summary-table
    tbody
    td:nth-child(2)::before {
    content: "Low";
  }

  .calc-page.acr-page
    .acr-purchase-summary-table
    tbody
    td:nth-child(3)::before {
    content: "Mid";
  }

  .calc-page.acr-page
    .acr-purchase-summary-table
    tbody
    td:nth-child(4)::before {
    content: "High";
  }

  .calc-page.acr-page .acr-pack-structure-summary {
    grid-template-columns: 18px minmax(0, 1fr);
    min-height: 52px;
    padding: 12px 14px;
  }

  .calc-page.acr-page .acr-pack-structure-row .acr-pack-structure-summary {
    background: rgba(8, 13, 21, 0.36);
  }

  .calc-page.acr-page .acr-pack-structure-description {
    grid-column: 2 / 3;
  }

  .calc-page.acr-page .acr-pack-structure-copy {
    padding: 0 18px 14px 48px;
  }

  .calc-page.acr-page .sets-summary-subtitle {
    display: none;
  }

  .calc-page.acr-page .include-list {
    padding: 16px;
  }

  .calc-page.acr-page details.sets > summary {
    min-height: 54px;
    padding: 12px 14px;
  }

  .calc-page.acr-page .include-list label {
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid rgba(142, 117, 74, 0.42);
    border-radius: 8px;
    background: rgba(8, 13, 21, 0.42);
  }

  .calc-page.acr-page .include-list input[type="checkbox"] {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
  }

  .calc-page.acr-page .include-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .calc-page.acr-page #selectAllSets,
  .calc-page.acr-page #deselectAllSets {
    width: 100%;
    padding-inline: 10px;
    white-space: normal;
  }

  .calc-page.acr-page .acr-contributors-panel .top-ev-contributors-table-wrap {
    padding: 12px;
  }

  .calc-page.acr-page .top-ev-contributors-table,
  .calc-page.acr-page .top-ev-contributors-table tbody {
    display: block;
    width: 100%;
  }

  .calc-page.acr-page .top-ev-contributors-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .calc-page.acr-page .top-ev-contributors-table tbody {
    display: grid;
    gap: 10px;
  }

  .calc-page.acr-page .top-ev-contributors-table tbody tr {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 4px 10px;
    padding: 12px;
    border: 1px solid rgba(63, 75, 91, 0.9);
    border-radius: 8px;
    background:
      linear-gradient(145deg, rgba(10, 18, 28, 0.98), rgba(7, 13, 22, 0.98)),
      radial-gradient(circle at 0 0, rgba(246, 183, 47, 0.08), transparent 42%);
  }

  .calc-page.acr-page .top-ev-contributors-table tbody td {
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .calc-page.acr-page .top-ev-contributors-table tbody td:nth-child(1),
  .calc-page.acr-page .top-ev-contributors-table tbody td:nth-child(2),
  .calc-page.acr-page .top-ev-contributors-table tbody td:nth-child(3),
  .calc-page.acr-page .top-ev-contributors-table tbody td:nth-child(4) {
    width: auto;
  }

  .calc-page.acr-page
    .top-ev-contributors-table
    tbody
    td:first-child:not(.top-ev-contributors-empty) {
    grid-row: 1 / span 3;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-top: 2px;
    border: 1px solid rgba(142, 117, 74, 0.84);
    border-radius: 999px;
    background: rgba(246, 183, 47, 0.1);
    color: var(--acr-gold-bright);
    font-weight: 850;
  }

  .calc-page.acr-page .top-ev-contributors-table tbody td:nth-child(2) {
    display: grid;
    gap: 2px;
    color: var(--acr-ivory);
    font-weight: 850;
  }

  .calc-page.acr-page .top-ev-contributors-table tbody td:nth-child(2) strong,
  .calc-page.acr-page
    .top-ev-contributors-table
    tbody
    td:nth-child(2)
    .acr-top-contributor-detail {
    display: block;
    min-width: 0;
  }

  .calc-page.acr-page .top-ev-contributors-table tbody td:nth-child(3),
  .calc-page.acr-page .top-ev-contributors-table tbody td:nth-child(4) {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 7px;
    margin-top: 4px;
    border-top: 1px solid rgba(63, 75, 91, 0.66);
    color: var(--acr-text);
    font-weight: 800;
  }

  .calc-page.acr-page .top-ev-contributors-table tbody td:nth-child(3)::before,
  .calc-page.acr-page .top-ev-contributors-table tbody td:nth-child(4)::before {
    color: var(--acr-muted);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .calc-page.acr-page .top-ev-contributors-table tbody td:nth-child(3)::before {
    content: "Avg / box";
  }

  .calc-page.acr-page .top-ev-contributors-table tbody td:nth-child(4)::before {
    content: "Value / box";
  }

  .calc-page.acr-page .top-ev-contributors-table .top-ev-contributors-empty {
    grid-column: 1 / -1;
    width: auto;
    padding: 10px;
    color: var(--acr-muted);
    line-height: 1.35;
    overflow-wrap: normal;
  }
}

@media (max-width: 380px) {
  .calc-page.acr-page .acr-ev-summary-table tbody tr,
  .calc-page.acr-page .acr-purchase-summary-table tbody tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calc-page.acr-page .acr-ev-summary-table tbody th,
  .calc-page.acr-page .acr-purchase-summary-table tbody th {
    order: 0;
  }

  .calc-page.acr-page .acr-ev-summary-table tbody td,
  .calc-page.acr-page .acr-purchase-summary-table tbody td {
    order: 2;
  }

  .calc-page.acr-page .acr-ev-summary-table tbody td:nth-of-type(2),
  .calc-page.acr-page .acr-purchase-summary-table tbody td:nth-of-type(2),
  .calc-page.acr-page .acr-ev-summary-table tbody td[colspan] {
    grid-column: 1 / -1;
    order: 1;
    background: rgba(246, 183, 47, 0.06);
  }
}

@media (max-width: 420px) {
  .calc-page.acr-page .acr-mobile-ev-metrics,
  .calc-page.acr-page .acr-snapshot-stats,
  .calc-page.acr-page .acr-chart-markers {
    grid-template-columns: 1fr;
  }

  .calc-page.acr-page .acr-mobile-filter-row,
  .calc-page.acr-page .acr-mobile-sort-header {
    grid-template-columns: 1fr;
  }

  .calc-page.acr-page .acr-mobile-filter-clear,
  .calc-page.acr-page .acr-mobile-sort-direction {
    width: 100%;
  }

  .calc-page.acr-page .acr-advanced-section summary {
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 6px 10px;
    min-height: 66px;
  }

  .calc-page.acr-page .acr-advanced-summary-note {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .calc-page.acr-page .acr-advanced-section summary::after {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 34px;
    height: 34px;
  }

  .calc-page.acr-page .include-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px), (max-width: 1024px) and (max-height: 520px) {
  .calc-page.acr-page .acr-masthead h1 {
    text-align: center;
  }
}

@media (max-width: 430px) {
  .calc-page.acr-page .site-header .global-nav .nav-menu,
  .calc-page.acr-page .site-footer .global-nav .nav-menu {
    gap: 6px;
  }

  .calc-page.acr-page .site-header .global-nav .nav-link,
  .calc-page.acr-page .site-footer .global-nav .nav-link {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 0.82rem;
    line-height: 1.15;
    white-space: normal;
  }

  .calc-page.acr-page .site-footer {
    padding-inline: 12px;
  }

  .calc-page.acr-page .site-footer .small.muted {
    font-size: 0.88rem;
    line-height: 1.3;
  }
}

@media (max-width: 360px) {
  .calc-page.acr-page {
    overflow-x: clip;
  }

  body.calc-page.acr-page main.wrap,
  .calc-page.acr-page .wrap {
    padding-inline: 10px;
  }

  .calc-page.acr-page .site-header {
    padding-inline: 8px;
  }

  .calc-page.acr-page .site-header .global-nav .nav-link,
  .calc-page.acr-page .site-footer .global-nav .nav-link {
    min-height: 40px;
    padding: 7px 8px;
    font-size: 0.74rem;
  }

  .calc-page.acr-page .page-intro.acr-masthead {
    padding: 14px 12px;
  }

  .calc-page.acr-page .acr-masthead h1 {
    max-width: 100%;
    font-size: 1.5rem;
    line-height: 1.06;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  .calc-page.acr-page .acr-masthead p {
    font-size: 0.82rem;
    overflow-wrap: break-word;
  }

  .calc-page.acr-page .acr-masthead .pill {
    display: flex;
    padding-inline: 8px;
    font-size: 0.6rem;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .calc-page.acr-page .acr-summary-card {
    padding: 10px;
  }
}

/* Shared Magic EV mobile summary: keep the masthead snapshot concise and scannable. */
@media (max-width: 620px) {
  body.calc-page.acr-page.magic-ev-layout .acr-summary-card {
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
  }

  body.calc-page.acr-page.magic-ev-layout .acr-masthead .snapshot-basis-card {
    gap: 4px;
  }

  body.calc-page.acr-page.magic-ev-layout
    .acr-masthead
    .snapshot-basis-card
    strong {
    font-size: clamp(1.08rem, 5vw, 1.3rem);
    line-height: 1.12;
  }

  body.calc-page.acr-page.magic-ev-layout
    .acr-masthead
    .snapshot-basis-card
    span:last-child {
    font-size: 0.82rem;
    line-height: 1.38;
  }

  body.calc-page.acr-page.magic-ev-layout .acr-quick-summary {
    gap: 8px;
    padding-top: 12px;
  }

  body.calc-page.acr-page.magic-ev-layout .acr-quick-summary h2 {
    font-size: 0.95rem;
  }

  body.calc-page.acr-page.magic-ev-layout .acr-quick-summary dl {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }

  body.calc-page.acr-page.magic-ev-layout .acr-quick-summary__metric {
    grid-template-columns: 1fr;
    grid-column: span 2;
    gap: 4px;
    min-width: 0;
    padding: 10px 8px;
    border: 1px solid rgba(142, 117, 74, 0.5);
    border-radius: 8px;
    background:
      linear-gradient(145deg, rgba(12, 21, 32, 0.96), rgba(7, 13, 21, 0.96)),
      radial-gradient(
        circle at 100% 0,
        rgba(246, 183, 47, 0.08),
        transparent 64%
      );
    text-align: center;
  }

  body.calc-page.acr-page.magic-ev-layout .acr-quick-summary__metric--primary {
    grid-column: span 3;
    border-top: 1px solid rgba(142, 117, 74, 0.5);
    text-align: left;
  }

  body.calc-page.acr-page.magic-ev-layout .acr-quick-summary__metric--mid {
    border-color: rgba(246, 183, 47, 0.82);
    background:
      linear-gradient(145deg, rgba(54, 39, 14, 0.88), rgba(10, 18, 28, 0.98)),
      radial-gradient(
        circle at 50% 0,
        rgba(246, 183, 47, 0.18),
        transparent 70%
      );
    box-shadow: inset 0 1px 0 rgba(255, 230, 163, 0.12);
  }

  body.calc-page.acr-page.magic-ev-layout .acr-quick-summary dt {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  body.calc-page.acr-page.magic-ev-layout .acr-quick-summary dd {
    min-width: 0;
    color: var(--acr-gold-bright);
    font-size: clamp(0.98rem, 4.5vw, 1.12rem);
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
  }

  body.calc-page.acr-page.magic-ev-layout
    .acr-quick-summary__metric--primary
    dd {
    text-align: left;
  }
}

@media (max-width: 430px) {
  body.calc-page.acr-page.magic-ev-layout .acr-quick-summary__metric--primary {
    order: 1;
  }

  body.calc-page.acr-page.magic-ev-layout .acr-quick-summary__metric--mid {
    grid-column: 1 / -1;
    order: 2;
  }

  body.calc-page.acr-page.magic-ev-layout .acr-quick-summary__metric--low,
  body.calc-page.acr-page.magic-ev-layout .acr-quick-summary__metric--high {
    grid-column: span 3;
    order: 3;
  }
}

/* Hide the Basis column in all Sealed Price / EV tables */
#usPeTable thead th:last-child,
#peNoteManaPool,
#peNoteTcgplayer,
#peNoteEbay,
#peNoteAmazon,
#peNoteStore {
  display: none;
}

@media (max-width: 600px) {
  .calc-page .tev-store-sales-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .calc-page .tev-store-sales-button {
    width: 100%;
    white-space: normal;
  }

  .calc-page :is(#usPeTable, #sealedPriceTable) {
    display: block;
    border-collapse: separate;
    border-spacing: 0;
  }

  .calc-page :is(#usPeTable, #sealedPriceTable) caption {
    display: block;
    text-align: left;
  }

  .calc-page :is(#usPeTable, #sealedPriceTable) thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .calc-page :is(#usPeTable, #sealedPriceTable) tbody {
    display: grid;
    gap: 8px;
  }

  .calc-page :is(#usPeTable, #sealedPriceTable) tbody tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: var(--border);
    border-radius: 10px;
    background: rgba(9, 12, 18, 0.28);
    overflow: hidden;
  }

  .calc-page :is(#usPeTable, #sealedPriceTable) tbody tr[hidden] {
    display: none;
  }

  .calc-page :is(#usPeTable, #sealedPriceTable) tbody th,
  .calc-page :is(#usPeTable, #sealedPriceTable) tbody td {
    border: 0;
    min-width: 0;
    padding: 8px;
    text-align: left;
  }

  .calc-page :is(#usPeTable, #sealedPriceTable) tbody th {
    grid-column: 1 / -1;
    border-bottom: var(--border);
    background: rgba(122, 162, 255, 0.08);
  }

  .calc-page :is(#usPeTable, #sealedPriceTable) tbody td {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.25;
  }

  .calc-page :is(#usPeTable, #sealedPriceTable) tbody td::before {
    color: var(--muted);
    content: "";
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .calc-page
    :is(#usPeTable, #sealedPriceTable)
    tbody
    td:nth-of-type(1)::before {
    content: "Box price";
  }

  .calc-page #sealedPriceTable tbody td:nth-of-type(1)::before {
    content: "Product price";
  }

  .calc-page
    :is(#usPeTable, #sealedPriceTable)
    tbody
    td:nth-of-type(2)::before {
    content: "Break-even";
  }

  .calc-page
    :is(#usPeTable, #sealedPriceTable)
    tbody
    td:nth-of-type(3)::before {
    content: "P/E";
  }

  .calc-page :is(#usPeTable, #sealedPriceTable) tbody td:nth-of-type(4) {
    display: none;
  }
}

/* Keep specialty topper breakdowns usable without clipping the page on compact screens. */
@media (max-width: 799px) {
  body.calc-page.acr-page.magic-ev-layout .acr-topper-table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }

  body.calc-page.acr-page.magic-ev-layout
    .acr-topper-table-scroll:focus-visible {
    outline: 2px solid rgba(246, 183, 47, 0.72);
    outline-offset: 2px;
  }

  body.calc-page.acr-page.magic-ev-layout
    .acr-topper-table-scroll
    #topperTable {
    width: max-content;
    min-width: 620px;
    margin: 0;
  }
}

/* Specialty product value tables: contain wide legacy breakdowns on compact screens. */
@media (max-width: 799px) {
  body.calc-page.acr-page.magic-ev-layout .acr-specialty-table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }

  body.calc-page.acr-page.magic-ev-layout
    .acr-specialty-table-scroll:focus-visible {
    outline: 2px solid rgba(246, 183, 47, 0.72);
    outline-offset: 2px;
  }

  body.calc-page.acr-page.magic-ev-layout .acr-specialty-table-scroll table {
    width: max-content;
    min-width: 480px;
    margin: 0;
  }
}

.calc-page .tev-calculator-data-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-block: 18px;
  border: 1px solid rgba(239, 91, 91, 0.7);
  background: linear-gradient(
    135deg,
    rgba(91, 20, 28, 0.96),
    rgba(31, 12, 18, 0.98)
  );
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.calc-page .tev-calculator-data-error__copy {
  min-width: 0;
}

.calc-page .tev-calculator-data-error h2 {
  margin: 0 0 6px;
  color: #fff0f0;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.calc-page .tev-calculator-data-error p {
  margin: 0;
  color: rgba(255, 240, 240, 0.88);
  overflow-wrap: anywhere;
}

.calc-page .tev-calculator-data-error__retry {
  flex: 0 0 auto;
}

@media (max-width: 600px) {
  .calc-page .tev-calculator-data-error {
    align-items: stretch;
    flex-direction: column;
  }

  .calc-page .tev-calculator-data-error__retry {
    width: 100%;
  }
}

/* Hide the detailed snapshot only in portrait mobile layouts. */
@media (max-width: 799px) and (orientation: portrait) {
  .calc-page .acr-content-snapshot {
    display: none;
  }
}
