/* Note and Vote. Signal Room register: dark ground, one blue signal. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ground: #07080d;
  --panel: #10131b;
  --panel-up: #171b27;
  --rule: #272c3a;
  --edge: #6b7487;
  --ink: #eef1f7;
  --ink-soft: #b7bdcb;
  --mute: #8d95a8;
  --signal: #5b8cff;
  --signal-up: #7ea4ff;
  --signal-wash: rgba(91, 140, 255, 0.13);
  --on-signal: #07080d;
  --agreed: #4fd18b;
  --split: #f5b544;
  --parked: #8d95a8;
  --alert: #ff8f85;
  --alert-wash: rgba(255, 143, 133, 0.1);
  --seg-off: #2e3547;
  --r: 10px;
  --r-small: 6px;
  --measure: 41rem;
  --gutter: 1.25rem;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.top,
main,
.foot,
.noscript {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main {
  flex: 1;
  padding-block: 2.5rem 4rem;
  outline: none;
}

/* ---------- top bar and footer ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.mark-glyph {
  flex: none;
}

.team {
  color: var(--mute);
  font-size: 0.875rem;
}

.foot {
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--rule);
  color: var(--mute);
  font-size: 0.875rem;
}

.foot p {
  margin: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.875rem;
  border-radius: var(--r-small);
  background: var(--signal);
  color: var(--on-signal);
  font-weight: 600;
}

.skip:focus {
  top: 0.5rem;
}

.noscript {
  padding-block: 2rem;
  color: var(--alert);
}

.loading {
  color: var(--mute);
}

/* ---------- type ---------- */

h1,
h2,
h3,
p,
ol,
ul {
  margin: 0;
}

h1 {
  font-size: clamp(1.875rem, 1.3rem + 2.6vw, 2.625rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.012em;
}

h3 {
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 600;
}

.lead {
  margin-top: 0.875rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
  line-height: 1.5;
  max-width: 34rem;
  white-space: pre-line;
}

.meta {
  margin-top: 0.5rem;
  color: var(--mute);
  font-size: 0.9375rem;
}

.soft {
  color: var(--ink-soft);
}

.small {
  font-size: 0.875rem;
  color: var(--mute);
}

.num {
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--signal-up);
  text-underline-offset: 0.18em;
}

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

:focus-visible {
  outline: 2px solid var(--signal-up);
  outline-offset: 2px;
  border-radius: var(--r-small);
}

.stack > * + * {
  margin-top: 1rem;
}

.section {
  margin-top: 2.5rem;
}

h2 + * {
  margin-top: 0.625rem;
}

.section > h2 + * {
  margin-top: 0.875rem;
}

.back {
  margin-bottom: 0.875rem;
  font-size: 0.9375rem;
}

.divide {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

/* ---------- stage rail ---------- */

.rail {
  list-style: none;
  padding: 0;
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.375rem;
}

.rail li {
  padding-top: 0.625rem;
  border-top: 3px solid var(--seg-off);
  color: var(--mute);
  font-size: 0.9375rem;
}

.rail li.done {
  border-top-color: var(--edge);
  color: var(--ink-soft);
}

.rail li.now {
  border-top-color: var(--signal);
  color: var(--ink);
  font-weight: 600;
}

.status {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.status-text {
  color: var(--ink-soft);
}

.status-text strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- people meter: one segment per person, never a name ---------- */

.meter {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.meter-segs {
  display: inline-flex;
  gap: 4px;
}

.seg {
  width: 1.125rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--seg-off);
}

.seg.on {
  background: var(--signal);
}

.meter.agreed .seg.on {
  background: var(--agreed);
}

.meter.split .seg.on {
  background: var(--split);
}

.meter.parked .seg.on {
  background: var(--parked);
}

.meter-bar {
  width: 9rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--seg-off);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: var(--signal);
}

.meter.agreed .meter-fill {
  background: var(--agreed);
}

.meter.split .meter-fill {
  background: var(--split);
}

.meter.parked .meter-fill {
  background: var(--parked);
}

.meter-text {
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .meter.fill-in .seg.on {
    animation: seg-in 0.4s ease-out both;
  }

  .meter.fill-in .seg:nth-child(2) {
    animation-delay: 0.08s;
  }

  .meter.fill-in .seg:nth-child(3) {
    animation-delay: 0.16s;
  }

  .meter.fill-in .seg:nth-child(4) {
    animation-delay: 0.24s;
  }

  .meter.fill-in .seg:nth-child(5) {
    animation-delay: 0.32s;
  }

  .meter.fill-in .seg:nth-child(6) {
    animation-delay: 0.4s;
  }

  .meter.fill-in .seg:nth-child(n + 7) {
    animation-delay: 0.48s;
  }

  @keyframes seg-in {
    from {
      background: var(--seg-off);
    }
  }
}

/* ---------- callouts ---------- */

.rules {
  margin-top: 2rem;
  padding: 1rem 1.125rem;
  border-left: 3px solid var(--signal);
  background: var(--panel);
  border-radius: 0 var(--r) var(--r) 0;
  color: var(--ink-soft);
}

.rules ul {
  list-style: none;
  padding: 0;
}

.rules li + li {
  margin-top: 0.25rem;
}

.rules strong {
  color: var(--ink);
  font-weight: 600;
}

.panel {
  padding: 1.25rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--r);
}

