/* Base reset, typography and small utilities. */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Never let a mobile browser inflate our type on its own: on a tablet asking
     for the desktop layout, autosizing blows up rail labels past their column
     and clips them mid-word. Font sizes are ours alone. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-hover); }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: inherit;
  margin: 0;
}

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

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

input, textarea, select { font-family: var(--font-body); color: var(--ink); }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* Text utilities */
/* EVERY figure in the app is set in the serif — the same face as the homepage
   greeting and the lesson titles — with tabular figures so columns of numbers
   line up. See "Typography" in CLAUDE.md; the class name is historical (it used
   to be the mono stack), the rule is the app-wide one for numbers. */
.mono { font-family: var(--font-serif); font-variant-numeric: tabular-nums; }
.serif { font-family: var(--font-serif); }
.muted { color: var(--muted); }

.eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal);
}

.eyebrow--dim { color: var(--muted-2); }
.eyebrow--bright { color: var(--teal-bright); }

.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

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