@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --ink: #1a1d1a;
  --paper: #f4f1ea;
  --card: #fff;
  --accent: #c8451f;
  --accentDk: #9e3517;
  --steel: #3d4a52;
  --line: #d9d4c8;
  --muted: #6b6357;
  --good: #2f7d4f;
  --goodDk: #245f3c;
  --warn: #b8860b;
  --err: #b3341a;
  --hazard: #b8860b;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

.qa-h { font-family: 'Archivo', sans-serif; letter-spacing: -.02em; }

button { font-family: inherit; border: none; cursor: pointer; transition: all .15s ease; }
button:active { transform: scale(.97); }
button:disabled { opacity: .5; cursor: default; transform: none; }

select, input, textarea {
  font-family: inherit;
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 15px;
  background: var(--paper);
}
textarea { min-height: 70px; resize: vertical; }

.lbl {
  font-size: 12px; font-weight: 600; color: var(--muted);
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
}

.pill {
  display: inline-block; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
}
.pill.steel { background: var(--steel); }
.pill.good { background: var(--good); }

.wrap { max-width: 560px; margin: 0 auto; padding: 16px; }

.card {
  background: var(--card); border-radius: 12px; padding: 16px;
  border: 1px solid var(--line); margin-bottom: 14px;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.pop { animation: pop .25s ease both; }

/* App header */
.topbar {
  background: var(--ink); color: var(--paper);
  padding: 14px 18px; position: sticky; top: 0; z-index: 10;
}
.topbar .qa-h { font-size: 20px; font-weight: 800; line-height: 1; }
.topbar .sub { font-size: 11px; color: #9b958a; margin-top: 3px; }

/* ── Colour-coded buttons ─────────────────────────────── */
.btn-primary {
  width: 100%; padding: 18px; border-radius: 12px; background: var(--accent);
  color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 4px 14px rgba(200, 69, 31, .3);
}
.btn-good {
  width: 100%; padding: 16px; border-radius: 12px; background: var(--good);
  color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 14px rgba(47, 125, 79, .28);
}
.btn-steel {
  width: 100%; padding: 15px; border-radius: 12px; background: var(--steel);
  color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-ghost { background: none; color: var(--muted); padding: 12px; font-weight: 600; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }

/* ── Wizard step indicator ────────────────────────────── */
.steps { display: flex; gap: 6px; margin-bottom: 16px; }
.steps .seg { flex: 1; height: 6px; border-radius: 6px; background: var(--line); }
.steps .seg.on { background: var(--accent); }
.steps .seg.done { background: var(--good); }
.step-h {
  font-family: 'Archivo', sans-serif; font-size: 22px; font-weight: 800;
  margin-bottom: 4px;
}
.step-sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

/* ── Induction content sections ───────────────────────── */
.sec { margin-bottom: 18px; }
.sec h3 {
  font-family: 'Archivo', sans-serif; font-size: 16px; font-weight: 700;
  color: var(--accentDk); margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.sec ul { margin: 0 0 0 18px; }
.sec li { font-size: 14px; line-height: 1.55; margin-bottom: 5px; }
.sec p { font-size: 14px; line-height: 1.55; margin-bottom: 8px; }

/* ── Risk acknowledgement cards ───────────────────────── */
.risk {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--card); margin-bottom: 10px; cursor: pointer;
  transition: all .12s ease;
}
.risk:hover { border-color: var(--hazard); }
.risk.checked { border-color: var(--good); background: #f1f8f3; }
.risk input { width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px; accent-color: var(--good); }
.risk .rk-body { flex: 1; }
.risk .rk-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.risk .rk-desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 3px; }
.risk .haz {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: #fff; background: var(--hazard); padding: 1px 6px; border-radius: 4px;
}
.risk .haz.permit { background: var(--err); }

/* Declaration */
.declare {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 15px; border-radius: 10px; border: 2px solid var(--accent);
  background: #fff6ec; cursor: pointer;
}
.declare input { width: 24px; height: 24px; flex-shrink: 0; accent-color: var(--accent); }
.declare .dc-text { font-size: 13.5px; line-height: 1.5; }

/* Parameter summary banner */
.params { background: var(--ink); color: var(--paper); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.params .pr { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 13px; }
.params .pr .k { color: #9b958a; }
.params .pr .v { font-weight: 600; text-align: right; }

.cert-no { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; }

.muted-note { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.5; margin-top: 10px; }
.empty { text-align: center; padding: 30px 20px; color: var(--muted); font-size: 14px; border: 1.5px dashed var(--line); border-radius: 12px; }
.errbox { background: #fbe9e6; color: var(--err); border: 1px solid #e7b7af; border-radius: 8px; padding: 10px 12px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.okbox { background: #eaf5ee; color: var(--goodDk); border: 1px solid #b7ddc3; border-radius: 8px; padding: 10px 12px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }

/* Big success tick */
.success-tick {
  width: 84px; height: 84px; border-radius: 50%; background: var(--good); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 46px;
  margin: 0 auto 16px; box-shadow: 0 6px 20px rgba(47,125,79,.35);
}

/* Toast */
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; opacity: 0; transition: opacity .2s; z-index: 50; }
.toast.show { opacity: 1; }
