/* Starling — choir outreach. Palette from the choral world:
   ivory program paper, robe burgundy, stole gold, royal-robe blue. */

:root {
  --paper: #F7F5F0;
  --paper-raised: #FDFCF9;
  --ink: #24211C;
  --robe: #6B2233;
  --stole: #A8821A;
  --royal: #35558A;
  --faded: #857D72;
  --hairline: #DFD8CB;
  --display: "Cormorant Garamond", Georgia, serif;
  --body: "Alegreya Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; }

html { color-scheme: light; }

body {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  padding: 0 1.25rem 4rem;
}

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

/* ---------- masthead ---------- */

.masthead { text-align: center; padding: 2.5rem 0 0.5rem; }

.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  letter-spacing: 0.32em;
  margin-right: -0.32em; /* recenters tracked-out caps */
  color: var(--robe);
}

.masthead-sub {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faded);
  margin-top: 0.4rem;
}

main { max-width: 46rem; margin: 0 auto; }

/* ---------- the staff (signature) ---------- */

.score { margin: 2rem 0 2.5rem; }

.score svg { display: block; width: 100%; height: auto; }

.score .staff-line { stroke: var(--hairline); stroke-width: 1.5; }

.score .note {
  cursor: pointer;
}
.score .note ellipse {
  fill: var(--robe);
  transition: fill 120ms ease;
}
.score .note.is-zero ellipse { fill: none; stroke: var(--hairline); stroke-width: 1.5; }
.score .note.is-active ellipse { fill: var(--stole); }
.score .note:hover ellipse { fill: var(--stole); }
.score .note.is-zero:hover ellipse { stroke: var(--stole); }

.score .note .count {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  fill: var(--ink);
  text-anchor: middle;
}

.score .note .stage-label {
  font-family: var(--body);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--faded);
  text-anchor: middle;
}
.score .note.is-active .stage-label { fill: var(--ink); }

/* ---------- sections ---------- */

.section-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--ink);
}

/* ---------- waiting on you ---------- */

#attention-section { margin-bottom: 2.5rem; }

.attention-list {
  list-style: none;
  padding: 0;
  margin-top: 0.75rem;
  border-top: 2px solid var(--robe);
}

.attention-list li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.7rem 0.25rem;
  border-bottom: 1px solid var(--hairline);
}

.attention-list .who {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
}

.attention-list .what { color: var(--ink); }

.attention-list .badge {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--stole);
  border-radius: 2px;
  padding: 0.15rem 0.45rem;
  align-self: center;
}
.attention-list .badge.decide { background: var(--royal); }

/* ---------- list controls ---------- */

.list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

#search {
  font: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--hairline);
  background: var(--paper-raised);
  border-radius: 3px;
  padding: 0.35rem 0.7rem;
  min-width: 14rem;
}
#search::placeholder { color: var(--faded); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.9rem 0 1.1rem;
}

.filters button {
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  border: 1px solid var(--hairline);
  background: none;
  color: var(--faded);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  cursor: pointer;
}
.filters button[aria-pressed="true"] {
  border-color: var(--robe);
  background: var(--robe);
  color: var(--paper);
}

/* ---------- choir list ---------- */

.choir-list { list-style: none; padding: 0; border-top: 2px solid var(--ink); }

.choir-list > li { border-bottom: 1px solid var(--hairline); }

.choir-list summary {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.8rem 0.25rem;
  cursor: pointer;
  list-style: none;
}
.choir-list summary::-webkit-details-marker { display: none; }

.choir-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
}

.choir-city {
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faded);
}

.chip {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  align-self: center;
  padding: 0.14rem 0.55rem;
  border-radius: 2px;
  border: 1px solid transparent;
}
.chip.not_contacted { color: var(--faded); border-color: var(--hairline); }
.chip.researched   { color: var(--ink); border-color: var(--ink); }
.chip.emailed      { color: var(--paper); background: var(--robe); }
.chip.replied      { color: var(--paper); background: var(--royal); }
.chip.interested   { color: var(--ink); background: #E9D48A; border-color: var(--stole); }
.chip.declined, .chip.defunct { color: var(--faded); border-color: var(--hairline); }
.chip.paused       { color: var(--faded); border-color: var(--hairline); font-style: italic; }

.choir-detail {
  padding: 0.2rem 0.25rem 1.1rem;
  display: grid;
  gap: 0.6rem;
}

.choir-detail .facts {
  font-size: 0.92rem;
  color: var(--faded);
}
.choir-detail .facts a { color: var(--royal); }

.timeline { list-style: none; padding: 0; display: grid; gap: 0.35rem; }

.timeline li {
  display: flex;
  gap: 0.7rem;
  font-size: 0.95rem;
  align-items: baseline;
}

.timeline .t-date {
  flex-shrink: 0;
  width: 4.6rem;
  font-size: 0.8rem;
  color: var(--faded);
  font-variant-numeric: tabular-nums;
}

.timeline .t-mark { flex-shrink: 0; width: 1.1rem; text-align: center; }
.timeline .email_out .t-mark { color: var(--robe); }
.timeline .email_in .t-mark { color: var(--royal); }

.empty { color: var(--faded); text-align: center; padding: 2rem 0; }

/* ---------- coda ---------- */

.coda {
  margin-top: 3rem;
  text-align: center;
  color: var(--faded);
  font-size: 0.92rem;
}
.coda-fine {
  margin-top: 0.8rem;
  font-style: italic;
  font-family: var(--display);
  font-size: 1.05rem;
}

/* ---------- passphrase gate ---------- */

.gate {
  min-height: 92vh;
  display: grid;
  place-items: center;
}

.gate-card { text-align: center; max-width: 20rem; width: 100%; }

.gate-sub {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faded);
  margin: 0.4rem 0 2rem;
}

.gate form { display: grid; gap: 0.6rem; text-align: left; }

.gate label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faded);
}

.gate input {
  font: inherit;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  background: var(--paper-raised);
}

.gate button {
  font: inherit;
  font-weight: 500;
  margin-top: 0.4rem;
  padding: 0.55rem;
  border: none;
  border-radius: 3px;
  background: var(--robe);
  color: var(--paper);
  cursor: pointer;
}
.gate button:hover { background: #571b29; }

.gate-error { color: var(--robe); font-size: 0.9rem; }

/* ---------- small screens ---------- */

@media (max-width: 540px) {
  body { font-size: 1rem; padding: 0 0.9rem 3rem; }
  .attention-list li { flex-wrap: wrap; }
  .attention-list .badge { margin-left: 0; }
  .list-head { flex-direction: column; align-items: stretch; }
  #search { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
