/* Crux Assessor — capture-only intake styling.
   Brand tokens, header/nav, footer, buttons, chips, and callouts mirror the
   crux-assessment tool (assets ported from crux-works.com) so the two products
   read as one. Visual only — no scoring, no band colors used as a rating.
   Score/band palette (rust->gold->moss->slate) is intentionally NOT wired to any
   answer value here; this tool never displays a score. */

:root{
  --ink:#15120c; --ink2:#211c14;
  --bone:#f4efe4; --bone2:#ece4d4;
  --rust:#bc5a2e; --rust-d:#9a4621; --rust-t:#f1e0d6;
  --slate:#3c5a70; --slate-d:#2b4254; --slate-t:#dde4ea;
  --moss:#6f7a43; --moss-d:#535d31; --moss-t:#e6e9d7;
  --gold:#bb8a23; --gold-d:#8c6510; --gold-t:#f1e7cc;
  --gray:#8a8276;
  --text:#221d15; --muted:rgba(34,29,21,.62); --line:rgba(34,29,21,.16);
  --cream:#f4efe4; --cream-muted:rgba(244,239,228,.66); --cream-line:rgba(244,239,228,.16);
  --maxw:1140px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bone);color:var(--text);
  font-family:"IBM Plex Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:17px;line-height:1.6;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
h1,h2,h3{font-family:"Fraunces",Georgia,serif;font-weight:600;line-height:1.1;letter-spacing:-.01em;margin:0}
p{margin:0}
a{color:var(--slate-d);text-decoration:none}
a:hover{color:var(--rust-d)}
img{max-width:100%;display:block}

/* ---------- content column ---------- */
.snap-wrap{width:min(820px,calc(100% - 2.4rem));margin-inline:auto;padding:2rem 0 4.5rem}

/* ---------- header / nav ---------- */
.site-header{background:var(--ink);color:var(--cream);border-bottom:1px solid var(--cream-line)}
.site-header .wrap{width:min(var(--maxw),calc(100% - 3rem));margin-inline:auto;
  display:flex;align-items:center;justify-content:space-between;gap:1.5rem;padding:14px 0}
.site-header .logo{font-family:"Fraunces",Georgia,serif;font-weight:600;font-size:1.4rem;color:var(--cream)}
.nav{display:flex;gap:.2rem;flex-wrap:wrap;align-items:center}
.nav a{font-family:"IBM Plex Mono",ui-monospace,monospace;text-transform:uppercase;letter-spacing:.13em;font-size:.7rem;
  color:var(--cream-muted);padding:.5rem .7rem;border-radius:6px;border:1px solid transparent;
  transition:color .15s,background .15s,border-color .15s}
.nav a:hover{color:var(--cream);background:rgba(244,239,228,.06)}
.nav a.ext{color:var(--cream);border-color:var(--cream-line)}
.nav a.ext:hover{border-color:var(--rust);color:var(--rust)}
.nav a.snap{background:var(--rust);color:var(--cream);border-color:var(--rust)}
.nav a.snap:hover{background:var(--rust-d);border-color:var(--rust-d);color:var(--cream)}

/* ---------- footer ---------- */
.site-footer{background:var(--ink);color:var(--cream);padding:3rem 0 2.4rem;border-top:1px solid var(--cream-line)}
.site-footer .wrap{width:min(var(--maxw),calc(100% - 3rem));margin-inline:auto;
  display:flex;justify-content:space-between;gap:2rem;flex-wrap:wrap;align-items:flex-start}
.site-footer .logo{font-family:"Fraunces",Georgia,serif;font-weight:600;font-size:1.1rem;display:block;margin-bottom:.6rem}
.site-footer .tl{color:var(--cream-muted);font-size:.9rem;max-width:40ch}
.site-footer .cr{color:var(--cream-muted);font-size:.78rem;margin-top:1.3rem;width:100%}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;gap:.5rem;font-family:"IBM Plex Sans",sans-serif;
  font-weight:600;font-size:.96rem;padding:.7rem 1.15rem;border-radius:9px;border:1px solid var(--line);
  background:transparent;color:var(--text);cursor:pointer;transition:transform .12s ease,background .15s,border-color .15s}
