/* =========================================================
   QRForge — design system
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-tint: #eef2ff;
  --ink: #0d1424;
  --ink-2: #3f4a63;
  --ink-3: #6d778f;
  --line: #e5e9f2;
  --line-2: #d2d9e8;
  --brand: #4f46e5;
  --brand-2: #6366f1;
  --brand-ink: #3730a3;
  --accent: #06b6d4;
  --ok: #059669;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(13, 20, 36, 0.05);
  --shadow: 0 4px 16px -4px rgba(13, 20, 36, 0.1), 0 1px 3px rgba(13, 20, 36, 0.04);
  --shadow-lg: 0 24px 56px -24px rgba(13, 20, 36, 0.3);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --maxw: 1140px;
  --header-h: 64px;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 720;
}

h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: 0.45em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 760;
  font-size: 18px;
  letter-spacing: -0.025em;
  color: var(--ink);
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--brand); flex-shrink: 0; }
.brand-light { color: #fff; }
.brand-light .brand-mark { color: #a5b4fc; }

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.nav-link.is-active { color: var(--brand-ink); background: var(--bg-tint); }

.chev { transition: transform 0.18s; opacity: 0.6; }

.nav-dropdown { position: relative; }

.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: 540px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s, transform 0.16s, visibility 0.16s;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown:hover .chev { transform: rotate(180deg); }

.dd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }

.dd-link {
  display: block;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--ink-2);
  transition: background 0.13s, color 0.13s;
}
.dd-link:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.dd-link.is-active { background: var(--bg-tint); color: var(--brand-ink); font-weight: 600; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  padding: 10px 9px;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- breadcrumb ---------- */

.breadcrumb {
  font-size: 13px;
  color: var(--ink-3);
  padding: 16px 0 0;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { opacity: 0.45; }
.breadcrumb [aria-current] { color: var(--ink-2); }

/* ---------- hero ---------- */

.hero {
  padding: 56px 0 44px;
  background:
    radial-gradient(900px 380px at 50% -8%, #e6ebff 0%, rgba(230, 235, 255, 0) 72%),
    linear-gradient(180deg, #fbfcff 0%, #f5f7fd 100%);
  border-bottom: 1px solid var(--line);
}
.hero-compact { padding: 40px 0 34px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-ink);
  background: rgba(79, 70, 229, 0.09);
  border: 1px solid rgba(79, 70, 229, 0.16);
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 { max-width: 23ch; }
.hero .lede {
  font-size: clamp(1rem, 1.6vw, 1.14rem);
  color: var(--ink-3);
  max-width: 62ch;
  margin-top: 14px;
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--ink-3);
}
.hero-badges span { display: inline-flex; align-items: center; gap: 6px; }
.hero-badges svg { color: var(--ok); flex-shrink: 0; }

/* ---------- layout blocks ---------- */

.section { padding: 56px 0; }
.section-tight { padding: 36px 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head p { color: var(--ink-3); margin: 10px 0 0; }

.tool-section { padding: 40px 0 56px; }

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 396px;
  gap: 28px;
  align-items: start;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 26px;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 1.05rem; margin: 0; }
.panel-head small { color: var(--ink-3); font-size: 12.5px; }

/* ---------- forms ---------- */

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

.field > label,
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 620;
  color: var(--ink-2);
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}
.field .hint { font-weight: 400; color: var(--ink-3); font-size: 12.5px; }

.input,
.textarea,
.select {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line-2);
  border-radius: 11px;
  padding: 11px 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder,
.textarea::placeholder { color: #a3abbd; }
.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3.5px rgba(99, 102, 241, 0.13);
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236d778f' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 38px;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.help-text { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 11px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 620;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(180deg, #6366f1, #4f46e5);
  color: #fff;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover { background: linear-gradient(180deg, #565ae8, #4338ca); color: #fff; }

.btn-secondary {
  background: #fff;
  border-color: var(--line-2);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: #b9c2d6; background: #fcfcfe; }

.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-soft); }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 13px; font-size: 13.5px; border-radius: 9px; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.btn-row .btn { flex: 1 1 auto; }

/* ---------- QR preview ---------- */

.preview-col { position: sticky; top: calc(var(--header-h) + 20px); }

.qr-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
  text-align: center;
}

