:root {
  /* Brand palette */
  --ink: #0B1F3A;       /* deep navy — text, headers, ghost buttons */
  --rally: #E5462C;     /* warm red — primary CTA, triggered state */
  --cyan: #3DA9C7;      /* medium cyan — secondary accents */
  --cyan-deep: #1F6F8B; /* deeper cyan — progress bar, links */
  --paper: #F4EFE6;     /* warm off-white — page background */

  /* Semantic mappings */
  --bg: var(--paper);
  --fg: var(--ink);
  --muted: rgba(11, 31, 58, 0.62);
  --accent: var(--rally);
  --accent-fg: #fff;
  --line: rgba(11, 31, 58, 0.14);
  --bar-bg: rgba(11, 31, 58, 0.10);
  --bar-fill: var(--cyan-deep);
  --triggered: var(--rally);
  --hi: #ffe9d8;        /* tinted highlight, derived from rally */
  --card: #fff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
}

header.site, footer.site {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}

footer.site {
  border-top: 1px solid var(--line);
  border-bottom: none;
  margin-top: 64px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
  gap: 12px;
}
footer.site .footer-nav { display: flex; gap: 18px; }
footer.site .footer-nav a {
  color: var(--muted);
  text-decoration: none;
}
footer.site .footer-nav a:hover { color: var(--ink); text-decoration: underline; }

/* LEGAL PAGES */
article.legal h2 {
  font-size: 20px;
  margin-top: 32px;
  margin-bottom: 8px;
}
article.legal p, article.legal li { font-size: 15px; line-height: 1.6; }
article.legal ul { padding-left: 20px; }
article.legal a { color: var(--cyan-deep); }

.brand {
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
}
.brand-logo {
  height: 96px;
  width: auto;
  display: block;
}

nav .who { color: var(--muted); margin-right: 12px; font-size: 14px; }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px;
}

h1 { font-size: 40px; line-height: 1.1; margin: 0 0 16px; letter-spacing: -0.02em; }
h2 { font-size: 24px; margin: 48px 0 16px; letter-spacing: -0.01em; }
h3 { font-size: 18px; margin: 0 0 6px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* HERO */
.hero { padding: 24px 0 8px; }
.hero h1 br { display: block; }
.hero .lede { font-size: 19px; color: #333; max-width: 580px; margin: 0 0 24px; }
.btn.big { padding: 14px 22px; font-size: 16px; }

/* HOW IT WORKS */
.how ol.steps { list-style: none; padding: 0; counter-reset: step; }
.how ol.steps li {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 12px;
  background: var(--card);
}
.how h3 { font-size: 17px; }

/* AFFECTED CATEGORIES */
.affected-grid {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.affected-grid li {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--card);
}

/* CAMPAIGNS LIST */
ul.campaigns { list-style: none; padding: 0; margin: 0; }
ul.campaigns li {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  background: var(--card);
}
ul.campaigns a {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  text-decoration: none;
  color: inherit;
}
ul.campaigns .campaign-row-body { flex: 1; min-width: 0; }
ul.campaigns .meta { color: var(--muted); font-size: 14px; margin: 6px 0; }

/* LOGO + CANCEL STAMP */
.logo-stamp {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}
.logo-stamp img {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
}
.logo-stamp .stamp {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--rally);
  text-transform: uppercase;
  transform: rotate(-18deg);
  pointer-events: none;
  text-shadow: 0 0 1px rgba(255,255,255,0.9);
}
.logo-stamp.no-logo .stamp { display: none; }

/* small (campaigns list) */
.logo-stamp.small img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: contain;
  padding: 6px;
}
.logo-stamp.small .stamp {
  font-size: 14px;
  border: 2px solid var(--rally);
  border-radius: 4px;
  padding: 1px 4px;
  background: rgba(255, 255, 255, 0.55);
  width: max-content;
  height: max-content;
  margin: auto;
  inset: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
}

