/* TellStaff — SOP document + share page styles. App shell uses Tailwind. Calm palette: slate + emerald, orange only for primary CTA. */
:root {
  --ink: #0f172a; --muted: #475569; --faint: #94a3b8; --line: #e2e8f0; --bg: #fafafa; --surface: #fff;
  --ok: #059669; --ok-soft: #ecfdf5; --danger: #e11d48; --danger-soft: #fff1f2; --accent: #0f172a;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; -webkit-text-size-adjust: 100%; }
.font-headline { font-family: 'Montserrat', 'Inter', sans-serif; }
.hidden { display: none !important; }

/* ---------- SOP document ---------- */
.sop-doc { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px 18px; }
@media (min-width: 640px) { .sop-doc { padding: 32px 30px; } }
.sop-doc .doc-head { border-bottom: 2px solid #4f46e5; padding-bottom: 14px; margin-bottom: 16px; }
.sop-doc .doc-brand { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 800; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sop-doc h1 { font-family: 'Inter', sans-serif; font-size: 1.45rem; font-weight: 900; line-height: 1.2; margin: 8px 0 8px; letter-spacing: -.01em; }
@media (min-width: 640px) { .sop-doc h1 { font-size: 1.8rem; } }
.sop-doc .facts { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8rem; color: var(--muted); }
.sop-doc .facts b { color: var(--ink); font-weight: 700; }
.sop-doc section { margin-top: 22px; }
.sop-doc h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 800; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.sop-doc p { margin: 0; }
.chip { display: inline-block; padding: 3px 9px; border-radius: 999px; background: #f1f5f9; color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.chip.cat { background: #eef2ff; color: #4338ca; }
.materials { display: flex; flex-wrap: wrap; gap: 6px; }
.materials span { background: #f8fafc; border: 1px solid var(--line); padding: 4px 10px; border-radius: 8px; font-size: .85rem; }
.step { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.step:last-child { border-bottom: 0; }
.step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .85rem; margin-top: 1px; }
.step .action { font-weight: 700; font-size: 1rem; }
.step .detail { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.step .check { font-size: .82rem; margin-top: 6px; color: #065f46; background: var(--ok-soft); display: inline-block; padding: 3px 9px; border-radius: 8px; }
.mistake { padding: 10px 12px; border-left: 3px solid var(--danger); background: var(--danger-soft); border-radius: 0 10px 10px 0; margin-bottom: 8px; font-size: .9rem; }
.mistake b { color: #9f1239; }
.checklist { padding: 0; margin: 0; }
.checklist li { list-style: none; padding: 7px 0 7px 30px; position: relative; font-size: .95rem; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 16px; height: 16px; border: 2px solid var(--ink); border-radius: 4px; }
.safety { padding-left: 0; margin: 0; }
.safety li { list-style: none; margin: 4px 0; font-size: .92rem; }
.quiz-q { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.quiz-q:last-child { border-bottom: 0; }
.quiz-q .opts label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); margin: 6px 0; cursor: pointer; font-size: .93rem; background: #fff; }
.quiz-q .opts label.correct { background: var(--ok-soft); border-color: #6ee7b7; }
.quiz-q .opts label.wrong { background: var(--danger-soft); border-color: #fda4af; }
.quiz-q input[type=radio] { margin-top: 4px; accent-color: var(--ink); }
.editable[contenteditable=true] { outline: 1px dashed #94a3b8; outline-offset: 2px; border-radius: 4px; background: #f8fafc; min-width: 2ch; }
.doc-foot { margin-top: 26px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .72rem; color: var(--faint); display: flex; justify-content: space-between; }
.small { font-size: .875rem; } .tiny { font-size: .78rem; } .muted { color: var(--muted); } .faint { color: var(--faint); }

/* ---------- Print: A4 handout ---------- */
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; }
  .no-print { display: none !important; }
  .sop-doc { border: 0; padding: 0; border-radius: 0; }
  .step, .quiz-q, .mistake { break-inside: avoid; }
  .editable[contenteditable=true] { outline: none; background: none; }
}
