/* FairShare — Design System */
:root {
  --green:     #1F3D34;
  --pine:      #14302A;
  --sage:      #6E8B7E;
  --gold:      #B08A4F;
  --parchment: #F5F1E8;
  --ivory:     #FBF9F3;
  --stone:     #E4DDCE;
  --ink:       #23211C;
  --yes:       #2D6A4F;
  --no:        #8B2E2E;
  --yes-light: #e8f5ee;
  --no-light:  #fbeaea;
  --radius:    10px;
  --shadow:    0 2px 20px rgba(0,0,0,.08);
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  color: var(--ink);
  background: var(--ivory);
  min-height: 100vh;
}

/* Layout */
.fs-wrap { max-width: 800px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.fs-header {
  background: var(--pine);
  padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: 1rem;
}
.fs-header-logo { height: 36px; width: auto; }
.fs-header-title { color: var(--parchment); font-size: 1rem; font-weight: 600; margin: 0; }

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
}
.card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  color: var(--green);
  margin: 0 0 .25rem;
}
.card-sub {
  color: var(--sage);
  font-size: .875rem;
  margin: 0 0 1.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: .6rem 1.4rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity .15s;
}
.btn:hover { opacity: .88; }
.btn-gold    { background: var(--gold); color: #fff; }
.btn-green   { background: var(--green); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--green); color: var(--green); }
.btn-sm      { padding: .35rem .85rem; font-size: .8rem; }

/* Forms */
label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: .3rem; }
input[type=text], input[type=password], textarea, select {
  width: 100%; padding: .6rem .85rem;
  border: 1.5px solid var(--stone); border-radius: 6px;
  font-size: .95rem; font-family: inherit; color: var(--ink);
  background: var(--ivory);
  transition: border-color .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--sage);
}
.form-row { margin-bottom: 1.1rem; }
.form-hint { font-size: .78rem; color: var(--sage); margin-top: .25rem; }

/* Decision voting card */
.decision-card {
  background: #fff;
  border: 1.5px solid var(--stone);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: border-color .2s;
}
.decision-card.stance-yes { border-color: var(--yes); }
.decision-card.stance-no  { border-color: var(--no); }
.decision-number {
  font-size: .75rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--sage); margin-bottom: .4rem;
}
.decision-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem; font-weight: 600; color: var(--ink);
  margin: 0 0 .35rem;
}
.decision-desc { font-size: .875rem; color: #555; margin: 0 0 1.1rem; }

/* Stance toggle */
.stance-row {
  display: flex; gap: .75rem; margin-bottom: 1rem;
}
.stance-btn {
  flex: 1; padding: .55rem; border-radius: 6px; border: 2px solid var(--stone);
  font-size: .875rem; font-weight: 700; cursor: pointer;
  background: #fff; transition: all .15s; text-align: center;
}
.stance-btn.yes { color: var(--yes); }
.stance-btn.no  { color: var(--no); }
.stance-btn.yes.active { background: var(--yes-light); border-color: var(--yes); }
.stance-btn.no.active  { background: var(--no-light);  border-color: var(--no); }

/* Intensity slider */
.intensity-row { display: flex; align-items: center; gap: 1rem; margin-top: .25rem; }
.intensity-label { font-size: .8rem; font-weight: 600; color: var(--sage); white-space: nowrap; }
.intensity-slider { flex: 1; accent-color: var(--gold); }
.intensity-value {
  min-width: 2.2rem; text-align: center;
  font-size: 1.1rem; font-weight: 700;
  color: var(--green); font-family: 'Cormorant Garamond', serif;
}

/* Budget bar */
.budget-bar-wrap {
  position: sticky; top: 0; z-index: 50;
  background: var(--parchment);
  border-bottom: 1px solid var(--stone);
  padding: .75rem 1.25rem;
}
.budget-label { font-size: .8rem; font-weight: 600; color: var(--sage); margin-bottom: .3rem; }
.budget-track {
  height: 8px; background: var(--stone); border-radius: 99px; overflow: hidden;
}
.budget-fill {
  height: 100%; border-radius: 99px;
  background: var(--gold);
  transition: width .2s, background .2s;
}
.budget-fill.over { background: var(--no); }
.budget-numbers { display: flex; justify-content: space-between; font-size: .75rem; margin-top: .25rem; }
.budget-used  { font-weight: 700; color: var(--ink); }
.budget-total { color: var(--sage); }

/* Results */
.result-row {
  border-left: 4px solid transparent;
  padding: 1rem 1.25rem;
  margin-bottom: .75rem;
  background: #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
  border-top: 1px solid var(--stone);
  border-right: 1px solid var(--stone);
  border-bottom: 1px solid var(--stone);
}
.result-row.yes { border-left-color: var(--yes); }
.result-row.no  { border-left-color: var(--no); }
.result-row.tie { border-left-color: var(--gold); }
.result-outcome {
  display: inline-block; font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .15rem .55rem; border-radius: 4px; margin-bottom: .4rem;
}
.result-outcome.yes { background: var(--yes-light); color: var(--yes); }
.result-outcome.no  { background: var(--no-light);  color: var(--no); }
.result-outcome.tie { background: #fef9ef; color: var(--gold); }
.result-title { font-size: 1.05rem; font-weight: 600; margin: 0 0 .5rem; }
.result-scores { display: flex; gap: 1.5rem; font-size: .8rem; }
.score-yes { color: var(--yes); font-weight: 700; }
.score-no  { color: var(--no);  font-weight: 700; }
.score-margin { color: var(--sage); }

/* Voter list */
.voter-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--parchment); border: 1px solid var(--stone);
  border-radius: 99px; padding: .25rem .75rem;
  font-size: .8rem; margin: .25rem;
}
.voter-chip .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--stone);
}
.voter-chip.voted .dot { background: var(--yes); }

/* Alerts */
.alert {
  padding: .75rem 1rem; border-radius: 6px;
  font-size: .875rem; margin-bottom: 1rem;
}
.alert-warn { background: #fef9ef; border: 1px solid var(--gold); color: #7a5c1a; }
.alert-err  { background: var(--no-light); border: 1px solid var(--no); color: var(--no); }
.alert-ok   { background: var(--yes-light); border: 1px solid var(--yes); color: var(--yes); }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th { text-align: left; font-weight: 600; color: var(--sage); padding: .5rem .75rem; border-bottom: 2px solid var(--stone); }
td { padding: .6rem .75rem; border-bottom: 1px solid var(--stone); }
tr:last-child td { border-bottom: none; }

/* Privacy note */
.privacy-note {
  background: var(--parchment); border-radius: var(--radius);
  padding: 1rem 1.25rem; font-size: .82rem;
  color: var(--sage); border-left: 3px solid var(--gold);
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .card { padding: 1.25rem 1rem; }
  .fs-wrap { padding: 1rem .9rem 3rem; }
}

/* Clearing wrapper (header, footer, type) */
.fs-header{background:#0b1a17;border-bottom:1px solid var(--gold)}
.fs-header-logo{height:44px}
.fs-header-title{font-family:'Source Serif 4',Georgia,serif;text-wrap:balance}
h1,h2{font-family:'Source Serif 4',Georgia,serif;font-weight:600;text-wrap:balance}
.fs-foot{padding:2rem 1.25rem;text-align:center;background:#0b1a17;border-top:1px solid rgba(176,138,79,.5);color:rgba(245,241,232,.75);font-size:.9rem}
.fs-foot p{margin:.3rem 0}.fs-foot a{color:#E8D3A6;text-decoration:underline;text-underline-offset:3px}
