/* Tether web design tokens — shared by landing and onboarding (login retired U5).
   Dark-first instrument palette. No remote fonts. Motion is opacity/transform only. */

:root {
  --bg: #0c0f13;
  --bg-grade: #10141a;
  --surface-1: #14181f;
  --surface-2: #1a1f28;
  --surface-3: #222833;
  --hairline: rgba(255, 255, 255, 0.075);
  --hairline-strong: rgba(255, 255, 255, 0.14);

  --text-1: #eef2f7;
  --text-2: #b4bec9;
  --text-3: #9aa6b4;

  --pass: #56c99c;
  --pass-dim: rgba(86, 201, 156, 0.14);
  --fail: #ef7a6d;
  --fail-dim: rgba(239, 122, 109, 0.13);
  --warn: #e0a94a;
  --warn-dim: rgba(224, 169, 74, 0.13);
  --info: #7fb0e3;
  --info-dim: rgba(127, 176, 227, 0.12);

  --t-11: 0.6875rem;
  --t-12: 0.75rem;
  --t-13: 0.8125rem;
  --t-15: 0.9375rem;
  --t-18: 1.125rem;
  --t-20: 1.25rem;
  --t-24: 1.5rem;
  --t-34: 2.125rem;
  --t-40: 2.5rem;
  --t-48: 3rem;
  --t-56: 3.5rem;
  --t-64: 4rem;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --gutter: clamp(16px, 4vw, 32px);
  --measure: 40rem;
  --page: 72rem;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 999px;

  --e-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --e-2: 0 2px 6px rgba(0, 0, 0, 0.35), 0 12px 28px rgba(0, 0, 0, 0.28);
  --e-3: 0 4px 12px rgba(0, 0, 0, 0.4), 0 24px 56px rgba(0, 0, 0, 0.34);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 150ms;
  --dur: 200ms;
  --dur-slow: 240ms;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  --focus: 0 0 0 3px rgba(127, 176, 227, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { overflow-x: clip; }

body {
  min-height: 100vh;
  min-width: 0;
  background:
    radial-gradient(920px 420px at 12% -10%, #171d26 0%, transparent 64%),
    linear-gradient(180deg, var(--bg-grade) 0%, var(--bg) 48%);
  background-attachment: scroll;
  color: var(--text-1);
  font-family: var(--sans);
  font-size: var(--t-15);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }

h1, h2, h3, h4 { margin: 0; font-weight: 560; letter-spacing: -0.018em; color: var(--text-1); }
h1 { font-size: var(--t-40); line-height: 1.12; }
h2 { font-size: var(--t-34); line-height: 1.18; }
h3 { font-size: var(--t-18); line-height: 1.3; }

p { margin: 0; }

a { color: var(--info); }

code, pre, .num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

code, pre {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute; left: var(--s-4); top: -56px; z-index: 30;
  padding: var(--s-2) var(--s-3); border-radius: var(--r-sm);
  background: var(--surface-3); color: var(--text-1); text-decoration: none;
  font-size: var(--t-13);
}
.skip-link:focus, .skip-link:focus-visible { top: var(--s-4); }

.mark {
  width: 32px; height: 32px; border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--e-1), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative; flex: none;
}
.mark::after {
  content: ""; position: absolute; inset: 10px;
  border-radius: 3px;
  border: 1.5px solid var(--pass);
  border-right-color: transparent; border-bottom-color: transparent;
  transform: rotate(45deg);
}

.brand {
  display: inline-flex; align-items: center; gap: var(--s-3);
  text-decoration: none; color: inherit;
  min-width: 0;
}
.brand span:last-child {
  font-size: var(--t-18); font-weight: 580; letter-spacing: -0.012em;
}

.chip {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline-strong);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: var(--t-11);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
}
.chip--pass { color: var(--pass); background: var(--pass-dim); border-color: rgba(86, 201, 156, 0.35); }
.chip--warn { color: var(--warn); background: var(--warn-dim); border-color: rgba(224, 169, 74, 0.35); }
.chip--fail { color: var(--fail); background: var(--fail-dim); border-color: rgba(239, 122, 109, 0.35); }
.chip--info { color: var(--info); background: var(--info-dim); border-color: rgba(127, 176, 227, 0.32); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-sm);
  border: 1px solid var(--hairline-strong);
  background: var(--surface-2);
  color: var(--text-1);
  font: inherit; font-size: var(--t-13); font-weight: 560;
  cursor: pointer; text-decoration: none;
  box-shadow: var(--e-1);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  min-height: 36px;
}
.btn:hover { background: var(--surface-3); border-color: rgba(255, 255, 255, 0.22); }
.btn:active { background: var(--surface-1); }
.btn:disabled { color: var(--text-3); cursor: not-allowed; opacity: 0.7; }

