/* af-ai.org — dark civic-tech, mobile-first */
:root {
  --bg: #070b14;
  --bg2: #0c1220;
  --surface: #121a2b;
  --surface2: #182234;
  --border: #243049;
  --text: #e8eef8;
  --muted: #93a0b8;
  --accent: #3b82f6;
  --accent2: #60a5fa;
  --teal: #2dd4bf;
  --coral: #f97366;
  --success: #34d399;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 10% -10%, #132044 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #0d2830 0%, transparent 50%), var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

a {
  color: var(--accent2);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: #fff;
}

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

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(7, 11, 20, 0.85);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.brand span {
  font-size: 1.05rem;
}
.site-nav {
  display: flex;
  gap: 0.25rem 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.35rem 0.2rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
}
.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: #fff;
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
  transition: 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover {
  color: #fff;
  filter: brightness(1.08);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent2);
  color: #fff;
}
.btn-text {
  background: none;
  border: none;
  color: var(--accent2);
  cursor: pointer;
  padding: 0;
  font: inherit;
}

/* Hero */
.hero {
  padding: 3.5rem 0 2.5rem;
}
.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 880px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}
.hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
.hero .lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 38rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.hero-note {
  font-size: 0.85rem;
  color: var(--muted);
}
.hero-card {
  background: linear-gradient(160deg, var(--surface), var(--bg2));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.hero-card img.logo-big {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  display: block;
  margin: 0 auto 1rem;
}
.progress-ring {
  text-align: center;
  padding: 1rem;
  background: var(--surface2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.progress-ring strong {
  display: block;
  font-size: 2rem;
  color: var(--teal);
}
.progress-ring span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Sections */
section {
  padding: 2.75rem 0;
}
.section-title {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin: 0 0 0.5rem;
}
.section-sub {
  color: var(--muted);
  margin: 0 0 1.75rem;
  max-width: 40rem;
}

.grid-3 {
  display: grid;
  gap: 1rem;
}
@media (min-width: 720px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.card .num {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent2);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* Pricing */
.price-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 800px) {
  .price-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4), var(--shadow);
  background: linear-gradient(180deg, #152238, var(--surface));
}
.price-card .badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.12);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
.price {
  font-size: 2rem;
  font-weight: 800;
}
.price small {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}
.price-card ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.1rem;
  color: var(--muted);
  flex: 1;
}
.price-side {
  display: grid;
  gap: 0.75rem;
}
.mini-price {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}
.mini-price strong {
  color: #fff;
}

/* FAQ */
.faq-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.faq-search-wrap {
  position: relative;
  margin-bottom: 1rem;
}
.faq-search-wrap input {
  width: 100%;
  padding: 0.95rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1.05rem;
}
.faq-search-wrap input:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}
.suggest-box {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  z-index: 20;
  box-shadow: var(--shadow);
}
.suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  padding: 0.7rem 1rem;
  cursor: pointer;
  font: inherit;
  border-bottom: 1px solid var(--border);
}
.suggest-item:hover,
.suggest-item:focus {
  background: rgba(59, 130, 246, 0.15);
}
.faq-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.faq-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.chip {
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.chip.active,
.chip:hover {
  border-color: var(--accent);
  color: #fff;
  background: rgba(59, 130, 246, 0.15);
}
.faq-results {
  display: grid;
  gap: 0.85rem;
  max-height: 70vh;
  overflow: auto;
  padding-right: 0.25rem;
}
.faq-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.faq-card-top {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
}
.faq-cat {
  font-size: 0.75rem;
  color: var(--teal);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.faq-match {
  font-size: 0.7rem;
  color: var(--accent2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}
.faq-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.faq-card p {
  margin: 0;
  color: var(--muted);
}
.faq-src {
  margin-top: 0.65rem !important;
  font-size: 0.85rem;
}
.faq-empty {
  padding: 1.5rem;
  color: var(--muted);
  text-align: center;
}
#faq-count {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Log tool */
.tool-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 860px) {
  .tool-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}
label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
input,
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  margin-bottom: 0.75rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th,
td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--border);
}
th {
  color: var(--muted);
  font-weight: 600;
}
.table-wrap {
  overflow-x: auto;
}

/* Disclaimer */
.disclaimer {
  background: rgba(249, 115, 102, 0.08);
  border: 1px solid rgba(249, 115, 102, 0.35);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.disclaimer strong {
  color: #fecaca;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: #fff;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.muted {
  color: var(--muted);
}

/* Legal pages */
.prose {
  max-width: 42rem;
}
.prose h1 {
  margin-top: 0;
}
.prose h2 {
  margin-top: 1.75rem;
  font-size: 1.2rem;
}
.prose p,
.prose li {
  color: var(--muted);
}

/* Mobile nav */
@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }
  .site-nav {
    display: none;
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 64px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
  }
  .site-nav.open {
    display: flex;
  }
  .header-inner {
    position: relative;
  }
}

/* Print-friendly log */
@media print {
  .site-header,
  .nav-toggle,
  .btn,
  .faq-shell {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}
