/* ===== Digital Safety Project — Global Styles ===== */

/* ---------- Google Font (optional CDN) ---------- */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700;900&family=Open+Sans:wght@400;600;700&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Primary palette */
  --color-navy:        #1b2a4a;
  --color-navy-dark:   #111d36;
  --color-navy-light:  #263d6a;
  --color-gold:        #d4a843;
  --color-gold-light:  #f0d28b;
  --color-gold-dark:   #b08a2a;
  --color-white:       #ffffff;
  --color-off-white:   #f8f6f1;
  --color-light-gray:  #eae6dd;
  --color-text:        #2c2c2c;
  --color-text-muted:  #5a5a5a;
  --color-accent-red:  #c0392b;
  --color-accent-green:#27ae60;
  --color-accent-blue: #2e86c1;

  /* Typography */
  --font-heading: 'Merriweather', Georgia, serif;
  --font-body:    'Open Sans', Arial, sans-serif;

  /* Spacing */
  --section-padding: 4.5rem 1.5rem;
  --container-max:   1140px;

  /* Transitions */
  --transition-fast: 0.25s ease;
  --transition-med:  0.4s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--color-gold-dark); text-decoration: none; transition: color var(--transition-fast); }
a:hover, a:focus { color: var(--color-gold); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  line-height: 1.3;
  margin-bottom: 0.6em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem;   }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p  { margin-bottom: 1rem; }
ul, ol { margin-bottom: 1rem; padding-left: 1.4rem; }
li { margin-bottom: 0.35rem; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Skip‑to‑content (accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-gold);
  color: var(--color-navy);
  padding: 0.6rem 1.2rem;
  z-index: 9999;
  font-weight: 700;
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 0; }

/* ===================================================================
   NAVIGATION
   =================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-navy-dark);
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  min-height: 60px;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-gold);
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.nav-brand:hover { color: var(--color-gold-light); text-decoration: none; }

.nav-logo {
  flex-shrink: 0;
  vertical-align: middle;
  height: 79px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-off-white);
  border-radius: 4px;
  transition: background var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus,
.nav-links a.active {
  background: var(--color-gold);
  color: var(--color-navy-dark);
  text-decoration: none;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--color-gold);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* Mobile nav */
@media (max-width: 880px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-navy-dark);
    padding: 0.5rem 1rem 1rem;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .nav-links.open {
    max-height: 600px;
  }

  .nav-links li { border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-links a  { padding: 0.75rem 0.5rem; font-size: 1rem; border-radius: 0; }
}

/* ===================================================================
   HERO SECTION
   =================================================================== */
.hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
  color: var(--color-white);
  text-align: center;
  padding: 3rem 1.5rem 1.5rem;
}

.hero h1 {
  color: var(--color-gold-light);
  font-size: 2.8rem;
  margin-bottom: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  color: rgba(255,255,255,.88);
  line-height: 1.8;
}

.hero .btn-primary {
  margin-top: 0.5rem;
}

/* Sub-hero (used on inner pages) */
.page-hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
  color: var(--color-white);
  text-align: center;
  padding: 3.5rem 1.5rem 3rem;
}

.page-hero h1 {
  color: var(--color-gold-light);
  font-size: 2.3rem;
  margin-bottom: 0.5rem;
}

.page-hero p {
  font-size: 1.05rem;
  max-width: 650px;
  margin: 0 auto;
  color: rgba(255,255,255,.82);
}

/* ===================================================================
   BUTTONS
   =================================================================== */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.8rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-navy-dark);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--color-gold-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(212,168,67,.45);
  text-decoration: none;
  color: var(--color-navy-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--color-gold);
  border: 2px solid var(--color-gold);
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--color-gold);
  color: var(--color-navy-dark);
  text-decoration: none;
}

/* ===================================================================
   SECTION UTILITIES
   =================================================================== */
.section {
  padding: var(--section-padding);
}

.section:first-of-type {
  padding-top: 2rem;
}

.section--alt {
  background: var(--color-off-white);
}

/* Tighter spacing for danger-group sections */
#communication,
#entertainment,
#technology,
#exposure {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-gold);
  border-radius: 2px;
}

