/*
 * TireFire Industries — shared brand stylesheet
 * projects/tfi-livery
 */

/* ── Design tokens ─────────────────────────────────────────────── */

:root {
  --tfi-black: #171426;
  --tfi-red: #bb2d2e;
  --tfi-orange: #ca4f1f;
  --tfi-yellow: #eeb922;
  --tfi-white: #f4f8ee;
  --tfi-blue: #288bc2;
  --tfi-green: #a5c426;
  --tfi-light-grey: #cacbca;
  --tfi-dark-grey: #9a9a9a;
  --tfi-cream: #f5f9ef;
  --mono: 'Menlo', 'Consolas', 'DejaVu Sans Mono', monospace;
}

/* ── Reset & base ──────────────────────────────────────────────── */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--mono);
  background: var(--tfi-cream);
  color: var(--tfi-black);
  line-height: 1.6;
  padding: 2rem;
  max-width: 960px;
  margin: 0 auto;
}

/* ── Typography ────────────────────────────────────────────────── */

h1 {
  color: var(--tfi-black);
  margin-bottom: 0.25rem;
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration-color: var(--tfi-orange);
  text-underline-offset: 0.15em;
}

h1 small {
  color: var(--tfi-dark-grey);
  font-size: 0.7em;
  font-weight: normal;
  text-decoration: none;
  display: inline-block;
}

h2 {
  color: var(--tfi-black);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: underline;
  text-decoration-color: var(--tfi-yellow);
  text-underline-offset: 0.15em;
}

p { color: var(--tfi-black); }

a { color: var(--tfi-blue); text-decoration: none; }
a:hover { color: var(--tfi-orange); text-decoration: underline; }

ul { list-style: none; padding-left: 1rem; }
ul li::before { content: "- "; color: var(--tfi-orange); font-weight: bold; }

code {
  background: var(--tfi-white);
  border: 1px solid var(--tfi-light-grey);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

pre {
  background: var(--tfi-white);
  border: 2px solid var(--tfi-light-grey);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  margin: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--tfi-black);
}

/* ── Tables ────────────────────────────────────────────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

th {
  text-align: left;
  color: var(--tfi-orange);
  border-bottom: 2px solid var(--tfi-orange);
  padding: 0.4rem 0.6rem;
  font-weight: bold;
  background: var(--tfi-white);
}

td {
  padding: 0.3rem 0.6rem;
  border-bottom: 1px solid var(--tfi-light-grey);
  color: var(--tfi-black);
}

tr:hover td { background: var(--tfi-cream); }

th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.empty { text-align: center; color: var(--tfi-dark-grey); font-style: italic; }

/* ── Forms & controls ──────────────────────────────────────────── */

select, input[type="number"], input[type="text"] {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--tfi-cream);
  color: var(--tfi-black);
  border: 2px solid var(--tfi-light-grey);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
}

select:focus, input:focus {
  outline: none;
  border-color: var(--tfi-orange);
}

button {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--tfi-orange);
  color: var(--tfi-white);
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1.5rem;
  cursor: pointer;
  font-weight: bold;
}

button:hover { background: var(--tfi-red); }
button:disabled { opacity: 0.4; cursor: not-allowed; }

label { font-weight: bold; }

/* ── Double-border brand box ───────────────────────────────────── */

.tfi-box {
  position: relative;
  background: var(--tfi-white);
  border: 8px solid var(--tfi-orange);
  border-radius: 1em;
  padding: 1.5rem;
  margin: 1.5rem 0.75em;
}

.tfi-box::before {
  content: '';
  position: absolute;
  inset: -18px;
  border: 8px solid var(--tfi-yellow);
  border-radius: 1.5em;
  z-index: -1;
  pointer-events: none;
}

/* ── Error ─────────────────────────────────────────────────────── */

.error {
  color: var(--tfi-red);
  background: rgba(187, 45, 46, 0.08);
  border: 2px solid var(--tfi-red);
  border-radius: 4px;
  padding: 0.75rem;
  margin-top: 1rem;
}

/* ── Footer ────────────────────────────────────────────────────── */

hr {
  border: none;
  border-top: 2px solid var(--tfi-yellow);
  margin: 2rem 0;
}

footer {
  color: var(--tfi-dark-grey);
  font-size: 0.75rem;
}