.panel > * + * {
  margin-top: 0.75rem;
}

.error {
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--alert);
  background: var(--alert-wash);
  border-radius: 0 var(--r) var(--r) 0;
  color: var(--ink);
}

.error:empty {
  display: none;
}

.done-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--agreed);
  font-weight: 600;
}

.done-mark::before {
  content: "";
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 2px;
  background: var(--agreed);
}

/* ---------- buttons ---------- */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary {
  background: var(--signal);
  color: var(--on-signal);
}

.btn.primary:hover {
  background: var(--signal-up);
  color: var(--on-signal);
}

.btn.quiet {
  border-color: var(--edge);
}

.btn.quiet:hover {
  background: var(--panel-up);
  color: var(--ink);
}

.btn.danger {
  border-color: var(--alert);
  color: var(--alert);
}

.btn.danger:hover {
  background: var(--alert-wash);
}

.btn.small {
  min-height: 2.5rem;
  padding: 0 0.875rem;
  font-size: 0.9375rem;
}

.btn.link {
  min-height: 2.75rem;
  padding: 0;
  color: var(--signal-up);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.btn.link:hover {
  color: var(--ink);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.actions.tight {
  margin-top: 1rem;
}

/* ---------- form fields ---------- */

.field {
  display: grid;
  gap: 0.375rem;
}

.field + .field,
.field-row + .field,
.field + .field-row {
  margin-top: 1.25rem;
}

.field > label,
.label {
  font-weight: 500;
}

.help {
  color: var(--mute);
  font-size: 0.875rem;
}

p.label {
  margin-bottom: 0.75rem;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--edge);
  border-radius: var(--r);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
}

textarea {
  display: block;
  min-height: 3.25rem;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--mute);
  opacity: 1;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--signal-up);
  outline-offset: 1px;
  border-radius: var(--r);
}

input[type="datetime-local"] {
  max-width: 22rem;
  color-scheme: dark;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.25rem;
}

.field-row .field + .field {
  margin-top: 0;
}

/* ---------- questions and notes ---------- */

.question {
  margin-top: 2.5rem;
}

.question-head {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  column-gap: 0.25rem;
  align-items: baseline;
}

.question-num {
  color: var(--signal);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.question-text {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.012em;
}

.question-hint {
  grid-column: 2;
  margin-top: 0.25rem;
  color: var(--mute);
  font-size: 0.9375rem;
}

.question-body {
  margin-top: 0.875rem;
  padding-left: 2rem;
}

.note-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: start;
}

.note-row + .note-row {
  margin-top: 0.625rem;
}

.icon-btn {
  appearance: none;
  width: 2.75rem;
  height: 3.25rem;
  border: 0;
  border-radius: var(--r-small);
  background: transparent;
  color: var(--mute);
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--ink);
  background: var(--panel-up);
}

.counter {
  margin-top: 0.25rem;
  color: var(--mute);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.counter.near {
  color: var(--split);
}

/* ---------- vote ---------- */

.idea {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.875rem;
  align-items: start;
  padding: 0.875rem 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--panel);
  cursor: pointer;
}

.idea-wrap + .idea-wrap {
  margin-top: 0.625rem;
}

.idea:hover {
  background: var(--panel-up);
}

.idea.on {
  border-color: var(--signal);
  background: var(--signal-wash);
}

.idea input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
  margin: 0.0625rem 0 0;
  border: 1.5px solid var(--edge);
  border-radius: var(--r-small);
  background: var(--ground);
  position: relative;
  cursor: pointer;
}

.idea input[type="checkbox"]:checked {
  border-color: var(--signal);
  background: var(--signal);
}

.idea input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 0.14rem;
  width: 0.36rem;
  height: 0.7rem;
  border: solid var(--on-signal);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.idea-text {
  line-height: 1.45;
}

.idea-extra {
  padding: 0.25rem 0 0 3.25rem;
}

.idea-extra textarea {
  margin-top: 0.375rem;
}