.section-title p {
  color: var(--color-text-muted);
  margin-top: 0.6rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

/* Divider */
.section-divider {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  margin: 0;
}

/* ===================================================================
   CARDS
   =================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.8rem;
}

.card-grid--four {
  grid-template-columns: repeat(4, 1fr);
}

.danger-nav-card {
  text-align: center;
  padding: 1.4rem 1.2rem;
}

.danger-nav-card .card-icon {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.danger-nav-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.danger-nav-card p {
  font-size: 0.85rem;
}

.card {
  background: var(--color-white);
  border-radius: 10px;
  box-shadow: 0 3px 16px rgba(27,42,74,.1);
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  border-top: 4px solid var(--color-gold);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(27,42,74,.16);
}

.card-icon {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.card p, .card ul {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.card ul {
  padding-left: 1.2rem;
}

/* ===================================================================
   ACCORDION  (dangers page)
   =================================================================== */
.accordion { margin-bottom: 1rem; }

.accordion-item {
  border: 1px solid var(--color-light-gray);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--color-white);
  box-shadow: 0 1px 5px rgba(0,0,0,.05);
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  background: var(--color-off-white);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.accordion-header:hover,
.accordion-header:focus-within {
  background: var(--color-light-gray);
}

.accordion-title {
  flex: 1;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-navy);
  text-decoration: none;
}


.accordion-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.accordion-toggle .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-gold-dark);
  transition: transform var(--transition-fast);
}

.accordion-item.open .accordion-toggle .icon {
  transform: rotate(45deg);
}

.matrix-cta {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.matrix-cta a {
  color: var(--color-navy);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.matrix-cta a:hover {
  color: var(--color-gold-dark);
}

/* Expand hint below section titles */
.expand-hint {
  font-size: 0.85rem;
  color: var(--color-navy-light, #5a6f8a);
  margin-top: 0.3rem;
  font-style: italic;
  opacity: 0.8;
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 1.4rem;
}

.accordion-item.open .accordion-body {
  max-height: 2000px;
  padding: 1.2rem 1.4rem 1.4rem;
}

.accordion-body h4 {
  color: var(--color-navy);
  margin-bottom: 0.4rem;
}

.accordion-body ul {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.accordion-body li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* ===================================================================
   CHECKLIST (warning signs)
   =================================================================== */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.2rem;
  background: var(--color-white);
  border-left: 4px solid var(--color-accent-red);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  font-size: 1rem;
}

.checklist li .check-icon {
  flex-shrink: 0;
  font-size: 1.3rem;
  line-height: 1.6;
}

/* ===================================================================
   ALERT / THREAT CARDS
   =================================================================== */
.threat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.6rem;
}

.threat-card {
  background: var(--color-white);
  border-radius: 10px;
  padding: 1.8rem 1.5rem;
  border-left: 5px solid var(--color-accent-red);
  box-shadow: 0 3px 14px rgba(0,0,0,.08);
  transition: transform var(--transition-fast);
}

.threat-card:hover {
  transform: translateY(-3px);
}

.threat-card .threat-icon {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.threat-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.threat-card p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* ===================================================================
   AGE TABLE (protection page)
   =================================================================== */
.age-table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
}

.age-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
  font-size: 0.95rem;
}

.age-table thead {
  background: var(--color-navy);
  color: var(--color-white);
}

.age-table th {
  padding: 0.9rem 1rem;
  font-family: var(--font-heading);
  font-weight: 700;
  text-align: left;
}

.age-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-light-gray);
  vertical-align: top;
}

.age-table tbody tr:nth-child(even) {
  background: var(--color-off-white);
}

.age-table tbody tr:hover {
  background: #fdf6e3;
}

/* ===================================================================
   GUIDANCE / TIPS LIST
   =================================================================== */
.guidance-list {
  list-style: none;
  padding: 0;
  max-width: 860px;
  margin: 0 auto;
}

.principles-grid {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.principles-grid li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1.2rem 1.4rem;
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  border-left: 4px solid var(--color-gold);
}

.principles-grid li .tip-icon {
  flex-shrink: 0;
  font-size: 1.4rem;
  line-height: 1.6;
}

