/* Bang Creations client sign-off form.
   System font stack only (no web fonts), orange accents and the Employee
   Portal greys. No inline styles anywhere: the CSP is style-src 'self'. */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* Employee Portal tokens (style.css :root) */
  --or: #FAA61A;
  --ord: #d4880f;
  --olt: #FEF0D3;
  --w: #fff;
  --ow: #f7f7f5;
  --g50: #f2f2f0;
  --g100: #e6e6e2;
  --g200: #d0d0ca;
  --g400: #9b9b94;
  --g600: #5e5e58;
  --g900: #1a1a18;
  --gbg: #edfaf3;
  --gtx: #1a7a45;
  --rbg: #fdecea;
  --rtx: #c0392b;
  --bbg: #eaf2ff;
  --btx: #1a5fb4;
  --rsm: 6px;
  --rmd: 10px;
  --rlg: 14px;
  --ss: 0 1px 3px rgba(0, 0, 0, .07), 0 1px 2px rgba(0, 0, 0, .04);
  --f: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--f);
  font-size: 16px;
  line-height: 1.5;
  color: var(--g900);
  background: var(--ow);
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, dl, dd, fieldset, legend { margin: 0; padding: 0; }

/* ------------------------------------------------------------------ focus */

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--g900);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--or);
}
h2[tabindex="-1"]:focus-visible { box-shadow: none; outline-color: var(--ord); }

/* ------------------------------------------------------------------ header */

.site-header {
  background: var(--w);
  border-bottom: 3px solid var(--or);
  box-shadow: var(--ss);
}
.site-header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 16px;
}
.logo { display: block; height: 40px; width: auto; }

/* ------------------------------------------------------------------ page */

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.page-title {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 16px;
}

.card {
  background: var(--w);
  border: 1px solid var(--g100);
  border-radius: var(--rmd);
  box-shadow: var(--ss);
  padding: 20px;
  margin-bottom: 16px;
}
.card h2 {
  font-size: 1.2rem;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--olt);
}
.card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 20px 0 8px;
}
.card p + p { margin-top: 10px; }
.prewrap { white-space: pre-line; }

/* ------------------------------------------------------------------ states */

.state-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 0;
  color: var(--g600);
}
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--g100);
  border-top-color: var(--or);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.5s; }
}

/* ------------------------------------------------------------------ project and stage blocks */

.project { border-left: 4px solid var(--or); }
.project-name { font-size: 1.15rem; font-weight: 700; }
.project-company { color: var(--g600); }
.card .project-company { margin-top: 2px; }
.project-ref { margin-top: 6px; color: var(--g600); font-size: .95rem; }
.project-ref span { color: var(--g900); font-weight: 600; }

.stage-line { font-weight: 600; margin-bottom: 10px; }
.stage-code {
  display: inline-block;
  background: var(--olt);
  color: var(--g900);
  border-radius: var(--rsm);
  padding: 0 8px;
  margin-right: 4px;
  font-weight: 700;
}
.budget { margin-top: 4px; }
.budget span { font-weight: 600; }

.list { padding-left: 1.4em; }
.list li + li { margin-top: 4px; }

.facts { margin-top: 14px; }
.fact {
  display: grid;
  grid-template-columns: minmax(110px, 30%) 1fr;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid var(--g50);
}
.fact:first-child { border-top: 0; }
.fact dt { color: var(--g600); }
.fact dd { font-weight: 600; }

/* ------------------------------------------------------------------ form fields */

.field { border: 0; margin: 18px 0 0; min-width: 0; }
.card h2 + .field, .card h2 + p { margin-top: 0; }
legend, .field > label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}
legend { float: none; width: 100%; }
.req, .hint { font-weight: 400; color: var(--g600); }
.help { color: var(--g600); font-size: .95rem; margin-top: 6px; }
.card .help { margin-top: 6px; }

input[type="text"], textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--g900);
  background: var(--w);
  border: 1.5px solid var(--g200);
  border-radius: var(--rsm);
  padding: 10px 12px;
}
textarea { resize: vertical; min-height: 5em; }
input[type="text"]:hover, textarea:hover { border-color: var(--g400); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--rtx); }

.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
}
.choice input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--ord);
}
.choice label { cursor: pointer; }
.choice input:disabled + label { color: var(--g600); cursor: default; }
.choices-inline { display: flex; flex-wrap: wrap; gap: 4px 24px; }

.statement {
  background: var(--g50);
  border-radius: var(--rsm);
  padding: 12px 14px;
}
.statement .choice { padding: 0; }

.field-error {
  color: var(--rtx);
  font-weight: 600;
  margin-top: 6px;
}

/* ------------------------------------------------------------------ errors, banner, actions */

.error-summary {
  background: var(--rbg);
  color: var(--rtx);
  border-left: 4px solid var(--rtx);
  border-radius: var(--rsm);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.error-summary:empty { padding: 0; margin: 0; border: 0; }
.error-summary-title { font-weight: 700; margin-bottom: 6px; }
.error-summary ul { padding-left: 1.2em; }
.link-button {
  font: inherit;
  color: var(--rtx);
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.banner {
  background: var(--rbg);
  color: var(--rtx);
  border-radius: var(--rsm);
  padding: 12px 16px;
  margin-top: 16px;
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.status { color: var(--g600); }

.btn {
  font: inherit;
  font-weight: 600;
  border-radius: var(--rmd);
  padding: 12px 28px;
  cursor: pointer;
  min-height: 44px;
}
.btn-primary {
  background: var(--or);
  color: var(--g900);
  border: 0;
  box-shadow: 0 2px 10px rgba(250, 166, 26, .3);
}
.btn-primary:hover { background: var(--ord); }
.btn-secondary {
  background: var(--w);
  color: var(--g900);
  border: 1.5px solid var(--ord);
}
.btn-secondary:hover { background: var(--olt); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ------------------------------------------------------------------ receipt */

.receipt h2 { border-bottom-color: var(--or); }
.closing { color: var(--g600); }

/* ------------------------------------------------------------------ honeypot */

/* display: none, not an off-screen box, so the field cannot take focus.
   Browser autofill is understood to skip fields that cannot (assumed, not
   tested here; README lists the manual check). An off-screen field could be
   filled by autofill, and the client would then be rejected with no visible
   field to clear. */
.hp {
  display: none;
}

/* ------------------------------------------------------------------ small screens */

@media (max-width: 480px) {
  .page { padding: 16px 16px 40px; }
  .page-title { font-size: 1.3rem; }
  .card { padding: 16px; }
  .fact { grid-template-columns: 1fr; gap: 0; }
  .btn { width: 100%; }
}

/* ------------------------------------------------------------------ print */

@media print {
  body { background: #fff; font-size: 11pt; }
  .site-header { box-shadow: none; border-bottom: 2px solid #000; }
  button, .btn, .actions, .error-summary, .banner, .hp, .state-loading { display: none !important; }
  .card { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  .page { padding: 12px 0; }
}
