/* =========================================================
 * ComplyFlow AI — modern fintech theme
 *  · Dark sidebar shell + light content area
 *  · Inter typography
 *  · Indigo accent, refined tokens
 * ========================================================= */

:root {
  /* Brand */
  --accent: #6366f1;          /* indigo-500 */
  --accent-hover: #4f46e5;    /* indigo-600 */
  --accent-soft: #eef2ff;     /* indigo-50 */
  --accent-glow: rgba(99,102,241,0.18);

  /* Surfaces (light content) */
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-elev: 0 1px 2px rgba(15,23,42,0.04), 0 1px 3px rgba(15,23,42,0.06);
  --panel-elev-hover: 0 4px 12px rgba(15,23,42,0.08);
  --border: #e5e7eb;
  --border-strong: #cbd5e1;

  /* Text */
  --text: #0f172a;
  --text-dim: #475569;
  --muted: #64748b;

  /* Sidebar (dark) */
  --sb-bg: #0b1224;
  --sb-bg-grad: linear-gradient(180deg, #0b1224 0%, #111c34 100%);
  --sb-border: rgba(255,255,255,0.06);
  --sb-text: #e2e8f0;
  --sb-text-dim: #94a3b8;
  --sb-active: #ffffff;
  --sb-active-bg: rgba(99,102,241,0.18);
  --sb-hover-bg: rgba(255,255,255,0.04);

  /* Semantic */
  --success: #16a34a;
  --success-bg: #dcfce7;
  --warn: #d97706;
  --warn-bg: #fef3c7;
  --error: #dc2626;
  --error-bg: #fee2e2;
  --info: #0284c7;
  --info-bg: #e0f2fe;
  --neutral: #64748b;
  --neutral-bg: #f1f5f9;

  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv02","cv03","cv04","cv11";
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

h1 { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 0.5rem 0; }
h2 { font-size: 1rem; font-weight: 600; letter-spacing: 0.02em; margin: 0 0 0.75rem 0; text-transform: uppercase; color: var(--muted); }
h3 { font-size: 0.85rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.5rem 0; }

.muted { color: var(--muted); }
.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row > * { flex: 1; }

/* =========================================================
 * App shell — sidebar + main
 * ========================================================= */
.body--app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--sb-bg-grad);
  color: var(--sb-text);
  border-right: 1px solid var(--sb-border);
  display: flex;
  flex-direction: column;
  padding: 1.1rem 0.75rem 1rem 0.75rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.6rem 1rem 0.6rem;
  color: var(--sb-text);
  text-decoration: none;
  border-bottom: 1px solid var(--sb-border);
  margin-bottom: 0.75rem;
}
.sidebar__brand:hover { text-decoration: none; }
.sidebar__brand-mark { display: inline-flex; }
.sidebar__brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.sidebar__brand-name { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; color: white; }
.sidebar__brand-ai {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
  color: var(--accent); text-transform: uppercase;
}

.sidebar__nav { display: flex; flex-direction: column; gap: 0.15rem; }
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--sb-text-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.12s ease, color 0.12s ease;
}
.sidebar__link:hover { background: var(--sb-hover-bg); color: var(--sb-text); text-decoration: none; }
.sidebar__link.is-active {
  background: var(--sb-active-bg);
  color: var(--sb-active);
}
.sidebar__link svg { flex-shrink: 0; opacity: 0.85; }