.principles-grid li strong {
  color: var(--color-navy);
}

@media (max-width: 700px) {
  .principles-grid {
    grid-template-columns: 1fr;
  }
}

.guidance-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  margin-bottom: 0.8rem;
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  border-left: 4px solid var(--color-gold);
}

.guidance-list li .tip-icon {
  flex-shrink: 0;
  font-size: 1.4rem;
  line-height: 1.6;
}

.guidance-list li strong {
  color: var(--color-navy);
}

/* ===================================================================
   SCRIPTURE / CALLOUT BOXES
   =================================================================== */
.callout {
  background: var(--color-off-white);
  border-left: 5px solid var(--color-gold);
  padding: 1.4rem 1.6rem;
  border-radius: 6px;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--color-text-muted);
}

.callout cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-weight: 700;
  color: var(--color-navy);
}

/* ===================================================================
   PURPOSE GRID (index)
   =================================================================== */
.purpose-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.purpose-item {
  background: var(--color-white);
  padding: 1.8rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 3px 14px rgba(0,0,0,.07);
  border-top: 4px solid var(--color-gold);
  text-align: center;
}

.purpose-item .purpose-icon {
  font-size: 2.2rem;
  margin-bottom: 0.6rem;
}

.purpose-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.purpose-item p {
  font-size: 0.93rem;
  color: var(--color-text-muted);
}

.faith-banner {
  margin-top: 2rem;
  text-align: center;
}

.faith-banner-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: transparent;
  color: var(--color-navy);
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  border: 2px solid var(--color-gold);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s;
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}

.faith-banner-link:hover {
  background: var(--color-gold);
  color: var(--color-navy);
}

.faith-banner-icon {
  font-size: 1.3rem;
}

.faith-banner-arrow {
  font-size: 1.2rem;
}

.purpose-grid--compact {
  gap: 1rem;
}

.purpose-item--compact {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.2rem;
  text-align: left;
  border-top: none;
  border-left: 4px solid var(--color-gold);
}

.purpose-item--compact h3 {
  margin-bottom: 0.2rem;
}

.purpose-icon--small {
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-bottom: 0;
  line-height: 1.4;
}

/* ===================================================================
   JOURNEY
   =================================================================== */
.journey {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 1.5rem;
}

.journey-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--color-white);
  border-radius: 10px;
  padding: 1.4rem 1rem;
  box-shadow: 0 3px 14px rgba(0,0,0,.07);
  border-top: 4px solid var(--color-gold);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.journey-step:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

.journey-step--final {
  border-top-color: var(--color-gold);
}

.journey-num {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--color-gold);
  color: var(--color-navy);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.journey-step--final .journey-num {
  background: var(--color-gold);
  color: var(--color-navy);
}

.journey-icon {
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.journey-step h3 {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.journey-step p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: 0;
}

.journey-arrow {
  display: flex;
  align-items: center;
  padding: 0 0.4rem;
  font-size: 1.4rem;
  color: var(--color-gold);
  flex-shrink: 0;
  margin-top: 2rem;
}

.journey-skip {
  text-align: center;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.journey-skip a {
  font-weight: 600;
  color: var(--color-navy);
}

.card-grid--small {
  grid-template-columns: repeat(2, 1fr);
  max-width: 700px;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .purpose-grid {
    grid-template-columns: 1fr;
  }
  .journey {
    flex-direction: column;
  }
  .journey-arrow {
    transform: rotate(90deg);
    margin: 0 auto;
    padding: 0;
  }
  .card-grid--small {
    grid-template-columns: 1fr;
  }
}

/* ===================================================================
   FOOTER
   =================================================================== */
.site-footer {
  background: var(--color-navy-dark);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 2.5rem 1.5rem;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--color-gold);
}

.site-footer .footer-note {
  margin-top: 0.6rem;
  font-style: italic;
  color: rgba(255,255,255,.5);
}

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3rem 1.2rem;
  padding: 0;
  margin-bottom: 1rem;
}

.footer-links a {
  color: rgba(255,255,255,.8);
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}
.footer-links a:hover { color: var(--color-gold-light); text-decoration: none; }

