:root {
  --ink: #1a1a1a;
  --muted: #3a3a3a;
  --line: #e4e4e4;
  --accent: #e66f66;
  --good: #145c32;
  --warn: #8f2424;
  --focus: #e66f66;
  --side: clamp(1.25rem, 4vw, 3.25rem);
}

* { box-sizing: border-box; }

html { font-size: 112.5%; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: "Open Sans", "Segoe UI", sans-serif;
  line-height: 1.5;
}

::selection { background: var(--accent); color: #fff; }

a { color: var(--ink); }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 12px;
  top: 12px;
  background: #fff;
  padding: 8px 12px;
  z-index: 5;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-sizing: border-box;
  width: 100%;
  min-height: 90px;
  /* Home page offset is the theme frame: 60px, 40px under 960px, 28px from 1197px. */
  margin: 60px 0 28px;
  padding: 16px 32px;
  background: transparent;
}

@media (min-width: 1197px) {
  header.top { margin-top: 28px; }
}

.brand {
  flex: 0 1 200px;
  width: 200px;
  max-width: calc(100% - 310px);
  line-height: 0;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-left: auto;
}

.links a {
  color: var(--ink);
  text-decoration: none;
}

.links a.word {
  font-family: "Open Sans", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.links a.word:hover,
.links a.icon.cal:hover { color: var(--accent); }

.links a.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  line-height: 0;
}

.links a.icon img {
  display: block;
  width: 22px;
  height: 22px;
}

.links a.icon.breeze img { width: 18px; height: 18px; }

.links a.icon.cal svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.links a.icon:hover { opacity: 0.72; }
.links a.icon.cal:hover { opacity: 1; }

.banner {
  width: 100%;
  margin: 1rem 0 0;
  padding: 0 var(--side);
  color: var(--muted);
  font-size: 0.95rem;
}

main {
  flex: 1 0 auto;
  width: 100%;
  margin: 0;
  padding: 1.5rem var(--side) 3rem;
}

h2, h3 {
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-family: "Josefin Slab", Georgia, serif;
  font-weight: 400;
  font-size: 2.35rem;
  line-height: 1.15;
}

h3 { font-size: 1.7rem; margin-top: 1.4rem; }

.lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.card {
  background: transparent;
  padding: 0;
  margin: 0 0 2.25rem;
  border: 0;
}

.give {
  width: min(28rem, 100%);
  margin: 0 auto;
}

.give .amount { max-width: none; }

.give .choices {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.give .choices.pay {
  flex-direction: row;
  align-items: center;
  gap: 0.35rem 1.75rem;
}

.give .actions {
  flex-direction: column;
  align-items: stretch;
  margin-top: 2rem;
}

.give .actions button { width: 100%; }

.give > label,
.give > .group-label {
  margin-top: 2.5rem;
}

.give select {
  font-size: 0.88rem;
}

.give > .group-label {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.give .choices.pay label {
  font-size: 0.88rem;
  font-weight: 400;
}

.give > label:first-of-type { margin-top: 0; }

.donate-head { margin: 0.4rem 0 2.5rem; text-align: center; }

.donate-head h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  margin: 0;
  color: var(--ink);
  font-family: "Josefin Slab", Georgia, serif;
  font-weight: 400;
  font-size: 2.75rem;
  line-height: 1.15;
}

.donate-head h1 img {
  display: block;
  width: 1em;
  height: 1em;
}

.admin-note {
  margin-top: 2.75rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
  text-align: center;
}

.give .cf-turnstile { margin-top: 2.4rem; }

.contact {
  margin-top: 3rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--line);
}

.contact h2 { font-size: 1.85rem; }

.contact label { margin-top: 1.85rem; }

.contact .name {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
}

.contact .name label,
.contact label:first-of-type { margin-top: 0.85rem; }

.who, .address {
  display: grid;
  gap: 0.4rem 1.5rem;
  margin-top: 0.35rem;
}

.who { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.address { grid-template-columns: 2fr 1.3fr 0.55fr 0.8fr; }
.who label, .address label { margin-top: 0.85rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 28rem) minmax(0, 28rem);
  gap: 3rem 4rem;
  align-items: start;
}

.hello {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
}

.hello h2, .hello p { margin: 0; }
.hello button { margin-top: 0; }

p { margin: 0.6rem 0; }

label {
  display: block;
  margin: 1.15rem 0 0.3rem;
  font-weight: 600;
}

input, select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  padding: 0.55rem 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
}

input[type="radio"],
input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 0;
  accent-color: var(--ink);
}

.amount {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  border-bottom: 1px solid var(--ink);
  margin: 0.15rem 0 0.4rem;
  max-width: 18rem;
}

.amount span {
  font-family: "Josefin Slab", Georgia, serif;
  font-size: 2.5rem;
  line-height: 1;
}

.amount input {
  border: 0;
  padding: 0.15rem 0 0.35rem;
  background: transparent;
  font-family: "Josefin Slab", Georgia, serif;
  font-size: 2.7rem;
  line-height: 1;
}

.amount input:focus { outline: none; }
.amount:focus-within { border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }

.group-label {
  margin: 1.6rem 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.choices,
.schedule,
.pay {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.6rem;
}

.choices label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: auto;
  margin: 0;
  padding: 0.45rem 0;
  border: 0;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
}

.choices label:has(input:checked) {
  box-shadow: inset 0 -2px 0 var(--ink);
}

