/* UpperCrust Academy, play layer. Loaded after one.css and wins over it.
   Idea: a gold mohur coin is the unit of progress. Tactile buttons, a winding coin trail on Home, a colour per subject.
   Palette: mohur gold, ledger ink, and one strong colour for each subject. Type: Bricolage Grotesque (headings, numbers) and Figtree (reading). */
:root {
  --gold: #FFB703; --gold-d: #C98600; --gold-tint: #FFF3CF; --gold-ink: #7A4F00;
  --ink: #2A1E12; --ink2: #4A3C2C; --mute: #7D705F;
  --line: #ECE6D8; --line2: #DAD2BF; --soft: #F8F5EC;
  --font: "Figtree", "Noto Sans Devanagari", "Noto Sans Gujarati", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", "Figtree", "Noto Sans Devanagari", "Noto Sans Gujarati", system-ui, sans-serif;
  --r: 22px;
}
body { background: #fff; font-family: var(--font); font-weight: 500; }
h1, h2, .h1, .h2 { font-family: var(--display); letter-spacing: -.02em; }
.h1 { font-weight: 800; font-size: clamp(30px, 4.2vw, 44px); line-height: 1.08; }
.h2 { font-weight: 800; font-size: 24px; line-height: 1.2; }
.h3 { font-family: var(--display); font-weight: 700; }
.lead { font-weight: 500; }
.eyebrow { text-transform: none; letter-spacing: 0; font-weight: 700; font-size: 14px; }

/* ——— Shell ——— */
.side { background: #fff; border-right: 2px solid var(--line); }
.brand .one, .brand b { font-family: var(--display); }
.nav a { border-radius: 16px; padding: 12px 14px; letter-spacing: 0; text-transform: none; border-bottom-width: 2px; transition: background .15s, transform .12s; }
.nav a:hover { background: var(--soft); }
.nav a svg { color: var(--mute); }
.nav a[aria-current="page"] { background: var(--gold); border-color: var(--gold-d); border-bottom-width: 4px; color: var(--ink); }
.nav a[aria-current="page"] svg { color: var(--ink); }
.nav-t b { font: 800 16px/1.1 var(--font); }
.nav a[aria-current="page"] .nav-t small { color: var(--gold-ink); }
.bar-top { background: rgba(255, 255, 255, .94); border-bottom: 2px solid var(--line); }
.pillstat { border-width: 2px; border-bottom-width: 4px; font-family: var(--display); font-weight: 800; background: #fff; }
.pillstat.fire { color: #E8590C; } .pillstat.xp { color: var(--gold-d); }
.tabs { border-top: 2px solid var(--line); }
.tabs a[aria-current="page"] { background: var(--gold-tint); color: var(--ink); }
.tabs a[aria-current="page"] svg { color: var(--gold-d); }

/* ——— Buttons: pressable, with a hard edge ——— */
.btn { height: 52px; padding: 0 26px; border-radius: 16px; border-width: 2px; border-bottom-width: 5px; font: 800 16px/1 var(--font); letter-spacing: 0; transition: transform .08s, filter .15s; }
.btn:active:not([disabled]) { transform: translateY(3px); border-bottom-width: 2px; filter: none; }
.btn.primary { background: var(--gold); border-color: var(--gold-d); color: var(--ink); }
.btn.primary:hover { background: #FFC433; filter: none; }
.btn.ghost { background: #fff; border-color: var(--line2); color: var(--ink); }
.btn.ghost:hover { background: var(--soft); }
.btn.gold { background: var(--gold); border-color: #B97700; color: var(--ink); }
.btn.gold:hover { background: #FFC433; }
.btn.big { height: 60px; padding: 0 36px; font-size: 18px; border-radius: 18px; }
.btn.sm { height: 40px; padding: 0 16px; font-size: 14px; border-bottom-width: 4px; }
.btn.quiet { border-bottom-width: 2px; }

/* ——— Cards and lists ——— */
.card { border: 2px solid var(--line); border-radius: var(--r); box-shadow: none; }
.card.tint { background: var(--gold-tint); border-color: #F6DE8C; }
.card.link { border-bottom-width: 5px; }
.card.link:hover { transform: translateY(-2px); background: #fff; }
.chip { border-width: 2px; border-bottom-width: 4px; font-weight: 800; }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold-d); color: var(--ink); }
.bar { height: 16px; background: var(--line); }
.bar > i { background: linear-gradient(180deg, #FFCB3D, var(--gold)); }
.pill.gold { background: var(--gold-tint); color: var(--gold-ink); }

/* ——— Course cards: one colour per subject ——— */
.cover { background: var(--sb, #FFEFC2); color: var(--sc, #B97700); }
.ccard { border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 24px; box-shadow: none; transition: transform .15s var(--ease), border-color .15s; }
.ccard:hover { transform: translateY(-4px); box-shadow: none; border-color: var(--sc, var(--gold-d)); }
.ccard-meta { text-transform: none; letter-spacing: 0; font: 700 14px var(--font); color: var(--sc, var(--gold-d)); }
.ccard-t { font: 700 19px/1.25 var(--display); letter-spacing: -.01em; }
.ccard-go { border: 0; padding: 7px 16px; border-radius: 99px; background: var(--sc, var(--gold-d)); color: #fff; font-weight: 800; display: inline-block; }

/* ——— Home hero: the coin trail ——— */
.play-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; padding: 36px; border-radius: 28px; color: #fff;
  background: radial-gradient(90% 120% at 100% 100%, rgba(255, 183, 3, .28), transparent 60%), #2A1E12; border-bottom: 6px solid #130D06; }
.ph-copy { display: grid; gap: 12px; align-content: center; z-index: 1; }
.ph-kicker { font: 700 16px var(--font); color: var(--gold); }
.ph-title { font: 800 clamp(28px, 3.4vw, 42px)/1.06 var(--display); letter-spacing: -.025em; text-wrap: balance; }
.ph-sub { color: #F1E8D6; font-size: 16px; } .ph-sub.dim { color: #BDAE94; font-size: 15px; }
.ph-act { gap: 16px; margin-top: 10px; } .ph-pct { color: #BDAE94; font-weight: 700; }
.ph-trail { position: relative; z-index: 1; }
.trail { display: grid; gap: 6px; padding: 4px 0 4px 8px; }
.stop { position: relative; margin-left: calc(36px + var(--x, 0px) * .8); display: block; list-style: none; min-height: 72px; }
.stop:not(:last-child)::after { content: ""; position: absolute; left: 31px; top: 66px; height: 18px; border-left: 4px dotted rgba(255, 255, 255, .28); }
.stop.now::after { top: 90px; }
.stop-in { display: flex; align-items: center; gap: 14px; color: #fff; }
a.stop-in:hover .coin { transform: translateY(-3px) scale(1.04); }
.coin { flex: none; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-bottom-width: 7px; background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .55); transition: transform .15s var(--ease); }
.coin.k-quiz { border-radius: 20px; } .coin.k-exam { border-radius: 50% 50% 50% 14px; }
.coin.done { background: radial-gradient(circle at 35% 30%, #FFE27A, var(--gold) 60%); border-color: #E39A00; border-bottom-color: #A86C00; color: var(--ink); }
.coin.now { width: 80px; height: 80px; background: radial-gradient(circle at 35% 30%, #FFE27A, var(--gold) 62%); border-color: #FFE9A8; border-bottom-color: #B97700; color: var(--ink); box-shadow: 0 0 0 8px rgba(255, 183, 3, .22); animation: coinpulse 2.4s ease-in-out infinite; }
.stop.now { min-height: 96px; margin-left: calc(26px + var(--x, 0px) * .8); }
.stop.now:not(:last-child)::after { left: 41px; }
@keyframes coinpulse { 50% { box-shadow: 0 0 0 14px rgba(255, 183, 3, .08); } }
.tl-t { display: grid; gap: 3px; font: 700 15px/1.25 var(--font); max-width: 150px; color: rgba(255, 255, 255, .7); }
.tl-t b { width: max-content; background: var(--gold); color: var(--ink); padding: 3px 10px; border-radius: 99px; font: 800 13px/1.3 var(--font); }
.stop.now .tl-t, .stop.done .tl-t { color: #fff; }

/* ——— Week strip ——— */
.week { display: flex; gap: 6px; }
.wk { flex: 1; max-width: 38px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); font: 800 13px var(--font); color: var(--mute); }
.wk.on { background: var(--gold); border-color: var(--gold-d); color: var(--ink); }
.wk.today { box-shadow: 0 0 0 3px var(--gold-tint); }

/* ——— Celebrations ——— */
.coins { position: fixed; left: 50%; top: 46%; z-index: 80; pointer-events: none; }
.coins i { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; display: grid; place-items: center; font: 800 16px var(--display); color: #7A4F00;
  background: radial-gradient(circle at 35% 30%, #FFE27A, var(--gold) 65%); border: 2px solid #C98600; transform: scale(var(--s, 1)); opacity: 0; animation: coinfly 1.6s cubic-bezier(.2, .7, .3, 1) var(--d, 0s) forwards; }
@keyframes coinfly { 0% { opacity: 1; transform: translate(0, 0) scale(.4); } 45% { opacity: 1; transform: translate(var(--dx), var(--dy)) scale(var(--s, 1)); } 100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 340px)) scale(var(--s, 1)) rotate(260deg); } }
.pop-pts { position: fixed; left: 50%; top: 38%; z-index: 81; transform: translateX(-50%); padding: 12px 26px; border-radius: 99px; background: var(--ink); color: var(--gold); font: 800 28px var(--display); animation: popup 1.7s ease-out forwards; pointer-events: none; }
@keyframes popup { 0% { opacity: 0; transform: translate(-50%, 16px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.08); } 30% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -34px); } }

/* ——— Lesson and quiz ——— */
.opt { border-radius: 18px; border-width: 2px; border-bottom-width: 5px; font-weight: 700; }
.opt:hover:not([disabled]) { background: var(--soft); }
.opt[aria-pressed="true"] { border-color: var(--gold-d); background: var(--gold-tint); } .opt[aria-pressed="true"] .key { border-color: var(--gold-d); color: var(--gold-ink); }
.focus-top .bar { height: 18px; }
.ring .num { font-family: var(--display); font-weight: 800; }
.xp-chip { font-family: var(--display); }

@media (max-width: 900px) {
  .play-hero { grid-template-columns: 1fr; padding: 26px 22px 22px; gap: 14px; }
  .stop { margin-left: calc(14px + var(--x, 0px) * .6); min-height: 66px; }
  .stop.now { margin-left: calc(6px + var(--x, 0px) * .6); }
  .coin { width: 56px; height: 56px; } .coin.now { width: 72px; height: 72px; }
  .stop:not(:last-child)::after { left: 28px; top: 60px; } .stop.now:not(:last-child)::after { left: 36px; top: 84px; }
}

/* ——— Course page hero: the subject's own colour ——— */
.hero { background: var(--sb, #FFEFC2); color: var(--ink); border-radius: 28px; border: 2px solid var(--sc, var(--gold-d)); border-bottom-width: 6px; padding: 32px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 32px; row-gap: 14px; align-content: center; }
.hero::after { display: none; }
.hero > * { grid-column: 1; margin: 0; }
.hero > .hero-art { grid-column: 2; grid-row: 1 / span 6; align-self: center; }
.hero .hero-art .cover { aspect-ratio: 4 / 3; border-radius: 22px; background: #fff; border: 2px solid var(--sc); }
.hero .h1 { font-family: var(--display); font-weight: 800; color: var(--ink); font-size: clamp(30px, 4vw, 46px) !important; letter-spacing: -.025em; }
.hero .stats b { font: 800 30px/1 var(--display); color: var(--sc); }
.hero .pill { background: #fff; color: var(--ink); } .hero .pill.gold { background: var(--sc); color: #fff; }
.hero a.small { color: var(--ink); }
.hero .btn.primary { background: var(--sc); border-color: var(--ink); color: #fff; box-shadow: none; }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; padding: 22px; } .hero > .hero-art { grid-column: 1; grid-row: auto; } .hero .hero-art .cover { aspect-ratio: 16 / 7; } }

/* ——— Progress: the score card ——— */
.score { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px 32px; align-items: center; padding: 28px; border-radius: 28px; background: var(--ink); color: #fff; border-bottom: 6px solid #130D06; position: relative; overflow: hidden; }
.score > a { grid-column: 1 / -1; justify-self: start; }
.sc-main { display: grid; gap: 8px; }
.sc-label { font: 700 15px var(--font); color: var(--gold); }
.sc-xp { display: flex; align-items: center; gap: 14px; font: 800 clamp(44px, 7vw, 68px)/1 var(--display); letter-spacing: -.03em; }
.sc-coin { display: grid; place-items: center; width: .8em; height: .8em; font-size: .8em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFE27A, var(--gold) 62%); border: 3px solid #C98600; border-bottom-width: 6px; color: #7A4F00; }
.sc-rank { color: #E9DFCB; font-weight: 700; }
.score .bar { background: rgba(255, 255, 255, .16); }
.sc-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sc-stats > div { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; padding: 12px 14px; border-radius: 18px; background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .12); }
.sc-stats svg { grid-row: span 2; color: var(--gold); }
.sc-stats b { font: 800 26px/1 var(--display); } .sc-stats span { font-size: 13px; color: #CDBFA6; font-weight: 600; }
.score .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
@media (max-width: 800px) { .score { grid-template-columns: 1fr; padding: 22px; } }
.hero .row-flex .small { color: var(--ink) !important; }
.sc-coin { width: 54px; height: 54px; font-size: 28px; flex: none; }
.lg-row.head { background: var(--gold-tint); color: var(--ink); text-transform: none; letter-spacing: 0; font: 800 14px var(--font); }
@media (max-width: 600px) {
  .lg-row, .lg-row.head { grid-template-columns: minmax(0, .8fr) repeat(3, minmax(0, 1fr)); padding: 12px 8px; gap: 4px; }
  .lg-row.head { font-size: 11.5px; }
  .lg-realm small { display: none; }
}

/* ——— Practice tiles ——— */
.gtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.gtiles.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.gtile { position: relative; display: grid; gap: 6px; align-content: start; padding: 20px; min-height: 150px; border-radius: 24px; background: var(--sb); color: var(--ink); border: 2px solid var(--sc); border-bottom-width: 6px; transition: transform .12s var(--ease); }
.gtile:hover { transform: translateY(-3px); } .gtile:active { transform: translateY(2px); border-bottom-width: 3px; }
.gtile-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--sc); color: #fff; margin-bottom: 6px; }
.gtile-t { font: 800 21px/1.15 var(--display); letter-spacing: -.01em; }
.gtile-s { font-size: 15px; color: var(--ink2); font-weight: 600; }
.gtile.big { min-height: 170px; } .gtile.big .gtile-t { font-size: 26px; }
.gtile.done { background: #fff; border-color: var(--line2); } .gtile.done .gtile-ic { background: var(--line2); }
.gtile-badge { position: absolute; top: 16px; right: 16px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 99px; background: var(--ok-tint); color: var(--ok-d); font: 800 13px var(--font); }
@media (max-width: 700px) {
  .chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin-inline: -20px; padding: 2px 20px 8px; scrollbar-width: none; }
  .chips.scroll::-webkit-scrollbar { display: none; }
  .chips.scroll .chip { flex: none; white-space: nowrap; }
}
