/* The home page's things to try (assets/home-play.js and home.js, 2026-11-25).
   Plan: docs/superpowers/plans/2026-11-25-home-page-play.md. Every motion here
   is transform or opacity, and none of it runs for readers who asked for
   reduced motion. The page sets html.js before it paints, so the space for
   each part is kept from the first frame and nothing below it moves. */

/* ---------------------------------------------------- the year in heat --- */
.year-heat { display: none; }
.js .year-heat { display: block; margin: 26px 0 4px; min-height: 150px; }
@media (max-width: 640px) { .js .year-heat { min-height: 232px; } }
.yh-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.yh-title { margin: 0; max-width: 62ch; font-size: var(--fs-sm); color: var(--ink-soft); }
.yh-title strong { color: var(--blue-deep); }
.yh-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* .btn sets display:inline-block, which beats [hidden]; without this the
   year strip's "Back to my dates" showed on every visit (2026-11-25). */
.yh-actions .btn[hidden] { display: none; }
#yhPlay::before { content: '\25B6'; display: inline-block; margin-inline-end: 6px; font-size: .78em; }
#yhPlay[aria-pressed="true"]::before { content: '\25A0'; }
.yh-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
@media (max-width: 640px) { .yh-months { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.yh-m { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 6px 4px 7px; border: 1px solid var(--line-light);
  border-radius: 10px; background: rgba(255, 255, 255, .6); color: var(--ink); font: inherit; cursor: pointer; }
.yh-m:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.yh-m[aria-pressed="true"] { border-color: var(--gold); background: #fff;
  box-shadow: 0 0 0 2px var(--gold) inset, 0 8px 18px rgba(14, 42, 94, .14); }
.yh-bar { display: flex; flex-direction: column-reverse; height: 52px; border-radius: 6px; overflow: hidden; background: var(--papyrus-deep); }
.yh-bar i { display: block; flex-basis: 0; }
.yh-name { display: block; overflow: hidden; font-size: var(--fs-xs); line-height: 1.15; text-align: center; white-space: nowrap; text-overflow: ellipsis; }
.yh-name::after { content: ''; display: block; width: 6px; height: 6px; margin: 3px auto 0; border-radius: 50%; }
.yh-m.is-own .yh-name::after { background: var(--gold-ink); }
.yh-status { min-height: 1.4em; margin: 8px 0 0; font-size: var(--fs-xs); color: var(--ink-soft); }
.brief-site.is-lit { box-shadow: 0 0 0 2px var(--gold), 0 10px 22px rgba(14, 42, 94, .12); }
@media (prefers-reduced-motion: no-preference) {
  .yh-m { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease; }
  .yh-m:hover { transform: translateY(-2px); }
  .year-heat.is-playing .yh-m[aria-pressed="true"] { transform: translateY(-4px); }
  .brief-site { transition: box-shadow .2s ease; }
}

/* -------------------------------------------- your name in a cartouche --- */
.name-try { margin-top: 22px; padding: 22px 24px; border: 1px solid var(--gold-soft); border-radius: 16px;
  background: rgba(255, 255, 255, .72); box-shadow: 0 10px 28px rgba(14, 42, 94, .08); color: var(--ink); }
.name-try-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px 28px; align-items: center; }
@media (max-width: 760px) { .name-try-row { grid-template-columns: 1fr; } }
.name-try label { display: block; margin: 0 0 8px; font-weight: 700; color: var(--blue-deep); }
.name-try input { box-sizing: border-box; width: 100%; padding: 12px 14px; border: 1px solid var(--line-light); border-radius: 10px;
  background: #fff; color: var(--ink); font: inherit; font-size: 1.05rem; }
.name-try input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.name-try-note { min-height: 1.3em; margin: 6px 0 10px; font-size: var(--fs-xs); color: var(--ink-soft); }
.name-try-out { display: flex; align-items: center; justify-content: center; min-height: 110px; overflow: hidden; }
.name-try:not(.has-name) .name-try-out::before { content: ''; width: min(220px, 70%); height: 78px; border: 3px dashed var(--gold);
  border-radius: 42px; opacity: .45; }
.name-try-sign { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .name-try-sign.is-new { animation: name-try-in .4s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes name-try-in { from { opacity: 0; transform: translateY(10px) scale(.7); } to { opacity: 1; transform: none; } }
}

/* ------------------------------------------- guess, then turn the card --- */
.guess-front, .guess-again { display: none; }
.js .guess { display: grid; perspective: 1400px; }
.js .guess > .guess-front, .js .guess > .guess-back { grid-area: 1 / 1; min-width: 0; }
.js .guess-front { display: flex; flex-direction: column; gap: 14px; }
.js .guess-front h3 { margin: 0; }
.js .guess-front p { margin: 0; }
.js .guess .guess-back { visibility: hidden; }
.js .guess.is-turned .guess-front { visibility: hidden; }
.js .guess.is-turned .guess-back { visibility: visible; }
.js .guess-again { display: inline-block; margin-top: 10px; padding: 0; border: 0; background: none; color: var(--blue);
  font: inherit; font-size: var(--fs-sm); text-decoration: underline; cursor: pointer; }
.guess-range { display: flex; align-items: center; gap: 14px; }
.guess-range input { flex: 1; min-width: 0; accent-color: var(--gold-ink); }
.guess-value { min-width: 2.2ch; font-size: 2rem; font-weight: 800; line-height: 1; color: var(--blue-deep); text-align: center;
  font-variant-numeric: tabular-nums; }
.guess-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.guess-result { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--gold-soft); color: var(--gold-ink); font-weight: 700; }
.guess-result:empty { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .guess > .guess-front, .js .guess > .guess-back { backface-visibility: hidden;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .3s; }
  .js .guess .guess-back { transform: rotateY(180deg); }
  .js .guess.is-turned .guess-front { transform: rotateY(-180deg); }
  .js .guess.is-turned .guess-back { transform: rotateY(0deg); }
}

/* -------------------------------------------------- what money buys --- */
.money-play { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-light); }
.mp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.mp-title { margin: 0; font-weight: 700; color: var(--blue-deep); }
.mp-cur { display: inline-flex; overflow: hidden; border: 1px solid var(--line-light); border-radius: 999px; background: #fff; }
.mp-cur button { margin: 0; padding: 5px 12px; border: 0; background: transparent; color: var(--blue-deep); font: inherit;
  font-size: var(--fs-xs); font-weight: 700; cursor: pointer; }
.mp-cur button[aria-pressed="true"] { background: var(--blue-deep); color: #fff; }
.mp-cur button:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.money-play input[type="range"] { width: 100%; margin: 12px 0 6px; accent-color: var(--gold-ink); }
.mp-egp { margin: 0 0 10px; font-size: var(--fs-sm); color: var(--ink-soft); }
.mp-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mp-list li { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 3px 10px; align-items: baseline; }
.mp-n { font-size: 1.2rem; font-weight: 800; color: var(--blue-deep); text-align: end; font-variant-numeric: tabular-nums; }
.mp-what { font-size: var(--fs-sm); }
.mp-src { font-size: var(--fs-xs); }
.mp-stack { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; min-height: 12px; grid-column: 2; }
.mp-t { display: block; width: 15px; height: 10px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold) 0 70%, var(--gold-bright) 70%); box-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.mp-more { margin-inline-start: 4px; font-size: var(--fs-xs); color: var(--ink-soft); }
@media (prefers-reduced-motion: no-preference) {
  .mp-t { animation: mp-in .25s ease both; }
  @keyframes mp-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}
