@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT@9..144,300..700,30..100&family=Inter+Tight:wght@400..600&family=JetBrains+Mono:wght@400;500&family=Noto+Serif+SC:wght@400;500&family=Noto+Sans+SC:wght@400;500&display=swap");

:root {
  /* Typography roles */
  --type-editorial: "Fraunces", "Tiempos Text", "Source Serif Pro", "Iowan Old Style", Georgia, serif;
  --type-interface: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --type-code: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  /* Fraunces variable axes */
  --type-axis-display: "opsz" 144, "SOFT" 30;
  --type-axis-title: "opsz" 60, "SOFT" 40;
  --type-axis-text: "opsz" 14, "SOFT" 50;

  /* Type levels */
  --type-display-size: 36pt;
  --type-display-weight: 500;
  --type-display-line: 1.05;

  --type-title-size: 22pt;
  --type-title-weight: 500;
  --type-title-line: 1.18;

  --type-subtitle-size: 16pt;
  --type-subtitle-weight: 500;
  --type-subtitle-line: 1.25;

  --type-body-size: 10pt;
  --type-body-weight: 400;
  --type-body-line: 1.65;

  --type-caption-size: 9pt;
  --type-caption-weight: 400;
  --type-caption-line: 1.45;

  --type-label-size: 9pt;
  --type-label-weight: 500;
  --type-label-line: 1.3;

  --type-tiny-size: 8.5pt;
  --type-tiny-weight: 400;
  --type-tiny-line: 1.4;

  /* Legacy aliases kept so existing templates stay stable. */
  --font-serif: var(--type-editorial);
  --font-sans: var(--type-interface);
  --font-mono: var(--type-code);
  --serif-display: var(--type-axis-display);
  --serif-text: var(--type-axis-text);
}

:lang(zh),
:lang(zh-CN) {
  --type-editorial: "Fraunces", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, serif;
  --type-interface: "Inter Tight", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --type-code: "JetBrains Mono", "SF Mono", Menlo, Consolas, "Noto Sans SC", monospace;
}
