@font-face { font-family: "Oswald"; font-weight: 500; font-display: swap; src: url(/fonts/oswald-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 700; font-display: swap; src: url(/fonts/oswald-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-display: swap; src: url(/fonts/source-serif-4-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: italic; font-display: swap; src: url(/fonts/source-serif-4-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-display: swap; src: url(/fonts/source-serif-4-latin-600-normal.woff2) format("woff2"); }

:root {
  --paper: #f3ead8;
  --paper-2: #eadfc8;
  --ink: #1d1a17;
  --ink-soft: #5a5148;
  --red: #a3241c;
  --red-deep: #7c1a14;
  --gold: #c99a2e;
  --green: #2f6b3a;
  --line: #cbbd9f;
  --card: #fbf6ea;
  --display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
}
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-deep); }
img, svg { max-width: 100%; }

.wrap { max-width: 980px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
.narrow { max-width: 680px; }

/* ---- Header ---- */
.site-header {
  background: var(--red);
  color: var(--paper);
  border-bottom: 4px solid var(--ink);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; }
.brand:hover { color: #fff; }
.brand svg { width: 44px; height: 44px; flex: none; }
.brand span { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: .06em; text-transform: uppercase; line-height: 1; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; align-items: center; }
.nav a, .nav button {
  font-family: var(--display); font-weight: 500; text-transform: uppercase; letter-spacing: .08em;
  font-size: 15px; color: var(--paper); text-decoration: none; background: none; border: 0; padding: 4px 0; cursor: pointer;
}
.nav a:hover, .nav button:hover { color: #fff; text-decoration: underline; }
.nav .nav-cta { border: 2px solid var(--paper); padding: 3px 12px; }
.nav .nav-cta:hover { background: var(--paper); color: var(--red); text-decoration: none; }

/* ---- Typography ---- */
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: .04em; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(36px, 7vw, 64px); font-weight: 700; }
h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 700; }
h3 { font-size: 22px; font-weight: 500; }
.kicker { font-family: var(--display); text-transform: uppercase; letter-spacing: .16em; color: var(--red); font-size: 15px; font-weight: 500; margin: 0 0 8px; }
.lede { font-size: 21px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.small { font-size: 15px; }

/* ---- Sections ---- */
main { padding: 40px 0 64px; }
section { margin: 0 0 56px; }
.rule { border: 0; border-top: 3px double var(--line); margin: 40px 0; }

.hero { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; padding: 16px 0 8px; }
.hero-emblem { width: min(240px, 60vw); justify-self: center; }
@media (min-width: 760px) { .hero { grid-template-columns: 1.5fr 1fr; } .hero-emblem { width: 280px; } }

.banner {
  background: var(--ink); color: var(--paper); text-align: center;
  font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; font-size: clamp(16px, 2.6vw, 22px);
  padding: 14px 16px;
}

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { border: 2px solid var(--ink); background: var(--card); padding: 14px 12px; text-align: center; }
.stat b { display: block; font-family: var(--display); font-size: 36px; line-height: 1; color: var(--red); }
.stat span { font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; font-size: 13px; }

/* ---- Buttons & forms ---- */
.btn {
  display: inline-block; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  font-size: 17px; padding: 12px 22px; border: 2px solid var(--ink); background: var(--red); color: var(--paper);
  text-decoration: none; cursor: pointer; border-radius: var(--radius); box-shadow: 3px 3px 0 var(--ink);
}
.btn:hover { background: var(--red-deep); color: #fff; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.secondary { background: var(--card); color: var(--ink); }
.btn.secondary:hover { background: var(--paper-2); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

form .field { margin-bottom: 18px; }
label { display: block; font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: 15px; margin-bottom: 6px; }
input[type=text], input[type=password], textarea {
  width: 100%; font: inherit; font-size: 17px; padding: 10px 12px; background: #fffdf7; color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--radius);
}
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus, .btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 16px; }
.check input { margin-top: 5px; }
.hint { font-size: 14px; color: var(--ink-soft); margin-top: 4px; }

.notice { border-left: 6px solid var(--red); background: var(--card); padding: 12px 16px; margin: 16px 0; }
.notice.ok { border-color: var(--green); }
.error { color: var(--red); font-weight: 600; min-height: 1.6em; }

.panel { background: var(--card); border: 2px solid var(--ink); padding: 24px; box-shadow: 5px 5px 0 var(--line); }

.tabs { display: flex; gap: 0; margin-bottom: -2px; }
.tabs button {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; font-size: 16px; padding: 10px 18px;
  background: var(--paper-2); border: 2px solid var(--ink); cursor: pointer; color: var(--ink);
}
.tabs button + button { border-left: 0; }
.tabs button[aria-selected=true] { background: var(--card); border-bottom-color: var(--card); }

/* ---- Manifesto ---- */
.article, .amendment {
  background: var(--card); border: 2px solid var(--ink); padding: 18px 20px; margin-bottom: 18px;
}
.article header, .amendment header { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.article .num, .amendment .num {
  font-family: var(--display); font-weight: 700; color: var(--paper); background: var(--red);
  padding: 2px 10px; letter-spacing: .1em; text-transform: uppercase; font-size: 14px;
}
.article h3, .amendment h3 { margin: 0; }
.article p, .amendment p { margin: 6px 0 12px; white-space: pre-line; }
.meta { font-size: 14px; color: var(--ink-soft); }

.ballot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border-top: 1px dashed var(--line); padding-top: 12px; }
.ballot button {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: 15px;
  padding: 6px 14px; border: 2px solid var(--ink); background: #fffdf7; cursor: pointer; border-radius: var(--radius); color: var(--ink);
}
.ballot button.aye[aria-pressed=true] { background: var(--green); color: #fff; }
.ballot button.nay[aria-pressed=true] { background: var(--red); color: #fff; }
.ballot button[disabled] { opacity: .55; cursor: not-allowed; }
.tally { flex: 1 1 200px; min-width: 180px; }
.tally-bar { display: flex; height: 10px; border: 1px solid var(--ink); background: var(--paper-2); }
.tally-bar i { display: block; height: 100%; }
.tally-bar .y { background: var(--green); }
.tally-bar .n { background: var(--red); }
.tally-text { font-size: 14px; color: var(--ink-soft); }
.linkish { background: none; border: 0; padding: 0; color: var(--ink-soft); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; }
.linkish:hover { color: var(--red); }

.status { font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; font-size: 13px; padding: 2px 8px; border: 2px solid currentColor; }
.status.passed { color: var(--green); }
.status.rejected { color: var(--ink-soft); }
.status.open { color: var(--red); }

details.archive summary { cursor: pointer; font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: 18px; margin-bottom: 12px; }

/* ---- Membership card ---- */
.member-card {
  max-width: 460px; margin: 0 auto; background: var(--red); color: var(--paper); border: 3px solid var(--ink);
  border-radius: 10px; padding: 22px; box-shadow: 8px 8px 0 var(--ink); position: relative; overflow: hidden;
}
.member-card::after {
  content: ""; position: absolute; inset: 8px; border: 1px solid rgba(243, 234, 216, .5); border-radius: 6px; pointer-events: none;
}
.member-card .top { display: flex; gap: 14px; align-items: center; }
.member-card .top svg { width: 64px; height: 64px; flex: none; }
.member-card .org { font-family: var(--display); text-transform: uppercase; letter-spacing: .12em; font-size: 16px; line-height: 1.2; }
.member-card .name { font-family: var(--display); font-size: 34px; font-weight: 700; margin: 18px 0 2px; word-break: break-all; line-height: 1.1; }
.member-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 14px 0 0; font-size: 15px; }
.member-card dt { font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; opacity: .85; }
.member-card dd { margin: 0; }
.member-card .motto { margin-top: 16px; font-style: italic; font-size: 15px; border-top: 1px solid rgba(243, 234, 216, .5); padding-top: 10px; }

/* ---- Admin ---- */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-weight: 500; }
.table-scroll { overflow-x: auto; }

/* ---- Footer ---- */
.site-footer { border-top: 4px solid var(--ink); background: var(--paper-2); padding: 28px 0 36px; font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.article.inactive { opacity: .6; border-style: dashed; }
