/* FEMA Guy — theme driven by official logo (navy / red / sky / white)
   Circular badge aesthetic · mobile-first · AdSense-ready */

:root {
  /* Logo palette */
  --navy: #0a2a5c;
  --navy-deep: #061a3a;
  --navy-mid: #123a75;
  --red: #c41e3a;
  --red-bright: #e01e3c;
  --red-soft: #fde8ec;
  --sky: #3b82c4;
  --sky-bright: #5ba3e0;
  --sky-soft: #e8f3fc;
  --sky-wash: #d6ebfa;
  --grass: #5a9a4a;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #c5d4e8;
  --bg: #eef4fb;
  --surface: #ffffff;
  --warn: #9a3412;
  --warn-bg: #fff7ed;
  --ok: #0f766e;
  --ok-bg: #ecfdf5;
  --radius: 12px;
  --shadow: 0 2px 4px rgba(6, 26, 58, 0.06), 0 14px 36px rgba(6, 26, 58, 0.1);
  --max: 72rem;
  --sidebar: 18rem;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-display: "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, var(--sky-wash) 0%, transparent 55%),
    linear-gradient(180deg, #f4f8fd 0%, var(--bg) 40%, #e8eef8 100%);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--navy-mid);
  text-underline-offset: 0.15em;
}
a:hover { color: var(--red); }

/* —— Shell —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--navy);
  box-shadow: 0 1px 0 var(--red), 0 4px 16px rgba(6, 26, 58, 0.08);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.55rem 1.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--navy), 0 4px 12px rgba(6, 26, 58, 0.2);
  background: #fff;
}

.brand-text strong {
  display: block;
  font-size: 1.12rem;
  color: var(--navy);
  letter-spacing: -0.02em;
  font-weight: 800;
}

.brand-text strong .guy {
  color: var(--red);
}

.brand-text span {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.1rem;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--sky-soft);
  color: var(--navy);
}

.nav-cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%) !important;
  color: #fff !important;
  margin-left: 0.25rem;
  box-shadow: 0 2px 8px rgba(10, 42, 92, 0.25);
}
.nav-cta:hover {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-bright) 100%) !important;
  color: #fff !important;
}

.nav-toggle {
  display: none;
  border: 2px solid var(--navy);
  background: var(--surface);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-weight: 800;
  color: var(--navy);
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .nav.is-open { display: flex; }
  .nav a { border-radius: 8px; }
  .nav-cta { margin-left: 0; text-align: center; }
}

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

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 960px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) var(--sidebar);
    align-items: start;
  }
}

.content { min-width: 0; }

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 960px) {
  .sidebar { position: sticky; top: 5.25rem; }
}

/* —— Ads —— */
.ad-slot {
  background: linear-gradient(180deg, #f0f5fb, #e4ecf6);
  border: 1px dashed #94a8c4;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
  padding: 0.75rem;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.ad-slot strong { color: var(--ink-soft); font-size: 0.8rem; }
.ad-slot.ad-leader { min-height: 100px; margin-bottom: 1.25rem; }
.ad-slot.ad-inarticle { min-height: 120px; margin: 1.75rem 0; }
.ad-slot.ad-sidebar { min-height: 250px; }
.ad-slot.ad-footer { min-height: 90px; margin-top: 1.5rem; }

/* —— Hero —— */
.hero {
  background:
    linear-gradient(145deg, rgba(6, 26, 58, 0.92) 0%, rgba(10, 42, 92, 0.88) 50%, rgba(18, 58, 117, 0.9) 100%),
    radial-gradient(circle at 80% 20%, rgba(91, 163, 224, 0.35), transparent 45%);
  color: #e8f0ff;
  border-radius: 16px;
  padding: 1.5rem 1.35rem 1.65rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  border: 3px solid var(--navy);
  display: grid;
  gap: 1.15rem;
  align-items: center;
}

@media (min-width: 720px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 11rem;
    padding: 1.75rem 1.75rem 1.85rem;
  }
}

.hero::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--red) 50%, var(--navy) 100%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  right: -3rem;
  bottom: -3rem;
  width: 14rem;
  height: 14rem;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.hero-copy { position: relative; z-index: 1; min-width: 0; }

.hero-badge {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: min(11rem, 42vw);
  height: auto;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--navy), 0 12px 28px rgba(0, 0, 0, 0.35);
  background: #fff;
}

.hero-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #93c5fd;
}

.hero h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  font-weight: 800;
  max-width: 16ch;
}

.hero h1 .accent {
  color: #ffb4c0;
}

.hero p {
  margin: 0 0 1.15rem;
  max-width: 36rem;
  color: #c7d7f0;
  font-size: 1.02rem;
}

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

.hero-tagline {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fca5a5;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
}
.btn-primary:hover { background: var(--sky-soft); color: var(--navy-deep); }

.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.btn-solid {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #fff;
  border-color: var(--navy);
}
.btn-solid:hover {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-bright) 100%);
  border-color: var(--red);
  color: #fff;
}

.btn-outline {
  background: var(--surface);
  color: var(--navy);
  border-color: var(--line);
}
.btn-outline:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
}

/* —— Cards & panels —— */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.2rem;
  box-shadow: var(--shadow);
  position: relative;
}

.panel + .panel { margin-top: 1.15rem; }

.panel h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--navy);
  letter-spacing: -0.02em;
  font-weight: 800;
}

