:root {
  color-scheme: dark light;
  --bg: #0d0f13;
  --card: #161a21;
  --line: #262c36;
  --text: #e8eaed;
  --muted: #98a1ae;
  --accent: #5b8cff;
  --on-accent: #0d0f13;
  --accent-text: #8fb0ff;
  --ok-line: #2f6b4f;
  --ok-bg: #12241b;
  --error-line: #7a3b3b;
  --error-bg: #241414;
  --ok-text: #4cc38a;
  --error-text: #ff7b72;
  --warn: #e0a100;
  --check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.9' fill='none' stroke='%230d0f13' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6f8;
    --card: #ffffff;
    --line: #dfe3e9;
    --text: #14171c;
    --muted: #5b6672;
    --accent: #2b5fd9;
    --on-accent: #ffffff;
    --accent-text: #2b5fd9;
    --ok-line: #b7dcc6;
    --ok-bg: #eefaf2;
    --error-line: #e8bcbc;
    --error-bg: #fdf1f1;
    --ok-text: #1a7f37;
    --error-text: #c62828;
    --warn: #8a6100;
    --check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Every link is the accent, visited or not; a class on a link sets its own color over this. */
a { color: var(--accent); }

.form-label { font-size: 13px; color: var(--muted); }

.input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 15px;
}

.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.input::file-selector-button {
  margin-right: 12px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

/* Drawn from the palette, not the browser's, so an unchecked control reads as enabled in both themes. */
input[type="radio"], input[type="checkbox"] {
  appearance: none;
  flex: none;
  width: 16px; height: 16px;
  margin: 0;
  border: 1.5px solid var(--muted);
  background: var(--card) center / 12px 12px no-repeat;
  cursor: pointer;
}

input[type="radio"] { border-radius: 50%; }
input[type="checkbox"] { border-radius: 4px; }
input[type="radio"]:checked { border-color: var(--accent); background-color: var(--accent); box-shadow: inset 0 0 0 3px var(--card); }
input[type="checkbox"]:checked { border-color: var(--accent); background-color: var(--accent); background-image: var(--check-mark); }
input[type="radio"]:focus-visible, input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
}

