/* === /security PAGE === */
/* BEAD cybersecurity reviewer artifact. Self-contained under .sec-*
   prefixes so a future change to grants.css / infrastructure.css
   does not silently affect this page. Shared theme classes
   (.section-label, .spec-table, .spec-row, .spec-key, .spec-val)
   are defined in theme.css and not overridden here. */

.security-page { padding-top: 80px; }

/* === HERO === */
.sec-hero {
  background: linear-gradient(160deg, #070E0A 0%, #07090E 100%);
  border-bottom: 1px solid var(--border);
  padding: 80px 80px 64px;
}
.sec-hero-inner { max-width: 1200px; margin: 0 auto; }
.sec-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(10,191,156,0.08);
  border: 1px solid rgba(10,191,156,0.2);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.sec-hero .section-label { margin-bottom: 14px; color: var(--accent); }
.sec-hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 20px;
  max-width: 760px;
}
.sec-hero-sub {
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 660px;
  font-weight: 300;
  margin-bottom: 40px;
}

/* hero meta row — reviewer quick-reference (last reviewed, contact) */
.sec-meta-row {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
  max-width: 760px;
}
.sec-meta-cell {
  flex: 1;
  padding: 18px 24px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
}
.sec-meta-cell:last-child { border-right: none; }
.sec-meta-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 6px;
}
.sec-meta-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--fg);
  line-height: 1.3;
}
.sec-meta-mailto {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed rgba(10,191,156,0.5);
  padding-bottom: 0;
}
.sec-meta-mailto:hover { color: var(--fg); border-bottom-color: var(--fg); }

.sec-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.sec-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}
.sec-btn-secondary:hover { color: var(--fg); border-color: rgba(255,255,255,0.15); }
.sec-btn-print {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.sec-btn-print:hover { color: var(--fg); border-color: rgba(255,255,255,0.15); }

/* === SECTIONS === */
.sec-section {
  padding: 80px;
  border-bottom: 1px solid var(--border);
}
.sec-section-inner { max-width: 1200px; margin: 0 auto; }
.sec-section .section-label { margin-bottom: 14px; }
.sec-section h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 12px;
  max-width: 720px;
}
.sec-intro {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 720px;
  font-weight: 300;
  margin-bottom: 48px;
}
.sec-section-alt { background: var(--bg-surface); }

/* spec columns — pair of stacked columns for narrower spec rows */
.sec-spec-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}
.sec-spec-col .section-label { margin-bottom: 12px; }
.sec-spec-col .section-label.sec-mini-label { color: var(--fg-dim); }
.sec-spec-tall .spec-row { align-items: flex-start; }
.sec-spec-tall .spec-val { text-align: left; font-weight: 500; color: var(--fg-muted); line-height: 1.55; max-width: 70%; }

.sec-facts-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 14px;
}

.sec-spec-row-stack .spec-val { text-align: left; }

/* subsection spacing */
.sec-subsection { margin-top: 40px; }

/* plain lists */
.sec-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sec-list li {
  position: relative;
  padding: 12px 0 12px 22px;
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
  font-weight: 300;
  border-bottom: 1px solid var(--border);
}
.sec-list li:last-child { border-bottom: none; }
.sec-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 19px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.sec-ordered-list {
  counter-reset: sec-step;
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.sec-ordered-list li {
  counter-increment: sec-step;
  position: relative;
  padding: 18px 22px 18px 64px;
  font-size: 14px;
  color: var(--fg);
  line-height: 1.55;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.sec-ordered-list li:last-child { border-bottom: none; }
.sec-ordered-list li::before {
  content: counter(sec-step);
  position: absolute;
  left: 18px; top: 18px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(10,191,156,0.08);
  border: 1px solid rgba(10,191,156,0.25);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* free-text note paragraph */
.sec-notes {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.7;
  font-weight: 300;
  padding: 18px 22px;
  background: rgba(10,191,156,0.04);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  max-width: 880px;
}
.sec-notes strong { color: var(--fg); font-weight: 600; }

/* === INCIDENT RESPONSE — contact cards === */
.sec-incident-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
.sec-incident-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 20px 24px;
}
.sec-incident-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.sec-incident-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--fg);
  line-height: 1.35;
}

.sec-incident-spec { margin-bottom: 32px; }

/* === SUB-PROCESSORS — region-style table rows === */
.sec-subproc-row-wrap { margin-bottom: 16px; }
.sec-subproc-row { align-items: stretch; }
.sec-subproc-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sec-subproc-stack-key { flex: 0 0 38%; }
.sec-subproc-stack-val { flex: 1; }
.sec-subproc-key-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 2px;
}
.sec-subproc-key-label-spacer { margin-top: 10px; }
.sec-subproc-purpose {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  line-height: 1.5;
}
.sec-subproc-val-text {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.55;
  font-weight: 300;
  text-align: left;
  max-width: 100%;
}
.sec-subproc-location {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.4;
}
.sec-subproc-row .spec-key { color: var(--fg); font-weight: 600; }

