/*
 * The website's half of docs/brand.md.
 *
 * Written by hand rather than generated from the extension's Tailwind build:
 * these two pages ship as static files with no build step, so a host swap is a
 * directory copy. Every value below is a token from the brand book; component
 * rules never name a literal.
 *
 * No external request of any kind — no CDN, no font host, no analytics vendor.
 * That is a product decision, not a performance one: the privacy policy served
 * from this same directory promises no third-party scripts, and a webfont
 * fetched from Google would make that sentence false.
 */

:root {
  color-scheme: dark;

  --bg: #050505;
  --surface: #08090b;
  --surface-hi: #0e0f10;

  --line: rgb(255 255 255 / 0.08);
  --line-soft: rgb(255 255 255 / 0.06);
  --line-hi: rgb(255 255 255 / 0.12);
  --line-input: #2d3034;

  --ink: #ffffff;
  --ink-92: rgb(255 255 255 / 0.92);
  --ink-70: rgb(255 255 255 / 0.7);
  --ink-55: rgb(255 255 255 / 0.55);
  --ink-45: rgb(255 255 255 / 0.45);
  --ink-40: rgb(255 255 255 / 0.4);
  --ink-28: rgb(255 255 255 / 0.28);

  --accent: #ff8a3d;
  --accent-line: rgb(255 138 61 / 0.65);
  --accent-soft: rgb(255 138 61 / 0.1);
  --accent-bright: #ff7a18;
  --violet: #9d9bea;
  --warning: #f2c94c;
  --danger: #eb5656;
  --solid: #e9e9ec;
  --solid-ink: #0b0b0b;

  --radius-control: 8px;

  /* The site follows the OS, unlike the injected popover — there is no host
     page here whose own theme attribute would be the better signal. */
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --bg: #ffffff;
    --surface: #fafafa;
    --surface-hi: #f4f4f5;

    --line: rgb(0 0 0 / 0.1);
    --line-soft: rgb(0 0 0 / 0.07);
    --line-hi: rgb(0 0 0 / 0.16);
    --line-input: #d4d4d8;

    --ink: #0b0b0b;
    --ink-92: rgb(11 11 11 / 0.88);
    --ink-70: rgb(11 11 11 / 0.72);
    --ink-55: rgb(11 11 11 / 0.58);
    --ink-45: rgb(11 11 11 / 0.5);
    --ink-40: rgb(11 11 11 / 0.45);
    --ink-28: rgb(11 11 11 / 0.34);

    --accent: #b0590c;
    --accent-line: rgb(176 89 12 / 0.55);
    --accent-soft: rgb(176 89 12 / 0.08);
    --accent-bright: #8f4708;
    --violet: #5a4fcf;
    --warning: #a16207;
    --danger: #b91c1c;
    --solid: #171717;
    --solid-ink: #fafafa;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-92);
  font-family: Roboto, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0;
}

