body:has(.money-redesign) {
  background: var(--soft, #f5f7fa);
}

.money-redesign {
  --money-teal: #007b71;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 26px 54px;
  color: var(--ink, #172438);
}

.money-heading {
  margin: 0 auto 28px;
  text-align: center;
}

.money-heading h1 {
  margin: 0 0 9px;
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.15;
}

.money-heading > p {
  max-width: 60ch;
  margin: auto;
  color: var(--ink2, #495d76);
  font-size: 16px;
}

.money-nav {
  display: flex;
  justify-content: center;
  padding: 18px 8px 0;
}

.money-nav .jump {
  position: static;
  max-width: 100%;
  padding: 0;
  margin: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

.money-nav .jump-in {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  background: color-mix(in srgb, var(--line, #dce5ee) 48%, var(--panel, #fff));
  border: 0;
  border-radius: 13px;
}

.money-nav .jump-in a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 7px clamp(8px, 2.4vw, 22px);
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink2, #495d76);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.money-nav .jump-in a[aria-current] {
  background: var(--panel, #fff);
  color: var(--ink, #172438);
  border-color: var(--line, #dce5ee);
  box-shadow: 0 2px 4px #132b4219;
}

.money-redesign #rp.money-content {
  display: grid;
  min-width: 0;
  margin: 0;
  gap: 22px;
}

.money-content h2, .money-content h3 {
  letter-spacing: -.018em;
  text-wrap: pretty;
}

.money-content .money-card {
  min-width: 0;
  padding: clamp(15px, 3vw, 26px);
  background: var(--panel, #fff);
  border: 1px solid var(--line, #dce5ee);
  border-radius: 20px;
  box-shadow: 0 3px 12px #152e4508;
}

.money-content .money-card > :first-child {
  margin-top: 0;
}

.money-content .money-card > :last-child {
  margin-bottom: 0;
}

.money-content .money-grid {
  display: grid;
  gap: 14px;
}

.money-content .money-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.money-section > h2, .money-related > h2 {
  margin: 0 0 10px;
  font-size: 19px;
}

.money-content .money-reading, .money-content .money-tool {
  position: relative;
  display: grid;
  color: inherit;
  text-decoration: none;
}

.money-content a.money-card:hover {
  border-color: var(--accent, #00877e);
}

.money-reading {
  gap: 4px;
}

.money-reading .money-icon {
  margin-bottom: 6px;
}

.money-reading-label {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink2, #495d76);
}

.money-reading strong {
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

/* no-pills: the card icon stands bare and a little larger, no tinted or filled square */
.money-icon {
  display: inline-grid;
  place-items: start;
  color: var(--money-teal);
}
.money-icon .i { width: 26px; height: 26px; stroke-width: 1.8; }

.money-reading .money-arrow {
  position: absolute;
  top: clamp(15px, 3vw, 26px);
  right: clamp(15px, 3vw, 26px);
}

.money-arrow {
  color: var(--money-teal);
}

.money-tool {
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;
}

.money-tool small, .money-reading small {
  display: block;
  margin-top: 3px;
  color: var(--ink2, #495d76);
  font-size: 13px;
}

.money-related .money-tool {
  width: min(100%, 450px);
}

.money-content :is(input, select) {
  min-width: 0;
  max-width: 100%;
}

.money-redesign .money-content .btn.primary {
  background: var(--money-teal);
  border-color: var(--money-teal);
  color: #fff;
}

.money-redesign .money-content .btn.primary:hover {
  background: #00665e;
  border-color: #00665e;
}

.money-content :is(a, button, input, select):focus-visible,
.money-nav a:focus-visible {
  outline: 2px solid var(--accent, #00877e);
  outline-offset: 2px;
}

.money-inline-note {
  margin: 16px 0;
  padding: 16px;
  background: var(--panel, #fff);
  border: 1px solid var(--line, #dce5ee);
  border-radius: 14px;
}

.money-inline-note > .money-inline-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

@media (max-width: 650px) {
  .money-redesign {
    padding: 24px 12px 36px;
  }

  .money-heading {
    margin-bottom: 21px;
  }

  .money-heading > p {
    font-size: 14px;
  }

  .money-nav {
    padding-inline: 0;
  }

  .money-nav .jump-in a {
    font-size: 13px;
  }

  .money-content .money-three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .money-nav .jump {
    width: min(100%, 340px);
  }

  .money-nav .jump-in {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Money look, 22 Nov 2026 (research/pages/money_look.py): one hero number, colour chips, bars, plain-words boxes ---------- */
.ml-teal { --t: var(--teal, #148B83); }
.ml-gold { --t: var(--s-gold, #A8842C); }
.ml-green { --t: var(--up, #2F6B2C); }
.ml-red { --t: var(--down, #B34040); }
.ml-blue { --t: var(--sale, #0B6FA4); }

.ml-hero {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin: 0 0 18px;
  padding: clamp(18px, 3.4vw, 30px);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--s-gold, #A8842C) 13%, transparent) 0%, transparent 55%),
    linear-gradient(135deg, color-mix(in srgb, var(--t) 15%, var(--panel, #fff)) 0%, var(--panel, #fff) 72%);
  border: 1px solid color-mix(in srgb, var(--t) 30%, var(--line, #dce3e9));
  border-radius: 22px;
  box-shadow: 0 6px 22px color-mix(in srgb, var(--t) 10%, transparent);
  color: var(--ink, #142237);
}
.ml-badge {
  display: inline-grid;
  flex: none;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--t), color-mix(in srgb, var(--t) 72%, #000));
  border-radius: 15px;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--t) 35%, transparent);
}
.ml-hero-text { min-width: 0; }
.ml-hero .ml-kicker {
  margin: 0 0 2px;
  color: var(--t);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ml-hero .ml-big {
  margin: 0;
  color: var(--ink, #142237);
  font-size: clamp(38px, 7vw, 60px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.ml-hero .ml-meaning {
  max-width: 52ch;
  margin: 8px 0 0;
  font-size: clamp(16px, 2.2vw, 19px);
  font-weight: 550;
  line-height: 1.45;
}
.ml-hero .ml-when {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 10px 0 0;
  color: var(--muted, #4A5A6E);
  font-size: 13px;
}

.ml-means {
  margin: 14px 0;
  padding: 14px 18px;
  background: var(--warn-soft, #FBF3E0);
  border: 1px solid color-mix(in srgb, var(--s-gold, #A8842C) 30%, transparent);
  border-left: 5px solid var(--s-gold, #A8842C);
  border-radius: 14px;
}
.ml-means p { margin: 4px 0 0; line-height: 1.5; }
.ml-means .ml-means-title {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 2px;
  color: var(--warn, #8A5A00);
  font-size: 14px;
  font-weight: 750;
}

.ml-h {
  display: flex;
  gap: 11px;
  align-items: center;
  margin: 0 0 10px;
}
/* no-pills: the heading icon stands bare in the tone colour, no tinted square behind it */
.ml-chip {
  display: inline-grid;
  flex: none;
  place-items: center;
  color: color-mix(in srgb, var(--t) 82%, var(--ink, #142237));
}
.ml-chip .i { width: 22px; height: 22px; stroke-width: 2; }
/* the hero's icon, bare in front of its kicker (no gradient tile) */
.ml-mark { display: inline-grid; flex: none; place-items: center; color: color-mix(in srgb, var(--t) 72%, var(--ink, #142237)); }
.ml-hero .ml-kicker, .ml-hero .ml-title { display: flex; align-items: center; gap: 8px; }
.ml-hero .ml-title { gap: 10px; }

.ml-bars {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}
.ml-bars li {
  display: grid;
  grid-template-columns: minmax(110px, 30%) 1fr auto;
  gap: 12px;
  align-items: center;
}
.ml-bn { font-size: 14px; font-weight: 650; }
.ml-bt {
  position: relative;
  height: 14px;
  background: var(--inset, #EEF1F5);
  border-radius: 99px;
}
.ml-bf {
  display: block;
  height: 100%;
  min-width: 4px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--t) 70%, var(--panel, #fff)), var(--t));
  border-radius: 99px;
}
.ml-start {
  position: absolute;
  top: -4px;
  bottom: -4px;
  z-index: 1;
  width: 2px;
  background: var(--ink, #142237);
  opacity: .55;
}
.ml-bv { min-width: 64px; color: var(--t); font-size: 16px; text-align: right; }

.ml-fold {
  margin: 12px 0 0;
  border-top: 1px solid var(--line, #dce3e9);
}
.ml-fold > summary {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 44px;
  color: var(--muted, #4A5A6E);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.ml-fold > summary::-webkit-details-marker { display: none; }
.ml-fold > summary::after { content: "+"; margin-left: auto; font-size: 18px; }
.ml-fold[open] > summary::after { content: "\2212"; }
.ml-fold-in { padding: 0 0 12px; color: var(--muted, #4A5A6E); font-size: 13px; line-height: 1.55; }
.ml-fold-in :is(p, ul) { margin: 6px 0; }

/* the snapshot and tool cards on Money's first page: each its own colour */
.money-content .ml-tint { --t: var(--teal, #148B83); }
.money-content .ml-tint.ml-gold { --t: var(--s-gold, #A8842C); }
.money-content .ml-tint.ml-blue { --t: var(--sale, #0B6FA4); }
.money-content .ml-tint.ml-red { --t: var(--down, #B34040); }
.money-content .ml-tint.ml-green { --t: var(--up, #2F6B2C); }
.money-content .ml-tint {
  background: linear-gradient(160deg, color-mix(in srgb, var(--t) 9%, var(--panel, #fff)), var(--panel, #fff) 60%);
  border-top: 4px solid var(--t);
}
.money-content .ml-tint .money-icon { color: color-mix(in srgb, var(--t) 82%, var(--ink, #142237)); background: none; }
.money-content .ml-tint .money-arrow { color: var(--t); }

@media (max-width: 650px) {
  .ml-hero { flex-direction: column; gap: 12px; }
  .ml-badge { width: 44px; height: 44px; border-radius: 13px; }
}
/* no-pills (Jason, 22 Nov): related pages are plain bold links with an arrow, the way ClearAlgo links, not teal capsules */
.money-redesign .wm-rel, .money-redesign .mc-links { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.money-redesign .wm-rel a, .money-redesign .mc-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  color: color-mix(in srgb, var(--teal, #148B83) 78%, var(--ink, #142237));
  font-weight: 700;
  text-decoration: none;
}
.money-redesign .wm-rel a:hover, .money-redesign .mc-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.money-redesign .wm-rel a::after, .money-redesign .mc-links a::after { content: "\2192"; margin-left: 8px; transition: transform .15s; }
.money-redesign .wm-rel a:hover::after, .money-redesign .mc-links a:hover::after { transform: translateX(3px); }
.ml-note { margin: 4px 0 0; color: var(--muted, #4A5A6E); font-size: 13px; }
.money-cash-answer.ml-red .wm-big { color: var(--down, #B34040); }
.money-cash-answer.ml-green .wm-big { color: var(--up, #2F6B2C); }
.ml-hero .ml-title { margin: 0 0 6px; font-size: clamp(26px, 4vw, 34px); font-weight: 780; letter-spacing: -.03em; line-height: 1.12; }
.money-inline-note:has(> .ml-fold) { padding: 0 16px; }
.money-inline-note > .ml-fold { margin: 0; border-top: 0; }
.money-content .money-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.money-heading.ml-top { margin-top: 30px; }
#rp.wm > .ml-hero:first-child { margin-top: 28px; }
body:has(.ml-hero) { background: var(--soft, #f5f7fa); }
/* no-pills: the hero's one link is bold words and an arrow in the tone colour, not a filled capsule */
.ml-hero > .ml-link {
  align-self: center;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  font-size: 16px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.ml-hero > .ml-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.ml-hero > .ml-link::after { content: "\2192"; margin-left: 8px; transition: transform .15s; }
.ml-hero > .ml-link:hover::after { transform: translateX(3px); }
#rp .money-cash-answer.ml-red .wm-big { color: var(--down, #B34040); }
#rp .money-cash-answer.ml-green .wm-big { color: var(--up, #2F6B2C); }
/* the topic pages' answer cards: each its own colour down the side */
body:has(.ml-hero) .wm-folds > .wm-open { --t: var(--teal, #148B83); margin: 12px 0; padding-left: 14px; border-left: 4px solid var(--t); border-radius: 3px; }
body:has(.ml-hero) .wm-folds > .wm-open:nth-child(5n+2) { --t: var(--s-gold, #A8842C); }
body:has(.ml-hero) .wm-folds > .wm-open:nth-child(5n+3) { --t: var(--sale, #0B6FA4); }
body:has(.ml-hero) .wm-folds > .wm-open:nth-child(5n+4) { --t: var(--down, #B34040); }
body:has(.ml-hero) .wm-folds > .wm-open:nth-child(5n+5) { --t: var(--up, #2F6B2C); }
body:has(.ml-hero) .wm-folds > .wm-open .wm-dot { background: var(--t); }
@media (max-width: 650px) {
  .money-content .money-two { grid-template-columns: 1fr; }
  .ml-hero > .ml-link { align-self: flex-start; margin-left: 0; }
  .ml-bars li { grid-template-columns: 1fr auto; grid-template-areas: "n v" "b b"; gap: 6px 10px; }
  .ml-bars .ml-bn { grid-area: n; }
  .ml-bars .ml-bv { grid-area: v; }
  .ml-bars .ml-bt { grid-area: b; }
}
/* readable colour text: the tone mixed toward the ink (darker in light mode, lighter in dark mode) */
.ml-hero .ml-kicker, .ml-bv, .money-content .ml-tint .money-arrow { color: color-mix(in srgb, var(--t) 72%, var(--ink, #142237)); }
.ml-hero > .ml-link { color: color-mix(in srgb, var(--t) 72%, var(--ink, #142237)); }
p + .ml-hero { margin-top: 14px; }
body:has(.ml-hero) .wm-folds > .wm-open { padding-left: 18px; }
body:has(.ml-hero) #rp .wm-folds > .wm-open { padding-left: 16px; }
/* Scenarios on a phone (was already broken on live): the figure tiles stack their words, and the two mode tabs wrap instead of running off the screen */
.ds #rp.wc .wc-tiles .tl { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.ds #rp.wc .wc-tiles .tl :is(dt, dd) { margin: 0; overflow-wrap: anywhere; }
.ds #rp.wc .jump .jump-in { flex-wrap: wrap; }
.ds #rp.wc .jump .jump-in { gap: 4px; padding: 5px; background: color-mix(in srgb, var(--line, #dce5ee) 48%, var(--panel, #fff)); border: 0; border-radius: 13px; }
.ds #rp.wc .jump .jump-in a { min-height: 44px; display: inline-flex; align-items: center; padding: 7px 14px; border: 1px solid transparent; border-radius: 9px; }
.ds #rp.wc .jump .jump-in a[aria-current] { background: var(--panel, #fff); color: var(--ink, #142237); border-color: var(--line, #dce5ee); box-shadow: 0 2px 4px #132b4219; }
