/*
  base.css — the plain look of HTML elements, shared by every page.

  Body, links, fields and buttons. No page layout and no ids here; those
  are in app.css. Every value comes from tokens.css.
*/

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: var(--fw-normal);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: var(--sp-1);
}
a:hover { text-decoration-color: currentColor; }

/* ── Fields ──────────────────────────────────────────────────────────── */

input,
textarea {
  width: 100%;
  padding: var(--sp-3);
  border: var(--line) solid transparent;
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  transition: border-color var(--t-fast), background var(--t-fast);
}
input::placeholder,
textarea::placeholder { color: var(--muted); }

input:hover,
textarea:hover { background: var(--surface-hover); }

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* ── Buttons ─────────────────────────────────────────────────────────── */

button {
  padding: var(--sp-3) var(--sp-4);
  border: none;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  cursor: pointer;
}
button:disabled { opacity: var(--busy-opacity); cursor: default; }

/* A button that looks like a text link (Log out, New chat). */
button.link {
  padding: 0;
  background: none;
  color: var(--muted);
  font-weight: var(--fw-normal);
}
button.link:hover { color: var(--text); }

[hidden] { display: none !important; }
