/* ============================================================
   Safe & Informed — Global Stylesheet
   Pro palette: navy #0C0C12, gold #C9A020, text #F0F0F8
   ============================================================ */

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

:root {
  --bg:        #0C0C12;
  --bg2:       #18181E;
  --bg3:       #222230;
  --gold:      #C9A020;
  --gold-dim:  #A07A10;
  --text:      #F0F0F8;
  --text2:     #A0A0B8;
  --sep:       #262634;
  --radius:    12px;
  --max:       1100px;
}

html { scroll-behavior: smooth; }

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

a { color: var(--gold); text-decoration: none; }
a:hover { color: #E8C040; }

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

/* ── Layout ── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(12,12,18,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sep);
  padding: 0 24px;
}
.nav-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.05rem; color: var(--text);
}
.nav-logo .dot { color: var(--gold); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { color: var(--text2); font-size: 0.9rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--gold); color: #0C0C12 !important;
  padding: 7px 18px; border-radius: 20px;
  font-weight: 600; font-size: 0.85rem !important;
  transition: background .2s;
}
.nav-cta:hover { background: #E8C040 !important; }
/* Mobile hamburger (pure-CSS checkbox toggle; the button itself only shows under 640px). The
   checkbox is kept in the DOM but visually hidden so it stays keyboard-focusable. */
.nav-toggle-cb { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.nav-toggle { display: none; }
.nav-toggle span {
  display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--text);
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle-cb:focus-visible + .nav-toggle { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ── HERO ── */
.hero {
  text-align: center;
  padding: 72px 24px 80px;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,160,32,0.12) 0%, transparent 65%);
}
/* Accessible/SEO-only text: present for search engines & screen readers, hidden visually
   (the headline itself is rendered inside the hero banner image). */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* Cross-device hero showcase (the device lineup; the headline is real text above it). */
.hero-banner {
  display: block;
  width: 100%;
  max-width: 1120px;
  height: auto;
  margin: 28px auto 8px;
  /* Soft gold halo so the near-black artwork lifts off the near-black page. */
  filter: drop-shadow(0 0 120px rgba(201,160,32,0.10));
}
.hero-badge {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.hero h1 span { color: var(--gold); }
.hero p {
  font-size: 1.15rem;
  color: var(--text2);
  max-width: 580px;
  margin: 0 auto 40px;
}
.hero-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--gold); color: #0C0C12;
  padding: 13px 28px; border-radius: 50px;
  font-weight: 700; font-size: 0.95rem;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: #E8C040; color: #0C0C12; transform: translateY(-2px); }
.btn-secondary {
  border: 1px solid var(--sep); color: var(--text);
  padding: 13px 28px; border-radius: 50px;
  font-weight: 600; font-size: 0.95rem;
  display: inline-flex; align-items: center; gap: 8px;
  transition: border-color .2s, transform .15s;
  background: var(--bg2);
}
.btn-secondary:hover { border-color: var(--gold); color: var(--text); transform: translateY(-2px); }

/* ── SECTION ── */
section { padding: 80px 24px; }
.section-label {
  display: block;
  color: var(--gold); font-size: 0.75rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 12px; font-weight: 600;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.2; margin-bottom: 16px;
}
.section-sub {
  color: var(--text2); font-size: 1.05rem;
  max-width: 560px; margin-bottom: 48px;
}

/* ── FEATURES GRID ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg2);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .2s;
}
.feature-card:hover { border-color: var(--gold); }
.feature-icon {
  font-size: 1.8rem; margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 8px;
}
.feature-card p { color: var(--text2); font-size: 0.9rem; line-height: 1.6; }

/* ── WHY SECTION ── */
.why-section { background: var(--bg2); }
.why-list { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.why-list li {
  display: flex; gap: 16px; align-items: flex-start;
}
.why-list .check {
  color: var(--gold); font-size: 1.1rem; flex-shrink: 0; margin-top: 2px;
}
.why-list strong { display: block; font-weight: 700; margin-bottom: 2px; }
.why-list span { color: var(--text2); font-size: 0.9rem; }

/* ── DOWNLOAD ── */
.download-section { text-align: center; }
/* Centre the 560px-wide subtitle block within the centred download section (it defaults to left). */
.download-section .section-sub { margin-left: auto; margin-right: auto; }
.store-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.store-btn {
  background: var(--bg2); border: 1px solid var(--sep);
  border-radius: var(--radius); padding: 12px 22px;
  display: inline-flex; align-items: center; justify-content: flex-start; gap: 14px;
  min-width: 232px; box-sizing: border-box;
  color: var(--text);
  cursor: default;
  transition: border-color .2s, transform .15s;
}
.store-btn[aria-disabled="true"] { pointer-events: none; }
.store-btn:hover { border-color: var(--gold); transform: translateY(-2px); }
.store-btn .store-icon { width: 28px; height: 28px; flex: none; }
.store-btn-text { text-align: left; }

/* Connect: Google Preferred Source button + social follow row. */
.connect { margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.preferred-source { display: flex; justify-content: center; }
/* Google injects an absolutely-positioned iframe into this div; give it a real box so it can't
   collapse to zero width inside the flex row (the button then shows once the domain is eligible). */
.preferred-source [google-add-preferred-source-btn] { position: relative; width: 260px; flex: none; }
.social-follow { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.social-label { color: var(--text2); font-size: 0.85rem; letter-spacing: 0.04em; }
.social-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.social-links a {
  color: var(--text2); width: 22px; height: 22px; display: inline-flex;
  transition: color .2s, transform .15s;
}
.social-links a:hover { color: var(--gold); transform: translateY(-2px); }
.social-links svg { width: 100%; height: 100%; fill: currentColor; }
.store-btn-text small { display: block; color: var(--text2); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }
.store-btn-text strong { display: block; color: var(--text); font-size: 1rem; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--sep);
  padding: 40px 24px;
  text-align: center;
  color: var(--text2); font-size: 0.85rem;
}
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-links { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.footer-links a { color: var(--text2); font-size: 0.85rem; transition: color .2s; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { color: var(--text2); }

/* Brand mark (logo) shown next to the wordmark in the nav + footer — round, matching the social badge. */
.brand-mark { display: block; flex: none; border-radius: 50%; }
.nav-logo .brand-mark { width: 28px; height: 28px; }
.footer-brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.95rem; color: var(--text);
  margin-bottom: 18px;
}
.footer-brand .brand-mark { width: 24px; height: 24px; border-radius: 50%; }
.footer-brand .dot { color: var(--gold); }

/* ── PAGE HEADER (inner pages) ── */
.page-header {
  padding: 64px 24px 48px;
  border-bottom: 1px solid var(--sep);
  background: radial-gradient(ellipse at 50% 0%, rgba(201,160,32,0.08) 0%, transparent 60%);
}
.page-header h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; }
.page-header p { color: var(--text2); margin-top: 10px; font-size: 1rem; }

/* ── PROSE (about, privacy, terms) ── */
.prose {
  max-width: 760px; margin: 0 auto;
  padding: 56px 24px 80px;
}
.prose h2 { font-size: 1.4rem; margin: 40px 0 12px; color: var(--text); }
.prose h3 { font-size: 1.05rem; font-weight: 700; margin: 28px 0 8px; color: var(--gold); }
.prose p { color: var(--text2); margin-bottom: 16px; line-height: 1.75; }
.prose ul { color: var(--text2); padding-left: 24px; margin-bottom: 16px; }
.prose ul li { margin-bottom: 8px; line-height: 1.7; }
.prose a { color: var(--gold); }
.prose .last-updated {
  display: inline-block;
  background: var(--bg2); border: 1px solid var(--sep);
  border-radius: 8px; padding: 8px 16px;
  font-size: 0.8rem; color: var(--text2);
  margin-bottom: 40px;
}

/* ── FORUM ── */
.forum-section { padding: 56px 24px 80px; }
.forum-intro { color: var(--text2); margin-bottom: 48px; max-width: 620px; }
.forum-group { margin-bottom: 52px; }
.forum-group-title {
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--gold); margin-bottom: 16px;
  padding-bottom: 10px; border-bottom: 1px solid var(--sep);
}
.forum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.forum-card {
  background: var(--bg2); border: 1px solid var(--sep);
  border-radius: var(--radius); padding: 18px 20px;
  display: flex; align-items: center; gap: 12px;
  transition: border-color .2s, background .2s;
  cursor: pointer;
}
.forum-card:hover { border-color: var(--gold); background: var(--bg3); }
.forum-card .flag { font-size: 1.4rem; }
.forum-card .forum-card-text strong { display: block; font-size: 0.9rem; font-weight: 600; }
.forum-card .forum-card-text small { color: var(--text2); font-size: 0.75rem; }

.rules-box {
  background: var(--bg2); border: 1px solid var(--sep);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius); padding: 24px 28px;
  margin-bottom: 48px;
}
.rules-box h3 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.rules-box ol { color: var(--text2); padding-left: 20px; }
.rules-box ol li { margin-bottom: 8px; font-size: 0.9rem; line-height: 1.6; }

/* ── ABOUT ── */
.mission-card {
  background: var(--bg2); border: 1px solid var(--sep);
  border-radius: var(--radius); padding: 32px;
  margin-bottom: 32px;
}
.mission-card h3 { color: var(--gold); font-size: 1rem; margin-bottom: 10px; }
.mission-card p { color: var(--text2); font-size: 0.95rem; }

.team-note {
  background: var(--bg3); border-radius: var(--radius);
  padding: 24px 28px; margin-top: 40px;
  border: 1px solid var(--sep);
  color: var(--text2); font-size: 0.9rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 820px) {
  /* Show the hamburger; turn the link list into a dropdown under the sticky bar. */
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: 5px; width: 42px; height: 42px; margin: -6px -8px -6px 0; cursor: pointer; flex: none;
  }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--sep);
    padding: 6px 0; box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  }
  .nav-toggle-cb:checked ~ .nav-links { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 24px; font-size: 1rem; }
  .nav-links a:not(.nav-cta):hover { background: var(--bg2); }
  .nav-cta { display: block; margin: 10px 24px 6px; text-align: center; padding: 12px 18px; border-radius: 12px; }
  /* Animate the bars into an X when open. */
  .nav-toggle-cb:checked + .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-cb:checked + .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-toggle-cb:checked + .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero { padding: 70px 20px 56px; }
  section { padding: 56px 20px; }
  .forum-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ===== Community directory (added) ===== */
