/* 导游学霸 Typography System
   Calm study interface inspired by Apple China's SF Pro SC hierarchy.
   Apple fonts are referenced as local candidates only; no font files are bundled. */
:root{
  --jx-font-text:"SF Pro SC","SF Pro Text","PingFang SC","Helvetica Neue","Segoe UI Variable","Noto Sans CJK SC","Microsoft YaHei UI","Microsoft YaHei",Arial,sans-serif;
  --jx-font-display:"SF Pro SC","SF Pro Display","PingFang SC","Helvetica Neue","Segoe UI Variable Display","Noto Sans CJK SC","Microsoft YaHei UI","Microsoft YaHei",Arial,sans-serif;
  --jx-font-metric:"SF Pro SC","SF Pro Display","DIN Alternate","PingFang SC","Helvetica Neue","Segoe UI Variable Display","Microsoft YaHei UI",Arial,sans-serif;
  --jx-font-mono:"SFMono-Regular","SF Mono","Cascadia Code","Roboto Mono","Noto Sans Mono CJK SC",ui-monospace,Menlo,Monaco,Consolas,monospace;
  --jx-font-serif:"Songti SC","STSong","Source Han Serif SC","Noto Serif CJK SC",serif;

  /* Legacy aliases: existing modules inherit one coherent vocabulary. */
  --font-ui:var(--jx-font-text);
  --font-display:var(--jx-font-display);
  --font-metric:var(--jx-font-metric);
  --font-mono:var(--jx-font-mono);
  --font-serif:var(--jx-font-serif);
  --ds-sans:var(--jx-font-text);
  --ds-serif:var(--jx-font-display);
  --sans:var(--jx-font-text);
  --serif:var(--jx-font-display);
}

html,
body{
  font-family:var(--jx-font-text)!important;
  font-optical-sizing:auto;
  font-kerning:normal;
  letter-spacing:0;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

button,
input,
textarea,
select,
option{
  font-family:var(--jx-font-text)!important;
  letter-spacing:0;
}

button{font-weight:500!important}

/* Reset historical per-component stacks before assigning semantic roles below. */
body :where(*:not(pre):not(code):not(kbd):not(samp)){
  font-family:inherit!important;
}

body :where(b,strong){
  font-weight:600!important;
}

/* Display type is reserved for hierarchy, never for long-form reading. */
h1,
h2,
h3,
h4,
h5,
h6,
.view-head h1,
.section-heading h2,
.panel-heading h2,
.tile-headline,
.hero-title,
.page-title,
.modal-title{
  font-family:var(--jx-font-display)!important;
  font-style:normal;
  font-weight:600!important;
  letter-spacing:0!important;
}

h1{line-height:1.12}
h2{line-height:1.18}
h3,h4,h5,h6{line-height:1.28}

/* UI emphasis stays quieter than legacy 700/800/900-heavy styling. */
:where(.btn,.button,[class*="-button"],[class*="-action"],[class*="-enter"]){
  font-weight:600!important;
}

:where([class*="-badge"],[class*="-tag"],[class*="-label"]){
  font-weight:600!important;
}

:where(.eyebrow,.page-kicker,.route-kicker,[class*="-eyebrow"],[class*="-kicker"],[class*="-overline"]){
  font-family:var(--jx-font-text)!important;
  font-weight:600!important;
  letter-spacing:.08em!important;
}

/* Questions and answers are reading content, not poster headlines. */
:where(.quiz-q,.question-text,.question-context,.quiz-exp,.opt,.option,.answer-reveal){
  font-family:var(--jx-font-text)!important;
}

:where(.quiz-q,.question-text){
  font-weight:500!important;
  letter-spacing:0!important;
}

:where(.quiz-options .opt,.options .option){
  font-weight:400!important;
  letter-spacing:0!important;
}

/* Numbers keep Apple-like alignment without turning the whole UI monospace. */
:where(.big-num,.proof-num,.metric-value,.metric-grid strong,.signal-strip strong,
  .user-summary strong,.progress-kpis article>strong,.practice-score b,.qs-count,
  .answer-letters,.rank-kpis b,.device-donut b,.today-stats b,.funnel-row b,
  [class*="-metric"],[class*="-number"],[class*="-count"]){
  font-family:var(--jx-font-metric)!important;
  font-weight:600!important;
  font-variant-numeric:tabular-nums lining-nums;
  letter-spacing:0!important;
}

code,
pre,
kbd,
samp,
.checksum,
.axis-label,
.question-id,
[class*="-code"]{
  font-family:var(--jx-font-mono)!important;
  font-variant-numeric:tabular-nums;
}

/* Serif remains an intentional cultural accent, never the default UI voice. */
blockquote,
.rank-seal,
.party-cinema :is(h1,h2),
.type-serif,
[data-typography="serif"]{
  font-family:var(--jx-font-serif)!important;
}

.rank-seal{font-weight:700!important}

html:lang(zh-CN) :where(p,li,dd,dt,td,th,label,summary,h1,h2,h3,h4,h5,h6){
  letter-spacing:0;
}

@media(max-width:735px){
  h1{line-height:1.16}
  h2{line-height:1.22}
}
