/* ============================================================
   detectbullshit.com
   Plain CSS — no framework, no dependencies
   ============================================================ */

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

:root {
  --ink:        #1a1a1a;
  --ink-light:  #555;
  --paper:      #faf8f4;
  --rule:       #ddd;
  --yes-bg:     #f0f7f0;
  --yes-border: #2d7a2d;
  --no-bg:      #fdf3f0;
  --no-border:  #c0392b;
  --badge-bg:   #fff3cd;
  --badge-text: #7d5a00;
  --warning-bg: #fff8e1;
  --warning-border: #f0a500;
  --max-width:  780px;
  --serif:      Georgia, 'Times New Roman', serif;
  --sans:       system-ui, -apple-system, sans-serif;
}

html {
  font-size: 18px;
  background: var(--paper);
  color: var(--ink);
}

body {
  font-family: var(--sans);
  line-height: 1.6;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---- Header ---- */

header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 2px solid var(--ink);
}

header h1 {
  font-family: var(--serif);
  font-size: 2.4rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

header p {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---- History banner ---- */

.history-banner {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--ink);
  background: #f0ece4;
}

.history-banner p {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.7;
  font-style: italic;
}

/* ---- Timeline ---- */

.timeline-section {
  margin: 2.5rem 0;
}

.timeline-section h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.timeline {
  list-style: none;
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 2px;
  background: var(--rule);
}

.timeline li {
  position: relative;
  padding: 0 0 1.5rem 1.25rem;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -0.45rem;
  top: 0.55rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink-light);
  border: 2px solid var(--paper);
}

.timeline li.inflection::before {
  background: var(--no-border);
}

.timeline-year {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-light);
}

.timeline-event {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: bold;
  margin: 0.15rem 0 0.25rem;
}

.timeline-detail {
  font-size: 0.88rem;
  color: var(--ink-light);
  line-height: 1.5;
}

/* ---- Propositions section ---- */

.propositions-section h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

/* ---- Proposition card ---- */

.prop-card {
  border: 1px solid var(--rule);
  border-radius: 4px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.prop-card-header {
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--rule);
}

.prop-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  background: var(--badge-bg);
  color: var(--badge-text);
  margin-bottom: 0.6rem;
}

.prop-status.on-ballot {
  background: #e8f5e9;
  color: #1b5e20;
}

.prop-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.2;
}

.prop-subtitle {
  font-size: 0.88rem;
  color: var(--ink-light);
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.prop-card-body {
  padding: 1.25rem 1.5rem;
}

.prop-summary {
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.prop-what-it-means {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink-light);
  border-left: 3px solid var(--rule);
  padding-left: 0.9rem;
  margin-bottom: 1rem;
}

.prop-ballot-date {
  font-size: 0.82rem;
  color: var(--ink-light);
  margin-bottom: 1.25rem;
}

/* ---- Ad warning ---- */

.ad-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: 3px;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.ad-warning::before {
  content: "Note: ";
  font-weight: 700;
}

/* ---- Funding table ---- */

.funding-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 560px) {
  .funding-grid {
    grid-template-columns: 1fr;
  }
}

.funding-side {
  border-radius: 3px;
  overflow: hidden;
}

.funding-side.yes {
  border: 1px solid var(--yes-border);
}

.funding-side.no {
  border: 1px solid var(--no-border);
}

.funding-side-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 0.45rem 0.75rem;
}

.funding-side.yes .funding-side-label {
  background: var(--yes-border);
  color: #fff;
}

.funding-side.no .funding-side-label {
  background: var(--no-border);
  color: #fff;
}

.funding-side-total {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: bold;
  padding: 0.5rem 0.75rem 0.25rem;
}

.funding-funders {
  list-style: none;
  border-top: 1px solid var(--rule);
}

.funding-funder {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.82rem;
  line-height: 1.45;
}

.funding-funder:last-child {
  border-bottom: none;
}

.funder-name {
  font-weight: 600;
}

.funder-amount {
  color: var(--ink-light);
  font-size: 0.78rem;
}

.funder-note {
  color: var(--ink-light);
  font-size: 0.78rem;
  margin-top: 0.1rem;
}

