/* EP Tools Home — the foyer for electionprotectiontools.org.
 *
 * Colors are the official Common Cause palette, copied from
 * cc-brand/tokens/brand.css (Brand Guide Mar 2026, pp. 29-31). Don't invent
 * new ones here; if you need a color that isn't below, it belongs in cc-brand
 * first.
 *
 * TYPE IS DELIBERATELY NOT THE BRAND FACE. Season Sans/Serif are licensed
 * typefaces and must never be served from a public host, and this host is
 * public. Inter is the stand-in the EP roving tool already uses, so the foyer
 * and the rooms read as one building.
 */

:root {
  /* Core */
  --cc-pathway-green: #064715;
  --cc-signal-yellow: #FDC80F;
  /* Accents — sparingly, never combined with each other */
  --cc-active-orange: #FF6120;
  --cc-focus-blue: #0C77FF;   /* AA-large only: big text and links, not body copy */
  /* Foundational neutrals */
  --cc-light: #FBFFFE;
  --cc-anchor: #1C1C1C;

  /* Neutrals derived from Anchor, for borders and secondary text */
  --ink-muted: #55585a;
  --ink-subtle: #7b7f81;
  --rule: #e2e6e4;
  --panel: #ffffff;

  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica,
               Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Consolas, monospace;

  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(28, 28, 28, 0.06);
  --shadow-md: 0 6px 20px rgba(28, 28, 28, 0.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  background: var(--cc-light);
  color: var(--cc-anchor);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-inset {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- header ------------------------------------------------------------- */

.site-header {
  background: var(--cc-pathway-green);
  border-bottom: 3px solid var(--cc-signal-yellow);
}

.site-header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 20px;
}

.brand-lockup {
  display: block;
  height: 26px;
  width: auto;
}

.brand-product {
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.86);
}

/* ---- main --------------------------------------------------------------- */

.site-main {
  flex: 1;
  padding: 44px 0 56px;
}

.page-title {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-subtitle {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 54ch;
}

/* ---- the tool list (rendered from TOOLS in tools.js) -------------------- */

.tool-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tool-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name  chev"
    "blurb chev"
    "host  chev";
  align-items: center;
  gap: 4px 16px;
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--cc-pathway-green);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 120ms ease, transform 120ms ease, border-color 120ms ease;
}

a.tool-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-left-color: var(--cc-active-orange);
}

a.tool-card:focus-visible {
  outline: 3px solid var(--cc-focus-blue);
  outline-offset: 2px;
}

.tool-name {
  grid-area: name;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}

a.tool-card .tool-name { color: var(--cc-focus-blue); }

.tool-blurb {
  grid-area: blurb;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.tool-host {
  grid-area: host;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-subtle);
}

.tool-chev {
  grid-area: chev;
  font-size: 26px;
  line-height: 1;
  color: var(--ink-subtle);
}

/* A tool announced before its host exists: no link, no chevron. */
.tool-card-soon {
  grid-template-columns: 1fr;
  grid-template-areas: "name" "blurb" "host";
  border-left-color: var(--rule);
  background: transparent;
  box-shadow: none;
}
.tool-card-soon .tool-name { color: var(--ink-muted); }

.tool-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--cc-signal-yellow);
  color: var(--cc-anchor);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---- notes -------------------------------------------------------------- */

.noscript,
.access-note {
  margin: 28px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 60ch;
}

.noscript {
  padding: 14px 16px;
  background: #fff8e0;
  border: 1px solid var(--cc-signal-yellow);
  border-radius: var(--radius);
  color: var(--cc-anchor);
}

/* ---- footer ------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 18px 0;
  font-size: 13px;
  color: var(--ink-subtle);
}

.site-footer .page-inset {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: space-between;
}

.site-footer a {
  color: var(--cc-pathway-green);
  font-weight: 500;
}

@media (max-width: 520px) {
  .site-main { padding: 32px 0 44px; }
  .page-title { font-size: 26px; }
  .tool-card { padding: 18px; }
  .brand-product { padding-left: 0; border-left: 0; }
}