.btn:hover{border-color:var(--text)}
.btn.primary{background:var(--rust);color:var(--cream);border-color:var(--rust)}
.btn.primary:hover{background:var(--rust-d);border-color:var(--rust-d)}
.btn:disabled{opacity:.45;cursor:default}
.btn:disabled:hover{border-color:var(--line)}

/* ---------- page head / intro ---------- */
.page-eyebrow{color:var(--rust-d);margin-bottom:.6rem}
.brand{font-family:"IBM Plex Mono",ui-monospace,monospace;text-transform:uppercase;letter-spacing:.16em;
  font-size:.72rem;font-weight:500;color:var(--rust-d)}
.snap-wrap h1{font-size:clamp(2rem,4.4vw,2.9rem);margin-bottom:.2rem}
.intro{margin-top:.5rem;color:var(--muted);font-size:1.02rem;max-width:64ch}
.section-intro{margin:.4rem 0 1rem;color:var(--text);font-size:1rem;max-width:66ch}
.wt-status{color:var(--muted)}
.fatal{border:1px solid var(--rust);background:var(--rust-t);color:var(--rust-d);
  border-radius:10px;padding:1rem 1.2rem;font-weight:600}

/* ---------- form intro banner (all-required) ---------- */
.form-intro-banner{border:1px solid var(--line);border-left:4px solid var(--slate);
  background:var(--slate-t);color:var(--text);border-radius:0 10px 10px 0;
  padding:.85rem 1.05rem;margin:1rem 0 .4rem;font-size:.96rem;max-width:70ch}

/* ---------- progress / clickable section tabs ---------- */
.progress{display:flex;gap:.35rem;flex-wrap:wrap;margin:.8rem 0 .2rem}
.progress .pstep{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:.66rem;letter-spacing:.1em;
  text-transform:uppercase;color:var(--muted);padding:.4rem .6rem;border:1px solid var(--line);
  border-radius:6px;background:var(--bone);white-space:nowrap;cursor:pointer;
  transition:color .12s,background .12s,border-color .12s}
.progress .pstep:hover{border-color:var(--rust);color:var(--rust-d)}
/* subtle complete/incomplete state — never blocks navigation */
.progress .pstep.complete{color:var(--moss-d);border-color:var(--moss)}
.progress .pstep.complete::before{content:"\2713 ";font-weight:700}
.progress .pstep.incomplete{color:var(--muted)}
.progress .pstep.active{color:var(--cream);border-color:var(--rust);background:var(--rust);font-weight:600}
.progress .pstep.active:hover{color:var(--cream)}
.progress .pstep.active.complete::before{content:"\2713 "}

/* ---------- flash highlight when jumped to from Review ---------- */
.q-card.flash{animation:flashcard 1.6s ease-out}
@keyframes flashcard{0%,40%{background:var(--gold-t);border-color:var(--gold)}100%{}}

/* ---------- Submit-time completeness flag ---------- */
.submit-flag{border:1px solid var(--line);border-left:4px solid var(--rust);background:var(--rust-t);
  border-radius:0 10px 10px 0;padding:1rem 1.15rem;margin:1.2rem 0}
.submit-flag[hidden]{display:none}
.flag-head{font-family:"Fraunces",Georgia,serif;font-weight:600;font-size:1.15rem;color:var(--rust-d);margin-bottom:.5rem}
.flag-group{margin:.6rem 0}
.flag-group-h{font-family:"IBM Plex Mono",ui-monospace,monospace;text-transform:uppercase;
  letter-spacing:.1em;font-size:.66rem;color:var(--muted);margin-bottom:.2rem}
.flag-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.2rem}
.flag-link{background:none;border:none;padding:.1rem 0;text-align:left;cursor:pointer;
  font-family:"IBM Plex Sans",sans-serif;font-size:.94rem;color:var(--rust-d);text-decoration:underline;
  text-underline-offset:2px}
.flag-link:hover{color:var(--rust)}
.flag-note{color:var(--muted);font-size:.84rem}
.flag-actions{display:flex;gap:.7rem;margin-top:1rem;flex-wrap:wrap}