/* ===================================================================
   BACK TO TOP
   =================================================================== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--color-gold);
  color: var(--color-navy-dark);
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-gold-light);
  transform: translateY(-3px);
}

/* ===================================================================
   REFERENCE CARDS (resources page)
   =================================================================== */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.6rem;
}

.resource-card {
  background: var(--color-white);
  border-radius: 10px;
  padding: 1.8rem 1.5rem;
  box-shadow: 0 3px 14px rgba(0,0,0,.07);
  border-top: 4px solid var(--color-navy-light);
  display: flex;
  flex-direction: column;
}

.resource-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.resource-card p {
  font-size: 0.93rem;
  color: var(--color-text-muted);
  flex: 1;
}

.resource-card .resource-link {
  margin-top: 0.8rem;
  display: inline-block;
  font-weight: 700;
  color: var(--color-gold-dark);
}

.resource-card .resource-link:hover {
  color: var(--color-gold);
}

.placeholder-card {
  border-top-color: var(--color-light-gray);
  opacity: 0.8;
}

.placeholder-card h3::after {
  content: ' — Coming Soon';
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

/* ===================================================================
   PROTECTION CONTROLS GRID
   =================================================================== */

.controls-intro {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.controls-group-heading {
  font-size: 1.3rem;
  color: var(--color-navy);
  margin-bottom: 0.3rem;
}

.controls-group-desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 1.2rem;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.control-card {
  background: var(--color-white);
  border-radius: 10px;
  padding: 1.6rem 1.4rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  border-left: 4px solid var(--color-accent-blue);
}

.control-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.control-card p, .control-card ul {
  font-size: 0.93rem;
  color: var(--color-text-muted);
}

/* ===================================================================
   SOFTWARE / TOOLS RECOMMENDATION
   =================================================================== */
.tools-section {
  margin-top: 2rem;
}

.tool-category {
  margin-bottom: 2rem;
}

.tool-category h3 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  color: var(--color-navy);
}

.tool-category h3 a {
  color: inherit;
  text-decoration: underline;
  font-weight: inherit;
}

.tool-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.tool-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  border-left: 3px solid var(--color-gold);
}

.tool-item strong {
  color: var(--color-navy);
}

.tool-item p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Enforces-control tags on tool items */
.enforces-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.enforces-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  background: var(--color-navy);
  color: var(--color-gold-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* ===================================================================
   RESPONSIVE FINE‑TUNING
   =================================================================== */
@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .hero { padding: 3.5rem 1rem 3rem; }
  .hero h1 { font-size: 2rem; }
  .card-grid,
  .card-grid--four,
  .threat-grid,
  .resource-grid,
  .purpose-grid,
  .controls-grid,
  .checklist,
  .tool-list { grid-template-columns: 1fr; }
  .section { padding: 3rem 1rem; }
}

/* ===================================================================
   DROPDOWN SUBMENUS
   =================================================================== */

/* Parent item with a submenu */
.nav-links .has-submenu {
  position: relative;
}

/* Caret indicator */
.nav-links .has-submenu > a::after {
  content: ' ▾';
  font-size: 0.7em;
  opacity: 0.7;
}

/* Dropdown panel */
.submenu {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--color-navy-dark);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1001;
}

