/* 知识讲堂、每日一练与学习成就 */
#dailyCard { margin: 16px 0 4px; }
.daily-card {
  position: relative;
  overflow: hidden;
  padding: calc(18px * var(--space)) calc(18px * var(--space)) calc(16px * var(--space));
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(135deg, #12306b 0%, var(--accent) 54%, #0f766e 120%);
  color: #fff;
  box-shadow: 0 16px 36px rgba(29, 78, 216, .24);
}
.daily-card::before,
.daily-card::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.daily-card::before {
  width: 210px; height: 210px; right: -70px; top: -100px;
  background: rgba(255, 255, 255, .12);
}
.daily-card::after {
  width: 150px; height: 150px; right: 40px; bottom: -95px;
  background: rgba(255, 255, 255, .07);
}
.daily-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; grid-gap: 10px; gap: 10px; }
.daily-kicker {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px;
  background: rgba(255, 255, 255, .12); font-size: calc(12px * var(--type)); font-weight: 700;
}
.daily-pill { color: rgba(255, 255, 255, .82); font-size: calc(12px * var(--type)); }
.daily-card h2 {
  position: relative; z-index: 1;
  margin: 12px 0 0; font-size: calc(21px * var(--type)); line-height: 1.35; letter-spacing: -.01em;
}
.daily-card p { position: relative; z-index: 1; margin: 8px 0 0; color: rgba(255, 255, 255, .82); font-size: calc(13.5px * var(--type)); }
.daily-meta {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; grid-gap: 8px 14px; gap: 8px 14px;
  margin-top: 14px; font-size: calc(13px * var(--type)); color: rgba(255, 255, 255, .86);
}
.daily-meta b { margin-right: 3px; color: #fff; font-size: calc(18px * var(--type)); font-variant-numeric: tabular-nums; }
.daily-status {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px;
  border-radius: 999px; background: rgba(255, 255, 255, .13); color: rgba(255, 255, 255, .9);
}
.daily-status.is-done { background: rgba(16, 185, 129, .24); color: #d1fae5; }
.daily-suggest { color: rgba(255, 255, 255, .72) !important; }
.daily-btn {
  position: relative; z-index: 1;
  width: 100%; min-height: 46px; margin-top: 14px;
  border-color: transparent; background: #fff; color: #1d4ed8;
  box-shadow: 0 8px 20px rgba(8, 20, 48, .18);
  font-weight: 800;
}
.daily-btn:hover { background: #f1f5ff; border-color: transparent; }

.achievement-card {
  margin-top: 16px; padding: calc(14px * var(--space));
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-1);
}
.achievement-head { display: flex; align-items: center; justify-content: space-between; grid-gap: 8px; gap: 8px; }
.achievement-head .section-title { margin: 0; }
.achievement-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 8px; gap: 8px; margin-top: 10px; }
.achievement {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: auto auto;
  align-items: center; column-gap: 8px;
  padding: 9px 10px; border: 1px dashed var(--line); border-radius: var(--radius-sm);
  background: var(--bg); opacity: .6;
}
.achievement.earned { border-style: solid; background: var(--accent-soft); opacity: 1; }
.ach-icon {
  grid-row: 1 / span 2; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--line); color: var(--muted); font-size: 15px; font-weight: 800;
}
.achievement.earned .ach-icon { background: var(--accent); color: var(--site-on-accent); }
.ach-name { color: var(--text); font-size: calc(13px * var(--type)); font-weight: 700; line-height: 1.3; }
.ach-desc { color: var(--muted); font-size: calc(11.5px * var(--type)); line-height: 1.35; }

