/* HashForge AI — design tokens. Import and use these names; don't invent near-matches. */
:root {
  /* Color */
  --hf-iron: #101114;       /* page background */
  --hf-steel: #1B1F26;      /* cards, nav, elevated surfaces */
  --hf-plate: #262B33;      /* inputs, insets, hover fills */
  --hf-rivet: #74787C;      /* borders, rules, disabled chrome (≥3:1 on Steel/Plate) */
  --hf-ingot: #F3EFE8;      /* primary text, focus ring */
  --hf-slag: #C9C2B6;       /* secondary text, captions (10.7:1 on Iron) */
  --hf-ember: #E09440;      /* primary accent, CTAs, logo face (7.6:1 on Iron) */
  --hf-amber: #E8B15A;      /* sparks, warning, charts */
  --hf-on-ember: #141210;   /* text on Ember or Amber fills (7.6:1 on Ember) */
  --hf-sage: #A6D08C;       /* success — always with an icon + the word Ready (or similar) */
  --hf-scale: #EE8A80;      /* error — always with an icon + the word Failed (or similar) */

  /* Typography */
  --hf-font-display: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --hf-font-body: "Atkinson Hyperlegible", "IBM Plex Sans", "Segoe UI", sans-serif;
  --hf-font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --hf-root: 18px;          /* set on html */
  --hf-h1: 2.5rem;          /* 45px */
  --hf-h2: 1.75rem;         /* 32px */
  --hf-h3: 1.35rem;         /* 24px */
  --hf-body: 1rem;          /* 18px */
  --hf-small: 0.8889rem;    /* 16px — the floor, never smaller */
  --hf-leading: 1.65;
  --hf-measure: 38rem;      /* ~60–70 characters at 18px */

  /* Shape & control */
  --hf-radius: 8px;
  --hf-radius-card: 12px;
  --hf-border: 2px;
  --hf-control-h: 3rem;     /* 54px preferred; 48px minimum */
  --hf-focus-width: 3px;
  --hf-focus-offset: 3px;
  --hf-space: 8px;

  /* Motion */
  --hf-ease: cubic-bezier(0.2, 0, 0, 1);
  --hf-dur: 200ms;
}

html { font-size: var(--hf-root); }
body {
  background: var(--hf-iron);
  color: var(--hf-ingot);
  font-family: var(--hf-font-body);
  font-size: var(--hf-body);
  line-height: var(--hf-leading);
  font-weight: 400;
}
h1, h2, h3, h4 {
  font-family: var(--hf-font-display);
  font-weight: 600;
  color: var(--hf-ingot);
  line-height: 1.2;
  text-wrap: balance;
}
h1 { font-size: var(--hf-h1); font-weight: 700; }
h2 { font-size: var(--hf-h2); }
h3 { font-size: var(--hf-h3); }

a {
  color: var(--hf-ingot);
  text-decoration: underline;
  text-decoration-color: var(--hf-ember);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-color: var(--hf-amber); text-decoration-thickness: 3px; }

:focus { outline: none; }
:focus-visible {
  outline: var(--hf-focus-width) solid var(--hf-ingot);
  outline-offset: var(--hf-focus-offset);
}

.btn {
  font-family: var(--hf-font-display);
  font-weight: 600;
  font-size: var(--hf-body);
  min-height: var(--hf-control-h);
  padding: 0.75rem 1.25rem;
  border-radius: var(--hf-radius);
  border: var(--hf-border) solid transparent;
  cursor: pointer;
  transition: background-color var(--hf-dur) var(--hf-ease), border-color var(--hf-dur) var(--hf-ease);
}
.btn-primary { background: var(--hf-ember); color: var(--hf-on-ember); }
.btn-primary:hover { background: var(--hf-amber); color: var(--hf-on-ember); }
.btn-secondary { background: var(--hf-steel); color: var(--hf-ingot); border-color: var(--hf-rivet); }
.btn-secondary:hover { background: var(--hf-plate); }
.btn[disabled], .btn-disabled {
  background: var(--hf-plate);
  color: var(--hf-slag);
  border-color: var(--hf-rivet);
  cursor: not-allowed;
}

.card {
  background: var(--hf-steel);
  border: var(--hf-border) solid var(--hf-rivet);
  border-radius: var(--hf-radius-card);
}
.input {
  background: var(--hf-plate);
  color: var(--hf-ingot);
  border: var(--hf-border) solid var(--hf-rivet);
  border-radius: var(--hf-radius);
  min-height: 48px;
  font-size: var(--hf-body);
  font-family: var(--hf-font-body);
  padding: 0.6rem 0.9rem;
}
.input::placeholder { color: var(--hf-slag); }

/* Status is a chip: color bar + icon + word. Never color alone. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0 0.8rem 0 0.45rem;
  background: var(--hf-plate);
  color: var(--hf-ingot);
  border: var(--hf-border) solid var(--hf-rivet);
  border-radius: var(--hf-radius);
  font-weight: 700;
  font-size: var(--hf-body);
}
.chip::before {
  content: "";
  width: 6px;
  height: 1.15em;
  border-radius: 2px;
  background: currentColor;
}
.chip-ready { color: var(--hf-ingot); }
.chip-ready::before { background: var(--hf-sage); }
.chip-review::before { background: var(--hf-amber); }
.chip-failed::before { background: var(--hf-scale); }
