/* ============================================================
   BASE — reset, element defaults, and global utility classes
   ============================================================ */

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== Element defaults ===== */
body {
  font-family: 'Hanken Grotesk', sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

h1, h2, h3, h4, .serif {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
  line-height: 1.04;
  font-weight: 600;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== Table defaults ===== */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--surface-2);
}

/* ===== Range input ===== */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--green) var(--p, 40%), var(--line) var(--p, 40%));
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--green);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(14,159,110,.4);
}

/* ===== Utility classes ===== */
.mono { font-variant-numeric: tabular-nums; }

/* App visibility toggling */
.app        { display: none; }
.app.active { display: block; }

/* View panel toggling */
.view        { display: none; }
.view.active { display: block; }

/* Label — uppercase eyebrow text */
.lbl {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--faint);
}
.lbl--gold { color: var(--gold-2); }

/* Table cell typography helpers */
.tn { font-weight: 700; }
.ts { font-size: 12px; color: var(--muted); }

/* Stat delta trend colors */
.up   { color: var(--green-d); }
.down { color: var(--rose); }

/* Signed amount colors (transaction tables) */
.amount--positive { color: var(--green-d); font-weight: 700; }
.amount--negative { color: var(--rose);    font-weight: 700; }
.amount--escrow   { font-weight: 700; }
