/* ============================================================
   NUCLEAR READY — Global Stylesheet
   Design: Authoritative Editorial (dark theme, military-clean)
   Fonts: Oswald (headings) + Source Sans 3 (body) + IBM Plex Mono (labels)
   Colors: Near-black bg, off-white text, amber accent, slate muted
   ============================================================ */ 

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Source+Sans+3:ital,wght@0,300;0,400;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1c1c1c;
  --text-primary: #f0ede8;
  --text-secondary: #a8a39c;
  --text-muted: #6b6560;
  --accent-amber: #d97706;
  --accent-amber-light: #f59e0b;
  --accent-amber-dark: #b45309;
  --accent-green: #16a34a;
  --accent-red: #dc2626;
  --border-color: #2a2a2a;
  --border-accent: #3a3020;
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --max-width: 1200px;
  --radius: 4px;
  --shadow: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
  --transition: 0.2s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-amber-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-amber); text-decoration: underline; }
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.4rem; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.2rem; }
p { margin-bottom: 1rem; color: var(--text-primary); }

.label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-amber);
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 4rem 0; }
.section-sm { padding: 2rem 0; }
.section-lg { padding: 6rem 0; }

/* --- Header / Navigation --- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-amber);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon svg { width: 20px; height: 20px; fill: #000; }

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.logo-text span { color: var(--accent-amber); }

.site-nav { display: flex; align-items: center; gap: 0.25rem; }

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--bg-card);
  text-decoration: none;
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent-amber);
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: background var(--transition);
  text-decoration: none;
  margin-left: 0.5rem;
}

.nav-cta:hover { background: var(--accent-amber-light); color: #000; text-decoration: none; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(217,119,6,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(217,119,6,0.1);
  border: 1px solid rgba(217,119,6,0.3);
  border-radius: 2px;
  padding: 0.3rem 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent-amber);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title { margin-bottom: 1.5rem; }
.hero-title em { font-style: normal; color: var(--accent-amber); }

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-amber);
  color: #000;
}
.btn-primary:hover { background: var(--accent-amber-light); color: #000; text-decoration: none; }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover { border-color: var(--accent-amber); color: var(--accent-amber); text-decoration: none; }

.hero-visual {
  position: relative;
}

.threat-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.threat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.threat-panel-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.status-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}

.status-green { background: rgba(22,163,74,0.15); color: #4ade80; border: 1px solid rgba(22,163,74,0.3); }
.status-amber { background: rgba(217,119,6,0.15); color: var(--accent-amber-light); border: 1px solid rgba(217,119,6,0.3); }
.status-red { background: rgba(220,38,38,0.15); color: #f87171; border: 1px solid rgba(220,38,38,0.3); }

.threat-items { display: flex; flex-direction: column; gap: 0.75rem; }

.threat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.threat-item-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.threat-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
}

.threat-bar {
  height: 100%;
  border-radius: 2px;
  background: var(--accent-amber);
}

.threat-value {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 40px;
  text-align: right;
}

/* --- Quick Actions Bar --- */
.quick-actions {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.quick-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.25rem 1rem;
  text-decoration: none;
  border-right: 1px solid var(--border-color);
  transition: background var(--transition);
}

.quick-action-item:last-child { border-right: none; }
.quick-action-item:hover { background: var(--bg-card); text-decoration: none; }

.quick-action-icon {
  width: 32px;
  height: 32px;
  background: rgba(217,119,6,0.1);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-action-icon svg { width: 16px; height: 16px; stroke: var(--accent-amber); fill: none; stroke-width: 2; }

.quick-action-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: center;
}

/* --- Section Headers --- */
.section-header { margin-bottom: 2.5rem; }
.section-header .label { margin-bottom: 0.5rem; display: block; }
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p { color: var(--text-secondary); max-width: 600px; }

