/* V16: match the approved home and progress sketches. */
.home-description{font-size:15px;line-height:1.6;color:var(--muted);margin:20px 0 14px;max-width:480px}
.home-intro h1{letter-spacing:-.045em}
.home-intro .hero-art{margin:15px 0 18px;height:auto;aspect-ratio:1.75;max-height:250px;object-fit:contain}
.home-study>.button{margin-top:0}
.home-study>.text-button{margin:12px auto 0}
.view[data-view="home"]{padding-bottom:30px}
.home-content{margin-top:34px;padding-top:28px;border-top:1px solid var(--line)}
.home-content>h2{font-size:27px;line-height:1.15;letter-spacing:-.035em;margin:0 0 19px}
.home-content-grid{display:grid;gap:14px}
.content-card{display:grid;grid-template-columns:minmax(0,1fr) 108px;gap:10px;align-items:center;background:#f0eee5;border-radius:19px;padding:20px 17px 20px 20px;text-decoration:none;color:var(--ink)}
.content-card-copy{min-width:0}
.content-kicker{display:block;color:var(--muted);font-size:11px;font-weight:500;margin-bottom:9px}
.content-card h3{font-size:23px;line-height:1.08;font-weight:800;letter-spacing:-.025em;margin:0 0 10px}
.content-card p{font-size:13px;line-height:1.45;color:var(--muted);margin:0}
.content-card-link{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;min-height:44px;padding-top:8px}
.content-card-link>span{font-size:19px}
.content-card>img{display:block;width:108px;height:142px;object-fit:contain}
.content-card:hover .content-card-link{text-decoration:underline;text-underline-offset:4px}
.content-card:active{background:#e9e7dd}
.progress-layout{display:block;max-width:680px}
.progress-hero{padding-top:0}
.progress-overline{font-size:13px;line-height:1.5;color:var(--muted);margin:0 0 10px;letter-spacing:0}
.progress-companion,.learning-success img{display:block;width:100%;height:150px;max-height:none;object-fit:contain;margin:8px 0 14px}
#practiceCaption{font-size:16px;line-height:1.55;margin:0 0 18px;max-width:420px}
.learning-success{display:block;background:transparent;border-radius:0;padding:0;margin:0}
.learning-success h2{font-family:var(--font-headline);font-weight:var(--headline-weight);font-size:clamp(42px,11.8vw,57px);line-height:1.01;letter-spacing:-.045em;margin:0 0 13px}
.learning-success #roundSuccessCopy{font-size:16px;line-height:1.55;color:var(--muted);margin:0 0 16px}
.round-reward{display:inline-flex;align-items:center;gap:8px;font-size:14px;line-height:1.4;border-radius:12px;background:var(--lime);padding:10px 13px;margin:0 0 16px}
.round-reward:before{content:'✓';color:var(--ink)}
#progressLearnButton{margin-top:0}
#progressError{font-size:14px;line-height:1.5;margin:0 0 16px}
.level-details{border-bottom:1px solid var(--line);margin:24px 0 0;padding-bottom:22px}
.level-heading{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin-bottom:11px;font-size:14px}
.level-heading strong{font-weight:700}
#levelXp{font-size:13px;color:var(--muted)}
.level-details .progress-track{height:9px;background:#e1e3df;margin-bottom:10px}
.level-details .progress-track>i{background:var(--lime)}
#levelNext{font-size:12px;color:var(--muted);line-height:1.5}
.level-explanation summary,.learning-explanation summary{color:var(--muted);font-size:12px;padding:12px 0;min-height:44px}
.level-rule,.learning-explanation p{font-size:13px;line-height:1.6;color:var(--muted);margin:0 0 8px;max-width:530px}
.progress-details{margin-top:26px}
.progress-details .section-heading{margin-top:0;margin-bottom:12px}
.progress-details .section-heading h2{font-size:23px}
.topic-row{grid-template-columns:24px minmax(0,1fr) auto;gap:8px 14px;padding:13px 0;align-items:center;border:0}
.topic-symbol{grid-row:1 / span 2;width:24px;height:24px;background:transparent;border-radius:0;color:var(--ink)}
.topic-symbol .icon{width:23px;height:23px}
.topic-copy{grid-column:2;grid-row:1}
.topic-copy strong{line-height:1.35}
.topic-row em{grid-column:3;grid-row:1;font-size:12px;font-weight:400}
.topic-row .mini-progress{grid-column:2 / span 2;grid-row:2;height:5px;background:#e1e3df}
.topic-row .mini-progress i{background:var(--ink)}
.badge-collection{border-top:1px solid var(--line);margin:25px 0 0;padding-top:26px}
.badge-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 20px}
.badge-tile img{width:min(100%,112px)}
.badge-tile.unlocked p,.badge-tile.unlocked .badge-status{display:none}
.badge-tile h3{font-size:13px;font-weight:500}
.badge-discovery{margin-top:16px}
.badge-discovery summary{color:var(--ink);font-size:13px}
.badge-discovery summary:after{content:'⌄';margin-left:8px}
.badge-discovery[open] summary:after{content:'⌃'}
.badge-celebration p{color:var(--ink)}
.badge-celebration{border-color:var(--line)}
.progress-daily{font-size:12px;line-height:1.5;color:var(--muted);margin:12px 0 0}
.app-footer{margin-top:0}
.public-art{display:block;width:min(100%,280px);height:220px;object-fit:contain;margin:24px auto 36px}
.public-art-wide{width:min(100%,500px)}
.public-main .lead{color:var(--muted);line-height:1.6}
.public-main article>h2{font-size:26px;line-height:1.2}
.public-main article>p{max-width:66ch}
.public-main article>a,.public-main article>p>a.button{margin-bottom:16px}
.supporter-card{background:#f0eee5;border-radius:20px;padding:24px;margin-top:30px}
.supporter-art{display:block;width:100%;height:135px;object-fit:contain;margin:0 0 16px}
.supporter-card h2{font-family:var(--font-headline);font-weight:var(--headline-weight);font-size:28px;line-height:1.08;letter-spacing:-.025em;margin:0 0 14px}
.supporter-card #paymentCopy{font-size:15px;line-height:1.5;color:var(--muted)}
.supporter-offer{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin:22px 0 14px}
.supporter-offer strong{font-size:30px;line-height:1.2;letter-spacing:-.035em}
.supporter-offer span{font-size:13px;color:var(--muted)}
.supporter-card .supporter-free,.supporter-card .supporter-checkout{font-size:12px;line-height:1.5;color:var(--muted)}
.account-layout{display:block;max-width:540px}
.supporter-checkout{text-align:center;margin:12px 0 0}
.payment-return{display:grid;gap:22px;margin-top:25px}
.payment-return>img{display:block;width:100%;height:220px;object-fit:contain}
.payment-return h2{margin-top:16px;font-size:30px;line-height:1.1}
.payment-return .payment-state{display:inline-block;font-size:12px;color:var(--muted);margin:0}
.payment-state.is-confirmed{background:var(--lime);color:var(--ink);padding:8px 12px;border-radius:99px}
.payment-return .payment-return-note{font-size:12px;color:var(--muted);margin:18px 0 0}
.payment-return .payment-retry{margin:5px 0 12px;padding-left:0;text-align:left}
.payment-return .payment-home{display:block;max-width:330px;text-align:center;color:var(--ink);font-size:14px;min-height:44px;padding:12px;text-decoration:none}
.payment-return .payment-home:hover{text-decoration:underline}
@media(min-width:700px){.payment-return{grid-template-columns:1fr 1.2fr;gap:35px;align-items:center}.payment-return>img{height:260px}.payment-return h2{margin-top:16px}}
@media(min-width:1000px){
 .view[data-view="home"]{padding-top:22px;padding-bottom:40px}
 .home-layout{grid-template-columns:1.1fr 1fr;gap:80px;align-items:center}
 .home-intro .hero{padding-top:0}.home-intro h1{font-size:76px}
 .home-description{font-size:18px}.home-study{padding-top:0}
 .home-intro .hero-art{max-height:300px;margin-top:24px}
 .home-content{margin-top:42px;padding-top:32px}.home-content-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
 .content-card{grid-template-columns:minmax(0,1fr) 140px;padding:25px}.content-card>img{width:140px;height:170px}
 .progress-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);max-width:none;gap:70px;align-items:start}
 .progress-layout>div{min-width:0}
 .progress-details{margin-top:8px}.progress-hero h1,.learning-success h2{font-size:62px}
 .progress-companion,.learning-success img{width:100%;height:180px;max-height:none}
 .level-details{border-bottom:0}.badge-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .badge-tile img{max-width:112px}
}
@media(max-width:359px){.learning-success h2{font-size:40px}.topic-row{grid-template-columns:23px minmax(0,1fr) auto;gap:8px 10px}.topic-copy strong{font-size:13px}}
@media(max-width:380px){.content-card{grid-template-columns:minmax(0,1fr) 88px;padding:18px 14px 18px 17px;gap:8px}.content-card>img{width:88px;height:135px}.content-card h3{font-size:21px}.content-card p{font-size:12px}}

/* Sketch alignment: typography, spacing and compact explanations. */
.view[data-view="home"] h1,.progress-hero h1,.learning-success h2{font-family:var(--font-headline);font-weight:var(--headline-weight);font-size:49px;line-height:1.02;letter-spacing:-.045em}
.home-intro .hero{padding-top:0}
.home-description{margin:20px 0 0}
.home-intro .hero-art{height:195px;aspect-ratio:auto;max-height:none;margin:16px 0 20px;object-fit:contain}
.home-study>.button,#progressLearnButton{text-align:left;font-size:17px;border-radius:17px;padding-left:20px}
.home-study>.text-button{margin:9px auto 0;padding:12px 18px;font-size:15px}
.progress-hero{padding-top:0!important}
.progress-companion,.learning-success img{height:142px;margin:8px 0 12px}
#practiceCaption{white-space:pre-line}
.level-details{padding-bottom:26px}
.level-foot{display:flex;align-items:start;justify-content:space-between;gap:10px;position:relative}
#levelNext{padding-top:10px}
.level-explanation,.learning-explanation{position:static}
.level-explanation summary,.learning-explanation summary{display:grid;place-items:center;min-width:44px;min-height:44px;padding:0;list-style:none;color:var(--muted)}
.level-explanation summary::-webkit-details-marker,.learning-explanation summary::-webkit-details-marker{display:none}
.level-explanation summary .icon,.learning-explanation summary .icon{width:17px;height:17px}
.level-explanation[open] p,.learning-explanation[open] p{position:absolute;top:48px;left:0;right:0;z-index:3;background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:14px;font-size:13px;line-height:1.6;color:var(--ink);margin:0;max-width:none;box-shadow:0 6px 18px #08143e0c}
.knowledge-heading{position:relative;display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.knowledge-heading h2{font-size:23px;line-height:1.2;font-weight:800;letter-spacing:-.025em;margin:0}
.progress-details{margin-top:25px}
.topic-row{padding:12px 0;gap:9px 14px}
.badge-collection{margin-top:27px}
.badge-collection .section-heading{margin-bottom:19px}
.badge-collection .section-heading h2{font-size:23px;font-weight:800;line-height:1.2;letter-spacing:-.025em}
.badge-tile img{width:104px;max-width:100%;height:auto}
.badge-grid{gap:20px}
.badge-discovery summary{min-height:48px}
@media(max-width:999px){
 .app-shell{max-width:430px}
 .topbar{height:109px;padding:23px 26px 16px}
 .brand-lockup{width:91px;height:70px}
 .view{padding:12px 26px 24px}
 .bottomnav{width:min(430px,100%)}
}
@media(min-width:1000px){
 .home-layout{grid-template-columns:1.1fr 1fr;gap:0 64px;align-items:center}
 .home-intro{display:contents}
 .home-intro .hero{grid-column:1;grid-row:1}
 .home-description{grid-column:1;grid-row:2;margin-bottom:24px}
 .home-intro .hero-art{grid-column:2;grid-row:1 / span 3;height:330px;margin:0;max-height:none}
 .home-study{grid-column:1;grid-row:3;width:100%;max-width:420px}
 .view[data-view="home"] h1{font-size:76px}
 .progress-hero h1,.learning-success h2{font-size:62px}
 .progress-companion,.learning-success img{height:180px}
 .progress-details{margin-top:0}
}
@media(max-width:380px){
 .topbar,.view{padding-left:20px;padding-right:20px}
 .view[data-view="home"] h1,.progress-hero h1,.learning-success h2{font-size:43px}
 .topic-row{gap:9px 10px}
 .topic-copy strong{font-size:13px}
}

/* V23: one learning plan, level and badges as one journey. */
.journey-plan{margin-top:20px;padding-top:20px;border-top:1px solid var(--line)}
.next-goal h2{font-size:23px;margin:0 0 8px;line-height:1.16}
.next-goal .muted{font-size:15px;margin:0 0 14px;line-height:1.5}
.journey-plan .level-details{border-top:0;padding-top:18px;margin-top:0}
.next-milestone{display:flex;gap:14px;align-items:center;margin-top:18px}
.next-milestone img{width:64px;height:64px;object-fit:contain;flex:none}
.next-milestone .progress-overline{margin:0 0 4px;font-size:10px}
.next-milestone strong{display:block;font-size:17px}
.next-milestone div>p:last-child{font-size:13px;line-height:1.45;color:var(--muted);margin:5px 0 0}
.journey-collection{margin-top:18px;border-top:1px solid var(--line);padding-top:0}
.journey-collection>summary{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:14px 0;min-height:48px;cursor:pointer;font-size:14px;font-weight:650;list-style:none}
.journey-collection>summary::after{content:'+';font-size:20px}
.journey-collection[open]>summary::after{content:'−'}
.journey-collection>summary span{margin-left:auto;font-weight:400;color:var(--muted);font-size:12px}
.journey-collection h3{font-size:15px;margin:14px 0 10px}
.journey-collection .badge-grid h3{margin:6px 0}
.journey-collection .badge-discovery{margin-top:16px;padding-top:0;border-top:0}
