/* Samatech CMMC — simple, accessible (WCAG 2.1 AA) styles. No inline styles anywhere (strict CSP). */
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("../fonts/Poppins-Regular.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("../fonts/Poppins-Medium.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("../fonts/Poppins-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("../fonts/Poppins-Bold.ttf") format("truetype"); }

:root {
  --navy: #0a2a7a;
  --blue: #0039a8;
  --blue-dark: #002c85;
  --blue-50: #eef3ff;
  --text: #2b2f36;
  --muted: #586070;          /* 6.6:1 on white */
  --line: #dfe4ee;
  --bg: #f6f8fc;
  --white: #ffffff;
  --green: #15703c;          /* 6.2:1 */
  --green-50: #e8f6ee;
  --red: #b42318;            /* 6.3:1 */
  --red-50: #fdeceb;
  --amber: #8a5300;          /* 6.0:1 */
  --amber-50: #fff4e0;
  --focus: #ffbf47;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px;
       line-height: 1.6; color: var(--text); background: var(--bg); }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { color: var(--navy); line-height: 1.25; margin: 0 0 .6rem; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 .9rem; }
ul { padding-left: 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* ---------- header & footer ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.bar { max-width: 1080px; margin: 0 auto; padding: .75rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 44px; width: auto; display: block; }
.nav { margin-left: auto; display: flex; align-items: center; gap: .25rem 1rem; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; min-height: 44px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); text-decoration: underline; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 .8rem; font-size: .85rem; font-weight: 600; color: var(--navy); text-decoration: none; }
.lang a[aria-current="true"] { background: var(--navy); color: #fff; }
.linkbtn { background: none; border: 0; min-height: 44px; padding: 0; font: inherit; font-weight: 500; color: var(--text); cursor: pointer; }
.linkbtn:hover { color: var(--blue); text-decoration: underline; }

main { max-width: 1080px; margin: 0 auto; padding: 1.75rem 1rem 3rem; }
.narrow { max-width: 640px; margin: 0 auto; }

.site-footer { background: var(--white); border-top: 1px solid var(--line); margin-top: 2rem; }
.site-footer .bar { flex-direction: column; align-items: flex-start; gap: .6rem; padding: 1.5rem 1rem; }
.disclaimer { background: var(--blue-50); border-left: 4px solid var(--blue); padding: .75rem 1rem; border-radius: 8px;
              font-size: .875rem; color: var(--navy); width: 100%; }
.footer-links { display: flex; gap: .2rem 1.25rem; flex-wrap: wrap; font-size: .875rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 40px; }
.powered a { display: inline-block; padding: .55rem 0; }
.powered { font-size: .875rem; color: var(--muted); }
.powered a { font-weight: 600; }

/* ---------- building blocks ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: .75rem; }
.grow { flex: 1 1 14rem; }
.mt { margin-top: 1rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px;
       padding: .55rem 1.2rem; border-radius: 10px; border: 2px solid var(--blue); background: var(--blue);
       color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn.secondary { background: #fff; color: var(--blue); }
.btn.secondary:hover { background: var(--blue-50); color: var(--blue-dark); }
.btn.danger { background: #fff; color: var(--red); border-color: var(--red); }
.btn.small { min-height: 36px; padding: .3rem .8rem; font-size: .875rem; }
.btn.big { font-size: 1.1rem; padding: .8rem 1.6rem; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }

.big-number { font-size: 2.4rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.progress { height: 12px; background: #e3e8f2; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.progress.ok > span { background: var(--green); }
/* widths are set with classes (no inline styles under CSP) */
.w0{width:0}.w5{width:5%}.w10{width:10%}.w15{width:15%}.w20{width:20%}.w25{width:25%}.w30{width:30%}.w35{width:35%}
.w40{width:40%}.w45{width:45%}.w50{width:50%}.w55{width:55%}.w60{width:60%}.w65{width:65%}.w70{width:70%}.w75{width:75%}
.w80{width:80%}.w85{width:85%}.w90{width:90%}.w95{width:95%}.w100{width:100%}

.tag { display: inline-block; padding: .15rem .65rem; border-radius: 99px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.tag.met, .tag.ready, .tag.collected, .tag.reviewed, .tag.low { background: var(--green-50); color: var(--green); }
.tag.not_met, .tag.high { background: var(--red-50); color: var(--red); }
.tag.pending, .tag.missing { background: #eef1f6; color: var(--muted); }
.tag.medium, .tag.na { background: var(--amber-50); color: var(--amber); }
.tag.demo { background: #fff0f6; color: #8a1050; }

.flash { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 500; }
.flash.ok { background: var(--green-50); color: var(--green); }
.flash.error { background: var(--red-50); color: var(--red); }
.flash.info { background: var(--blue-50); color: var(--navy); }
.notice { background: var(--amber-50); color: var(--amber); padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; }

/* organization sub-navigation: large tappable pills; "Get help" stands out */
.subnav { display: flex; gap: .5rem; flex-wrap: wrap; }
.subnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border: 1.5px solid var(--line);
            border-radius: 999px; background: #fff; color: var(--text); font-weight: 600; text-decoration: none; }
.subnav a:hover, .subnav a[aria-current="page"] { border-color: var(--blue); color: var(--blue); }
.subnav a.help { background: var(--blue); border-color: var(--blue); color: #fff; }
.subnav a.help:hover, .subnav a.help[aria-current="page"] { background: var(--blue-dark); color: #fff; }

/* ---------- forms ---------- */
label, legend { font-weight: 600; color: var(--text); }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.hint { font-size: .85rem; color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=date], select, textarea {
  font: inherit; font-size: 1rem; padding: .6rem .75rem; border: 1.5px solid #b9c2d3; border-radius: 10px; background: #fff;
  color: var(--text); width: 100%; min-height: 44px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--blue); }
textarea { min-height: 80px; resize: vertical; }
.check { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .75rem; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: .2rem; flex: none; accent-color: var(--blue); }
fieldset { border: 0; padding: 0; margin: 0; }

/* objective answers: large tappable radio choices */
.objective { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; background: #fff; }
.objective legend { font-size: 1.05rem; margin-bottom: .5rem; padding: 0; }
.choices { display: flex; gap: .5rem; flex-wrap: wrap; margin: .6rem 0; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: inline-block; padding: .55rem 1rem; border: 2px solid #b9c2d3; border-radius: 10px; cursor: pointer;
               font-weight: 600; min-height: 44px; }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice input:checked + span { border-color: var(--blue); background: var(--blue-50); color: var(--navy); }
.choice.met input:checked + span { border-color: var(--green); background: var(--green-50); color: var(--green); }
.choice.not_met input:checked + span { border-color: var(--red); background: var(--red-50); color: var(--red); }
details { margin-top: .4rem; }
summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.official { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: .75rem; margin: .5rem 0; }

/* ---------- lists & tables ---------- */
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.task { display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; align-items: start; padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.task.done .title { text-decoration: line-through; color: var(--muted); }
.task form.inline { display: inline; }
.task-meta { grid-column: 2; display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; }
.task-meta input { width: auto; min-width: 9rem; }
.stepnav { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.stepnav a { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; border-radius: 8px;
             border: 1px solid var(--line); background: #fff; text-decoration: none; font-weight: 600; font-size: .85rem; color: var(--text); }
.stepnav a.met { border-color: var(--green); color: var(--green); }
.stepnav a.not_met { border-color: var(--red); color: var(--red); }
.stepnav a[aria-current="step"] { background: var(--navy); color: #fff; border-color: var(--navy); }

.hero { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 2.5rem 2rem; margin-bottom: 1.5rem; }
.hero h1 { font-size: 2.1rem; }
.hero p.lead { font-size: 1.15rem; max-width: 720px; }
.codes { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; columns: 2; }
.qr { width: 220px; height: 220px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  main { padding: 1.25rem .9rem 2.5rem; }
  .card { padding: 1.1rem 1rem; }
  h1 { font-size: 1.5rem; }
  .actions .btn, .actions form, .actions form .btn { width: 100%; }
  .subnav { width: 100%; }
  .subnav a { flex: 1 1 auto; justify-content: center; }
  .site-header .bar { gap: .25rem; }
  /* tables become stacked cards: one row = one card, cell labels from data-label */
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border: 1px solid var(--line); border-radius: 10px; padding: .4rem .8rem; margin-bottom: .6rem; }
  table.stack td { border: 0; padding: .3rem 0; display: flex; justify-content: space-between; gap: 1rem; }
  table.stack td.head { display: block; font-weight: 600; border-bottom: 1px solid var(--line); padding-bottom: .5rem; margin-bottom: .2rem; }
  table.stack td[data-label]::before { content: attr(data-label); color: var(--muted); font-weight: 500; }
  .task-meta input { min-width: 0; width: 100%; }
  .task-meta .field { flex: 1 1 8rem; }
  .brand img { height: 36px; }
  .nav { margin-left: 0; width: 100%; }
  .hero { padding: 1.5rem 1.1rem; }
  .hero h1 { font-size: 1.6rem; }
  .codes { columns: 1; }
}
@media print {
  .site-header, .site-footer .footer-links, .actions, .no-print { display: none !important; }
  body { background: #fff; }
  .card { border: 0; padding: 0; }
}