/* --- Guide Cards --- */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all var(--transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.guide-card:hover {
  border-color: var(--accent-amber-dark);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.guide-card-icon {
  width: 40px;
  height: 40px;
  background: rgba(217,119,6,0.1);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-card-icon svg { width: 20px; height: 20px; stroke: var(--accent-amber); fill: none; stroke-width: 2; }

.guide-card h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 0;
}

.guide-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.guide-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.read-more {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-amber);
}

/* --- Phase Steps --- */
.phases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.phase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.phase-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.phase-card.phase-1::before { background: var(--accent-amber); }
.phase-card.phase-2::before { background: #ef4444; }
.phase-card.phase-3::before { background: var(--accent-green); }

.phase-number {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: block;
}

.phase-card h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.phase-card p { font-size: 0.9rem; color: var(--text-secondary); margin: 0; }

/* --- Info Box / Citation --- */
.info-box {
  background: rgba(217,119,6,0.05);
  border-left: 3px solid var(--accent-amber);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

.info-box p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); }
.info-box strong { color: var(--text-primary); }

.citation-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.citation-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.citation-icon svg { width: 20px; height: 20px; stroke: var(--accent-amber); fill: none; stroke-width: 2; }

.citation-box p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
}

.citation-box a { color: var(--accent-amber-light); }

/* --- Article Layout --- */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

.article-content h1 { margin-bottom: 1rem; }
.article-content h2 { margin: 2rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); }
.article-content h3 { margin: 1.5rem 0 0.75rem; color: var(--accent-amber-light); }
.article-content p { color: var(--text-secondary); }
.article-content ul, .article-content ol { color: var(--text-secondary); }
.article-content li { margin-bottom: 0.6rem; }
.article-content strong { color: var(--text-primary); }

.article-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.article-meta-item {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.article-meta-item svg { width: 14px; height: 14px; stroke: var(--text-muted); fill: none; stroke-width: 2; }

/* Quick Actions Box in articles */
.quick-actions-box {
  background: rgba(217,119,6,0.05);
  border: 1px solid rgba(217,119,6,0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.quick-actions-box h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-amber);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quick-actions-box ul { list-style: none; padding: 0; }
.quick-actions-box li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  gap: 0.75rem;
}
.quick-actions-box li:last-child { border-bottom: none; }
.quick-actions-box li::before { content: '▸'; color: var(--accent-amber); flex-shrink: 0; }
.quick-actions-box strong { color: var(--text-primary); }

/* Sidebar */
.article-sidebar { position: sticky; top: 80px; }

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.sidebar-widget h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-links { list-style: none; padding: 0; }
.sidebar-links li { padding: 0.4rem 0; border-bottom: 1px solid var(--border-color); }
.sidebar-links li:last-child { border-bottom: none; }
.sidebar-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sidebar-links a:hover { color: var(--accent-amber-light); text-decoration: none; }
.sidebar-links a::before { content: '→'; color: var(--accent-amber); font-size: 0.75rem; }

/* --- Stats Section --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat-item {
  background: var(--bg-card);
  padding: 2rem 1.5rem;
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-amber);
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- CTA Section --- */
.cta-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 4rem 0;
  text-align: center;
}

.cta-section h2 { margin-bottom: 1rem; }
.cta-section p { color: var(--text-secondary); max-width: 500px; margin: 0 auto 2rem; }

/* --- Footer --- */
#site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 1rem;
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text-primary); text-decoration: none; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0;
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 1rem;
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent-amber); text-decoration: none; }
.breadcrumb span { color: var(--text-muted); }

/* --- Table of Contents --- */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.toc h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.toc ol { padding-left: 1.25rem; }
.toc li { margin-bottom: 0.35rem; }
.toc a { font-size: 0.9rem; color: var(--text-secondary); }
.toc a:hover { color: var(--accent-amber-light); text-decoration: none; }

