/* Candidate form — mobile-first, professional, brand colour from Settings */
:root { --brand: #4f46e5; --ink: #0f172a; --ink2: #334155; --muted: #64748b; --line: #e2e8f0; --bg: #f4f6fb; --bad: #e11d48; --ok: #10b981; --r: 18px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); min-height: 100vh; }
a { color: var(--brand); }
[hidden] { display: none !important; }
.top { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0); }
.top-in { max-width: 760px; margin: 0 auto; padding: 12px 18px; display: flex; align-items: center; gap: 12px; }
.logo { max-height: 40px; max-width: 180px; object-fit: contain; }
.brandmark { font-weight: 800; color: var(--brand); letter-spacing: -.01em; }
.for { margin-left: auto; font-size: .85rem; color: var(--muted); text-align: right; }
.bar { height: 4px; background: color-mix(in srgb, var(--brand) 12%, #fff); }
.bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .35s ease; }
.wrap { max-width: 760px; margin: 0 auto; padding: 20px 14px 40px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 26px 22px; box-shadow: 0 10px 30px -22px rgba(15, 23, 42, .35); }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 6px 0 10px; letter-spacing: -.02em; }
h2 { font-size: 1.3rem; margin: 2px 0 4px; letter-spacing: -.01em; }
.eyebrow { margin: 0; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); }
.lede { font-size: 1.08rem; color: var(--ink2); }
.intro { color: var(--ink2); margin: 10px 0 16px; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.facts { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.facts li { background: color-mix(in srgb, var(--brand) 6%, #fff); border-radius: 14px; padding: 12px; text-align: center; }
.facts b { display: block; font-size: 1.35rem; color: var(--brand); }
.facts span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.tip { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 10px 14px; font-size: .92rem; }
.privacy { color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 18px; }
.btn { appearance: none; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 700; padding: 12px 20px; border-radius: 12px; cursor: pointer; min-height: 48px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.big { width: 100%; font-size: 1.05rem; margin-top: 6px; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn:focus-visible, .link:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 2px; }
.link { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; padding: 4px; }
.stephead { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 18px; }
.stephead span { font-size: .78rem; font-weight: 800; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; }
.q { margin: 0 0 22px; }
.q.note { background: color-mix(in srgb, var(--brand) 5%, #fff); border-left: 4px solid var(--brand); border-radius: 10px; padding: 12px 14px; }
.q.note p { margin: 0; }
.q-label { display: block; font-weight: 700; margin-bottom: 6px; padding: 0; }
.q-hint { margin: -2px 0 8px; font-size: .88rem; color: var(--muted); }
.req { color: var(--bad); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
input[type=text], input[type=email], input[type=tel], input[type=url], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #cbd5e1; border-radius: 12px; padding: 12px 14px; min-height: 48px; }
textarea { resize: vertical; min-height: 110px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.q.bad input, .q.bad textarea, .q.bad select, .q.bad .opt span, .q.bad .drop { border-color: var(--bad); }
.q-err { color: var(--bad); font-size: .88rem; font-weight: 600; margin: 6px 0 0; }
.q-err:empty { display: none; }
.opts { display: grid; gap: 8px; }
.opts.row { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span { display: flex; align-items: center; gap: 10px; border: 1.5px solid #cbd5e1; border-radius: 12px; padding: 12px 14px; min-height: 48px; transition: border-color .15s, background .15s; }
.opt span::before { content: ""; flex: none; width: 18px; height: 18px; border: 2px solid #94a3b8; border-radius: 50%; }
.opt.check span::before { border-radius: 5px; }
.opt input:checked + span { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, #fff); font-weight: 600; }
.opt input:checked + span::before { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 3px #fff; }
.opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.opts.rating span { justify-content: center; text-align: center; font-size: .92rem; }
.opts.rating span::before { display: none; }
.dmy { display: grid; grid-template-columns: 1fr 1.7fr 1.2fr; gap: 8px; }
.drop { display: flex; align-items: center; gap: 12px; border: 2px dashed #cbd5e1; border-radius: 14px; padding: 16px; cursor: pointer; position: relative; background: #fafbff; }
.drop:hover { border-color: var(--brand); }
.drop.has { border-style: solid; border-color: var(--ok); background: #f0fdf4; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.drop-ic { font-size: 1.6rem; }
.drop-t b, .drop-t small { display: block; }
.drop-t small { color: var(--muted); }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; margin-left: auto; }
.grid-wrap { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 14px; }
.rgrid { width: 100%; border-collapse: collapse; font-size: .92rem; }
.rgrid th, .rgrid td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.rgrid thead th { font-size: .75rem; color: var(--muted); font-weight: 700; background: #f8fafc; }
.rgrid tbody th { text-align: left; font-weight: 600; min-width: 200px; }
.rgrid tr:last-child > * { border-bottom: 0; }
.rgrid label { display: inline-flex; padding: 6px; cursor: pointer; }
.rgrid label span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rgrid input { width: 22px; height: 22px; accent-color: var(--brand); cursor: pointer; }
.rgrid tr.bad th { color: var(--bad); }
.nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }
.nav .btn { flex: 1; max-width: 220px; }
.nav .btn.primary { margin-left: auto; }
.saved-note { text-align: center; margin: 14px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rv { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; overflow: hidden; }
.rv-h { display: flex; justify-content: space-between; align-items: center; background: #f8fafc; padding: 10px 14px; }
.rv-h h3 { margin: 0; font-size: 1rem; }
.rv dl { margin: 0; padding: 4px 14px; }
.rv dl div { display: grid; grid-template-columns: minmax(120px, 45%) 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: .92rem; }
.rv dl div:last-child { border-bottom: 0; }
.rv dt { color: var(--muted); } .rv dd { margin: 0; font-weight: 600; word-break: break-word; }
.upload-progress { margin: 14px 0; } .upload-progress div { height: 10px; border-radius: 6px; background: #e2e8f0; overflow: hidden; }
.upload-progress i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.upload-progress span { font-size: .85rem; color: var(--muted); }
.err-box { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 12px; padding: 12px 14px; }
.done, .gate { text-align: center; }
.gate { max-width: 560px; margin: 40px auto; }
.gate-logo { max-height: 56px; max-width: 200px; object-fit: contain; display: block; margin: 0 auto 10px; }
.gate-ic { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 4px auto 8px; font-size: 2rem; font-weight: 900; }
.gate-ic.ok { color: var(--ok); background: #d1fae5; } .gate-ic.warn { color: #d97706; background: #fef3c7; }
.ref { font-size: 1.05rem; } .ref b { font-family: ui-monospace, Menlo, monospace; background: #f1f5f9; padding: 4px 10px; border-radius: 8px; }
.foot { text-align: center; color: var(--muted); font-size: .82rem; padding: 0 16px calc(28px + env(safe-area-inset-bottom, 0)); }
@media (min-width: 700px) { .card { padding: 34px 38px; } h1 { font-size: 2rem; } .wrap { padding-top: 32px; } }
@media (max-width: 520px) {
  .rgrid thead { display: none; }
  .rgrid, .rgrid tbody, .rgrid tr, .rgrid th, .rgrid td { display: block; width: 100%; }
  .rgrid tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .rgrid tbody th { border: 0; padding: 0 0 8px; min-width: 0; }
  .rgrid td { display: inline-block; width: auto; border: 0; padding: 0 4px 4px 0; }
  .rgrid label { border: 1.5px solid #cbd5e1; border-radius: 10px; padding: 8px 10px; gap: 6px; align-items: center; }
  .rgrid label span { position: static; width: auto; height: auto; clip: auto; font-size: .82rem; }
  .rgrid input { width: 16px; height: 16px; }
  .facts b { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.preview-flag { background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; border-radius: 10px; padding: 8px 12px; font-size: .88rem; font-weight: 600; }
