:root {
  /* BV-03 current semantic palette (unchanged authority) */
  --color-bg: #f5eddf;
  --color-surface: #fbf7ef;
  --color-surface-muted: #eadfcf;
  --color-text: #30251f;
  --color-text-soft: #504239;
  --color-text-muted: #75665a;
  --color-border: #d9cabb;
  --color-border-strong: #ae9b89;
  --color-accent: #9a5b35;
  --color-accent-hover: #7f482b;
  --color-accent-soft: #ead4bd;
  --color-gold: #b8885a;
  --color-danger: #7b3d30;
  --color-danger-border: #8d4937;
  --color-danger-soft: #fff7ef;
  --color-success: #4f6954;
  --color-success-soft: #dfe8df;
  --color-focus: #9a5b35;
  /* BV-05-R01 D7: deep rhythm surface calibrated from near-black back into the
     warm deep-brown / warm-ink world of the paper-and-ochre brand family.
     Own calibration between text ink (#30251f) and the warm ochre family —
     deliberately NOT the third-party suggested #3D2B1F. */
  --color-deep: #3a2c22;
  --color-deep-ink: #f5ecde;

  /* D-01 Path A: self-hosted serif subset + system sans (unchanged) */
  --font-sans: "Noto Sans CJK SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "LifeMap Editorial Serif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;

  /* --------------------------------------------------------------
     BV-05-R01 cross-device Chinese typography authority scale.
     One token family, three optical device classes (mobile-first).
     Mobile <=760 / Tablet 761-920 / Desktop >=921.

     R01 order of authority: BV-05-R01 BUILD ORDER section B overrides
     the BV-05 v0.2 scale for the roles listed below:
       Hero H1        1440=52 1280=48 / 768=40 / 430=34 390=32 360=30
       Section H2     1440=34 1280=32 / 768=29 / 430=26 390=25 360=24
       Utility H1     desktop=30 tablet=30 / mobile=28
       Question       22/22 / 430=21 390=20 360=20
       Lead           17 desktop+tablet / 16 mobile
       Progress/Meta  13
     Font sizes stay in rem so 125% text scaling remains provable.
     -------------------------------------------------------------- */

  /* MOBILE base (360) — stepped at 375 / 410 below */
  --type-hero: 1.875rem;              /* 30px @360 */
  --type-hero-lh: 1.26;
  --type-hero-ls: -0.015em;

  --type-page-h1: 1.75rem;            /* 28px Utility H1 mobile */
  --type-page-h1-lh: 1.3;
  --type-page-h1-ls: -0.015em;

  --type-section-h2: 1.5rem;          /* 24px @360 */
  --type-section-h2-lh: 1.4;
  --type-section-h2-ls: -0.012em;

  --type-h3: 1.25rem;              /* 20px */
  --type-h3-lh: 1.48;
  --type-h3-ls: -0.010em;

  --type-lead: 1rem;                  /* 16px mobile */
  --type-lead-lh: 1.78;

  --type-body: 1rem;               /* 16px */
  --type-body-lh: 1.78;

  --type-question: 1.25rem;           /* 20px @360/390 */
  --type-question-lh: 1.55;

  --type-label: 0.875rem;          /* 14px */
  --type-label-lh: 1.55;

  --type-helper: 0.8125rem;        /* 13px */
  --type-helper-lh: 1.62;

  --type-meta: 0.8125rem;          /* 13px — R01: progress/meta 13px */
  --type-meta-lh: 1.55;

  --type-cta: 0.9375rem;           /* 15px */
  --type-cta-lh: 1.35;

  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6rem;

  --gutter: 22px;
  --width-reading: 640px;
  --width-content: 1180px;
  --width-wide: 1180px; /* compatibility alias: same authority value, not a parallel width system */

  --radius-sm: 5px;
  --transition-fast: 120ms ease;

  /* Debug design-system compatibility aliases (desktop reference) */
  --text-display: clamp(3rem, 5vw, 4.125rem);
  --text-h1: 2.625rem;
  --text-h2: 2.375rem;
  --text-h3: 1.5rem;
  --text-lead: 1.125rem;
  --text-body: 1rem;
  --text-small: 0.8125rem;
  --text-meta: 0.8125rem;

  --leading-tight: 1.28;
  --leading-heading: 1.42;
  --leading-body: 1.78;
  --leading-small: 1.6;
}

/* R01 mobile micro-steps: exact endpoints 32px@390 / 34px@430 hero, etc.
   Placed BEFORE the tablet/desktop blocks so those later blocks override
   inside their own ranges. */
@media (min-width: 375px) {
  :root {
    --type-hero: 2rem;                /* 32px @390 band */
    --type-section-h2: 1.5625rem;     /* 25px */
  }
}
@media (min-width: 410px) {
  :root {
    --type-hero: 2.125rem;            /* 34px @430 band */
    --type-section-h2: 1.625rem;      /* 26px */
    --type-question: 1.3125rem;       /* 21px */
  }
}

@media (min-width: 761px) and (max-width: 920px) {
  :root {
    --type-hero: 2.5rem;              /* 40px @768 */
    --type-hero-lh: 1.24;
    --type-hero-ls: -0.018em;

    --type-page-h1: 1.875rem;         /* 30px Utility H1 tablet */
    --type-page-h1-lh: 1.3;
    --type-page-h1-ls: -0.015em;

    --type-section-h2: 1.8125rem;     /* 29px */
    --type-section-h2-lh: 1.38;
    --type-section-h2-ls: -0.014em;

    --type-h3: 1.375rem;            /* 22px */
    --type-h3-lh: 1.45;

    --type-lead: 1.0625rem;           /* 17px tablet */
    --type-lead-lh: 1.78;

    --type-question: 1.375rem;        /* 22px */
    --type-question-lh: 1.55;

    --gutter: 42px;
  }
}

@media (min-width: 921px) {
  :root {
    /* R01: Hero 48px@1280 / 52px@1440 */
    --type-hero: clamp(3rem, 2.5vw + 1rem, 3.25rem);
    --type-hero-lh: 1.18;
    --type-hero-ls: -0.022em;

    --type-page-h1: 1.875rem;         /* 30px Utility H1 desktop */
    --type-page-h1-lh: 1.3;
    --type-page-h1-ls: -0.015em;

    /* R01: Section H2 32px@1280 / 34px@1440 */
    --type-section-h2: clamp(2rem, 1.25vw + 1rem, 2.125rem);
    --type-section-h2-lh: 1.36;
    --type-section-h2-ls: -0.016em;

    --type-h3: 1.5rem;              /* 24px */
    --type-h3-lh: 1.45;

    --type-lead: 1.0625rem;           /* 17px desktop */
    --type-lead-lh: 1.78;

    --type-question: 1.375rem;        /* 22px */
    --type-question-lh: 1.55;

    --gutter: clamp(42px, 5vw, 76px);
  }
}
