/* KwikQR website — shares the app's design tokens (raspberry #BE185D, 8-pt spacing). */
:root {
  color-scheme: light dark;
  --primary: #be185d;
  --primary-hover: #9d174d;
  --primary-subtle: #fce7f3;
  --primary-text: #be185d;
  --accent: #ec4899;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --card: #ffffff;
  --text: #171717;
  --muted: #71717a;
  --border: #e4e4e7;
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --primary-subtle: rgba(236, 72, 153, 0.16);
    --primary-text: #f9a8d4;
    --bg: #111318;
    --bg-alt: #181a20;
    --card: #1b1d24;
    --text: #f8fafc;
    --muted: #a1a1aa;
    --border: #2d3038;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }
}

:root[data-theme='dark'] {
  --primary-subtle: rgba(236, 72, 153, 0.16);
  --primary-text: #f9a8d4;
  --bg: #111318;
  --bg-alt: #181a20;
  --card: #1b1d24;
  --text: #f8fafc;
  --muted: #a1a1aa;
  --border: #2d3038;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 750;
}

h3,
.h3 {
  font-size: 1.2rem;
  font-weight: 650;
}

p {
  margin: 0 0 16px;
}

a {
  color: var(--primary-text);
  text-underline-offset: 3px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-right));
}

.narrow {
  max-width: 760px;
}

.center {
  text-align: center;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 100;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
}

.skip-link:focus {
  top: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    transform 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.9rem;
}

.btn-lg {
  min-height: 56px;
  padding: 0 28px;
  font-size: 1.05rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

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

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}

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

.btn-light {
  background: #fff;
  color: #9d174d;
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.btn[hidden] {
  display: none;
}

.text-link {
  font-weight: 650;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: none;
}

.desktop-nav {
  margin-left: auto;
}

/* Optional sign-in (the website and web app work without an account). */
.header-signin {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 8px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.header-signin.is-signed-in {
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.header-avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #db2777, #9d174d);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.header-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-signin:hover {
  color: var(--primary-text, var(--primary));
}

.desktop-nav ul,
.menu ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.desktop-nav a,
.menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 550;
  text-decoration: none;
}

.desktop-nav a:hover,
.menu a:hover,
.desktop-nav a[aria-current='page'],
.menu a[aria-current='page'] {
  color: var(--text);
  background: var(--bg-alt);
}

.menu {
  display: none;
  order: 3;
}

.menu summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  cursor: pointer;
  list-style: none;
}

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

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  content: '';
  position: relative;
}

.menu-icon::before {
  position: absolute;
  top: -6px;
}

.menu-icon::after {
  position: absolute;
  top: 6px;
}

.menu nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  padding: 8px 20px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.menu nav ul {
  flex-direction: column;
}

@media (max-width: 899px) {
  .desktop-nav {
    display: none;
  }
  .menu {
    display: block;
  }
  .header-actions {
    margin-left: auto;
  }
}

/* Hero */
.hero {
  padding: 72px 0 64px;
  background:
    radial-gradient(
      60% 60% at 85% 20%,
      color-mix(in srgb, var(--accent) 14%, transparent),
      transparent 70%
    ),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--primary-text);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.accent {
  color: var(--primary-text);
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 62ch;
}

.center .lead {
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.center-actions {
  justify-content: center;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-points li,
.checks li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--primary-text);
}

.hero-art {
  display: flex;
  justify-content: center;
}

.phone {
  width: min(280px, 70vw);
  aspect-ratio: 9 / 18;
  padding: 12px;
  border-radius: 40px;
  background: #0b0c10;
  box-shadow:
    0 30px 60px rgba(190, 24, 93, 0.22),
    0 8px 24px rgba(0, 0, 0, 0.25);
}

.phone-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  height: 100%;
  border-radius: 30px;
  background: linear-gradient(180deg, #2a1220, #111318);
}

