/* ==========================================================================
   Security gap assessment page (/security-assessment).
   Builds on e8.css (guide layout) and vciso.css (table, .vc-sr).
   Framework picker = CSS-only radio tabs; scorecard bars use classes
   (the site's CSP blocks inline style attributes).
   ========================================================================== */

/* Framework picker ------------------------------------------------------- */
.sa-picker { margin-top: 26px; padding: 26px; border-radius: 22px; background: var(--navy); }
.sa-options { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sa-in { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sa-opt {
    padding: 11px 16px; border-radius: 12px; background: #16293f; color: #d6dee8;
    font-size: 14px; font-weight: 600; line-height: 1.35; cursor: pointer; transition: background .15s ease;
}
.sa-opt:hover { background: #1d3550; }
.sa-in:checked + .sa-opt { background: var(--orange); color: var(--white); }
.sa-in:focus-visible + .sa-opt { outline: 3px solid var(--cream); outline-offset: 2px; }
.sa-panels { flex-basis: 100%; margin-top: 8px; }
.sa-panel { display: none; padding: 24px 26px; border-radius: 16px; background: var(--cream); color: var(--ink); }
.sa-panel-kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #a8470f; }
.sa-panel h3 { margin-top: 6px; font-size: 22px; line-height: 1.3; color: var(--ink); }
.sa-panel p:last-child { margin-top: 10px; line-height: 1.6; color: var(--text); }
.sa-panel a { color: var(--blue-600); font-weight: 600; text-underline-offset: 3px; }
#fw-nist:checked ~ .sa-panels .sa-panel--nist,
#fw-e8:checked ~ .sa-panels .sa-panel--e8,
#fw-iso:checked ~ .sa-panels .sa-panel--iso,
#fw-ism:checked ~ .sa-panels .sa-panel--ism,
#fw-client:checked ~ .sa-panels .sa-panel--client { display: block; }

/* Areas ------------------------------------------------------------------ */
.sa-areas { list-style: none; padding: 0; margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: area; }
.sa-areas li { counter-increment: area; position: relative; padding: 18px 18px 18px 58px; border-radius: 14px; background: #f4f6f9; }
.sa-areas li::before {
    content: counter(area, decimal-leading-zero); position: absolute; left: 16px; top: 18px;
    font-weight: 700; font-size: 15px; color: #c4541a; font-variant-numeric: tabular-nums;
}
.sa-areas h3 { font-size: 16px; line-height: 1.3; color: var(--ink); }
.sa-areas p { margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--slate); }
.sa-areas li:nth-child(-n+3) { background: var(--cream); }

/* Scorecard -------------------------------------------------------------- */
.sa-card { margin: 28px 0 0; padding: 26px 28px 22px; border-radius: 22px; background: var(--white); box-shadow: 0 30px 60px -36px rgba(13, 27, 43, .45), 0 0 0 1px #eef1f5; }
.sa-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sa-card-title { font-size: 18px; font-weight: 700; color: var(--ink); }
.sa-card-badge { padding: 4px 12px; border-radius: 999px; background: var(--navy); color: var(--cream); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sa-legend { margin-top: 10px; display: flex; gap: 18px; font-size: 13px; color: var(--slate); }
.sa-key { display: inline-flex; align-items: center; gap: 8px; }
.sa-key::before { content: ""; width: 18px; height: 10px; border-radius: 4px; }
.sa-key--now::before { background: var(--blue-600); }
.sa-key--target::before { width: 4px; height: 16px; border-radius: 2px; background: var(--orange); }
.sa-bars { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 14px; }
.sa-bars li { display: grid; grid-template-columns: 90px minmax(0, 1fr) 54px; align-items: center; gap: 14px; }
.sa-bar-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.sa-track { position: relative; height: 14px; border-radius: 7px; background: #eef1f5; }
.sa-now { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; background: var(--blue-600); }
.sa-target { position: absolute; top: -5px; bottom: -5px; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--orange); }
.sa-val { font-size: 14px; font-weight: 600; color: var(--slate); text-align: right; font-variant-numeric: tabular-nums; }
.sa-n1 .sa-now { width: 20%; } .sa-n2 .sa-now { width: 40%; } .sa-n3 .sa-now { width: 60%; } .sa-n4 .sa-now { width: 80%; }
.sa-t3 .sa-target { left: 60%; } .sa-t4 .sa-target { left: 80%; }
.sa-card figcaption { margin-top: 18px; font-size: 13px; color: var(--slate); }
.page-sa .e8-deliverables { margin-top: 18px; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1060px) {
    .sa-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .sa-picker { padding: 18px 14px; border-radius: 16px; }
    .sa-opt { flex-basis: 100%; }
    .sa-areas { grid-template-columns: minmax(0, 1fr); }
    .sa-card { padding: 20px 16px; }
    .sa-bars li { grid-template-columns: 72px minmax(0, 1fr) 46px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .sa-opt { transition: none; }
}
