/* Shared site palette; learning components stay scoped to preserve other layouts. */
/* Temporary navigation mode: remove the body class to restore learning tabs. */
body.downloads-only .main-nav [data-route]:not([data-route="downloads"]):not([data-route="about"]):not(.active),
body.downloads-only .mobile-nav [data-route]:not([data-route="downloads"]):not([data-route="about"]):not(.active) { display: none !important; }
/* The page a guest landed on keeps its own tab visible, otherwise the active
   state points at a link that no longer exists. */
body.downloads-only .main-nav [data-route].active,
body.downloads-only .mobile-nav [data-route].active { display: flex !important; }
body.downloads-only .mobile-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(280px, calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right))); }
body.downloads-only .mobile-nav:has(.nav-link.active[data-route]:not([data-route="downloads"]):not([data-route="about"])) { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(400px, calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right))); }
@media (max-width: 820px) {
  body.downloads-only .mobile-nav,
  body.downloads-only .mobile-nav:has(.nav-link.active[data-route]:not([data-route="downloads"]):not([data-route="about"])) { width: 100%; }
}
:root { --accent: #b8491c; --accent-dark: #9c3d17; }
.mobile-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.learn-breadcrumb { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin: 0 0 24px; font-size: 13px; line-height: 1.7; color: #6d7478; }
.learn-breadcrumb a { color: #b8491c; }
.learn-breadcrumb [aria-current] { color: #253440; overflow-wrap: anywhere; }
.learn-login-page { max-width: 480px !important; }
.learn-login-card { padding: 28px; background: white; border: 1px solid #e9e5df; border-radius: 18px; margin: 24px 0; }
.learn-login-card > p { font-size: 14px; color: #6d7478; line-height: 1.8; margin: 0 0 24px; }
@media (max-width: 760px) { .learn-login-card { padding: 22px; } }
.topbar .main-nav .nav-link.active { background: linear-gradient(135deg, #d96f35, #e8652f); color: #fff; box-shadow: 0 6px 14px -4px rgba(196, 81, 33, 0.38); }
/* 821–1024px used to fall between the bottom bar (≤820) and this rule, which
   left iPads and landscape phones with an icon-only header and no labels. */
@media (min-width: 821px) { .main-nav .nav-link span { display: inline; } }
.learning-page { --brand-orange: #b8491c; --brand-blue: #287d9a; --brand-gold: #ad801c; --path-color: var(--brand-orange); --accent: var(--brand-orange); --accent-dark: #9c3d17; max-width: 1140px; margin: 0 auto; padding: 16px 0 60px; color: #253440; }
.learning-page svg { width: 20px; height: 20px; flex: 0 0 auto; }
.learning-page .button { min-height: 48px; border-radius: 12px; font-size: 14px; gap: 12px; }
.learning-page .button.accent { background: var(--brand-orange); border-color: var(--brand-orange); color: white; box-shadow: 0 3px 0 #9c3d17; }
.learning-page .button.accent:hover { filter: brightness(1.08); transform: translateY(-1px); }
.learning-page .button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.learning-page .text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--path-color); font-size: 13px; }
.learn-eyebrow { display: block; color: var(--path-color); font-size: 12px; font-weight: 750; letter-spacing: .13em; }
.learn-heading { margin: 12px 0 32px; }
.learn-heading h1 { font-size: clamp(25px, 3vw, 36px); line-height: 1.4; font-weight: 750; margin: 13px 0 10px; letter-spacing: -.035em; }
.learn-heading p { margin: 0; font-size: 14px; line-height: 1.8; color: #6d7478; }
.learn-dashboard { display: grid; grid-template-columns: minmax(0, 1fr) 286px; gap: 32px; align-items: start; }
.learn-primary, .learn-aside { min-width: 0; }
.learn-today-card { padding: 30px; border-radius: 22px; background: #fff; border: 1px solid #e9e5df; box-shadow: 0 8px 32px #a6552408; position: relative; overflow: hidden; }
.learn-today-card::after { content: ""; width: 210px; height: 210px; position: absolute; top: -158px; right: -80px; border: 20px solid #ffd5b6; border-left-color: #d5effb; border-bottom-color: #ffe7a3; border-radius: 50%; transform: rotate(-25deg); box-shadow: 0 0 0 12px #f8edca; pointer-events: none; }
.learn-card-top { position: relative; z-index: 1; }
.learn-cover { display: block; overflow: hidden; background: #f3eee5; flex-shrink: 0; }
.learn-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.learn-today-feature { display: grid; grid-template-columns: minmax(0, 1fr); }
.has-cover .learn-today-feature { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); align-items: center; gap: 26px; margin: 26px 0; }
.has-cover .learn-today-copy { margin: 0; }
.has-cover .learn-today-copy h2 { font-size: clamp(23px, 2.2vw, 29px); }
.learn-hero-cover { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; }
.learn-today-card.has-cover::after { display: none; }
.learn-path-cover { width: calc(100% + 48px); margin: -24px -24px 20px; aspect-ratio: 16 / 9; border-radius: 17px 17px 0 0; }
.learn-path-card.is-selected .learn-path-cover { width: calc(100% + 46px); margin: -23px -23px 20px; border-radius: 16px 16px 0 0; }
.learn-path-card:has(.learn-path-cover) h2 { margin-top: 14px; }
.learn-path-card:has(.learn-path-cover) p { min-height: 0; margin-bottom: 14px; }
.learn-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.learn-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 8px; color: var(--path-color); background: color-mix(in srgb, var(--path-color) 8%, white); font-size: 12px; font-weight: 650; }
.learn-pill svg { width: 16px; height: 16px; }
.learn-today-copy { margin: 33px 0 23px; }
.learn-today-copy h2 { font-size: clamp(23px, 2.6vw, 31px); line-height: 1.45; margin: 11px 0 12px; letter-spacing: -.025em; overflow-wrap: anywhere; }
.learn-today-copy p { margin: 0; max-width: 540px; font-size: 14px; color: #6d7478; line-height: 1.9; }
.learn-session-meta { display: flex; flex-wrap: wrap; gap: 9px 22px; font-size: 12px; color: #6d7478; padding: 0 0 25px; border-bottom: 1px solid #f0ece5; }
.learn-session-meta span { display: inline-flex; align-items: center; gap: 6px; }
.learn-session-meta svg { width: 15px; height: 15px; }
.learn-main-actions { margin-top: 24px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.learn-main-actions .button { min-width: 190px; justify-content: space-between; }
.learn-main-actions > span { font-size: 12px; color: #6d7478; }
.learn-section-heading { display: flex; justify-content: space-between; align-items: center; margin: 32px 0 16px; gap: 12px; }
.learn-section-heading h2 { font-size: 17px; margin: 0; }
.learn-week { padding: 26px 22px 20px; border-radius: 20px; background: #fff7df; border: 1px solid #f2dfc0; }
.learn-week h2 { font-size: 19px; line-height: 1.5; letter-spacing: -.02em; margin: 15px 0 23px; max-width: none; }
.learn-week-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.learn-week-days > div { display: grid; justify-items: center; gap: 9px; }
.learn-week-days span { font-size: 12px; color: #6d7478; }
.learn-week-days i { border: 1px solid #ead8b9; width: 24px; height: 24px; border-radius: 50%; background: #fffdf7; display: grid; place-items: center; }
.learn-week-days i svg { width: 14px; height: 14px; }
.learn-week-days .is-active i { background: var(--path-color); border-color: var(--path-color); color: white; }
.learn-week-days .is-today i { outline: 2px solid #df9d43; outline-offset: 2px; }
.learn-week > p { font-size: 12px; color: #6d7478; margin: 16px 0 21px; }
.learn-count { display: flex; gap: 12px; align-items: center; border-top: 1px solid #efddbc; padding-top: 18px; }
.learn-count strong { font-size: 27px; font-weight: 600; }
.learn-count span { font-size: 12px; color: #6d7478; }
.learn-review-card { margin-top: 22px; padding: 24px 22px; border: 1px solid #dceef8; background: #f1faff; border-radius: 18px; }
.learn-review-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #287d9a; background: #d9f2ff; }
.learn-review-card h3 { font-size: 15px; margin: 16px 0 8px; }
.learn-review-card p { font-size: 12px; line-height: 1.9; color: #6d7478; }
.learn-review-card .button { margin-top: 10px; min-height: 40px; width: 100%; font-size: 12px; justify-content: space-between; background: white; }
.learn-explore-link { display: flex; gap: 10px; align-items: center; margin: 24px 10px; font-size: 12px; color: #6d7478; line-height: 1.7; }
.learn-explore-link svg { width: 15px; }
.learn-how { display: flex; gap: 20px; margin-top: 26px; padding: 0 6px; }
.learn-how span { font-size: 12px; line-height: 1.8; color: #6d7478; flex: 1; }
.learn-how b { display: block; font-size: 13px; color: #b8491c; margin-bottom: 6px; }
.learn-how b { width: 34px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #ffe3cd; }
.learn-how span:nth-child(2) b { color: #287d9a; background: #dcf3ff; }
.learn-how span:nth-child(3) b { color: #996015; background: #fff0bf; }
.learn-path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.learn-path-card { text-align: left; border: 1px solid #e9e5df; border-radius: 18px; padding: 24px; background: #fff; cursor: pointer; transition: border-color .15s, transform .15s; }
.learn-path-card:hover { transform: translateY(-3px); border-color: var(--card-accent); }
.learn-path-card.is-selected { border: 2px solid var(--card-accent); padding: 23px; background: color-mix(in srgb, var(--card-accent) 4%, white); }
.learn-path-card-top { display: flex; justify-content: space-between; color: var(--card-accent); font-size: 13px; font-weight: 650; }
.learn-path-card h2 { font-size: 22px; margin: 25px 0 10px; }
.learn-path-card p { color: #6d7478; font-size: 13px; line-height: 1.8; min-height: 47px; margin-bottom: 22px; }
.learn-path-card small { color: #6d7478; font-size: 12px; line-height: 1.6; }
.learn-path-card-top > span:first-child { padding: 7px 10px; border-radius: 9px; background: color-mix(in srgb, var(--card-accent) 10%, white); }
.learn-path-settings { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin: 34px 0 0; }
.learn-path-settings h2 { margin: 8px 0 0; font-size: 19px; }
.learn-path-settings > .button { margin-left: auto; }
.learn-path-note { margin: 6px 0 0; font-size: 12px; color: #6d7478; }
.learn-series-strip { margin-top: 30px; }
.learn-series-strip-head h2 { margin: 0 0 6px; font-size: 18px; }
.learn-series-strip-head p { margin: 0 0 16px; color: #6d7478; font-size: 13px; }
.learn-series-strip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.learn-series-card { display: flex; align-items: center; gap: 13px; padding: 13px 15px; text-align: left; border: 1px solid #e9e5df; border-radius: 15px; background: #fff; cursor: pointer; transition: border-color .15s, transform .15s; }
.learn-series-card:hover { transform: translateY(-2px); border-color: var(--path-color, #287d9a); }
.learn-series-card.is-selected { border: 2px solid var(--path-color, #287d9a); padding: 12px 14px; background: color-mix(in srgb, var(--path-color, #287d9a) 4%, white); }
.learn-series-card-cover { width: 74px; aspect-ratio: 16 / 9; border-radius: 9px; }
.learn-series-card-copy { display: grid; gap: 2px; flex: 1; min-width: 0; }
.learn-series-card-copy strong { font-size: 14px; }
.learn-series-card-copy small { color: #6d7478; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.learn-series-card-mark { color: #c6cfd3; }
.learn-series-card.is-selected .learn-series-card-mark { color: var(--path-color, #287d9a); }
.learn-preview { border: 1px dashed #dfc98e; border-radius: 18px; padding: 35px; background: #fffbec; }
.learn-preview h2 { font-size: 24px; line-height: 1.5; }
.learn-preview p { color: #6d7478; font-size: 13px; line-height: 1.9; }
.learn-preview .button { margin: 15px 18px 0 0; }
.guided-page { max-width: 820px; }
.learn-guide-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; font-size: 12px; color: #6d7478; }
.learn-guide-path { text-align: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.learn-guide-top > a:first-child svg { transform: rotate(180deg); }
.learn-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 30px 0 35px; }
.learn-steps li { min-width: 0; flex: 1; color: #6d7478; border-bottom: 3px solid #e8e5df; }
.learn-steps button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 6px 0 12px; border: 0; background: transparent; text-align: left; color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.learn-steps button:disabled { cursor: default; opacity: 1; }
.learn-steps button:not(:disabled):hover { color: var(--path-color); }
.learn-steps .learn-step-number { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; border: 1px solid #ded9cf; font-size: 12px; }
.learn-steps li svg { width: 12px; height: 12px; }
.learn-steps li.is-current { color: var(--path-color); border-bottom-color: var(--path-color); }
.learn-steps li.is-current .learn-step-number, .learn-steps li.is-completed .learn-step-number { background: var(--path-color); color: white; border-color: var(--path-color); }
.guided-page .study-player { margin-bottom: 16px; }
.learn-listen-status { font-size: 12px; color: #6d7478; }
.learn-text-toggle, .learn-tools { margin-top: 23px; border: 1px solid #e9e5df; border-radius: 14px; background: #fff; overflow: hidden; }
.learn-text-toggle > summary, .learn-tools > summary { padding: 18px 22px; cursor: pointer; font-size: 13px; color: #6d7478; }
.learn-text-toggle .transcript-card { border: 0; box-shadow: none; }
.learn-keywords { background: #fff; border: 1px solid #e9e5df; border-radius: 18px; margin-bottom: 24px; padding: 0 24px; }
.learn-keywords article { display: flex; align-items: flex-start; gap: 18px; padding: 23px 0; }
.learn-keywords article:not(:last-child) { border-bottom: 1px solid #f0ece5; }
.learn-keyword-index { font-size: 12px; color: #6d7478; padding-top: 6px; }
.learn-keywords article > div { flex: 1; min-width: 0; }
.learn-keywords h2 { font-size: 20px; margin: 0 0 10px; }
.learn-keywords p { font-size: 14px; line-height: 1.8; color: #6d7478; margin: 8px 0; }
.learn-keywords .learn-word-zh { color: #6d7478; font-size: 12px; }
.learn-keywords blockquote { margin: 10px 0 0; padding-left: 14px; border-left: 2px solid #e7d5ad; font-size: 13px; line-height: 1.8; color: #6d7478; }
.learn-keywords summary { font-size: 12px; cursor: pointer; color: #6d7478; }
.learn-keywords .learn-keyword-save { flex: none; margin-top: 2px; }
.learn-keywords .learn-keyword-save.is-saved { color: #1f7a72; background: #eaf6f1; border-color: #cfe8de; opacity: 1; }
.learn-keywords .learn-keyword-save.is-saved svg { width: 17px; height: 17px; }
.learn-content-credit { margin: 0 0 14px; font-size: 12px; color: #6d7478; }
.learn-guide-footer { position: static; margin-top: 24px; padding: 20px 0 0; border-top: 1px solid #e9e5df; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.learn-guide-footer > .text-link { min-height: 44px; }
.learn-tools { margin-top: 20px; }
.learn-tools .lesson-resources, .learn-tools .study-sidebar { margin: 10px 20px 20px; position: static; width: auto; box-shadow: none; }
.learn-finish { text-align: center; border-radius: 24px; padding: 40px; background: #fff; border: 1px solid #e9e5df; }
.learn-finish-mark { display: grid; place-items: center; margin: 0 auto 25px; width: 65px; height: 65px; border-radius: 50%; background: #fff2e6; color: #b8491c; box-shadow: 0 0 0 9px #fff9ef; }
.learn-finish-mark svg { width: 30px; height: 30px; }
.learn-finish h2, .learn-finish h1 { font-size: 27px; line-height: 1.5; margin: 16px 0; }
.learn-finish p { color: #6d7478; font-size: 13px; line-height: 1.9; }
.learn-finish-numbers { display: flex; justify-content: center; gap: 35px; margin: 30px 0; padding: 22px 0; border-top: 1px solid #f0ece5; border-bottom: 1px solid #f0ece5; }
.learn-finish-numbers span { display: flex; flex-direction: column; gap: 9px; color: #6d7478; font-size: 12px; }
.learn-finish-numbers strong { font-size: 26px; color: #b8491c; }
.learn-finish-actions { display: flex; justify-content: center; gap: 14px; margin-top: 26px; }
.learn-finish-mistakes { margin: 26px 0 6px; padding-top: 22px; border-top: 1px solid #f0ece5; text-align: left; }
.learn-finish-mistakes h3 { margin: 0 0 14px; font-size: 13px; letter-spacing: 0.06em; color: #6d7478; font-weight: 600; }
.learn-finish-mistakes ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.learn-finish-mistakes li { padding: 13px 15px; border: 1px solid #f0ece5; border-radius: 12px; background: #fdfbf8; }
.learn-finish-mistakes p { margin: 0; font-size: 12.5px; line-height: 1.7; }
.learn-finish-mistakes .learn-mistake-prompt { color: #6d7478; margin-bottom: 6px; }
.learn-finish-mistakes .learn-mistake-answer strong { color: #1f7a72; font-size: 14px; }
.learn-finish-mistakes .learn-mistake-answer span { color: #6d7478; font-size: 12px; margin-left: 4px; }
.learn-finish-mistakes .learn-mistake-pick { color: #6d7478; }
.learn-finish-mistakes .learn-mistake-pick span { color: #b8491c; text-decoration: line-through; }
.learning-page summary:focus-visible, .learning-page button:focus-visible, .learning-page a:focus-visible { outline: 3px solid #479bb8; outline-offset: 4px; }
body { background: radial-gradient(ellipse at 12% 0%, #fff2e6 0, transparent 48%), radial-gradient(ellipse at 100% 75%, #f0f8ff 0, transparent 40%), #fcfbf8; }
body .topbar { background: #ffffffed; }
body .nav-link.active { color: #b8491c; }
body .main-nav { background: #f5f2ed; }
body .avatar { background: linear-gradient(135deg, #f4a646, #d8652e); }
body.is-guided:not(.has-lesson-mini-player) .mini-player-chip, body.is-guided:not(.has-lesson-mini-player) .mini-player { display: none !important; }
body.is-guided.has-lesson-mini-player:has(.guided-page) main { padding-bottom: max(96px, env(safe-area-inset-bottom)); }
@media (max-width: 1000px) { .learn-path-card { padding: 20px; } .learn-path-card.is-selected { padding: 19px; } .learn-week { padding: 22px 17px; } }
@media (min-width: 761px) and (max-width: 1100px) {
  .learn-dashboard { grid-template-columns: minmax(0, 1fr); }
  .learn-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .learn-review-card { margin-top: 0; }
  .learn-explore-link { grid-column: 1 / -1; }
  .learn-path-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .learn-series-strip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .mobile-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .learning-page { padding-top: 7px; padding-bottom: 75px; }
  .learn-heading { margin: 8px 0 24px; }
  .learn-heading h1 { font-size: 26px; margin-top: 11px; }
  .learn-heading p { font-size: 13px; }
  .learn-today-card { padding: 23px; border-radius: 19px; }
  .learn-today-copy { margin-top: 27px; }
  .learn-today-copy h2 { font-size: 24px; }
  .learn-main-actions .button { width: 100%; }
  .learn-main-actions > span { width: 100%; text-align: center; }
  .learn-main-actions { gap: 14px; }
  .learn-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .learn-week { padding: 20px 16px; }
  .learn-week h2 { font-size: 18px; }
  .learn-week-days { gap: 3px; }
  .learn-week-days i { width: 19px; height: 19px; }
  .learn-review-card { margin: 0; padding: 20px 16px; }
  .learn-explore-link { grid-column: 1 / -1; margin: 0; }
  .learn-path-grid { grid-template-columns: 1fr; gap: 13px; }
  .learn-path-card { padding: 20px 22px; }
  .learn-path-card.is-selected { padding: 19px 21px; }
  .learn-path-card h2 { font-size: 21px; margin: 12px 0 7px; }
  .learn-path-card p { min-height: 0; margin: 0 0 12px; }
  .learn-path-settings { gap: 17px; }
  .learn-path-settings > .button { margin: 0; width: 100%; }
  .learn-preview { padding: 25px; }
  .learn-guide-top { font-size: 12px; }
  .learn-steps { gap: 5px; margin: 25px 0; }
  .learn-steps button { flex-direction: column; align-items: flex-start; font-size: 12px; gap: 7px; }
  .learn-guide-footer { gap: 12px; flex-wrap: wrap; }
  .learn-guide-footer .button { min-width: 0; font-size: 14px; }
  .learn-guide-footer > .text-link { font-size: 12px; }
  .learn-keywords { padding: 0 18px; }
  .learn-keywords article { gap: 12px; }
  .learn-keywords h2 { font-size: 18px; overflow-wrap: anywhere; }
  .learn-finish { padding: 30px 20px; }
  .learn-finish h2, .learn-finish h1 { font-size: 23px; }
  .learn-finish-numbers { gap: 25px; }
  .learn-finish-actions { flex-direction: column; }
}
@media (max-width: 410px) { .learn-aside { grid-template-columns: 1fr; } .learn-week h2 { max-width: none; } .learn-week-days i { width: 28px; height: 28px; }  }
@media (min-width: 761px) and (max-width: 1000px) {
  .learn-path-cover { width: calc(100% + 40px); margin: -20px -20px 18px; }
  .learn-path-card.is-selected .learn-path-cover { width: calc(100% + 38px); margin: -19px -19px 18px; }
}
@media (max-width: 760px) {
  .has-cover .learn-today-feature { grid-template-columns: 1fr; gap: 20px; margin: 22px 0; }
  .learn-hero-cover { grid-row: 1; }
  .learn-path-cover { width: calc(100% + 44px); margin: -20px -22px 18px; }
  .learn-path-card.is-selected .learn-path-cover { width: calc(100% + 42px); margin: -19px -21px 18px; }
}
@media (prefers-reduced-motion: reduce) { .learning-page *, .learning-page *::before, .learning-page *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Today: exactly one lesson a day, then it stops. */
.learn-daily-streak { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin: 0 0 14px; color: #6d7478; font-size: 13px; }
.learn-daily-streak span { color: #97a0a5; }
.learn-daily-card { display: grid; gap: 16px; max-width: 720px; padding: 22px 24px; border: 1px solid #e9e5df; border-radius: 20px; background: #fff; }
.learn-daily-card.has-cover { grid-template-columns: 196px minmax(0, 1fr); gap: 26px; align-items: center; }
/* The lesson-of-the-day card carries less text than the finished summary, so
   the cover and copy sit together as one centred group instead of leaving a
   wide empty area on the right. */
.learn-daily-card.has-cover:not(.is-done) { grid-template-columns: 244px max-content; gap: 28px; justify-content: center; align-items: center; }
.learn-daily-card.has-cover:not(.is-done) .learn-daily-body { min-width: 300px; max-width: 460px; }
.learn-daily-card.has-cover:not(.is-done) .learn-daily-actions { margin-top: 4px; }
@media (min-width: 761px) {
  .learn-daily-card.has-cover:not(.is-done) { position: relative; }
  .learn-daily-card.has-cover:not(.is-done) .learn-daily-topline { min-height: 40px; }
  .learn-daily-card.has-cover:not(.is-done) .learn-pill { position: absolute; top: 20px; left: 24px; }
  .learn-daily-card.has-cover:not(.is-done) .learn-daily-bilibili { position: absolute; top: 20px; right: 24px; }
}
.learn-daily-cover:empty { display: none; }
.learn-daily-art { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #f3f1ec; }
.learn-daily-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.learn-daily-body { display: grid; gap: 9px; justify-items: start; min-width: 0; }
.learn-daily-topline { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; width: 100%; }
.learn-daily-topline .learn-pill { max-width: 100%; }
.learn-daily-bilibili { min-height: 40px; margin-left: auto; padding: 7px 11px; white-space: nowrap; }
.learn-daily-body h2 { margin: 0; font-size: 24px; line-height: 1.35; overflow-wrap: anywhere; }
.learn-daily-card h2 .tt-en, .learn-daily-card h2 .tt-zh { display: block; }
.learn-daily-card h2 .tt-zh { margin: 4px 0 0; color: #59656c; font-size: .78em; font-weight: 500; line-height: 1.45; }
.learn-daily-card h2 .tt-zh::before { content: none; }
.learn-daily-meta { margin: 0; color: #6d7478; font-size: 13px; }
.learn-daily-note { margin: 0; color: #97a0a5; font-size: 12px; }
.learn-daily-actions { margin-top: 6px; }
.learn-daily-card.is-done, .learn-daily-card.is-empty { justify-items: start; }
.learn-daily-mark { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: #eef7f3; color: #2f8d88; }
.learn-daily-mark svg { width: 22px; height: 22px; }
.learn-daily-card.is-done h2, .learn-daily-card.is-empty h2 { margin: 0; font-size: 22px; }
.learn-daily-card.is-done p, .learn-daily-card.is-empty p { margin: 0; color: #6d7478; font-size: 14px; line-height: 1.7; }
@media (max-width: 760px) { .learn-daily-card.has-cover, .learn-daily-card.has-cover:not(.is-done) { grid-template-columns: minmax(0, 1fr); justify-content: stretch; } .learn-daily-card.has-cover:not(.is-done) .learn-daily-body { min-width: 0; } .learn-daily-card { padding: 20px; } .learn-daily-bilibili { min-height: 44px; } }

/* Account: learning-path settings (moved out of the top navigation). */
.account-path-card { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 18px 0; padding: 20px 22px; border: 1px solid #e9e5df; border-radius: 18px; background: #fff; }
.account-path-copy { display: grid; gap: 4px; min-width: 0; }
.account-path-copy span { color: #97a0a5; font-size: 12px; font-weight: 700; }
.account-path-copy strong { color: #253440; font-size: 17px; }
.account-path-copy small { color: #6d7478; font-size: 12.5px; }
.account-path-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* One lesson a day reads best as a single centred column. */
.learn-daily-page { max-width: 820px; margin: 0 auto; padding-top: 6px; }
.learn-daily-page .learn-daily-card { max-width: none; }

/* Finished lesson: cover, brand-coloured stat pills, and a small celebration
   badge in the card's corner so completion reads at a glance. */
.learn-daily-card.is-done { position: relative; }
.learn-daily-card.is-done.has-cover { align-items: center; }
.learn-daily-corner { position: absolute; top: 14px; right: 16px; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.learn-daily-corner .learn-daily-bilibili { margin-left: 0; min-height: 32px; }
.learn-done-celebrate { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: rgba(196, 81, 33, 0.07); color: #b8491c; font-size: 12px; font-weight: 700; animation: learn-done-pop 420ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.learn-done-celebrate span { font-size: 14px; }
@keyframes learn-done-pop { from { opacity: 0; transform: translateY(-4px) scale(0.92); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .learn-done-celebrate { animation: none; } }
.learn-daily-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 1px 0; }
.learn-stat-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.learn-stat-pill svg { width: 15px; height: 15px; }
.learn-stat-pill.is-quiz { background: #eef7f3; color: #1f6f69; }
.learn-stat-pill.is-words { background: #fdf3e3; color: #b4761b; }
.learn-stat-pill.is-streak { background: #fdece4; color: #b8491c; }

/* Finished lesson focuses on what was learned: title first, then the source,
   then the expressions picked up in this episode. */
.learn-done-title { margin: 0 0 -1px; font-size: 22px; line-height: 1.32; color: var(--ink); }
.learn-daily-source { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -2px 0 0; color: #4a5b63; font-size: 13.5px; }
.learn-daily-level { padding: 2px 9px; border-radius: 999px; background: rgba(0, 28, 42, 0.06); color: var(--ink); font-size: 12px; font-weight: 700; }
/* Expressions close the card as a plain one-per-line list. */
.learn-done-words { display: grid; gap: 6px; margin: 2px 0 0; padding-top: 12px; border-top: 1px solid rgba(0, 28, 42, 0.07); }
.learn-done-words-label { color: #97a0a5; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.learn-done-words ul { display: grid; margin: 0; padding: 0; list-style: none; }
.learn-done-words li { display: grid; grid-template-columns: minmax(104px, 34%) minmax(0, 1fr); align-items: baseline; gap: 4px 12px; min-height: 33px; padding: 6px 0; line-height: 1.5; border-top: 1px solid rgba(0, 28, 42, 0.05); }
.learn-done-words li:first-child { border-top: 0; }
.learn-done-words li strong { color: var(--ink); font-size: 13.5px; }
.learn-done-words li span { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
@media (max-width: 640px) { .learn-done-title { font-size: 20px; } }
@media (max-width: 760px) { .learn-daily-card.is-done .learn-daily-corner { position: static; grid-column: 1 / -1; justify-self: end; } .learn-daily-corner .learn-daily-bilibili { min-height: 44px; } }

/* Guided lessons keep actions in the document flow and text readable at all widths. */
#app:has(.guided-page) { padding-top: 12px; }
.guided-page { min-width: 0; padding-top: 0; }
.guided-page .learn-guide-top { grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; }
.guided-page .learn-guide-top > a { min-height: 44px; white-space: nowrap; }
.learn-guide-meta { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: end; gap: 4px; min-width: 0; padding: 10px 0; text-align: right; }
.learn-guide-series { color: #6d7478; font-size: 12px; }
.learn-guide-meta h1 { width: 100%; margin: 0; font: 800 17px/1.35 Arial, "Helvetica Neue", -apple-system, sans-serif; color: var(--ink); overflow-wrap: break-word; word-break: normal; }
.learn-guide-meta h1 .tt-en { display: block; font-weight: 800; }
.learn-guide-meta h1 .tt-zh { display: block; margin: 3px 0 0; font: 500 12px/1.4 "PingFang SC", "Microsoft YaHei", sans-serif; }
.learn-guide-meta h1 .tt-zh::before { display: none; }
.learn-skip-hint { margin: 0 0 14px; padding: 12px 16px; border-radius: 12px; background: #fff3e8; color: #8e411f; font-size: 13px; line-height: 1.6; }
@media (prefers-color-scheme: dark) { .learn-skip-hint { background: #38251c; color: #ffd3bc; } }
.guided-page .learn-steps { margin: 8px 0 18px; }
.guided-page .learn-steps li { min-width: 0; }
.guided-page .learn-steps .learn-step-number { flex-shrink: 0; }
.guided-page .learn-keywords article { display: grid; grid-template-columns: 22px minmax(0, 1fr) 44px; gap: 14px; }
.guided-page .learn-keywords h2, .guided-page .learn-keywords p, .guided-page .learn-keywords blockquote,
.guided-page .transcript, .guided-page .quiz-target, .guided-page .quiz-option { overflow-wrap: anywhere; }
.guided-page .learn-keyword-save { width: 44px; height: 44px; }
.guided-page .learn-text-toggle .transcript-card { margin-bottom: 0; }
.guided-page .transcript-tools-actions { flex-wrap: wrap; gap: 10px 16px; }
.guided-page .transcript-tools-actions > button { min-height: 44px; }
.guided-page .study-player-controls { min-width: 0; }
.guided-page .study-player-buttons { flex-wrap: wrap; }
@media (min-width: 561px) and (max-width: 900px) {
  .guided-page .study-player.has-cover { grid-template-columns: minmax(160px, .85fr) minmax(0, 1.15fr); }
  .guided-page .study-player-controls { padding: 20px; }
}
@media (max-width: 560px) {
  #app:has(.guided-page) { padding-top: 8px; }
  .guided-page { padding-bottom: 24px; }
  .guided-page .learn-guide-top { gap: 12px; }
  .learn-guide-meta { gap: 2px 8px; }
  .learn-guide-meta h1 { font-size: 15px; }
  .guided-page .learn-steps { margin: 6px 0 16px; }
  .guided-page .learn-steps button { padding-bottom: 10px; }
  .guided-page .learn-keywords { padding: 0 14px; }
  .guided-page .learn-keywords article { grid-template-columns: minmax(0, 1fr) 44px; gap: 8px 12px; padding: 18px 0; }
  .guided-page .learn-keyword-index { grid-column: 1; padding-top: 0; }
  .guided-page .learn-keywords article > div { grid-column: 1; }
  .guided-page .learn-keyword-save { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .guided-page .learn-keywords blockquote { padding-left: 10px; }
  .guided-page .learn-text-toggle > summary { padding: 16px; line-height: 1.6; }
  .guided-page .learn-guide-footer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 16px; }
  .guided-page .learn-guide-footer .button { grid-row: 1; width: 100%; justify-content: center; }
  .guided-page .learn-guide-footer > .text-link { justify-content: center; }
}

/* Mobile lessons own the screen; site navigation returns on Save and exit. */
@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  body.is-guided:has(.guided-page) { --mobile-nav: 0px; --player: 0px; }
  body.is-guided:has(.guided-page) .topbar,
  body.is-guided:has(.guided-page) .mobile-nav { display: none; }
  body.is-guided:has(.guided-page) main {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  body.is-guided #app:has(.guided-page) {
    padding-top: max(8px, env(safe-area-inset-top));
    padding-right: max(18px, env(safe-area-inset-right));
    padding-bottom: 16px;
    padding-left: max(18px, env(safe-area-inset-left));
  }
  body.is-guided .guided-page { padding-bottom: 8px; }
}


/* Auto-generated dark-mode counterparts of the literal light colours above. */
@media (prefers-color-scheme: dark) {
  .learn-breadcrumb {
      color: #b6b8ba;
  }
  .learn-breadcrumb a {
      color: #d38869;
  }
  .learn-breadcrumb [aria-current] {
      color: #d6d8da;
  }
  .learn-login-card {
      border: 1px solid #232426;
  }
  .learn-login-card > p {
      color: #b6b8ba;
  }
  .topbar .main-nav .nav-link.active {
      color: #ffffff;
  }
  .learning-page {
      color: #d6d8da;
  }
  .learn-heading p {
      color: #b6b8ba;
  }
  .learn-today-card {
      background: #18191a;
      border: 1px solid #232426;
  }
  .learn-today-card::after {
      border: 20px solid #3b2616;
      border-left-color: #212324;
      border-bottom-color: #413619;
  }
  .learn-cover {
      background: #1f2122;
  }
  .learn-today-copy p {
      color: #b6b8ba;
  }
  .learn-session-meta {
      color: #b6b8ba;
  }
  .learn-main-actions > span {
      color: #b6b8ba;
  }
  .learn-week {
      background: #1e2021;
      border: 1px solid #3c2e17;
  }
  .learn-week-days span {
      color: #b6b8ba;
  }
  .learn-week-days i {
      border: 1px solid #413219;
      background: #1a1b1c;
  }
  .learn-week > p {
      color: #b6b8ba;
  }
  .learn-count span {
      color: #b6b8ba;
  }
  .learn-review-card {
      border: 1px solid #202223;
      background: #1b1c1d;
  }
  .learn-review-symbol {
      color: #78bfd8;
      background: #1f2122;
  }
  .learn-review-card p {
      color: #b6b8ba;
  }
  .learn-explore-link {
      color: #b6b8ba;
  }
  .learn-how span {
      color: #b6b8ba;
  }
  .learn-how b {
      color: #d38869;
      background: #342214;
  }
  .learn-how span:nth-child(2) b {
      color: #78bfd8;
      background: #1f2022;
  }
  .learn-how span:nth-child(3) b {
      color: #dab380;
      background: #383015;
  }
  .learn-path-card {
      border: 1px solid #232426;
      background: #18191a;
  }
  .learn-path-card p {
      color: #b6b8ba;
  }
  .learn-path-card small {
      color: #b6b8ba;
  }
  .learn-path-note {
      color: #b6b8ba;
  }
  .learn-series-strip-head p {
      color: #b6b8ba;
  }
  .learn-series-card {
      border: 1px solid #232426;
      background: #18191a;
  }
  .learn-series-card-copy small {
      color: #b6b8ba;
  }
  .learn-series-card.is-selected .learn-series-card-mark {
      color: var(--path-color, #78bfd8);
  }
  .learn-preview {
      border: 1px dashed #51431f;
      background: #1c1d1e;
  }
  .learn-preview p {
      color: #b6b8ba;
  }
  .learn-guide-top {
      color: #b6b8ba;
  }
  .learn-steps li {
      color: #b6b8ba;
  }
  .learn-steps .learn-step-number {
      border: 1px solid #282a2c;
  }
  .learn-listen-status {
      color: #b6b8ba;
  }
  .learn-text-toggle, .learn-tools {
      border: 1px solid #232426;
      background: #18191a;
  }
  .learn-text-toggle > summary, .learn-tools > summary {
      color: #b6b8ba;
  }
  .learn-keywords {
      background: #18191a;
      border: 1px solid #232426;
  }
  .learn-keyword-index {
      color: #b6b8ba;
  }
  .learn-keywords p {
      color: #b6b8ba;
  }
  .learn-keywords .learn-word-zh {
      color: #b6b8ba;
  }
  .learn-keywords blockquote {
      color: #b6b8ba;
  }
  .learn-keywords summary {
      color: #b6b8ba;
  }
  .learn-keywords .learn-keyword-save.is-saved {
      color: #89ddd6;
      background: #1e1f21;
      border-color: #26282a;
  }
  .learn-content-credit {
      color: #b6b8ba;
  }
  .learn-finish {
      background: #18191a;
      border: 1px solid #232426;
  }
  .learn-finish-mark {
      background: #1d1e20;
      color: #d38869;
  }
  .learn-finish p {
      color: #b6b8ba;
  }
  .learn-finish-numbers span {
      color: #b6b8ba;
  }
  .learn-finish-numbers strong {
      color: #d38869;
  }
  .learn-finish-mistakes h3 {
      color: #b6b8ba;
  }
  .learn-finish-mistakes li {
      border: 1px solid #202223;
      background: #1a1b1c;
  }
  .learn-finish-mistakes .learn-mistake-prompt {
      color: #b6b8ba;
  }
  .learn-finish-mistakes .learn-mistake-answer strong {
      color: #89ddd6;
  }
  .learn-finish-mistakes .learn-mistake-answer span {
      color: #b6b8ba;
  }
  .learn-finish-mistakes .learn-mistake-pick {
      color: #b6b8ba;
  }
  .learn-finish-mistakes .learn-mistake-pick span {
      color: #d38869;
  }
  body {
      background: radial-gradient(ellipse at 12% 0%, #1d1e20 0, transparent 48%), radial-gradient(ellipse at 100% 75%, #1b1c1e 0, transparent 40%), #1a1b1c;
  }
  body .topbar {
      background: #18191aed;
  }
  body .nav-link.active {
      color: #d38869;
  }
  body .main-nav {
      background: #1d1f20;
  }
  body .avatar {
      background: linear-gradient(135deg, #614625, #d8652e);
  }
  .learn-daily-streak {
      color: #b6b8ba;
  }
  .learn-daily-card {
      border: 1px solid #232426;
      background: #18191a;
  }
  .learn-daily-art {
      background: #1e2021;
  }
  .learn-daily-meta {
      color: #b6b8ba;
  }
  .learn-daily-mark {
      background: #1d1e20;
      color: #7fd4d0;
  }
  .learn-daily-card.is-done p, .learn-daily-card.is-empty p {
      color: #b6b8ba;
  }
  .account-path-card {
      border: 1px solid #232426;
      background: #18191a;
  }
  .account-path-copy strong {
      color: #d6d8da;
  }
  .account-path-copy small {
      color: #b6b8ba;
  }
  .learn-done-celebrate {
      color: #d38869;
  }
  .learn-stat-pill.is-quiz {
      background: #1d1e20;
      color: #8eded8;
  }
  .learn-stat-pill.is-words {
      background: #1e1f21;
      color: #d6ae72;
  }
  .learn-stat-pill.is-streak {
      background: #1e1f21;
      color: #d38869;
  }
  .learn-daily-source {
      color: #c4c6c8;
  }
  .learn-daily-level {
      background: rgba(255, 255, 255, 0.06);
  }
  .learn-guide-series {
      color: #b6b8ba;
  }
}

/* Dark mode: learning.css carries its own accent tokens (declared above at
   :root), so they need the dark counterparts here too. */
@media (prefers-color-scheme: dark) {
  :root { --accent: #ff7a52; --accent-dark: #e2543a; }

  .learning-page {
    --brand-orange: #ff7a52;
    --brand-blue: #5fb8d4;
    --brand-gold: #e5b95c;
    --accent: var(--brand-orange);
    --accent-dark: #ff9778;
    color: #dfe7ec;
  }

  .learn-breadcrumb a { color: #ff9d7d; }
  .learn-breadcrumb [aria-current] { color: #e9eef1; }
  .topbar .main-nav .nav-link.active { color: #fff; }
  body.downloads-only .mobile-nav .nav-link.active { color: #ff9d7d; }

  /* Same tinted canvas as the light theme, on the dark paper instead of
     #fcfbf8 so the shell matches the browser chrome colour. */
  body {
    background:
      radial-gradient(ellipse at 12% 0%, rgba(255, 122, 82, 0.1) 0, transparent 48%),
      radial-gradient(ellipse at 100% 75%, rgba(95, 184, 212, 0.08) 0, transparent 40%),
      #0f1519;
  }
}

/* Dark-mode corrections scoped to learning.css (it loads after styles.css, so
   its own accent rules have to be overridden here). */
@media (prefers-color-scheme: dark) {
  .learning-page .button.accent,
  .learning-page .button.accent:hover { color: var(--surface); }
  .learn-week-days .is-active i,
  .learn-steps li.is-current .learn-step-number,
  .learn-steps li.is-completed .learn-step-number { color: var(--surface); }
}

@media (prefers-color-scheme: dark) {
  .learn-login-card { background: var(--surface); }
  .learn-review-card .button { background: var(--surface); color: var(--ink); border-color: var(--line); }
  .learn-daily-card h2 .tt-zh { color: #aeb9bf; }
  .learn-daily-bilibili { background: #38212b; border-color: #76364c; color: #f5b5c7; }
  .learn-daily-bilibili:hover { background: #4a2a36; border-color: #a85972; color: #ffd4df; }
}
