@font-face {
  font-family: "TM Barlow";
  src: url("/tm-barlow-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "TM Barlow";
  src: url("/tm-barlow-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "TM Barlow Display";
  src: url("/tm-barlow-display.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "TM Signal Display";
  src: url("/tm-signal-display.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "TM Space Mono";
  src: url("/tm-space-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "TM Research Sans";
  src: url("/tm-research-sans.woff2") format("woff2");
  font-weight: 400 670;
  font-display: swap;
}

body:is(.landing, .auth-page, .workbench, .upgrade-page, .legal-page) {
  --ui-fallback: system-ui, sans-serif;
  --body-font: "TM Barlow", var(--ui-fallback);
  --display-font: "TM Barlow Display", "TM Barlow", var(--ui-fallback);
  --mono: "TM Space Mono", ui-monospace, var(--ui-fallback);
  font-family: var(--body-font);
  font-kerning: normal;
}
body:is(.landing, .auth-page, .workbench, .upgrade-page, .legal-page):lang(zh) {
  --ui-fallback: "TM Research Sans", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --display-font: "TM Barlow Display", "TM Signal Display", var(--ui-fallback);
  line-break: strict;
}
body:is(.landing, .auth-page, .workbench, .upgrade-page, .legal-page):lang(zh-TW) {
  --ui-fallback: "TM Research Sans", "PingFang TC", "Microsoft JhengHei UI", sans-serif;
}
body .brand > span:last-child {
  font-family: "TM Barlow Display", var(--body-font);
  font-weight: 800;
  letter-spacing: -.015em;
}
body .locale-select { font-family: var(--body-font); font-size: .84rem; }
:where(.landing, .auth-page, .workbench, .upgrade-page, .legal-page) ::selection {
  background: #9ce9d9;
  color: #10232c;
}

.landing :is(.visitor-intro h1, .research-heading h2, .step-detail h3, .download-intro h2),
.auth-page :is(.auth-context h2, .auth-card h1), .workbench :is(.intro h1, .page-heading h1),
.upgrade-page .upgrade-heading h1, .legal-page :is(.legal-document h1, .legal-document > section h2) {
  font-family: var(--display-font);
  font-weight: 800;
  font-style: normal;
  font-synthesis: none;
  letter-spacing: -.017em;
  line-height: 1.12;
  text-wrap: balance;
}
.landing .visitor-intro h1 { line-height: 1.01; }
.landing .visitor-intro h1 em { font-style: normal; }
:is(.landing, .auth-page, .workbench, .upgrade-page, .legal-page):lang(zh)
  :is(.visitor-intro h1, .research-heading h2, .step-detail h3, .auth-context h2, .auth-card h1,
  .intro h1, .page-heading h1, .upgrade-heading h1, .legal-document h1, .legal-document > section h2, .download-intro h2) {
  letter-spacing: .014em;
  line-height: 1.24;
}
.landing .visitor-intro .intro-copy:lang(zh), .landing .step-detail p:lang(zh) { line-height: 1.78; }
.landing .metrics dd, .upgrade-page .upgrade-quota strong,
.workbench :is(.stat-value, .order-values dd, .quota-card dd, time) {
  font-family: var(--mono);
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -.055em;
}
.auth-page .auth-card h1 { font-size: clamp(1.75rem, 2.65vw, 2.25rem); }
.auth-page .auth-card h1 + p { margin-block-start: .55rem; font-size: .95rem; line-height: 1.7; }
.auth-page .auth-context p:lang(zh) { line-height: 1.9; }
.auth-page .auth-form label > span:first-child { font-weight: 560; }
.auth-page .auth-form :is(input[type=email], input[name=code]) { font-variant-numeric: tabular-nums; }
.auth-page .auth-form input[name=code] { font-family: var(--mono); letter-spacing: .075em; }
.auth-page .auth-form input[name=code]::placeholder { font-family: var(--body-font); letter-spacing: normal; }
.workbench .intro h1:lang(zh) { max-inline-size: none; }
.workbench .intro > p:lang(zh), .workbench .message-content:lang(zh) { line-height: 1.85; }
.workbench .suggestion:lang(zh) { font-weight: 510; line-height: 1.55; }
.workbench .send-button span:first-child { font-family: var(--body-font); }
.workbench .eyebrow:lang(zh), .workbench .intro-scope:lang(zh) { letter-spacing: .095em; }
.upgrade-page .upgrade-card h2:lang(zh), .upgrade-page .upgrade-comparison h2:lang(zh) {
  letter-spacing: .018em;
}
.legal-page .legal-document { max-width: 51rem; }
.legal-page .legal-document > section { padding-block: clamp(1.35rem, 3vw, 2rem); }
.legal-page .legal-document > section h2 { margin-block-end: .68rem; font-size: 1.45rem; }
.legal-page .legal-document > section p { font-size: 1rem; line-height: 1.78; }
.legal-page .legal-document > section p:lang(zh) { line-height: 1.95; }
.legal-page .legal-meta dd { font-variant-numeric: tabular-nums; }

:is(.auth-page, .upgrade-page, .legal-page, .landing, .workbench)
  :is(a, button, summary, select, input):focus-visible {
  outline: 2px solid #acfae6;
  outline-offset: 3px;
}
.legal-page .legal-document a:hover, .auth-page .auth-legal a:hover {
  text-decoration-thickness: .14em;
  text-underline-offset: .2em;
}
@media (max-width: 710px) {
  .auth-page .auth-form input:not([type=checkbox]), .workbench .composer textarea { font-size: 1rem; }
}
@media (max-width: 590px) {
  :is(.upgrade-page, .legal-page) .access-header { padding-inline: 1rem; gap: .55rem; }
  .access-header .locale-select { inline-size: clamp(5.5rem, 24vw, 7.5rem); }
  .access-header-actions .button { padding-inline: .7rem; }
}
@media (forced-colors: active) {
  :is(.auth-page, .upgrade-page, .legal-page, .landing, .workbench)
    :is(a, button, summary, select, input):focus-visible { outline-color: Highlight; }
}