.mono,
code,
kbd {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- layout ---------- */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.page--wide {
  max-width: 820px;
}

header.masthead {
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 40px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark span {
  color: var(--ink-45);
  font-weight: 400;
}

h1 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 .quiet {
  color: var(--ink-55);
}

h2 {
  margin: 48px 0 12px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h3 {
  margin: 28px 0 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

p {
  margin: 0 0 16px;
}

.lede {
  color: var(--ink-70);
  font-size: 17px;
  line-height: 1.55;
}

.secondary {
  color: var(--ink-55);
  font-size: 13px;
  line-height: 1.55;
}

a {
  color: var(--ink-70);
  text-decoration: underline;
  text-decoration-color: var(--line-hi);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ink);
  text-decoration-color: var(--accent-line);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 1px solid var(--accent-bright);
  outline-offset: 2px;
}

ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

li {
  margin-bottom: 6px;
}

hr {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: 48px 0;
}

/* ---------- the signature micro-label ---------- */

.label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
}

.label b {
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.2em;
}

.label i {
  width: 40px;
  height: 1px;
  background: var(--accent);
}

.label em {
  color: var(--ink-40);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* ---------- tables ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 12px 10px 0;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink-40);
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

td:first-child {
  color: var(--ink);
  white-space: nowrap;
}

/* ---------- cards ---------- */

.card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 20px;
  margin: 0 0 24px;
}

.card > :last-child {
  margin-bottom: 0;
}

.card--quiet {
  background: transparent;
}

/* ---------- the ballot ---------- */

.ballot {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 0 0 24px;
}

.ballot label {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  background: var(--surface);
  padding: 14px 16px;
  cursor: pointer;
  transition: background-color 150ms ease-out;
}

.ballot label:hover {
  background: var(--surface-hi);
}

.ballot input[type='checkbox'] {
  appearance: none;
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  border: 1px solid var(--line-input);
  background: var(--bg);
  cursor: pointer;
}

.ballot input[type='checkbox']:checked {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

/* The tick is drawn rather than shipped: two borders rotated, so there is no
   image request and it inherits the accent in both themes. */
.ballot input[type='checkbox']:checked::after {
  content: '';
  display: block;
  width: 8px;
  height: 4px;
  margin: 3px 0 0 2px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

.ballot .title {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.ballot .detail {
  display: block;
  color: var(--ink-45);
  font-size: 13px;
  line-height: 1.5;
}

.ballot .tally {
  display: block;
  margin-top: 8px;
  color: var(--ink-40);
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.bar {
  display: block;
  height: 2px;
  margin-top: 6px;
  background: var(--line-hi);
}

.bar i {
  display: block;
  height: 2px;
  background: var(--accent);
  transition: width 400ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* ---------- price question ---------- */

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: 1px solid var(--line);
  margin: 0 0 24px;
}

.segmented label {
  border-left: 1px solid var(--line);
  padding: 12px 14px;
  cursor: pointer;
  transition: background-color 150ms ease-out;
}

.segmented label:first-child {
  border-left: 0;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented .name {
  display: block;
  color: var(--ink-70);
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.segmented .sub {
  display: block;
  margin-top: 4px;
  color: var(--ink-45);
  font-size: 13px;
}

.segmented label:hover {
  background: var(--surface);
}

.segmented input:checked + .name {
  color: var(--accent);
}

.segmented label:has(input:checked) {
  background: var(--accent-soft);
  box-shadow: inset 0 2px 0 0 var(--accent);
}

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

.field {
  margin: 0 0 20px;
}

.field > label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-70);
  font-size: 14px;
  font-weight: 500;
}

input[type='email'],
textarea {
  width: 100%;
  border: 1px solid var(--line-input);
  border-radius: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  padding: 10px 12px;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-28);
}

input[type='email']:focus,
textarea:focus {
  border-color: var(--accent-line);
}

.hint {
  margin: 8px 0 0;
  color: var(--ink-45);
  font-size: 13px;
}

button {
  border: 1px solid transparent;
  border-radius: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  cursor: pointer;
  transition:
    background-color 150ms ease-out,
    color 150ms ease-out;
}

.btn-primary {
  background: var(--solid);
  color: var(--solid-ink);
}

.btn-primary:hover:not(:disabled) {
  background: var(--ink);
}

button:disabled {
  cursor: default;
  opacity: 0.5;
}

.btn-secondary {
  background: transparent;
  border-color: var(--line-hi);
  color: var(--ink-70);
}

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

.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- states ---------- */

.status {
  border: 1px solid var(--line);
  padding: 16px;
  margin: 24px 0 0;
  font-size: 14px;
}

.status--ok {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.status--bad {
  border-color: rgb(235 86 86 / 0.4);
  color: var(--danger);
}

[hidden] {
  display: none !important;
}

footer.foot {
  border-top: 1px solid var(--line);
  margin-top: 64px;
  padding-top: 20px;
  color: var(--ink-45);
  font-size: 13px;
}

footer.foot a {
  color: var(--ink-55);
}

@media (max-width: 560px) {
  .page {
    padding: 32px 18px 64px;
  }

  h1 {
    font-size: 24px;
  }

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

  .segmented label {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .segmented label:first-child {
    border-top: 0;
  }
}
