:root {
  /* Stand Tall Media brand */
  --brand: #E40E8C;        /* primary magenta */
  --brand-dark: #b60b70;
  --plum: #751866;         /* headings + links */
  --olive: #71913C;        /* secondary / success */
  --ink: #2b2130;
  --muted: #7a6f7e;
  --line: #e8e2e8;
  --bg: #faf7fa;
  --card: #ffffff;
  --radius: 3px;

  /* semantic (report grades stay traffic-light readable) */
  --pass: #71913C;
  --warn: #dda528;
  --fail: #d64545;
  --info: #4a7fb5;
  --na: #9aa4b0;

  --font-heading: "Antonio", Helvetica, Arial, sans-serif;
  --font-body: "Roboto", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
.container { max-width: 880px; margin: 0 auto; padding: 24px 20px 80px; }
a { color: var(--plum); }
h1, h2, h3 { font-family: var(--font-heading); color: var(--plum); font-weight: 700; letter-spacing: 0.01em; }
h1 { font-size: 2rem; margin: 0.4em 0; }
h2 { font-size: 1.45rem; margin: 1.6em 0 0.4em; text-transform: uppercase; letter-spacing: 0.03em; }
h3 { font-size: 1.08rem; margin: 1.2em 0 0.4em; text-transform: uppercase; letter-spacing: 0.04em; }
.accent { color: var(--brand); }
.muted { color: var(--muted); }
.error { color: var(--fail); font-weight: 600; }
.hint { color: var(--muted); font-size: 0.85rem; }

/* Nav */
.topnav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px; background: var(--card); border-bottom: 3px solid var(--brand);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-suffix {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem;
  color: var(--brand); text-transform: uppercase; letter-spacing: 0.06em;
  border-left: 2px solid var(--line); padding-left: 10px; line-height: 1;
}
.navlink { color: var(--muted); text-decoration: none; background: none; border: none; font-size: 0.9rem; cursor: pointer; font-family: var(--font-body); }
.navlink:hover { color: var(--brand); }

/* Forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.audit-form .row { margin-bottom: 14px; }
.audit-form .row.three { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.audit-form label { display: block; font-weight: 600; font-size: 0.9rem; }
.audit-form label small { font-weight: 400; color: var(--muted); }
.audit-form input {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius); font-size: 1rem; font-family: var(--font-body);
}
.audit-form input:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
button[type="submit"] {
  background: var(--brand); color: #fff; border: none; border-radius: var(--radius);
  padding: 11px 26px; font-size: 1rem; font-weight: 700; cursor: pointer;
  font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.06em;
}
button[type="submit"]:hover { background: var(--brand-dark); }
.req { color: var(--brand); }
.inline { display: inline; }
.link-btn { background: none; border: none; color: var(--plum); cursor: pointer; padding: 0; font-size: inherit; text-decoration: underline; font-family: var(--font-body); }
.link-btn.danger { color: var(--fail); }

/* Login */
.login-box { max-width: 380px; margin: 12vh auto; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius); padding: 36px 32px; text-align: center; }
.login-logo { max-width: 220px; height: auto; margin-bottom: 8px; }
.login-box input { width: 100%; padding: 11px 12px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 1rem; font-family: var(--font-body); }
.login-box button { width: 100%; background: var(--brand); color: #fff; border: none; border-radius: var(--radius); padding: 11px; font-size: 1rem; font-weight: 700; cursor: pointer; font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.06em; }
.login-box button:hover { background: var(--brand-dark); }

/* Audit list */
.audit-list { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.audit-list th, .audit-list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.audit-list th { background: #f6eef4; font-family: var(--font-heading); font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--plum); }
.actions { white-space: nowrap; }
.actions a, .actions form { margin-right: 8px; }
.actions a { color: var(--plum); }

/* Badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: var(--radius); font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #fff; }
.badge-pass, .badge-done { background: var(--pass); }
.badge-warn, .badge-running, .badge-pending { background: var(--warn); }
.badge-fail, .badge-failed { background: var(--fail); }
.badge-info { background: var(--info); }
.badge-na { background: var(--na); }

/* Progress steps */
.steps { list-style: none; padding: 0; max-width: 560px; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.step-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--line); flex-shrink: 0; }
.steps li.step-running { color: var(--ink); font-weight: 600; }
.steps li.step-running .step-dot { background: var(--brand); animation: pulse 1.2s infinite; }
.steps li.step-done { color: var(--ink); }
.steps li.step-done .step-dot { background: var(--olive); }
.steps li.step-failed { color: var(--fail); }
.steps li.step-failed .step-dot { background: var(--fail); }
.step-note { font-size: 0.8rem; color: var(--fail); }
@keyframes pulse { 50% { opacity: 0.4; } }

/* ---------- Report ---------- */
.report .container { max-width: 820px; }
.report-header { text-align: center; padding: 24px 0 8px; }
.report-kicker { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.85rem; color: var(--brand); font-weight: 700; margin-bottom: 0; }
.report-header h1 { font-size: 2.5rem; margin: 4px 0; text-transform: none; }
.report-sub { color: var(--muted); margin-top: 0; }

.score-hero { display: flex; align-items: center; gap: 32px; margin: 28px 0; text-align: left; }
.grade-circle {
  width: 132px; height: 132px; border-radius: 50%; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; box-shadow: 0 4px 14px rgba(117, 24, 102, 0.22);
}
.grade-letter { font-family: var(--font-heading); font-size: 3.4rem; font-weight: 700; line-height: 1; }
.grade-num { font-size: 0.85rem; opacity: 0.92; }
.grade-A, .grade-bg-A { background: var(--pass); }
.grade-B, .grade-bg-B { background: #a3b24d; }
.grade-C, .grade-bg-C { background: var(--warn); }
.grade-D, .grade-bg-D { background: #e07b39; }
.grade-F, .grade-bg-F { background: var(--fail); }
span.grade { font-weight: 800; padding: 1px 7px; border-radius: var(--radius); color: #fff; }
span.grade.grade-A { background: var(--pass); } span.grade.grade-B { background: #a3b24d; }
span.grade.grade-C { background: var(--warn); } span.grade.grade-D { background: #e07b39; }
span.grade.grade-F { background: var(--fail); }

.score-bars { flex: 1; }
.score-bar-row { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.score-bar-label { width: 170px; font-size: 0.85rem; font-weight: 600; text-align: right; }
.score-bar-track { flex: 1; height: 12px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 0; }
.score-bar-num { width: 32px; font-size: 0.85rem; font-weight: 700; }

.exec-summary { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 22px 26px; margin: 28px 0; }
.exec-summary h2 { margin-top: 0; }
.section-intro { color: var(--muted); margin-top: 0; }
.rec-list { padding-left: 20px; }
.rec-list li { margin-bottom: 16px; }
.rec-list li::marker { color: var(--brand); font-weight: 700; }
.rec-list p { margin: 4px 0 0; color: #4a3d4c; }
.rec-cat { display: inline-block; font-family: var(--font-heading); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand); margin-right: 6px; }

.module-section { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--plum); border-radius: var(--radius); padding: 22px 26px; margin: 22px 0; }
.module-head { display: flex; justify-content: space-between; align-items: center; }
.module-head h2 { margin: 0; }
.module-score { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; color: #fff; padding: 4px 14px; border-radius: var(--radius); }
.module-score.na { background: var(--na); }

.check-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.check-table td, .check-table th { padding: 7px 10px; border-bottom: 1px solid var(--line); font-size: 0.9rem; text-align: left; vertical-align: top; }
.check-table th { font-family: var(--font-heading); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--plum); }
.check-status { width: 70px; }
.check-table.small td { font-size: 0.8rem; }
.url-cell { word-break: break-all; max-width: 340px; }

.bot-grid { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.bot-chip { font-size: 0.78rem; font-weight: 600; padding: 3px 10px; border-radius: var(--radius); border: 1px solid; }
.bot-chip.ok { color: var(--olive); border-color: var(--olive); background: #f2f6e9; }
.bot-chip.blocked { color: var(--fail); border-color: var(--fail); background: #fdeeee; }

.report-footer { text-align: center; margin-top: 40px; padding-top: 24px; border-top: 3px solid var(--brand); font-size: 0.9rem; }
.footer-logo { max-width: 180px; height: auto; margin-bottom: 6px; }

@media (max-width: 640px) {
  .audit-form .row.three { grid-template-columns: 1fr; }
  .score-hero { flex-direction: column; }
  .score-bar-label { width: 120px; }
}

/* ---------- Print ---------- */
@media print {
  :root { --bg: #fff; }
  body { background: #fff; }
  .noprint, .topnav { display: none !important; }
  .container { max-width: 100%; padding: 0; }
  .module-section, .exec-summary { border: 1px solid #ccc; break-inside: avoid; page-break-inside: avoid; margin: 14px 0; }
  .module-section { border-top: 3px solid var(--plum); }
  .exec-summary { border-left: 4px solid var(--brand); }
  .grade-circle { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .badge, .module-score, .score-bar-fill, .grade-circle, span.grade, .bot-chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pages-appendix { page-break-before: always; }
  @page { margin: 0.6in; }
}
