/* ==========================================================================
   BallotBase — shared brand layer.
   ==========================================================================
   Extracted from ballotbase-landing/styles.css. This is ONLY the part both
   sites genuinely share: colour tokens, DM Sans, the nav bar, buttons, the
   navy footer.

   It is deliberately NOT an import of styles.css. That file is 2,114 lines and
   is overwhelmingly landing-page furniture (.hero-*, .blog-post-*, .db-*,
   .cov-*, .chain-*, .cta-*) that civic never renders. Pulling all of it in
   would mean a hero restyle on the marketing site could visually break the
   benefits tool — the same coupling we refuse to accept between the two
   codebases, just wearing CSS.

   SINGLE SOURCE OF TRUTH, EVENTUALLY: on the droplet this becomes one file
   both nginx server blocks alias, so ballotbase.io and civic.ballotbase.io
   read the same bytes and neither can drift. Until then it is a copy, and a
   change to the landing site's tokens needs mirroring here.

   Matching the marketing site means light-only: styles.css sets
   `body { background: var(--white) }` with no dark theme, so civic doesn't
   ship one either. Divergence here would be more jarring than no dark mode.
   ========================================================================== */

:root {
  /* Brand — copied verbatim from ballotbase-landing/styles.css */
  --blue: #1a56db;
  --blue-dark: #1341a8;
  --blue-light: #eff6ff;
  --green: #0e9f6e;
  --green-light: #f0fdf4;
  --navy: #0f172a;
  --navy-2: #1e293b;
  --gray: #64748b;
  --gray-light: #94a3b8;
  --light: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --paper: #f7f8fa;
  --paper-alt: #eef1f6;
  --border-2: #eef1f5;
  --flag-border: #bcd0f2;
  --blue-60: #60a5fa;
  --navy-950: #0b1120;
  --ink-2: #475569;
  --red: #ef4444;
  --red-text: #dc2626;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  --green-bg: #f0fdf4;
  --green-border: #bbf7d0;
  --amber-text: #b45309;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;

  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'SFMono-Regular', 'Segoe UI Mono', Consolas, monospace;
  --shell: 1200px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--white);
  color: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---- nav ---------------------------------------------------------------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 max(40px, calc((100% - var(--shell)) / 2)); height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo img { height: 40px; width: auto; }
.nav-right { display: flex; align-items: center; gap: 24px; }
.nav-link {
  font-size: 14px; color: var(--gray); text-decoration: none;
  font-weight: 400; transition: color 0.2s;
}
.nav-link:hover { color: var(--navy); }
.nav-link.on { color: var(--navy); font-weight: 500; }
.nav-cta {
  background: var(--blue); color: white;
  padding: 9px 20px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  text-decoration: none; transition: background 0.2s;
}
.nav-cta:hover { background: var(--blue-dark); }
.nav-cta-ghost {
  color: var(--blue); border: 1.5px solid var(--blue);
  padding: 7.5px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  text-decoration: none; transition: background 0.2s, color 0.2s;
}
.nav-cta-ghost:hover { background: var(--blue); color: white; }

/* ---- nav dropdown ------------------------------------------------------ */
/* Copied from ballotbase-landing/styles.css. The marketing site already has
   this pattern including a `disabled` item state, which is exactly what an
   unbuilt tool needs — so listing the roadmap in the nav costs no new CSS. */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  background: none; border: none; cursor: pointer;
  font-size: 14px; color: var(--gray); font-weight: 400;
  font-family: var(--sans);
  display: flex; align-items: center; gap: 4px;
  padding: 0; transition: color 0.2s;
}
.nav-dropdown-trigger:hover,
.nav-dropdown-trigger[aria-expanded="true"] { color: var(--navy); }
.nav-dropdown-trigger.on { color: var(--navy); font-weight: 500; }
.nav-dropdown-caret { transition: transform 0.15s; }
.nav-dropdown-trigger[aria-expanded="true"] .nav-dropdown-caret { transform: rotate(180deg); }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  min-width: 260px;
  z-index: 200;
  padding: 4px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu.open { display: block; }
/* Invisible bridge above the menu so mouse doesn't fall through the gap */
.nav-dropdown-menu::before {
  content: ''; position: absolute; top: -8px; left: 0; right: 0; height: 8px;
}
.nav-dropdown-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 12px;
  font-size: 13px; color: var(--navy);
  text-decoration: none; cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
  font-weight: 400;
}
a.nav-dropdown-item:hover { background: var(--light); }
.nav-dropdown-item.on { background: var(--blue-light); color: var(--blue-dark); font-weight: 500; }
.nav-dropdown-item.disabled { color: var(--gray-light); cursor: default; }
.nav-dropdown-item.disabled:hover { background: none; }
.nav-dropdown-item .tag {
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gray-light); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 999px; white-space: nowrap;
}
.nav-dropdown-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gray-light); padding: 8px 12px 2px; pointer-events: none;
}
.nav-dropdown-divider { height: 1px; background: var(--border); margin: 6px 12px; }

/* Nav is fixed, so every page needs the offset. */
main, .page { padding-top: 64px; }

/* ---- type --------------------------------------------------------------- */
.section-title {
  font-family: var(--sans);
  font-size: 32px; font-weight: 700;
  color: var(--navy); margin-bottom: 14px;
  line-height: 1.2; letter-spacing: -0.01em;
}

/* ---- buttons ------------------------------------------------------------ */
.btn {
  display: inline-block; font: inherit; font-weight: 500; font-size: 15px;
  background: var(--blue); color: #fff; border: 0; border-radius: 8px;
  padding: 11px 22px; cursor: pointer; text-decoration: none;
  transition: background 0.2s;
}
.btn:hover { background: var(--blue-dark); }
.btn-ghost {
  background: transparent; color: var(--blue);
  border: 1.5px solid var(--blue); padding: 9.5px 20px;
}
.btn-ghost:hover { background: var(--blue); color: #fff; }

/* ---- footer ------------------------------------------------------------- */
footer {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 24px 48px;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
}
.footer-logo img { height: 28px; width: auto; filter: brightness(0) invert(1); opacity: 0.7; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 12px; color: rgba(255,255,255,0.35); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: white; }
.footer-copy { font-size: 11px; color: rgba(255,255,255,0.2); }

@media (max-width: 720px) {
  nav { padding: 0 20px; }
  .nav-right { gap: 14px; }
  .nav-logo img { height: 30px; }
  footer { padding: 24px 20px; }
}
