/* The Red Flag Audit Tool™ — Musa Fasasi | The Fasasi Effect | Wealth Through Ownership */
:root {
  --ink: #172635;          /* Midnight Ink */
  --brass: #B59A65;        /* Muted Brass (accents) */
  --brass-text: #765F2C;   /* darker brass for readable text on ivory */
  --ivory: #F5F1E8;        /* Warm Ivory */
  --char: #292D30;         /* Charcoal */
  --soft: #4D5256;
  --line: #E1D9C7;
  --card: #FFFEFB;
  --red: #A32020; --red-bg: #FBE9E7; --red-line: #E8B4AE;
  --amber: #7A4E0B; --amber-bg: #FBF1DD; --amber-line: #E6D3A3;
  --green: #1F6B57; --green-bg: #E5F1EC; --green-line: #B8D8CC;
  --grey-bg: #ECE8DD;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--char); font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(28px, 6vw, 40px); }
h2 { font-size: clamp(22px, 4.5vw, 28px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
a { color: var(--ink); }
button { font-family: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

/* header */
.site-header { background: var(--ink); color: #fff; }
.site-header .in { max-width: 860px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; min-width: 0; }
.brand img { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--brass); flex: none; }
.brand .n { display: block; font-family: var(--serif); text-transform: uppercase; letter-spacing: 1.6px; font-size: 15px; font-weight: 600; line-height: 1.2; }
.brand .t { display: block; font-size: 10px; color: #D3BF93; letter-spacing: .4px; line-height: 1.3; }
.hdr-btn { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.4); border-radius: 99px; min-height: 40px; padding: 0 16px; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.hdr-btn:hover { border-color: var(--brass); }

main { max-width: 780px; margin: 0 auto; padding: 24px 16px 64px; }
.eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--brass-text); margin-bottom: 10px; }
.lead { font-size: 17px; color: var(--soft); }
.tagline { font-family: var(--serif); font-style: italic; font-size: clamp(18px, 4vw, 22px); color: var(--ink); margin-bottom: 1em; }

/* cards + notices */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 20px; margin: 0 0 18px; box-shadow: 0 1px 2px rgba(23,38,53,.04); }
.card > :last-child { margin-bottom: 0; }
.notice { border: 1px solid var(--line); border-left: 5px solid var(--brass); background: var(--card); border-radius: 10px; padding: 14px 16px; font-size: 14.5px; margin: 0 0 18px; }
.notice.amber { background: var(--amber-bg); border-color: var(--amber-line); border-left-color: #B7791F; color: #4a3207; }
.notice.red { background: var(--red-bg); border-color: var(--red-line); border-left-color: var(--red); }
.notice.green { background: var(--green-bg); border-color: var(--green-line); border-left-color: var(--green); }
.notice strong:first-child { display: block; margin-bottom: 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 50px; padding: 12px 24px; border-radius: 99px; font-weight: 700; font-size: 15px; letter-spacing: .02em; text-decoration: none; cursor: pointer; border: 2px solid var(--ink); background: transparent; color: var(--ink); line-height: 1.3; }
.btn:hover { background: rgba(23,38,53,.06); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: #263a4f; }
.btn.brass { background: var(--brass); border-color: var(--brass); color: #172635; }
.btn.small { min-height: 42px; padding: 8px 16px; font-size: 13.5px; }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.row.end { justify-content: space-between; }
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--ink); text-decoration: underline; font-size: 14px; cursor: pointer; font-weight: 600; min-height: 36px; text-align: left; }

/* forms */
.field { margin: 0 0 18px; }
label.lbl, legend.lbl { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; color: var(--ink); padding: 0; }
.hint { font-size: 13px; color: var(--soft); margin: 4px 0 0; }
.req { color: var(--red); }
input[type=text], select, textarea { width: 100%; font: 400 16px/1.4 var(--sans); padding: 12px 14px; border: 1.5px solid #CFC6B0; border-radius: 10px; background: #fff; color: var(--char); min-height: 48px; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
.err { color: var(--red); font-size: 13.5px; font-weight: 600; margin-top: 6px; }
.invalid input, .invalid select { border-color: var(--red); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; }
@media (min-width: 620px) { .grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* progress */
.progress { margin: 0 0 18px; }
.progress .top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.bar { height: 10px; background: #E3DCC9; border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width .25s; }
.saved { font-size: 12.5px; color: var(--soft); margin-top: 6px; min-height: 1.4em; }
details.sections { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin: 0 0 18px; }
details.sections > summary { cursor: pointer; padding: 12px 16px; font-weight: 700; font-size: 14.5px; min-height: 48px; display: flex; align-items: center; color: var(--ink); }
details.sections ol { list-style: none; margin: 0; padding: 0 8px 8px; }
details.sections li button { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: none; border: 0; border-radius: 8px; padding: 10px 8px; min-height: 48px; font-size: 14.5px; cursor: pointer; color: var(--char); }
details.sections li button:hover { background: var(--ivory); }
details.sections li button[aria-current=step] { background: var(--ivory); font-weight: 700; }
.pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; white-space: nowrap; background: var(--grey-bg); color: var(--soft); }
.pill.done { background: var(--green-bg); color: var(--green); }
.pill.warn { background: var(--red-bg); color: var(--red); }

/* questions */
.qcard { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px; margin: 0 0 16px; }
.qcard.answered { border-left: 5px solid var(--green-line); }
.qcard.concern { border-left: 5px solid var(--red); }
.qcard.unresolved { border-left: 5px solid #B7791F; }
.qmeta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.qid { color: var(--soft); letter-spacing: .06em; }
.pri { padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--ivory); color: var(--soft); }
.pri.critical { background: var(--red-bg); border-color: var(--red-line); color: var(--red); }
.pri.high { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber); }
.qstate { margin-left: auto; color: var(--soft); }
.qtext { font-weight: 600; font-size: 16.5px; line-height: 1.5; margin: 0 0 12px; color: var(--ink); }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1.5px solid #D8CFB9; border-radius: 12px; cursor: pointer; background: #fff; min-height: 52px; }
.opt:hover { border-color: var(--ink); }
.opt input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.opt .t { font-weight: 600; font-size: 15px; display: block; }
.opt .h { display: block; font-size: 12.5px; color: var(--soft); font-weight: 400; }
.opt.sel { border-color: var(--ink); background: #F1EEE5; box-shadow: inset 0 0 0 1px var(--ink); }
.opt.sel.concern { border-color: var(--red); background: var(--red-bg); box-shadow: inset 0 0 0 1px var(--red); }
.opt:focus-within { outline: 3px solid var(--brass); outline-offset: 2px; }
details.more { margin-top: 10px; font-size: 14px; }
details.more > summary { cursor: pointer; font-weight: 600; color: var(--ink); min-height: 40px; display: flex; align-items: center; }
details.more .body { padding: 4px 0 4px; color: var(--soft); }
details.more dl { margin: 0; }
details.more dt { font-weight: 700; color: var(--ink); margin-top: 8px; }
details.more dd { margin: 2px 0 0; }
.note label { font-weight: 600; font-size: 13.5px; }
.note textarea { font-size: 16px; min-height: 70px; }
.catintro { margin: 0 0 18px; }
.navrow { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: 8px; }
.navrow .grow { flex: 1 1 140px; }

/* results */
.verdict { border-radius: 16px; padding: 22px 20px; margin: 0 0 18px; border: 1px solid var(--line); background: var(--card); }
.verdict h2 { margin: 0 0 6px; }
.verdict.critical { background: var(--red-bg); border-color: var(--red-line); }
.verdict.high { background: var(--amber-bg); border-color: var(--amber-line); }
.verdict.further, .verdict.incomplete { background: #F3EEDF; }
.verdict.none { background: var(--card); }
.pause { background: var(--red); color: #fff; border-radius: 16px; padding: 20px; margin: 0 0 18px; }
.pause h2 { color: #fff; margin: 0 0 6px; letter-spacing: .06em; font-family: var(--sans); font-weight: 800; font-size: clamp(22px, 5vw, 28px); }
.pause .sub { color: #FDECEA; font-size: 14.5px; }
.stop { background: #fff; color: var(--char); border-radius: 12px; padding: 14px 16px; margin-top: 14px; }
.stop h3 { margin: 0 0 6px; color: var(--red); font-size: 18px; }
.stop ul { margin: 6px 0; padding-left: 20px; }
.stop p { margin: 0 0 8px; font-size: 14.5px; }
.stop .lab { font-weight: 700; color: var(--ink); }
.ind3 { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); margin: 0 0 18px; }
@media (min-width: 700px) { .ind3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ind { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.ind .k { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--brass-text); }
.ind .v { font-family: var(--serif); font-size: 21px; color: var(--ink); font-weight: 600; line-height: 1.25; margin: 4px 0; }
.ind .s { font-size: 13.5px; color: var(--soft); }
.ind.bad { border-color: var(--red-line); background: var(--red-bg); }
table.kv { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.kv th { text-align: left; width: 42%; color: var(--soft); font-weight: 600; padding: 6px 10px 6px 0; vertical-align: top; }
table.kv td { padding: 6px 0; vertical-align: top; overflow-wrap: anywhere; }
.issue { border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px; margin: 0 0 12px; background: #fff; }
.issue h4 { margin: 0 0 6px; font-size: 16px; color: var(--ink); font-family: var(--sans); font-weight: 700; }
.issue .m { font-size: 12.5px; font-weight: 700; display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.issue p { margin: 0 0 6px; font-size: 14.5px; }
.issue .lab { font-weight: 700; color: var(--ink); }
.issue .nt { background: var(--ivory); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; }
ol.steps { padding-left: 22px; margin: 0; }
ol.steps li { margin: 0 0 12px; }
ol.steps .rel { font-size: 13px; color: var(--soft); display: block; }
.cta { background: var(--ink); color: #fff; border-radius: 16px; padding: 22px 20px; margin: 0 0 18px; }
.cta h3 { color: #fff; margin-bottom: 6px; }
.cta p { color: #E6DFC9; font-size: 14.5px; }
.cta .btn { border-color: var(--brass); background: var(--brass); color: #172635; }
.fine { font-size: 12.5px; color: var(--soft); }
footer.site { background: var(--ink); color: #ECE6D6; text-align: center; padding: 28px 16px; font-size: 13px; }
footer.site .fn { font-family: var(--serif); text-transform: uppercase; letter-spacing: 2px; color: #fff; font-size: 17px; }
footer.site .fs { color: #D3BF93; margin-bottom: 8px; }
footer.site a { color: #ECE6D6; }
.toast { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: calc(100% - 32px); z-index: 40; }
table.w { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0 14px; }
table.w th, table.w td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
table.w th { background: var(--ivory); }
.lockup { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto 8px; border-radius: 12px; }

#printReport { display: none; }
@media print {
  @page { size: A4; margin: 16mm; }
  body { background: #fff; font-size: 11pt; }
  .site-header, main, footer.site, .skip, .toast { display: none !important; }
  #printReport { display: block; }
  #printReport h1 { font-size: 20pt; }
  #printReport h2 { font-size: 14pt; margin-top: 16pt; break-after: avoid; }
  #printReport table { width: 100%; border-collapse: collapse; font-size: 10pt; }
  #printReport th, #printReport td { border: 1px solid #bbb; padding: 4pt 6pt; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
  #printReport tr { break-inside: avoid; }
  #printReport .pbox { border: 2pt solid #A32020; padding: 8pt 10pt; margin: 8pt 0; break-inside: avoid; }
  #printReport .pbox h2 { color: #A32020; margin-top: 0; }
  #printReport .head { display: flex; align-items: center; gap: 10pt; border-bottom: 2pt solid #172635; padding-bottom: 8pt; }
  #printReport .head img { width: 40pt; height: 40pt; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
h1:focus, main:focus { outline: none; }
.lockup { border: 1px solid var(--line); background: #F3EDE4; }