/* ---------- submission failure / retry ---------- */
.submit-error{border:1px solid var(--line);border-left:4px solid var(--rust);background:var(--rust-t);
  border-radius:0 10px 10px 0;padding:1rem 1.15rem;margin:1.2rem 0}
.submit-error[hidden]{display:none}
.submit-error .flag-head{color:var(--rust-d)}

/* ---------- large success confirmation ---------- */
.submit-confirm{border:2px solid var(--moss);background:var(--moss-t);border-radius:14px;
  padding:2rem 1.6rem;margin:1.4rem 0;text-align:center}
.submit-confirm[hidden]{display:none}
.confirm-head{font-family:"Fraunces",Georgia,serif;font-weight:600;color:var(--moss-d);
  font-size:clamp(1.6rem,4.5vw,2.2rem);line-height:1.1}
.confirm-head::before{content:"\2713";display:block;font-size:2.4rem;line-height:1;margin-bottom:.4rem}
.confirm-sub{color:var(--text);font-size:1.08rem;margin-top:.7rem;max-width:56ch;margin-inline:auto}

/* Submit button "done" state after a successful submission. */
.btn.done,.btn.done:disabled{background:var(--moss);border-color:var(--moss);color:var(--cream);
  opacity:.9;cursor:default}

/* ---------- section panels ---------- */
.section-panel[hidden]{display:none}
.section-panel h2{font-size:clamp(1.4rem,3vw,1.8rem);margin:.4rem 0 .2rem}

/* ---------- question cards (fieldset/legend house pattern) ---------- */
.q-card{border:1px solid var(--line);border-radius:12px;margin:1.1rem 0;padding:1.1rem 1.2rem;background:var(--bone)}
/* Conditional (branch) questions render identically to normal questions. */
.q-card.has-err{border-color:var(--rust)}
.q-card[hidden]{display:none}
.q-card legend{font-family:"Fraunces",Georgia,serif;font-weight:600;font-size:1.15rem;padding:0 .3rem;color:var(--text)}
.q-card .req{color:var(--rust-d);font-weight:700}
.q-help{color:var(--muted);font-size:.9rem;margin:.35rem 0 .2rem;max-width:66ch}
.q-body{margin-top:.7rem}
.q-err{color:var(--rust-d);font-weight:600;font-size:.9rem;margin-top:.5rem}
.q-err[hidden]{display:none}

/* ---------- chips (single/multi/boolean toggles) ---------- */
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{font-family:"IBM Plex Sans",sans-serif;background:var(--bone2);color:var(--text);
  border:1px solid var(--line);border-radius:8px;cursor:pointer;padding:8px 13px;font-size:.9rem;
  transition:border-color .12s,background .12s,color .12s}
.chip:hover{border-color:var(--rust)}
.chip[aria-pressed="true"]{background:var(--rust-t);border-color:var(--rust);color:var(--rust-d);font-weight:600}
.chip:disabled{opacity:.4;cursor:not-allowed}
.chip:disabled:hover{border-color:var(--line)}

/* ---------- inputs ---------- */
input,select,textarea{font-family:"IBM Plex Sans",sans-serif;font-size:.95rem;padding:.55rem .7rem;
  border:1px solid var(--line);border-radius:9px;background:var(--bone);color:var(--text)}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--rust)}
input::placeholder{color:var(--gray)}
textarea{width:100%;resize:vertical}
input[type="number"]{width:8rem}

/* ---------- field rows (sub-fields inside groups) ---------- */
.field-group{display:flex;flex-direction:column;gap:.9rem}
.field-row{display:flex;flex-direction:column;gap:.35rem}
.field-label{font-weight:600;font-size:.92rem;color:var(--text)}
.field-help{color:var(--muted);font-size:.82rem;max-width:60ch}

/* ---------- number_unit ---------- */
.num-unit{display:inline-flex;align-items:center;gap:.4rem;flex-wrap:wrap}
.unit-suffix{color:var(--muted);font-size:.9rem}
.unit-sel{padding:.55rem .5rem}