.learn-summary { display: flex; flex-direction: column; grid-gap: 4px; gap: 4px; margin: 12px 0 14px; color: var(--muted); font-size: calc(13px * var(--type)); }
.learn-summary strong { color: var(--text); font-size: calc(15px * var(--type)); }
.lesson-card {
  margin-bottom: 14px; padding: calc(16px * var(--space));
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-1);
  scroll-margin-top: 14px;
}
.lesson-head { display: flex; align-items: flex-start; grid-gap: 10px; gap: 10px; }
.lesson-index {
  flex: none; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.lesson-title { min-width: 0; }
.lesson-title h2 { margin: 0; font-size: calc(18px * var(--type)); line-height: 1.35; letter-spacing: -.01em; }
.lesson-meta { display: block; margin-top: 3px; color: var(--muted); font-size: calc(12px * var(--type)); }
.lesson-intro { margin: 12px 0 0; color: var(--text); font-size: calc(14px * var(--type)); line-height: 1.7; }
.lesson-points {
  margin-top: 12px; padding: 12px 14px;
  border-radius: var(--radius-sm); background: var(--bg);
}
.lesson-points h3 { margin: 0; color: var(--accent); font-size: calc(13px * var(--type)); }
.lesson-points ol { margin: 7px 0 0; padding-left: 20px; color: var(--muted); font-size: calc(13.5px * var(--type)); }
.lesson-points li { margin: 4px 0; }
.lesson-examples { margin-top: 12px; border-top: 1px solid var(--line); }
.lesson-examples > summary {
  list-style: none; display: flex; align-items: center; grid-gap: 8px; gap: 8px;
  padding: 12px 0 2px; cursor: pointer; color: var(--text); font-size: calc(14px * var(--type)); font-weight: 700;
}
.lesson-examples > summary::-webkit-details-marker { display: none; }
.lesson-examples .arrow { margin-left: auto; color: var(--muted); display: inline-flex; transition: transform var(--motion) ease; }
.lesson-examples[open] .arrow { transform: rotate(90deg); }
.example-list { padding-top: 6px; }
.example-item { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.example-q { display: flex; align-items: center; flex-wrap: wrap; grid-gap: 6px; gap: 6px; }
.example-item p { margin: 8px 0 0; font-size: calc(14px * var(--type)); line-height: 1.65; }
.example-options { display: grid; grid-gap: 4px; gap: 4px; margin-top: 8px; color: var(--muted); font-size: calc(13px * var(--type)); }
.example-options span { padding: 6px 8px; border-radius: 6px; background: var(--bg); }
.example-answer { margin-top: 9px; }
.example-answer summary { cursor: pointer; color: var(--accent); font-size: calc(13px * var(--type)); font-weight: 700; }
.example-answer p { margin: 8px 0 0; color: var(--text); font-size: calc(13.5px * var(--type)); }
.lesson-actions { display: flex; align-items: center; flex-wrap: wrap; grid-gap: 10px; gap: 10px; margin-top: 14px; }
.lesson-stat { color: var(--muted); font-size: calc(12.5px * var(--type)); }
.topic-more { width: 100%; margin-top: 8px; padding-left: 0; justify-content: flex-start; }

/* 学习看板 */
.dashboard-hero {
  position: relative;
  overflow: hidden;
  margin-top: 14px;
  padding: calc(20px * var(--space)) calc(18px * var(--space)) calc(18px * var(--space));
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(135deg, #0b1f47 0%, var(--accent) 58%, #0f766e 132%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(29, 78, 216, .26);
}
.dashboard-hero::before,
.dashboard-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.dashboard-hero::before {
  width: 240px; height: 240px; right: -80px; top: -120px;
  background: rgba(255, 255, 255, .12);
}
.dashboard-hero::after {
  width: 180px; height: 180px; right: 30px; bottom: -120px;
  background: rgba(255, 255, 255, .07);
}
.dash-hero-top {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; grid-gap: 8px; gap: 8px;
}
.dash-kicker {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  font-size: calc(12px * var(--type)); font-weight: 700;
}
.dash-today {
  display: inline-flex; align-items: center; grid-gap: 6px; gap: 6px;
  color: rgba(255, 255, 255, .86); font-size: calc(12px * var(--type));
}
.dash-today::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fbbf24;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, .16);
}
.dash-today.is-done::before { background: #6ee7b7; box-shadow: 0 0 0 4px rgba(110, 231, 183, .16); }
.dashboard-hero h2 {
  position: relative; z-index: 1;
  margin: 13px 0 0; font-size: calc(22px * var(--type)); line-height: 1.35; letter-spacing: -.02em;
}
.dashboard-hero p {
  position: relative; z-index: 1;
  margin: 8px 0 0; max-width: 34em; color: rgba(255, 255, 255, .8);
  font-size: calc(13.5px * var(--type)); line-height: 1.65;
}
.dash-hero-nums {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-gap: 8px; gap: 8px;
  margin-top: 16px;
}
.dash-hero-nums div {
  padding: 10px 6px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px;
  background: rgba(255, 255, 255, .1); text-align: center;
}
.dash-hero-nums b {
  display: block; font-size: calc(22px * var(--type)); line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.dash-hero-nums span { display: block; margin-top: 2px; color: rgba(255, 255, 255, .7); font-size: calc(11px * var(--type)); }
.dash-hero-cta {
  position: relative; z-index: 1;
  width: 100%; margin-top: 14px;
  border-color: transparent; background: #fff; color: var(--accent);
  box-shadow: 0 8px 22px rgba(8, 20, 48, .2); font-weight: 800;
}
.dash-hero-cta:hover { background: #f1f5ff; border-color: transparent; }

.dash-two-col { display: grid; grid-gap: 12px; gap: 12px; margin-top: 12px; }
.dash-section {
  min-width: 0;
  padding: calc(16px * var(--space));
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  box-shadow: var(--shadow-1);
}
.dash-section-head {
  display: flex; align-items: flex-start; justify-content: space-between; grid-gap: 10px; gap: 10px;
}
.dash-section-head > div { min-width: 0; }
.dash-title {
  display: flex; align-items: center; grid-gap: 8px; gap: 8px;
  margin: 0; font-size: calc(16px * var(--type)); line-height: 1.35; letter-spacing: -.01em;
}
.dash-title::before { content: ''; width: 3px; height: 15px; border-radius: 2px; background: var(--accent); flex: none; }
.dash-section-head p {
  margin: 4px 0 0; color: var(--muted); font-size: calc(12px * var(--type)); line-height: 1.5;
}
.dash-section-head .chip { flex: none; }

.dash-weak-list { display: grid; grid-gap: 4px; gap: 4px; margin-top: 10px; }
.dash-weak {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); grid-gap: 9px; gap: 9px; align-items: center;
  padding: 9px 0; border-top: 1px dashed var(--line);
}
.dash-weak:first-child { border-top: 0; padding-top: 2px; }
.dash-rank {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800;
}
.dash-weak:nth-child(1) .dash-rank { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #b45309; }
.dash-weak:nth-child(2) .dash-rank { background: #eef2f8; color: var(--muted); }
.dash-weak:nth-child(3) .dash-rank { background: #eef2f8; color: var(--muted); }
.dash-weak-main { min-width: 0; }
.dash-weak-title {
  display: flex; align-items: baseline; justify-content: space-between; grid-gap: 8px; gap: 8px;
  font-size: calc(13px * var(--type));
}
.dash-weak-title strong { min-width: 0; overflow-wrap: break-word; word-break: break-word; }
.dash-weak-title span {
  flex: none; color: var(--muted); font-size: calc(11.5px * var(--type));
  font-variant-numeric: tabular-nums;
}
.dash-bar {
  position: relative; height: 7px; margin-top: 6px; overflow: hidden;
  border-radius: 999px; background: #edf1f7;
}
.dash-bar > span {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #f97316, #ef4444);
}
.dash-bar > span.is-mid { background: linear-gradient(90deg, #f59e0b, #3b82f6); }
.dash-bar > span.is-high { background: linear-gradient(90deg, #14b8a6, #22c55e); }
.dash-bar.is-empty {
  background: repeating-linear-gradient(45deg, #eef2f8, #eef2f8 5px, #e2e8f0 5px, #e2e8f0 10px);
}
.dash-weak-cta { width: 100%; margin-top: 14px; }
.dash-note { margin: 8px 0 0; color: var(--muted); font-size: calc(11.5px * var(--type)); line-height: 1.55; }

.dash-chart { display: block; width: 100%; height: auto; margin-top: 8px; overflow: visible; }
.dash-chart text { font-family: var(--site-font); }
.dash-trend-foot {
  display: flex; flex-wrap: wrap; grid-gap: 6px 14px; gap: 6px 14px;
  margin-top: 6px; color: var(--muted); font-size: calc(12px * var(--type));
}
.dash-trend-foot b { color: var(--text); font-variant-numeric: tabular-nums; }
.dash-actions { display: flex; flex-wrap: wrap; grid-gap: 8px; gap: 8px; margin-top: 10px; }
.dash-actions .btn { flex: 1; min-width: 120px; }
.dash-empty { padding: 16px 4px 4px; color: var(--muted); }
.dash-empty strong { display: block; color: var(--text); font-size: calc(14px * var(--type)); }
.dash-empty p { margin: 4px 0 12px; font-size: calc(12.5px * var(--type)); }

.dash-mastery-section, .dash-calendar-section { margin-top: 12px; }
.dash-mastery { display: grid; grid-gap: 10px; gap: 10px; margin-top: 10px; }
.dash-mastery-row { padding-top: 9px; border-top: 1px dashed var(--line); }
.dash-mastery-row:first-child { padding-top: 0; border-top: 0; }
.dash-mastery-head {
  display: flex; align-items: baseline; justify-content: space-between; grid-gap: 8px; gap: 8px;
  font-size: calc(13px * var(--type));
}
.dash-mastery-head strong { min-width: 0; overflow-wrap: break-word; word-break: break-word; }
.dash-mastery-head b { flex: none; color: var(--text); font-size: calc(13px * var(--type)); font-variant-numeric: tabular-nums; }
.dash-mastery-meta { margin-top: 3px; color: var(--muted); font-size: calc(11px * var(--type)); }

.dash-calendar-layout { display: grid; grid-gap: 12px; gap: 12px; margin-top: 12px; }
.dash-cal { display: grid; grid-gap: 4px; gap: 4px; }
.dash-cal-row {
  display: grid; grid-template-columns: 22px repeat(8, minmax(0, 1fr));
  grid-gap: 4px; gap: 4px; align-items: center;
}
.dash-wd { color: var(--muted); font-size: 10px; text-align: center; }
.dash-day {
  display: block; height: 26px; border-radius: 5px; background: #eef2f8;
}
.dash-day.lv1 { background: #dbeafe; }
.dash-day.lv2 { background: #93c5fd; }
.dash-day.lv3 { background: var(--accent); }
.dash-day.is-today { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.dash-day.is-future { background: transparent; box-shadow: inset 0 0 0 1px #e6ebf3; }
.dash-cal-side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-gap: 7px; gap: 7px; align-content: start; }
.dash-cal-stat {
  padding: 9px 6px; border-radius: var(--radius-sm); background: var(--bg); text-align: center;
}
.dash-cal-stat b {
  display: block; color: var(--text); font-size: calc(19px * var(--type));
  line-height: 1.2; font-variant-numeric: tabular-nums;
}
.dash-cal-stat span { display: block; margin-top: 1px; color: var(--muted); font-size: calc(11px * var(--type)); }
.dash-cal-legend {
  grid-column: 1 / -1;
  display: inline-flex; align-items: center; justify-content: flex-end; grid-gap: 4px; gap: 4px;
  color: var(--muted); font-size: 11px;
}
.dash-cal-legend i { display: block; width: 11px; height: 11px; border-radius: 3px; background: #eef2f8; }
.dash-cal-legend i.lv1 { background: #dbeafe; }
.dash-cal-legend i.lv2 { background: #93c5fd; }
.dash-cal-legend i.lv3 { background: var(--accent); }
.dash-foot { margin: 16px 0 0; color: var(--muted); font-size: calc(11.5px * var(--type)); text-align: center; }

.quick-practice { margin-top: 16px; }
.quick-practice .section-title { margin-top: 0; }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 8px; gap: 8px; }
.quick-action {
  display: flex; align-items: center; min-width: 0; min-height: 82px; padding: 12px 10px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  color: var(--text); text-align: left; box-shadow: var(--shadow-1);
}
.quick-action:hover { border-color: var(--line-strong); }
.quick-action:active { transform: translateY(1px); }
.quick-action:disabled { cursor: default; opacity: .55; }
.quick-icon {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; margin-right: 10px;
  border-radius: 11px; background: var(--accent-soft); color: var(--accent);
  font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.quick-copy { min-width: 0; }
.quick-copy b { display: block; font-size: calc(14px * var(--type)); line-height: 1.35; }
.quick-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: calc(11px * var(--type)); line-height: 1.4; }
.quick-arrow { margin-left: auto; color: var(--muted); font-size: 22px; line-height: 1; }

.home-share { margin-top: 18px; }
.home-share-head {
  display: flex; align-items: flex-start; justify-content: space-between; grid-gap: 12px; gap: 12px;
}
.home-share-head > div { min-width: 0; }
.home-share-head .section-title { margin: 0; }
.home-share-head p { margin: 4px 0 0; color: var(--muted); font-size: calc(12px * var(--type)); line-height: 1.5; }
.home-share-head .chip { flex: none; }
.share-note-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 8px; gap: 8px; margin-top: 10px; }
.share-note-button {
  display: flex; align-items: flex-start; min-width: 0; min-height: 142px; padding: 13px 11px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  color: var(--text); text-align: left; box-shadow: var(--shadow-1);
}
.share-note-button:hover { border-color: var(--line-strong); }
.share-note-button:active { transform: translateY(1px); }
.share-note-button:disabled { cursor: default; background: var(--bg); opacity: .62; }
.share-note-button.is-busy { border-color: var(--accent); background: var(--accent-soft); }
.share-note-icon {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin-right: 9px;
  border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 800;
}
.share-note-copy { display: block; min-width: 0; }
.share-note-copy b { display: block; font-size: calc(13.5px * var(--type)); line-height: 1.35; }
.share-note-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: calc(11px * var(--type)); line-height: 1.45; }
.share-note-cta { display: block; margin-top: 10px; color: var(--accent); font-size: calc(11.5px * var(--type)); font-weight: 700; }
.share-note-button:disabled .share-note-cta { color: var(--muted); }
.share-note-arrow { margin-left: auto; color: var(--muted); font-size: 20px; line-height: 1; }

@media (min-width: 700px) {
  .dash-two-col { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: stretch; }
  .dash-mastery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 12px 22px; gap: 12px 22px; }
  .dash-mastery-row:nth-child(2) { padding-top: 0; border-top: 0; }
  .dash-calendar-layout { grid-template-columns: minmax(0, 640px) 190px; justify-content: space-between; align-items: start; }
  .dash-cal-side { grid-template-columns: 1fr; }
  .dash-cal-stat { display: flex; align-items: baseline; grid-gap: 8px; gap: 8px; padding: 10px 12px; text-align: left; }
  .dash-cal-stat b { display: inline; font-size: calc(22px * var(--type)); }
  .dash-cal-legend { justify-content: flex-start; }
  .dash-day { height: 30px; }
  .dash-hero-nums div { padding: 12px 8px; }
  .dash-hero-nums b { font-size: calc(26px * var(--type)); }
}

@media (min-width: 700px) {
  .achievement-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .learn-summary { flex-direction: row; align-items: baseline; grid-gap: 10px; gap: 10px; }
}
@media (max-width: 560px) {
  .daily-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-status { grid-column: 1 / -1; width: fit-content; }
  .lesson-actions .btn { width: 100%; }
  .lesson-head { align-items: center; }
}
