/* learning/static/learning/hero.css — the one app hero ({% lp_hero %}, learning/hero.py).
   Skins: .ah--jp (Japanese red), .ah--fr (French navy), .ah--py (Python green). */
.ah { --ah-a: #D2483A; --ah-b: #A5262B; --ah-c: #6E1712; --ah-soft: #FBD9D3; --ah-text: #FCE9E6; --ah-shadow: rgba(110,23,18,.8); --ah-ink: #7B1D16;
  padding: 26px 24px 8px; font-family: var(--font-body, 'Geist', system-ui, sans-serif); }
.ah--fr { --ah-a: #2F67A8; --ah-b: #1A3A5C; --ah-c: #0C2038; --ah-soft: #CFE0F4; --ah-text: #E6EEF8; --ah-shadow: rgba(12,32,56,.75); --ah-ink: #14385F; }
.ah--py { --ah-a: #34A865; --ah-b: #1E8449; --ah-c: #0D4A28; --ah-soft: #CDEFD9; --ah-text: #E5F6EB; --ah-shadow: rgba(13,74,40,.75); --ah-ink: #145E33; }
.ah *, .ah *::before, .ah *::after { box-sizing: border-box; }
.ah__box { position: relative; overflow: hidden; max-width: 1152px; margin: 0 auto; padding: 40px; border-radius: 28px; color: #fff;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 32px; align-items: center;
  background: radial-gradient(120% 140% at 100% 0%, var(--ah-a) 0%, var(--ah-b) 42%, var(--ah-c) 100%);
  box-shadow: 0 40px 70px -40px var(--ah-shadow); }
.ah__box[data-glyph]::after { content: attr(data-glyph); position: absolute; right: -30px; bottom: -110px; font-size: 380px; line-height: 1; font-weight: 700;
  font-family: 'Hiragino Mincho ProN', 'Yu Mincho', Georgia, serif; color: rgba(255,255,255,.05); pointer-events: none; }
.ah__box > * { position: relative; z-index: 1; }
.ah__main { min-width: 0; }
.ah__kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ah-soft); }
.ah__kicker::before { content: ''; width: 20px; height: 2px; border-radius: 1px; background: var(--ah-soft); flex: none; }
.ah__title { margin: 0 0 14px; font-size: clamp(36px, 5.4vw, 64px); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; color: #fff; }
.ah__sub { margin: 0 0 22px; max-width: 560px; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.5; color: var(--ah-text); }
.ah__cta { display: inline-flex; align-items: center; gap: 14px; min-height: 50px; padding: 0 22px; border-radius: 999px; background: #fff; color: var(--ah-ink) !important;
  font-weight: 700; font-size: 15.5px; text-decoration: none !important; box-shadow: 0 14px 30px -16px rgba(0,0,0,.55); transition: transform .14s ease, filter .14s; max-width: 100%; }
.ah__cta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah__cta:hover { transform: translateY(-1px); filter: brightness(.97); }

.ah__ctas { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ah__ghost { display: inline-flex; align-items: center; min-height: 50px; padding: 0 20px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.4);
  color: #fff !important; font-weight: 650; font-size: 15px; text-decoration: none !important; transition: background .15s; }
.ah__ghost:hover { background: rgba(255,255,255,.1); }
.ah__note { margin: 14px 0 0; font-size: 14px; color: var(--ah-text); }
.ah__side { display: grid; gap: 14px; min-width: 0; }
.ah__visual { display: grid; place-items: center; min-height: 140px; padding: 18px; border-radius: 20px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ah__card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 6px 18px; align-items: center; padding: 18px 20px; border-radius: 20px;
  background: rgba(0,0,0,.2); border: 1px solid rgba(255,255,255,.18); }
.ah__ring { position: relative; width: 112px; height: 112px; display: grid; place-items: center; align-content: center; }
.ah__ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ah__ring-bg { fill: none; stroke: rgba(255,255,255,.16); stroke-width: 10; }
.ah__ring-fg { fill: none; stroke: #fff; stroke-width: 10; stroke-linecap: round; animation: ah-ring 1.1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes ah-ring { from { stroke-dashoffset: var(--ah-from); } }
.ah__ring-n { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.ah__ring-d { margin-top: 3px; font-size: 12px; color: var(--ah-soft); font-variant-numeric: tabular-nums; }
.ah__info { min-width: 0; display: grid; gap: 8px; justify-items: start; }
.ah__k { margin: 0; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ah-soft); }
.ah__stack { display: flex; width: 100%; height: 9px; border-radius: 5px; overflow: hidden; background: rgba(255,255,255,.14); }
.ah__sw { display: block; height: 100%; }
.ah__sw--learning { background: rgba(255,255,255,.38); }
.ah__sw--practicing { background: rgba(255,255,255,.58); }
.ah__sw--familiar { background: rgba(255,255,255,.8); }
.ah__sw--strong { background: #fff; }
.ah__sw--mastered { background: #F2C14E; }
.ah__legend { margin: 0; font-size: 13px; color: var(--ah-text); }
.ah__legend b { color: #fff; }
.ah__chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: #F7D774; background: rgba(242,193,78,.14); border: 1px solid rgba(242,193,78,.45); }
.ah__here { grid-column: 1 / -1; margin: 8px 0 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.16); font-size: 14px; font-weight: 600; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah__here span { margin-right: 8px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ah-soft); }
.ah__card--anon { grid-template-columns: 72px minmax(0, 1fr); }
.ah__flag { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 18px; background: rgba(255,255,255,.12); font-size: 34px; font-weight: 700;
  font-family: 'Hiragino Mincho ProN', 'Yu Mincho', Georgia, serif; }
.ah__anon-t { margin: 0; font-size: 17px; font-weight: 700; }
.ah__anon-s { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ah-text); }
.ah__anon-cta { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px; background: #fff; color: var(--ah-ink) !important;
  font-weight: 700; font-size: 13.5px; text-decoration: none !important; }

@media (max-width: 900px) {
  .ah__box { grid-template-columns: 1fr; gap: 22px; }
  .ah__side { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .ah { padding: 18px 16px 6px; }
  .ah__box { padding: 28px 22px; border-radius: 22px; }
  .ah__box[data-glyph]::after { font-size: 260px; bottom: -80px; }
  .ah__cta { flex: 1 1 100%; justify-content: space-between; }
  .ah__ghost { flex: 1 1 100%; justify-content: center; }
  .ah__card { grid-template-columns: 92px minmax(0, 1fr); padding: 16px; }
  .ah__ring { width: 92px; height: 92px; }
  .ah__ring-n { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) { .ah__ring-fg { animation: none; } }

/* ── Compact (Nov 2026): the hero is a band, not a page. Tighter on desktop; on a phone only kicker, title,
   the button and one slim progress strip (no subtitle, visual, second button or "You're at"). ── */
.ah { padding: 18px 24px 4px; }
.ah__box { padding: 28px 32px; gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); border-radius: 24px; }
.ah__box[data-glyph]::after { font-size: 260px; bottom: -80px; }
.ah__kicker { margin-bottom: 10px; font-size: 11px; }
.ah__title { font-size: clamp(28px, 3.4vw, 44px); margin-bottom: 10px; letter-spacing: -.03em; }
.ah__sub { font-size: 16px; margin-bottom: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ah__cta, .ah__ghost { min-height: 44px; font-size: 14.5px; }
.ah__side { gap: 10px; }
.ah__visual { min-height: 0; padding: 10px; overflow: hidden; border-radius: 16px; }
.ah__visual > * { zoom: .78; }          /* the app's own visual, shown smaller so the hero stays a band */
.ah__card { grid-template-columns: 76px minmax(0, 1fr); gap: 4px 14px; padding: 12px 14px; border-radius: 16px; }
.ah__ring { width: 76px; height: 76px; }
.ah__ring-n { font-size: 21px; }
.ah__ring-d { font-size: 10.5px; }
.ah__info { gap: 6px; }
.ah__chip { min-height: 26px; font-size: 12px; padding: 0 10px; }
.ah__here { margin-top: 6px; padding-top: 8px; font-size: 13px; }
.ah__card--anon { grid-template-columns: 52px minmax(0, 1fr); }
.ah__flag { width: 52px; height: 52px; font-size: 26px; border-radius: 14px; }
.ah__anon-t { font-size: 15px; }
@media (max-width: 900px) {
  .ah__box { grid-template-columns: 1fr; gap: 16px; }
  .ah__visual { display: none; }
}
@media (max-width: 760px) {
  .ah { padding: 10px 12px 2px; }
  .ah__box { padding: 18px 18px 16px; border-radius: 20px; gap: 12px; }
  .ah__box[data-glyph]::after { font-size: 170px; right: -16px; bottom: -50px; }
  .ah__kicker { margin-bottom: 6px; font-size: 10px; letter-spacing: .16em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .ah__kicker::before { display: none; }
  .ah__title { font-size: 24px; line-height: 1.12; margin-bottom: 12px; }
  .ah__title br { display: none; }
  .ah__sub, .ah__ghost, .ah__note, .ah__here { display: none; }
  .ah__cta { min-height: 44px; font-size: 14px; padding: 0 16px; }
  /* the progress card → one slim strip: small ring · bar · chip */
  .ah__card { grid-template-columns: 46px minmax(0, 1fr); padding: 8px 12px; gap: 0 12px; border-radius: 14px; }
  .ah__ring { width: 46px; height: 46px; }
  .ah__ring svg circle { stroke-width: 12; }
  .ah__ring-n { font-size: 14px; }
  .ah__ring-d { display: none; }
  .ah__info { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k chip" "bar bar"; align-items: center; gap: 6px 8px; }
  .ah__k { grid-area: k; font-size: 10px; }
  .ah__stack { grid-area: bar; height: 6px; }
  .ah__chip { grid-area: chip; min-height: 22px; font-size: 11px; padding: 0 8px; }
  .ah__card--anon { grid-template-columns: 40px minmax(0, 1fr); }
  .ah__flag { width: 40px; height: 40px; font-size: 20px; border-radius: 10px; }
  .ah__anon-s { display: none; }
  .ah__anon-cta { min-height: 32px; font-size: 12.5px; }
}

/* ── Skins = the app icons' own colours (Nov 2026): Japanese wine red (#8E1A16 → #560C0A), French navy
   (#103A78 → #07203F), Python the icon's gold (#F7B502) with its navy (#113D71) for text and the button. ── */
.ah--jp { --ah-a: #A8241D; --ah-b: #7E1512; --ah-c: #4E0A08; --ah-soft: #F6CFCB; --ah-text: #FBE4E1; --ah-shadow: rgba(78,10,8,.75); --ah-ink: #7E1512; }
.ah--fr { --ah-a: #1D4F93; --ah-b: #103A78; --ah-c: #07203F; --ah-soft: #C9DAF2; --ah-text: #E3ECF8; --ah-shadow: rgba(7,32,63,.75); --ah-ink: #103A78; }
.ah--py { --ah-a: #FFD24D; --ah-b: #F7B502; --ah-c: #E39B00; --ah-soft: #2A4F80; --ah-text: #1E3F6B; --ah-shadow: rgba(170,110,0,.55); --ah-ink: #113D71; }
.ah--py .ah__box { color: #0F2E57; }
.ah--py .ah__box[data-glyph]::after { color: rgba(17,61,113,.07); }
.ah--py .ah__title { color: #0E2A52; }
.ah--py .ah__cta { background: #113D71; color: #fff !important; box-shadow: 0 14px 30px -16px rgba(17,61,113,.7); }
.ah--py .ah__ghost { color: #113D71 !important; border-color: rgba(17,61,113,.35); }
.ah--py .ah__ghost:hover { background: rgba(17,61,113,.08); }
.ah--py .ah__visual { background: rgba(255,255,255,.5); border-color: rgba(17,61,113,.15); }
.ah--py .ah__card { background: #113D71; border-color: #113D71; color: #fff; }
.ah--py .ah__card .ah__k, .ah--py .ah__card .ah__ring-d { color: #FFE08A; }
.ah--py .ah__card .ah__here, .ah--py .ah__card .ah__legend, .ah--py .ah__card .ah__anon-s { color: #E6EEF8; }
.ah--py .ah__card .ah__here span { color: #FFE08A; }
.ah--py .ah__ring-fg { stroke: #FFD24D; }
.ah--py .ah__sw--strong, .ah--py .ah__sw--familiar { background: #FFD24D; }
.ah--py .ah__anon-cta { background: #FFD24D; color: #113D71 !important; }
.ah--py .ah__flag { background: rgba(255,255,255,.12); color: #FFD24D; }

/* ── Signed in: the right side is the "where you are" card (learning/_level_nav.html, dark) — overall progress, a tab
   per level / category, the selected level's next lesson. The hero's own Continue is the card's panel now. ── */
.ah[data-ah-nav] .ah__cta { display: none; }
.ah__navcard { padding: 14px 14px 12px; border-radius: 18px; background: rgba(0,0,0,.2); border: 1px solid rgba(255,255,255,.18); }
.ah__navcard-k { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ah-soft); }
.ah--py .ah__navcard { background: #113D71; border-color: #113D71; }
.ah--py .ah__navcard-k { color: #FFE08A; }
.ah--py .ln--dark { --ln-c: #F7B502; }
.ah--py .ln--dark .ln__go { background: #FFD24D; color: #113D71; }
@media (max-width: 760px) {
  .ah__navcard { padding: 10px; border-radius: 14px; }
  .ah__navcard-k { display: none; }
}
.ah__visual[hidden] { display: none !important; }

/* ── The level hero ({% lp_level_hero %}, learning/_level_hero.html): the same box on a level / category / part
   page; the card holds that level's own progress, mastery and the page's stat. ── */
.ah--level .ah__card--level { align-items: center; }
.ah--level .ah__legend { line-height: 1.35; }
.ah--level .ah__stat { color: #fff; }
.ah__how { font-size: 12.5px; font-weight: 650; color: var(--ah-soft) !important; text-decoration: underline !important; text-underline-offset: 2px; }
.ah--py .ah__how { color: #FFE08A !important; }
@media (max-width: 760px) {
  .ah--level .ah__ghost { display: inline-flex; flex: 0 1 auto; min-height: 40px; }
  .ah--level .ah__card--level .ah__info { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; }
  .ah--level .ah__card--level .ah__k, .ah--level .ah__card--level .ah__stack { grid-area: auto; }
  .ah--level .ah__card--level .ah__legend:not(.ah__stat):first-of-type, .ah--level .ah__how { display: none; }
}
.ah--level { padding: 6px 0 18px; }          /* inside the page's own column */