label.check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 1.25rem;
  font-weight: 600;
}

label.check input { flex: none; margin-top: 0.2rem; }

.quote {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.pair, .place {
  display: grid;
  gap: 0.75rem 1.5rem;
}

.pair { grid-template-columns: 1fr 1fr; margin-top: 0.3rem; }
.place { grid-template-columns: 1.6fr 0.7fr 1fr; }

.pair label, .place label { margin-top: 0.85rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

button, .button {
  display: inline-block;
  margin-top: 1.1rem;
  padding: 0.9rem 1.25rem;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: #fff;
  font-family: "Open Sans", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

button:hover, .button:hover {
  background: var(--accent);
  color: #fff;
}

button.quiet, a.quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--ink);
}

button.quiet:hover, a.quiet:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 -1px 0 var(--accent);
}

.actions button { width: auto; margin-top: 0; }

.errors, .note {
  margin: 0 0 1rem;
  padding: 0 0 0 0.75rem;
  background: transparent;
  border-left: 3px solid var(--warn);
}

.errors p, .note p { margin: 0.2rem 0; }
.note.good { border-left-color: var(--good); }

.subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 1.35rem;
  margin: 0 0 1.75rem;
  padding: 0 0 0.75rem;
  border-bottom: 1px solid var(--line);
}

.subnav a {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.subnav a:hover { color: var(--accent); }
.subnav form { margin-left: auto; }
.subnav button {
  margin: 0;
  padding: 0.35rem 0;
  font-size: 0.72rem;
}

.filters {
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) minmax(14rem, 24rem) auto;
  gap: 0 1.5rem;
  align-items: end;
  margin: 1.4rem 0 0.4rem;
}

.filters label { margin-top: 0; }
.filters button { margin: 0 0 0.15rem; width: auto; }

.settings-form { max-width: 34rem; }
.settings .hint { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.92rem; }
.settings h3 { margin-top: 0.2rem; }

.ledger > h2 { margin-bottom: 1.5rem; }

.ledger-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2.5rem;
  margin: 0 0 2.5rem;
}

.ledger-tools .tool {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ledger-tools label {
  display: inline;
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ledger-tools select,
.ledger-tools input {
  width: 10.5rem;
  margin: 0;
  padding: 0.05rem 0;
  font-size: 0.88rem;
}

.ledger-tools input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}

.ledger-tools input { width: 12.5rem; }

.ledger-tools .buttons {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.ledger-tools button {
  margin: 0;
  padding: 0.1rem 0;
  font-size: 0.68rem;
}

table.ledger-book {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  border-top: 1px solid var(--ink);
}

table.ledger-book th,
table.ledger-book td {
  padding: 1.05rem 1.35rem;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  vertical-align: middle;
}

table.ledger-book th:first-child,
table.ledger-book td:first-child,
table.ledger-book tr.band th,
table.ledger-book tr.total td[colspan] { border-left: 0; }

table.ledger-book thead th {
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}

table.ledger-book tr.band th {
  padding-top: 2rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  font-family: "Josefin Slab", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}

table.ledger-book tr.total td {
  border-bottom: 1px solid var(--ink);
  font-weight: 700;
}

table.ledger-book td.money,
table.ledger-book th.money { text-align: right; }

table.ledger-book td:first-child,
table.ledger-book td.money { white-space: nowrap; }

table.ledger-book tr.empty td {
  padding: 2.25rem 1.35rem;
  color: var(--muted);
  font-weight: 400;
}

table.report { margin-top: 0.25rem; }

table.report th,
table.report td { padding: 0.9rem 1.25rem 0.9rem 0; }

table.report thead th { border-bottom: 1px solid var(--ink); }

table.report tr.total th,
table.report tr.total td {
  border-top: 1px solid var(--ink);
  border-bottom: 0;
  font-weight: 700;
  padding-top: 1rem;
}

table { width: 100%; border-collapse: collapse; margin-top: 0.8rem; }

th, td {
  text-align: left;
  padding: 0.65rem 0.4rem 0.65rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.money, td.money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

.cf-turnstile { margin-top: 1.25rem; }

footer {
  width: 100%;
  margin: 0;
  padding: 0 var(--side) 28px;
  color: #888;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

footer p {
  margin: 0 0 18px;
}

footer .social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

footer .social a {
  display: inline-flex;
  line-height: 0;
  text-decoration: none;
}

footer .social a:hover { opacity: 0.72; }

footer .social svg {
  display: block;
  width: 25px;
  height: 25px;
}

@media (max-width: 959px) {
  header.top {
    justify-content: center;
    min-height: 0;
    margin: 40px 0 16px;
    padding: 14px 16px;
  }
  header.top .brand { display: none; }
  header.top .links {
    justify-content: center;
    margin-left: 0;
    gap: 12px;
  }
}

@media (max-width: 580px) {
  header.top .links { gap: 8px; }
}

@media (max-width: 720px) {
  .pair, .place, .who, .address, .split, .contact .name, .filters { grid-template-columns: 1fr; }
  .filters button { margin-top: 1rem; }
  .choices, .schedule, .pay { flex-direction: column; align-items: flex-start; gap: 0.1rem; }
  .hello { flex-direction: column; align-items: flex-start; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions button { width: 100%; }
  .subnav form { margin-left: 0; }
  h2, .donate-head h1 { font-size: 2rem; }
  .amount span, .amount input { font-size: 2.2rem; }
  .card { overflow-x: auto; }
}
