/* Direction: Swiss monochrome — white paper, tight black grotesque, one electric violet */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  --canvas: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f4f6;
  --border: #e3e3e7;
  --border-strong: #c9c9cf;
  --ink: #0b0b0c;
  --muted: #6c6c74;
  --accent: #5b21f0;
  --accent-hover: #4d1ccc;
  --accent-ink: #ffffff;
  --accent-text: #4a16d4;
  --accent-strong: #3a0fb0;
  --accent-soft: #efe9ff;
  --accent-border: #b59bf8;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #e3f0e8;
  --success-strong: #137638;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #f6eae1;
  --warning-strong: #a64c08;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #f7e4e4;
  --danger-strong: #b91c1c;
  --chart-1: #5b21f0;
  --chart-2: #d303a0;
  --chart-3: #7f320a;
  --chart-4: #827702;
  --chart-5: #005c3e;
  --chart-6: #1b84a2;

  --font-display: "Inter Tight", Helvetica, Arial, sans-serif;
  --font-body: "Inter", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --display-weight: 700;
  --display-tracking: -0.045em;
  --radius-btn: 3px;
  --radius-input: 3px;
  --radius-card: 3px;
  --shadow-card: none;
  --font-sans: "Inter", Helvetica, Arial, sans-serif;
  --eyebrow-tracking: 0.08em;

  /* The QR code is printed matter: the same black on white in both modes. */
  --x-qr-ink: #000000;
  --x-qr-paper: #ffffff;
}

html[data-theme="dark"] {
  --canvas: #070312;
  --surface: #201c2a;
  --surface-2: #13101e;
  --border: #2a2633;
  --border-strong: #514f59;
  --ink: #ffffff;
  --muted: #9c9aa0;
  --accent: #5b21f0;
  --accent-hover: #7442f2;
  --accent-ink: #ffffff;
  --accent-text: #926df5;
  --accent-strong: #926df5;
  --accent-soft: #190a43;
  --accent-border: #2d1176;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #0a1f1b;
  --success-strong: #499c68;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #2d1510;
  --warning-strong: #c57a40;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #2e0914;
  --danger-strong: #cd5c5c;
  --chart-1: #6848fa;
  --chart-2: #e82eb3;
  --chart-3: #d25101;
  --chart-4: #95890d;
  --chart-5: #0d976a;
  --chart-6: #0198bd;
}

/* Kerf — the motion and the hairline mechanics of the analytics screens. */

@keyframes kerf-page-in {
  from {
    transform: translateY(14px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes kerf-slide-in {
  from {
    transform: translateX(18px);
  }
  to {
    transform: translateX(0);
  }
}

.page-in {
  animation: kerf-page-in 0.36s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.slide-in {
  animation: kerf-slide-in 0.3s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

html.reduced-motion .page-in,
html.reduced-motion .slide-in {
  animation: none;
}

.field-line {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 0.7rem 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  transition: border-color 0.15s ease;
}

.field-line::placeholder {
  color: var(--muted);
}

.field-line:focus,
.field-line:focus-visible {
  outline: none;
  border-bottom-color: var(--accent);
}

.field-line.is-mono {
  font-family: var(--font-mono);
}

.bar-track {
  height: 2px;
  background: var(--border);
  width: 100%;
}

.bar-fill {
  height: 2px;
  background: var(--accent);
}

/* The QR library sets width/height inline; the 640px bitmap is kept for the
   PNG download, while on screen the code fits its card. */
canvas[data-qr] {
  width: 100% !important;
  height: auto !important;
  display: block;
}

.row-link:hover {
  background: var(--surface-2);
}
