/* Base resets + typography (admin-redesign-v1).
 * Aligned with docs/admin-redesign-thesis.md: sans-primary, serif RESERVED
 * for brand mark / empty states / one-off section heads. */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--size-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* min-width removed (admin-redesign-v1 vm-cx1 #7096 (4)): admin remains
     desktop-primary but must degrade gracefully at narrow widths; layout.css
     @media rules collapse sidebar at <880px so content doesn't h-scroll. */
}

/* Headings default to SANS now (admin posture). Serif is opt-in via
   .heading--serif on specific elements: brand mark, empty states, success
   confirmations. */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
}
h1 { font-size: var(--size-h1); line-height: 1.2; }
h2 { font-size: var(--size-h2); line-height: 1.25; }
h3 { font-size: var(--size-h3); line-height: 1.3; }

.heading--serif {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
}

p, ul, ol, dl { margin: 0; padding: 0; list-style: none; }

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

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: var(--space-2) var(--space-3);
  outline: none;
  transition: border-color var(--t-fast), background var(--t-fast);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--signature);
  background: var(--bg-soft);
}
input[type="password"] {
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
}
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 14px; width: 14px;
  background: var(--muted);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 3l10 10M13 3L3 13' stroke='black' stroke-width='2' fill='none'/></svg>");
  cursor: pointer;
}

a {
  color: var(--signature);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--ink); }

::selection { background: var(--signature-soft); color: var(--ink); }

/* utility */
.mono   { font-family: var(--font-mono); }
.serif  { font-family: var(--font-serif); }
.muted  { color: var(--muted); }
.soft   { color: var(--ink-soft); }
.faint  { color: var(--ink-faint); }
.good   { color: var(--good); }
.warn   { color: var(--warn); }
.danger { color: var(--danger); }

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

/* the brand glyph — single warm dot, used in sidebar brand + accents */
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signature);
  box-shadow: 0 0 0 3px var(--signature-tint);
  vertical-align: middle;
}

/* focus ring (warm tan, universal) */
:focus-visible {
  outline: 2px solid var(--signature);
  outline-offset: 2px;
  border-radius: 4px;
}
