/* Additions on top of Simple.css: comment card, three-way result bars. */
:root {
  --yes: #3d7d4a;
  --unsure: #a3a3a3;
  --no: #b0473b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --yes: #5a9c66;
    --unsure: #6e6e6e;
    --no: #c4645a;
  }
}

body > header p { margin-bottom: 0.5rem; }
/* Each sentence wraps as a unit: one line when both fit, otherwise a break between them. */
.subtitle { text-wrap: balance; }
.subtitle span { display: inline-block; }
header nav a[aria-current="page"] { border-color: var(--text); color: var(--text); }

.intro { color: var(--text-light); }

/* Vote page */
.card { margin-block: 1rem; }
.card .meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  color: var(--text-light);
  font-size: 0.95rem;
}
.card .year { font-weight: 700; color: var(--text); }
.about { margin-block: 0.5rem 0; color: var(--text-light); font-size: 0.95rem; font-style: italic; }
.comment { overflow-wrap: anywhere; }
.comment p { margin-block: 0.75rem; }
.comment .quote {
  border-left: 3px solid var(--border);
  padding-left: 0.75rem;
  color: var(--text-light);
}
.bar-text {
  margin-block: 1.25rem 0;
  padding: 0.6rem 0.8rem;
  background: var(--accent-bg);
  border-radius: var(--standard-border-radius);
}
.question { font-weight: 700; color: var(--text); }

/* Answer bar pinned to the bottom so the buttons stay in one place from card to card. */
body[data-page="vote"] { padding-bottom: calc(8rem + env(safe-area-inset-bottom, 0px)); }
.actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 0.5rem max(1rem, env(safe-area-inset-right, 0px)) calc(0.5rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
}
.actions-inner { max-width: 45rem; margin: 0 auto; display: grid; gap: 0.5rem; }
.items .bar-text { margin: 0 0 0.4rem; padding: 0; background: none; }
.choices {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
}
.choices button {
  margin: 0;
  min-height: 3rem;
  padding: 0.5rem;
  font-size: 1rem;
}
.choices button.yes { background: var(--yes); border-color: var(--yes); color: #fff; }
.choices button.unsure { background: var(--unsure); border-color: var(--unsure); color: #111; }
.choices button.no { background: var(--no); border-color: var(--no); color: #fff; }
.choices button[aria-pressed="true"] { outline: 3px solid var(--text); outline-offset: 2px; }
/* Disabled = the button's own colour, dimmed (the common convention), not Simple.css's grey,
   which flashes, especially in dark mode. Comes after the colour rules so it wins. */
.choices button:disabled { opacity: 0.5; cursor: default; }
.when { color: var(--text-light); text-decoration: none; }
.items .bar-text a { color: var(--text); }
/* The whole entry opens its card; the author link sits above that and opens HN. */
.items li { position: relative; }
.items .bar-text a::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.items .by a { position: relative; z-index: 1; }
.status { min-height: 1.5em; color: var(--text-light); font-size: 0.95rem; }

/* "N people voting": a plain dot, no animation. */
.active { color: var(--text-light); font-size: 0.95rem; }
.active::before {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-right: 0.4em;
  border-radius: 50%;
  background: var(--yes);
  vertical-align: 0.05em;
}

/* Result bars */
.bar {
  display: flex;
  height: 0.75rem;
  border-radius: var(--standard-border-radius);
  overflow: hidden;
  background: var(--accent-bg);
}
.bar span { display: block; height: 100%; }
.bar .y { background: var(--yes); }
.bar .u { background: var(--unsure); }
.bar .n { background: var(--no); }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
}
.legend i {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-right: 0.3em;
  border-radius: 2px;
  vertical-align: baseline;
}

/* Results page */
.jump { margin-block: 0.75rem; word-spacing: 0.4rem; }
section.quarter { margin-block: 2rem; }
section.quarter .head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin-bottom: 0.4rem;
}
section.quarter h2 { margin: 0; font-size: 1.4rem; }
section.quarter .head span { color: var(--text-light); font-size: 0.95rem; }
.items { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.items li { padding-block: 0.75rem; border-top: 1px solid var(--border); }
.items .by { font-size: 0.9rem; color: var(--text-light); margin-bottom: 0.4rem; }
.empty { color: var(--text-light); font-size: 0.9rem; }
