:root {
  --qc-bg: #1c1e20;
  --qc-bg-end: #1f2a2a;
  --qc-panel: #26292c;
  --qc-line: rgba(255, 255, 255, 0.16);
  --qc-text: #f2f4f5;
  --qc-intro: #c9cfd4;
  --qc-muted: #8e979f;
  --qc-brand: #6b7379;
  --qc-green: #3cb44a;
  --qc-green-hover: #4bc659;
  --qc-input-bg: #ffffff;
  --qc-input-text: #1c1e20;
  --qc-font: "Encode Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Layout unit: 1% of a phone's width, capped so the page keeps phone proportions on desktop. */
  --u: min(1vw, 4.3px);
}

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

html {
  background: var(--qc-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--qc-bg) 55%, var(--qc-bg-end) 100%);
  color: var(--qc-text);
  font-family: var(--qc-font);
  -webkit-font-smoothing: antialiased;
}

.qc {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--u) * 12 + env(safe-area-inset-top)) calc(var(--u) * 6) calc(var(--u) * 7 + env(safe-area-inset-bottom));
  text-align: center;
}

.qc-intro {
  max-width: calc(var(--u) * 74);
  margin: 0;
  color: var(--qc-intro);
  font-size: calc(var(--u) * 4.6);
  font-weight: 400;
  line-height: 1.3;
  white-space: pre-line;
}

.qc-title {
  margin: calc(var(--u) * 9) 0 0;
  font-size: calc(var(--u) * 9.8);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.qc-title span {
  color: var(--qc-green);
  font-weight: 800;
}

.qc-code {
  width: calc(var(--u) * 60);
  margin-top: calc(var(--u) * 9);
  border: calc(var(--u) * 1.3) solid var(--qc-green);
  border-radius: calc(var(--u) * 6);
  background: var(--qc-bg);
  overflow: hidden;
}

.qc-code svg {
  display: block;
  width: 100%;
  height: auto;
}

.qc-cta {
  margin: calc(var(--u) * 8) 0 0;
  color: var(--qc-intro);
  font-size: calc(var(--u) * 5.2);
  font-weight: 300;
  line-height: 1.25;
  text-transform: uppercase;
}

.qc-brand {
  margin-top: auto;
  padding-top: calc(var(--u) * 10);
  color: var(--qc-brand);
  font-size: calc(var(--u) * 5.4);
  font-weight: 800;
}

.qc-brand span {
  font-weight: 400;
}

/* Settings */

.qc-gear {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top));
  right: calc(8px + env(safe-area-inset-right));
  display: flex;
  padding: 10px;
  border: 0;
  background: none;
  color: var(--qc-muted);
  opacity: 0.35;
  cursor: pointer;
}

.qc-gear:hover,
.qc-gear:focus-visible {
  opacity: 1;
}

.qc-gear:focus-visible {
  outline: 2px solid var(--qc-green);
  border-radius: 50%;
}

.qc-settings {
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--qc-line);
  border-radius: 8px;
  background: var(--qc-panel);
  color: var(--qc-text);
}

.qc-settings::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.qc-settings form {
  display: flex;
  flex-direction: column;
  padding: 20px;
  font-family: var(--qc-font);
}

.qc-settings h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.qc-hint {
  margin: 4px 0 8px;
  color: var(--qc-muted);
  font-size: 13px;
}

.qc-settings label {
  margin: 12px 0 6px;
  color: var(--qc-intro);
  font-size: 14px;
}

.qc-settings input,
.qc-settings textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid transparent;
  border-radius: 3px;
  background: var(--qc-input-bg);
  color: var(--qc-input-text);
  font: inherit;
  font-size: 16px;
}

.qc-settings textarea {
  resize: vertical;
}

.qc-settings input:focus,
.qc-settings textarea:focus {
  outline: none;
  border-color: var(--qc-green);
}

.qc-test {
  align-self: flex-start;
  margin-top: 14px;
  color: var(--qc-green);
  font-size: 14px;
  text-decoration: none;
}

.qc-test:hover {
  text-decoration: underline;
}

.qc-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.qc-spacer {
  flex: 1;
}

.qc-btn {
  min-height: 42px;
  padding: 8px 18px;
  border: 0;
  border-radius: 3px;
  background: var(--qc-green);
  color: #ffffff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.qc-btn:hover {
  background: var(--qc-green-hover);
}

.qc-btn-ghost {
  background: transparent;
  color: var(--qc-intro);
}

.qc-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}