a.forum-card { text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
a.forum-card:hover { border-color: var(--gold); transform: translateY(-2px); }

.dl-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

.feed-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.feed-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--bg2); border: 1px solid var(--sep); border-radius: var(--radius); padding: 14px 16px;
}
.feed-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feed-main strong { color: var(--text); font-size: 0.98rem; }
.feed-main small { color: var(--text2); font-size: 0.82rem; }
.feed-desc { color: var(--text2); font-size: 0.82rem; margin-top: 2px; }
.report-btn {
  flex-shrink: 0; background: transparent; border: 1px solid var(--sep); color: var(--text2);
  font-size: 0.8rem; padding: 7px 12px; border-radius: 9px; cursor: pointer; transition: all .2s;
}
.report-btn:hover:not(:disabled) { border-color: #c0392b; color: #e05555; }
.report-btn:disabled { opacity: .6; cursor: default; }
.feed-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.add-btn {
  background: var(--gold); border: 1px solid var(--gold); color: #0C0C12;
  font-size: 0.8rem; font-weight: 600; padding: 7px 14px; border-radius: 9px;
  text-decoration: none; white-space: nowrap; transition: all .2s;
}
.add-btn:hover { background: #E8C040; transform: translateY(-1px); }

/* Long feed domains have no spaces to wrap on — let them break instead of overflowing under the
   action buttons (mobile overlap bug). */
.feed-main strong, .feed-main small { overflow-wrap: anywhere; }

/* On narrow screens the source name + the two action buttons can't share one row without the domain
   sliding under "Add to app". Stack the card: text on top, full-width buttons below. */
@media (max-width: 560px) {
  .feed-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .feed-actions { width: 100%; }
  .feed-actions .add-btn, .feed-actions .report-btn { flex: 1 1 0; text-align: center; }
}

.disclaimer { color: var(--text2); font-size: 0.8rem; line-height: 1.6; margin: 24px 0; }
.empty { color: var(--text2); text-align: center; padding: 24px; }

.suggest-box {
  background: var(--bg2); border: 1px solid var(--sep); border-radius: var(--radius);
  padding: 24px; margin-top: 32px;
}
.suggest-box h3 { color: var(--text); margin: 0 0 4px; }
.suggest-hint { color: var(--text2); font-size: 0.85rem; margin: 0 0 16px; }
.suggest-box input, .suggest-box textarea, .suggest-box select,
.page-header input {
  width: 100%; background: var(--bg3); border: 1px solid var(--sep); color: var(--text);
  border-radius: 9px; padding: 10px 12px; font-size: 0.9rem; margin-bottom: 10px; font-family: inherit;
}
.suggest-box textarea { min-height: 64px; resize: vertical; }
.suggest-row { display: flex; gap: 10px; }
.suggest-row select { flex: 1; }
.suggest-msg { font-size: 0.85rem; margin-top: 6px; min-height: 1em; }
.suggest-msg.ok { color: #57b955; }
.suggest-msg.err { color: #e05555; }

.admin-row { align-items: flex-start; }
.admin-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.admin-actions button { cursor: pointer; }
.sg-label { display:block; color: var(--text2); font-size: 0.8rem; margin: 2px 0 8px; }

/* ---- Blog (index list + single post) ---- */
.blog-list { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin: 0 auto; }
a.blog-card {
  display: flex; gap: 16px; align-items: stretch; text-decoration: none; color: inherit;
  background: var(--bg2); border: 1px solid var(--sep); border-radius: var(--radius);
  padding: 14px; transition: border-color .2s, transform .2s;
}
a.blog-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.blog-card-cover { flex: 0 0 120px; }
.blog-card-cover img { width: 120px; height: 84px; object-fit: cover; border-radius: 10px; display: block; }
.blog-card-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.blog-card-text strong { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.blog-card-text time { font-size: 0.78rem; color: var(--text2); }
.blog-card-text p { margin: 0; color: var(--text2); font-size: 0.9rem; }
.blog-meta { color: var(--text2); font-size: 0.9rem; margin-top: 4px; }
.blog-post .blog-hero { width: 100%; border-radius: var(--radius); margin: 0 0 20px; display: block; }
.blog-post hr { border: none; border-top: 1px solid var(--sep); margin: 32px 0 16px; }
@media (max-width: 560px) {
  a.blog-card { flex-direction: column; }
  .blog-card-cover, .blog-card-cover img { width: 100%; flex-basis: auto; height: 160px; }
}

/* ── Prose tables (e.g. the Kreel permission table) ── */
.prose .table-wrap { overflow-x: auto; margin: 0 0 20px; }
.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  overflow: hidden;
}
.prose th, .prose td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--sep);
  vertical-align: top;
  color: var(--text2);
  line-height: 1.6;
}
.prose thead th {
  background: var(--bg2);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}
.prose tbody tr:last-child td { border-bottom: none; }
.prose td code, .prose th code {
  background: var(--bg3);
  color: var(--gold);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.86em;
}

/* ── Kreel landing: local-first callout ── */
.kreel-callout {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--bg2);
  border: 1px solid var(--sep);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 8px 0 28px;
}
.kreel-callout .kreel-callout-icon { font-size: 1.6rem; line-height: 1; flex: none; }
.kreel-callout p { margin: 0; color: var(--text2); }
.kreel-callout strong { color: var(--text); }
