/* SHARC portal typography layer — CPAMC-style font system (2026-11-14).
 * Layered ABOVE sharc.css (shell baseline untouched): self-hosted Inter (latin)
 * + Noto Sans SC subset (CJK), referenced metrics via local() so users who
 * already have Inter/MiSans/PingFang installed use their native copies.
 */
@font-face {
  font-family: "Inter";
  src: local("Inter"), url("fonts/Inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: local("Inter Medium"), local("Inter"), url("fonts/Inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: local("Inter SemiBold"), local("Inter"), url("fonts/Inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: local("Inter Bold"), local("Inter"), url("fonts/Inter-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* CJK: subset covers all portal copy (i18n + DOM + feed), fallback chain for
 * anything outside the subset goes to the user's system CJK font. */
@font-face {
  font-family: "SHARC Sans SC";
  src: local("MiSans"), local("HarmonyOS Sans SC"), local("PingFang SC"), url("fonts/NotoSC-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "SHARC Sans SC";
  src: local("MiSans Medium"), local("MiSans"), local("HarmonyOS Sans SC"), url("fonts/NotoSC-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "SHARC Sans SC";
  src: local("MiSans Bold"), local("MiSans"), local("PingFang SC Semibold"), url("fonts/NotoSC-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* font stacks: Inter leads latin, SHARC Sans SC carries CJK glyph fallback */
:root {
  --font-sans: "Inter", "SHARC Sans SC", "MiSans", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "JetBrains Mono", Consolas, "Liberation Mono", "SHARC Sans SC", monospace;
}

html, body, .site-shell, input, textarea, select, button {
  font-family: var(--font-sans);
}

/* typography refinements à la CPAMC: tighter display leading, optical sizing */
body {
  font-feature-settings: "cv11", "ss01";       /* Inter: alternate a/l, modern digits */
  letter-spacing: -0.006em;                    /* subtle latin tightening */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Display headings: replace the shell's serif stack (Noto Serif/Songti — the
 * dated look) with the modern sans used across headings in CPAMC-style design.
 * Override the shell variable itself: all 13 heading rules read var(--font-serif). */
:root {
  --font-serif: var(--font-sans);              /* headings now use Inter + SHARC Sans SC */
}
.hero h1, .section-heading h2, .subscribe-copy h2, .saas-intro h2,
.lead-story h3, .story-row h3, .deadline-title h3, .form-heading h3,
.news-dialog > h2, .dialog-body h3, .auth-dialog h2, .about-heading h1,
.team-member h2, .hero-title-en, .stage-heading {
  font-family: var(--font-sans);
}

h1, h2, h3, .hero-title {
  letter-spacing: -0.025em;                    /* display tightening (latin-safe; CJK glyphs unaffected) */
  line-height: 1.12;
}
.micro-label, .issue-line, .agent-code {
  font-variant-numeric: tabular-nums;          /* engineering-style figures */
}
b, strong {
  font-weight: 600;
}

/* READABILITY-BEGIN ===== READABILITY FLOOR (generated) ================================
 * Lifts every shell font below 12px to >= 11.5px (latin micro-labels) or
 * 12.2px+ (zh reading text), preserving size ordering. Regenerate with
 * scratch/rebuild_readability.py after touching sharc.css.
/* ================================================= READABILITY-END */
.answer-options .dual-en, .appeal-journey button .dual-en, .chat-author, .contact-footer, .desktop-nav .bi>span:last-child, .evidence-checklist .dual-en, .header-cta .bi>span:last-child, .journey-heading, .quick-prompts .dual-en, .studio-footnote, .studio-note, .submission-timeline time, .subscription-tabs .dual-en, .support-message strong, .topic .dual-en { font-size: 0.72rem; }
.answer-options button, .appeal-journey button>span:first-child, .appeal-journey>p, .brand small, .button .dual-en, .case-facts label, .contact-option-copy small, .demo-badge, .demo-note, .diagnostic-questions legend .dual-en, .dialog-footer p, .dialog-meta, .evidence-count, .extracted-card dl>div, .finding>span:first-child, .footer-bottom, .footer-top>div:first-child>p+p, .hero-capabilities .dual-en, .hero-kicker, .issue-line, .news-filters button>span:last-child, .qq-contact-help p, .quick-prompts button, .resolved>span:first-child, .stage-back, .status-pill, .story-row-date, .studio-tabs .dual-en, .submitted-message, .ticker-group span, .visual-caption .dual-en, .visual-caption>span, .window-brand { font-size: 0.76rem; }
.appeal-journey button .dual, .auth-privacy, .chat-auth-notice, .chat-bubble .dual-en, .chat-cta, .chat-loading, .contact-ai-link, .copy-feedback, .deadline-panel li .dual-en, .deadline-panel>p .dual-en, .desktop-nav a, .dialog-footer a, .evidence-checklist label, .finding, .form-message, .header-cta, .hero-capabilities strong, .journey-heading strong, .micro-label, .qq-contact-help button, .resolved, .saas-intro li .dual-en, .stage-error, .stage-heading .dual-en, .story-row h3 .dual-en, .studio-primary, .studio-secondary, .team-role, .text-link .dual-en, .topic { font-size: 0.79rem; }
.about-page-footer, .about-page-header .about-home-link, .account-status, .account-toggle, .agent-actions .button, .agent-panel>label, .auth-error, .auth-form label, .case-facts input, .chat-composer textarea, .deadline-panel li span, .deadline-panel time, .diagnostic-questions legend, .floating-chat, .footer-statement small, .footer-top>div:first-child>p, .form-heading h3 .dual-en, .guardrail-clean, .hero-capabilities .dual, .language-toggle, .mobile-nav .bi>span:last-child, .poa-preview article, .poa-preview h3, .stage-field, .stage-intro, .story-meta, .studio-tabs button, .submission-timeline li, .support-message p, .validation-result, .visual-caption>.dual, .wechat-form legend, .wechat-form>label { font-size: 0.81rem; }

/* 用户点名的五处再加大一档（比同层级再高 10–15%），中文阅读体 */
.story-row-date { font-size: 0.84rem; }            /* 条目日期+分类标签 */
.story-meta { font-size: 0.82rem; }                /* lead-story meta/分类 */
.ticker-group span { font-size: 0.8rem; }          /* 滚动条 */
.news-filters button>span:last-child { font-size: 0.8rem; } /* 筛选计数 */
.hero-capabilities .dual { font-size: 0.84rem; }   /* hero 侧栏标语行 */
.hero-capabilities strong { font-size: 0.82rem; }  /* hero 侧栏加粗项 */

/* WRAP-SAFE (generated follow-up): fixed-width containers × lifted font sizes
 * — widen the ones that now orphan, keep balance on short labels */
.visual-caption>.dual { max-width: 22rem; text-wrap: balance; }   /* was 16rem: 20 zh chars @12.96px ≈ 271px > 256px → "件。" orphan */
.visual-caption .dual-en { max-width: 22rem; }
.hero-capabilities .dual { text-wrap: balance; }                  /* 3-col grid, short zh labels */
.issue-line { white-space: nowrap; }                               /* ISSUE + date must stay one line */
.story-row-date { white-space: nowrap; }                           /* date + category, no mid-line wrap */
.expired-note, .deadline-panel time { white-space: nowrap; }