.qr-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 268px;
  padding: 14px;
  background:
    linear-gradient(45deg, #f8f9fc 25%, transparent 25%) -8px 0/16px 16px,
    linear-gradient(-45deg, #f8f9fc 25%, transparent 25%) -8px 0/16px 16px,
    linear-gradient(45deg, transparent 75%, #f8f9fc 75%) -8px 0/16px 16px,
    linear-gradient(-45deg, transparent 75%, #f8f9fc 75%) -8px 0/16px 16px,
    #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.qr-stage .qr-canvas canvas,
.qr-stage .qr-canvas svg {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.qr-empty {
  color: var(--ink-3);
  font-size: 13.5px;
  max-width: 27ch;
  margin: 0 auto;
  line-height: 1.5;
}
.qr-empty svg { display: block; margin: 0 auto 10px; opacity: 0.35; }
.qr-empty > span { display: block; }
.qr-hint { margin-top: 8px; color: var(--brand); font-weight: 500; }
.qr-hint:empty { display: none; }

.qr-actions { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qr-actions .btn-block { grid-column: 1 / -1; }

.qr-meta {
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.qr-meta strong { color: var(--ink-2); font-weight: 600; }
.qr-meta .qr-warn {
  flex-basis: 100%;
  text-align: center;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  margin-top: 2px;
}

/* ---------- style controls ---------- */.style-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  margin-top: 18px;
}
.style-toggle svg { transition: transform 0.2s; }
.style-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.style-body { display: none; padding-top: 16px; }
.style-body.is-open { display: block; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.swatch {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line-2);
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s, box-shadow 0.12s;
}
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--brand); }

.color-input {
  width: 34px;
  height: 32px;
  padding: 2px;
  border: 1.5px solid var(--line-2);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.seg {
  display: inline-flex;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  width: 100%;
}
.seg button {
  flex: 1;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-3);
  padding: 7px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, box-shadow 0.14s;
}
.seg button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(13, 20, 36, 0.12);
  font-weight: 620;
}

.logo-drop {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px dashed var(--line-2);
  border-radius: 11px;
  padding: 12px;
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.logo-drop:hover { border-color: var(--brand-2); background: #fafbff; }
.logo-drop input { display: none; }
.logo-thumb { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; border: 1px solid var(--line); display: none; }

/* ---------- ads ---------- */

.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 32px auto;
  max-width: 970px;
  min-height: 96px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  background: var(--bg-soft);
  color: #9aa3b8;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  overflow: hidden;
}
.ad-slot::before { content: "Advertisement"; }
.ad-slot.is-live::before { content: none; }
.ad-slot-side {
  max-width: none;
  min-height: 250px;
  margin: 20px 0 0;
}

/* ---------- tool cards (hub) ---------- */

.tool-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 16px;
}

.tool-card {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.tool-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #c9d2e8;
}
.tool-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: var(--brand);
  border: 1px solid rgba(79, 70, 229, 0.08);
}
.tool-card h3 { font-size: 15px; margin: 0 0 3px; letter-spacing: -0.01em; }
.tool-card p { font-size: 13px; color: var(--ink-3); margin: 0; line-height: 1.5; }

/* ---------- prose content ---------- */

.prose { max-width: 712px; font-size: 16.5px; line-height: 1.78; }
.prose .fine-print {
  margin-top: 2.2em;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-3);
}
.prose > p:first-child { font-size: 1.06em; color: var(--ink-2); }
.prose h2 { margin: 2.1em 0 0.55em; font-size: 1.48rem; }
.prose h3 { margin: 1.7em 0 0.45em; }
.prose ul, .prose ol { margin-bottom: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 1.5px 6px;
  border-radius: 5px;
  color: #b3306b;
}
.prose blockquote {
  margin: 1.4em 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--brand-2);
  color: var(--ink-3);
  font-style: normal;
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.3em 0; font-size: 14.5px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--ink); font-weight: 620; background: var(--bg-soft); }

.content-wrap { padding: 44px 0 64px; }
.content-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }

