/*
 * Base layer + the handful of components the starter site needs. Every value
 * here comes from tokens.css — if you find yourself typing a hex or a pixel
 * count in this file, add a token instead.
 */
@import url("./tokens.css");

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

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-3);
  font-weight: 600;
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-xl); margin-top: var(--space-12); }
h3 { font-size: var(--text-lg); margin-top: var(--space-8); }

p { margin: 0 0 var(--space-4); max-width: var(--measure); }

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

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

code, pre { font-family: var(--font-mono); font-size: var(--text-sm); }
pre {
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
}

hr { border: 0; border-top: 1px solid var(--border); margin: var(--space-12) 0; }

/* --- Layout -------------------------------------------------------------- */
.container {
  max-width: 46rem;
  margin: 0 auto;
  padding: var(--space-12) var(--space-4) var(--space-16);
}

.stack > * + * { margin-top: var(--space-4); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* --- Components ---------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--foreground-muted);
}

.muted { color: var(--foreground-muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.button {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-foreground);
  font: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: opacity var(--transition);
}
.button:hover { opacity: 0.88; text-decoration: none; }
.button--ghost {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border-strong);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  font-size: var(--text-xs);
  color: var(--foreground-muted);
}
.tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-neutral);
}
.tag--ok::before { background: var(--status-ok); }
.tag--warn::before { background: var(--status-warn); }
.tag--error::before { background: var(--status-error); }