.scan-frame {
  position: relative;
  width: 64%;
  aspect-ratio: 1;
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  color: #171717;
}

.scan-frame > span {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 4px solid var(--accent);
}

.scan-frame > span:nth-child(1) {
  top: -10px;
  left: -10px;
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: 12px;
}
.scan-frame > span:nth-child(2) {
  top: -10px;
  right: -10px;
  border-left: 0;
  border-bottom: 0;
  border-top-right-radius: 12px;
}
.scan-frame > span:nth-child(3) {
  bottom: -10px;
  left: -10px;
  border-right: 0;
  border-top: 0;
  border-bottom-left-radius: 12px;
}
.scan-frame > span:nth-child(4) {
  bottom: -10px;
  right: -10px;
  border-left: 0;
  border-top: 0;
  border-bottom-right-radius: 12px;
}

.scan-line {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 10%;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: scan 2.4s ease-in-out infinite;
}

@keyframes scan {
  0%,
  100% {
    top: 10%;
  }
  50% {
    top: 88%;
  }
}

.phone-caption {
  margin: 0;
  color: #f9a8d4;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Sections */
.section {
  padding: 72px 0;
}

.section.alt {
  background: var(--bg-alt);
}

.section-head {
  margin-bottom: 40px;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.split.reverse > :first-child {
  order: 2;
}

.card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.feature-card p:last-child,
.card p:last-child {
  margin-bottom: 0;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--primary-subtle);
  color: var(--primary-text);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.checks {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.checks.large li {
  font-size: 1.1rem;
  font-weight: 600;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.type-grid li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.type-grid span {
  color: var(--muted);
  font-size: 0.9rem;
}

.privacy-band {
  background: linear-gradient(135deg, var(--primary-subtle), var(--bg));
}

.page-hero {
  padding: 64px 0 24px;
}

.prose h2 {
  margin-top: 40px;
  font-size: 1.5rem;
}

.prose ul,
.prose ol {
  padding-left: 24px;
}

.prose li + li {
  margin-top: 8px;
}

.steps li::marker {
  color: var(--primary-text);
  font-weight: 700;
}

.format-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
}

.format-table th,
.format-table td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.format-table th {
  background: var(--bg-alt);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.faq {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.faq summary {
  position: relative;
  padding: 16px 48px 16px 20px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  position: absolute;
  right: 20px;
  top: 50%;
  translate: 0 -50%;
  color: var(--primary-text);
  font-size: 1.4rem;
  font-weight: 400;
  content: '+';
}

.faq[open] summary::after {
  content: '−';
}

.faq p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--muted);
}

/* CTA band */
.cta-band {
  padding: 56px 0;
  background: linear-gradient(135deg, #9d174d, #be185d 55%, #db2777);
  color: #fff;
}

.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cta-inner h2 {
  margin-bottom: 8px;
}

.cta-inner p {
  margin: 0;
  opacity: 0.9;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-card {
  margin-bottom: 20px;
}

.notice {
  padding: 12px 16px;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  background: color-mix(in srgb, #f59e0b 14%, transparent);
}

mark.placeholder {
  padding: 0 4px;
  border-radius: 4px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 600;
}

/* Footer */
.site-footer {
  padding: 56px 0 calc(32px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-grid h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li + li {
  margin-top: 8px;
}

.footer-grid a:not(.brand) {
  color: var(--text);
  text-decoration: none;
}

.footer-grid a:not(.brand):hover {
  color: var(--primary-text);
}

.footer-grid .brand {
  margin-bottom: 12px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}

.made-by {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.made-by-logo {
  display: block;
  width: auto;
  height: 20px;
}

/* The logo's "ERP" is black: give it a white pill on dark backgrounds. */
:root[data-theme='dark'] .made-by-logo {
  box-sizing: content-box;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .made-by-logo {
    box-sizing: content-box;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff;
  }
}

/* Responsive */
@media (max-width: 899px) {
  .hero {
    padding: 48px 0;
  }
  .hero-grid,
  .split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .split.reverse > :first-child {
    order: 0;
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .section {
    padding: 56px 0;
  }
}

@media (max-width: 599px) {
  .feature-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions .btn {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .scan-line {
    animation: none;
    top: 48%;
  }
  .btn {
    transition: none;
  }
}

/* ---------- Home: create & scan tools in the hero ---------- */
.tool-card [hidden] {
  display: none !important;
}

.tool-hero {
  padding: 56px 0 64px;
}

.tool-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: center;
}

.tool-intro h1 {
  margin: 8px 0 16px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.tool-intro .hero-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
}

.tool-card {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 24px 60px -30px rgba(80, 10, 40, 0.35);
}

.tool-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: var(--bg-alt);
}

.tool-tabs [role='tab'] {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tool-tabs [role='tab'][aria-selected='true'] {
  background: var(--card);
  color: var(--primary-text);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.tool-panel {
  padding: 18px 12px 8px;
}

/* Create */
.qt-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.qt-types button {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.qt-types button[aria-pressed='true'] {
  border-color: var(--primary);
  background: var(--primary-subtle);
  color: var(--primary-text);
}

.qt-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.qt-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.qt-field {
  display: flex;
  flex: 1 1 100%;
  flex-direction: column;
  gap: 6px;
}

.qt-field.half {
  flex-basis: calc(50% - 6px);
}

.qt-field label {
  font-size: 0.88rem;
  font-weight: 600;
}

.qt-field input,
.qt-field textarea,
.qt-field select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.qt-field input:focus,
.qt-field textarea:focus,
.qt-field select:focus {
  border-color: var(--primary);
  outline: 3px solid var(--primary-subtle);
}

.qt-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}

.qt-output {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  grid-template-areas:
    'preview colors'
    'preview status'
    'preview downloads';
  grid-template-rows: auto 1fr auto;
  column-gap: 20px;
  row-gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: var(--bg-alt);
}

.qt-output .qt-preview {
  grid-area: preview;
}

.qt-output .qt-colors {
  grid-area: colors;
  justify-content: flex-start;
}

.qt-output .qt-status {
  grid-area: status;
  align-self: center;
  text-align: left;
}

.qt-output .qt-downloads {
  grid-area: downloads;
}

.qt-preview {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.qt-preview svg {
  display: block;
  width: 100%;
  height: auto;
}

.qt-preview[data-state='empty'] {
  color: #e4e4e7;
}

.qt-preview[data-state='empty'] svg {
  width: 70%;
}

.qt-colors {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.qt-colors button {
  width: 26px;
  height: 26px;
  border: 2px solid var(--card);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--fg) 50%, var(--bg) 50%);
  box-shadow: 0 0 0 1px var(--border);
  cursor: pointer;
}

.qt-colors button[aria-pressed='true'] {
  box-shadow: 0 0 0 2px var(--primary);
}

.qt-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.qt-downloads {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.qt-downloads .btn {
  padding-inline: 14px;
  white-space: nowrap;
}

.qt-downloads .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.qt-more {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.qt-more a {
  color: var(--primary-text);
  font-weight: 600;
}

/* Scan */
.qt-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 36px 20px;
  border: 2px dashed var(--border);
  border-radius: 18px;
  background: var(--bg-alt);
  text-align: center;
  transition:
    border-color 0.15s,
    background-color 0.15s;
}

.qt-drop.is-dragging {
  border-color: var(--primary);
  background: var(--primary-subtle);
}

.qt-drop-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--primary-subtle);
  color: var(--primary-text);
}

.qt-drop-title {
  margin: 0;
  font-weight: 700;
}

.qt-drop-sub {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.qt-drop-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.qt-camera {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  aspect-ratio: 4 / 3;
}

.qt-camera video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qt-camera-frame {
  position: absolute;
  inset: 18% 24%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35);
}

.qt-stop {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.qt-result {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-alt);
  outline: none;
}

.qt-result-type {
  margin: 0;
  color: var(--primary-text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.qt-result-title {
  margin: 4px 0 10px;
  font-size: 1.2rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.qt-raw {
  max-height: 140px;
  margin: 0 0 12px;
  padding: 10px 12px;
  overflow: auto;
  border-radius: 10px;
  background: var(--card);
  font-size: 0.86rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.qt-warn {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.88rem;
}

.qt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* The page works without JavaScript: hide controls that need it until the tools start. */
.tool-card:not(.is-ready) .qt-downloads,
.tool-card:not(.is-ready) .qt-drop-actions {
  visibility: hidden;
}

@media (max-width: 899px) {
  .tool-hero {
    padding: 28px 0 40px;
  }

  .tool-hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .tool-intro .hero-points {
    display: none;
  }
}

@media (max-width: 560px) {
  .qt-create {
    grid-template-columns: 1fr;
  }

  .qt-output {
    grid-template-columns: 1fr;
    grid-template-areas: 'preview' 'colors' 'status' 'downloads';
    justify-items: center;
  }

  .qt-output .qt-preview {
    width: 100%;
    max-width: 240px;
  }

  .qt-output .qt-colors {
    justify-content: center;
  }

  .qt-output .qt-status {
    text-align: center;
  }

  .qt-output .qt-downloads {
    width: 100%;
    max-width: 260px;
  }

  .tool-panel {
    padding: 16px 6px 6px;
  }
}

/* Phones: keep the header on one line and bring the tools above the fold. */
.header-signin,
.header-inner .btn {
  white-space: nowrap;
}

@media (max-width: 560px) {
  .header-inner {
    gap: 10px;
  }

  .header-name {
    display: none;
  }

  .header-signin.is-signed-in {
    padding: 3px;
  }

  .tool-intro .lead {
    display: none;
  }

  .tool-intro h1 {
    margin-bottom: 0;
    font-size: 1.85rem;
  }
}

/* ================= Modern refresh: header actions, motion ================= */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* "Open app": gradient pill with a soft glow, a light sweep and a nudging arrow. */
.btn-app {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 16px 0 20px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(135deg, #ec4899 0%, #be185d 55%, #9d174d 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 6px 18px -8px rgba(190, 24, 93, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn-app::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 -60%;
  width: 50%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.btn-app svg {
  transition: transform 0.2s ease;
}

.btn-app:hover {
  transform: translateY(-1px);
  box-shadow:
    0 10px 24px -10px rgba(190, 24, 93, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-app:hover::after {
  left: 120%;
}

.btn-app:hover svg {
  transform: translate(2px, -2px);
}

.btn-app:focus-visible {
  outline: 3px solid var(--primary-subtle);
  outline-offset: 2px;
}

.btn {
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
}

/* Hero backdrop: drifting raspberry glows over a faint dot grid. */
.tool-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.tool-hero::before,
.tool-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.tool-hero::before {
  top: -160px;
  right: -120px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.28), transparent 65%);
  animation: kq-drift 18s ease-in-out infinite alternate;
}

.tool-hero::after {
  bottom: -220px;
  left: -160px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(190, 24, 93, 0.18), transparent 65%);
  animation: kq-drift 22s ease-in-out infinite alternate-reverse;
}

.tool-hero > .container::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(190, 24, 93, 0.13) 1.2px, transparent 1.3px);
  background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 65%);
  mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 65%);
  pointer-events: none;
}

@keyframes kq-drift {
  to {
    transform: translate(-60px, 50px) scale(1.12);
  }
}

/* Entrance: staggered fade-up. */
.tool-intro > *,
.tool-card {
  animation: kq-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.tool-intro > :nth-child(2) {
  animation-delay: 0.08s;
}

.tool-intro > :nth-child(3) {
  animation-delay: 0.16s;
}

.tool-intro > :nth-child(4) {
  animation-delay: 0.24s;
}

.tool-card {
  animation-delay: 0.18s;
}

@keyframes kq-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* "right here." — moving gradient shimmer. */
.tool-intro .accent {
  background: linear-gradient(90deg, #be185d, #ec4899, #db2777, #be185d);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: kq-shimmer 6s linear infinite;
}

@keyframes kq-shimmer {
  to {
    background-position: 300% 0;
  }
}

/* Tool card: gradient border and glow. */
.tool-card {
  position: relative;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(
        140deg,
        rgba(236, 72, 153, 0.55),
        rgba(228, 228, 231, 0.6) 40%,
        rgba(190, 24, 93, 0.45)
      )
      border-box;
  box-shadow:
    0 30px 70px -36px rgba(120, 10, 60, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Tabs: a sliding highlight. */
.tool-tabs {
  position: relative;
}

.tool-tabs::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 6px);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.35s cubic-bezier(0.3, 0.9, 0.3, 1);
}

.tool-tabs:has([data-tab='scan'][aria-selected='true'])::before {
  transform: translateX(calc(100% + 4px));
}

.tool-tabs [role='tab'] {
  position: relative;
  transition: color 0.2s ease;
}

.tool-tabs [role='tab'][aria-selected='true'] {
  background: transparent;
  box-shadow: none;
}

.tool-panel:not([hidden]) {
  animation: kq-fade 0.3s ease;
}

@keyframes kq-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.qt-types button {
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.qt-types button:hover {
  transform: translateY(-1px);
}

/* QR preview pops in when it changes. */
.qt-preview.is-updated svg {
  animation: kq-pop 0.35s cubic-bezier(0.3, 1.4, 0.5, 1);
}

@keyframes kq-pop {
  from {
    opacity: 0.4;
    transform: scale(0.94);
  }
}

/* Scan: a laser sweeping across the image icon. */
.qt-drop-icon {
  position: relative;
  overflow: hidden;
}

.qt-drop-icon::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: kq-laser 2.4s ease-in-out infinite;
}

@keyframes kq-laser {
  0%,
  100% {
    top: 14px;
  }
  50% {
    top: 40px;
  }
}

.qt-result:not([hidden]) {
  animation: kq-rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Sections fade up as they scroll into view (class added by site.js). */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 560px) {
  .btn-app {
    min-height: 38px;
    padding: 0 12px 0 14px;
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tool-hero::before,
  .tool-hero::after,
  .tool-intro > *,
  .tool-card,
  .tool-intro .accent,
  .tool-panel,
  .qt-preview.is-updated svg,
  .qt-drop-icon::after,
  .qt-result {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Same height for both tabs (no jump when switching); the drop zone fills the Scan tab. */
@media (min-width: 900px) {
  .tool-panel {
    display: flex;
    flex-direction: column;
    min-height: 440px;
  }

  .tool-panel[hidden] {
    display: none;
  }

  .qt-drop,
  .qt-camera,
  .qt-result {
    flex: 1;
  }

  .qt-drop {
    justify-content: center;
  }

  .qt-create {
    flex: 1;
    align-content: start;
  }
}

/* Store links (home hero) */
.store-strip {
  margin-top: 24px;
}

.store-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.store-badge {
  display: inline-flex;
  border-radius: 10px;
  transition: transform 0.15s ease;
}

.store-badge:hover {
  transform: translateY(-2px);
}

.store-badge img {
  display: block;
  width: auto;
  height: 44px;
}

/* The Google Play badge artwork includes padding: scale it so both look the same size. */
.store-badge-play img {
  height: 64px;
  margin: -10px -9px;
}

.store-soon {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.92rem;
}

.store-soon p {
  margin: 0;
  color: var(--muted);
}

.store-soon strong {
  color: var(--text);
}

.store-soon-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-subtle);
  color: var(--primary-text);
}

@media (max-width: 560px) {
  .store-strip {
    margin-top: 14px;
  }

  .store-soon {
    border-radius: 16px;
  }
}

/* Badges shown before the apps are live: muted, not clickable. */
.store-badge.is-soon {
  opacity: 0.6;
  filter: grayscale(0.2);
  cursor: default;
}

.store-badge.is-soon:hover {
  transform: none;
}

.store-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.store-soon-tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary-subtle);
  color: var(--primary-text);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

/* ---------- Account chip + popup (website header) ---------- */
.header-actions {
  position: relative;
}

button.header-signin {
  border-color: var(--border);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.header-caret {
  color: var(--muted);
  transition: transform 0.2s ease;
}

.header-signin[aria-expanded='true'] .header-caret {
  transform: rotate(180deg);
}

.account-menu {
  --menu-bg: #f3f4f6;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 320px;
  max-width: calc(100vw - 24px);
  padding: 22px 16px 14px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--menu-bg);
  box-shadow: 0 24px 60px -20px rgba(15, 23, 42, 0.35);
  transform-origin: top right;
  animation: kq-menu-in 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-theme='dark'] .account-menu {
  --menu-bg: #1f2128;
}

@keyframes kq-menu-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-6px);
  }
}

.account-menu[hidden] {
  display: none;
}

.account-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
}

.account-close:hover {
  color: var(--text);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 8px 0 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899, #be185d 60%, #9d174d);
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 26px -12px rgba(190, 24, 93, 0.7);
}

.account-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
}

.account-email {
  margin: 2px 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  overflow-wrap: anywhere;
}

.account-manage {
  padding: 9px 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--primary-text);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.account-manage:hover {
  background: var(--primary-subtle);
}

.account-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.account-card:hover .account-card-arrow {
  transform: translateX(2px);
}

.account-card-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ec4899, #be185d);
  color: #fff;
}

.account-card-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.account-card-title {
  font-weight: 700;
}

.account-card-sub {
  color: var(--muted);
  font-size: 0.88rem;
}

.account-card-arrow {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.account-sep {
  width: calc(100% - 12px);
  margin: 12px 0 6px;
  border: 0;
  border-top: 1px solid var(--border);
}

.account-rows {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.account-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-row:hover,
.account-row:focus-visible {
  background: var(--card);
}

.account-row.is-danger {
  color: #dc2626;
}

@media (max-width: 560px) {
  .account-menu {
    position: fixed;
    top: 72px;
    right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-menu {
    animation: none;
  }
}

/* Chip: name + e-mail on two lines. */
.header-who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
  text-align: left;
}

.header-who .header-name {
  max-width: 150px;
  font-size: 0.88rem;
  font-weight: 700;
}

.header-email {
  max-width: 150px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.header-signin.is-signed-in {
  padding: 4px 10px 4px 4px;
}

@media (max-width: 560px) {
  .header-who {
    display: none;
  }
}

/* Popup: compact type. */
.account-menu {
  width: 296px;
  padding: 18px 12px 10px;
  border-radius: 24px;
}

.account-close {
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.account-avatar {
  width: 64px;
  height: 64px;
  margin: 4px 0 10px;
  font-size: 22px;
}

.account-name {
  font-size: 1.02rem;
  font-weight: 700;
}

.account-email {
  margin: 1px 0 12px;
  font-size: 0.84rem;
}

.account-manage {
  padding: 7px 18px;
  font-size: 0.86rem;
}

.account-card {
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 16px;
}

.account-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.account-card-icon svg {
  width: 19px;
  height: 19px;
}

.account-card-title {
  font-size: 0.9rem;
}

.account-card-sub {
  font-size: 0.78rem;
}

.account-sep {
  margin: 10px 0 4px;
}

.account-row {
  gap: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.account-row svg {
  width: 18px;
  height: 18px;
}
