/* The simple home (gallery.html under TWH_SIMPLE_HOME, simplehome.py): one big sample button, four tiles, the challenge, a collapsed A-Z list. */
.simple-hero { padding: 24px 0 12px; }
.simple-hero h1 { max-width: 20ch; }
.simple-sample { flex-direction: column; align-items: stretch; gap: 8px; margin: 20px 0 8px; max-width: 26rem; }
.simple-sample .sample-btn { min-height: 64px; font-size: 1.25rem; padding: 16px 28px; width: 100%; }
.simple-sample .sample-note { text-align: center; }
.simple-offer { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 16px 0 0; max-width: 26rem; }
.simple-offer .btn { width: 100%; min-height: 52px; font-size: 1.05rem; }
.simple-hero .fv-after { max-width: 26rem; }
.simple-pick { margin: 28px 0 8px; }
.tiles { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: 14px; }   /* two columns on a phone; one when large text makes 8rem wider than half the row (2026-10-28) */
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.tile-name, .tile-line { overflow-wrap: anywhere; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tile-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.tile-link:hover .tile-name { color: var(--accent-ink); }
.tile-art img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tile-name { font-size: 1.3rem; font-weight: 700; padding: 12px 14px 2px; }
.tile-line { color: var(--muted); font-size: 1rem; line-height: 1.35; padding: 0 14px 14px; }
.simple-challenge { margin-top: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .simple-challenge { grid-template-columns: minmax(0, 560px); } }
.simple-own { margin-bottom: 8px; }
.az-list { margin: 28px 0 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.az-list > summary { cursor: pointer; padding: 14px 16px; min-height: 48px; display: flex; align-items: center; font-weight: 700; font-size: 1.1rem; }
.az-list[open] > summary { border-bottom: 1px solid var(--line); }
.az-list > ul { list-style: none; margin: 0; padding: 4px 8px 8px; display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .az-list > ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .az-list > ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.az-list > ul a { display: flex; align-items: center; min-height: 48px; padding: 6px 8px; color: inherit; text-decoration: none; border-radius: 8px; }
.az-list > ul a:hover { background: var(--line); color: var(--accent-ink); }

/* The challenge panel on top (gallery.html, simplehome.hero): the sample button sits directly under it, the page heading after */
.simple-ch { margin: 8px 0 0; }
.ch-hero.simple-ch { margin-bottom: 0; }
.simple-ch .sch-title { margin: 0 0 4px; font-weight: 700; color: #f4f1ea; font-size: clamp(1.5rem, 1.1rem + 2vw, 2.2rem); line-height: 1.15; }
.simple-ch .sch-line { margin: 4px 0 0; font-size: 1.05rem; }
.simple-ch .ch-cta { margin: 12px 0 4px; }
.simple-ch .ch-btn { min-height: 52px; }
.simple-ch .sch-form { margin: 0; }
.simple-ch .sch-next { margin: 6px 0 0; }
.simple-hero.has-ch { display: flex; flex-direction: column; padding-top: 8px; }
.simple-hero.has-ch .simple-sample, .simple-hero.has-ch .fv-after, .simple-hero.has-ch .sample-wrap { order: -1; }
.simple-hero.has-ch .simple-sample { margin: 12px 0 4px; }
.simple-hero.has-ch h1 { font-size: 1.5rem; max-width: none; margin-top: 20px; }
.simple-result { margin: 16px 0; text-align: center; }
.simple-note { margin: 16px 0 0; }

/* Enrolled challenge card can be folded to one line (challenge-hero.js). The bar exists only in the markup of the enrolled states. */
.simple-ch .ch-bar { max-width: none; display: none; margin: 0; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 0 16px; min-height: 48px; color: #f4f1ea; }
.simple-ch .ch-bar-text { font-size: 1rem; }
.ch-tog { min-width: 44px; min-height: 44px; padding: 0 12px; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; border-radius: 8px; }
.ch-tog:hover, .ch-tog:focus-visible { background: rgba(255, 255, 255, .12); }
/* Top-right corner of the whole card at every width (it used to align to the text column's edge: mid-card on desktop, Gergo 27 Oct). */
.ch-hide { position: absolute; top: 12px; right: 12px; z-index: 2; font-size: .875rem; opacity: .8; background: rgba(7, 10, 20, .35); }
.simple-ch.is-folded > picture, .simple-ch.is-folded > .ch-hero-body { display: none; }
.simple-ch.is-folded > .ch-bar { display: flex; }

/* Community journeys block (23 Oct 2026): same box as .az-list, theme tokens only */
.community-block { margin: 28px 0 8px; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.community-block h2 { margin: 0 0 4px; font-size: 1.1rem; }
.community-block h2 a { color: inherit; text-decoration: none; }
.community-block p { margin: 0 0 8px; }
.community-block ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .community-block ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.community-block li a { display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 6px 8px; color: inherit; text-decoration: none; border-radius: 8px; }
.community-block li a:hover { background: var(--line); color: var(--accent-ink); }
.community-title { font-weight: 600; }
.community-empty { margin: 24px 0; }

/* A2 (29 Oct 2026), mobile first: with the challenge panel on top the sample must still be in the first screen. The picture becomes a slim banner
   and the panel loses some padding, so the "Hear a 3-minute sample" button lands in the first screen of a 360 x 640 phone. */
@media (max-width: 699px) {
  .simple-ch .ch-hero-img { aspect-ratio: 16 / 5; object-position: 50% 72%; }
  .simple-ch .ch-hero-body { padding: 12px 16px 14px; }
  .simple-ch .sch-title { font-size: 1.25rem; margin-bottom: 2px; }
  .simple-ch .ch-lead { margin: 0 0 2px; }
  .simple-ch .ch-cta { margin: 8px 0 0; }
  .simple-hero.has-ch .simple-sample { margin: 10px 0 2px; }
  .simple-hero.has-ch { padding-top: 4px; }
}

/* First-screen test B (hero_ab.py, decision 105, 30 Oct 2026): one big button, the safety lines under it, everything else below. */
.hero-b { padding-top: 12px; padding-bottom: 8px; }
.hero-b .hero-b-title { font-size: clamp(1.15rem, 4.6vw, 1.6rem); line-height: 1.25; margin: 0 0 4px; }
.hero-b .simple-sample { margin: 12px 0 4px; }
.hero-b .hero-b-btn { min-height: 76px; font-size: 1.3rem; line-height: 1.25; white-space: normal; }
.hero-b .sample-pre, .hero-b .hero-b-note { margin: 4px 0 0; text-align: center; line-height: 1.35; }
.hero-b .hero-b-note { font-size: .875rem; }
.hero-b-more { margin: 8px 0; }
/* the cookie bar is a compact strip on a phone and never covers the button ([data-oq] too). */
@media (max-width: 600px) {
  body:has([data-hero-b], [data-oq]) .consent-banner { padding: 6px 10px; gap: 6px 8px; flex-wrap: nowrap; align-items: center; }
  html.no-has body.x-herob .consent-banner, html.no-has body.x-oq .consent-banner { padding: 6px 10px; gap: 6px 8px; flex-wrap: nowrap; align-items: center; }   /* fallback: no :has() before iOS 15.4 (static/has-fallback.js) */
  body:has([data-hero-b], [data-oq]) .consent-banner .consent-text { font-size: .875rem; line-height: 1.25; flex: 1 1 auto; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  html.no-has body.x-herob .consent-banner .consent-text, html.no-has body.x-oq .consent-banner .consent-text { font-size: .875rem; line-height: 1.25; flex: 1 1 auto; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  body:has([data-hero-b], [data-oq]) .consent-banner .consent-more { display: none; }
  html.no-has body.x-herob .consent-banner .consent-more, html.no-has body.x-oq .consent-banner .consent-more { display: none; }
  body:has([data-hero-b], [data-oq]) .consent-banner .consent-actions { flex: 0 0 auto; }
  html.no-has body.x-herob .consent-banner .consent-actions, html.no-has body.x-oq .consent-banner .consent-actions { flex: 0 0 auto; }
  body:has([data-hero-b], [data-oq]) .consent-banner .consent-actions .btn { flex: 0 0 auto; min-height: 44px; padding: 4px 10px; font-size: .875rem; }
  html.no-has body.x-herob .consent-banner .consent-actions .btn, html.no-has body.x-oq .consent-banner .consent-actions .btn { flex: 0 0 auto; min-height: 44px; padding: 4px 10px; font-size: .875rem; }
  body:has([data-hero-b], [data-oq]):has(.consent-banner:not([hidden])) { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
  html.no-has body.x-herob.x-consent, html.no-has body.x-oq.x-consent { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
}

/* W392: phone-only audio action above the challenge banner */
.home-listen { display: none; }
@media (max-width: 699px) { .home-listen { display: block; margin: 8px 0 4px; } .home-listen .sample-btn { width: 100%; } }