.btn--primary {
  background: var(--surface-3);
  border-color: rgba(127, 176, 227, 0.42);
  color: var(--text-1);
}
.btn--primary:hover:not(:disabled) {
  background: #2a3240;
  border-color: rgba(127, 176, 227, 0.62);
}

.btn--large {
  padding: 10px var(--s-5);
  font-size: var(--t-15);
  min-height: 44px;
}

.btn--full { width: 100%; }

.site-nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(12, 15, 19, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
}
.site-nav__inner {
  max-width: var(--page);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--gutter);
  flex-wrap: wrap;
  min-width: 0;
}
.site-nav__links {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  list-style: none; margin: 0; padding: 0;
  min-width: 0;
}
.site-nav__links a {
  color: var(--text-2); text-decoration: none;
  font-size: var(--t-13);
  padding: 4px 0;
  transition: color var(--dur-fast) var(--ease);
}
.site-nav__links a:hover { color: var(--text-1); }

.card {
  position: relative;
  min-width: 0;
  padding: var(--s-5);
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  box-shadow: var(--e-2);
}

.code-block {
  background: var(--surface-3);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  padding: var(--s-4);
  margin: 0 0 var(--s-4);
  position: relative;
  min-width: 0;
}
.code-block__header {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.code-block__label {
  font-size: var(--t-11); text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-3); font-weight: 560;
}
.code-block__copy {
  display: inline-flex; align-items: center;
  padding: var(--s-1) var(--s-2);
  border-radius: var(--r-sm);
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  color: var(--text-3);
  font: inherit; font-size: var(--t-11);
  cursor: pointer;
  min-height: 28px;
}
.code-block__copy:hover { color: var(--text-1); border-color: var(--hairline-strong); }
.code-block pre {
  margin: 0; padding: 0;
  font-size: var(--t-13);
  color: var(--text-1);
  white-space: pre-wrap;
}

.field {
  display: flex; flex-direction: column; gap: var(--s-1);
  margin-bottom: var(--s-4);
  min-width: 0;
}
.field__label {
  font-size: var(--t-12); font-weight: 560; color: var(--text-2);
}
.field__input, .field__textarea {
  width: 100%;
  padding: 10px var(--s-3);
  border-radius: var(--r-md);
  border: 1px solid var(--hairline-strong);
  background: var(--surface-1);
  color: var(--text-1);
  font: inherit; font-size: var(--t-15);
}
.field__textarea {
  min-height: 220px;
  font-family: var(--mono);
  font-size: var(--t-12);
  line-height: 1.5;
  resize: vertical;
}
.field__input::placeholder, .field__textarea::placeholder { color: var(--text-3); }
.field__input:focus, .field__textarea:focus {
  outline: none;
  border-color: var(--info);
  box-shadow: var(--focus);
}
.field__input[aria-invalid="true"], .field__textarea[aria-invalid="true"] {
  border-color: var(--fail);
  box-shadow: 0 0 0 3px rgba(239, 122, 109, 0.16);
}
.field__error {
  font-size: var(--t-12); color: var(--fail);
  display: none;
}
.field__error[aria-hidden="false"] { display: block; }

.hint, .state {
  padding: var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid rgba(127, 176, 227, 0.28);
  background: var(--info-dim);
  margin: 0 0 var(--s-4);
  font-size: var(--t-13); color: var(--text-2);
  line-height: 1.55;
}
.hint strong, .state strong { color: var(--text-1); }
.hint a, .state a { color: var(--info); text-decoration: underline; text-underline-offset: 2px; }

.state--empty {
  border-color: var(--hairline-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
}
.state--ok {
  border-color: rgba(86, 201, 156, 0.28);
  background: var(--pass-dim);
}
.state--error {
  border-color: rgba(239, 122, 109, 0.36);
  background: var(--fail-dim);
  color: var(--text-2);
}
.state[hidden] { display: none; }

.pagefoot {
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--s-5) var(--gutter);
  border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: var(--s-3);
  color: var(--text-3); font-size: var(--t-12);
}
.pagefoot a {
  color: var(--text-3); text-decoration: none;
}
.pagefoot a:hover { color: var(--text-1); }
.pagefoot__links {
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4);
  list-style: none; margin: 0; padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
