/*
 * 710 Network — shared UI vocabulary. Source: 710 DESIGN.md v1.
 * Only custom-property declarations: loading this file alone must not style
 * an element, fetch fonts or start motion. The old --tn710-* surface remains
 * independently overridable. Use semantic spacing names in a component.
 */
:where(:root) {
  /* Brand & roles. Green is an indicator, not small text on a gray surface.
     The pale rule is decorative; an input outline uses border instead. */
  --tn710-ui-forest: #1d342c;
  --tn710-ui-green: #008426;
  --tn710-ui-lime: #d4f200;
  --tn710-ui-surface: #ffffff;
  --tn710-ui-subtle: #f2f3f5;
  --tn710-ui-ink: #20262b;
  --tn710-ui-muted: #4a5660;
  --tn710-ui-line: #d5dadf;
  --tn710-ui-border: #707b85;
  --tn710-ui-error: #9b3028;
  --tn710-ui-error-bg: #fff3f1;
  --tn710-ui-focus: var(--tn710-ui-green);
  --tn710-ui-focus-dark: var(--tn710-ui-lime);
  --tn710-ui-on-dark: var(--tn710-ui-surface);

  /* Reuse local font faces already provided by Catalog Tools and the theme.
     This file must not import or declare another copy of a font. */
  --tn710-ui-font-ja: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --tn710-ui-font-heading: TNCHeading, "Space Grotesk", var(--tn710-ui-font-ja);
  --tn710-ui-font-body: TNCBody, Montserrat, var(--tn710-ui-font-ja);
  --tn710-ui-fs-sm: .875rem;
  --tn710-ui-fs-body: 1rem;
  --tn710-ui-fs-lg: 1.125rem;
  --tn710-ui-fs-h3: 1.25rem;
  --tn710-ui-fs-h2: 1.5rem;
  --tn710-ui-fs-h1: 1.875rem;
  --tn710-ui-fw-regular: 400;
  --tn710-ui-fw-medium: 500;
  --tn710-ui-fw-semibold: 600;
  --tn710-ui-fw-bold: 700;
  --tn710-ui-lh-body: 1.7;
  --tn710-ui-lh-ui: 1.4;
  --tn710-ui-lh-h1: 1.3;
  --tn710-ui-lh-h2: 1.35;
  --tn710-ui-lh-h3: 1.4;

  /* Four-pixel scale at the standard 16px root; no root font-size reset. */
  --tn710-ui-space-1: .25rem;
  --tn710-ui-space-2: .5rem;
  --tn710-ui-space-3: .75rem;
  --tn710-ui-space-4: 1rem;
  --tn710-ui-space-5: 1.25rem;
  --tn710-ui-space-6: 1.5rem;
  --tn710-ui-space-7: 1.75rem;
  --tn710-ui-space-8: 2rem;
  --tn710-ui-space-9: 2.25rem;
  --tn710-ui-space-10: 2.5rem;
  --tn710-ui-space-11: 2.75rem;
  --tn710-ui-space-12: 3rem;
  --tn710-ui-space-13: 3.25rem;
  --tn710-ui-space-14: 3.5rem;
  --tn710-ui-space-15: 3.75rem;
  --tn710-ui-space-16: 4rem;

  --tn710-ui-gutter: var(--tn710-ui-space-4);
  --tn710-ui-section: var(--tn710-ui-space-8);
  --tn710-ui-section-lg: var(--tn710-ui-space-10);
  --tn710-ui-inset: var(--tn710-ui-space-4);
  --tn710-ui-gap-heading: var(--tn710-ui-space-3);
  --tn710-ui-gap-action: var(--tn710-ui-space-5);
  --tn710-ui-gap-field: var(--tn710-ui-space-4);
  --tn710-ui-gap-buttons: var(--tn710-ui-space-3);
  --tn710-ui-gap-icon: var(--tn710-ui-space-2);
  --tn710-ui-button-px: var(--tn710-ui-space-5);
  --tn710-ui-button-py: var(--tn710-ui-space-3);
  --tn710-ui-target-primary: max(48px, 3rem);
  --tn710-ui-target-secondary: max(44px, 2.75rem);
  --tn710-ui-width-standard: 1152px;
  --tn710-ui-width-reading: 800px;
  --tn710-ui-width-catalog: 1280px;

  --tn710-ui-stroke: 1px;
  --tn710-ui-stroke-active: 2px;
  --tn710-ui-ring-width: 3px;
  --tn710-ui-ring-offset: 3px;
  --tn710-ui-radius-button: 12px 4px 12px 4px;
  --tn710-ui-radius-card: 16px 4px 16px 4px;
  --tn710-ui-radius-field: 4px;
  --tn710-ui-shadow-none: none;
  --tn710-ui-shadow-overlay: 0 4px 12px rgb(29 52 44 / 12%);
  --tn710-ui-icon-sm: 1rem;
  --tn710-ui-icon-md: 1.25rem;
  --tn710-ui-icon-lg: 1.5rem;
  --tn710-ui-icon-stroke: 1.75;
  --tn710-ui-duration: 120ms;
  --tn710-ui-ease: ease-out;

  /* For tooling and the catalogue. CSS var() cannot be used in a media
     condition: the literal media queries below mirror these two tokens. */
  --tn710-ui-bp-tablet: 768px;
  --tn710-ui-bp-desktop: 1025px;
}

@media (min-width: 768px) {
  :where(:root) {
    --tn710-ui-fs-h2: 1.75rem;
    --tn710-ui-fs-h1: 2.25rem;
    --tn710-ui-gutter: var(--tn710-ui-space-6);
    --tn710-ui-section: var(--tn710-ui-space-12);
    --tn710-ui-section-lg: var(--tn710-ui-space-16);
    --tn710-ui-inset: var(--tn710-ui-space-6);
    --tn710-ui-gap-heading: var(--tn710-ui-space-4);
    --tn710-ui-gap-action: var(--tn710-ui-space-6);
    --tn710-ui-gap-field: var(--tn710-ui-space-5);
    --tn710-ui-button-px: var(--tn710-ui-space-6);
  }
}
@media (min-width: 1025px) {
  :where(:root) {
    --tn710-ui-fs-h2: 2rem;
    --tn710-ui-fs-h1: 2.625rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  :where(:root) { --tn710-ui-duration: 0s; }
}