/* --- AdSense placeholder areas --- */
.ad-slot {
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  overflow: hidden;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { display: none; }
  .phases-grid { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .site-nav { display: none; }
  .site-nav.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-secondary); border-bottom: 1px solid var(--border-color); padding: 1rem; gap: 0.25rem; }
  .hamburger { display: flex; }
  .quick-actions-grid { grid-template-columns: repeat(3, 1fr); }
  .quick-action-item:nth-child(3) { border-right: none; }
  .quick-action-item:nth-child(4), .quick-action-item:nth-child(5) { border-top: 1px solid var(--border-color); }
  .guides-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* ── TYPOGRAPHY: larger text for mobile readability ── */
  html { font-size: 17px; }
  body { font-size: 1rem; line-height: 1.78; }
  h1 { font-size: 2rem !important; line-height: 1.15; }
  h2 { font-size: 1.6rem; line-height: 1.2; }
  h3 { font-size: 1.3rem; }
  h4 { font-size: 1.1rem; }
  p { font-size: 1rem; line-height: 1.78; }
  li { font-size: 1rem; line-height: 1.72; margin-bottom: 0.5rem; }

  /* Labels & mono text — slightly larger */
  .label { font-size: 0.78rem !important; letter-spacing: 0.12em; }
  .nav-link { font-size: 1rem; padding: 0.65rem 0.75rem; }
  .btn { font-size: 0.9rem; padding: 0.8rem 1.4rem; }

  /* Cards */
  .guide-card h3 { font-size: 1.15rem; }
  .guide-card p { font-size: 0.97rem; line-height: 1.65; }
  .phase-card h3 { font-size: 1.2rem; }
  .phase-card p { font-size: 0.97rem; }

  /* Article pages */
  .article-body p { font-size: 1.05rem; line-height: 1.82; }
  .article-body li { font-size: 1.05rem; line-height: 1.75; }
  .article-body h2 { font-size: 1.55rem; }
  .article-body h3 { font-size: 1.28rem; }
  .info-box p { font-size: 1rem; }
  .citation-box p { font-size: 0.95rem; }
  .toc a { font-size: 1rem; }
  .sidebar-links a { font-size: 0.97rem; }

  /* Quick action labels */
  .quick-action-label { font-size: 0.72rem; letter-spacing: 0.06em; }

  /* Footer */
  .footer-links a { font-size: 0.93rem; }
  .footer-copy { font-size: 0.85rem; }

  /* Tables */
  table td, table th { font-size: 0.9rem; padding: 0.65rem 0.8rem; }

  /* PWA banner */
  .pwa-banner-text strong { font-size: 1rem; }
  .pwa-banner-text span { font-size: 0.92rem; }

  /* Hero subtitle */
  .hero-subtitle { font-size: 1.05rem; }

  /* Step numbers / counters */
  .step-number { font-size: 1.1rem; }
}

@media (max-width: 480px) {
  html { font-size: 18px; }
  body { font-size: 1rem; line-height: 1.8; }
  h1 { font-size: 1.85rem !important; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.22rem; }
  p, li { font-size: 1rem; line-height: 1.8; }
  .article-body p, .article-body li { font-size: 1.05rem; line-height: 1.85; }
  .article-meta { flex-direction: column; gap: 0.4rem; }
  .article-meta-item { font-size: 0.88rem; }
  table td, table th { font-size: 0.85rem; padding: 0.5rem 0.6rem; }
  .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; }
  .btn { justify-content: center; font-size: 0.92rem; }
  .guide-card h3 { font-size: 1.12rem; }
  .guide-card p { font-size: 1rem; }
  .container { padding: 0 1.1rem; }
}

/* ============================================================
   PWA INTEGRATION STYLES — Added for offline survival guide
   ============================================================ */

/* --- PWA Install Banner --- */
#pwa-install-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: var(--bg-secondary);
  border-top: 2px solid var(--accent-amber);
  padding: 1rem 1.5rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}

#pwa-install-banner.visible { display: flex; }

.pwa-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  flex-wrap: wrap;
}

