/* Turn Zero common presentation: tokens and type roles only.
   Product builds consume this source before their own layout and behavior styles.
   No data-theme attribute, or data-theme="light", means light. Products that
   offer a theme choice set data-theme="dark" or "system" on the root element.
   This file loads no fonts. The website and tzMesh load the same approved font
   kit; the plane's sign-in, consent and passkey pages use the system fallbacks
   without adding an outside font request. The kit supplies normal 400, 600
   and 700 faces for the heading and body fonts, and 400 for the code font. */
:root {
  color-scheme: light;
  --tz-body: proxima-nova, "Segoe UI", system-ui, sans-serif;
  --tz-heading: acumin-pro, proxima-nova, "Segoe UI", system-ui, sans-serif;
  --tz-code: source-code-pro, Consolas, monospace;

  --tz-bg: #fafbf7;
  --tz-paper: #ffffff;
  --tz-ink: #102b23;
  --tz-muted: #40574b;
  --tz-green: #205942;
  --tz-on-green: #ffffff;
  --tz-link-hover: #123d2e;
  --tz-soft: #eaf1e7;
  --tz-inset: #eff4eb;
  --tz-line: #d7e1d7;
  --tz-control-line: #73836e;
  --tz-ok-text: #1b7a38;
  --tz-warn-text: #8a5300;
  /* Danger fills pair with on-danger; text and control borders use their own
     tokens so a destructive action stays legible in both themes. */
  --tz-danger: #b3342e;
  --tz-danger-hover: #972923;
  --tz-on-danger: #ffffff;
  --tz-danger-text: #b3342e;
  --tz-danger-line: #b3342e;

  /* Rem values preserve the reader's browser text-size preference. */
  --tz-body-size: 1rem;
  --tz-body-leading: 1.5;
  --tz-ui: .9375rem;
  --tz-ui-leading: 1.5;
  --tz-small: .875rem;
  --tz-small-leading: 1.5;
  --tz-caption: .8125rem;
  --tz-control: 1rem;
  --tz-control-leading: 1.5;
  --tz-code-size: .875rem;
  --tz-code-leading: 1.6;

  --tz-app-title: 2rem;
  --tz-app-title-leading: 1.2;
  --tz-app-section: 1.5rem;
  --tz-app-section-leading: 1.25;
  --tz-display: 3.5rem;
  --tz-display-leading: 1.1;
  --tz-section: 2.25rem;
  --tz-section-leading: 1.2;
  --tz-lead: 1.25rem;
  --tz-lead-leading: 1.45;

  --tz-radius-control: .4375rem;
  --tz-radius-selected: .5rem;
  --tz-radius-menu: .75rem;
  --tz-radius-dialog: 1rem;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --tz-bg: #1f2622;
  --tz-paper: #252e28;
  --tz-ink: #edf2ec;
  --tz-muted: #bfccbf;
  --tz-green: #add7b8;
  --tz-on-green: #102b23;
  --tz-link-hover: #c8e8cf;
  --tz-soft: #344338;
  --tz-inset: #1f2622;
  --tz-line: #455448;
  --tz-control-line: #7f9684;
  --tz-ok-text: #9bd4aa;
  --tz-warn-text: #e7c183;
  --tz-danger-text: #ffb4ab;
  --tz-danger-line: #ffb4ab;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --tz-bg: #1f2622;
    --tz-paper: #252e28;
    --tz-ink: #edf2ec;
    --tz-muted: #bfccbf;
    --tz-green: #add7b8;
    --tz-on-green: #102b23;
    --tz-link-hover: #c8e8cf;
    --tz-soft: #344338;
    --tz-inset: #1f2622;
    --tz-line: #455448;
    --tz-control-line: #7f9684;
    --tz-ok-text: #9bd4aa;
    --tz-warn-text: #e7c183;
    --tz-danger-text: #ffb4ab;
    --tz-danger-line: #ffb4ab;
  }
}

@media (max-width: 43.75rem) {
  :root {
    --tz-app-title: 1.75rem;
    --tz-app-section: 1.375rem;
    --tz-display: 2.25rem;
    --tz-section: 1.75rem;
    --tz-lead: 1.125rem;
  }
}

/* Optional type roles; existing product selectors may use these same tokens. */
.tz-type-body {
  font: 400 var(--tz-body-size)/var(--tz-body-leading) var(--tz-body);
  letter-spacing: normal;
  word-spacing: normal;
}
.tz-type-navigation {
  font: 400 var(--tz-ui)/var(--tz-ui-leading) var(--tz-body);
}
.tz-type-supporting {
  font: 400 var(--tz-small)/var(--tz-small-leading) var(--tz-body);
  color: var(--tz-muted);
}
.tz-type-app-title {
  font: 700 var(--tz-app-title)/var(--tz-app-title-leading) var(--tz-heading);
  letter-spacing: -.025em;
}
.tz-type-app-section {
  font: 700 var(--tz-app-section)/var(--tz-app-section-leading) var(--tz-heading);
  letter-spacing: -.02em;
}
.tz-type-marketing-title {
  font: 700 var(--tz-display)/var(--tz-display-leading) var(--tz-heading);
  letter-spacing: -.035em;
}
.tz-type-marketing-section {
  font: 700 var(--tz-section)/var(--tz-section-leading) var(--tz-heading);
  letter-spacing: -.025em;
}
.tz-type-lead {
  font: 400 var(--tz-lead)/var(--tz-lead-leading) var(--tz-body);
  color: var(--tz-muted);
}
.tz-type-prompt {
  font: 400 var(--tz-code-size)/var(--tz-code-leading) var(--tz-code);
  letter-spacing: normal;
  word-spacing: normal;
  overflow-wrap: anywhere;
}