.sidebar__footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--sb-border);
}
.sidebar__user {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.5rem; margin-bottom: 0.4rem;
}
.sidebar__user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  flex-shrink: 0;
}
.sidebar__user-info { overflow: hidden; }
.sidebar__user-name { color: var(--sb-text); font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__user-email { color: var(--sb-text-dim); font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__logout {
  width: 100%;
  background: transparent;
  color: var(--sb-text-dim);
  border: 1px solid var(--sb-border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: left;
}
.sidebar__logout:hover { color: var(--sb-text); border-color: rgba(255,255,255,0.16); background: var(--sb-hover-bg); }

.main {
  padding: 1.5rem 2rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* =========================================================
 * Auth page (login/register) — two-column hero layout
 * ========================================================= */
.body--auth { background: #f4f6fb; min-height: 100vh; }

.auth-page {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

.auth-hero {
  position: relative;
  background:
    radial-gradient(1100px 600px at 75% 15%, rgba(99,102,241,0.35), transparent 55%),
    radial-gradient(800px 600px at 15% 90%, rgba(168,85,247,0.22), transparent 55%),
    linear-gradient(135deg, #0a0f1f 0%, #131a36 55%, #1a1f44 100%);
  color: white;
  padding: 3rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  isolation: isolate;
}
.auth-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
  z-index: -1;
}
.auth-hero__orb--one {
  width: 310px;
  height: 310px;
  top: -110px;
  right: -80px;
  border: 1px solid rgba(199,210,254,0.15);
  box-shadow: inset 0 0 80px rgba(99,102,241,0.08);
}
.auth-hero__orb--two {
  width: 180px;
  height: 180px;
  left: -75px;
  bottom: 14%;
  background: rgba(168,85,247,0.06);
  border: 1px solid rgba(216,180,254,0.1);
}
/* subtle grid pattern overlay */
.auth-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 35%, transparent 75%);
  pointer-events: none;
  z-index: -1;
}

.auth-hero__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: white;
  text-decoration: none;
  align-self: flex-start;
}
.auth-hero__brand:hover { text-decoration: none; }
.brand-name { letter-spacing: -0.015em; }
.brand-ai {
  font-size: 0.8rem;
  font-weight: 700;
  color: #c7d2fe;
  letter-spacing: 0.14em;
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(199,210,254,0.35);
  border-radius: 999px;
  margin-left: 0.25rem;
  vertical-align: 0.1em;
}

.auth-hero__body { max-width: 540px; position: relative; z-index: 1; }

.auth-hero__eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #c7d2fe;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(199,210,254,0.35);
  border-radius: 999px;
  background: rgba(99,102,241,0.12);
  margin-bottom: 1.25rem;
}

.auth-hero__title {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 1rem 0;
  color: white;
  text-transform: none;
}

.auth-hero__tagline {
  font-size: 1.05rem;
  color: #cbd5e1;
  margin: 0 0 2rem 0;
  line-height: 1.55;
}

.auth-hero__bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.auth-hero__bullets li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #e2e8f0;
  font-size: 0.95rem;
}
.auth-hero__bullets li::before {
  content: '✓';
  color: #a5b4fc;
  font-weight: 700;
  background: rgba(99,102,241,0.18);
  border: 1px solid rgba(165,180,252,0.35);
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 0.78rem;
}

.auth-hero__signal {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 2rem;
  padding: 0.85rem 1rem;
  max-width: 460px;
  border: 1px solid rgba(199,210,254,0.18);
  border-radius: 12px;
  background: rgba(15,23,42,0.34);
  box-shadow: 0 16px 40px rgba(2,6,23,0.2);
  backdrop-filter: blur(12px);
}
.auth-hero__signal-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 9px;
  color: #c7d2fe;
  background: rgba(99,102,241,0.2);
  border: 1px solid rgba(165,180,252,0.2);
}
.auth-hero__signal-icon svg { width: 18px; height: 18px; }
.auth-hero__signal-copy { display: flex; flex-direction: column; min-width: 0; }
.auth-hero__signal-copy small { color: #94a3b8; font-size: 0.69rem; letter-spacing: 0.04em; }
.auth-hero__signal-copy strong { color: #f8fafc; font-size: 0.88rem; font-weight: 600; }
.auth-hero__signal-status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #a7f3d0;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.auth-hero__signal-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52,211,153,0.1);
}

.auth-hero__footer {
  color: rgba(203,213,225,0.65);
  font-size: 0.78rem;
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.auth-hero__dot { opacity: 0.5; }

/* Right-hand form panel */
.auth-side {
  position: relative;
  background:
    radial-gradient(circle at 90% 8%, rgba(99,102,241,0.08), transparent 27%),
    linear-gradient(145deg, #f8faff 0%, #f3f5fa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  overflow-y: auto;
}
.auth-form {
  width: 100%;
  max-width: 500px;
  padding: 2.1rem 2.25rem;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(203,213,225,0.8);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15,23,42,0.1), 0 2px 8px rgba(15,23,42,0.04);
}
.auth-form__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.auth-form__back:hover { color: var(--text); text-decoration: none; }
.auth-form__intro { margin-bottom: 1.6rem; }
.auth-form__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
  padding: 0.3rem 0.6rem;
  color: #4f46e5;
  background: #eef2ff;
  border: 1px solid #dfe3ff;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.auth-form__kicker svg { width: 13px; height: 13px; }
.auth-form__title {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem 0;
  text-transform: none;
  color: var(--text);
}
.auth-form__subtitle {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}
.auth-form__switch {
  text-align: center;
  color: var(--muted);
  margin-top: 1.75rem;
  font-size: 0.9rem;
}
.auth-form .field { margin-bottom: 1rem; gap: 0.4rem; }
.auth-form .field label { color: #334155; }
.auth-control { position: relative; }
.auth-control__icon {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  width: 17px;
  height: 17px;
  color: #94a3b8;
  transform: translateY(-50%);
  pointer-events: none;
  transition: color 0.15s ease;
}
.auth-form .auth-control__input {
  min-height: 44px;
  padding: 0.7rem 0.9rem 0.7rem 2.65rem;
  border-color: #d6dce6;
  background: #fbfcfe;
  font-size: 0.94rem;
}
.auth-control:focus-within .auth-control__icon { color: var(--accent); }
.auth-form__submit {
  min-height: 46px;
  margin-top: 0.3rem;
  border-color: #5856e9;
  background: linear-gradient(135deg, #6366f1, #5552dd);
  box-shadow: 0 9px 22px rgba(79,70,229,0.2);
  font-weight: 650;
}
.auth-form__submit:hover {
  background: linear-gradient(135deg, #595cf0, #4946d2);
  box-shadow: 0 11px 26px rgba(79,70,229,0.26);
  transform: translateY(-1px);
}
.auth-assurance {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 1rem;
  padding: 0.7rem 0.8rem;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e8edf4;
  border-radius: 9px;
  font-size: 0.75rem;
  line-height: 1.45;
}
.auth-assurance svg { width: 16px; height: 16px; flex: 0 0 auto; color: #6366f1; margin-top: 1px; }
.btn--block { width: 100%; justify-content: center; padding: 0.75rem 1rem; font-size: 0.95rem; }

@media (max-width: 960px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero {
    padding: 2rem 1.75rem;
    min-height: auto;
    text-align: left;
  }
  .auth-hero__title { font-size: 1.7rem; }
  .auth-hero__tagline { font-size: 0.95rem; margin-bottom: 1.25rem; }
  .auth-hero__bullets { display: none; }
  .auth-hero__signal { display: none; }
  .auth-hero__footer { display: none; }
  .auth-side { padding: 2rem 1.5rem; }
}

@media (max-width: 560px) {
  .auth-hero { padding: 1.5rem 1.25rem; }
  .auth-hero__body { margin-top: 2rem; }
  .auth-hero__tagline { margin-bottom: 0; }
  .auth-side { padding: 1.25rem 0.85rem 2rem; align-items: flex-start; }
  .auth-form { padding: 1.5rem 1.2rem; border-radius: 14px; }
  .auth-form__back { margin-bottom: 1.2rem; }
  .auth-form__title { font-size: 1.6rem; }
  .auth-form .row { display: block; }
}

@media (min-width: 961px) and (max-height: 760px) {
  .auth-hero { padding: 2rem 2.5rem; }
  .auth-hero__title { font-size: 2.25rem; }
  .auth-hero__tagline { margin-bottom: 1.2rem; }
  .auth-hero__bullets { gap: 0.45rem; }
  .auth-hero__signal { margin-top: 1.2rem; }
  .auth-form { padding: 1.5rem 1.75rem; }
  .auth-form__back { margin-bottom: 1rem; }
  .auth-form__intro { margin-bottom: 1.1rem; }
  .auth-form .field { margin-bottom: 0.72rem; }
  .auth-assurance { margin-top: 0.7rem; padding: 0.5rem 0.7rem; }
  .auth-form__switch { margin-top: 1rem; }
}

/* =========================================================
 * New assessment creation + processing indicator
 * ========================================================= */
.assessment-create {
  width: min(880px, 100%);
  margin: 0 auto 2rem;
}
.assessment-create__header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 0.25rem 0 1.25rem;
}
.assessment-create__icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #4f46e5;
  background: #eef2ff;
  border: 1px solid #dce2ff;
  border-radius: 12px;
}
.assessment-create__icon svg { width: 23px; height: 23px; }
.assessment-create__eyebrow {
  display: block;
  margin-bottom: 0.15rem;
  color: #6366f1;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.assessment-create__header h1 { margin-bottom: 0.2rem; font-size: 1.65rem; }
.assessment-create__header p { margin: 0; color: var(--muted); }
.assessment-create__form {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--panel-elev);
}
.assessment-create__section { padding: 1.35rem 1.5rem; border-bottom: 1px solid var(--border); }
.assessment-create__section-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.assessment-create__section-heading > span {
  width: 25px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #4f46e5;
  background: #eef2ff;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 700;
}
.assessment-create__section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  letter-spacing: 0;
  text-transform: none;
}
.assessment-create__section-heading p { margin: 0.05rem 0 0; color: var(--muted); font-size: 0.75rem; }
.assessment-create__section .field:last-child { margin-bottom: 0; }
.assessment-create__upload .input { padding: 0.65rem; background: #fafbff; border-style: dashed; }
.assessment-create__upload small { margin-top: 0.15rem; }
.assessment-create__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.5rem;
  background: #fafbfc;
}
.assessment-create__submit svg { width: 16px; height: 16px; }
.assessment-create__submit:disabled { opacity: 0.7; cursor: wait; }

.is-processing-assessment { overflow: hidden; }
.creation-progress[hidden] { display: none; }
.creation-progress {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(8,15,31,0.68);
  backdrop-filter: blur(5px);
}
.creation-progress__panel {
  width: min(430px, 100%);
  padding: 2rem;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(2,6,23,0.35);
}
.creation-progress__mark {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  color: #6366f1;
  background: #eef2ff;
  border-radius: 14px;
}
.creation-progress__mark svg { width: 27px; height: 27px; animation: creation-spin 1.35s linear infinite; }
.creation-progress__eyebrow {
  display: block;
  margin-bottom: 0.25rem;
  color: #6366f1;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.creation-progress h2 { margin: 0; color: var(--text); font-size: 1.25rem; letter-spacing: -0.01em; text-transform: none; }
.creation-progress p { min-height: 21px; margin: 0.55rem 0 1rem; color: var(--text-dim); }
.creation-progress small { display: block; margin-top: 0.9rem; color: var(--muted); font-size: 0.75rem; }
.creation-progress__bar { height: 5px; overflow: hidden; background: #e9ecf5; border-radius: 999px; }
.creation-progress__bar span {
  display: block;
  width: 38%;
  height: 100%;
  background: linear-gradient(90deg, #818cf8, #4f46e5);
  border-radius: inherit;
  animation: creation-progress 1.25s ease-in-out infinite;
}
@keyframes creation-spin { to { transform: rotate(360deg); } }
@keyframes creation-progress {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(270%); }
}

@media (max-width: 680px) {
  .assessment-create__section { padding: 1.15rem 1rem; }
  .assessment-create__targets { display: block; }
  .assessment-create__actions { padding: 1rem; }
  .assessment-create__actions .btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .creation-progress__mark svg,
  .creation-progress__bar span { animation-duration: 3s; }
  .auth-form__submit:hover { transform: none; }
}

/* =========================================================
 * Public landing page
 * ========================================================= */
.body--landing {
  min-height: 100vh;
  background: #ffffff;
  color: #111827;
}

.landing-container {
  width: min(1160px, calc(100% - 3rem));
  margin: 0 auto;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(226,232,240,0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.landing-nav__inner {
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}
.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: fit-content;
  color: #111827;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.landing-brand:hover { color: #111827; text-decoration: none; }
.landing-brand svg { flex: none; filter: drop-shadow(0 5px 8px rgba(99,102,241,0.22)); }
.landing-brand small {
  margin-left: 0.16rem;
  color: var(--accent);
  font-size: 0.63rem;
  letter-spacing: 0.11em;
  vertical-align: 0.12em;
}
.landing-nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.landing-nav__links a,
.landing-link {
  color: #475569;
  font-size: 0.86rem;
  font-weight: 550;
}
.landing-nav__links a:hover,
.landing-link:hover { color: #111827; text-decoration: none; }
.landing-nav__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
}
.landing-btn {
  justify-content: center;
  border-radius: 8px;
  padding: 0.62rem 1.05rem;
  font-weight: 650;
  box-shadow: 0 5px 14px rgba(79,70,229,0.16);
}
.landing-btn--large {
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  gap: 0.7rem;
  font-size: 0.94rem;
}

.landing-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: calc(100vh - 72px);
  min-height: calc(100svh - 72px);
  padding: clamp(2.5rem, 6vh, 5rem) 0;
  background:
    radial-gradient(circle at 79% 13%, rgba(99,102,241,0.17), transparent 30%),
    radial-gradient(circle at 9% 88%, rgba(14,165,233,0.10), transparent 27%),
    linear-gradient(180deg, #fbfcff 0%, #ffffff 100%);
}
.landing-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(99,102,241,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 80%);
}
.landing-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(520px, 1.12fr);
  align-items: center;
  gap: 4.5rem;
}
.landing-eyebrow,
.landing-kicker {
  color: #4f46e5;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.4rem;
}
.landing-eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 0 5px rgba(99,102,241,0.1);
}
.landing-hero h1 {
  max-width: 640px;
  margin: 0;
  color: #0f172a;
  font-size: clamp(2.8rem, 5vw, 4.45rem);
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 1.02;
}
.landing-hero h1 > span {
  color: #4f46e5;
  background: linear-gradient(110deg, #4f46e5 8%, #6366f1 48%, #0ea5e9 105%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.landing-hero__lead {
  max-width: 590px;
  margin: 1.5rem 0 0;
  color: #536176;
  font-size: 1.08rem;
  line-height: 1.72;
}
.landing-hero__actions {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.landing-hero__signin {
  color: #475569;
  font-size: 0.86rem;
  font-weight: 550;
}
.landing-hero__signin:hover { color: var(--accent-hover); }
.landing-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.2rem;
  margin-top: 2rem;
  padding-top: 1.35rem;
  border-top: 1px solid #e8ebf2;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 550;
}
.landing-trust span { display: inline-flex; align-items: center; gap: 0.35rem; }
.landing-trust svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #16a34a;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.landing-preview-wrap {
  position: relative;
  isolation: isolate;
}
.landing-preview-wrap::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -42px -36px;
  background: radial-gradient(ellipse at center, rgba(99,102,241,0.17), transparent 68%);
  filter: blur(8px);
  pointer-events: none;
}
.landing-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid #dfe3ed;
  border-radius: 16px;
  background: white;
  box-shadow: 0 28px 70px rgba(30,41,59,0.14), 0 3px 10px rgba(30,41,59,0.06);
  transform: perspective(1200px) rotateY(-1.5deg) rotateX(0.5deg);
}
.landing-preview-badge {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 142px;
  padding: 0.58rem 0.72rem;
  border: 1px solid rgba(216,221,233,0.92);
  border-radius: 10px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 12px 30px rgba(30,41,59,0.13);
  color: #273449;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.25;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.landing-preview-badge--top { top: -24px; right: 24px; }
.landing-preview-badge--bottom { bottom: -25px; left: 28px; }
.landing-preview-badge > span:last-child { display: flex; flex-direction: column; }
.landing-preview-badge small {
  color: #8491a5;
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.landing-preview-badge__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  color: #15803d;
  background: #dcfce7;
  border-radius: 7px;
}
.landing-preview-badge__icon--blue { color: #4f46e5; background: #eef2ff; }
.landing-preview-badge__icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.landing-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 1px rgba(255,255,255,0.8);
  border-radius: inherit;
}
.landing-preview__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 1rem;
  color: #334155;
  background: #f8fafc;
  border-bottom: 1px solid #e8ebf2;
  font-size: 0.69rem;
  font-weight: 650;
}
.landing-preview__brandmark { display: flex; align-items: center; gap: 0.5rem; }
.landing-preview__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.5rem;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 999px;
}
.landing-preview__status i { width: 5px; height: 5px; border-radius: 50%; background: #0ea5e9; }
.landing-preview__body { padding: 1.3rem; }
.landing-preview__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.landing-preview__heading div { display: flex; flex-direction: column; gap: 0.18rem; }
.landing-preview__heading div span {
  color: #94a3b8;
  font-size: 0.55rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}
.landing-preview__heading strong { color: #172033; font-size: 0.92rem; }
.landing-preview__period {
  padding: 0.25rem 0.5rem;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 5px;
  font-size: 0.6rem;
  font-weight: 650;
}
.landing-preview__metrics {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0.65rem;
}
.landing-metric {
  display: flex;
  flex-direction: column;
  min-height: 104px;
  padding: 0.8rem;
  border: 1px solid #e5e9f0;
  border-radius: 9px;
  background: #fff;
}
.landing-metric--primary { background: #f2f3ff; border-color: #dfe1ff; }
.landing-metric > span { color: #64748b; font-size: 0.6rem; font-weight: 650; }
.landing-metric strong { margin-top: auto; color: #172033; font-size: 1.75rem; line-height: 1; letter-spacing: -0.04em; }
.landing-metric strong small { font-size: 0.75rem; }
.landing-metric em { margin-top: 0.38rem; color: #64748b; font-size: 0.58rem; font-style: normal; }
.landing-metric--primary em { color: #4f46e5; font-weight: 650; }
.landing-preview__lower {
  display: grid;
  grid-template-columns: 1.55fr 0.75fr;
  gap: 0.65rem;
  margin-top: 0.65rem;
}
.landing-preview__chart,
.landing-preview__review {
  padding: 0.8rem;
  border: 1px solid #e5e9f0;
  border-radius: 9px;
}
.landing-preview__section-title {
  margin-bottom: 0.7rem;
  color: #334155;
  font-size: 0.62rem;
  font-weight: 700;
}
.landing-chart-row {
  display: grid;
  grid-template-columns: 100px 1fr 28px;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.5rem;
  color: #64748b;
  font-size: 0.5rem;
}
.landing-chart-row > div { height: 5px; overflow: hidden; border-radius: 99px; background: #eef1f5; }
.landing-chart-row i { display: block; height: 100%; border-radius: inherit; }
.landing-bar--green { background: #22c55e; }
.landing-bar--indigo { background: #6366f1; }
.landing-bar--amber { background: #f59e0b; }
.landing-chart-row b { color: #475569; font-size: 0.5rem; text-align: right; }
.landing-review-stat {
  display: grid;
  grid-template-columns: 6px 1fr auto;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eef1f5;
  color: #64748b;
  font-size: 0.5rem;
}
.landing-review-stat:last-child { border-bottom: 0; }
.landing-review-stat i { width: 6px; height: 6px; border-radius: 50%; }
.landing-review-stat b { color: #334155; font-size: 0.57rem; }
.landing-dot--amber { background: #f59e0b; }
.landing-dot--red { background: #ef4444; }
.landing-dot--gray { background: #94a3b8; }

.landing-section { padding: 6rem 0; }
.landing-section__intro { max-width: 680px; margin-bottom: 2.5rem; }
.landing-section__intro h2,
.landing-workflow__copy h2,
.landing-cta h2 {
  margin: 0.65rem 0 0;
  color: #111827;
  font-size: clamp(2rem, 3vw, 2.7rem);
  font-weight: 740;
  letter-spacing: -0.04em;
  line-height: 1.12;
  text-transform: none;
}
.landing-section__intro p,
.landing-workflow__copy > p {
  margin: 1rem 0 0;
  color: #64748b;
  font-size: 1rem;
  line-height: 1.7;
}
.landing-capabilities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.landing-capability {
  min-height: 250px;
  padding: 1.6rem;
  border: 1px solid #e4e8ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,0.025);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.landing-capability:hover {
  transform: translateY(-3px);
  border-color: #d4d7ff;
  box-shadow: 0 16px 35px rgba(30,41,59,0.08);
}
.landing-capability__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 2.6rem;
  color: #4f46e5;
  background: #eef2ff;
  border-radius: 9px;
}
.landing-capability__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.landing-capability h3 {
  margin: 0;
  color: #1e293b;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-transform: none;
}
.landing-capability p { margin: 0.75rem 0 0; color: #64748b; font-size: 0.9rem; line-height: 1.65; }

.landing-workflow { padding: 5.5rem 0; background: #f7f8fc; border-block: 1px solid #e9ebf2; }
.landing-workflow__inner { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 6rem; align-items: center; }
.landing-steps { margin: 0; padding: 0; list-style: none; }
.landing-steps li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid #dfe4ec;
}
.landing-steps li:first-child { padding-top: 0; }
.landing-steps li:last-child { padding-bottom: 0; border-bottom: 0; }
.landing-steps li > span { color: #6366f1; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 0.73rem; font-weight: 700; }
.landing-steps strong { display: block; color: #1e293b; font-size: 1rem; }
.landing-steps p { margin: 0.35rem 0 0; color: #64748b; font-size: 0.88rem; }

.landing-cta { padding: 4.75rem 0; background: #10172a; }
.landing-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 3rem; }
.landing-cta .landing-kicker { color: #a5b4fc; }
.landing-cta h2 { max-width: 700px; color: white; }
.landing-cta__actions { display: flex; align-items: center; gap: 1.2rem; flex: none; }
.landing-cta__actions > a:not(.btn) { color: #cbd5e1; font-size: 0.86rem; font-weight: 600; }
.landing-btn--light { color: #3730a3; background: white; border-color: white; box-shadow: 0 8px 22px rgba(0,0,0,0.18); }
.landing-btn--light:hover { color: #312e81; background: #eef2ff; border-color: #eef2ff; }

.landing-footer { padding: 2rem 0; background: #0b1020; border-top: 1px solid rgba(255,255,255,0.07); }
.landing-footer__inner { display: flex; align-items: center; gap: 2rem; color: #7f8ca3; font-size: 0.75rem; }
.landing-footer__inner p { margin: 0; }
.landing-footer__inner > span { margin-left: auto; }
.landing-brand--footer { color: white; font-size: 0.9rem; }
.landing-brand--footer:hover { color: white; }

@media (max-width: 1020px) {
  .landing-nav__inner { grid-template-columns: 1fr auto; }
  .landing-nav__links { display: none; }
  .landing-hero { min-height: auto; padding: 5rem 0; }
  .landing-hero__grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .landing-hero__content { max-width: 720px; }
  .landing-preview-wrap { max-width: 720px; }
  .landing-preview { transform: none; }
  .landing-workflow__inner { gap: 3.5rem; }
}

@media (max-width: 720px) {
  .landing-container { width: min(100% - 2rem, 1160px); }
  .landing-nav__inner { min-height: 64px; }
  .landing-brand { font-size: 0.9rem; }
  .landing-nav__actions .landing-link { display: none; }
  .landing-nav__actions { gap: 0.5rem; }
  .landing-btn { padding: 0.56rem 0.78rem; font-size: 0.8rem; }
  .landing-hero { padding: 4rem 0; }
  .landing-hero h1 { font-size: clamp(2.55rem, 12vw, 3.4rem); }
  .landing-hero__lead { font-size: 1rem; }
  .landing-hero__actions { align-items: flex-start; flex-direction: column; }
  .landing-btn--large { width: 100%; font-size: 0.9rem; }
  .landing-trust { flex-direction: column; }
  .landing-preview { border-radius: 12px; }
  .landing-preview-badge { display: none; }
  .landing-preview__body { padding: 0.8rem; }
  .landing-preview__metrics { grid-template-columns: 1fr 1fr; }
  .landing-metric--primary { grid-column: 1 / -1; }
  .landing-preview__lower { grid-template-columns: 1fr; }
  .landing-preview__review { display: none; }
  .landing-chart-row { grid-template-columns: 84px 1fr 26px; }
  .landing-section { padding: 4rem 0; }
  .landing-capabilities { grid-template-columns: 1fr; }
  .landing-capability { min-height: 0; }
  .landing-capability__icon { margin-bottom: 1.7rem; }
  .landing-workflow { padding: 4rem 0; }
  .landing-workflow__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .landing-cta { padding: 3.5rem 0; }
  .landing-cta__inner { align-items: flex-start; flex-direction: column; gap: 2rem; }
  .landing-cta__actions { width: 100%; }
  .landing-cta__actions .btn { flex: 1; }
  .landing-footer__inner { align-items: flex-start; flex-direction: column; gap: 0.8rem; }
  .landing-footer__inner > span { margin-left: 0; }
}

@media (min-width: 1021px) and (max-height: 760px) {
  .landing-hero { padding: 2.25rem 0; }
  .landing-hero h1 { font-size: clamp(3rem, 4.3vw, 3.5rem); }
  .landing-eyebrow { margin-bottom: 1rem; }
  .landing-hero__lead { margin-top: 1.1rem; line-height: 1.6; }
  .landing-hero__actions { margin-top: 1.45rem; }
  .landing-trust { margin-top: 1.4rem; padding-top: 1rem; }
  .landing-preview-badge--top { top: -18px; }
  .landing-preview-badge--bottom { bottom: -18px; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-capability { transition: none; }
}

/* =========================================================
 * Flash messages
 * ========================================================= */
.flash { list-style: none; padding: 0; margin: 0 0 1rem 0; }
.flash li {
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 0.9rem;
}
.flash--success { border-color: var(--success); color: #14532d; background: var(--success-bg); }
.flash--error, .flash--danger { border-color: var(--error); color: #7f1d1d; background: var(--error-bg); }
.flash--info { border-color: var(--info); color: #0c4a6e; background: var(--info-bg); }
.flash--warning { border-color: var(--warn); color: #78350f; background: var(--warn-bg); }

/* =========================================================
 * Cards
 * ========================================================= */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
  box-shadow: var(--panel-elev);
}
.card--narrow { max-width: 460px; margin: 1rem auto; padding: 1.75rem; }
.card h1 { font-size: 1.4rem; margin-bottom: 1rem; }

/* =========================================================
 * Forms
 * ========================================================= */
.field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.85rem; color: var(--text-dim); }
.input, .select, textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.9rem;
  background: white;
  color: var(--text);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.input:focus, .select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea { min-height: 90px; resize: vertical; font-family: inherit; }
small.error { color: var(--error); }

/* =========================================================
 * Buttons
 * ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: white;
  text-decoration: none;
  border: 1px solid var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: white; text-decoration: none; }
.btn:focus-visible { box-shadow: 0 0 0 3px var(--accent-glow); }
.btn--ghost { background: white; color: var(--text-dim); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--neutral-bg); color: var(--text); border-color: var(--border-strong); }
.btn--danger { background: var(--error); border-color: var(--error); }
.btn--danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn--sm { padding: 0.32rem 0.7rem; font-size: 0.8rem; }

/* =========================================================
 * Tables
 * ========================================================= */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  font-size: 0.88rem;
}
.table th, .table td { padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th {
  background: #fafbfc;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.table tr:hover { background: #fafbfc; }
.table--bordered {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--panel-elev);
}
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* =========================================================
 * Tabs
 * ========================================================= */
.tabs {
  display: flex;
  gap: 0.15rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}
.tabs a {
  padding: 0.75rem 1rem;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
}
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.active { color: var(--accent); border-color: var(--accent); font-weight: 600; }

/* =========================================================
 * Status pills
 * ========================================================= */
.pill {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}
.pill--compliant     { background: var(--success-bg); color: #14532d; border-color: rgba(22,163,74,0.25); }
.pill--notcompliant  { background: var(--error-bg);   color: #7f1d1d; border-color: rgba(220,38,38,0.25); }
.pill--needreview    { background: var(--warn-bg);    color: #78350f; border-color: rgba(217,119,6,0.25); }
.pill--na            { background: var(--neutral-bg); color: var(--neutral); border-color: var(--border-strong); }
.pill--draft         { background: var(--neutral-bg); color: var(--neutral); }
.pill--in_review     { background: var(--info-bg);    color: #0c4a6e; }
.pill--final         { background: var(--success-bg); color: #14532d; }
.pill--open          { background: var(--neutral-bg); color: var(--neutral); }
.pill--in_progress   { background: var(--info-bg);    color: #0c4a6e; }
.pill--blocked       { background: var(--error-bg);   color: #7f1d1d; }
.pill--complete      { background: var(--success-bg); color: #14532d; }
.pill--validated     { background: var(--success-bg); color: #14532d; }
.pill--critical      { background: var(--error-bg);   color: #7f1d1d; }
.pill--high          { background: var(--warn-bg);    color: #78350f; }
.pill--medium        { background: var(--info-bg);    color: #0c4a6e; }
.pill--low           { background: var(--neutral-bg); color: var(--neutral); }

/* Disposition pills — what to do about a finding */
.pill--disp           { font-weight: 500; }
.pill--disp-remediate { background: var(--warn-bg);    color: #78350f; border-color: rgba(217,119,6,0.25); }
.pill--disp-reframe   { background: var(--info-bg);    color: #0c4a6e; border-color: rgba(2,132,199,0.25); }
.pill--disp-accept    { background: var(--neutral-bg); color: var(--neutral); border-color: var(--border-strong); }
.pill--disp-map       { background: #ede9fe;           color: #4c1d95; border-color: rgba(124,58,237,0.25); }
.pill--disp-retire    { background: #fce7f3;           color: #831843; border-color: rgba(219,39,119,0.25); }

/* Legacy CAT-only badge — appears next to mapping number */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.badge--legacy {
  background: #fef3c7;
  color: #78350f;
  border: 1px solid rgba(217,119,6,0.3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Side-by-side field layout inside the validation modal */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.field-row .field { margin-bottom: 0; }

/* Audit traceability group inside validation modal */
.audit-fields {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem 0.85rem;
  margin: 0.75rem 0;
  background: var(--neutral-bg);
}
.audit-fields legend {
  padding: 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =========================================================
 * Hero card (top of Overview)
 * ========================================================= */
.hero-card {
  position: relative;
  background:
    radial-gradient(800px 400px at 100% 0%, rgba(99,102,241,0.18), transparent 50%),
    radial-gradient(600px 400px at 0% 100%, rgba(168,85,247,0.12), transparent 50%),
    linear-gradient(135deg, #0f1830 0%, #1a2348 60%, #1e2a55 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15,23,42,0.12);
}
.hero-card::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.hero-card__gauge { display: flex; justify-content: center; }
.hero-card__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.25rem;
}
.hero-stat { display: flex; flex-direction: column; gap: 0.15rem; }
.hero-stat__label {
  color: #c7d2fe;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.hero-stat__value {
  font-size: 1.65rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.hero-stat__sub { color: #94a3b8; font-size: 0.78rem; }
.hero-stat__sub .overdue { color: #fca5a5; font-weight: 600; }

/* Gauge ring */
.gauge { width: 150px; height: 150px; }
.gauge__track { fill: none; stroke: rgba(255,255,255,0.1); stroke-width: 10; }
.gauge__fill {
  fill: none;
  stroke: url(#gaugeGrad, #6366f1) #6366f1;
  stroke: #818cf8;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  transition: stroke-dashoffset 0.8s cubic-bezier(.2,.8,.2,1);
}
.gauge__num {
  font-family: "Inter", sans-serif;
  fill: white; font-size: 18px; font-weight: 700; letter-spacing: -0.02em;
}
.gauge__lbl {
  font-family: "Inter", sans-serif;
  fill: #c7d2fe; font-size: 6px; text-transform: uppercase; letter-spacing: 0.15em; font-weight: 600;
}

@media (max-width: 800px) {
  .hero-card { grid-template-columns: 1fr; padding: 1.25rem; }
}

/* =========================================================
 * KPI tiles
 * ========================================================= */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--panel-elev);
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--border-strong);
  transition: background 0.12s ease;
}
.kpi:hover {
  border-color: var(--border);
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: var(--panel-elev-hover);
}
.kpi--accent::before  { background: var(--accent); }
.kpi--success::before { background: var(--success); }
.kpi--danger::before  { background: var(--error); }
.kpi--warn::before    { background: var(--warn); }
.kpi:hover::before { background: var(--accent); }
.kpi--success:hover::before { background: var(--success); }
.kpi--danger:hover::before  { background: var(--error); }
.kpi--warn:hover::before    { background: var(--warn); }

.kpi__icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--neutral-bg);
  color: var(--muted);
  flex-shrink: 0;
}
.kpi__icon svg { width: 18px; height: 18px; stroke-linecap: round; stroke-linejoin: round; }
.kpi--accent  .kpi__icon { background: var(--accent-soft); color: var(--accent); }
.kpi--success .kpi__icon { background: var(--success-bg); color: var(--success); }
.kpi--danger  .kpi__icon { background: var(--error-bg);   color: var(--error); }
.kpi--warn    .kpi__icon { background: var(--warn-bg);    color: var(--warn); }

.kpi__label {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}
.kpi__value {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 0.15rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.kpi__sub { font-size: 0.74rem; color: var(--muted); margin-top: 0.15rem; }

/* =========================================================
 * Charts
 * ========================================================= */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.chart-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--panel-elev);
}
.chart-canvas-wrap { position: relative; height: 280px; }
.chart-canvas-wrap canvas { max-height: 280px !important; }

/* =========================================================
 * Tier ladder
 * ========================================================= */
.tier-ladder {
  display: flex;
  gap: 0.5rem;
}
.tier-step {
  flex: 1;
  text-align: center;
  padding: 0.75rem 0.3rem;
  border-radius: var(--radius);
  background: var(--neutral-bg);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  transition: background 0.12s ease, color 0.12s ease;
}
.tier-step__num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.tier-step__name { font-weight: 500; }
.tier-step--achieved {
  background: linear-gradient(180deg, var(--success-bg) 0%, #bbf7d0 100%);
  color: #14532d;
  border-color: rgba(22,163,74,0.4);
  font-weight: 600;
}
.tier-step--achieved .tier-step__num { background: var(--success); color: white; }
.tier-step--target { outline: 2px dashed var(--accent); outline-offset: -2px; }

/* =========================================================
 * Domain progress (CAT D1-D5 horizontal bars)
 * ========================================================= */
.domain-grid {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.domain-row {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: background 0.12s ease;
}
.domain-row:hover { background: var(--neutral-bg); text-decoration: none; }
.domain-row__top {
  display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem;
}
.domain-row__code {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  letter-spacing: 0.04em;
}
.domain-row__label { color: var(--text); font-weight: 500; flex: 1; }
.domain-row__pct { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.domain-row__bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--neutral-bg);
}
.domain-row__seg { display: block; height: 100%; }
.domain-row__seg--compliant    { background: var(--success); }
.domain-row__seg--needreview   { background: var(--warn); }
.domain-row__seg--notcompliant { background: var(--error); }
.domain-row__seg--na           { background: #cbd5e1; }
.domain-row__legend {
  display: flex; gap: 0.8rem; flex-wrap: wrap;
  font-size: 0.75rem; color: var(--muted);
  margin-top: 0.45rem;
}
.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 0.35rem; vertical-align: 0.05em;
}
.dot--success  { background: var(--success); }
.dot--warn     { background: var(--warn); }
.dot--error    { background: var(--error); }
.dot--neutral  { background: #cbd5e1; }

/* =========================================================
 * Readiness (Perez) — hero card + domain scorecard
 * ========================================================= */
.readiness-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.25rem;
}
.readiness-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.readiness-card__scale {
  display: flex;
  gap: 0.35rem;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--muted);
}
.readiness-card__scale span {
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 3px;
}
.readiness-card__scale span:first-child { background: #fee2e2; color: #7f1d1d; border-color: transparent; }
.readiness-card__scale span:nth-child(2) { background: #fed7aa; color: #7c2d12; border-color: transparent; }
.readiness-card__scale span:nth-child(3) { background: #fef3c7; color: #78350f; border-color: transparent; }
.readiness-card__scale span:nth-child(4) { background: #d9f99d; color: #365314; border-color: transparent; }
.readiness-card__scale span:last-child  { background: #bbf7d0; color: #14532d; border-color: transparent; }

.readiness-card__body {
  display: grid;
  grid-template-columns: minmax(220px, 260px) 1fr;
  gap: 1.5rem;
  align-items: center;
}
.readiness-gauge svg { width: 100%; height: auto; max-width: 260px; }
.gauge--wide .gauge__track { stroke: #e5e7eb; }
.gauge--wide .gauge__num--large { font-size: 22px; font-weight: 700; fill: var(--text); letter-spacing: -0.02em; }
.gauge__fill--grade-a { stroke: #22c55e; }
.gauge__fill--grade-b { stroke: #84cc16; }
.gauge__fill--grade-c { stroke: #eab308; }
.gauge__fill--grade-d { stroke: #f97316; }
.gauge__fill--grade-f { stroke: #ef4444; }

.readiness-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}
.readiness-stat {
  padding: 0.85rem 1rem;
  background: var(--neutral-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.readiness-stat__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.readiness-stat__value { font-size: 1.35rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.readiness-stat__grade {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}
.readiness-stat__sub {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted);
}

/* Grade → background tint (used on grade tile + domain tiles) */
.grade-bg-a { background: #dcfce7; border-color: rgba(22,163,74,0.35); color: #14532d; }
.grade-bg-b { background: #ecfccb; border-color: rgba(132,204,22,0.4); color: #365314; }
.grade-bg-c { background: #fef9c3; border-color: rgba(202,138,4,0.35); color: #713f12; }
.grade-bg-d { background: #ffedd5; border-color: rgba(234,88,12,0.4); color: #7c2d12; }
.grade-bg-f { background: #fee2e2; border-color: rgba(220,38,38,0.4); color: #7f1d1d; }

.hero-stat__grade-inline {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.05rem 0.4rem;
  font-size: 0.85rem;
  font-weight: 800;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  vertical-align: 0.15em;
}

.readiness-domains { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px dashed var(--border); }
.domain-scorecard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.7rem;
}
.domain-tile {
  display: block;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.domain-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15,23,42,0.08);
  text-decoration: none;
}
.domain-tile__code {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  opacity: 0.9;
}
.domain-tile__label {
  font-size: 0.72rem;
  color: inherit;
  opacity: 0.75;
  margin-bottom: 0.35rem;
  line-height: 1.2;
  min-height: 1.7em;
}
.domain-tile__score {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  display: inline-block;
}
.domain-tile__grade {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  background: rgba(255,255,255,0.55);
  vertical-align: 0.3em;
}
.domain-tile__meta {
  margin-top: 0.4rem;
  font-size: 0.7rem;
  opacity: 0.75;
}
.domain-tile--empty { background: var(--neutral-bg); }

/* =========================================================
 * CRI-Objective Heatmap (on Overview)
 * ========================================================= */
.heatmap-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.heatmap-legend {
  display: flex; gap: 0.85rem; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--muted);
}
.heatmap-legend__item { display: inline-flex; align-items: center; gap: 0.35rem; }
.heatmap-swatch {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.08);
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}
.heatmap-col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.heatmap-col__head {
  display: flex; align-items: baseline; gap: 0.4rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--border-strong);
  margin-bottom: 0.25rem;
}
.heatmap-col__code {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.heatmap-col__label {
  font-size: 0.78rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.heatmap-col__cells {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.heatmap-cell {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.heatmap-cell:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15,23,42,0.08);
  text-decoration: none;
}
.heatmap-cell__top {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.heatmap-cell__code { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.heatmap-cell__pct  { font-variant-numeric: tabular-nums; }
.heatmap-cell__bar {
  display: flex;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.55);
}
.heatmap-cell__seg { display: block; height: 100%; }
.heatmap-cell__seg--compliant    { background: var(--success); }
.heatmap-cell__seg--needreview   { background: var(--warn); }
.heatmap-cell__seg--notcompliant { background: var(--error); }
.heatmap-cell__seg--na           { background: #cbd5e1; }
.heatmap-cell__meta {
  display: flex; justify-content: space-between;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.4rem;
}
.heatmap-cell__legacy {
  color: #92400e;
  font-weight: 600;
}

/* Verdict colors (cell backgrounds) */
.heatmap-cell--supported {
  background: #dcfce7;
  border-color: rgba(22,163,74,0.35);
}
.heatmap-cell--partial {
  background: #fef3c7;
  border-color: rgba(217,119,6,0.35);
}
.heatmap-cell--unsupported {
  background: #fee2e2;
  border-color: rgba(220,38,38,0.35);
}
.heatmap-cell--legacy {
  background: #f1f5f9;
  border-color: var(--border-strong);
  color: var(--neutral);
}

/* =========================================================
 * Action Log (review decisions)
 * ========================================================= */
.action-kinds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0 0.25rem;
}
.action-kind {
  display: block;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: white;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.1s ease, transform 0.08s ease;
}
.action-kind:hover { border-color: var(--accent); transform: translateY(-1px); text-decoration: none; }
.action-kind.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.action-kind__count {
  font-size: 1.8rem; font-weight: 700; line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.action-kind__label { font-weight: 600; margin-top: 0.3rem; color: var(--text); }
.action-kind__hint { color: var(--muted); font-size: 0.78rem; margin-top: 0.25rem; line-height: 1.35; }

.action-kind--evidence-gap .action-kind__count { color: #b45309; }
.action-kind--legacy-disposition .action-kind__count { color: #6b7280; }
.action-kind--unclassified-no .action-kind__count { color: #b91c1c; }

.action-list { display: flex; flex-direction: column; gap: 0.85rem; margin-top: 1rem; }
.action-item {
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
}
.action-item--decided   { opacity: 0.7; border-left-color: var(--success); }
.action-item--dismissed { opacity: 0.6; border-left-color: var(--neutral); }

.action-item__head {
  display: flex; gap: 0.6rem; align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.action-item__kind {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.action-item__kind--evidence-gap        { background: #fef3c7; color: #78350f; }
.action-item__kind--legacy-disposition  { background: #e5e7eb; color: #374151; }
.action-item__kind--unclassified-no     { background: #fee2e2; color: #991b1b; }

.action-item__title { font-weight: 600; flex: 1; }
.action-item__status { margin-left: auto; }
.pill--open { background: var(--accent-soft); color: var(--accent); }
.pill--decided { background: var(--success-bg); color: #14532d; }
.pill--dismissed { background: var(--neutral-bg); color: var(--neutral); }

.action-item__desc {
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--neutral-bg);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  margin: 0 0 0.5rem 0;
  line-height: 1.45;
}

.action-item__decision {
  font-size: 0.85rem;
  padding: 0.45rem 0.7rem;
  background: var(--success-bg);
  border-radius: var(--radius-sm);
  margin-bottom: 0.55rem;
}

.action-item__form { display: flex; flex-direction: column; gap: 0.45rem; }
.action-item__form textarea {
  width: 100%; box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.88rem;
  resize: vertical;
}
.action-item__actions {
  display: flex; gap: 0.5rem; justify-content: flex-end; align-items: center;
}

/* =========================================================
 * POA&M mini grid + Focus list (on Overview)
 * ========================================================= */
.poam-mini {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
.poam-mini__cell {
  background: var(--neutral-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  text-align: left;
}
.poam-mini__label { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.poam-mini__num { font-size: 1.4rem; font-weight: 700; color: var(--text); margin-top: 0.25rem; letter-spacing: -0.02em; }

.focus-list { list-style: none; padding: 0; margin: 0; }
.focus-list li {
  display: grid;
  grid-template-columns: 100px 1fr 95px;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  align-items: baseline;
}
.focus-list li:last-child { border-bottom: 0; }
.focus-list__id {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.focus-list__text { color: var(--text); }
.focus-list__cri  {
  color: var(--muted); font-size: 0.78rem; text-align: right;
  font-variant-numeric: tabular-nums;
}

/* =========================================================
 * Filter bar
 * ========================================================= */
.filter-bar {
  display: flex;
  gap: 0.55rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.filter-bar .input, .filter-bar .select { flex: 1; min-width: 150px; }

/* =========================================================
 * Modals (HTMX-driven)
 * ========================================================= */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(11, 18, 36, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.modal {
  background: var(--panel);
  border-radius: var(--radius);
  max-width: 720px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 20px 50px rgba(11,18,36,0.35), 0 0 0 1px var(--border);
}
.modal__title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.modal__title h2 { margin: 0; color: var(--text); text-transform: none; font-size: 1.05rem; letter-spacing: 0; }
.modal__close {
  background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--muted);
  width: 32px; height: 32px; border-radius: 6px;
}
.modal__close:hover { background: var(--neutral-bg); color: var(--text); }

/* =========================================================
 * Page header
 * ========================================================= */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-header h1 { margin: 0; }

/* =========================================================
 * Assessment detail summary header
 * ========================================================= */
.assessment-summary { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.assessment-summary__meta { color: var(--muted); font-size: 0.88rem; }

/* =========================================================
 * Misc utilities
 * ========================================================= */
.overdue { color: var(--error); font-weight: 600; }
.finding-row--alternate { background: #fbfbfd; color: var(--muted); }
.finding-row--alternate td { font-size: 0.82rem; }
.truncate { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  .body--app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; flex-direction: row; flex-wrap: wrap; }
  .sidebar__footer { margin-top: 0; padding-top: 0; border-top: 0; margin-left: auto; }
  .main { padding: 1rem; }
  .chart-grid { grid-template-columns: 1fr; }
}
