/* 02-reset.css — Element resets + reboot.
   Owns element-level normalization (since Bootstrap Reboot is gone).
   Token-driven; no Bootstrap dependency. */

/* ─── Box model ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ─── Root ─── */
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ivory-100);
  background-color: var(--noir-950);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: left;
}

/* ─── Focus visibility ─── */
:focus-visible {
  outline: 2px solid var(--amber-400);
  outline-offset: 2px;
}

/* ─── Headings — typography.css owns family/color; reset margins here ─── */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* ─── Lists ─── */
ul, ol {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-left: 2rem;
}

ul ul, ol ul, ul ol, ol ol { margin-bottom: 0; }

dl { margin-top: 0; margin-bottom: 1rem; }
dt { font-weight: 700; }
dd { margin-bottom: 0.5rem; margin-left: 0; }

/* ─── Inline text ─── */
b, strong { font-weight: bolder; }
small { font-size: 0.875em; }

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
  text-decoration-skip-ink: none;
}

mark { background: rgba(212, 168, 83, 0.18); color: inherit; padding: 0 0.15em; }
kbd {
  padding: 0.1875rem 0.375rem;
  font-size: 0.875em;
  background-color: var(--noir-700);
  color: var(--ivory-100);
  border-radius: 4px;
}

code, pre, samp {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
}

pre {
  display: block;
  margin-top: 0;
  margin-bottom: 1rem;
  overflow: auto;
}

/* ─── Links ─── */
/* Color comes from 04-typography.css. Behaviour reset here. */
a {
  text-decoration: none;
}

a:not([class]) {
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-offset: 0.2em;
}

/* ─── Horizontal rule ─── */
hr {
  margin: 1rem 0;
  color: inherit;
  border: 0;
  border-top: 1px solid var(--border-default);
  opacity: 1;
}

/* ─── Images and media ─── */
img, svg {
  vertical-align: middle;
}

img {
  max-width: 100%;
  height: auto;
}

/* ─── Tables ─── */
table {
  border-collapse: collapse;
  caption-side: bottom;
}

caption {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  color: var(--ivory-400);
  text-align: left;
}

th { text-align: inherit; }

/* ─── Forms ─── */
label { display: inline-block; }

button,
input,
optgroup,
select,
textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

button,
[role="button"] {
  cursor: pointer;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}

button:disabled,
[type="button"]:disabled,
[type="reset"]:disabled,
[type="submit"]:disabled {
  cursor: not-allowed;
}

textarea {
  resize: vertical;
  overflow: auto;
}

fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

legend {
  display: block;
  width: 100%;
  padding: 0;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  line-height: inherit;
}

[hidden] { display: none !important; }

/* ─── Selection ─── */
::selection {
  background: rgba(212, 168, 83, 0.35);
  color: var(--ivory-100);
}