/* ---------- counts steppers ---------- */
.counts{display:flex;flex-direction:column;gap:.5rem}
.count-row{display:flex;align-items:center;gap:.6rem}
.count-label{flex:1 1 12rem}
.count-val{min-width:2rem;text-align:center;font-variant-numeric:tabular-nums;font-weight:600}
.step{width:2.1rem;height:2.1rem;border-radius:8px;border:1px solid var(--line);background:var(--bone2);
  cursor:pointer;font-size:1.1rem;line-height:1;color:var(--text)}
.step:hover{border-color:var(--rust)}

/* ---------- matrix ---------- */
.matrix{border-collapse:collapse;width:100%;margin-top:.3rem}
.matrix th,.matrix td{border:1px solid var(--line);padding:.4rem .5rem;text-align:center}
.matrix thead th{font-size:.78rem;color:var(--muted);font-weight:600;text-transform:none}
.matrix .row-label{text-align:left;font-weight:600;font-size:.9rem}
.matrix td .chip{width:100%;min-height:2rem;padding:6px 8px}
.matrix td .chip[aria-pressed="true"]::before{content:"\2713 "}
.matrix-extra th{text-align:left;font-weight:500;color:var(--muted);font-size:.82rem}
.matrix-extra td input{width:100%}

/* ---------- rank3 ---------- */
.rank3 .ranked{list-style:none;padding:0;margin:.7rem 0 0;display:flex;flex-direction:column;gap:.35rem}
.rank3 .ranked li{display:flex;align-items:center;gap:.5rem}
.rank-n{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;
  border-radius:50%;background:var(--rust);color:var(--cream);font-weight:700;font-size:.8rem}

/* ---------- multi_plus / per-item ---------- */
.per-items{display:flex;flex-direction:column;gap:.7rem;margin-top:.7rem}
.per-item{border:1px solid var(--line);border-radius:9px;padding:.7rem .85rem;background:var(--bone)}
.per-item-h{font-weight:600;font-size:.92rem;margin-bottom:.5rem;color:var(--rust-d)}
.mp-extra,.multi-extra{margin-top:.8rem;display:flex;flex-direction:column;gap:.7rem}

/* ---------- tiered upload ---------- */
.tiered-body{margin-top:.7rem}
.month-table{border-collapse:collapse;margin-top:.3rem}
.month-table th,.month-table td{border:1px solid var(--line);padding:.3rem .45rem;text-align:left}
.month-table th{font-size:.78rem;color:var(--muted)}
.month-table input{width:6rem}
.month-table .m-name{color:var(--text);font-weight:600}

/* ---------- photos ---------- */
.photos{display:flex;flex-direction:column;gap:.55rem}
.photo-row{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap}
.photo-label{flex:1 1 12rem;font-weight:600;font-size:.9rem}

.muted{color:var(--muted);font-size:.85rem}

/* ---------- navbar ---------- */
.navbar{display:flex;align-items:center;gap:.7rem;margin-top:1.6rem;padding-top:1.1rem;border-top:1px solid var(--line);flex-wrap:wrap}
.nav-spacer{flex:1 1 auto}
.nav-msg{color:var(--rust-d);font-weight:600;font-size:.92rem;margin-top:.6rem;min-height:1.2em}
.nav-msg.ok{color:var(--moss-d)}

/* ---------- review ---------- */
.review-section{margin:1.3rem 0}
.review-section h3{font-family:"Fraunces",Georgia,serif;font-size:1.15rem;margin-bottom:.5rem;
  padding-bottom:.3rem;border-bottom:1px solid var(--line)}
.review-item{margin:.6rem 0}
.review-q{font-weight:600;font-size:.94rem}
.ans{margin-top:.2rem;color:var(--text);font-size:.92rem}
.ans-line{margin:.1rem 0}
.ans-sub{margin:.1rem 0 .1rem .3rem}
.ans-k{font-weight:600;color:var(--muted)}
.review-empty{color:var(--muted);font-style:italic}

@media(max-width:560px){
  .count-label{flex-basis:8rem}
  .matrix{display:block;overflow-x:auto}
}