.panel h3 {
  margin: 1.35rem 0 0.45rem;
  font-size: 1.08rem;
  color: var(--navy);
  font-weight: 800;
}

.panel p { margin: 0 0 0.85rem; color: var(--ink-soft); }
.panel p:last-child { margin-bottom: 0; }

.panel ul, .panel ol {
  margin: 0 0 0.85rem;
  padding-left: 1.25rem;
  color: var(--ink-soft);
}
.panel li { margin-bottom: 0.35rem; }

.lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
}

/* Tip cards */
.tip-grid {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0 0;
}

@media (min-width: 640px) {
  .tip-grid { grid-template-columns: 1fr 1fr; }
}

.tip-card {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1rem 1.05rem;
  background: linear-gradient(180deg, #fff 0%, var(--sky-soft) 100%);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tip-card:hover {
  border-color: var(--sky);
  box-shadow: 0 6px 18px rgba(10, 42, 92, 0.08);
}

.tip-card .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--navy), var(--navy-mid));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 0 var(--red);
}

.tip-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--navy);
}

.tip-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* Cheat sheet entries */
.cs-item {
  border-top: 1px solid var(--line);
  padding: 1.1rem 0 0.25rem;
}
.cs-item:first-of-type { border-top: none; padding-top: 0; }

.cs-item h3 {
  margin: 0 0 0.4rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cs-item h3 .tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--red);
  background: var(--red-soft);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.callout {
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.callout-info {
  background: var(--sky-soft);
  border: 2px solid #9ec5ea;
  color: var(--navy);
}

.callout-warn {
  background: var(--warn-bg);
  border: 2px solid #fed7aa;
  color: var(--warn);
}

.callout-ok {
  background: var(--ok-bg);
  border: 2px solid #99f6e4;
  color: var(--ok);
}

/* Checklist */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checklist li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.checklist li:last-child { border-bottom: none; }

.checklist input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  accent-color: var(--navy);
  flex-shrink: 0;
}

.checklist label {
  cursor: pointer;
  flex: 1;
}

.checklist li.is-done label {
  text-decoration: line-through;
  color: var(--muted);
}

/* FAQ */
.faq details {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 0.65rem;
  padding: 0.15rem 0.9rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--navy);
  padding: 0.85rem 0;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+";
  display: inline-block;
  width: 1.25rem;
  color: var(--red);
  font-weight: 800;
}

.faq details[open] summary::before { content: "–"; }

.faq details p {
  margin: 0 0 0.95rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* Share + CTA bar */
.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 1.25rem 0 0.25rem;
}

.share-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--muted);
  margin-right: 0.25rem;
}

.share-btn {
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
}

/* Page title */
.page-hero {
  margin-bottom: 1.25rem;
  display: grid;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 640px) {
  .page-hero.has-logo {
    grid-template-columns: minmax(0, 1fr) 7.5rem;
  }
}

.page-hero-logo {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  justify-self: end;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--navy), var(--shadow);
  background: #fff;
}

.page-hero h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.5vw, 2rem);
  color: var(--navy);
  letter-spacing: -0.02em;
  font-weight: 800;
}

.page-hero p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 40rem;
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
}
.breadcrumb a { color: var(--muted); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { color: var(--red); }

/* Official CTA card */
.official-cta {
  background: linear-gradient(145deg, var(--sky-soft), #fff 60%);
  border: 2px solid #9ec5ea;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: 0 4px 14px rgba(10, 42, 92, 0.06);
}

.official-cta h3 {
  margin: 0 0 0.4rem;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 800;
}

.official-cta p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Logo spotlight strip */
.logo-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0;
}

.logo-values span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
  background: #fff;
  border: 2px solid var(--navy);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
}

.logo-values span::before {
  content: "✓ ";
  color: var(--red);
}

/* Icon tiles */
.icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.icon-tile {
  flex: 1 1 8rem;
  min-width: 7.5rem;
  text-align: center;
  padding: 1rem 0.75rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, var(--sky-soft));
}

.icon-tile .glyph {
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
  line-height: 1;
}

.icon-tile span {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--navy);
}

/* Footer */
.site-footer {
  border-top: 4px solid var(--navy);
  background:
    linear-gradient(180deg, var(--navy-deep) 0%, #040f22 100%);
  color: #b6c7e0;
  padding: 2rem 1.15rem 2.5rem;
  margin-top: 1rem;
  position: relative;
}

.site-footer::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--red) 50%, var(--navy) 100%);
  margin: -2rem -1.15rem 1.5rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.footer-brand img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--red);
  background: #fff;
}

.footer-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

.site-footer h3 {
  margin: 0 0 0.5rem;
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 800;
}

.site-footer a { color: #93c5fd; font-weight: 600; }
.site-footer a:hover { color: #fecdd3; }

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li { margin-bottom: 0.35rem; font-size: 0.9rem; }

.disclaimer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  line-height: 1.55;
  color: #8fa3c1;
}

.disclaimer strong { color: #c7d7f0; }

.footer-meta {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: #7a90b0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media print {
  .site-header, .sidebar, .ad-slot, .nav-toggle, .action-bar, .hero-actions .btn-secondary, .hero-badge {
    display: none !important;
  }
  body { background: #fff; }
  .hero { box-shadow: none; border: 1px solid #ccc; }
}
