/*
 * Fraud Ranger Styles
 * Clean, calm, government-adjacent design
 */

:root {
  --primary: #000;
  --accent: #ffffff;
  --background: #f7f7f7;
  --success: #2F7A4D;
  --warning: #B45309;
  --text: #333;
  --heading: #111;
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
}

/* Layout */
.container {
  width: 90%;
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 0;
}

/* ================= HEADER ================= */

.site-header {
  background-color: var(--primary);
  color: var(--accent);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.2px;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav-list a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.2;
  white-space: nowrap;
}

.nav-list a:hover,
.nav-list a.active,
.footer-links a:hover {
  text-decoration: underline;
}

/* ================= HERO ================= */

.hero {
  background-color: var(--primary);
  color: var(--accent);
  text-align: center;
  padding: 4rem 1rem;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
  color: var(--accent);
}

.hero p {
  color: var(--accent);
  max-width: 700px;
  margin: 0 auto 1.75rem auto;
  font-size: 1rem;
}

/* Buttons */

.button-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--accent);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--success);
  color: var(--accent);
  border-color: var(--success);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent);
}

.btn:hover {
  opacity: 0.9;
}

/* ================= WARNING BOX ================= */

.warning-box {
  border: 1px solid var(--warning);
  background-color: #fff7ed;
  color: var(--warning);
  padding: 1rem;
  margin: 2rem auto;
  border-radius: 4px;
}

/* ================= WHAT HAPPENED CARDS ================= */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.card {
  display: block;
  padding: 1rem;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  text-decoration: none;
  color: var(--heading);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
}

.card:hover {
  border-color: var(--success);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* ================= DECISION TREE ================= */

.decision-tree {
  margin-top: 2rem;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 1rem;
  border-radius: 4px;
}

.decision-tree label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.decision-tree select {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.decision-result {
  padding: 0.75rem;
  background-color: #f9f9f9;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  min-height: 2rem;
}

/* Keep list numbers inside the box */
.decision-result ol {
  list-style-position: inside;
  margin: 0;
  padding: 0;
}

.decision-result li {
  margin: 0.4rem 0;
}

/* ================= CONTENT HEADINGS ================= */

main h1,
main h2,
main h3 {
  color: var(--heading);
}

main h1 {
  margin: 1.5rem 0 1rem;
  font-size: 1.5rem;
}

main h2 {
  margin: 1.25rem 0 0.75rem;
  font-size: 1.25rem;
}

main h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

main p,
main ul,
main ol {
  margin-bottom: 1rem;
  max-width: 800px;
}

/* ✅ Mobile-safe link wrapping (fixes report.html long links cleanly) */
main a {
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* ================= FOOTER ================= */

.site-footer {
  background-color: var(--primary);
  color: var(--accent);
  padding: 1rem 0;
  margin-top: 3rem;
}

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8rem;
}

.footer-links a.active {
  text-decoration: underline;
}

/* ================= ACCESSIBILITY ================= */

a:focus,
button:focus,
select:focus {
  outline: 2px solid var(--success);
  outline-offset: 2px;
}

/* ================= RESPONSIVE ================= */

/* Tablet & below: make header/nav look modern and controlled */
@media (max-width: 820px) {
  .nav-list {
    gap: 0.9rem;
  }
  .nav-list a {
    font-size: 0.88rem;
  }
}

/* Mobile: modern stacked header + clean nav wrapping */
@media (max-width: 600px) {
  /* Header becomes vertical, like modern mobile sites */
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .logo {
    font-size: 1.15rem;
  }

  /* Nav becomes a compact, wrapped “pill row” feel */
  .nav-list {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: flex-start;
  }

  .nav-list a {
    font-size: 0.85rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    white-space: nowrap;
  }

  .nav-list a:hover,
  .nav-list a.active {
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.10);
  }

  /* Hero spacing/typography tuned for small screens */
  .hero {
    padding: 3rem 1rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 0.98rem;
  }

  /* Buttons stack nicely */
  .button-group {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 320px;
    text-align: center;
  }

  /* Cards go single column */
  .cards-grid {
    grid-template-columns: 1fr;
  }

  /* Long links: keep them readable (avoid ugly mid-word breaks where possible) */
  main a {
    line-height: 1.35;
  }
}