/* The look riffs on greenmeadow.org, where this starts: its blue-to-green
   band, Montserrat headings, Open Sans text, and Arapey italic for a touch of
   voice. Blue and green are a shade darker than the site's own where they
   carry text, so white-on-green and links stay readable. Light only, like
   greenmeadow.org: a dark version stopped looking like it. */
:root {
  --blue: #004f98;
  --green: #46b25f;          /* the site's green: decoration only */
  --green-ink: #2b7f42;      /* green that carries text or a button */
  --teal: #3ca4be;
  --bg: #ffffff;
  --band: #f3f8f4;           /* a pale green wash */
  --text: #333333;
  --muted: #667077;
  --line: #dde5e0;
  --card: #ffffff;
  --link: var(--blue);
  --title: var(--blue);
  --button: var(--green-ink);
  --button-text: #ffffff;
  --mark: #e6f3ea;           /* a linked-to or chosen block */
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 "Open Sans", Arial, sans-serif;
}
.stripe { height: 6px; background: linear-gradient(89deg, var(--blue), var(--green)); }
header, main { max-width: 44rem; margin: 0 auto; padding: 0 1rem; }
header { padding-top: 2.4rem; }
h1, h2, h3, h4, button, label, .num, .where, .tally, summary {
  font-family: Montserrat, "Open Sans", Arial, sans-serif;
}
h1 { font-size: 2.1rem; line-height: 1.2; margin: 0.4rem 0 1.2rem; color: var(--title); font-weight: 700; }
h2 { font-size: 1.55rem; line-height: 1.3; margin: 2.8rem 0 0.8rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-weight: 700; }
h3 { font-size: 1.2rem; line-height: 1.35; margin: 2rem 0 0.6rem; font-weight: 600; }
h4 { font-size: 1.05rem; margin: 1.6rem 0 0.5rem; font-weight: 600; }
a { color: var(--link); }
.kicker {
  margin: 0;
  font-family: Arapey, Georgia, serif;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--green-ink);
}


/* Section 0, the request for feedback, sits in a pale green band so it reads
   as the invitation it is, not as one more section. */
.intro { background: var(--band); border-radius: 8px; padding: 0.2rem 1.4rem 0.8rem; margin-top: 1.8rem; border-left: 5px solid var(--green); }
.intro h2 { border-top: none; margin-top: 0.9rem; padding-top: 0; }

/* Every numbered block. A heading's number leads the heading, at its size;
   a paragraph's or list item's trails its text, small and muted, so the text
   keeps one clean left edge. Both are buttons: a tap opens the comment box. */
.block { position: relative; scroll-margin-top: 1rem; }
.block:target { background: var(--mark); border-radius: 4px; }
.num {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
  vertical-align: 0.1em;
}
.num:hover, .num:focus-visible { color: var(--link); border-color: var(--link); }
/* Heading numbers, whether or not they open a comment box: the heading's own
   size and weight, in the muted color, so "4.2" reads as part of the title. */
.hnum {
  font: inherit;
  color: var(--muted);
  vertical-align: baseline;
  padding: 0 0.15em;
  margin: 0 0.35em 0 -0.15em;
}
@media (hover: hover) {
  p.block .num, li.block .num { opacity: 0.6; }
  .block:hover .num { opacity: 1; color: var(--link); }
}
li.block { margin: 0.35rem 0; }
/* Outline indent: text under a ### heading sits a step in from it, so the
   FAQ's answers sit under their questions. */
.indent-1 { margin-left: 1.6rem; }
.indent-2 { margin-left: 3.2rem; }
/* Lists add the step to the browser's own 40px list indent. */
ul.indent-1, ol.indent-1 { padding-left: calc(40px + 1.6rem); margin-left: 0; }
ul.indent-2, ol.indent-2 { padding-left: calc(40px + 3.2rem); margin-left: 0; }

.extra h2 { margin-top: 3rem; }
#ballot { display: grid; gap: 0.5rem; }
.choice {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "radio name count" "radio why count";
  column-gap: 0.7rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--button); background: var(--mark); }
.choice input { grid-area: radio; width: 1.2rem; height: 1.2rem; accent-color: var(--button); }
.cname { grid-area: name; font-weight: 600; font-family: Montserrat, sans-serif; }
.why { grid-area: why; color: var(--muted); font-size: 0.9rem; }
.count { grid-area: count; color: var(--muted); font-size: 0.85rem; white-space: nowrap; }

.comment-form { display: grid; gap: 0.8rem; }
.comment-form label { display: grid; gap: 0.3rem; font-size: 0.9rem; font-weight: 600; }
.hint { font-weight: 400; color: var(--muted); font-family: "Open Sans", Arial, sans-serif; }
textarea, input:not([type="radio"]) {
  font: inherit;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.6rem 0.7rem;
  width: 100%;
}
textarea:focus, input:focus { outline: 2px solid var(--link); outline-offset: 1px; }
/* Buttons: the site's square-cornered green JOIN button. */
button[type="submit"], #selbtn, .cancel, .join, .doubt {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 3px;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--button);
  background: var(--button);
  color: var(--button-text);
  cursor: pointer;
  justify-self: start;
}
.cancel { background: none; color: var(--button); }
button:disabled { opacity: 0.6; }
.status { margin: 0; min-height: 1.4em; font-size: 0.95rem; color: var(--muted); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

#selbar {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
}
#selbar[hidden] { display: none; }
#selbtn { pointer-events: auto; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }

dialog {
  width: min(36rem, calc(100vw - 2rem));
  border: none;
  border-top: 5px solid var(--green);
  border-radius: 6px;
  padding: 1.3rem;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
dialog::backdrop { background: rgba(0, 20, 40, 0.45); }
.where { margin: 0; font-weight: 700; color: var(--title); }
.quote {
  margin: 0;
  padding: 0.4rem 0.8rem;
  border-left: 3px solid var(--green);
  color: var(--muted);
  max-height: 8rem;
  overflow: auto;
  font-size: 0.95rem;
}
.buttons { display: flex; gap: 0.6rem; justify-content: flex-end; }

/* The two answers side by side, the same size: doubt is as welcome as
   support, so it's a real button too, outlined in blue rather than filled. */
.join-buttons { margin: 1.2rem 0 0.6rem; display: flex; flex-wrap: wrap; gap: 0.8rem; }
.join, .doubt { font-size: 1.1rem; padding: 0.9rem 2rem; }
.doubt { background: var(--card); color: var(--blue); border-color: var(--blue); }
.join.chosen { background: var(--mark); color: var(--button); }
.doubt.chosen { background: #eaf1f8; }
.join.chosen::before, .doubt.chosen::before { content: "✓ "; }
.tally { font-weight: 600; color: var(--green-ink); }
details.suggest { margin-top: 1.4rem; }
details.suggest summary {
  cursor: pointer;
  color: var(--link);
  font-weight: 600;
  margin-bottom: 0.8rem;
}
main { padding-bottom: 6rem; }
