:root {
  color-scheme: light dark;
  --paper: #f8f6f1;
  --sheet: #ffffff;
  --ink: #15171a;
  --muted: #5f636a;
  --rule: #e0dcd3;
  --accent: #c2410c;
  --on-accent: #ffffff;
  --ok: #1a7048;
  --bad: #a4261b;
  --tint: #fbeee6;
  --serif: Georgia, "Noto Serif", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121315;
    --sheet: #1b1d20;
    --ink: #f1eee8;
    --muted: #a5a8ae;
    --rule: #303238;
    --accent: #ff8f54;
    --on-accent: #1a0d05;
    --ok: #62cf98;
    --bad: #ff8a7a;
    --tint: #2c1f18;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  overflow-wrap: anywhere;
}

[hidden] { display: none !important; }

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

code { font-family: var(--mono); font-size: 0.92em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.site-head, main, .site-foot {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 20px;
  padding-bottom: 8px;
}

.site-head nav { display: flex; gap: 18px; font-size: 15px; }
.site-head nav a { text-decoration: none; color: var(--muted); }
.site-head nav a:hover { color: var(--ink); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  text-decoration: none;
}

.marks { display: inline-flex; gap: 4px; align-items: center; }
.marks i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--muted);
}
.marks i.on { background: var(--accent); border-color: var(--accent); }
.marks-lg { gap: 7px; }
.marks-lg i { width: 15px; height: 15px; border-width: 2px; }

main { padding-top: 24px; padding-bottom: 32px; }

h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-family: var(--serif); font-weight: 700; }

.hero h1 { font-size: clamp(32px, 8vw, 46px); line-height: 1.1; letter-spacing: -0.012em; }
.page-title { font-size: clamp(30px, 7vw, 40px); margin-bottom: 14px; }
.hero h1, .page-title { text-wrap: balance; }
.lead { font-size: 19px; color: var(--muted); margin: 14px 0 26px; }

h2 { font-size: 21px; font-weight: 650; }
h3 { font-size: 17px; font-weight: 650; margin-top: 18px; }

.sheet {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field { display: flex; flex-direction: column; gap: 7px; }

label { font-weight: 600; font-size: 15px; }

input[type="text"] {
  width: 100%;
  min-height: 50px;
  padding: 10px 13px;
  font: 16px/1.3 var(--sans);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 5px;
}
input[type="text"]:focus { border-color: var(--accent); outline: 1px solid var(--accent); }
input::placeholder { color: var(--muted); opacity: 0.8; }

.msg { margin: 0; font-size: 15px; color: var(--muted); }
.msg:empty { display: none; }
.msg.is-error, .msg-error { color: var(--bad); }

.help { font-size: 15px; color: var(--muted); }
.help summary { cursor: pointer; width: fit-content; padding: 2px 0; }
.help p { margin: 8px 0 0; }

.chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  background: var(--paper);
  border-radius: 5px;
}

.quota { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.quota.is-empty { color: var(--bad); }
main > .quota { margin: 2px 0 16px; }

.preview {
  display: flex;
  flex-direction: column;
  padding: 11px 13px;
  border-left: 3px solid var(--accent);
  background: var(--tint);
}
.preview span { color: var(--muted); font-size: 15px; }

.consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  font-weight: 400;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }

.primary, .ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 11px 22px;
  font: 600 17px/1.2 var(--sans);
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
}
.primary { background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); }
.primary:hover { filter: brightness(0.93); color: var(--on-accent); }
.primary:disabled { background: var(--rule); border-color: var(--rule); color: var(--muted); cursor: not-allowed; filter: none; }
.primary.small { min-height: 44px; padding: 8px 16px; font-size: 15.5px; width: auto; }
.ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); font-weight: 500; }
.ghost:hover { border-color: var(--ink); }

.link {
  background: none;
  border: 0;
  padding: 4px 0;
  color: inherit;
  font: inherit;
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  cursor: pointer;
}

.line {
  margin: 0;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: var(--tint);
  font-size: 16px;
}

.steps { margin: 0; padding-left: 22px; }
.steps li { margin: 8px 0; padding-left: 2px; }
.steps li::marker { color: var(--accent); font-weight: 650; }

.after { margin: 0; font-size: 15.5px; color: var(--muted); }

.how { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--rule); }
.how > * + * { margin-top: 10px; }

.note { font-size: 15px; color: var(--muted); }

.inline-form { display: flex; flex-direction: column; gap: 10px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.signals { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }

.signal {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.signal-head { display: flex; flex-direction: column; gap: 2px; }
.signal-title { font-weight: 650; }
.signal-meta { color: var(--muted); font-size: 15px; }

.status { font-weight: 600; font-size: 15px; color: var(--muted); }
.status.is-open { color: var(--ok); }

.outcomes { display: flex; flex-wrap: wrap; gap: 6px; }
.outcomes button {
  min-height: 40px;
  padding: 6px 14px;
  font: 500 15px var(--sans);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 20px;
  cursor: pointer;
}
.outcomes button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.signal-actions { display: flex; flex-wrap: wrap; gap: 6px 18px; }

.empty { margin: 24px 0; display: flex; flex-direction: column; gap: 12px; }

.own {
  margin: 0 0 14px;
  padding: 10px 14px;
  background: var(--tint);
  border-radius: 5px;
  font-size: 15px;
}

.cert {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--ok);
  border-radius: 4px;
  padding: 26px 22px 12px;
}
.cert-bad { border-top-color: var(--bad); padding-bottom: 26px; }
.cert-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(27px, 6.5vw, 34px);
}
.check { width: 34px; height: 34px; flex: none; }
.check circle { fill: var(--ok); }
.check path { fill: none; stroke: var(--sheet); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.cert-claim { font-size: 19px; margin: 14px 0 12px; }
.cert-claim b { color: var(--accent); }

.facts { margin: 22px 0 0; }
.facts dt {
  color: var(--muted);
  font-size: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--rule);
}
.facts dd { margin: 2px 0 13px; }
.facts .sub { display: block; color: var(--muted); font-size: 15px; margin-top: 6px; }
.facts .sub:first-child { margin-top: 0; }

.others { margin-top: 26px; }
.others-list { list-style: none; margin: 10px 0 0; padding: 0; }
.others-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--rule);
}
.others-list time { color: var(--muted); font-size: 15px; white-space: nowrap; }

.legal { font-size: 16px; }
.legal h1 { font-size: 30px; margin-bottom: 14px; }
.legal h2 { margin-top: 28px; }
.legal h3 { margin-top: 20px; }
.legal li { margin: 6px 0; }

.site-foot {
  padding-top: 18px;
  padding-bottom: 32px;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--rule);
}
.site-foot p { margin: 4px 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }

@media (min-width: 620px) {
  .site-head, main, .site-foot { padding-left: 24px; padding-right: 24px; }
  .sheet { padding: 28px 28px; }
  .primary:not(.small), .ghost { width: fit-content; min-width: 230px; }
  .inline-form { flex-direction: row; }
  .inline-form input { flex: 1; }
  .inline-form .primary { min-width: 0; }
  .empty { align-items: flex-start; }
  .facts { display: grid; grid-template-columns: 130px 1fr; }
  .facts dt, .facts dd { padding-top: 13px; padding-bottom: 13px; border-top: 1px solid var(--rule); margin: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .marks i { transition: background-color 0.25s, border-color 0.25s; }
}