.toc {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  font-size: 13.5px;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}
.toc h4 { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.toc a { display: block; padding: 4px 0; color: var(--ink-3); }
.toc a:hover { color: var(--brand); text-decoration: none; }

/* ---------- FAQ ---------- */

.faq { max-width: 712px; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 0;
  cursor: pointer;
  font-weight: 620;
  color: var(--ink);
  font-size: 15.5px;
  list-style: none;
  line-height: 1.45;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--ink-3);
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.18s;
}
.faq details[open] summary::after { content: "−"; }
.faq .faq-body { padding: 0 0 18px; color: var(--ink-2); font-size: 15px; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- steps / feature grid ---------- */

.steps { counter-reset: step; display: grid; gap: 18px; }
.step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg-tint);
  color: var(--brand-ink);
  font-weight: 700;
  font-size: 14px;
}
.step h3 { font-size: 15.5px; margin: 6px 0 4px; }
.step p { font-size: 14.5px; color: var(--ink-3); margin: 0; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.feature h3 { font-size: 15.5px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.feature h3 svg { color: var(--brand); flex-shrink: 0; }
.feature p { font-size: 14.5px; color: var(--ink-3); margin: 0; }

/* ---------- related links ---------- */

.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.related a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 14px;
  font-weight: 550;
  color: var(--ink-2);
  background: #fff;
  transition: border-color 0.14s, background 0.14s;
}
.related a:hover { border-color: #c9d2e8; background: #fcfcfe; text-decoration: none; color: var(--ink); }
.related a::after { content: "→"; color: var(--ink-3); }

/* ---------- article list ---------- */

.article-list { display: grid; gap: 14px; }
.article-item {
  display: block;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.article-item:hover { border-color: #c9d2e8; box-shadow: var(--shadow); text-decoration: none; }
.article-item h3 { font-size: 17px; margin: 0 0 6px; }
.article-item p { margin: 0; font-size: 14.5px; color: var(--ink-3); }
.article-meta { font-size: 12.5px; color: var(--ink-3); margin-top: 10px; display: flex; gap: 10px; }

/* ---------- scanner ---------- */

.scan-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 396px; gap: 28px; align-items: start; }
.scan-viewport {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #0d1424;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.scan-viewport video { width: 100%; height: 100%; object-fit: cover; }
.scan-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #9aa3b8;
  font-size: 13.5px;
  text-align: center;
  padding: 28px;
  line-height: 1.55;
}
.scan-frame {
  position: absolute;
  inset: 14%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  pointer-events: none;
}
.scan-result {
  margin-top: 16px;
  padding: 14px;
  border-radius: 11px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 14px;
  word-break: break-all;
}
.scan-result strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 4px; }

/* ---------- misc ---------- */

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }

.callout {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  font-size: 14.5px;
  color: #115e59;
  margin: 1.4em 0;
}
.callout svg { flex-shrink: 0; color: #0d9488; margin-top: 2px; }
.callout p { margin: 0; }

.warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.warn svg { color: #d97706; }

/* ---------- footer ---------- */

.site-footer {
  background: #0b1220;
  color: #9aa3b8;
  padding: 56px 0 26px;
  margin-top: 72px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-brand p { margin: 14px 0 0; max-width: 34ch; font-size: 13.5px; line-height: 1.6; color: #8b95ab; }
.footer-col h4 {
  color: #e6ebf5;
  font-size: 12px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 650;
}
.footer-col a { display: block; padding: 5px 0; color: #9aa3b8; font-size: 13.5px; }
.footer-col a:hover { color: #fff; text-decoration: none; }

/* Must look like the neighbouring links: this is a privacy control, not a CTA. */
.footer-link {
  display: block;
  width: 100%;
  padding: 5px 0;
  color: #9aa3b8;
  font-size: 13.5px;
  font-family: inherit;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.footer-link:hover { color: #fff; }
.footer-link:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; border-radius: 4px; }

.footer-trademarks {
  padding-top: 18px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.footer-trademarks p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.65;
  color: #7a8499;
  max-width: 92ch;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
  font-size: 12.5px;
  color: #7a8499;
}
.footer-note { color: #7a8499; }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .tool-grid, .scan-wrap { grid-template-columns: 1fr; }
  .preview-col { position: static; }
  .content-split { grid-template-columns: 1fr; gap: 32px; }
  .toc { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 12px 16px 20px;
    display: none;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav-dropdown { position: static; }
  .dropdown-panel {
    position: static;
    transform: none;
    width: auto;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: 0;
    padding: 0;
    margin: 4px 0 8px;
  }
  .dd-grid { grid-template-columns: 1fr 1fr; }
  .nav-link { justify-content: flex-start; font-size: 15px; padding: 10px 12px; }
  .nav-dropbtn { width: 100%; }
  .nav-dropbtn .chev { margin-left: auto; }
  .hero { padding: 40px 0 34px; }
  .hero h1 { max-width: none; }
}

@media (max-width: 620px) {
  .container { padding: 0 16px; }
  .panel { padding: 20px 16px; }
  .qr-card { padding: 16px; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .tool-section { padding: 28px 0 40px; }
  .section { padding: 40px 0; }
  .qr-actions { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 100%; }
  .prose { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