/* Show on hover / focus / js-toggle */
.nav-links .has-submenu:hover > .submenu,
.nav-links .has-submenu:focus-within > .submenu,
.nav-links .has-submenu.open > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Submenu items */
.submenu li {
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.submenu li:last-child {
  border-bottom: none;
}

.submenu a {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-off-white);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.submenu a:hover,
.submenu a:focus {
  background: var(--color-gold);
  color: var(--color-navy-dark);
}

/* ---- Mobile submenu overrides ---- */
@media (max-width: 880px) {
  .nav-links .has-submenu {
    position: static;
  }

  .submenu {
    position: static;
    min-width: 100%;
    background: rgba(0,0,0,.15);
    border: none;
    border-radius: 0;
    box-shadow: none;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: max-height 0.3s ease;
    padding: 0;
  }

  .nav-links .has-submenu.open > .submenu {
    max-height: 500px;
    padding: 0.25rem 0;
  }

  .submenu a {
    padding-left: 2rem;
    font-size: 0.92rem;
    border-radius: 0;
  }
  .submenu li {
    border-bottom: 1px solid rgba(255,255,255,.05);
  }
}

/* ===================================================================
   MATURITY PROGRESSION PIPELINE  (guidance.html)
   =================================================================== */
.maturity-pipeline > .maturity-arrow {
  display: flex;
  align-items: center;
  padding: 0 0.1rem;
  color: var(--color-gold);
  font-size: 1.8rem;
  flex-shrink: 0;
  align-self: center;
}

@media (max-width: 880px) {
  .maturity-pipeline {
    flex-direction: column !important;
    align-items: center !important;
  }
  .maturity-pipeline > .maturity-arrow {
    transform: rotate(90deg);
    padding: 0.2rem 0;
  }
  .maturity-pipeline > div[style*="max-width"] {
    max-width: 320px !important;
    width: 100%;
  }
}

/* ===================================================================
   REAL-WORLD SCENARIO CALLOUTS  (dangers.html)
   =================================================================== */
.scenario {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: #fff8e1;
  border-left: 4px solid var(--color-gold);
  border-radius: 0 6px 6px 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.scenario strong {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-navy);
  margin-bottom: 0.3rem;
}

/* ===================================================================
   WHERE-ACTIVE TAGS  (threat actor cards → online spaces)
   =================================================================== */
.where-active {
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, .06);
  font-size: 0.8rem;
  color: #555;
}

.where-active strong {
  color: var(--color-navy);
}

.where-active span,
.where-active a {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  margin: 0.15rem 0.2rem 0.15rem 0;
  background: rgba(31, 58, 92, .07);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-navy);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.where-active a:hover,
.where-active a:focus {
  background: var(--color-gold);
  color: var(--color-navy-dark);
}

/* ===================================================================
   BEHIND THE PROJECT — FOUNDER LETTER
   =================================================================== */
.founder-letter {
  max-width: 760px;
  margin: 0 auto;
  background: var(--color-white);
  border-radius: 10px;
  padding: 2.5rem 2.2rem;
  box-shadow: 0 3px 16px rgba(27,42,74,.1);
  border-left: 5px solid var(--color-gold);
  font-size: 1.05rem;
  line-height: 1.85;
}

.founder-letter p:first-child {
  font-size: 1.1rem;
  color: var(--color-navy);
  font-weight: 600;
}

.letter-signature {
  margin-top: 1.5rem;
  font-style: italic;
  color: var(--color-navy);
  line-height: 1.6;
}

.letter-signature strong {
  font-size: 1.1rem;
}

.letter-signature span {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-style: normal;
}

/* ===================================================================
   BEHIND THE PROJECT — ORIGIN STORY TIMELINE
   =================================================================== */
.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 2.4rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0.65rem;
  width: 3px;
  background: linear-gradient(180deg, var(--color-gold), var(--color-navy-light));
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.2rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -2.4rem;
  top: 0.35rem;
  width: 16px;
  height: 16px;
  background: var(--color-gold);
  border: 3px solid var(--color-white);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--color-gold);
  z-index: 1;
}

.timeline-item:last-child .timeline-marker {
  background: var(--color-navy-light);
  box-shadow: 0 0 0 3px var(--color-navy-light);
}

.timeline-content {
  background: var(--color-white);
  border-radius: 10px;
  padding: 1.6rem 1.8rem;
  box-shadow: 0 3px 14px rgba(0,0,0,.07);
  border-top: 3px solid var(--color-gold);
}

.timeline-content h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* ===================================================================
   BEHIND THE PROJECT — PARENT JOURNEY MAP
   =================================================================== */
.journey-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
}

