/* Donate and campaign pages. Builds on styles.css. */
.gv-section { padding-top: clamp(40px, 6vw, 80px); }
.gv-wrap { max-width: 720px; margin-inline: auto; }
.gv-fail { color: var(--muted); }

/* ---------- Form ---------- */
.gv-group { border: 0; margin: 0 0 clamp(24px, 3vw, 36px); padding: 0; min-width: 0; }
.gv-group legend { padding: 0; margin-bottom: .7rem; font: 400 clamp(1.7rem, 2.6vw, 2.2rem)/1.1 var(--serif); color: var(--ink); }
.gv-opt { font: 400 .9rem var(--sans); color: var(--muted); }
.gv-field { margin-top: 1rem; }
.gv-field label { display: block; margin-bottom: 6px; font-weight: 500; font-size: .95rem; color: var(--ink); }
.gv-field input, .gv-field select, .gv-field textarea { width: 100%; padding: 0 .8rem; height: 48px; border: 1px solid var(--line); border-radius: 0; background: var(--paper); color: var(--ink); font: 400 1rem var(--sans); appearance: none; -webkit-appearance: none; }
.gv-field textarea { height: auto; padding-block: .7rem; }
.gv-field select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: right 18px center, right 13px center; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
.gv-field input:focus, .gv-field select:focus, .gv-field textarea:focus { border-color: var(--ink); outline: none; box-shadow: inset 0 0 0 1px var(--ink); }
.gv-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.gv-money { position: relative; }
.gv-money::before { content: "$"; position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.gv-money input { padding-left: 1.6rem; }
.gv-hint { margin: 6px 0 0; font-size: .88rem; color: var(--muted); }
.gv-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 1rem; font-size: .95rem; cursor: pointer; }
.gv-check input { margin-top: .32em; width: 16px; height: 16px; flex-shrink: 0; }
.gv-hp { position: absolute; left: -9999px; }
.gv-error { margin: 0 0 1rem; color: #9c2a1f; font-weight: 500; outline: none; }
.gv-fine { margin: .8rem 0 0; font-size: .88rem; color: var(--muted); }

.gv-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.gv-amounts label { position: relative; cursor: pointer; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.gv-amounts input, .gv-options input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.gv-amounts span { display: block; padding: .9rem .2rem; text-align: center; font: 400 clamp(1.4rem, 3vw, 1.75rem)/1.1 var(--serif); color: var(--ink); transition: background .15s, color .15s; }
.gv-amounts label:hover span { background: var(--stone); }
.gv-amounts input:checked + span { background: var(--ink); color: #fff; }
.gv-amounts input:focus-visible + span, .gv-options input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.gv-options { display: grid; border-top: 1px solid var(--ink); }
.gv-options label { position: relative; cursor: pointer; border-bottom: 1px solid var(--line); }
.gv-options span { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: .8rem .9rem; transition: background .15s, color .15s; }
.gv-options strong { font: 400 1.5rem/1.1 var(--serif); color: inherit; }
.gv-options em { font: 400 1.5rem/1.1 var(--serif); font-style: normal; }
.gv-options label:hover span { background: var(--stone); }
.gv-options input:checked + span { background: var(--ink); color: #fff; }
.gv-qty input { max-width: 7em; }

/* ---------- After submitting ---------- */
.gv-done { outline: none; }
.gv-done h2 { font-size: clamp(2.2rem, 4vw, 3.2rem); margin-bottom: .6em; }
.gv-done h3 { margin: 1.6rem 0 .3rem; }
.gv-facts { margin: 0; border-top: 1px solid var(--ink); }
.gv-facts > div { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 2px 16px; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.gv-facts dt { color: var(--muted); font-size: .95rem; }
.gv-facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.gv-pay { list-style: none; margin: .8rem 0 0; padding: 0; border-top: 1px solid var(--ink); }
.gv-pay li { border-bottom: 1px solid var(--line); }
.gv-pay a, .gv-pay div { display: block; padding: .8rem 0; text-decoration: none; color: inherit; }
.gv-pay strong { display: block; font: 400 1.6rem/1.15 var(--serif); color: var(--ink); }
.gv-pay a strong::after { content: " →"; font-family: var(--sans); font-size: .7em; }
.gv-pay a:hover strong { color: var(--accent); }

/* ---------- Running now, on the donate page ---------- */
.gv-campaigns { padding: clamp(32px, 4vw, 56px) 0 0; }
.gv-campaigns h2 { font-size: clamp(2rem, 3vw, 2.6rem); margin-bottom: .5em; }
.gv-camp-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.gv-camp-list li { border-bottom: 1px solid var(--line); }
.gv-camp-list a { display: block; padding: .9rem 0; text-decoration: none; color: inherit; }
.gv-camp-list strong { display: block; font: 400 clamp(1.5rem, 2.2vw, 2rem)/1.15 var(--serif); color: var(--ink); }
.gv-camp-list strong::after { content: " →"; font-family: var(--sans); font-size: .65em; }
.gv-camp-list a:hover strong { color: var(--accent); }

/* ---------- Campaign list ---------- */
.cp-list { list-style: none; margin: 0 0 clamp(40px, 5vw, 72px); padding: 0; border-top: 1px solid var(--ink); }
.cp-list li { border-bottom: 1px solid var(--line); }
.cp-past { margin-top: clamp(32px, 4vw, 56px); }
.cp-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: clamp(16px, 3vw, 40px); align-items: center; padding: clamp(14px, 1.6vw, 22px) 0; text-decoration: none; color: inherit; }
.cp-row-img { display: block; aspect-ratio: 3 / 2; background: var(--stone); overflow: hidden; }
.cp-row-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.cp-row:hover img { transform: scale(1.03); }
.cp-row-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cp-row-text strong { font: 400 clamp(1.7rem, 2.8vw, 2.5rem)/1.08 var(--serif); color: var(--ink); transition: color .2s; }
.cp-row:hover strong { color: var(--accent); }
.cp-row-go { font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; white-space: nowrap; }
.cp-bar { display: block; height: 3px; background: var(--stone-2); margin-top: 8px; max-width: 420px; }
.cp-bar i { display: block; height: 100%; background: var(--accent); }
.cp-raised { font-size: .92rem; color: var(--muted); }

/* ---------- One campaign ---------- */
.cp-draft { margin: var(--header-h) 0 0; padding: 10px var(--gutter); background: var(--stone); color: var(--ink); font-weight: 500; }
.page-hero.is-draft { margin-top: 0; }
.cp-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.cp-side { position: sticky; top: calc(var(--header-h) + 20px); min-width: 0; }
.cp-progress { margin-bottom: clamp(24px, 3vw, 40px); }
.cp-raised-big { margin: 0; color: var(--ink-2); }
.cp-raised-big strong { font: 400 clamp(2.6rem, 5vw, 4.2rem)/1 var(--serif); color: var(--ink); letter-spacing: -.015em; margin-right: 6px; }
.cp-progress .cp-bar { max-width: none; height: 4px; margin-top: 12px; }
.cp-when { color: var(--muted); }
.cp-body { font-size: 1.08rem; max-width: 36em; }
.cp-prizes { margin-top: clamp(28px, 4vw, 48px); }
.cp-prizes h2 { font-size: clamp(2rem, 3vw, 2.6rem); margin-bottom: .4em; }
.cp-prizes ol, .cp-prizes ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.cp-prizes li { display: flex; flex-direction: column; gap: 2px; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.cp-prizes strong { font: 400 clamp(1.45rem, 2vw, 1.8rem)/1.15 var(--serif); color: var(--ink); }
.cp-rules { margin-top: clamp(24px, 3vw, 40px); padding-top: 1rem; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.cp-closed h2 { font-size: clamp(2rem, 3vw, 2.6rem); }
.cp-missing { padding-block: calc(var(--header-h) + 64px) 96px; }

@media (max-width: 960px) {
  .cp-grid { grid-template-columns: minmax(0, 1fr); }
  .cp-side { position: static; }
}
@media (max-width: 640px) {
  .gv-two { grid-template-columns: minmax(0, 1fr); }
  .gv-facts > div { grid-template-columns: minmax(0, 1fr); }
  .cp-row { grid-template-columns: minmax(0, 1fr); }
  .cp-row-go { justify-self: start; }
}

/* A campaign without its own photo: a designed cover (navy, ivory or limestone; a double ink frame; the star in
   hairlines; its name in Instrument Serif). Flat and square, like the rest of the site. */
.cp-row-img { position: relative; }
.cp-cover { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 10% 9%; overflow: hidden; container-type: inline-size; background: var(--night); color: var(--ivory); }
.cp-cover::before, .cp-cover::after { content: ""; position: absolute; pointer-events: none; border: 1px solid currentColor; opacity: .38; }
.cp-cover::before { inset: 4%; }
.cp-cover::after { inset: calc(4% + 5px); opacity: .22; }
.cp-tone-1 { background: var(--ivory); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.cp-tone-2 { background: var(--stone); color: var(--ink); }
.cp-cover-star { position: absolute; right: 9%; top: 11%; width: 30cqw; height: auto; opacity: .5; }
.cp-tone-0 .cp-cover-star { color: var(--accent-lt); opacity: .7; }
.cp-tone-1 .cp-cover-star, .cp-tone-2 .cp-cover-star { color: var(--accent); }
.cp-cover-title { position: relative; max-width: 14ch; padding-top: .35em; border-top: 1px solid currentColor; font: 400 clamp(1.05rem, 9cqw, 3.8rem)/1 var(--serif); letter-spacing: -.005em; text-wrap: balance; }
.ph-photo .cp-cover-star, .cp-row-img .cp-cover-star { position: absolute; inset: auto; right: 9%; top: 11%; width: 30cqw; height: auto; }

/* A campaign's page: the title at the top, the short description under it, and the photo beside them, whole at 3:2
   in a square ink frame, so the goal and the gift form start on the first screen. */
.page-hero.with-photo.cp-hero { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: start; min-height: 0; padding: clamp(40px, 5vw, 72px) var(--gutter) clamp(28px, 3vw, 44px); }
.cp-hero .ph-text { justify-content: flex-start; padding: 0; }
.page-hero.cp-hero + .gv-section { padding-top: clamp(28px, 3vw, 44px); }
.cp-hero .ph-photo { min-height: 0; height: auto; aspect-ratio: 3 / 2; outline: 1px solid var(--ink); outline-offset: 6px; }
@media (max-width: 960px) {
  .page-hero.with-photo.cp-hero { grid-template-columns: 1fr; gap: 24px; }
  .cp-hero .ph-photo { order: 0; height: auto; margin: 6px; }
}
.cp-progress .cp-when { margin: 12px 0 0; font-size: .95rem; }
/* Supporters (back office: recent gifts or top donors), under the long description: ink rules, Instrument Serif names. */
.cp-supporters { margin-top: clamp(32px, 4vw, 52px); }
.cp-supporters h2 { font-size: clamp(2rem, 3vw, 2.6rem); margin-bottom: .35em; }
.cp-supporters ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.cp-supporters li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.cp-sup-name { display: flex; flex-direction: column; gap: 2px; font: 400 clamp(1.3rem, 1.7vw, 1.5rem)/1.15 var(--serif); color: var(--ink); }
.cp-sup-ded { font: 400 .9rem/1.4 var(--sans); color: var(--muted); }
.cp-sup-amt { font: 500 1rem var(--sans); font-variant-numeric: lining-nums tabular-nums; color: var(--ink); white-space: nowrap; }
.cp-sup-sample { margin: 10px 0 0; font-size: .82rem; color: var(--muted); }