.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.copy-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.copy-row > code { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.copy-button { flex: none; padding: 6px 12px; font-size: 13px; }
.copy-button-copied { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.code-block { position: relative; }
.code-block > pre, .code-block > div { padding-right: 84px; }
.code-block > .copy-button { position: absolute; top: 8px; right: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block {
  width: 100%;
  margin-top: 16px;
  display: block;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}
.front {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.front-say { padding: 44px 0 34px; }
.front-lede { margin: 18px 0 0; font-size: 18px; color: var(--muted); max-width: 52ch; }
.front-requirements { margin: 14px 0 0; font-size: 14px; color: var(--muted); max-width: 52ch; }

.front-headline {
  margin: 0;
  font-size: clamp(30px, 4.6vw, 56px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 20ch;
  text-wrap: balance;
}

.front-stage {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 34px;
}

/* Both panels run to the taller one's foot, so neither leaves an empty block beside the other. */
.front-side { display: flex; flex-direction: column; }
.front-side .phone, .front-side .window { flex: 1; }

.front-side-label {
  margin: 0 0 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.front-tail {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
}

.front-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  white-space: pre;
  overflow-x: auto;
}

.front-offer {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  text-align: right;
}

.front-offer .btn-primary {
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 16px;
  text-decoration: none;
}

.front-price {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  max-width: 46ch;
}

.front-price strong { color: var(--text); font-weight: 500; }

.front-code { margin: 0; }

.not-found {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 16px;
}

.not-found-title { margin: 0; font-size: 24px; font-weight: 600; }
.not-found-detail { margin: 6px 0 20px; font-size: 15px; color: var(--muted); }
.not-found .btn { border-radius: 999px; padding: 9px 18px; font-size: 14px; text-decoration: none; }

.terms { max-width: 68ch; padding: 36px 0 8px; }
.terms h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: none;
}
.terms-meta { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.terms h2 { margin: 28px 0 8px; font-size: 18px; font-weight: 600; }
.terms p { margin: 0 0 12px; font-size: 15px; line-height: 1.55; }
.terms ul { margin: 0 0 12px; padding-left: 1.2em; }
.terms li { margin: 0 0 6px; font-size: 15px; line-height: 1.55; }
.terms a { color: var(--accent-text); }

@media (max-width: 900px) {
  .front-stage { grid-template-columns: 1fr; }
  .front-tail { flex-direction: column; align-items: stretch; }
  .front-offer { margin-left: 0; align-items: stretch; text-align: left; }
  .front-offer .btn-primary { text-align: center; }
}

/* The footer sits at the bottom of the window however short the page above it is. */
.site-page { min-height: 100vh; display: flex; flex-direction: column; }
.site-page > .site-foot { margin-top: auto; }

.site-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.site-mark {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.site-glyph {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.site-navigation { display: flex; gap: 18px; }
.site-link { color: var(--muted); text-decoration: none; white-space: nowrap; }
.site-link:hover { color: var(--text); }
.site-link-current { color: var(--text); font-weight: 600; }

.site-end { margin-left: auto; display: flex; align-items: center; gap: 14px; min-width: 0; }

.site-who {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.site-action {
  white-space: nowrap;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}

.site-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.site-foot-navigation { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-foot-navigation a { color: var(--muted); }

/* A phone keeps the mark and the way in; the two page links move to the footer. */
@media (max-width: 560px) {
  .site-navigation { display: none; }
  .site-who { display: none; }
  .site-foot-navigation { margin-left: 0; }
}

.phone {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  overflow: hidden;
}

.phone-bar {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 17px 18px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.phone-bar-sort {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
}

.compose {
  display: flex;
  gap: 9px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.compose-field {
  flex: 1;
  min-width: 0;
  font: 400 14px/1.2 inherit;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 12px;
  color: var(--text);
}

.compose-field:focus { outline: 2px solid var(--accent); outline-offset: 0; }

.compose-send {
  font: 600 14px/1 inherit;
  padding: 0 15px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  cursor: pointer;
}

.compose-send:disabled {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
  cursor: default;
}

.board-row {
  display: flex;
  gap: 13px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}

.board-row:last-child { border-bottom: 0; }

.board-row-arriving { animation: arriving 280ms ease both; }

@keyframes arriving {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

.vote {
  width: 44px;
  flex: none;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px 0 5px;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.vote:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vote-mine { border-color: var(--accent); color: var(--accent); }
.vote-count { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.vote-arrow { display: block; font-size: 10px; font-style: normal; color: var(--muted); }
.vote-mine .vote-arrow { color: var(--accent); }

.request-body { min-width: 0; padding-top: 2px; }
.request-name { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }

.status {
  display: inline-block;
  margin-top: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.status-planned { border-color: var(--accent); color: var(--accent); }
.status-declined { border-color: var(--error-line); background: var(--error-bg); color: var(--text); }

.from-developer {
  margin-top: 9px;
  padding: 9px 11px;
  background: var(--bg);
  border-left: 2px solid var(--accent);
  border-radius: 0 7px 7px 0;
  font-size: 12.5px;
}

.from-developer-who {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.window {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.window-lights { display: flex; gap: 6px; }

.window-lights span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
  display: block;
}

.shown-top { display: flex; align-items: center; gap: 12px; padding: 15px 20px 0; }
.shown-brand { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.shown-who { margin-left: auto; display: flex; gap: 10px; font-size: 12px; color: var(--muted); }

.shown-tabs {
  display: flex;
  gap: 22px;
  padding: 12px 20px 0;
  border-bottom: 1px solid var(--line);
}

.shown-tab { font-size: 13.5px; color: var(--muted); padding-bottom: 11px; }
.shown-tab-current { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }

.shown-body { padding: 20px; min-height: 316px; display: flex; flex-direction: column; }
.shown-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; font-size: 16px; font-weight: 600; }

.shown-count {
  margin-left: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.queue {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  padding: 20px;
}

.queue-position {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.queue-title { margin: 9px 0 0; font-size: 18px; letter-spacing: -0.025em; }
.queue-meta { display: flex; align-items: center; gap: 10px; margin: 13px 0 16px; font-size: 12.5px; color: var(--muted); }

.queue-demand {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 6px;
  padding: 3px 8px;
}

.answers { display: flex; flex-direction: column; gap: 9px; }

.answer {
  text-align: left;
  font: 600 14.5px/1 inherit;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}

.answer:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.answer-yes { border-color: var(--ok-line); background: var(--ok-bg); }

.why { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.why-label { font-size: 12.5px; color: var(--muted); }

.why-field {
  font: 400 14px/1.5 inherit;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  resize: none;
  min-height: 74px;
}

.why-field:focus { outline: 2px solid var(--accent); }

.why-send {
  align-self: flex-start;
  font: 600 14px/1 inherit;
  padding: 11px 16px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  cursor: pointer;
}

.at-rest { margin: auto 0; text-align: center; color: var(--muted); }

.at-rest-heading {
  display: block;
  font-size: 17px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.at-rest-detail { margin: 0; font-size: 13.5px; }

.ask-again {
  margin-top: 16px;
  font: 600 13.5px/1 inherit;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .board-row-arriving { animation: none; }
}