/* big (campaign detail hero) */
.logo-stamp.big {
  display: block;
  width: 240px;
  margin: 0 0 24px;
}
.logo-stamp.big img {
  width: 240px;
  height: 240px;
  border-radius: 24px;
  object-fit: contain;
  padding: 28px;
}
.logo-stamp.big .stamp {
  font-size: 56px;
  border: 4px solid var(--rally);
  border-radius: 8px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.55);
  width: max-content;
  height: max-content;
  margin: auto;
  inset: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
}

/* CLOSER */
.closer { margin-top: 64px; padding: 32px 0; border-top: 1px solid var(--line); }

.narrow { max-width: 580px; }

/* BUTTONS */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn:active { opacity: .85; }
.btn.primary { background: var(--accent); }
.btn.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}

/* FORMS */
form label { display: block; margin: 16px 0; font-weight: 600; font-size: 14px; }
form input[type="text"], form input[type="email"], form input[type="number"],
form input[type="date"], form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 400;
  background: var(--card);
}
form .row { display: flex; gap: 16px; }
form .row label { flex: 1; }
form button { margin-top: 8px; }
form small.muted { font-weight: 400; }

/* AUTOCOMPLETE */
.suggestions {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  max-height: 240px;
  overflow-y: auto;
}
.suggestions li {
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 400;
}
.suggestions li:hover { background: var(--hi); }

/* PRESSURE LEVEL FIELDSET */
fieldset.pressure {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin: 24px 0;
  background: var(--card);
}
fieldset.pressure legend { padding: 0 8px; font-weight: 600; font-size: 14px; }
.pressure-option {
  display: grid;
  grid-template-columns: 24px 1fr;
  grid-template-areas: "radio label" ". blurb";
  gap: 4px 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-weight: 500;
}
.pressure-option:last-child { border-bottom: none; }
.pressure-option input { grid-area: radio; align-self: start; margin-top: 4px; }
.pressure-label { grid-area: label; }
.pressure-blurb { grid-area: blurb; font-size: 13px; line-height: 1.45; }

/* THRESHOLD PREVIEW */
.preview {
  background: var(--hi);
  border: 1px solid rgba(229, 70, 44, 0.30);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 16px 0;
}
.preview-headline { margin: 0 0 6px; font-size: 18px; }
.preview-headline strong { font-size: 24px; letter-spacing: -0.01em; }

/* CAMPAIGN DETAIL */
.bar { background: var(--bar-bg); border-radius: 999px; height: 6px; overflow: hidden; margin: 8px 0; }
.bar.big { height: 12px; margin: 16px 0; }
.bar > span { display: block; height: 100%; background: var(--bar-fill); }

.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: rgba(11, 31, 58, 0.10); color: var(--ink); margin-left: 6px; font-weight: 600; }
.tag.triggered { background: var(--triggered); color: #fff; }

aside.rationale {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 24px 0;
}
aside.rationale h3 { margin-top: 0; }

.description-block { margin: 24px 0; }
.description { white-space: pre-wrap; }

.action-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px;
  background: var(--card);
  margin: 32px 0;
}

/* SHARE */
.share-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px;
  background: var(--card);
  margin: 24px 0;
}
.share-block h3 { margin-top: 0; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.share, button.share {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
}
.share:hover, button.share:hover { background: var(--hi); }
.share.twitter  { border-color: #000;     color: #000;     }
.share.facebook { border-color: #1877f2;  color: #1877f2;  }
.share.linkedin { border-color: #0a66c2;  color: #0a66c2;  }
.share.reddit   { border-color: #ff4500;  color: #ff4500;  }
.share.whatsapp { border-color: #25d366;  color: #1a8a45;  }

ul.flash {
  list-style: none;
  margin: 0;
  padding: 12px 24px;
  background: var(--hi);
  color: var(--ink);
  border-bottom: 1px solid rgba(229, 70, 44, 0.30);
}
