/* ============================================================================
   HOMEPAGE — decathlon calculator section. Additive: loaded only by index.html
   after styles-v4.css, so nothing shared needed a version bump. Prefix: dx-
   Mirrors the Checkpoint section (picture left, words right) so the page
   alternates as it scrolls.
   ========================================================================== */
.decathlon-home { border-top: 1px solid var(--hairline); }

.dx-grid { display: grid; gap: var(--space-5); align-items: center; }
@media (min-width: 900px) {
  .dx-grid { grid-template-columns: 5fr 7fr; }
  .dx-visual { order: -1; }          /* picture on the left on desktop, under the words on phones */
}
.dx-visual { display: flex; justify-content: center; }

/* the stylised card (not the real tool) — same family as .cp-screen */
.dx-card {
  width: min(84vw, 320px);
  padding: 1.25rem 1.1rem 1.3rem;
  background: linear-gradient(165deg, #141926 0%, #0C0F16 70%);
  border: 1px solid var(--hairline);
  border-radius: 26px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
  transition: transform 400ms var(--ease), box-shadow 400ms var(--ease);
}
.dx-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.85), 0 0 60px -20px rgba(96, 140, 255, 0.25);
}

.dx-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.dx-card-top span:first-child { color: var(--blue); }

.dx-total {
  margin: var(--space-2) 0 var(--space-2);
  padding: 0.9rem 1rem;
  text-align: center;
  border: 1px dashed rgba(138, 180, 255, 0.35);
  border-radius: 14px;
  background: rgba(96, 140, 255, 0.06);
}
.dx-total-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.3rem;
}
.dx-total-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.dx-total-vs { display: block; margin-top: 0.4rem; font-size: 0.72rem; color: var(--text-3); }
.dx-up   { color: #7fe0a0; font-weight: 600; }
.dx-down { color: #ff9c9c; font-weight: 600; }

.dx-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.dx-rows li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hairline);
  font-size: 0.78rem;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.dx-rows li b { color: var(--text); font-weight: 600; }
.dx-rows li em { font-style: normal; min-width: 2.2rem; text-align: right; font-size: 0.72rem; }

/* ============================================================================
   PHONES ONLY (v3): each section — words, button AND picture — fits on one
   phone screen. Text stays full width and the picture stays underneath, just
   smaller, with less empty space above and below the section.
   Nothing at >= 900px changes.
   `zoom` (not transform) so the shrunken card takes its shrunken space; a
   browser without it just shows the card at its normal size.
   ========================================================================== */
@media (max-width: 899px) {
  .section.checkpoint,
  .section.decathlon-home { padding-block: 3rem; }

  .cp-grid,
  .dx-grid { gap: 1.75rem; }

  .cp-screen,
  .dx-card { width: 300px; zoom: 0.6; }
}

/* shorter phones: shrink a little more so it still fits */
@media (max-width: 899px) and (max-height: 760px) {
  .section.checkpoint,
  .section.decathlon-home { padding-block: 2rem; }
  .cp-grid,
  .dx-grid { gap: 1.25rem; }
  .cp-screen,
  .dx-card { zoom: 0.5; }
}