.pwa-banner-icon {
  width: 48px;
  height: 48px;
  background: rgba(217,119,6,0.15);
  border: 1px solid rgba(217,119,6,0.3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-banner-icon svg { width: 24px; height: 24px; fill: var(--accent-amber); }

.pwa-banner-text { flex: 1; min-width: 200px; }

.pwa-banner-text strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.pwa-banner-text span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pwa-banner-actions { display: flex; gap: 0.75rem; align-items: center; }

.btn-pwa-install {
  background: var(--accent-amber);
  color: #000;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}

.btn-pwa-install:hover { background: var(--accent-amber-light); }

.btn-pwa-dismiss {
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-pwa-dismiss:hover { border-color: var(--text-muted); color: var(--text-secondary); }

/* --- Survival Step Cards (Phase 01/02/03) --- */
.survival-steps { display: flex; flex-direction: column; gap: 0; margin: 2rem 0; }

.survival-step {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0;
  margin-bottom: -1px;
  overflow: hidden;
  transition: border-color var(--transition);
}

.survival-step:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.survival-step:last-child { border-radius: 0 0 var(--radius) var(--radius); margin-bottom: 0; }

.survival-step.is-open { border-color: var(--accent-amber-dark); z-index: 1; position: relative; }

.step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}

.step-header:hover { background: var(--bg-card-hover); }

.step-number {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  flex-shrink: 0;
  min-width: 36px;
  text-align: center;
}

.survival-step.is-open .step-number {
  background: rgba(217,119,6,0.15);
  border-color: rgba(217,119,6,0.4);
  color: var(--accent-amber);
}

.step-title-wrap { flex: 1; }

.step-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.step-subtitle {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.step-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  flex-shrink: 0;
}

.step-badge.critical { background: rgba(220,38,38,0.15); color: #f87171; border: 1px solid rgba(220,38,38,0.3); }
.step-badge.important { background: rgba(217,119,6,0.15); color: var(--accent-amber-light); border: 1px solid rgba(217,119,6,0.3); }
.step-badge.recommended { background: rgba(22,163,74,0.15); color: #4ade80; border: 1px solid rgba(22,163,74,0.3); }

.step-chevron {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.survival-step.is-open .step-chevron { transform: rotate(180deg); color: var(--accent-amber); }

.step-body {
  display: none;
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.survival-step.is-open .step-body { display: block; }

/* Why This Matters block */
.why-block {
  background: rgba(217,119,6,0.04);
  border-left: 3px solid var(--accent-amber);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.why-block-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-amber);
  margin-bottom: 0.5rem;
  display: block;
}

.why-block p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }
.why-block strong { color: var(--text-primary); }

/* How To block */
.howto-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  border-radius: var(--radius);
}

.howto-block-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: block;
}

.howto-block p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }
.howto-block strong { color: var(--text-primary); }

/* Source badges */
.source-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }

.source-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 2px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition);
}

.source-badge:hover { border-color: var(--accent-amber); color: var(--accent-amber); text-decoration: none; }

/* --- Shelter Calculator --- */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.calc-inputs {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.calc-inputs h3 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.calc-field { margin-bottom: 1.25rem; }

.calc-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.calc-field input[type="number"],
.calc-field select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.calc-field input[type="number"]:focus,
.calc-field select:focus {
  outline: none;
  border-color: var(--accent-amber);
}

.calc-results {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.calc-results h3 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.calc-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
}

.calc-result-item:last-child { border-bottom: none; }

.calc-result-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.calc-result-label small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.calc-result-value {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-amber);
  white-space: nowrap;
}

.calc-result-unit {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-left: 0.3rem;
}

/* --- Special Groups Tabs --- */
.groups-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  overflow-x: auto;
}

.group-tab {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  margin-bottom: -1px;
}

.group-tab:hover { color: var(--text-secondary); }
.group-tab.active { color: var(--accent-amber); border-bottom-color: var(--accent-amber); }

.group-content { display: none; }
.group-content.active { display: block; }

/* --- PWA offline indicator in nav --- */
.nav-offline-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  background: rgba(22,163,74,0.15);
  border: 1px solid rgba(22,163,74,0.3);
  color: #4ade80;
  border-radius: 2px;
  margin-left: 0.5rem;
}

/* --- Responsive for new components --- */
@media (max-width: 768px) {
  .calculator-grid { grid-template-columns: 1fr; }
  .pwa-banner-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .pwa-banner-actions { width: 100%; }
  .btn-pwa-install, .btn-pwa-dismiss { flex: 1; text-align: center; justify-content: center; }
}