/* === CTA === */
.sec-cta {
  padding: 80px;
  background: linear-gradient(160deg, #070E0A 0%, #07090E 100%);
  border-bottom: 1px solid var(--border);
}
.sec-cta-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: center;
}
.sec-cta .section-label { margin-bottom: 14px; }
.sec-cta h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}
.sec-cta p {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
  font-weight: 300;
}
.sec-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.sec-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  background: var(--accent);
  color: #07090E;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  transition: opacity 0.15s;
}
.sec-cta-primary:hover { opacity: 0.88; }
.sec-cta-secondary {
  display: block;
  padding: 12px 22px;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  text-decoration: none;
  text-align: center;
  transition: color 0.15s, border-color 0.15s;
}
.sec-cta-secondary:hover { color: var(--fg); border-color: rgba(255,255,255,0.15); }
.sec-cta-print {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: color 0.15s;
}
.sec-cta-print:hover { color: var(--fg); }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .sec-hero { padding: 60px 40px 48px; }
  .sec-meta-row { flex-direction: column; }
  .sec-meta-cell { border-right: none; border-bottom: 1px solid var(--border); }
  .sec-meta-cell:last-child { border-bottom: none; }

  .sec-section { padding: 60px 40px; }
  .sec-spec-cols { grid-template-columns: 1fr; gap: 32px; }

  .sec-incident-grid { grid-template-columns: 1fr; }
  .sec-subproc-row { flex-direction: column; align-items: stretch; }
  .sec-subproc-stack-key,
  .sec-subproc-stack-val { flex: 1; }
  .sec-subproc-stack-val { margin-top: 12px; }

  .sec-cta { padding: 60px 40px; }
  .sec-cta-inner { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 600px) {
  .sec-hero { padding: 48px 24px 36px; }
  .sec-hero h1 { font-size: 32px; }
  .sec-hero-sub { font-size: 15px; }
  .sec-section { padding: 48px 24px; }
  .sec-section h2 { font-size: 24px; }
  .sec-cta { padding: 48px 24px; }
  .sec-cta h2 { font-size: 24px; }
}

/* === PRINT STYLESHEET === */
/* Parity with public/css/grants.css @media print rules so the /security
   page produces the same single-column monochrome layout when printed
   (or exported to PDF). */
@media print {
  @page { size: letter; margin: 0.75in; }

  /* Hide interactive chrome */
  .nav,
  .footer,
  .sec-hero-actions,
  .sec-btn-print,
  .sec-btn-secondary,
  .sec-cta-actions,
  .sec-cta-print { display: none !important; }

  /* Reset backgrounds to white */
  body,
  .sec-hero,
  .sec-section,
  .sec-section-alt,
  .sec-cta,
  .sec-meta-cell,
  .sec-incident-card,
  .sec-subproc-row,
  .sec-ordered-list li,
  .sec-list { background: #fff !important; }

  /* Reset text to black */
  body,
  h1, h2, h3, p, li,
  .sec-hero h1,
  .sec-hero-sub,
  .sec-intro,
  .sec-meta-val,
  .sec-incident-val,
  .sec-notes,
  .sec-subproc-purpose,
  .sec-subproc-val-text,
  .sec-subproc-location,
  .spec-key,
  .spec-val,
  .sec-cta p { color: #111 !important; }

  .section-label,
  .sec-incident-label,
  .sec-meta-label,
  .sec-facts-label,
  .sec-subproc-key-label,
  .sec-hero-badge { color: #333 !important; }

  .sec-hero-badge {
    border-color: #ccc !important;
    background: #f5f5f5 !important;
  }

  /* Remove hero / cta gradients, drop non-print borders */
  .sec-hero, .sec-cta { border: none !important; }

  /* Visible borders on white */
  .spec-table,
  .spec-row,
  .sec-meta-row,
  .sec-incident-card,
  .sec-ordered-list,
  .sec-ordered-list li,
  .sec-list li { border-color: #ccc !important; }

  /* Compact padding for print */
  .sec-hero { padding: 0 0 24pt 0; border-bottom: 1pt solid #ccc !important; }
  .sec-section { padding: 24pt 0; }
  .sec-section-alt { padding: 24pt 0; }
  .sec-cta { padding: 24pt 0; }

  /* Masthead accent strip */
  .sec-incident-card {
    border-left-color: #555 !important;
  }
  .sec-notes {
    background: #f5f5f5 !important;
    border-left-color: #555 !important;
  }
  .sec-meta-mailto { color: #111 !important; border-bottom-color: #888 !important; }

  /* No page breaks across sections or inside critical blocks */
  .sec-section,
  .sec-section-alt,
  .spec-table,
  .sec-incident-grid,
  .sec-ordered-list,
  .sec-subproc-row-wrap { page-break-inside: avoid; }
  .sec-hero h1, .sec-section h2 { page-break-after: avoid; }
}
