:root {
  --type-display: 1.625rem;
  --type-page: 1.25rem;
  --type-section: 1.0625rem;
  --type-body: 1rem;
  --type-label: .875rem;
  --type-note: .8125rem;
  --course-font: system-ui, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

@media screen {
  body.catalog-page, body.practice-page { font-family: var(--course-font); }
  .catalog-page .catalog-intro h1,
  .practice-page :is(.home-hero, .workspace-hero) h1 {
    font-size: var(--type-display);
    font-weight: 600;
    letter-spacing: normal;
    line-height: 1.25;
  }
  .catalog-page .catalog-grade-name strong { font-size: var(--type-body); font-weight: 600; }

  #content :is(h2, h3, h4) {
    color: var(--navy);
    letter-spacing: normal;
    font-weight: 600;
  }

  #content :is(.lesson-intro, .path-overview, .wl-main, .soccer-start, .soccer-lesson-body,
               .writing-project, .lesson-body, .panel) h2 {
    font-size: var(--type-page);
    line-height: 1.4;
  }

  #content :is(.panel, .lesson-body, .wl-main, .picture-writing, .writing-project) h3 {
    font-size: var(--type-section);
    line-height: 1.5;
  }

  #content .wl-main .wl-word {
    font-size: 1.75rem;
    line-height: 1.35;
    letter-spacing: normal;
    margin-top: .7rem;
    overflow-wrap: anywhere;
  }

  #content .wl-handwriting span {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    letter-spacing: .12em;
  }

  #content .soccer-course-count > strong { font-size: 1.75rem; }
  #content .soccer-scoreboard strong { font-size: 2.5rem; }
  #content :is(.soccer-vocab b, .soccer-vocab strong) { font-size: var(--type-body); }
  #content :is(.picture-draft, .writing-project) label { font-weight: 550; }

  #tabs {
    border-radius: 9px;
    padding: .2rem .3rem;
  }

  #tabs > button, #tabs .course-extra-tabs > summary {
    padding: .45rem .6rem;
    font-weight: 500;
  }

  #tabs > button.active, #tabs .course-extra-tabs button.active {
    color: #234e3a;
    font-weight: 600;
    box-shadow: none;
  }

  #content :is(.language-bank, .picture-writing, .writing-project) :is(input, textarea, button):focus-visible,
  #tabs :is(button, summary):focus-visible {
    outline: 2px solid #54816a;
    outline-offset: 2px;
  }

  .practice-page :is(.lesson-head, .section-title-row, .placeholder-panel) h2 {
    font-size: var(--type-page);
    line-height: 1.35;
    font-weight: 600;
  }

  .practice-page :is(.summary-card, .work-rail-card) h3 {
    font-size: var(--type-section);
    line-height: 1.4;
  }
}