/* ---- Sources ---- */

.prop-sources {
  font-size: 0.8rem;
  color: var(--ink-light);
}

.prop-sources span {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.72rem;
}

.prop-sources a {
  color: var(--ink-light);
  margin-right: 1rem;
}

.prop-sources a:hover {
  color: var(--ink);
}

.prop-sources a.source-primary {
  color: var(--ink);
  font-weight: 600;
}

.prop-sources a.source-primary::before {
  content: "★ ";
  font-size: 0.7rem;
}

/* ---- Section intros ---- */

.section-intro {
  font-size: 0.9rem;
  color: var(--ink-light);
  margin: -0.75rem 0 1.25rem;
}

/* ---- Scorecard section ---- */

.scorecard-section {
  margin: 2.5rem 0;
}

.scorecard-section h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.scorecard-intro {
  font-size: 0.9rem;
  color: var(--ink-light);
  margin: 0.25rem 0 1.25rem;
}

/* Summary stats */

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 560px) {
  .summary-grid { grid-template-columns: 1fr; }
}

.summary-stat {
  background: #f0ece4;
  border-radius: 3px;
  padding: 1rem;
  text-align: center;
}

.summary-number {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.summary-label {
  font-size: 0.78rem;
  color: var(--ink-light);
  line-height: 1.4;
}

.summary-note {
  font-size: 0.78rem;
  color: var(--ink-light);
  margin-bottom: 1.5rem;
}

.summary-note a {
  color: var(--ink-light);
}

/* Scorecard table */

.scorecard {
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}

.sc-row {
  border-bottom: 1px solid var(--rule);
}

.sc-row:last-child {
  border-bottom: none;
}

.sc-summary {
  display: grid;
  grid-template-columns: 3rem 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.sc-summary::-webkit-details-marker { display: none; }

.sc-summary:hover {
  background: #f0ece4;
}

.sc-row[open] .sc-summary {
  background: #f0ece4;
  border-bottom: 1px solid var(--rule);
}

.sc-year {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-light);
  white-space: nowrap;
}

.sc-name {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.sc-plain {
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-prop-num {
  font-size: 0.72rem;
  color: var(--ink-light);
}

.sc-funder {
  font-size: 0.78rem;
  color: var(--ink-light);
  white-space: nowrap;
  text-align: right;
}

.sc-outcome {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  white-space: nowrap;
}

.outcome-passed    { background: #e8f5e9; color: #1b5e20; }
.outcome-failed    { background: #fde8e8; color: #8b0000; }
.outcome-overturned{ background: #fff3cd; color: #7d5a00; }
.outcome-mixed     { background: #e8e4dc; color: var(--ink-light); }

@media (max-width: 560px) {
  .sc-summary {
    grid-template-columns: 2.5rem 1fr auto;
  }
  .sc-funder { display: none; }
}

/* Expanded detail */

.sc-detail {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--rule);
  background: #fff;
}

.sc-official-title {
  font-size: 0.78rem;
  color: var(--ink-light);
  margin-bottom: 0.6rem;
}

.sc-description {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.sc-funders {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.sc-funders th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-light);
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.sc-funders td {
  padding: 0.4rem 0.5rem;
  vertical-align: top;
  border-bottom: 1px solid #f0ece4;
}

.funder-row.yes td:first-child { color: var(--yes-border); font-weight: 700; font-size: 0.7rem; }
.funder-row.no  td:first-child { color: var(--no-border);  font-weight: 700; font-size: 0.7rem; }

.funder-note-inline {
  color: var(--ink-light);
  font-size: 0.78rem;
}

.funder-amount-cell {
  white-space: nowrap;
  font-weight: 600;
  text-align: right;
}

.sc-got {
  font-size: 0.88rem;
  line-height: 1.55;
  border-left: 3px solid var(--rule);
  padding-left: 0.9rem;
  margin-bottom: 0.75rem;
}

.verify-note {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-light);
  margin-bottom: 0.5rem;
}

.verify-note a {
  color: var(--ink-light);
}

/* ---- Footer ---- */

footer {
  margin-top: 3rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.82rem;
  color: var(--ink-light);
  line-height: 1.6;
}
