/* Reset + typographic roles + app layout grid. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 1.35rem; margin: 0; }
h2 { font-size: 1.15rem; margin: 0 0 4px; }
h3 { font-size: 0.95rem; margin: 0; }

/* Numeric data is a first-class material — monospace everywhere it appears. */
.num, .mono, code, kbd { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

a { color: var(--teal); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

/* ---- app shell grid ---- */
.app {
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  min-height: 100vh;
}
.rail { background: var(--surface); border-right: 1px solid var(--line); }
.main { padding: 32px 40px; max-width: 980px; }

/* ---- small shared atoms ---- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 0.8rem; color: var(--muted);
}
.chip .num { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--r-md);
  border: 1px solid var(--teal); background: var(--teal); color: #fff;
  font-weight: 600; transition: filter 0.15s ease;
}
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.btn.secondary { background: var(--surface); color: var(--teal); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }

.muted { color: var(--muted); }
.hidden { display: none !important; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow);
}

@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .main { padding: 20px; }
}
