/* SkyED Course Hub v1.1.0 — isolated visual successor.
 * The original app.css and all v1 media are immutable. No web-font requests.
 */
:root {
  --ink: #202e48;
  --muted: #52617a;
  --line: #dce4f0;
  --bg: #f6f8fc;
  --surface: #fff;
  --focus: #173f9c;
  --shadow: 0 12px 38px rgba(24,45,87,.08);
  --font-en: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --font-zh: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Heiti SC", "Noto Sans CJK SC", sans-serif;
  font-family: var(--font-en);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
:lang(zh) { font-family: var(--font-zh), var(--font-en); }
body { color: var(--ink); background: var(--bg); }
a, button, input { font: inherit; }
button, a { touch-action: manipulation; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
img { max-width: 100%; }
.main { max-width: 1600px; padding-top: 28px; }
.mobile-links { display: none; }
.sidebar { padding: 29px 17px; gap: 31px; }
.brand-title { font-size: 20px; font-weight: 700; letter-spacing: -.035em; }
.brand-sub { color: #53627b; font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.nav-label, .eyebrow, .hero .smallcap { font-size: 12px; letter-spacing: .08em; font-weight: 600; }
.nav-label { color: #566783; }
.nav-link { font-size: 14px; min-height: 47px; font-weight: 600; color: #465774; }
.nav-link:hover, .nav-link.active { color: #203d92; }
.nav-footer strong { font-size: 14px; font-weight: 700; }
.nav-footer p { font-size: 13px; color: #51627e; }
.top-tag { font-size: 14px; color: #566582; }
.topbar { margin-bottom: 24px; }
.search-box { min-height: 47px; height: auto; color: #52637f; }
.search-box input { font-size: 14px; min-height: 46px; color: #243750; }
.search-box input::placeholder { color: #64718a; }
.lang-toggle { min-height: 47px; padding: 10px 14px; font-size: 14px; font-weight: 700; color: #294d83; }
.avatar { font-size: 14px; font-weight: 700; }
.hero { min-height: 300px; margin-bottom: 32px; border-radius: 27px; }
.hero-copy { padding: clamp(26px,3.7vw,48px); }
.hero h1 { letter-spacing: -.035em; font-weight: 700; line-height: 1.2; }
.hero p { font-size: 16px; line-height: 1.65; color: #ecf2ff; }
.hero .smallcap { color: #d9eeff; }
.btn { min-height: 46px; padding: 11px 18px; font-size: 14px; font-weight: 700; }
.btn-outline { border-color: #dae5ff; }
.section-head { margin-bottom: 19px; align-items: flex-start; }
.section-head h2 { font-size: clamp(19px,2vw,25px); font-weight: 700; letter-spacing: -.03em; line-height: 1.25; }
.section-head p { color: #53617a; font-size: 14px; line-height: 1.5; }
.section-head a, .text-link { font-size: 14px; font-weight: 700; color: #234eaa; }
.cards { gap: 19px; }
.card { padding: 17px; border-color: #dce5f2; box-shadow: var(--shadow); border-radius: 23px; }
.card-cover { height: 155px; }
.card h3 { font-size: 18px; font-weight: 700; line-height: 1.35; }
.card .subline, .card .desc, .card-bottom { font-size: 14px; line-height: 1.6; color: #54627b; }
.card .desc { min-height: 47px; }
.card-bottom { font-weight: 600; }
.badge { font-size: 12px; font-weight: 700; background: #def6eb; color: #176a4e; }
.badge.planned { background: #e9edf3; color: #52617b; }
.feature-panel h3 { font-size: 20px; font-weight: 700; }
.feature-panel p { font-size: 14px; color: #526079; }
.metric strong { font-weight: 700; }
.metric span { font-size: 14px; color: #56647d; }
.chip { font-size: 14px; font-weight: 600; }
.pathbar { font-size: 14px; color: #57657e; }
.page-heading { font-weight: 700; letter-spacing: -.04em; }
.page-desc { font-size: 16px; color: #52617b; line-height: 1.65; }
.toolbar { gap: 10px; }
.pill-button { min-height: 44px; padding: 10px 15px; font-size: 14px; font-weight: 600; color: #3c5072; }
.pill-button.active { color: #234580; background: #e6efff; border-color: #9eb5e8; }

/* Lesson artwork is unit-coded and uses only previously verified cover images. */
.lesson-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 19px; }
.lesson-item {
  --tile-a: #f9c69e;
  --tile-b: #ffecdb;
  --tile-ink: #513524;
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 0;
  align-items: stretch;
  background: white;
  overflow: hidden;
  padding: 0;
  min-width: 0;
  border: 1px solid #dbe5f1;
  border-radius: 23px;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s;
}
.lesson-item:hover { background: white; transform: translateY(-3px); box-shadow: 0 18px 35px rgba(22,43,88,.14); }
.lesson-item.cover-petal { --tile-a: #ffbd9c; --tile-b: #fff1e3; --tile-ink: #79402b; }
.lesson-item.cover-wave { --tile-a: #9ccdfa; --tile-b: #e6f3ff; --tile-ink: #234976; }
.lesson-item.cover-sun { --tile-a: #ffd484; --tile-b: #fff4d7; --tile-ink: #75501a; }
.lesson-item.cover-cloud { --tile-a: #c7b9f8; --tile-b: #f2ecff; --tile-ink: #4a397b; }
.lesson-item.cover-star { --tile-a: #94dbc8; --tile-b: #e8f9f3; --tile-ink: #176353; }
.lesson-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  flex: none;
  height: 154px;
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  background: linear-gradient(125deg,var(--tile-a),var(--tile-b));
  color: var(--tile-ink);
  font-size: 64px;
}
.lesson-art::before { content: ""; position: absolute; width: 245px; height: 245px; left: -100px; top: -174px; border-radius: 50%; background: rgba(255,255,255,.38); }
.lesson-art::after { content: ""; position: absolute; width: 180px; height: 180px; right: -45px; bottom: -118px; border: 35px solid rgba(255,255,255,.30); border-radius: 50%; }
.lesson-art img { width: min(55%,200px); height: calc(100% - 22px); border-radius: 20px; object-fit: contain; padding: 9px; background: rgba(255,255,255,.87); box-shadow: 0 10px 27px rgba(50,55,79,.12); position: relative; z-index: 1; }
.lesson-art .lesson-glyph { font-size: 70px; position: relative; z-index: 1; }
.lesson-art .lesson-art-label { position: absolute; top: 13px; left: 16px; z-index: 2; border: 1px solid rgba(255,255,255,.8); background: rgba(255,255,255,.86); color: var(--tile-ink); border-radius: 99px; font-size: 12px; font-weight: 700; padding: 5px 11px; max-width: calc(100% - 32px); }
.lesson-tile-body { min-width: 0; padding: 18px 19px 19px; display: flex; flex-direction: column; }
.lesson-item .eyebrow { color: #53617a; font-size: 12px; font-weight: 600; letter-spacing: .035em; }
.lesson-item h3 { color: #1c2d4b; font-size: clamp(17px,1.7vw,20px); font-weight: 700; line-height: 1.32; margin: 9px 0 10px; overflow-wrap: anywhere; }
.lesson-item p { font-size: 14px; color: #52627a; margin: auto 0 0; line-height: 1.55; }
.lesson-item .chevron { display: none; }
.lesson-tile-footer { display: flex; gap: 7px; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 13px; border-top: 1px solid #e5ebf4; color: #234f9e; font-size: 14px; font-weight: 700; }
.lesson-tile-footer svg { flex: none; }
.lesson-list-offset { margin-top: 22px; }

/* Lesson reading flow and touch-sized audio / quiz controls. */
.details-grid { grid-template-columns: minmax(0,1fr) minmax(235px,270px); gap: 23px; }
.detail-banner { min-height: 182px; gap: 23px; padding: 22px; }
.detail-banner-art { width: 132px; height: 124px; }
.detail-banner h1 { font-weight: 700; font-size: clamp(20px,2.3vw,29px); line-height: 1.25; letter-spacing: -.025em; }
.detail-banner p { font-size: 14px; color: #52617b; }
.panel { border-radius: 22px; padding: 22px; }
.panel h2 { font-weight: 700; font-size: 19px; }
.panel .hint { font-size: 14px; color: #536179; line-height: 1.65; }
.word-grid { gap: 15px; }
.word-card { border-radius: 17px; }
.word-card .word-image { height: 148px; }
.word-body { padding: 13px; }
.word-body b, .sentence b { font-size: 16px; font-weight: 700; }
.word-body small, .sentence p { font-size: 15px; color: #50617b; line-height: 1.5; }
.audio-row { margin-top: 13px; gap: 9px; }
.audio-button { min-height: 44px; padding: 9px 12px; border-radius: 12px; font-size: 14px; font-weight: 700; color: #194c9c; border-color: #bcd0ef; }
.audio-button[data-audio-state="loading"] { background: #fff2d5; color: #69501c; border-color: #eed094; }
.audio-button[data-audio-state="playing"] { background: #ddf6ea; color: #176147; border-color: #7bc9a5; }
.audio-button[data-audio-state="error"] { background: #ffe9e3; color: #923b2f; border-color: #e8afa3; }
.audio-state-label { margin-left: 3px; font-size: 12px; font-weight: 600; }
.sentence { padding: 17px 0; }
.aside-meta { font-size: 14px; color: #536179; gap: 12px; }
.aside-meta strong { color: #243b60; font-weight: 700; text-align: right; }
.quiz-q { padding: 21px 0; font-size: 16px; }
.quiz-q b { font-size: 16px; font-weight: 700; line-height: 1.55; margin-bottom: 13px; }
.quiz-choice { margin: 9px 0; font-size: 15px; }
.quiz-select { width: auto; max-width: 100%; min-height: 48px; padding: 11px 14px; font-size: 15px; line-height: 1.45; font-weight: 600; color: #284772; text-align: left; }
.quiz-feedback { font-size: 14px; line-height: 1.6; }
.quiz-picture { max-width: 100%; }
.status-info, .empty-state { font-size: 14px; line-height: 1.6; }
.footer { font-size: 13px; color: #52627b; }
#toast { font-size: 14px; max-width: min(440px,calc(100vw - 30px)); }

@media (max-width: 1190px) {
  .cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lesson-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .main { padding: 20px 22px 38px; }
  .mobile-links { margin: 4px 0 16px; padding: 4px 3px 7px; }
  .mobile-links a { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; color: #334b6d; }
  .mobile-top { margin-bottom: 18px; }
  .details-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 650px) {
  :root { font-size: 16px; }
  .main { padding: 16px 15px 30px; }
  .topbar { margin-bottom: 14px; }
  .topbar-right { width: 100%; gap: 10px; }
  .search-box { flex: 1; min-width: 0; }
  .search-box input { font-size: 16px; }
  .lang-toggle { flex: 0 0 auto; padding: 9px 10px; }
  .hero { min-height: 0; }
  .hero-copy { padding: 29px 25px; }
  .hero h1 { font-size: clamp(26px,7.5vw,35px); }
  .hero p { font-size: 16px; max-width: 100%; }
  .cards, .lesson-list { grid-template-columns: minmax(0,1fr); }
  .lesson-art { height: 165px; }
  .lesson-tile-body { padding: 16px 18px; }
  .card-cover { height: 155px; }
  .word-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-banner { align-items: flex-start; padding: 17px; gap: 14px; }
  .detail-banner-art { width: 86px; height: 94px; flex-shrink: 0; }
  .detail-banner h1 { font-size: 20px; }
  .panel { padding: 17px; }
  .footer { gap: 9px; }
}
@media (max-width: 390px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .word-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 24px 20px; }
  .detail-banner { flex-direction: column; }
  .detail-banner-art { width: 100%; height: 124px; }
  .search-box { padding-left: 11px; padding-right: 8px; }
  .lang-toggle { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
