/* Winelingo course on the web (/course/). Site tokens from site.css; the lesson player follows
   the app: one wine accent, green and red only for right and wrong, orange only for the streak. */
:root{ --ok:#248a3d; --ok-bg:#eaf6ed; --no:#d70015; --no-bg:#fdedef; --orange:#ff9500; --orange-t:#c93400; --track:#ece4e8 }
[hidden]{display:none !important}
body.noscroll{overflow:hidden}
#app{position:relative; z-index:2; min-height:100svh}
.center{text-align:center}
.muted{color:var(--sec)}
.fine{font-size:13px; color:var(--muted); line-height:1.5}
.eyebrow{margin-bottom:10px}
.btn[disabled]{opacity:.45; cursor:default; transform:none !important; box-shadow:none}
.btn-block{width:100%}
.btn-sm{padding:9px 14px; font-size:14px; border-radius:10px}
.btn-ghost{background:var(--paper-raised); border:1px solid var(--line); color:var(--wine-deep)}
.btn-ghost:hover{text-decoration:none; border-color:rgba(123,30,59,.35)}
.btn-ok{background:var(--ok); color:#fff}
.btn-no{background:var(--no); color:#fff}
.btn-apple{background:#000; color:#fff; width:100%}
.linkbtn{border:0; background:none; padding:6px 2px; font:500 14.5px var(--font-body); color:var(--wine); cursor:pointer; display:inline-flex; align-items:center; gap:6px}
.linkbtn.strong{font-weight:600}
.linkbtn:hover{text-decoration:underline}
.spin{width:34px; height:34px; border-radius:50%; border:3px solid rgba(123,30,59,.18); border-top-color:var(--wine); animation:spin .8s linear infinite; margin:80px auto}
@keyframes spin{to{transform:rotate(360deg)}}
.lang{font:500 14px var(--font-body); color:var(--wine-deep); background:var(--paper-raised); border:1px solid var(--line); border-radius:10px; padding:7px 10px; cursor:pointer}

/* ---------- chips ---------- */
.chip{display:inline-flex; align-items:center; gap:5px; padding:6px 11px; border-radius:999px; font:700 14.5px var(--font-body); border:0; line-height:1}
.chip-heart{background:var(--no-bg); color:var(--no); cursor:pointer}
.chip-heart:hover{filter:brightness(.97)}
.chip-flame{background:rgba(255,149,0,.12); color:#a85400}
.chip-flame svg{color:#c9bfc4}
.chip-flame.on svg{color:var(--orange)}

/* ---------- top bar ---------- */
.cbar{position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:12px max(16px, calc((100% - 1040px) / 2)); background:rgba(251,247,244,.9); -webkit-backdrop-filter:saturate(1.4) blur(12px); backdrop-filter:saturate(1.4) blur(12px); border-bottom:1px solid var(--line)}
.cbrand{display:inline-flex; align-items:center; gap:10px; font-family:var(--font-display); font-weight:600; font-size:20px; color:var(--wine-deep)}
.cbrand:hover{text-decoration:none}
.cbrand img{border-radius:8px}
.cbrand.big{font-size:26px; margin-bottom:22px}
.cbrand.big img{border-radius:11px}
.cbar-r{display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end}

/* ---------- auth ---------- */
.auth{min-height:100svh; display:grid; grid-template-columns:1.1fr 1fr}
.auth-photo{background-size:cover; background-position:center; position:relative}
.auth-photo::after{content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(59,10,30,.15), rgba(59,10,30,.55))}
.auth-card{display:flex; flex-direction:column; justify-content:center; padding:48px clamp(24px,5vw,72px); max-width:560px; width:100%}
.auth-card h1{font-size:clamp(32px,4vw,44px); color:var(--wine-deep); letter-spacing:-.02em}
.auth-card .lede{color:var(--sec); font-size:17px; margin:12px 0 26px}
.aform{display:grid; gap:12px}
.aform input{font:500 16.5px var(--font-body); color:var(--ink); padding:14px 15px; border-radius:12px; border:1.5px solid #e5d7de; background:#fff; width:100%}
.aform input:focus{outline:none; border-color:var(--wine); box-shadow:0 0 0 3px rgba(123,30,59,.12)}
.alinks{display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap}
.or{text-align:center; color:var(--muted); font-size:14px}
.amsg{min-height:1.4em; font-size:14.5px; margin:2px 0 0}
.amsg.err{color:var(--wine)}
.amsg.ok{color:var(--vine-text)}
.auth-card .fine{margin-top:14px}
.auth-foot{display:flex; align-items:center; gap:16px; margin-top:22px; font-size:14px}
.auth-foot a{color:var(--sec)}

/* ---------- onboarding ---------- */
.onb{min-height:100svh; display:grid; place-items:center; padding:32px 16px}
.onb-card{width:100%; max-width:560px; background:var(--paper-raised); border:1px solid var(--line); border-radius:24px; box-shadow:var(--shadow-md); padding:28px clamp(20px,4vw,40px) 30px; display:grid; gap:16px}
.onb-top{display:flex; justify-content:space-between; align-items:center; min-height:32px; font-size:14px}
.onb h1{font-size:clamp(26px,3.4vw,34px); color:var(--wine-deep); letter-spacing:-.015em}
.onb .lede{color:var(--sec); margin-top:-6px}
.opts{display:grid; gap:10px}
.opt{display:flex; align-items:center; gap:12px; width:100%; text-align:left; padding:14px 16px; border-radius:14px; border:1.5px solid var(--line); background:#fff; font:500 16px var(--font-body); color:var(--ink); cursor:pointer; transition:border-color .15s, background .15s}
.opt:hover:not([disabled]){border-color:rgba(123,30,59,.35)}
.opt.on{border-color:var(--wine); background:rgba(123,30,59,.05)}
.opt-t{display:flex; flex-direction:column; gap:2px}
.opt-t.row{flex-direction:row; justify-content:space-between; align-items:baseline; width:100%}
.opt-t small{color:var(--sec); font-size:14px; font-weight:400}
.chips{display:flex; flex-wrap:wrap; gap:8px}
.pchip{padding:9px 15px; border-radius:999px; border:1.5px solid var(--line); background:#fff; font:600 14.5px var(--font-body); color:var(--wine-deep); cursor:pointer}
.pchip.on{background:var(--wine); border-color:var(--wine); color:#fff}

/* ---------- course ---------- */
.cmain{max-width:1040px; margin:0 auto; padding:28px 16px 64px}
.notice{background:var(--ok-bg); color:#1d5e2e; border-radius:12px; padding:12px 16px; margin-bottom:18px; font-weight:500}
.csum{display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-bottom:40px}
.csum-l h1{font-size:clamp(30px,4vw,42px); color:var(--wine-deep); letter-spacing:-.02em; margin-bottom:16px}
.xpbar{height:12px; border-radius:12px; background:var(--track); overflow:hidden; margin-bottom:10px; max-width:420px}
.xpbar i{display:block; height:100%; background:linear-gradient(90deg,var(--wine),#a3304f); border-radius:12px; min-width:12px}
.csum .muted{font-size:15px}
.next{background:linear-gradient(155deg,#4a1024,#3b0a1e 60%,#26060f); color:#fff; border-radius:20px; padding:24px 24px 22px; box-shadow:var(--shadow-md); display:flex; flex-direction:column; gap:6px; align-items:flex-start}
.next-k{font-size:11.5px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--gold)}
.next-t{font-family:var(--font-display); font-weight:600; font-size:24px; line-height:1.2}
.next .muted{color:rgba(255,255,255,.7); font-size:14.5px; margin-bottom:10px}
.next .btn-primary{background:#fff; color:var(--wine-deep); box-shadow:none}
.units-head{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px}
.units-head h2{font-size:26px; color:var(--wine-deep)}
.units{display:grid; gap:14px}
.ghead{margin:22px 0 2px}
.ghead h3{font-size:21px; color:var(--wine-deep)}
.ghead p{font-size:15px; margin-top:4px; max-width:60ch}
.unit{background:var(--paper-raised); border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow-sm); overflow:hidden}
.unit.here{border-color:rgba(123,30,59,.35)}
.unit.later{opacity:.92}
.unit-head{display:flex; align-items:center; gap:16px; width:100%; padding:12px; border:0; background:none; text-align:left; cursor:pointer; font:inherit; color:inherit}
.unit-img{flex:0 0 auto; width:96px; height:72px; border-radius:12px; background-size:cover; background-position:center; background-color:#2a0b18}
.unit-body{flex:1; min-width:0; display:flex; flex-direction:column; gap:3px}
.unit-k{font-size:11.5px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--wine)}
.unit-t{font-family:var(--font-display); font-weight:600; font-size:20px; color:var(--wine-deep); line-height:1.2}
.unit-prog{display:flex; align-items:center; gap:10px; font-size:13px; font-weight:600; color:var(--sec)}
.unit-prog > i{flex:0 1 180px; height:6px; border-radius:6px; background:var(--track); overflow:hidden}
.unit-prog > i b{display:block; height:100%; background:var(--wine); border-radius:6px}
.unit-done{display:grid; place-items:center; width:20px; height:20px; border-radius:50%; background:var(--ok); color:#fff}
.unit-tog{color:var(--muted); transition:transform .2s; padding:0 6px}
.unit-head[aria-expanded="true"] .unit-tog{transform:rotate(180deg)}
.lessons{list-style:none; margin:0; padding:4px 12px 12px; display:grid; gap:2px}
.lrow{display:flex; align-items:center; gap:14px; padding:10px 8px; border-top:1px solid var(--line)}
.lnode{flex:0 0 auto; width:36px; height:36px; border-radius:50%; display:grid; place-items:center; background:var(--wine); color:#fff}
.lrow.done .lnode{background:var(--ok)}
.lrow.locked .lnode{background:#ebe5e8; color:#a99ea5}
.lrow.current .lnode{box-shadow:0 0 0 5px rgba(123,30,59,.15)}
.lmeta{flex:1; min-width:0; display:flex; flex-direction:column}
.lt{font-weight:600; font-size:15.5px; color:var(--ink)}
.lrow.locked .lt{color:var(--muted)}
.ls{font-size:13.5px; color:var(--muted)}

/* ---------- dialog ---------- */
.dlg-back{position:fixed; inset:0; z-index:60; background:rgba(30,8,16,.45); display:grid; place-items:center; padding:16px}
.dlg{width:100%; max-width:460px; background:var(--paper-raised); border-radius:20px; box-shadow:var(--shadow-lg); padding:26px 24px 22px; display:grid; gap:12px}
.dlg h2{font-size:24px; color:var(--wine-deep)}
.dlg p{color:var(--ink); font-size:15.5px; margin-bottom:8px}
.dlg-btns{display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap; margin-top:6px}

/* ---------- lesson player ---------- */
.player{position:fixed; inset:0; z-index:50; background:#fdfdfe; overflow-y:auto}
.pl-load{min-height:100%; display:grid; place-items:center}
.pl-wrap{max-width:680px; min-height:100%; margin:0 auto; display:flex; flex-direction:column; padding:0 20px}
.pl-top{position:sticky; top:0; z-index:3; display:flex; align-items:center; gap:12px; padding:16px 0 12px; background:#fdfdfe}
.pl-close{flex:0 0 auto; width:34px; height:34px; border-radius:50%; border:0; background:rgba(118,118,128,.12); color:#5c525a; display:grid; place-items:center; cursor:pointer}
.pl-prog{flex:1; height:12px; border-radius:12px; background:var(--track); overflow:hidden}
.pl-prog i{display:block; height:100%; background:var(--wine); border-radius:12px; transition:width .4s var(--ease)}
.pl-body{flex:1; display:flex; flex-direction:column; gap:16px; padding:14px 0 28px}
.pl-body.center{align-items:center; text-align:center; justify-content:center}
.pl-foot{position:sticky; bottom:0; padding:12px 0 20px; background:linear-gradient(180deg, rgba(253,253,254,0), #fdfdfe 22%); display:grid; gap:10px}
.keyhint{font-size:12.5px; color:var(--muted); text-align:center}
.kicker{font-size:12px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--wine)}
.teach-t{font-size:clamp(26px,3.4vw,32px); color:var(--wine-deep); letter-spacing:-.015em}
.q{font-size:clamp(22px,3vw,27px); color:var(--ink); line-height:1.25; font-weight:600}
.rich p{margin:0 0 12px}
.rich ul{margin:0 0 12px; padding-left:20px}
.rich li{margin:0 0 6px}
.teach-b{font-size:18px; line-height:1.6; color:var(--ink)}
.teach-img{margin:0}
.teach-img img{width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:16px; background:#eee}
.teach-img figcaption{text-align:right; font-size:12px; margin-top:4px}
.teach-img figcaption a{color:var(--muted)}
.tip{display:flex; gap:12px; padding:14px 16px; border-radius:14px; background:rgba(123,30,59,.06); color:var(--wine)}
.tip p{color:var(--ink); font-size:16px; margin:0}
.nerd-pill{align-self:flex-start; display:inline-flex; align-items:center; gap:8px; padding:9px 15px; border-radius:999px; border:1.5px solid rgba(123,30,59,.25); background:#fff; color:var(--wine); font:600 14.5px var(--font-body); cursor:pointer}
.nerd{border-radius:14px; border:1px solid rgba(123,30,59,.18); background:#fff; padding:14px 16px}
.nerd-k{display:flex; align-items:center; gap:8px; font-size:12px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--wine); margin-bottom:8px}
.player .opts{gap:10px}
.player .opt{padding:13px 14px}
.player .opt .mark{flex:0 0 auto; width:24px; height:24px; border-radius:50%; border:1.5px solid #cfc4ca; display:grid; place-items:center; font-size:12px; font-weight:700; color:var(--muted)}
.player .opt.sq .mark{border-radius:7px}
.player .opt.on .mark{background:var(--wine); border-color:var(--wine); color:#fff}
.player .opt.right{border-color:var(--ok); background:var(--ok-bg)}
.player .opt.right .mark{background:var(--ok); border-color:var(--ok); color:#fff}
.player .opt.wrong{border-color:var(--no); background:var(--no-bg)}
.player .opt.wrong .mark{background:var(--no); border-color:var(--no); color:#fff}
.player .opt.dim{opacity:.45}
.opt-l{flex:1; font-size:16.5px; line-height:1.35}
.tf{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.tf-t{display:flex; flex-direction:column; align-items:center; gap:10px; padding:22px 12px; border-radius:16px; border:1.5px solid var(--line); background:#fff; font:600 17px var(--font-body); color:var(--ink); cursor:pointer}
.tf-i{width:44px; height:44px; border-radius:50%; display:grid; place-items:center; background:rgba(118,118,128,.12)}
.tf-t.on{border-color:var(--wine); background:rgba(123,30,59,.05)} .tf-t.on .tf-i{background:var(--wine); color:#fff}
.tf-t.right{border-color:var(--ok); background:var(--ok-bg)} .tf-t.right .tf-i{background:var(--ok); color:#fff}
.tf-t.wrong{border-color:var(--no); background:var(--no-bg)} .tf-t.wrong .tf-i{background:var(--no); color:#fff}
.tf-t.dim{opacity:.45}
.match{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.mcol{display:grid; gap:10px; align-content:start}
.mbtn{min-height:56px; padding:10px 12px; border-radius:14px; border:1.5px solid var(--line); background:#fff; font:500 15.5px var(--font-body); color:var(--ink); cursor:pointer; text-align:center}
.mbtn.on{border-color:var(--wine); background:rgba(123,30,59,.05)}
.mbtn.wrong{border-color:var(--no); background:var(--no-bg); animation:shake .3s}
.mbtn.right{border-color:var(--ok); background:var(--ok-bg)}
.mbtn.gone{opacity:.5; cursor:default}
@keyframes shake{25%{transform:translateX(-4px)} 75%{transform:translateX(4px)}}

/* One thing at a time, like the app: each part of a step fades up after the one before. */
.rv{opacity:0; transform:translateY(8px); animation:rv .45s var(--ease) forwards; animation-delay:calc(var(--d, 0) * 110ms)}
@keyframes rv{to{opacity:1; transform:none}}

.sheet{position:fixed; left:0; right:0; bottom:0; z-index:5; animation:up .28s var(--ease)}
.sheet.ok{background:var(--ok-bg)} .sheet.no{background:var(--no-bg)}
.sheet-in{max-width:680px; margin:0 auto; padding:20px 20px 22px; display:grid; gap:8px}
.sheet-t{display:flex; align-items:center; gap:8px; font-family:var(--font-display); font-weight:600; font-size:23px}
.sheet.ok .sheet-t{color:var(--ok)} .sheet.no .sheet-t{color:var(--no)}
.sheet-a{color:var(--no); font-weight:600}
.sheet-w{color:var(--ink); font-size:16px}
.sheet-l{display:flex; align-items:center; gap:6px; font-size:13.5px; color:var(--sec)}
.sheet .btn{margin-top:6px}
@keyframes up{from{transform:translateY(100%)}}

.out{position:fixed; inset:0; z-index:8; background:#fdfdfe; display:grid; place-items:center; padding:24px}
.out-in{max-width:420px; display:grid; gap:12px; text-align:center; justify-items:center}
.out-heart{position:relative; color:var(--no)}
.out-heart span{position:absolute; inset:0; display:grid; place-items:center; color:#fff; font-weight:700; font-size:20px; padding-bottom:4px}
.out h2{font-size:28px; color:var(--wine-deep)}

.ring{--p:0; width:180px; height:180px; border-radius:50%; display:grid; place-items:center; align-content:center; margin:8px 0 6px;
  background:radial-gradient(closest-side, #fdfdfe 79%, transparent 80% 100%), conic-gradient(var(--wine) calc(var(--p) * 1%), var(--track) 0); color:var(--ok)}
.ring b{font-family:var(--font-display); font-size:46px; color:var(--wine-deep); line-height:1}
.ring span{font-size:12.5px; color:var(--sec); max-width:110px}
.done h2{font-size:30px; color:var(--wine-deep)}
.stats{display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-top:8px}
.stat{min-width:104px; border-radius:14px; padding:10px 14px; border:1.5px solid; display:grid; gap:2px}
.stat b{font-size:22px} .stat span{font-size:12px; font-weight:600}
.stat.wine{border-color:rgba(123,30,59,.3); color:var(--wine)} .stat.green{border-color:rgba(36,138,61,.35); color:var(--ok)} .stat.orange{border-color:rgba(255,149,0,.45); color:var(--orange-t)}
.outcomes{width:100%; text-align:left; background:#fff; border:1px solid var(--line); border-radius:16px; padding:16px 18px; margin-top:8px}
.outcomes h3{font-size:18px; color:var(--wine-deep); margin-bottom:10px}
.outcomes ul{list-style:none; margin:0; padding:0; display:grid; gap:8px}
.outcomes li{display:flex; gap:10px; align-items:flex-start; font-size:15.5px}
.outcomes li svg{color:var(--ok); flex:0 0 auto; margin-top:3px}
.nerd-offer{display:flex; align-items:center; gap:12px; padding:14px 16px; border-radius:14px; background:rgba(123,30,59,.06)}
.nerd-offer div{flex:1; display:grid; gap:2px} .nerd-offer b{color:var(--wine-deep)} .nerd-offer span{font-size:14px; color:var(--sec)}
.row2{display:flex; gap:10px} .row2 .btn{flex:1}
.article h2{font-size:30px; color:var(--wine-deep)}
.article .lede{font-size:18px; color:var(--sec)}
.article .rich{font-size:17px; line-height:1.65}
.streak .flame{color:var(--orange)}
.streak-n{font-family:var(--font-display); font-size:72px; line-height:1; color:var(--orange-t)}
.streak-u{font-weight:600; color:var(--orange-t)}
.week{display:flex; gap:10px; margin-top:14px}
.wd{display:grid; justify-items:center; gap:6px; font-size:12.5px; color:var(--muted); font-weight:600}
.wd.today{color:var(--orange-t)}
.wd i{width:32px; height:32px; border-radius:50%; background:var(--track); display:grid; place-items:center; color:#fff}
.wd i.on{background:var(--orange)}

@media (max-width:820px){
  .auth{grid-template-columns:1fr}
  .auth-photo{height:180px}
  .auth-card{max-width:none; padding:28px 20px 40px}
  .csum{grid-template-columns:1fr}
}
@media (max-width:560px){
  .cbar .lang{max-width:96px}
  .cbar .cbrand{font-size:0; gap:0}
  .unit-img{width:72px; height:60px}
  .unit-t{font-size:18px}
  .lrow{flex-wrap:wrap; row-gap:8px}
  .lrow .lmeta{flex-basis:calc(100% - 50px)}
  .lrow .btn{margin-left:50px}
  .match{gap:8px}
}
@media (prefers-reduced-motion:reduce){ .rv{animation:none; opacity:1; transform:none} .sheet{animation:none} }

/* ---------- paying on the web ---------- */
.chip-pro{background:linear-gradient(135deg,#7b1e3b,#a3304f); color:#fff; font-size:12.5px; letter-spacing:.02em}
.unit-k{display:inline-flex; align-items:center; gap:8px; flex-wrap:wrap}
.tag{display:inline-flex; align-items:center; gap:4px; padding:2px 8px; border-radius:999px; font-size:10.5px; letter-spacing:.08em}
.tag.free{background:var(--ok-bg); color:#1d5e2e}
.tag.paid{background:rgba(201,162,74,.18); color:#7a5a12}
.dlg:has(.pw){max-width:740px}
.plans{display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:14px 0 10px}
.plan{display:flex; flex-direction:column; gap:4px; border:1.5px solid var(--line); border-radius:16px; padding:18px 18px 16px; background:#fff}
.plan.monthly{border-color:rgba(123,30,59,.45); box-shadow:0 0 0 4px rgba(123,30,59,.06)}
.dlg .plan-n{font-size:12px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--wine); margin:0 !important}
.dlg .plan-p{font-family:var(--font-display); font-weight:600; font-size:26px; color:var(--wine-deep); margin:0 !important}
.dlg .plan-note{font-size:14px !important; color:var(--sec) !important}
.plan ul{list-style:none; margin:6px 0 14px; padding:0; display:grid; gap:7px; flex:1}
.plan li{display:flex; gap:8px; align-items:flex-start; font-size:14.5px}
.plan li svg{flex:0 0 auto; margin-top:3px; color:var(--ok)}
.plan li.no{color:var(--muted)} .plan li.no svg{color:var(--muted)}
.pw-soon{background:rgba(201,162,74,.14); border-radius:12px; padding:12px 14px; font-size:14.5px !important}
.pw .fine{margin-top:4px}
@media (max-width:620px){ .plans{grid-template-columns:1fr} }
