/* Home page: a scroll-craft build ("a round of the game").
   The engine (vendor/scrollcraft) is untouched; this file themes its tokens and styles the
   page's own markup. Brief, score and decisions: scrollcraft/builds/buffett-home/BRIEF.md */

:root {
  --sc-canvas: #f2ede3;
  --sc-surface: #ffffff;
  --sc-ink: #172036;
  --sc-ink-soft: #4f586b;
  --sc-accent: #ee8419;
  --sc-accent-ink: #ffffff;
  --sc-font-display: "Fredoka", system-ui, sans-serif;
  --sc-font-text: "Nunito", system-ui, sans-serif;
  /* Light canvas: shadows halved and tinted to the ground, edge light inverted. */
  --sc-shadow-color: 30 25% 30%;
  --sc-edge: inset 0 1px 0 rgba(255, 255, 255, .7);
}
body.is-home { background: var(--sc-canvas); }
.is-home .footer { display: none; }
.h-page section { padding: 0; }
.h-page .sc-section { padding-block: clamp(48px, 7vw, 88px); }
.h-wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.h-h2 { font-family: var(--head); font-weight: 600; font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.06; letter-spacing: -.02em; margin: 0 0 .45em; text-wrap: balance; }
.h-h3 { font-family: var(--head); font-weight: 600; font-size: 1.3rem; }
.h-body { color: var(--ink-2); font-size: 1.08rem; max-width: 52ch; text-wrap: pretty; }
.h-page .sc-stage { height: 100svh; }
.h-plane, .h-plane svg, .h-buffett img { max-width: none; }

