/* Cedar -- ux-skill generated tokens. Accessible by construction (WCAG AA). */
/* Do not edit by hand: re-generate with `ux system-pack`. */
:root {
  --color-canvas: #fbf8f3;
  --color-surface: #f3f1ec;
  --color-elevated: #eae7e2;
  --color-border: #dbd8d4;
  --color-ink: #242424;
  --color-body: #5c5b5a;
  --color-muted: #72716f;
  --color-primary: #1f6f4b;
  --color-primary-active: #164f35;
  --color-on-primary: #ffffff;
  --color-success: #17834d;
  --color-warning: #916d1a;
  --color-danger: #bf3722;
  --color-info: #226bbf;
  --font-display: "Inter", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --space-xxs: 6px;
  --space-xs: 12px;
  --space-sm: 18px;
  --space-md: 24px;
  --space-lg: 36px;
  --space-xl: 54px;
  --space-xxl: 84px;
  --radius-sm: 4px;
  --radius-md: 9px;
  --radius-lg: 13px;
  --radius-pill: 999px;
  --motion-base: 180ms;
  --motion-ease: cubic-bezier(0.2,0,0,1);
}

/* ============================================================
   Component library. Driven entirely by design tokens.
   No literal colors or font families. Translucent shades and
   focus rings use color-mix so they work regardless of the
   token color format (hex, hsl, or oklch).
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-canvas);
  color: var(--color-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  color: var(--color-ink);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(40px, 6vw, 64px);
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
}

h3 {
  font-size: 22px;
  letter-spacing: -0.01em;
}

h4 {
  font-size: 17px;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 var(--space-md);
  max-width: 65ch;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--motion-base) var(--motion-ease);
}

a:hover {
  color: var(--color-primary-active);
}

a:focus-visible,
button:focus-visible {
  outline: none;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 38%, transparent);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.muted {
  color: var(--color-muted);
}

/* Layout */
.container {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.stack > * + * {
  margin-top: var(--space-md);
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

.divider {
  height: 1px;
  border: 0;
  margin-block: var(--space-lg);
  background: var(--color-border);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 11px 18px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--motion-base) var(--motion-ease),
    border-color var(--motion-base) var(--motion-ease),
    box-shadow var(--motion-base) var(--motion-ease),
    transform var(--motion-base) var(--motion-ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 38%, transparent);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.btn-primary:hover {
  background: var(--color-primary-active);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-ink);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  border-color: color-mix(in srgb, var(--color-ink) 28%, transparent);
  background: var(--color-elevated);
}

.btn-ghost {
  background: transparent;
  color: var(--color-body);
}

.btn-ghost:hover {
  background: color-mix(in srgb, var(--color-ink) 6%, transparent);
  color: var(--color-ink);
}

.btn-danger {
  background: var(--color-danger);
  color: var(--color-on-primary);
}

.btn-danger:hover {
  background: color-mix(in srgb, var(--color-danger) 88%, var(--color-ink));
}

.btn-danger:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-danger) 38%, transparent);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 15px 26px;
  font-size: 17px;
}

/* Card */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.card-elevated {
  background: var(--color-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--color-ink) 6%, transparent),
    0 18px 40px color-mix(in srgb, var(--color-ink) 8%, transparent);
}

.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.card-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-ink);
  margin: 0 0 var(--space-xs);
}

.card-body {
  color: var(--color-body);
  margin: 0;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

/* Form */
.field {
  display: block;
  margin-bottom: var(--space-md);
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: var(--space-xs);
}

.input,
.select,
.textarea {
  display: block;
  width: 100%;
  padding: 11px 13px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
  color: var(--color-ink);
  background: var(--color-canvas);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition:
    border-color var(--motion-base) var(--motion-ease),
    box-shadow var(--motion-base) var(--motion-ease);
}

.textarea {
  min-height: 112px;
  resize: vertical;
}

.select {
  appearance: none;
  cursor: pointer;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--color-muted);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 26%, transparent);
}

.field-help {
  display: block;
  font-size: 13px;
  color: var(--color-muted);
  margin-top: var(--space-xs);
  min-height: 1.2em;
}

.field-error .input,
.field-error .select,
.field-error .textarea {
  border-color: var(--color-danger);
}

.field-error .input:focus,
.field-error .select:focus,
.field-error .textarea:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-danger) 26%, transparent);
}

.field-error .field-help {
  color: var(--color-danger);
}

/* Badges and chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xxs);
  padding: 3px 11px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  background: transparent;
}

.badge-success {
  color: var(--color-success);
}

.badge-warning {
  color: var(--color-warning);
}

.badge-danger {
  color: var(--color-danger);
}

.badge-info {
  color: var(--color-info);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xxs);
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-body);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: currentColor;
  flex: none;
}

/* Stat tile */
.stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  margin: var(--space-xs) 0 0;
  font-variant-numeric: tabular-nums;
}

.stat-delta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xxs);
  margin-top: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-muted);
}

.stat-up {
  color: var(--color-success);
}

.stat-down {
  color: var(--color-danger);
}

/* Toggle (checkbox driven, no script) */
.switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--color-body);
  user-select: none;
}

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

.switch-track {
  position: relative;
  width: 42px;
  height: 24px;
  flex: none;
  background: var(--color-border);
  border-radius: var(--radius-pill);
  transition: background var(--motion-base) var(--motion-ease);
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--color-elevated);
  border-radius: var(--radius-pill);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--color-ink) 20%, transparent);
  transition: transform var(--motion-base) var(--motion-ease);
}

.switch input:checked + .switch-track {
  background: var(--color-primary);
}

.switch input:checked + .switch-track::after {
  transform: translateX(18px);
}

.switch input:focus-visible + .switch-track {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 38%, transparent);
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-muted);
  white-space: nowrap;
  transition: color var(--motion-base) var(--motion-ease);
}

.nav-link:hover {
  color: var(--color-ink);
}

.nav-link:focus-visible {
  outline: none;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 38%, transparent);
}

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  color: var(--color-muted);
  padding: var(--space-sm) var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.table td {
  padding: var(--space-sm) var(--space-sm);
  color: var(--color-body);
  border-bottom: 1px solid var(--color-border);
  font-variant-numeric: tabular-nums;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr {
  transition: background var(--motion-base) var(--motion-ease);
}

.table tbody tr:hover {
  background: color-mix(in srgb, var(--color-ink) 4%, transparent);
}

.table td:first-child {
  color: var(--color-ink);
  font-weight: 500;
  font-variant-numeric: normal;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

