* { box-sizing: border-box; }

html { min-width: 320px; background: var(--color-bg-primary); }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
}

button,
input,
select,
textarea { font: inherit; }

button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .4; }

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
  padding: 10px 14px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

input::placeholder,
textarea::placeholder { color: color-mix(in srgb, var(--color-text-muted) 56%, transparent); }

input:hover,
select:hover,
textarea:hover { border-color: color-mix(in srgb, var(--color-accent-lilac) 50%, var(--color-border)); }

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-color: color-mix(in srgb, var(--color-focus) 62%, var(--color-border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-focus) 15%, transparent), 0 0 20px color-mix(in srgb, var(--color-focus) 15%, transparent);
}

textarea { min-height: 88px; resize: vertical; }
option { background: var(--color-bg-elevated); color: var(--color-text-primary); }

a { color: var(--color-text-primary); }
code,
.mono { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; word-break: break-word; }

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -.055em;
}

h2 {
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}

h3 { font-size: 1rem; }

table { width: 100%; border-collapse: collapse; }
th,
td { padding: 12px 10px; border-bottom: 1px solid color-mix(in srgb, var(--color-border) 55%, transparent); text-align: left; vertical-align: top; }
th { color: var(--color-text-muted); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

hr { height: 1px; margin: var(--space-5) 0; border: 0; background: var(--color-border); }

.skip-link {
  position: absolute;
  z-index: 100;
  top: -56px;
  left: 12px;
  border-radius: var(--radius-pill);
  padding: 9px 14px;
  background: var(--color-text-primary);
  color: var(--color-bg-primary);
  text-decoration: none;
}

.skip-link:focus { top: 12px; }