/* ---------- readout ---------- */

.band {
  margin-top: 1.5rem;
}

.band-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.band-name {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.band-name::before {
  content: "";
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 2px;
  background: var(--parked);
}

.band.agreed .band-name::before {
  background: var(--agreed);
}

.band.split .band-name::before {
  background: var(--split);
}

.band-rule {
  color: var(--mute);
  font-size: 0.875rem;
}

.results {
  list-style: none;
  padding: 0;
}

.result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 1.25rem;
  align-items: start;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--rule);
}

.result-text {
  line-height: 1.45;
}

.result .meter {
  margin-top: 0.3rem;
}

.result-builds {
  grid-column: 1 / -1;
  list-style: none;
  padding: 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.result-builds li {
  padding-left: 0.875rem;
  border-left: 2px solid var(--rule);
}

.result-builds li + li {
  margin-top: 0.375rem;
}

.result-builds b {
  color: var(--ink);
  font-weight: 600;
}

.plain-list {
  list-style: none;
  padding: 0;
}

.plain-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}

.facts {
  margin-top: 1.5rem;
  color: var(--mute);
  font-size: 0.875rem;
}

.facts p + p {
  margin-top: 0.25rem;
}

/* ---------- what is stored ---------- */

.stored {
  margin-top: 2rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.stored summary {
  display: inline-block;
  padding: 0.625rem 0;
  color: var(--signal-up);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
  list-style: none;
}

.stored summary::-webkit-details-marker {
  display: none;
}

.stored summary:hover {
  color: var(--ink);
}

.stored ul {
  list-style: none;
  padding: 0 0 0 1rem;
  border-left: 2px solid var(--rule);
}

.stored li + li {
  margin-top: 0.5rem;
}

.stored strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- home ---------- */

.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  column-gap: 0.25rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--rule);
}

.steps li::before {
  content: counter(step);
  color: var(--signal);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.steps b {
  font-weight: 600;
}

.steps span {
  color: var(--ink-soft);
}

.hero-meter {
  margin-top: 2rem;
  display: grid;
  gap: 0.5rem;
}

/* ---------- owner ---------- */

.round-list {
  list-style: none;
  padding: 0;
}

.round-item {
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--rule);
}

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

.round-item-title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.round-item-title:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.round-item-meta {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

.chip.now {
  border-color: var(--signal);
  color: var(--ink);
}

.q-edit {
  display: grid;
  grid-template-columns: 1.75rem 1fr auto;
  column-gap: 0.25rem;
  align-items: start;
}

.q-edit + .q-edit {
  margin-top: 1rem;
}

.q-edit .question-num {
  padding-top: 0.75rem;
}

.q-edit .fields > * + * {
  margin-top: 0.5rem;
}

.checks {
  list-style: none;
  padding: 0;
}

.checks li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.25rem 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--rule);
}

.check-state {
  font-weight: 600;
}

.check-state.ok {
  color: var(--agreed);
}

.check-state.missing {
  color: var(--alert);
}

.check-state.optional {
  color: var(--mute);
}

.copy-box {
  padding: 0.875rem 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 0.9375rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.raw-notes {
  list-style: none;
  padding: 0;
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.raw-notes li {
  padding: 0.375rem 0 0.375rem 0.875rem;
  border-left: 2px solid var(--rule);
}

.raw-notes li + li {
  margin-top: 0.375rem;
}

.merge-q + .merge-q {
  margin-top: 1.75rem;
}

.ways {
  list-style: none;
  padding: 0;
}

.ways li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.ways li > * + * {
  margin-top: 0.5rem;
}

/* ---------- dialog and toast ---------- */

dialog.confirm {
  width: min(28rem, calc(100vw - 2rem));
  padding: 1.5rem;
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
}

dialog.confirm::backdrop {
  background: rgba(3, 4, 8, 0.72);
}

dialog.confirm p {
  margin-top: 0.625rem;
  color: var(--ink-soft);
}

dialog.confirm .actions {
  margin-top: 1.5rem;
  justify-content: flex-end;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 20;
  transform: translateX(-50%);
  padding: 0.625rem 1rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--panel-up);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
}

.toast[hidden] {
  display: none;
}

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

@media (max-width: 30rem) {
  main {
    padding-block: 2rem 3rem;
  }

  .question-body {
    padding-left: 0;
  }

  .idea-extra {
    padding-left: 0;
  }

  .result {
    grid-template-columns: 1fr;
  }

  .result .meter {
    margin-top: 0;
  }

  .seg {
    width: 0.9375rem;
  }

  .checks li {
    grid-template-columns: 1fr;
  }

  .actions .btn:not(.link) {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