/* ---------- 1. Hero: four planes, each at its own rate ---------- */
.h-hero { --hp: clamp(0, calc((var(--sc-p, .5) - .5) * 2), 1); }
.h-stage { position: relative; height: calc(100svh - 64px); min-height: 560px; overflow: hidden; }
.h-plane { position: absolute; pointer-events: none; }
.h-far {
  inset: -4% 0 0;
  background:
    radial-gradient(52% 64% at 74% 42%, #e6eefd 0%, rgba(230, 238, 253, 0) 70%),
    radial-gradient(38% 46% at 16% 92%, #fbe9d4 0%, rgba(251, 233, 212, 0) 72%),
    repeating-linear-gradient(to bottom, transparent 0 47px, rgba(23, 32, 54, .045) 47px 48px);
  transform: translate3d(0, calc(var(--hp, 0) * -24px), 0);
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
.h-ring { right: calc(15vw - 120px); top: 12svh; width: min(64svh, 560px); transform: translate3d(0, calc(var(--hp, 0) * -70px), 0) rotate(calc(var(--hp, 0) * 24deg)); }
.h-ring svg { width: 100%; height: auto; display: block; }
.h-copy { position: absolute; z-index: 4; left: clamp(16px, 6vw, 96px); top: 50%; translate: 0 -46%; width: min(40rem, 46vw); }
.h-title { font-family: var(--head); font-weight: 700; font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: 1; letter-spacing: -.03em; margin: 0 0 18px; text-wrap: balance; }
.h-title .hl { color: var(--blue); }
.h-lead { font-size: 1.18rem; color: var(--ink-2); max-width: 34ch; margin: 0 0 26px; }
.h-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.h-buffett { position: absolute; z-index: 5; margin: 0; right: 15vw; bottom: 7svh; transform: translate3d(0, calc(var(--hp, 0) * -40px), 0) scale(calc(1 + var(--hp, 0) * .04)); transform-origin: 50% 100%; }
.h-buffett img { height: min(74svh, 660px); width: auto; display: block; }
.h-contact { position: absolute; left: 20%; right: 20%; bottom: -8px; height: 20px; border-radius: 50%; background: rgba(23, 32, 54, .14); filter: blur(5px); }
.h-front { z-index: 6; inset: 0; transform: translate3d(0, calc(var(--hp, 0) * -170px), 0); }
.h-vcard { position: absolute; pointer-events: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 208px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-3); color: var(--ink); text-decoration: none; transition: box-shadow .18s; }
.h-vcard:hover { box-shadow: 0 30px 60px -24px rgba(23, 32, 54, .45); }
.h-vcard__top { display: flex; justify-content: space-between; align-items: baseline; width: 100%; }
.h-vcard__top strong { font-family: var(--head); font-size: 1.3rem; }
.h-vcard__score { font-family: var(--head); font-weight: 700; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.h-vcard__score small { font-size: .7rem; color: var(--muted); margin-left: 2px; }
.h-vcard.c0 { right: calc(15vw + 250px); bottom: 20svh; rotate: -2deg; }
.h-vcard.c1 { right: 3vw; bottom: 38svh; rotate: 2deg; }
.h-vcard.c2 { right: calc(15vw - 110px); bottom: 4svh; rotate: -1deg; }
.h-fiction { position: absolute; z-index: 8; right: 16px; bottom: 10px; margin: 0; font-size: .76rem; color: var(--muted); }

@media (max-width: 760px) {
  .h-copy { left: 16px; right: 16px; width: auto; top: 84px; translate: none; }
  .h-title { font-size: clamp(2.2rem, 9.5vw, 2.9rem); }
  .h-lead { font-size: 1.02rem; margin-bottom: 18px; }
  .h-actions .btn { padding: 11px 18px; font-size: 1rem; }
    .h-ring { right: 50%; translate: 50% 0; top: auto; bottom: 8svh; width: 78vw; }
  .h-buffett { right: auto; left: 50%; translate: -50% 0; bottom: 5svh; }
  .h-buffett img { height: 40svh; }
  .h-vcard { width: 150px; padding: 10px 12px; }
  .h-vcard .muted { display: none; }
  .h-vcard.c0 { right: auto; left: 4vw; bottom: 9svh; }
  .h-vcard.c1 { right: 4vw; bottom: 22svh; }
  .h-vcard.c2 { display: none; }
}

/* ---------- 3. The game (peak): the card fills, Buffett reacts ---------- */
.g-stage { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); grid-template-rows: auto 1fr auto; gap: 14px 40px; padding: 88px clamp(16px, 6vw, 96px) 22px; }
.g-head { grid-column: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.g-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-1); }
.g-tab { font: inherit; font-family: var(--head); font-weight: 600; font-size: .98rem; padding: 8px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); cursor: pointer; transition: background .16s, color .16s; }
.g-tab:hover { background: var(--surface-2); color: var(--ink); }
.g-tab.on { background: var(--ink); color: #fff; }
.g-tab__y { font-size: .78em; opacity: .7; }
.g-date { font-size: .88rem; color: var(--muted); }
.g-cards { grid-column: 1; grid-row: 2; position: relative; min-height: 340px; align-self: center; }
.g-card { position: absolute; inset: 0 0 auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px 26px 26px; box-shadow: var(--shadow-2); overflow: hidden; }
.g-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--line); }
.g-card.met::before { background: var(--green); } .g-card.unclear::before { background: var(--orange); } .g-card.failed::before { background: var(--red); }
.g-card h3 { font-size: 1.45rem; margin-bottom: 12px; padding-right: 150px; }
.g-intro h3, .g-final h3 { padding-right: 0; }
.g-intro, .g-final { background: var(--surface); }
.g-intro h3, .g-final h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); text-wrap: balance; }
.g-final h3 { margin: 12px 0 18px; }
.g-stamp { position: absolute; right: 18px; top: 18px; font-family: var(--head); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 8px; border: 2px solid currentColor; rotate: -6deg; }
.met .g-stamp { color: var(--green); } .unclear .g-stamp { color: #c46a0b; } .failed .g-stamp { color: var(--red); }
.g-price { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g-price > div { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; }
.g-price strong { font-family: var(--head); font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.g-margin { margin: 12px 0 0; color: var(--ink-2); }
.g-buffett { grid-column: 2; grid-row: 1 / 3; align-self: end; justify-self: center; }
.g-buffett img { height: min(54svh, 500px); width: auto; }
.g-buffett .bubble { max-width: 320px; font-size: 1.12rem; }
.g-score { grid-column: 1 / -1; grid-row: 3; list-style: none; margin: 0; padding: 10px; display: grid; grid-template-columns: repeat(4, 1fr) 1.3fr; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-1); }
.g-score li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); font-family: var(--head); font-weight: 600; font-size: .95rem; color: var(--muted); transition: background .2s, color .2s; }
.g-slot-ic { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #fff; border: 1.5px dashed var(--line-strong); }
.g-score li.stamped { color: var(--ink); animation: g-stamp .42s cubic-bezier(.3, 1.6, .5, 1); }
.g-score li.st-met { background: var(--green-soft); } .st-met .g-slot-ic { background: var(--green); color: #fff; border: 0; }
.g-score li.st-unclear { background: var(--orange-soft); } .st-unclear .g-slot-ic { background: var(--orange); color: #fff; border: 0; }
.g-score li.st-failed { background: var(--red-soft); } .st-failed .g-slot-ic { background: var(--red); color: #fff; border: 0; }
.g-score li.g-verdict.stamped { background: var(--surface); box-shadow: inset 0 0 0 2px var(--ink); }
.g-score li.g-verdict.stamped .g-slot-ic { display: none; }
@keyframes g-stamp { 0% { transform: scale(1.18) rotate(-3deg); } 100% { transform: none; } }

@media (max-width: 860px) {
  .g-stage { grid-template-columns: 1fr auto; grid-template-rows: auto auto 1fr auto; gap: 10px 12px; padding: 76px 16px 14px; }
  .g-head { grid-column: 1; grid-row: 1; gap: 8px; }
  .g-tab { padding: 6px 11px; font-size: .86rem; }
  .g-date { font-size: .78rem; }
  .g-buffett { grid-column: 2; grid-row: 1 / 3; align-self: start; flex-direction: column-reverse; }
  .g-buffett img { height: 22svh; }
  .g-buffett .bubble { position: absolute; right: calc(100% + 6px); top: 34%; width: max-content; max-width: 46vw; min-height: 0; margin: 0; padding: 8px 12px; font-size: .84rem; text-align: left; }
  .g-buffett .bubble::after { left: auto; right: -9px; bottom: auto; top: 50%; transform: translateY(-50%) rotate(-45deg); }
  .g-cards { grid-column: 1 / -1; grid-row: 3; min-height: 0; }
  .g-card { padding: 18px 18px 20px; display: flex; flex-direction: column; }
  .g-card h3 { padding-right: 0; }
  .g-stamp { position: static; order: -1; align-self: flex-start; margin-bottom: 8px; rotate: -3deg; }
  .g-card h3 { font-size: 1.2rem; }
  .g-card blockquote { font-size: .86rem; }
  .g-score { grid-row: 4; grid-template-columns: repeat(5, 1fr); padding: 6px; gap: 4px; }
  .g-score li { flex-direction: column; gap: 2px; padding: 6px 2px; font-size: .68rem; text-align: center; }
  .g-score li .chip { font-size: .62rem; padding: 2px 6px; }
}

/* ---------- 5. Method: one diagram, six steps that light up in order ---------- */
.m-stage { display: grid; grid-template-rows: auto auto auto; align-content: center; gap: clamp(28px, 5vh, 48px); padding: 90px clamp(16px, 6vw, 96px) 28px; }
.m-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; }
.m-head .h-body { margin: 0; }
.m-legend { display: flex; gap: 8px; flex-wrap: wrap; }
.m-actor { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 7px; border-radius: 999px; background: var(--act-soft); color: var(--ink); font-weight: 800; font-size: .8rem; white-space: nowrap; }
.m-actor svg { width: 17px; height: 17px; fill: none; stroke: var(--act); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.m-flow { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.m-line { position: absolute; left: 24px; right: calc((100% - 72px) / 7 - 25px); top: 23px; height: 4px; border-radius: 4px; background: var(--line-strong); overflow: hidden; }
.m-line i { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(clamp(0, calc(var(--sc-p, 0) * 1.12), 1)); }
.m-step { --on: clamp(0, calc((var(--sc-p, 0) - var(--at)) * 14), 1); position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; opacity: calc(.34 + .66 * var(--on)); }
.m-step > :not(.m-num) { transform: translate3d(0, calc((1 - var(--on)) * 10px), 0); }
.m-num { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 1.3rem; border: 3px solid color-mix(in srgb, var(--act) calc(var(--on) * 100%), var(--line-strong)); background: color-mix(in srgb, var(--act) calc(var(--on) * 100%), #fff); color: color-mix(in srgb, #fff calc(var(--on) * 100%), var(--muted)); }
.m-step h3 { font-size: 1.02rem; margin: 2px 0 0; }
.m-step p { margin: 0; font-size: .86rem; line-height: 1.45; color: var(--ink-2); }
.m-step .m-actor { display: none; } /* the number's colour and the legend show who acts */
.m-step { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px 14px 16px; box-shadow: var(--shadow-1); }
.m-num { margin-top: -41px; box-shadow: 0 0 0 6px var(--sc-canvas); }
.m-flow { padding-top: 26px; }
.m-line { top: 49px; }
.m-foot { justify-self: start; }
@media (prefers-reduced-motion: reduce) { .m-step { --on: 1; } .m-step > * { transform: none !important; } .m-line i { transform: none; } }
@media (max-width: 860px) {
  .m-stage { padding: 76px 16px 16px; gap: 12px; }
  .m-head .h-h2 { font-size: 1.7rem; margin-bottom: 4px; }
  .m-head .h-body { font-size: .92rem; }
  .m-legend { display: none; }
  .m-flow { grid-template-columns: 1fr; gap: 10px; }
  .m-line { left: 20px; right: auto; top: 10px; bottom: 10px; width: 4px; height: auto; }
  .m-line i { height: 100%; width: 100%; transform-origin: 50% 0; transform: scaleY(clamp(0, calc(var(--sc-p, 0) * 1.12), 1)); }
  .m-step { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; row-gap: 2px; }
  .m-step { background: none; border: 0; box-shadow: none; padding: 0; }
  .m-num { margin-top: 0; }
  .m-flow { padding-top: 0; }
  .m-line { top: 10px; }
  .m-num { grid-row: 1 / span 3; width: 44px; height: 44px; font-size: 1.1rem; }
  .m-step .m-actor { display: none; }
  .m-step h3 { font-size: 1rem; margin: 0; }
  .m-step p { font-size: .82rem; line-height: 1.4; }
}

/* ---------- 5. Range: the leaderboard travels sideways ---------- */
.r-stage { display: flex; align-items: center; }
.r-rail { gap: 18px; padding: 70px clamp(16px, 6vw, 96px) 0; align-items: stretch; }
.r-lead { flex: none; width: min(26rem, 80vw); display: flex; flex-direction: column; justify-content: center; padding-right: 20px; }
.r-card { --i: 1; flex: none; width: clamp(15rem, 22vw, 19.5rem); display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-1); color: inherit; text-decoration: none; transition: box-shadow .18s, border-color .18s; }
.r-card:hover { box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.r-img { height: clamp(190px, 34svh, 300px); border-radius: 16px; background: var(--surface-2); display: grid; place-items: end center; overflow: hidden; }
.r-img img { height: calc(clamp(190px, 34svh, 300px) - 14px); width: auto; max-width: none; }
.r-tk { font-family: var(--head); font-weight: 700; font-size: 1.4rem; line-height: 1.1; }
.r-end { justify-content: center; align-items: flex-start; background: var(--ink); color: #fff; border-color: var(--ink); }
.r-end .muted { color: #c4cad8; }
@media (prefers-reduced-motion: no-preference) {
  .r-card { opacity: clamp(.55, calc(1 - (var(--i) * .1 - var(--sc-p, 0)) * 4), 1); transform: translate3d(0, clamp(0px, calc((var(--i) * .1 - var(--sc-p, 0)) * 240px), 28px), 0); }
}
@media (max-width: 760px) { .r-rail { padding-top: 76px; } .r-img { height: 170px; } .r-img img { height: 158px; } }

/* ---------- 6. Close: your card ---------- */
.h-close__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 80px); align-items: center; }
.h-close__title { font-family: var(--head); font-weight: 700; font-size: clamp(3rem, 7vw, 5.4rem); line-height: .95; letter-spacing: -.03em; margin: 0 0 16px; }
.h-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 28px; padding-right: clamp(28px, 13vw, 170px); box-shadow: var(--shadow-3); }
.h-card__label { font-family: var(--head); font-weight: 600; color: var(--orange); margin: 0 0 12px; font-size: .95rem; }
.h-form { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: end; }
.h-form .btn { grid-column: 1 / -1; justify-self: start; }
.h-card .wanted-list { min-width: 0; }
.h-card .wanted-list li { box-shadow: none; background: var(--surface-2); }
.h-card__buffett { position: absolute; right: -14px; bottom: 0; pointer-events: none; }
.h-card__buffett img { height: 220px; width: auto; }
.h-card__buffett .bubble { font-size: .9rem; max-width: 190px; padding: 8px 12px; min-height: 0; margin-bottom: 10px; }
.h-small { margin-top: clamp(32px, 5vw, 56px); padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; text-align: center; }
.h-small p { margin: 0 auto 8px; max-width: 96ch; }
.h-small strong { color: var(--ink-2); }
.h-links a { color: var(--ink-2); font-weight: 700; }
@media (max-width: 820px) {
  .h-close__grid { grid-template-columns: 1fr; }
  .h-card { padding-right: 28px; padding-bottom: 210px; }
  .h-form { grid-template-columns: 1fr; }
  .h-card__buffett { right: 50%; translate: 50% 0; }
  .h-card__buffett img { height: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  .h-far, .h-ring, .h-buffett, .h-front { transform: none; }
  .g-score li.stamped { animation: none; }
}

/* Phone: tap targets of at least 40px */
@media (max-width: 760px) {
  .g-tab { min-height: 40px; }
  .h-links a { display: inline-block; padding: 10px 4px; }
}

/* ---------- Phone composition (art-directed, not shrunk) ---------- */
@media (max-width: 760px) {
  /* Hero: text first, then a reserved stage for Buffett and the verdict cards. */
  .h-stage { height: auto; min-height: 0; padding: 20px 0 calc(min(46svh, 330px) + 12px); }
  .h-copy { position: relative; top: auto; left: auto; right: auto; translate: none; padding: 0 16px; }
  .h-buffett { bottom: 14px; }
  .h-buffett img { height: min(42svh, 300px); }
  .h-ring { bottom: 10px; width: min(70vw, 300px); }
  .h-vcard.c0 { bottom: 26px; left: 3vw; }
  .h-vcard.c1 { bottom: calc(min(42svh, 300px) - 90px); right: 3vw; }
  .h-fiction { bottom: 2px; }

  /* Game: tabs on one line, Buffett's line on its own row, cards and card never overlap. */
  .g-stage { grid-template-columns: 1fr auto; grid-template-rows: auto auto 1fr auto; padding: 72px 14px 12px; gap: 8px 10px; }
  .g-head { grid-column: 1 / -1; grid-row: 1; }
  .g-tabs { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .g-tab { flex: none; }
  .g-buffett { grid-column: 1 / -1; grid-row: 2; flex-direction: row-reverse; justify-content: space-between; align-items: flex-end; justify-self: stretch; gap: 10px; }
  .g-buffett img { height: min(16svh, 130px); }
  .g-buffett .shadow { display: none; }
  .g-buffett .bubble { position: static; flex: 1; width: auto; max-width: none; margin: 0 0 10px; padding: 10px 14px; font-size: .9rem; text-align: left; place-items: center start; }
  .g-buffett .bubble::after { left: -9px; right: auto; bottom: 16px; top: auto; transform: rotate(135deg); }
  .g-cards { grid-row: 3; align-self: start; }
}
@media (max-width: 760px) and (max-height: 720px) {
  .g-card blockquote { display: none; }
  .g-card h3 { margin-bottom: 8px; }
  .g-price strong { font-size: 1.3rem; }
  .m-step p { display: none; }
  .m-flow { gap: 14px; }
  .m-head .h-body { display: none; }
}

/* Research context */
.h-badge { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink-2); font-weight: 800; font-size: .84rem; text-decoration: none; box-shadow: var(--shadow-1); transition: border-color .16s, color .16s; }
.h-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.h-badge:hover { border-color: var(--ink); color: var(--ink); }
.g-note { margin: 14px 0 0; font-size: .8rem; color: var(--muted); }
@media (max-width: 760px) { .h-badge { margin-bottom: 12px; font-size: .78rem; } .g-note { display: none; } }

/* Phone fixes: Buffett's line at the height of his face; the close card's Buffett below the list */
@media (max-width: 760px) {
  .g-buffett { align-items: flex-start; }
  .g-buffett .bubble { margin: 6px 0 0; }
  .g-buffett .bubble::after { top: 16px; bottom: auto; }
  .h-card { padding-bottom: 28px; }
  .h-card__buffett { position: relative; right: auto; translate: none; bottom: auto; margin: 18px auto 0; flex-direction: row-reverse; align-items: flex-start; justify-content: center; gap: 8px; }
  .h-card__buffett img { height: 130px; }
  .h-card__buffett .bubble { margin: 10px 0 0; }
  .h-card__buffett .bubble::after { left: -9px; bottom: auto; top: 14px; transform: rotate(135deg); }
}

/* Game cards share one grid cell: the stack is as tall as its tallest card, never taller,
   so the scorecard sits right under it instead of across an empty band. */
.g-cards { display: grid; min-height: 0; }
.g-card { position: relative; inset: auto; grid-area: 1 / 1; align-self: start; }
@media (max-width: 860px) {
  .g-stage { grid-template-rows: auto auto auto auto; align-content: center; }
  .g-cards { align-self: start; }
}

/* Phone: the scorecard is a progress header under the tabs; the scene ends on the card. */
@media (max-width: 860px) {
  .g-score { grid-row: 2; }
  .g-buffett { grid-row: 3; }
  .g-cards { grid-row: 4; }
}

/* Tighter hand-over between the game and the verdicts strip */
.r-stage { align-items: flex-start; }
.r-rail { padding-top: 96px; }
.r-lead { justify-content: flex-start; padding-top: 8px; }
.g-cards { align-self: end; }
@media (max-width: 860px) {
  .g-score { display: none; }
  .g-stage { grid-template-rows: auto auto auto; align-content: center; }
  .g-buffett { grid-row: 2; }
  .g-cards { grid-row: 3; align-self: start; }
  .g-buffett img { height: min(22svh, 190px); }
  .r-rail { padding-top: 80px; }
}

/* Verdict recap: replaces the scorecard on phones, inside the verdict card */
.g-recap { display: none; list-style: none; margin: 0 0 16px; padding: 0; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.g-recap li { display: flex; align-items: center; gap: 8px; font-family: var(--head); font-weight: 600; font-size: .95rem; }
.g-recap .ic { width: 24px; height: 24px; font-size: .75rem; }
@media (max-width: 860px) {
  .g-recap { display: grid; }
  .g-final { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
}

/* Desktop game: tabs, card and scorecard packed together and centred as one block. */
@media (min-width: 861px) {
  .g-stage { grid-template-rows: auto auto auto; align-content: center; }
  .g-cards { align-self: start; }
  .g-buffett { grid-row: 1 / 3; align-self: end; }
}

/* Verdict card: as tall as the criteria cards, filled with the score and the margin */
.g-final { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.g-facts { display: flex; align-items: center; gap: 16px; margin: 0 0 18px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.g-facts strong { font-family: var(--head); font-size: 1.9rem; line-height: 1; }
.g-facts small { color: var(--muted); margin-left: 2px; }
.g-facts .small { color: var(--ink-2); }
@media (max-width: 860px) { .g-facts { display: none; } }

.g-final .btn { align-self: flex-start; }
@media (max-width: 860px) { .g-final .btn { align-self: stretch; } }
.h-heron .heron { padding: clamp(28px, 5vw, 48px) 0 0; }
.h-heron .wrap { padding-inline: clamp(16px, 4vw, 40px); max-width: 1160px; }

/* Phone: the verdicts strip is a swipe carousel (snap), the method content is centred */
.h-range--swipe .r-stage { display: block; padding: 28px 0 8px; }
.h-range--swipe .r-rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 18px; scroll-padding-inline: 16px; scrollbar-width: none; }
.h-range--swipe .r-rail::-webkit-scrollbar { display: none; }
.h-range--swipe .r-lead { width: 78vw; padding: 0; justify-content: center; }
.h-range--swipe .r-card { width: 70vw; scroll-snap-align: start; opacity: 1 !important; transform: none !important; }
.h-range--swipe .r-img { height: 190px; }
.h-range--swipe .r-img img { height: 178px; }
@media (max-width: 760px) {
  .m-stage { align-content: center; padding-top: 72px; padding-bottom: 12px; }
  .m-flow { gap: 16px; }
}

/* Verdict slot of the scorecard, built like the criterion slots */
.g-score li.g-verdict.stamped { box-shadow: none; font-size: 1rem; }
.g-score li.g-verdict.stamped .g-slot-ic { display: grid; }
.g-score li.g-verdict.st-v-buy { background: var(--green-soft); color: #0c6b43; } .st-v-buy .g-slot-ic { background: var(--green); color: #fff; border: 0; }
.g-score li.g-verdict.st-v-moderate { background: var(--orange-soft); color: #9a5207; } .st-v-moderate .g-slot-ic { background: var(--orange); color: #fff; border: 0; }
.g-score li.g-verdict.st-v-no { background: var(--red-soft); color: #a63326; } .st-v-no .g-slot-ic { background: var(--red); color: #fff; border: 0; }

/* Method diagram: opaque cards, connectors only between cards, text dimmed until lit */
@media (min-width: 861px) {
  .m-line { display: none; }
  .m-step { opacity: 1; }
  .m-step > :not(.m-num) { opacity: calc(.38 + .62 * var(--on)); }
  .m-step:not(:last-child)::after { content: ""; position: absolute; top: 22px; right: -15px; width: 16px; height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--ink) calc(var(--on) * 100%), var(--line-strong)); }
  .m-flow { padding-top: 26px; }
}

/* Home method diagram on phones: opaque number circles hide the line; only the text is dimmed
   until the step lights up; the line stops at the last circle. */
@media (max-width: 860px) {
  .m-step { opacity: 1; }
  .m-step > :not(.m-num) { opacity: calc(.38 + .62 * var(--on)); }
  .m-num { position: relative; z-index: 1; }
  .m-line { top: 22px; bottom: 40px; }
}
@media (max-width: 760px) and (max-height: 720px) { .m-line { bottom: 22px; } }

.h-links { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 18px; row-gap: 2px; }

/* Home diagram cards stand out from the page ground */
@media (min-width: 861px) { .m-step { border-color: var(--line-strong); box-shadow: var(--shadow-2); } }

/* Seven steps on one line: tighter cards on mid-size screens */
@media (min-width: 861px) and (max-width: 1100px) {
  .m-flow { gap: 8px; }
  .m-step { padding: 12px 10px 14px; }
  .m-step h3 { font-size: .9rem; hyphens: auto; overflow-wrap: anywhere; }
  .m-step p { font-size: .78rem; }
}
