* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: var(--text-base) / 1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* The chrome. Space rather than boxes: one hairline under it and nothing else. */
header {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.brand {
  font-weight: 620;
  letter-spacing: -0.01em;
  color: var(--ink-strong);
  text-decoration: none;
}
nav { display: flex; gap: var(--space-4); align-items: center; }
nav a {
  color: var(--ink-muted);
  text-decoration: none;
  padding: var(--space-1) 0;
  border-bottom: 2px solid transparent;
}
nav a:hover { color: var(--ink); }
nav a.current { color: var(--ink-strong); border-bottom-color: var(--accent); }
/* The debug view, kept visually apart from the five screens. */
nav a.secondary { margin-left: var(--space-3); padding-left: var(--space-4); border-left: 1px solid var(--line); font-size: var(--text-sm); }
.workspace {
  margin-left: auto;
  color: var(--ink-faint);
  font: var(--text-sm) var(--font-mono);
}

main { padding: var(--space-5); max-width: var(--measure); }

h1 { font-size: var(--text-lg); font-weight: 620; letter-spacing: -0.015em; color: var(--ink-strong); margin: 0 0 var(--space-1); }
h2 { font-size: var(--text-base); font-weight: 600; color: var(--ink-strong); margin: 0 0 var(--space-2); }
.hint, .subhead, .empty, .muted { color: var(--ink-muted); margin: 0 0 var(--space-4); }
.subhead, .hint { max-width: 68ch; }
a { color: var(--accent-ink); }
code, kbd, .mono { font-family: var(--font-mono); font-size: var(--text-sm); }
kbd { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 var(--space-1); }

/* Tables are shared by four screens; the component rules live in components.css.
   This is only the reset. */
table { width: 100%; border-collapse: collapse; }

input, select, textarea, button { font: inherit; }
input[type="text"], input[type="search"], input[type="number"], select {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  padding: var(--space-1) var(--space-2);
}
input:focus-visible, select:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Who is signed in, and the way out. Quiet on purpose — it is a fact about the session,
   not one of the four meanings the token layer spends colour on. */
.signed-in {
  display: flex;
  gap: var(--space-2);
  align-items: baseline;
  color: var(--ink-faint);
  font-size: var(--text-sm);
}

.signed-in button {
  border: 0;
  background: none;
  color: var(--ink-muted);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