.journey-card {
  background: var(--color-white);
  border-radius: 10px;
  box-shadow: 0 3px 16px rgba(27,42,74,.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.journey-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(27,42,74,.16);
}

.journey-challenge {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
  color: var(--color-white);
  padding: 1.4rem 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.journey-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.journey-challenge h3 {
  color: var(--color-gold-light);
  font-size: 1.1rem;
  margin-bottom: 0;
  font-style: italic;
}

.journey-answer {
  padding: 1.4rem 1.6rem;
  flex: 1;
}

.journey-answer p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.journey-answer a {
  font-weight: 600;
}

@media (max-width: 600px) {
  .journey-grid { grid-template-columns: 1fr; }
  .founder-letter { padding: 1.6rem 1.2rem; }
  .timeline { padding-left: 2rem; }
  .timeline-marker { left: -2rem; }
}

/* ===================================================================
   CONTACT ICON (fixed envelope)
   =================================================================== */
.nav-contact-icon {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1100;
  font-size: 1.45rem;
  color: #c8a951;
  text-decoration: none;
  background: rgba(27, 42, 74, .92);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transition: background .2s, transform .2s;
}
.nav-contact-icon:hover,
.nav-contact-icon:focus {
  background: #c8a951;
  color: #1b2a4a;
  transform: scale(1.12);
}
@media (max-width: 880px) {
  .nav-contact-icon { display: none; }
}

/* ===================================================================
   CONTACT FORM
   =================================================================== */
.contact-form {
  max-width: 620px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.4rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: .35rem;
  color: #1b2a4a;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: .65rem .85rem;
  font-size: 1rem;
  font-family: 'Open Sans', sans-serif;
  border: 1px solid #b0b8c9;
  border-radius: 6px;
  background: #fafbfd;
  transition: border-color .2s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #c8a951;
  box-shadow: 0 0 0 3px rgba(200,169,81,.25);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form button[type="submit"] {
  display: inline-block;
  padding: .75rem 2.2rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  background: #1b2a4a;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s;
}

.contact-form button[type="submit"]:hover,
.contact-form button[type="submit"]:focus {
  background: #c8a951;
  color: #1b2a4a;
}

.contact-form button[type="submit"]:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.contact-success {
  background: #e8f5e9;
  color: #256029;
  padding: 1.2rem 1.6rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  max-width: 620px;
  margin: 0 auto;
}

.contact-error {
  background: #fce4e4;
  color: #8b1a1a;
  padding: .85rem 1.2rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.recaptcha-notice {
  font-size: .78rem;
  color: #6b7280;
  margin-top: 1rem;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.recaptcha-notice a {
  color: #6b7280;
  text-decoration: underline;
}

/* ===================================================================
   SAFETY SCORING MATRIX
   =================================================================== */

/* Tier Legend */
.matrix-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.matrix-legend-item {
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  border-top: 4px solid transparent;
}

.matrix-legend-item .tier-score-range {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--color-text-muted);
}

.matrix-legend-item .tier-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.tier-long-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.matrix-legend-item .tier-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.tier-safer   { background: #eaf7ee; border-top-color: #27ae60; }
.tier-caution { background: #fef9e7; border-top-color: #d4a843; }
.tier-high    { background: #fef0e6; border-top-color: #e67e22; }
.tier-avoid   { background: #fdecea; border-top-color: #c0392b; }

/* Matrix Table */
.matrix-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 1rem;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 500px;
}

.matrix-table thead th {
  background: var(--color-navy);
  color: #fff;
  padding: 0.85rem 0.75rem;
  text-align: center;
  vertical-align: middle;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: normal;
  line-height: 1.35;
  position: sticky;
  top: 0;
  z-index: 2;
}

.matrix-table thead th.col-score {
  height: 105px;
  padding: 0;
  width: 38px;
  min-width: 38px;
  overflow: visible;
  vertical-align: bottom;
}

.th-rotate {
  display: inline-block;
  transform: rotate(-65deg);
  transform-origin: left bottom;
  white-space: nowrap;
  font-size: 0.64rem;
  line-height: 1;
  margin-left: 18px;
  margin-bottom: 4px;
}

.matrix-table thead th.col-platform {
  text-align: left;
  padding-left: 1rem;
  min-width: 130px;
}


.matrix-table thead th.col-total {
  background: var(--color-navy-light);
  min-width: 48px;
  width: 48px;
}

.matrix-table thead th.col-tier {
  min-width: 90px;
}

.sort-col {
  cursor: pointer;
  user-select: none;
}

.sort-col:hover {
  background: var(--color-navy-light);
}

.sort-icon {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.7;
  font-size: 0.75rem;
}

.matrix-table tbody tr:nth-child(even) {
  background: #f8f6f1;
}

.matrix-table tbody tr:nth-child(odd) {
  background: #fff;
}

.matrix-table tbody tr:hover {
  background: #eef3fb;
}

.matrix-table td {
  padding: 0.45rem 0.5rem;
  font-size: 0.8rem;
  text-align: center;
  border-bottom: 1px solid #e8e4de;
  vertical-align: middle;
}

.col-platform {
  text-align: left !important;
  padding-left: 1rem !important;
  font-weight: 600;
}

.platform-icon {
  margin-right: 0.4rem;
}

/* Score cells: color-coded by value */
.score-cell[data-score="5"] { background: #d5f0dc; color: #1a6b33; font-weight: 700; }
.score-cell[data-score="4"] { background: #e8f5e9; color: #2e7d32; font-weight: 600; }
.score-cell[data-score="3"] { background: #fff8e1; color: #8a6000; font-weight: 600; }
.score-cell[data-score="2"] { background: #ffe8d6; color: #b84c00; font-weight: 700; }
.score-cell[data-score="1"] { background: #fde8e8; color: #a11212; font-weight: 700; }
.score-na { background: #f0f0f0 !important; color: #aaa !important; font-weight: 400 !important; }

/* Total score column */
.score-total {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.05rem;
}

.category-row td {
  background: #2c3e6b;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.35rem 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tier-safer-bg  { background: #d5f0dc; color: #1e8449; }
.tier-caution-bg { background: #fef9e7; color: #b08a2a; }
.tier-high-bg   { background: #fef0e6; color: #ca6f1e; }
.tier-avoid-bg  { background: #fdecea; color: #a93226; }

/* Tier badges */
.tier-badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.tier-safer-badge   { background: #27ae60; color: #fff; }
.tier-caution-badge { background: #d4a843; color: #fff; }
.tier-high-badge    { background: #e67e22; color: #fff; }
.tier-avoid-badge   { background: #c0392b; color: #fff; }

/* Matrix footnote */
.matrix-footnote {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-top: 0.75rem;
  font-style: italic;
}

/* Criteria table inside accordions */
.criteria-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.88rem;
}

.criteria-table thead th {
  background: var(--color-navy);
  color: #fff;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.82rem;
}

.criteria-table tbody tr:nth-child(even) { background: #f8f6f1; }
.criteria-table tbody tr:nth-child(odd)  { background: #fff; }

.criteria-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #e8e4de;
  vertical-align: top;
  line-height: 1.55;
}

.criteria-table td:first-child {
  white-space: nowrap;
  width: 60px;
}

/* Score pills in criteria table */
.score-pill {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  border-radius: 50%;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.score-5 { background: #d5f0dc; color: #1a6b33; }
.score-4 { background: #e8f5e9; color: #2e7d32; }
.score-3 { background: #fff8e1; color: #8a6000; }
.score-2 { background: #ffe8d6; color: #b84c00; }
.score-1 { background: #fde8e8; color: #a11212; }

/* Category number badge */
.category-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-gold);
  color: var(--color-navy);
  font-size: 0.85rem;
  font-weight: 700;
  margin-right: 0.6rem;
  flex-shrink: 0;
}

.acc-label {
  display: flex;
  align-items: center;
}

@media (max-width: 600px) {
  .matrix-legend {
    grid-template-columns: 1fr 1fr;
  }
  .tier-badge {
    font-size: 0.72rem;
    padding: 0.25rem 0.5rem;
  }
}

/* ===================================================================
   PRINT STYLES
   =================================================================== */
@media print {
  .site-nav, .back-to-top, .nav-toggle { display: none !important; }
  .hero, .page-hero { background: #fff !important; color: #000 !important; }
  .hero h1, .page-hero h1 { color: #1b2a4a !important; }
  body { font-size: 12pt; }
}
