/* ============================================================
   QR Barcode Maker — Design System v3.0
   Refined, premium, accessible. World-class polish.
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand */
  --primary: #2563EB;
  --primary-600: #1D4ED8;
  --primary-700: #1E40AF;
  --primary-50: #EFF6FF;
  --primary-100: #DBEAFE;

  --secondary: #1E40AF;
  --accent: #10B981;
  --accent-600: #059669;
  --accent-50: #ECFDF5;

  /* Neutrals — refined warm-cool grays */
  --bg: #FAFBFC;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --surface-3: #F1F5F9;
  --text: #0F172A;
  --text-2: #334155;
  --muted: #64748B;
  --muted-2: #94A3B8;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  /* Multi-layer shadows for premium depth */
  --shadow-xs: 0 1px 2px rgba(15,23,42,.04);
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md: 0 4px 6px -1px rgba(15,23,42,.07), 0 2px 4px -2px rgba(15,23,42,.05);
  --shadow-lg: 0 10px 15px -3px rgba(15,23,42,.08), 0 4px 6px -4px rgba(15,23,42,.05);
  --shadow-xl: 0 20px 25px -5px rgba(15,23,42,.10), 0 8px 10px -6px rgba(15,23,42,.06);
  --shadow-2xl: 0 25px 50px -12px rgba(15,23,42,.18);
  --shadow-glow: 0 0 0 4px rgba(37,99,235,.12);
  --shadow: var(--shadow-sm);

  /* Radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-full: 9999px;
  --radius: var(--r);
  --radius-sm: var(--r-sm);

  /* Spacing scale (4px base) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
  --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 150ms;
  --t: 250ms;
  --t-slow: 400ms;

  /* Dark mode shadow glow (enhanced contrast) */
  --shadow-glow-dark: 0 0 0 4px rgba(147,197,253,.35);
  --shadow-dark-inset: inset 0 1px 3px rgba(0,0,0,.2);

  /* Layout */
  --container: 1200px;
  --container-narrow: 880px;
  --container-prose: 760px;
  --header-h: 68px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .btn, .field input, .field textarea, .field select, .btn:hover, [data-theme="dark"] .field input:focus, [data-theme="dark"] .field textarea:focus, [data-theme="dark"] .field select:focus { transform: none !important; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
img, svg, canvas, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--primary-600); }
button { font-family: inherit; }

::selection { background: var(--primary-100); color: var(--primary-700); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--s-5); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute; top: -100px; left: var(--s-4);
  background: var(--text); color: #fff;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-sm);
  font-weight: 600; z-index: 100;
  text-decoration: none;
  transition: top var(--t) var(--ease);
}
.skip-link:focus { top: var(--s-2); color: #fff; outline: 3px solid var(--primary); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, .8);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.logo {
  font-weight: 700; font-size: 1.0625rem;
  color: var(--text);
  display: flex; align-items: center; gap: var(--s-2);
  letter-spacing: -.015em;
  transition: opacity var(--t-fast) var(--ease);
}
.logo:hover { opacity: .85; color: var(--text); }
.logo-mark {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-700) 100%);
  border-radius: 8px;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(37,99,235,.25), inset 0 1px 0 rgba(255,255,255,.2);
  position: relative;
}
.logo-mark::after {
  content: ''; position: absolute; inset: 6px;
  border: 2px solid #fff; border-radius: 3px;
  opacity: .9;
}
.nav-toggle {
  display: none; background: transparent; border: 0; cursor: pointer;
  padding: var(--s-2); color: var(--text); border-radius: var(--r-sm);
  transition: background var(--t-fast) var(--ease);
}
.nav-toggle:hover { background: var(--surface-3); }
.nav-toggle svg { width: 24px; height: 24px; }
.main-nav ul { display: flex; gap: var(--s-2); list-style: none; align-items: center; }
.main-nav a {
  color: var(--text-2); font-weight: 500; font-size: .9375rem;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  min-height: 40px;
  display: inline-flex; align-items: center;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.main-nav a:hover { color: var(--text); background: var(--surface-3); text-decoration: none; }
.main-nav a.cta {
  background: var(--text);
  color: #fff;
  padding: var(--s-2) var(--s-5);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15,23,42,.15);
}
.main-nav a.cta:hover { background: var(--primary); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: inherit; font-weight: 600; font-size: .9375rem;
  padding: var(--s-3) var(--s-6);
  border-radius: var(--r-sm);
  border: 0; cursor: pointer;
  letter-spacing: -.005em;
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease-out),
              background var(--t-fast) var(--ease),
              box-shadow var(--t) var(--ease),
              color var(--t-fast) var(--ease);
  text-decoration: none;
  position: relative;
  isolation: isolate;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); transition-duration: 50ms; }
.btn:focus-visible { outline: 0; box-shadow: var(--shadow-glow); }

.btn-primary {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-600) 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37,99,235,.25), inset 0 1px 0 rgba(255,255,255,.15);
}
.btn-primary:hover { background: linear-gradient(180deg, var(--primary-600) 0%, var(--primary-700) 100%); color: #fff; box-shadow: 0 8px 16px -4px rgba(37,99,235,.35), inset 0 1px 0 rgba(255,255,255,.15); }

.btn-accent {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-600) 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(16,185,129,.25), inset 0 1px 0 rgba(255,255,255,.15);
}
.btn-accent:hover { background: linear-gradient(180deg, var(--accent-600) 0%, #047857 100%); color: #fff; box-shadow: 0 8px 16px -4px rgba(16,185,129,.35), inset 0 1px 0 rgba(255,255,255,.15); }

.btn-outline {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.btn-outline:hover { background: var(--surface-2); color: var(--primary); border-color: var(--primary); }

.btn-ghost {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); background: var(--surface-3); border-color: var(--border-strong); }

.btn-sm { padding: var(--s-2) var(--s-4); font-size: .875rem; min-height: 44px; }

/* Gold Standard Button Refinements */
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-primary, .btn-accent {
  box-shadow:
    0 2px 4px rgba(0,0,0,.08),
    inset 0 1px 0 rgba(255,255,255,.15);
}
.btn-primary:hover, .btn-accent:hover {
  box-shadow:
    0 8px 16px -4px rgba(37,99,235,.35),
    inset 0 1px 0 rgba(255,255,255,.15);
  will-change: transform, box-shadow;
}
.btn-outline:focus-visible, .btn-ghost:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(37,99,235,.10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(16,185,129,.08), transparent 70%),
    linear-gradient(180deg, var(--primary-50) 0%, var(--bg) 90%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15,23,42,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 100%);
  pointer-events: none;
}
.hero-inner { text-align: center; max-width: 880px; margin: 0 auto; position: relative; }
.hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  line-height: 1.05; font-weight: 800;
  color: var(--text);
  margin-bottom: var(--s-5);
  letter-spacing: -.035em;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--primary) 0%, #6366F1 50%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  display: inline;
}
.hero p {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--text-2); margin-bottom: var(--s-8);
  max-width: 640px; margin-left: auto; margin-right: auto;
  line-height: 1.6;
}
.hero-cta { display: flex; gap: var(--s-3); justify-content: center; flex-wrap: wrap; }
.hero-cta .btn { padding: var(--s-4) var(--s-8); font-size: 1rem; min-height: 52px; }

.hero-trust { margin-top: var(--s-5); font-size: .875rem; color: var(--muted); }
.hero-trust a { color: var(--primary); font-weight: 600; }

.hero-image { margin: var(--s-10) auto 0; max-width: var(--container-narrow); padding: 0 var(--s-3); }
.hero-image img {
  width: 100%; height: auto;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2xl);
  background: var(--surface);
  border: 1px solid var(--border);
}

/* ---------- Sections ---------- */
section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-title {
  text-align: center;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: var(--s-3);
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--text);
}
.section-sub {
  text-align: center; color: var(--muted);
  margin: 0 auto var(--s-12);
  max-width: 640px;
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* ---------- Feature Cards ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-5);
}
.feature-card {
  background: var(--surface);
  padding: var(--s-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition:
    transform var(--t) var(--ease-out),
    box-shadow var(--t) var(--ease),
    border-color var(--t-fast) var(--ease);
  position: relative;
  will-change: transform, box-shadow;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.feature-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
  color: var(--primary);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--s-4);
  font-size: 1.5rem; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--s-2);
  letter-spacing: -.01em;
  color: var(--text);
}
.feature-card p { color: var(--muted); font-size: .9375rem; line-height: 1.6; }

/* ---------- Steps ---------- */
.steps { background: var(--surface); }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-8);
}
.step { text-align: center; padding: var(--s-3); }
.step-num {
  width: 56px; height: 56px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-700) 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.375rem; font-weight: 700;
  margin: 0 auto var(--s-4);
  box-shadow: 0 8px 24px -8px rgba(37,99,235,.5), inset 0 1px 0 rgba(255,255,255,.2);
}
.step h3 { margin-bottom: var(--s-2); font-size: 1.125rem; font-weight: 700; letter-spacing: -.01em; }
.step p { color: var(--muted); font-size: .9375rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: var(--s-3);
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t) var(--ease);
}
.faq-item:hover { border-color: var(--border-strong); }
.faq-item[open] { border-color: var(--primary-100); box-shadow: var(--shadow-sm); }
.faq-item summary {
  padding: var(--s-5) var(--s-6);
  font-weight: 600; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-3);
  font-size: 1rem; color: var(--text);
  transition: background var(--t-fast) var(--ease);
  min-height: 56px;
}
.faq-item summary:hover { background: var(--surface-2); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; width: 20px; height: 20px;
  flex-shrink: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='none' stroke='%232563EB' stroke-width='2.5' stroke-linecap='round' d='M10 4v12M4 10h12'/></svg>") center/contain no-repeat;
  transition: transform var(--t) var(--ease-spring);
}
.faq-item[open] summary::after {
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='none' stroke='%232563EB' stroke-width='2.5' stroke-linecap='round' d='M4 10h12'/></svg>") center/contain no-repeat;
  transform: rotate(180deg);
}
.faq-item p { padding: 0 var(--s-6) var(--s-5); color: var(--text-2); font-size: .9375rem; line-height: 1.7; }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, #0F172A 0%, #020617 100%);
  color: #CBD5E1;
  padding: var(--s-16) 0 var(--s-6);
  margin-top: var(--s-16);
  position: relative;
}
.site-footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,.4), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--s-8);
  margin-bottom: var(--s-12);
}
.site-footer .logo { color: #fff; }
.site-footer .logo-mark { box-shadow: 0 4px 12px rgba(37,99,235,.4); }
.footer-col h4 { color: #fff; margin-bottom: var(--s-4); font-size: .875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--s-2); }
.footer-col a { color: #94A3B8; font-size: .9375rem; transition: color var(--t-fast) var(--ease); }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(148,163,184,.15); padding-top: var(--s-5); text-align: center; font-size: .8125rem; color: #FFFFFF; opacity: 0.95; }
.footer-desc { font-size: .9375rem; line-height: 1.7; margin-top: var(--s-3); color: #94A3B8; max-width: 380px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: var(--s-4) 0; font-size: .8125rem; color: var(--muted); }
.breadcrumbs ol { list-style: none; display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.breadcrumbs li:not(:last-child)::after { content: '›'; margin-left: var(--s-2); color: var(--muted-2); font-size: 1.1em; }
.breadcrumbs a { color: var(--muted); font-weight: 500; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs li:last-child { color: var(--text-2); font-weight: 500; }

/* ---------- Tool Pages ---------- */
.tool-page { padding: var(--s-6) 0 var(--s-16); }
.tool-page h1 {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  margin-bottom: var(--s-3);
  letter-spacing: -.025em;
  font-weight: 800;
  line-height: 1.1;
}
.tool-page > .container > p.lead {
  color: var(--text-2);
  margin-bottom: var(--s-8);
  font-size: 1.125rem; max-width: 780px;
  line-height: 1.6;
}
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); align-items: start; }
@media (max-width: 900px) { .tool-grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--t) var(--ease),
    border-color var(--t-fast) var(--ease);
}
.panel h2 {
  font-size: 1.125rem;
  margin-bottom: var(--s-5);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex; flex-wrap: wrap; gap: var(--s-1);
  margin-bottom: var(--s-5);
  padding: var(--s-1);
  background: var(--surface-3);
  border-radius: var(--r);
}
.tab {
  background: transparent; border: 0;
  border-radius: var(--r-sm);
  padding: var(--s-2) var(--s-4);
  font-family: inherit; font-size: .8125rem; font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  transition:
    background-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
  min-height: 44px;
}
.tab:hover { color: var(--text); }
.tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
  will-change: color;
}

/* ---------- Forms ---------- */
.field { margin-bottom: var(--s-4); }
.field label {
  display: block;
  font-size: .8125rem; font-weight: 600;
  margin-bottom: var(--s-2);
  color: var(--text-2);
  letter-spacing: -.005em;
}
.field input[type=text],
.field input[type=url],
.field input[type=email],
.field input[type=tel],
.field input[type=number],
.field textarea,
.field select {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: .9375rem;
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(15,23,42,.04);
  transition:
    border-color var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease);
  min-height: 44px;
  will-change: border-color;
}
.field input:hover, .field textarea:hover, .field select:hover {
  border-color: var(--border-strong);
  box-shadow: inset 0 1px 2px rgba(15,23,42,.04);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 0;
  border-color: var(--primary);
  border-width: 2px;
  padding: var(--s-3) calc(var(--s-4) - 1px);
  box-shadow: var(--shadow-glow), inset 0 1px 2px rgba(15,23,42,.04);
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.6; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
@media (max-width: 500px) { .field-row { grid-template-columns: 1fr; } }

.field input[type=color] {
  width: 100%; height: 44px; padding: 3px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  cursor: pointer; background: var(--surface);
  transition: border-color var(--t-fast) var(--ease);
}
.field input[type=color]:hover { border-color: var(--border-strong); }
.field input[type=color]::-webkit-color-swatch { border: 0; border-radius: 4px; }
.field input[type=color]::-webkit-color-swatch-wrapper { padding: 0; border-radius: 4px; }

.checkbox-field { display: inline-flex; align-items: center; gap: var(--s-2); cursor: pointer; font-size: .875rem; color: var(--text-2); user-select: none; }
.checkbox-field input { width: auto; cursor: pointer; accent-color: var(--primary); }

input[type=range] {
  width: 100%; accent-color: var(--primary);
  height: 6px;
}

/* ---------- Preview Box ---------- */
/* Gold Standard: Smart Result UX */
.result-card {
  display: flex; align-items: center; justify-content: center;
  min-height: 320px;
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--s-8);
  margin: var(--s-8) 0;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.result-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(37,99,235,.05), transparent 60%);
  pointer-events: none;
}
.result-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.result-card canvas, .result-card svg, .result-card img {
  max-width: 100%; max-height: 340px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.12));
}

.preview-box {
  display: flex; align-items: center; justify-content: center;
  min-height: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--s-5);
  margin-bottom: var(--s-4);
  box-shadow: var(--shadow-xs);
}
.preview-box canvas, .preview-box svg, .preview-box img {
  max-width: 100%; max-height: 340px;
}

/* Gold Standard: Action Group */
.action-group {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: var(--s-6);
}
.action-group .btn {
  flex: 1;
  min-width: 140px;
}
.action-group .btn-primary {
  order: -1;
  font-weight: 600;
}
.action-group .btn-secondary, .action-group .btn-outline {
  font-weight: 500;
}

.download-row { display: flex; gap: var(--s-3); flex-wrap: wrap; }

/* Bulk grid */
.bulk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--s-3); margin-top: var(--s-5);
}
.bulk-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--s-3);
  text-align: center;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t) var(--ease);
}
.bulk-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.bulk-item canvas { margin: 0 auto; border-radius: var(--r-xs); }
.bulk-item .label { font-size: .75rem; color: var(--muted); margin-top: var(--s-2); word-break: break-all; max-height: 32px; overflow: hidden; }

/* Spinner */
.spinner {
  display: inline-block; width: 24px; height: 24px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: var(--r-full);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Mobile Nav ---------- */
@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: rgba(255,255,255,.98);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    padding: var(--s-4) var(--s-5);
    display: none;
    box-shadow: var(--shadow-xl);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: var(--s-1); align-items: stretch; }
  .main-nav a { padding: var(--s-3) var(--s-3); display: block; min-height: 48px; width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Content Pages ---------- */
.content-page { padding: var(--s-12) 0 var(--s-16); max-width: var(--container-prose); margin: 0 auto; }
.content-page h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: var(--s-5); letter-spacing: -.025em; font-weight: 800; line-height: 1.15; }
.content-page h2 { font-size: 1.5rem; margin: var(--s-10) 0 var(--s-3); font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.content-page p { margin-bottom: var(--s-4); color: var(--text-2); font-size: 1.0625rem; line-height: 1.75; }
.content-page ul { margin: 0 0 var(--s-5) var(--s-6); }
.content-page li { margin-bottom: var(--s-2); color: var(--text-2); font-size: 1.0625rem; line-height: 1.7; }

/* ============================================================
   Advanced QR Generator Page
   ============================================================ */

/* Templates bar */
.templates-bar { margin-bottom: var(--s-6); }
.tb-title { font-size: .75rem; font-weight: 700; color: var(--muted); margin-bottom: var(--s-3); text-transform: uppercase; letter-spacing: .08em; }
.templates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s-2); }
.tpl {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: inherit; font-size: .875rem; font-weight: 500;
  color: var(--text); cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.tpl:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.tpl-swatch { width: 20px; height: 20px; border-radius: var(--r-xs); flex-shrink: 0; border: 1px solid rgba(0,0,0,.08); }

/* QR layout */
.qr-layout { display: grid; grid-template-columns: 1.2fr .9fr; gap: var(--s-6); align-items: start; }
@media (max-width: 960px) { .qr-layout { grid-template-columns: 1fr; } }
.qr-options { display: flex; flex-direction: column; gap: var(--s-3); }

/* Accordion */
.acc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: box-shadow var(--t) var(--ease), border-color var(--t-fast) var(--ease);
}
.acc[open] { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.acc summary {
  list-style: none;
  padding: var(--s-5) var(--s-6);
  cursor: pointer; font-weight: 600; font-size: 1rem;
  display: flex; align-items: center; gap: var(--s-3);
  user-select: none;
  transition: background var(--t-fast) var(--ease);
  letter-spacing: -.005em;
  color: var(--text);
}
.acc summary:hover { background: var(--surface-2); }
.acc summary::-webkit-details-marker { display: none; }
.acc-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  color: #fff;
  font-size: .8125rem; font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37,99,235,.3);
}
.acc-icon {
  margin-left: auto; width: 20px; height: 20px;
  position: relative; flex-shrink: 0;
}
.acc-icon::before, .acc-icon::after {
  content: ''; position: absolute;
  background: var(--muted);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  transition: transform var(--t) var(--ease-spring);
  border-radius: 1px;
}
.acc-icon::before { width: 12px; height: 2px; }
.acc-icon::after { width: 2px; height: 12px; }
.acc[open] .acc-icon::after { transform: translate(-50%,-50%) scaleY(0); }
.acc-body {
  padding: 0 var(--s-6) var(--s-6);
  border-top: 1px solid var(--border);
}
.acc-body > :first-child { margin-top: var(--s-5); }

/* Sticky preview */
.qr-preview-wrap { position: sticky; top: calc(var(--header-h) + var(--s-3)); }
.preview-panel h2 { font-size: 1rem; margin-bottom: var(--s-4); }
.preview-frame {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: var(--s-4);
  background: var(--surface);
  border-radius: var(--r);
  transition: all var(--t) var(--ease);
}
.preview-checker {
  background-image:
    linear-gradient(45deg, rgba(203,213,225,.5) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(203,213,225,.5) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(203,213,225,.5) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(203,213,225,.5) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  padding: var(--s-2);
  border-radius: var(--r-sm);
  display: inline-block;
}
#qr-canvas { display: flex; align-items: center; justify-content: center; }
#qr-canvas canvas, #qr-canvas svg { max-width: 100%; height: auto; display: block; border-radius: var(--r-xs); }
.preview-meta { text-align: center; color: var(--muted); font-size: .8125rem; margin: var(--s-3) 0 var(--s-4); font-variant-numeric: tabular-nums; }

/* Mobile: keep the QR live preview at a comfortable size. */
@media (max-width: 768px) {
  #qr-canvas canvas,
  #qr-canvas svg { max-width: 280px; }
}

/* Frame styles */
.preview-frame.frame-simple { border: 4px solid var(--frame-color); border-radius: 0; padding: var(--s-5); }
.preview-frame.frame-rounded { border: 4px solid var(--frame-color); border-radius: 18px; padding: var(--s-5); }
.preview-frame.frame-scanme, .preview-frame.frame-custom { border: 4px solid var(--frame-color); border-radius: 12px; padding: var(--s-5) var(--s-5) var(--s-12); }
.frame-label { position: absolute; left: var(--s-5); right: var(--s-5); bottom: var(--s-3); color: #fff; text-align: center; font-weight: 700; letter-spacing: .05em; padding: var(--s-2); border-radius: var(--r-sm); font-size: .9375rem; }

/* Visual thumb selectors */
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: var(--s-2); }
.thumb {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-1);
  padding: var(--s-2);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: inherit; font-size: .6875rem; font-weight: 600;
  color: var(--muted);
  transition: all var(--t-fast) var(--ease-out);
}
.thumb svg { display: block; border-radius: var(--r-xs); }
.thumb:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--primary); }
.thumb.active {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-glow);
  background: var(--primary-50);
}

/* Swatches */
.swatches { display: flex; gap: var(--s-1); flex-wrap: wrap; margin-top: var(--s-2); }
.swatch {
  width: 26px; height: 26px;
  border-radius: var(--r-sm);
  border: 2px solid var(--border);
  cursor: pointer; padding: 0;
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.swatch:hover { transform: scale(1.15); border-color: var(--primary); box-shadow: var(--shadow-sm); }

/* Color groups */
.color-group { padding: var(--s-4) 0; border-bottom: 1px solid var(--border); }
.color-group:last-child { border-bottom: 0; padding-bottom: 0; }
.color-group:first-child { padding-top: 0; }
.color-group-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-3); flex-wrap: wrap; gap: var(--s-2); }
.color-group-head strong { font-size: .875rem; font-weight: 600; color: var(--text); }
.gradient-controls { margin-top: var(--s-2); padding: var(--s-4); background: var(--surface-2); border-radius: var(--r-sm); border: 1px solid var(--border); }

/* Logo upload + gallery */
.upload-row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.upload-name { font-size: .8125rem; color: var(--muted); }
.logo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: var(--s-2);
  margin-top: var(--s-2);
}
.logo-tile {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--s-2);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}
.logo-tile:hover { border-color: var(--primary); transform: scale(1.08); background: var(--primary-50); box-shadow: var(--shadow-sm); }
.logo-tile svg { width: 100%; height: 100%; display: block; }

.preview-panel .download-row { margin-top: var(--s-4); }
.preview-panel .download-row .btn { flex: 1; }

/* ============================================================
   i18n: language switcher + RTL
   ============================================================ */
.lang-switch-host { display: flex; align-items: center; }
.lang-select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2364748B' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right .65rem center;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--s-2) var(--s-8) var(--s-2) var(--s-3);
  font-family: inherit; font-size: .8125rem; font-weight: 500;
  color: var(--text); cursor: pointer;
  max-width: 150px;
  min-height: 36px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.lang-select:hover { border-color: var(--border-strong); }
.lang-select:focus { outline: 0; border-color: var(--primary); box-shadow: var(--shadow-glow); }
@media (max-width: 768px) {
  .lang-switch-host { padding: var(--s-2) 0; }
  .lang-select { max-width: 100%; width: 100%; }
}

/* RTL */
html[dir=rtl] body { direction: rtl; text-align: right; }
html[dir=rtl] .main-nav ul { flex-direction: row-reverse; }
html[dir=rtl] .breadcrumbs ol { flex-direction: row-reverse; }
html[dir=rtl] .breadcrumbs li:not(:last-child)::after { margin-left: 0; margin-right: var(--s-2); }
html[dir=rtl] .acc summary { flex-direction: row-reverse; }
html[dir=rtl] .acc-icon { margin-left: 0; margin-right: auto; }
html[dir=rtl] .footer-col ul { padding: 0; }
html[dir=rtl] .feature-card { text-align: right; }
html[dir=rtl] .hero-inner, html[dir=rtl] .section-title, html[dir=rtl] .section-sub, html[dir=rtl] .step { text-align: center; }
html[dir=rtl] .lang-select { background-position: left .65rem center; padding: var(--s-2) var(--s-3) var(--s-2) var(--s-8); }
html[dir=rtl] .faq-item summary { flex-direction: row-reverse; }

/* RTL: Input Groups & Form Layout */
html[dir=rtl] .field { text-align: right; }
html[dir=rtl] .field-row { direction: rtl; }
html[dir=rtl] .action-group { direction: rtl; }
html[dir=rtl] .checkbox-field { flex-direction: row-reverse; }
html[dir=rtl] .result-card { direction: rtl; }

/* ---------- Focus & A11y ---------- */
:focus-visible {
  outline: 0;
  box-shadow: var(--shadow-glow);
  border-radius: var(--r-sm);
}
.feature-icon, .step-num { user-select: none; }

/* ============================================================
   Blog
   ============================================================ */
.blog-hero {
  padding: var(--s-12) 0 var(--s-8);
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(37,99,235,.10), transparent 70%),
    linear-gradient(180deg, var(--primary-50) 0%, var(--bg) 100%);
  text-align: center;
  position: relative;
}
.blog-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: var(--s-3); letter-spacing: -.025em; font-weight: 800; line-height: 1.1; }
.blog-hero p { color: var(--text-2); font-size: 1.125rem; max-width: 640px; margin: 0 auto; line-height: 1.6; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s-6);
  padding: var(--s-8) 0 var(--s-16);
}
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform var(--t) var(--ease-out), box-shadow var(--t) var(--ease), border-color var(--t-fast) var(--ease);
  display: flex; flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); border-color: var(--border-strong); }
.blog-card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.blog-card a:hover { text-decoration: none; }
.blog-card-img {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  overflow: hidden;
}
.blog-card-img svg { width: 100%; height: 100%; display: block; }
.blog-card-body { padding: var(--s-5) var(--s-6) var(--s-6); flex: 1; display: flex; flex-direction: column; }
.blog-card .tag {
  display: inline-block;
  font-size: .6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--primary);
  background: var(--primary-50);
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-full);
  margin-bottom: var(--s-3);
  align-self: flex-start;
}
.blog-card h2 {
  font-size: 1.1875rem; line-height: 1.35;
  margin-bottom: var(--s-2);
  color: var(--text);
  letter-spacing: -.015em;
  font-weight: 700;
}
.blog-card p { color: var(--muted); font-size: .9375rem; flex: 1; line-height: 1.6; }
.blog-card .read-more { margin-top: var(--s-4); color: var(--primary); font-weight: 600; font-size: .875rem; display: inline-flex; align-items: center; gap: var(--s-1); }
.blog-card:hover .read-more { gap: var(--s-2); }

/* Article page */
.blog-post { padding: 0 0 var(--s-16); }
.post-hero {
  width: calc(100% - var(--s-5));
  max-width: var(--container-narrow);
  margin: var(--s-8) auto 0;
  aspect-ratio: 21/9;
  max-height: 360px;
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  display: block; overflow: hidden;
  position: relative;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
}
.post-hero svg { width: 100%; height: 100%; display: block; }
@media (max-width: 640px) { .post-hero { aspect-ratio: 16/9; border-radius: var(--r); margin-top: var(--s-5); } }

.post-container { max-width: var(--container-prose); margin: 0 auto; padding: 0 var(--s-5); }
.post-header { padding: var(--s-10) 0 var(--s-6); border-bottom: 1px solid var(--border); margin-bottom: var(--s-8); }
.post-meta { display: flex; gap: var(--s-3); align-items: center; font-size: .8125rem; color: var(--muted); margin-bottom: var(--s-5); flex-wrap: wrap; }
.post-meta .tag {
  background: var(--primary-50); color: var(--primary);
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-full);
  font-weight: 700; text-transform: uppercase;
  font-size: .6875rem; letter-spacing: .08em;
}
.post-header h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1; margin-bottom: var(--s-5);
  letter-spacing: -.03em; font-weight: 800;
  color: var(--text);
}
.post-lede { font-size: 1.25rem; color: var(--text-2); line-height: 1.55; font-weight: 400; }

.post-body { font-size: 1.0625rem; line-height: 1.75; color: var(--text-2); }
.post-body h2 {
  font-size: 1.625rem;
  margin: var(--s-12) 0 var(--s-4);
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -.02em;
  font-weight: 700;
}
.post-body h3 { font-size: 1.25rem; margin: var(--s-8) 0 var(--s-3); font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.post-body p { margin-bottom: var(--s-4); }
.post-body ul, .post-body ol { margin: 0 0 var(--s-5) var(--s-6); }
.post-body li { margin-bottom: var(--s-2); }
.post-body strong { color: var(--text); font-weight: 600; }
.post-body a {
  color: var(--primary); font-weight: 500;
  border-bottom: 1px solid rgba(37,99,235,.3);
  transition: border-color var(--t-fast) var(--ease);
}
.post-body a:hover { border-bottom-color: var(--primary); text-decoration: none; }
.post-body code { background: var(--surface-3); padding: 2px 6px; border-radius: var(--r-xs); font-size: .9em; font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.post-body blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-50);
  padding: var(--s-4) var(--s-5);
  margin: var(--s-6) 0;
  border-radius: 0 var(--r) var(--r) 0;
  font-style: italic;
  color: var(--text);
}
.post-callout {
  background: linear-gradient(135deg, var(--primary-50), #E0F2FE);
  border: 1px solid #BFDBFE;
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-6);
  margin: var(--s-8) 0;
  position: relative;
}
.post-callout strong {
  color: var(--primary-700);
  display: block; margin-bottom: var(--s-2);
  font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
}
.post-cta {
  margin: var(--s-12) 0 var(--s-8);
  padding: var(--s-8);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-700) 100%);
  border-radius: var(--r-lg);
  color: #fff; text-align: center;
  position: relative; overflow: hidden;
  box-shadow: 0 16px 32px -12px rgba(37,99,235,.4);
}
.post-cta::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right, rgba(255,255,255,.15), transparent 60%);
  pointer-events: none;
}
.post-cta h3 { color: #fff; font-size: 1.5rem; margin-bottom: var(--s-2); font-weight: 700; letter-spacing: -.015em; position: relative; }
.post-cta p { color: rgba(255,255,255,.92); margin-bottom: var(--s-5); font-size: 1rem; position: relative; }
.post-cta .btn { background: #fff; color: var(--primary); position: relative; }
.post-cta .btn:hover { background: var(--accent); color: #fff; }

.post-related { margin-top: var(--s-12); padding-top: var(--s-8); border-top: 1px solid var(--border); }
.post-related h3 { font-size: .8125rem; margin-bottom: var(--s-4); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.post-related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-3); }
.post-related-grid a {
  padding: var(--s-4) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text); font-weight: 500; font-size: .9375rem;
  transition: all var(--t-fast) var(--ease-out);
  line-height: 1.4;
}
.post-related-grid a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* ============================================================
   Content sections
   ============================================================ */
.content-section { padding: clamp(3rem, 6vw, 5rem) 0; }
.content-section.content-alt { background: var(--surface); padding-top: 0; }
.content-figure { margin: var(--s-5) 0 var(--s-8); }
.content-figure img { width: 100%; height: auto; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-md); border: 1px solid var(--border); }
.content-figure figcaption { text-align: center; color: var(--muted); font-size: .875rem; margin-top: var(--s-3); font-style: italic; }
.content-section .feature-card h3 a { color: inherit; text-decoration: none; border-bottom: 0; transition: color var(--t-fast) var(--ease); }
.content-section .feature-card h3 a:hover { color: var(--primary); }

/* Comparison table */
.compare-table {
  overflow-x: auto;
  margin: var(--s-5) 0;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.compare-table table { width: 100%; border-collapse: collapse; min-width: 520px; }
.compare-table th, .compare-table td {
  padding: var(--s-4) var(--s-5);
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: .9375rem;
}
.compare-table th { background: var(--surface-2); font-weight: 700; color: var(--text); font-size: .8125rem; text-transform: uppercase; letter-spacing: .04em; }
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table tr:hover td { background: var(--surface-2); }
.compare-table td:first-child { color: var(--text); }

/* Subtle entrance animation for above-fold content */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-inner > * { animation: fadeUp .6s var(--ease-out) backwards; }
.hero-inner h1 { animation-delay: .05s; }
.hero-inner p { animation-delay: .15s; }
.hero-inner .hero-cta { animation-delay: .25s; }
.hero-inner .hero-trust { animation-delay: .35s; }
.hero-image { animation: fadeUp .8s var(--ease-out) .4s backwards; }

/* ============================================================
   Quick Generator (homepage hero inline)
   ============================================================ */
.quick-gen {
  margin: var(--s-8) auto 0;
  max-width: 640px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
}
.quick-gen-form { display: flex; gap: var(--s-2); }
.quick-gen-form input {
  flex: 1; min-width: 0;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: inherit; font-size: 1rem;
  background: var(--surface-2); color: var(--text);
  min-height: 48px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.quick-gen-form input:focus { outline: 0; border-color: var(--primary); box-shadow: var(--shadow-glow); background: var(--surface); }
.quick-gen-form .btn { min-height: 48px; padding-left: var(--s-6); padding-right: var(--s-6); }
.quick-gen-preview {
  display: flex; align-items: center; justify-content: center;
  margin-top: var(--s-5);
  min-height: 120px;
}
.quick-gen-preview canvas, .quick-gen-preview svg {
  border-radius: var(--r-sm);
  background: #fff;
  padding: var(--s-2);
  box-shadow: var(--shadow-sm);
}
.quick-gen-actions {
  display: flex; gap: var(--s-2); justify-content: center; flex-wrap: wrap;
  margin-top: var(--s-4);
}
@media (max-width: 480px) {
  .quick-gen-form { flex-direction: column; }
  .quick-gen-form input, .quick-gen-form .btn { width: 100%; }
}

/* ============================================================
   Scanner Page
   ============================================================ */
.scan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  align-items: start;
}
@media (max-width: 900px) { .scan-grid { grid-template-columns: 1fr; } }

.scan-stage {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--text);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: var(--s-4);
}
.scan-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-mount { position: absolute; inset: 0; width: 100%; height: 100%; }
.scan-mount video { width: 100% !important; height: 100% !important; object-fit: cover; display: block; }
.scan-mount img, .scan-mount canvas { display: none; }
.scan-stage.flash::after {
  content: ''; position: absolute; inset: 0; background: rgba(16,185,129,.4);
  animation: scanflash .25s ease-out;
}
@keyframes scanflash {
  0% { opacity: 1; } 100% { opacity: 0; }
}
.scan-frame {
  position: absolute; inset: 18%;
  pointer-events: none;
}
.scan-frame span {
  position: absolute;
  width: 32px; height: 32px;
  border-color: rgba(255,255,255,.85);
  border-style: solid; border-width: 0;
}
.scan-frame span:nth-child(1) { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 6px; }
.scan-frame span:nth-child(2) { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 6px; }
.scan-frame span:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 6px; }
.scan-frame span:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 6px; }
.scan-laser {
  position: absolute; left: 4%; right: 4%; top: 4%;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, #10b981, transparent);
  box-shadow: 0 0 14px 2px rgba(16,185,129,.7);
  animation: scanlaser 2.4s cubic-bezier(.45,.05,.55,.95) infinite;
  pointer-events: none;
}
@keyframes scanlaser {
  0%, 100% { transform: translateY(0); opacity: .85; }
  50%      { transform: translateY(420%); opacity: 1; }
}
.scan-stage:has(.scan-overlay:not([hidden])) .scan-laser { display: none; }

.trust-badges {
  display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; padding: 0;
  margin: var(--s-4) 0 var(--s-6); font-size: .8125rem;
}
.trust-badges li {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  padding: var(--s-2) var(--s-3); border-radius: 999px; font-weight: 600;
}

.faq-list { display: flex; flex-direction: column; gap: var(--s-3); max-width: 820px; margin: 0 auto; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: var(--s-4) var(--s-5); transition: border-color var(--t-fast) var(--ease);
}
.faq-item[open] { border-color: var(--primary); box-shadow: 0 4px 16px rgba(0,0,0,.04); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; gap: var(--s-3);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 1.5rem; color: var(--muted);
  transition: transform var(--t-fast) var(--ease);
  flex-shrink: 0; line-height: 1; font-weight: 300;
}
.faq-item[open] summary::after { content: '−'; color: var(--primary); }
.faq-item summary h3 { font-size: 1.0625rem; margin: 0; font-weight: 600; display: inline; }
.faq-item p { margin: var(--s-3) 0 0; color: var(--muted); line-height: 1.7; }
.faq-item code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: .85em; }

.scan-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15,23,42,.7);
  color: #fff; font-size: 1rem;
  text-align: center; padding: var(--s-5);
}
.scan-overlay p { color: #fff; }
.scan-hint { font-size: .8125rem; color: var(--muted); margin-top: var(--s-3); }

.scan-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s-2);
  padding: var(--s-8) var(--s-5);
  border: 2px dashed var(--border);
  border-radius: var(--r);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: all var(--t-fast) var(--ease);
}
.scan-drop:hover, .scan-drop.is-dragover {
  border-color: var(--primary);
  background: var(--primary-50);
  color: var(--primary);
}
.scan-drop strong { color: var(--text); }
.scan-drop small { font-size: .75rem; color: var(--muted); }

.scan-result { background: var(--surface-2); border-radius: var(--r); padding: var(--s-4); min-height: 120px; }
.scan-empty { color: var(--muted); font-size: .9375rem; text-align: center; padding: var(--s-5) 0; }

.scan-card { display: flex; flex-direction: column; gap: var(--s-3); }
.scan-card-row { display: flex; justify-content: space-between; gap: var(--s-3); align-items: baseline; font-size: .875rem; }
.scan-card-row.scan-card-row-block { flex-direction: column; align-items: stretch; }
.scan-label { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.scan-value { color: var(--text); font-weight: 600; font-family: ui-monospace, 'SF Mono', monospace; font-size: .8125rem; }
.scan-data {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: var(--s-3); margin-top: var(--s-2);
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: .8125rem; line-height: 1.5;
  color: var(--text); white-space: pre-wrap; word-break: break-all;
  max-height: 160px; overflow-y: auto;
}
.scan-validation {
  font-size: .8125rem; padding: var(--s-2) var(--s-3);
  background: var(--accent-50); color: var(--accent-600);
  border-radius: var(--r-sm);
  border: 1px solid rgba(16,185,129,.2);
}
.scan-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-2); }

/* ============================================================
   History Panel
   ============================================================ */
.history-panel { margin-top: var(--s-5); }
.history-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin-bottom: var(--s-2); }
.history-head h2 { font-size: 1rem; margin: 0; }
.history-note { font-size: .75rem; color: var(--muted); margin-bottom: var(--s-3); line-height: 1.5; }
.history-empty { color: var(--muted); font-size: .8125rem; text-align: center; padding: var(--s-4) 0; font-style: italic; }
.history-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: var(--s-2);
  background: var(--surface-2);
  transition: border-color var(--t-fast) var(--ease);
}
.history-item:hover { border-color: var(--border-strong); }
.history-item img { width: 48px; height: 48px; border-radius: var(--r-xs); background: #fff; padding: 2px; flex-shrink: 0; }
.history-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.history-type { font-size: .65rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .05em; }
.history-data {
  font-size: .8125rem; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: ui-monospace, 'SF Mono', monospace;
}

/* ============================================================
   Live Preview Mockup — Mobile Phone Frame
   ============================================================ */

/* View toggle */
.preview-head {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.preview-head h2 { margin: 0; }
.preview-modes {
  display: inline-flex; gap: 2px;
  padding: 3px;
  background: var(--surface-3);
  border-radius: var(--r-sm);
}
.pmode {
  background: transparent; border: 0;
  padding: 6px 14px;
  font-family: inherit; font-size: .8125rem; font-weight: 600;
  color: var(--muted); cursor: pointer;
  border-radius: 5px;
  transition: all var(--t-fast) var(--ease);
  min-height: 28px;
}
.pmode:hover { color: var(--text); }
.pmode.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

.preview-stage[hidden] { display: none; }

/* Phone mockup frame */
.phone-mockup {
  display: flex;
  justify-content: center;
  padding: var(--s-3) 0;
  perspective: 1000px;
}
.phone-frame {
  position: relative;
  width: 280px;
  height: 560px;
  background: linear-gradient(145deg, #1a1d24 0%, #0a0c10 100%);
  border-radius: 38px;
  padding: 12px;
  box-shadow:
    0 0 0 2px #2c2f37,
    0 0 0 3px #3a3d44,
    0 25px 50px -12px rgba(15,23,42,.45),
    0 12px 24px -8px rgba(15,23,42,.3),
    inset 0 0 0 1px rgba(255,255,255,.04);
  transition: transform var(--t-slow) var(--ease-out);
}
.phone-mockup-bc .phone-frame {
  width: 320px;
  transform: rotate(90deg) translateY(-20px);
}
.phone-frame:hover { transform: translateY(-4px) scale(1.01); }
.phone-mockup-bc .phone-frame:hover { transform: rotate(90deg) translateY(-24px) scale(1.01); }

.phone-side {
  position: absolute;
  background: #1a1d24;
  border-radius: 2px;
}
.phone-side-power { right: -2px; top: 130px; width: 3px; height: 60px; }
.phone-side-vol1 { left: -2px; top: 110px; width: 3px; height: 32px; }
.phone-side-vol2 { left: -2px; top: 152px; width: 3px; height: 56px; }

.phone-screen {
  width: 100%; height: 100%;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  background: #fff;
  display: flex; flex-direction: column;
  transition: background var(--t) var(--ease);
}

/* Status bar */
.phone-statusbar {
  height: 38px;
  padding: 8px 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  position: relative;
  z-index: 3;
  flex-shrink: 0;
}
.phone-time { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.phone-dynisland {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  top: 8px;
  width: 92px; height: 26px;
  background: #000;
  border-radius: 14px;
}
.phone-icons {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text);
}

/* Phone content area (background + QR) */
.phone-content {
  flex: 1; position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.phone-bg {
  position: absolute; inset: 0;
  z-index: 0;
  transition: opacity var(--t) var(--ease);
}
.phone-qr {
  position: relative; z-index: 1;
  width: 64%; max-width: 180px;
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 24px -4px rgba(15,23,42,.18), 0 4px 8px -2px rgba(15,23,42,.08);
}
.phone-qr img, .phone-qr canvas, .phone-qr svg {
  width: 100%; height: auto; display: block;
}
.phone-mockup-bc .phone-qr {
  width: 80%; max-width: 240px;
  padding: 18px;
}
.phone-mockup-bc .phone-qr img,
.phone-mockup-bc .phone-qr svg {
  transform: rotate(-90deg);
  transform-origin: center;
}

/* Scan laser animation */
.scan-laser {
  position: absolute; inset: 0;
  z-index: 5;
  pointer-events: none;
  display: none;
}
.scan-laser.active { display: block; }
.scan-laser::before {
  content: '';
  position: absolute;
  left: 14%; right: 14%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #10B981 20%, #10B981 80%, transparent);
  box-shadow: 0 0 18px 6px rgba(16,185,129,.6), 0 0 4px 1px rgba(16,185,129,1);
  animation: scanSweep 1.6s var(--ease-out);
  border-radius: 2px;
}
.scan-laser::after {
  content: '';
  position: absolute;
  left: 18%; right: 18%; top: 18%; bottom: 18%;
  border: 2px solid rgba(16,185,129,.5);
  border-radius: 12px;
  animation: scanGlow 1.6s var(--ease-out);
  box-shadow: inset 0 0 30px rgba(16,185,129,.15);
  pointer-events: none;
}
@keyframes scanSweep {
  0%   { top: 18%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 82%; opacity: 0; }
}
@keyframes scanGlow {
  0%, 100% { opacity: 0; transform: scale(1.05); }
  20%, 80% { opacity: 1; transform: scale(1); }
}

/* Notification banner */
.phone-notification {
  position: absolute;
  top: 50px; left: 12px; right: 12px;
  z-index: 10;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 24px -4px rgba(15,23,42,.25);
  animation: notifIn .35s var(--ease-spring);
}
.phone-notification[hidden] { display: none; }
.phone-screen[data-bg="dark"] .phone-notification {
  background: rgba(40,40,40,.92);
  color: #fff;
}
@keyframes notifIn {
  from { opacity: 0; transform: translateY(-8px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.notif-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  color: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-icon svg { width: 18px; height: 18px; }
.notif-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 1px;
}
.notif-title {
  font-size: 12px; font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}
.phone-screen[data-bg="dark"] .notif-title { color: #fff; }
.notif-data {
  font-size: 11px;
  color: var(--text-2);
  font-family: ui-monospace, 'SF Mono', monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.phone-screen[data-bg="dark"] .notif-data { color: rgba(255,255,255,.7); }

/* Home indicator */
.phone-home {
  position: absolute;
  bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 4px;
  background: var(--text);
  border-radius: 2px;
  z-index: 4;
  opacity: .55;
}
.phone-screen[data-bg="dark"] .phone-home { background: #fff; opacity: .7; }
.phone-screen[data-bg="payment"] .phone-home,
.phone-screen[data-bg="business"] .phone-home,
.phone-screen[data-bg="menu"] .phone-home { opacity: .35; }

/* Status bar color adapts to background */
.phone-screen[data-bg="dark"] .phone-statusbar,
.phone-screen[data-bg="dark"] .phone-icons { color: #fff; }
.phone-screen[data-bg="payment"] .phone-statusbar,
.phone-screen[data-bg="payment"] .phone-icons { color: #fff; }

/* === Background contexts === */

/* Light (default) */
.phone-bg[data-bg="light"], .phone-screen[data-bg="light"] .phone-bg {
  background: linear-gradient(180deg, #FAFBFC 0%, #F1F5F9 100%);
}

/* Dark */
.phone-screen[data-bg="dark"] .phone-bg {
  background: linear-gradient(180deg, #0F172A 0%, #020617 100%);
}
.phone-screen[data-bg="dark"] { background: #0F172A; }

/* Business card */
.phone-screen[data-bg="business"] .phone-bg {
  background:
    radial-gradient(ellipse at top, rgba(37,99,235,.08), transparent 60%),
    linear-gradient(160deg, #FAFBFC 0%, #E2E8F0 100%);
}
.phone-screen[data-bg="business"] .phone-bg::before {
  content: 'JOHN DOE';
  position: absolute;
  top: 16%; left: 0; right: 0;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 17px; font-weight: 800;
  letter-spacing: .04em;
  color: var(--text);
}
.phone-screen[data-bg="business"] .phone-bg::after {
  content: 'Senior Product Designer\Aacme @ Studio';
  white-space: pre;
  position: absolute;
  top: 22%; left: 0; right: 0;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.4;
}

/* Menu */
.phone-screen[data-bg="menu"] .phone-bg {
  background: linear-gradient(180deg, #FEF3C7 0%, #FDE68A 100%);
}
.phone-screen[data-bg="menu"] .phone-bg::before {
  content: '✦ MENU ✦';
  position: absolute;
  top: 12%; left: 0; right: 0;
  text-align: center;
  font-family: 'Inter', serif;
  font-size: 16px; font-weight: 800;
  color: #78350F;
  letter-spacing: .15em;
}
.phone-screen[data-bg="menu"] .phone-bg::after {
  content: 'Scan to view our full menu';
  position: absolute;
  bottom: 14%; left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  font-style: italic;
  color: #92400E;
}

/* Payment */
.phone-screen[data-bg="payment"] .phone-bg {
  background: linear-gradient(160deg, #1E40AF 0%, #6366F1 50%, #8B5CF6 100%);
}
.phone-screen[data-bg="payment"] .phone-bg::before {
  content: 'Pay with QR';
  position: absolute;
  top: 12%; left: 0; right: 0;
  text-align: center;
  color: #fff;
  font-size: 18px; font-weight: 700;
  letter-spacing: -.02em;
}
.phone-screen[data-bg="payment"] .phone-bg::after {
  content: '$ 49.00';
  position: absolute;
  top: 20%; left: 0; right: 0;
  text-align: center;
  color: #fff;
  font-size: 28px; font-weight: 800;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.phone-screen[data-bg="payment"] .phone-qr {
  background: rgba(255,255,255,.98);
  box-shadow: 0 16px 40px -8px rgba(0,0,0,.4);
}

/* Background switcher */
.bg-switcher {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  margin-top: var(--s-3);
}
.bgs {
  background: transparent; border: 0;
  padding: 6px 8px;
  font-family: inherit; font-size: .7rem; font-weight: 600;
  color: var(--muted); cursor: pointer;
  border-radius: 5px;
  transition: all var(--t-fast) var(--ease);
  flex: 1 1 auto;
  min-width: 70px;
  white-space: nowrap;
  min-height: 28px;
}
.bgs:hover { color: var(--text); background: rgba(255,255,255,.6); }
.bgs.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

/* Mobile responsive — floating preview */
@media (max-width: 960px) {
  .qr-preview-wrap { position: relative; top: 0; }
  .phone-mockup { padding: var(--s-2) 0; }
  .phone-frame { width: 240px; height: 480px; }
  .phone-mockup-bc .phone-frame { width: 280px; }
}
@media (max-width: 480px) {
  .phone-frame { width: 220px; height: 440px; border-radius: 32px; padding: 10px; }
  .phone-screen { border-radius: 24px; }
}

/* Mockup heading - shown above always-visible mockup */
.mockup-heading {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: var(--s-6) 0 var(--s-3);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

/* ============================================================
   v3.1 — Premium nav + hero creator (homepage centerpiece)
   ============================================================ */

/* Refined nav: tighter spacing, organized rhythm */
.main-nav ul { gap: 4px; }
.main-nav a {
  font-size: .9rem;
  padding: 8px 14px;
  min-height: 38px;
  border-radius: 8px;
  color: var(--text-2);
  font-weight: 500;
  position: relative;
}
.main-nav a:hover { background: var(--surface-3); color: var(--text); }
.main-nav .lang-switch-host { margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--border); }

/* Active page indicator */
.main-nav a[aria-current="page"] {
  background: var(--primary-50);
  color: var(--primary-700);
  font-weight: 600;
}

/* Drop CTA from nav (creator IS the CTA on homepage now) */
.main-nav a.cta { display: none; }

/* ============== Hero v2: 2-column layout with creator ============== */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-text { text-align: center; }
  /* Tool-first on mobile: surface the live generator above the marketing copy */
  .hero-creator { order: -1; }
}

.hero-text { max-width: 540px; }
@media (max-width: 960px) { .hero-text { margin: 0 auto; } }

.hero-eyebrow {
  display: inline-flex; align-items: center;
  background: var(--primary-50);
  color: var(--primary-700);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(37,99,235,.15);
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem) !important;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  letter-spacing: -.035em;
  font-weight: 800;
  color: var(--text);
}
.hero h1 span { background: none; color: inherit; }

.hero p {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  color: var(--text-2);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  gap: 1.75rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
@media (max-width: 960px) { .hero-stats { justify-content: center; } }
.hstat { display: flex; flex-direction: column; line-height: 1.1; }
.hstat strong {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.02em;
}
.hstat span {
  font-size: .8125rem;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 500;
}

.hero .hero-cta {
  display: flex; gap: .75rem; flex-wrap: wrap;
}
@media (max-width: 960px) { .hero .hero-cta { justify-content: center; } }

/* ============== Creator panel ============== */
.hero-creator {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  box-shadow: var(--shadow-2xl);
  overflow: hidden;
  position: relative;
}
.hero-creator::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,.4), transparent);
}

.creator-tabs {
  display: flex;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.ctab {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 14px 16px;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all var(--t-fast) var(--ease);
  border-bottom: 2px solid transparent;
  position: relative;
}
.ctab:hover { color: var(--text); background: rgba(37,99,235,.03); }
.ctab.active {
  color: var(--primary);
  background: var(--surface);
  border-bottom-color: var(--primary);
}
.ctab svg { flex-shrink: 0; }

.creator-pane { padding: 1.5rem; }
.creator-pane[hidden] { display: none; }

.creator-pane .field { margin-bottom: 1rem; }
.creator-pane .field:last-of-type { margin-bottom: 1.25rem; }
.creator-pane label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .4rem;
  display: block;
}
.creator-pane input, .creator-pane select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: .9375rem;
  background: var(--surface);
  color: var(--text);
  min-height: 42px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.creator-pane input:focus, .creator-pane select:focus {
  outline: 0; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

/* Template chips */
.creator-templates {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
@media (max-width: 480px) { .creator-templates { grid-template-columns: repeat(3, 1fr); } }
.ctpl {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 4px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: .65rem;
  color: var(--muted);
  transition: all var(--t-fast) var(--ease);
  font-weight: 600;
}
.ctpl:hover { border-color: var(--primary); transform: translateY(-1px); }
.ctpl.active {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.ctpl-swatch {
  width: 24px; height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,.1);
}
.ctpl-name { font-size: .65rem; line-height: 1; }

/* Preview */
.creator-preview-wrap {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.creator-preview { display: flex; align-items: center; justify-content: center; }
.creator-preview canvas, .creator-preview svg {
  max-width: 220px;
  max-height: 220px;
  border-radius: 6px;
  background: #fff;
  padding: 8px;
  box-shadow: var(--shadow-md);
}
.creator-preview-bc { width: 100%; }
.creator-preview-bc svg { max-width: 100%; max-height: 130px; padding: 0; }

/* Action buttons */
.creator-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.creator-actions .btn { font-size: .8125rem; min-height: 38px; padding: 8px 14px; }
.creator-actions .btn-ghost {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--primary);
}
.creator-actions .btn-ghost:hover { background: var(--primary-50); }
@media (max-width: 480px) {
  .creator-actions { flex-direction: column; }
  .creator-actions .btn { width: 100%; margin-left: 0 !important; }
}

/* Tighter mobile hero */
@media (max-width: 640px) {
  .hero-stats { gap: 1.25rem; }
  .hstat strong { font-size: 1.375rem; }
  .creator-pane { padding: 1.25rem; }
  .creator-preview canvas, .creator-preview svg { max-width: 180px; max-height: 180px; }
}

/* Hide old quick-gen if any leftovers */
.quick-gen { display: none !important; }

/* ============================================================
   v3.2 — Bulk Generator (premium, SEO-focused)
   ============================================================ */

/* Hero header for bulk page */
.bulk-hero { text-align: center; padding: 1rem 0 2.5rem; }
.bulk-hero h1 {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  letter-spacing: -.025em;
  font-weight: 800;
  margin: .75rem 0 1rem;
  line-height: 1.1;
}
.bulk-hero .lead {
  font-size: 1.0625rem;
  color: var(--text-2);
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.65;
}
.bulk-trust {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}
.trust-item {
  display: flex; flex-direction: column; align-items: center;
  line-height: 1.1;
}
.trust-item strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.trust-item span {
  font-size: .8125rem;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}

/* Bulk app card */
.bulk-app {
  padding: 0 !important;
  overflow: hidden;
  border-radius: 16px !important;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-lg);
}

/* Tabs (QR / Barcode) */
.bulk-tabs {
  display: flex;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.btab {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 16px 20px;
  font-family: inherit;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all var(--t-fast) var(--ease);
  border-bottom: 2px solid transparent;
}
.btab:hover { color: var(--text); background: rgba(37,99,235,.03); }
.btab.active {
  color: var(--primary);
  background: var(--surface);
  border-bottom-color: var(--primary);
}

/* Layout: input left, preview right */
.bulk-grid-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  min-height: 600px;
}
@media (max-width: 960px) {
  .bulk-grid-layout { grid-template-columns: 1fr; }
}

.bulk-input-side {
  padding: 1.75rem;
  border-right: 1px solid var(--border);
  background: var(--surface);
}
@media (max-width: 960px) {
  .bulk-input-side { border-right: 0; border-bottom: 1px solid var(--border); }
}

.bulk-preview-side {
  padding: 1.75rem;
  background: var(--surface-2);
  display: flex; flex-direction: column;
  min-height: 0;
}

/* Step blocks */
.bulk-step { margin-bottom: 1.75rem; }
.bulk-step:last-child { margin-bottom: 0; }
.step-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 1rem;
}
.step-head .step-num {
  width: 28px; height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .8125rem; font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37,99,235,.3);
  margin: 0;
}
.step-head h2 { font-size: 1rem; margin: 0; font-weight: 700; letter-spacing: -.005em; }

/* Textarea area */
.bulk-input-side textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: .85rem;
  background: var(--surface);
  resize: vertical;
  line-height: 1.5;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.bulk-input-side textarea:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.bulk-hint {
  font-size: .75rem;
  color: var(--muted);
  margin-top: 6px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* OR divider */
.bulk-divider {
  text-align: center;
  margin: 1rem 0;
  position: relative;
  color: var(--muted-2);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600;
}
.bulk-divider::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: var(--border);
}
.bulk-divider span {
  background: var(--surface);
  padding: 0 12px;
  position: relative;
}

/* Drop zone */
.bulk-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  padding: 1.25rem;
  border: 2px dashed var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: all var(--t-fast) var(--ease);
}
.bulk-drop:hover, .bulk-drop.is-dragover {
  border-color: var(--primary);
  background: var(--primary-50);
  color: var(--primary);
}
.bulk-drop strong { color: var(--text); font-size: .875rem; margin-top: 4px; }
.bulk-drop small { font-size: .7rem; color: var(--muted); }

/* Style group */
.bulk-style-group label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
  display: block;
}
.bulk-style-group .creator-templates { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bulk-style-group[data-for="bc"] .field { margin-bottom: 0; }

/* Action buttons */
.bulk-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bulk-actions .btn { flex: 1; min-height: 42px; font-size: .875rem; }

/* Progress bar */
.bulk-progress { margin-top: 12px; }
.bulk-progress-bar {
  height: 6px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}
.bulk-progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-700));
  transition: width .25s var(--ease-out);
  border-radius: 999px;
}
.bulk-progress-label {
  font-size: .75rem;
  color: var(--muted);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.bulk-status {
  margin-top: 10px;
  font-size: .8125rem;
  min-height: 1.2em;
}

/* Preview side */
.bulk-preview-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 1.25rem;
}
.bulk-preview-head h2 { font-size: 1.0625rem; margin: 0; font-weight: 700; }
.bulk-preview-count {
  font-size: .8125rem;
  color: var(--muted);
  font-weight: 500;
  background: var(--surface);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* Bulk grid (results) */
.bulk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  flex: 1;
  align-content: start;
}

.bulk-empty {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border-radius: 10px;
  border: 1px dashed var(--border);
  min-height: 280px;
}
.bulk-empty svg { color: var(--muted-2); margin-bottom: 1rem; }
.bulk-empty p { font-size: .9rem; max-width: 280px; }

.bulk-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  display: flex; flex-direction: column;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease);
}
.bulk-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.bulk-item-img {
  aspect-ratio: 1;
  background: #fff;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  margin-bottom: 6px;
  border: 1px solid var(--border);
}
.bulk-item-img img {
  width: 100%; height: 100%; object-fit: contain;
  padding: 4px;
}
.bulk-item-img-error {
  background: #FEF2F2;
  color: #DC2626;
  font-size: 1.5rem;
  border-color: #FECACA;
}
.bulk-item-error { border-color: #FECACA; background: #FFF7F7; }
.bulk-item-error-text { font-size: .65rem; color: #DC2626; margin-top: 2px; line-height: 1.3; }
.bulk-item-label {
  font-size: .7rem;
  color: var(--text-2);
  text-align: center;
  font-family: ui-monospace, 'SF Mono', monospace;
  word-break: break-all;
  line-height: 1.3;
  max-height: 28px;
  overflow: hidden;
}

/* Code blocks for CSV examples */
.code-block {
  background: #0F172A;
  color: #E2E8F0;
  padding: 14px 18px;
  border-radius: 8px;
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: .8125rem;
  line-height: 1.6;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}

/* Mobile: stack everything */
@media (max-width: 640px) {
  .bulk-trust { gap: 1.25rem; }
  .trust-item strong { font-size: 1.25rem; }
  .bulk-input-side, .bulk-preview-side { padding: 1.25rem; }
  .bulk-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .bulk-actions { flex-direction: column; }
  .bulk-actions .btn { width: 100%; }
}

/* ============================================================
   v3.3 — Bulk numbered list preview
   ============================================================ */
.bulk-list-preview {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
  max-height: 580px;
  padding-right: 4px;
  /* nice scrollbar */
}
.bulk-list-preview::-webkit-scrollbar { width: 8px; }
.bulk-list-preview::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.bulk-list-preview::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

.bulk-li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all var(--t-fast) var(--ease);
  animation: liSlideIn .25s var(--ease-out) backwards;
}
.bulk-li:nth-child(1)  { animation-delay: 0ms; }
.bulk-li:nth-child(2)  { animation-delay: 30ms; }
.bulk-li:nth-child(3)  { animation-delay: 60ms; }
.bulk-li:nth-child(4)  { animation-delay: 90ms; }
.bulk-li:nth-child(5)  { animation-delay: 120ms; }
.bulk-li:nth-child(6)  { animation-delay: 150ms; }
.bulk-li:nth-child(7)  { animation-delay: 180ms; }
.bulk-li:nth-child(8)  { animation-delay: 210ms; }
.bulk-li:nth-child(9)  { animation-delay: 240ms; }
.bulk-li:nth-child(10) { animation-delay: 270ms; }
@keyframes liSlideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.bulk-li:hover {
  border-color: var(--primary);
  background: var(--primary-50);
  transform: translateX(2px);
}
.li-num {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  color: #fff;
  font-weight: 700;
  font-size: .75rem;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  box-shadow: 0 2px 4px rgba(37,99,235,.25);
}
.li-icon {
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--muted-2);
  width: 18px;
  text-align: center;
  font-weight: 700;
}
.li-data {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: .8125rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Generate-ready hint inside preview */
.bulk-list-preview::after {
  content: '';
  display: block;
  height: 8px;
}

/* Empty state polish */
.bulk-empty {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4rem 1rem;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border-radius: 12px;
  border: 1px dashed var(--border);
  min-height: 380px;
}
.bulk-empty svg { color: var(--muted-2); margin-bottom: 1rem; }
.bulk-empty p { font-size: .9rem; max-width: 320px; line-height: 1.5; }

@media (max-width: 640px) {
  .bulk-list-preview { max-height: 380px; }
  .li-num { width: 28px; height: 28px; font-size: .7rem; }
  .li-data { font-size: .75rem; }
}

/* ============================================================
   WiFi QR Code Generator — dedicated tool page
   ============================================================ */
.wifi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  align-items: start;
  margin-bottom: 2rem;
}
@media (max-width: 900px) { .wifi-grid { grid-template-columns: 1fr; } }

.wifi-form-panel .form-row { margin-bottom: var(--s-4); }
.wifi-form-panel label {
  display: block; font-weight: 600; font-size: .875rem;
  color: var(--text); margin-bottom: var(--s-2);
}
.wifi-form-panel input[type="text"],
.wifi-form-panel input[type="password"],
.wifi-form-panel input[type="file"],
.wifi-form-panel select {
  width: 100%; padding: .75rem 1rem;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: .9375rem;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.wifi-form-panel input:focus, .wifi-form-panel select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.wifi-form-panel input[type="color"] {
  width: 100%; height: 48px; padding: 4px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface);
}
.form-hint { display: block; font-size: .75rem; color: var(--muted); margin-top: var(--s-1); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.form-checkbox-row { background: var(--surface-2); padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); }
.checkbox-label { display: flex; align-items: center; gap: var(--s-3); cursor: pointer; font-weight: 500; font-size: .9375rem; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 3rem !important; }
.password-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; cursor: pointer; font-size: 1.1rem;
  padding: .35rem .6rem; border-radius: var(--r-sm); color: var(--muted);
}
.password-toggle:hover { background: var(--surface-2); }

/* Phone mockup */
.phone-mockup {
  margin: 0 auto;
  width: 280px; max-width: 100%;
  aspect-ratio: 9 / 19;
  background: linear-gradient(145deg, #1f2937, #0f172a);
  border-radius: 42px;
  padding: 14px;
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,.45),
    0 0 0 2px rgba(255,255,255,.05) inset,
    0 0 0 8px rgba(0,0,0,.4);
  position: relative;
}
.phone-notch {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 22px; background: #000; border-radius: 14px; z-index: 2;
}
.phone-screen {
  width: 100%; height: 100%;
  background: linear-gradient(180deg, #f8fafc 0%, #e0f2fe 100%);
  border-radius: 30px;
  overflow: hidden; position: relative;
  display: flex; flex-direction: column;
}
.phone-status-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 24px 6px; font-size: .75rem; font-weight: 700; color: #0f172a;
  padding-top: 18px;
}
.phone-icons { letter-spacing: 2px; font-size: .65rem; }
.phone-content { flex: 1; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
.phone-app-title { font-size: .75rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .08em; text-align: center; margin: 0; }
.phone-qr-stage {
  background: #fff; border-radius: 16px; padding: 16px;
  display: flex; justify-content: center; align-items: center;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.15);
}
.phone-qr-stage > div, .phone-qr-stage svg { width: 100%; max-width: 200px; height: auto; }
.phone-scan-prompt {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-radius: 14px; padding: .75rem 1rem;
  display: flex; flex-direction: column; gap: 4px; text-align: center;
  border: 1px solid rgba(0,0,0,.06);
}
.phone-scan-prompt strong { font-size: .9rem; color: #0f172a; word-break: break-all; }
.phone-scan-prompt span { font-size: .7rem; color: #64748b; }
.phone-join-btn {
  background: #007AFF; color: #fff; border: 0; border-radius: 999px;
  padding: .55rem 1rem; font-size: .8rem; font-weight: 600;
  margin-top: 4px; cursor: pointer;
}

/* Printable templates grid */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--s-4);
}
.template-card {
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--r);
  padding: var(--s-3); cursor: pointer; text-align: center;
  display: flex; flex-direction: column; gap: var(--s-2);
  transition: all var(--t-fast) var(--ease);
  font-family: inherit; font-size: .8125rem; font-weight: 600; color: var(--text);
}
.template-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.template-card.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
  background: var(--primary-50, #eff6ff);
}
.template-thumb {
  aspect-ratio: 3/4; border-radius: 8px; padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  font-size: .7rem; line-height: 1.2; text-align: center; gap: 6px;
  border: 2px solid currentColor;
}
.tpl-qr-slot {
  width: 60%; aspect-ratio: 1;
  background: repeating-conic-gradient(#000 0 25%, #fff 0 50%) 50% / 12px 12px;
  border-radius: 4px;
}
.tpl-title { font-size: .75rem; font-weight: 800; }
.tpl-sub { font-size: .65rem; opacity: .7; font-weight: 500; }

.tpl-welcome { background: #fff; color: #0f172a; }
.tpl-cafe    { background: #FFF8E7; color: #B45309; }
.tpl-hotel   { background: #0f172a; color: #FFFFFF; }
.tpl-hotel .tpl-qr-slot { background: repeating-conic-gradient(#fff 0 25%, #0f172a 0 50%) 50% / 12px 12px; }
.tpl-office  { background: #F8FAFC; color: #2563EB; }
.tpl-minimal { background: #fff; color: #000; }
.tpl-event   { background: #FDF2F8; color: #DB2777; }

@media (max-width: 640px) {
  .form-grid-2 { grid-template-columns: 1fr; }
  .phone-mockup { width: 240px; }
  .template-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   v3.4 — Barcode page: presets, product mockup, dark mode
   ============================================================ */

/* ---------- Dark mode tokens ---------- */
html[data-theme="dark"] {
  --bg: #0B1120;
  --surface: #111827;
  --surface-2: #1F2937;
  --surface-3: #243042;
  --text: #F1F5F9;
  --text-2: #CBD5E1;
  --muted: #94A3B8;
  --muted-2: #64748B;
  --border: #1F2937;
  --border-strong: #334155;
  --primary-50: rgba(37,99,235,.18);
  --primary-100: rgba(37,99,235,.28);
  --shadow-xs: 0 1px 2px rgba(0,0,0,.3);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.4), 0 2px 4px -2px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.4), 0 4px 6px -4px rgba(0,0,0,.3);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.5), 0 8px 10px -6px rgba(0,0,0,.4);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,.6);
}
html[data-theme="dark"] .site-header {
  background: rgba(17, 24, 39, .85);
  border-bottom-color: rgba(31, 41, 55, .8);
}
html[data-theme="dark"] .main-nav a:hover { background: var(--surface-3); }
html[data-theme="dark"] .main-nav a.cta { background: var(--surface-3); color: var(--text); }
html[data-theme="dark"] .hero { background:
  radial-gradient(ellipse 80% 50% at 50% -10%, rgba(37,99,235,.15), transparent 60%),
  radial-gradient(ellipse 60% 40% at 100% 0%, rgba(16,185,129,.08), transparent 70%),
  linear-gradient(180deg, rgba(37,99,235,.05) 0%, var(--bg) 90%);
}
html[data-theme="dark"] .hero-eyebrow { background: rgba(37,99,235,.18); border-color: rgba(37,99,235,.3); color: #93C5FD; }
html[data-theme="dark"] .hero h1 { color: var(--text); }
html[data-theme="dark"] .hero-creator { background: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .creator-tabs, html[data-theme="dark"] .bulk-tabs, html[data-theme="dark"] .bc-tabs { background: var(--surface-2); border-color: var(--border); }
html[data-theme="dark"] .preview-frame, html[data-theme="dark"] .preview-checker, html[data-theme="dark"] .preview-box, html[data-theme="dark"] .creator-preview canvas, html[data-theme="dark"] .creator-preview svg, html[data-theme="dark"] .quick-gen-preview canvas, html[data-theme="dark"] .quick-gen-preview svg { background: #fff; }
html[data-theme="dark"] .compare-table table { color: var(--text); }
html[data-theme="dark"] .compare-table th { background: var(--surface-2); color: var(--text); }
html[data-theme="dark"] .feature-card, html[data-theme="dark"] .panel, html[data-theme="dark"] .acc, html[data-theme="dark"] .blog-card, html[data-theme="dark"] .faq-item { background: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .feature-icon { background: rgba(37,99,235,.18); color: #93C5FD; }
html[data-theme="dark"] .step-num { background: linear-gradient(135deg, #2563EB, #1E40AF); }
html[data-theme="dark"] code { background: var(--surface-3); color: var(--text); }
html[data-theme="dark"] .post-callout { background: linear-gradient(135deg, rgba(37,99,235,.1), rgba(14,165,233,.08)); border-color: rgba(59,130,246,.25); }
html[data-theme="dark"] .post-callout strong { color: #93C5FD; }
html[data-theme="dark"] .post-cta { box-shadow: 0 16px 32px -12px rgba(0,0,0,.5); }
html[data-theme="dark"] .breadcrumbs li:last-child { color: var(--text-2); }
/* Gold Standard Dark Mode Input Polish */
html[data-theme="dark"] .field input, html[data-theme="dark"] .field select, html[data-theme="dark"] .field textarea, html[data-theme="dark"] .creator-pane input, html[data-theme="dark"] .creator-pane select, html[data-theme="dark"] .quick-gen-form input, html[data-theme="dark"] .bulk-input-side textarea {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.2);
}
html[data-theme="dark"] .field input:focus, html[data-theme="dark"] .field textarea:focus, html[data-theme="dark"] .field select:focus {
  border-color: #93C5FD;
  box-shadow: 0 0 0 4px rgba(147,197,253,.35), inset 0 1px 3px rgba(0,0,0,.2);
}
html[data-theme="dark"] .field input[type=color] { background: var(--surface-2); }
html[data-theme="dark"] .ctab.active, html[data-theme="dark"] .btab.active, html[data-theme="dark"] .bctab.active { background: var(--surface); }
html[data-theme="dark"] .ctpl, html[data-theme="dark"] .preset { background: var(--surface-2); border-color: var(--border-strong); color: var(--text-2); }
html[data-theme="dark"] .ctpl.active, html[data-theme="dark"] .preset.preset-active { background: rgba(37,99,235,.15); }
html[data-theme="dark"] .pmode { color: var(--muted); }
html[data-theme="dark"] .pmode.active { background: var(--surface); }
html[data-theme="dark"] .preview-modes, html[data-theme="dark"] .bc-tabs { background: var(--surface-2); }
html[data-theme="dark"] .bulk-li { background: var(--surface-2); border-color: var(--border-strong); }
html[data-theme="dark"] .bulk-li:hover { background: rgba(37,99,235,.15); }
html[data-theme="dark"] .bulk-empty, html[data-theme="dark"] .bulk-drop { background: var(--surface-2); border-color: var(--border-strong); color: var(--muted); }
html[data-theme="dark"] .bulk-input-side { background: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .bulk-preview-side { background: var(--surface-2); }
html[data-theme="dark"] .bulk-item { background: var(--surface-2); border-color: var(--border-strong); }
html[data-theme="dark"] .bulk-item-img { background: #fff; }
html[data-theme="dark"] .bulk-progress-bar { background: var(--surface-3); }
html[data-theme="dark"] .bulk-divider span { background: var(--surface); }
html[data-theme="dark"] .bulk-preview-count { background: var(--surface-2); border-color: var(--border-strong); color: var(--text-2); }
html[data-theme="dark"] .post-related-grid a { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
html[data-theme="dark"] .blog-card .tag, html[data-theme="dark"] .post-meta .tag { background: rgba(37,99,235,.18); color: #93C5FD; }
html[data-theme="dark"] .result-card {
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border-color: var(--border);
  box-shadow: var(--shadow-lg);
}
html[data-theme="dark"] .skip-link { background: var(--surface-3); color: var(--text); }
html[data-theme="dark"] .scan-stage { background: #000; }
html[data-theme="dark"] .scan-result { background: var(--surface-2); }
html[data-theme="dark"] .scan-data, html[data-theme="dark"] .code-block { background: #050810; color: #E2E8F0; }

/* Theme toggle button — unified SVG icon, 44x44 touch target (WCAG 2.5.5 AA) */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0;
  cursor: pointer;
  color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  margin: 0;
}
.theme-toggle:hover { background: var(--surface-3); border-color: var(--border-strong); color: var(--text); }
.theme-toggle:focus-visible { outline: 0; box-shadow: var(--shadow-glow); border-color: var(--primary); }
.theme-toggle svg { width: 20px; height: 20px; display: block; }
.theme-icon-sun { display: inline-block; }
.theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon { display: inline-block; }
html[data-theme="dark"] .theme-toggle:focus-visible { box-shadow: 0 0 0 4px rgba(147,197,253,.35); }

/* ---------- Preset chips ---------- */
.bc-presets { margin: 1.5rem 0 1.5rem; }
.presets-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: .75rem; padding: 0 .25rem;
}
.presets-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.presets-hint { font-size: .75rem; color: var(--muted-2); }
.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem;
}
.preset {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all var(--t-fast) var(--ease);
  position: relative;
  overflow: hidden;
}
.preset:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.preset.preset-active {
  border-color: var(--primary);
  background: var(--primary-50);
}
.preset-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.preset-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.preset-text strong {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}
.preset-text small {
  font-size: .7rem;
  color: var(--muted);
  font-family: ui-monospace, 'SF Mono', monospace;
}
.preset-tag {
  position: absolute;
  top: 8px; right: 8px;
  background: linear-gradient(135deg, #F59E0B, #DC2626);
  color: #fff;
  font-size: .55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 7px;
  border-radius: 999px;
}
.preset-shopify {
  border-color: rgba(16,185,129,.3);
  background: linear-gradient(135deg, rgba(16,185,129,.04), transparent);
}
.preset-shopify .preset-icon { background: rgba(16,185,129,.15); }

/* ---------- Barcode app layout ---------- */
.bc-app {
  padding: 0 !important;
  overflow: hidden;
  border-radius: 16px !important;
  box-shadow: var(--shadow-lg);
  margin-bottom: 3rem;
}
.bc-grid-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
}
@media (max-width: 960px) { .bc-grid-layout { grid-template-columns: 1fr; } }

.bc-controls {
  padding: 1.75rem;
  border-right: 1px solid var(--border);
  background: var(--surface);
}
@media (max-width: 960px) {
  .bc-controls { border-right: 0; border-bottom: 1px solid var(--border); }
}

.bc-preview-side {
  background: var(--surface-2);
  display: flex; flex-direction: column;
  min-height: 0;
}

/* Tabs (live preview / mockup) */
.bc-tabs {
  display: flex;
  background: var(--surface-3);
  padding: 4px;
  border-radius: 8px;
  margin: 1.5rem 1.5rem 0;
}
.bctab {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 8px 14px;
  font-family: inherit;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  transition: all var(--t-fast) var(--ease);
  min-height: 32px;
}
.bctab:hover { color: var(--text); }
.bctab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-xs); }

.bc-stage { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.bc-stage[hidden] { display: none; }

/* Validation message */
.bc-validation {
  margin-top: 6px;
  font-size: .75rem;
  min-height: 1.2em;
  font-weight: 500;
}
.bc-ok { color: var(--accent-600); }
.bc-err { color: #DC2626; }
.bc-help { color: var(--muted); font-size: .7rem; font-weight: 400; }

/* Range value */
.range-val {
  text-align: right;
  font-size: .7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  font-weight: 500;
}

/* Downloads */
.bc-downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bc-downloads .btn { min-height: 42px; font-size: .8125rem; }
.bc-dl-hint { font-size: .7rem; color: var(--muted); margin-top: 8px; line-height: 1.4; }

/* ---------- Product label mockup ---------- */
.product-mockup {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; justify-content: center;
  padding: 1rem;
}
.product-box {
  width: 100%;
  max-width: 320px;
  background: linear-gradient(155deg, #fff 0%, #f1f5f9 100%);
  border-radius: 16px;
  padding: 22px;
  box-shadow:
    0 24px 48px -12px rgba(15,23,42,.25),
    0 8px 16px -8px rgba(15,23,42,.15),
    inset 0 1px 0 rgba(255,255,255,.6);
  border: 1px solid rgba(0,0,0,.06);
  position: relative;
  overflow: hidden;
}
.product-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.product-header { text-align: center; margin-bottom: 1.25rem; }
.product-brand {
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .15em;
  color: var(--primary);
  margin-bottom: 4px;
}
.product-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: -.01em;
}
.product-image {
  height: 120px;
  background: #F1F5F9;
  border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  color: #94A3B8;
  font-size: .7rem;
  margin-bottom: 1.25rem;
  border: 1px dashed #CBD5E1;
}
.product-bottom {
  display: flex; gap: 12px;
  align-items: flex-end;
}
.product-meta { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.product-price {
  font-size: 1.375rem;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -.02em;
  line-height: 1;
}
.product-sku {
  font-size: .65rem;
  color: #64748B;
  font-family: ui-monospace, 'SF Mono', monospace;
  word-break: break-all;
  line-height: 1.3;
}
.product-barcode {
  flex: 1.4;
  background: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  min-height: 60px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-barcode svg { width: 100% !important; height: auto !important; max-height: 60px; }
.product-barcode-empty { font-size: .65rem; color: #94A3B8; font-style: italic; }
.product-mockup-label {
  font-size: .75rem;
  color: var(--muted);
  font-style: italic;
  margin-top: .75rem;
  text-align: center;
}

@media (max-width: 640px) {
  .presets-grid { grid-template-columns: 1fr; }
  .bc-controls, .bc-stage { padding: 1.25rem; }
  .bc-downloads { grid-template-columns: 1fr; }
  .product-bottom { flex-direction: column; align-items: stretch; }
  .product-meta { align-items: center; text-align: center; }
}

/* WiFi — merged template + phone preview */
.template-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 1rem;
}
.tpl-tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: .5rem .25rem;
  background: var(--surface-2); border: 2px solid transparent;
  border-radius: 10px; cursor: pointer;
  font: inherit; color: var(--text);
  transition: all var(--t-fast) var(--ease);
}
.tpl-tab span { font-size: 1.2rem; line-height: 1; }
.tpl-tab small { font-size: .65rem; font-weight: 600; }
.tpl-tab:hover { background: var(--surface); border-color: var(--border); }
.tpl-tab.is-active {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
@media (max-width: 640px) {
  .template-tabs { grid-template-columns: repeat(4, 1fr); }
}

.preview-stage { min-height: 280px; display: flex; justify-content: center; }
.preview-view { width: 100%; max-width: 320px; }

.tpl-card {
  display: flex; justify-content: center;
}
.tpl-card-inner {
  width: 100%; max-width: 320px;
  border: 3px solid currentColor; border-radius: 18px;
  padding: 1.5rem 1.25rem;
  display: flex; flex-direction: column; gap: 1rem; align-items: center;
  text-align: center;
  box-shadow: 0 20px 50px -25px rgba(0,0,0,.3);
  transition: background var(--t-fast) var(--ease);
}
.tpl-card-title { font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.tpl-card-sub   { font-size: .875rem; opacity: .8; line-height: 1.4; }
.tpl-card-qr {
  background: #fff; padding: 12px; border-radius: 12px;
  border: 2px solid currentColor;
  width: 200px; height: 200px;
  display: flex; align-items: center; justify-content: center;
}
.tpl-card-qr .wifi-qr-host, .tpl-card-qr svg, .tpl-card-qr canvas { width: 100%; height: auto; }
.tpl-card-info {
  font-size: .8125rem; line-height: 1.5; word-break: break-all;
}
.tpl-card-info code { font-family: ui-monospace, monospace; padding: 1px 4px; background: rgba(0,0,0,.06); border-radius: 4px; }
.tpl-card-foot {
  font-size: .7rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase;
}

/* ============================================================
   Phone Number QR — call/SMS mockup + mode toggle
   ============================================================ */
.mode-toggle {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  background: var(--surface-2); border-radius: 10px; padding: 4px;
}
.mode-btn {
  padding: .65rem 1rem; border: 0; background: transparent; cursor: pointer;
  border-radius: 7px; font: inherit; font-weight: 600; color: var(--muted);
  transition: all var(--t-fast) var(--ease);
}
.mode-btn:hover { color: var(--text); }
.mode-btn.is-active {
  background: var(--surface); color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.form-grid-phone {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: var(--s-3);
}
@media (max-width: 480px) {
  .form-grid-phone { grid-template-columns: 1fr; }
}

/* Call screen */
.phone-mockup-call .phone-screen.call-screen {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
}
.call-view, .sms-view {
  padding: 18px 16px 14px; display: flex; flex-direction: column; gap: 10px;
  height: 100%; box-sizing: border-box;
}
.call-view .phone-status-bar, .sms-view .phone-status-bar { color: #fff; padding: 0; }
.incoming-label {
  text-align: center; font-size: .75rem; letter-spacing: .15em;
  text-transform: uppercase; opacity: .65; margin-top: 4px;
}
.caller-avatar {
  margin: 6px auto 0; width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 6px 18px rgba(59,130,246,.4);
}
.caller-name { text-align: center; font-size: 1rem; font-weight: 700; margin-top: 4px; }
.caller-number { text-align: center; font-size: .8125rem; opacity: .8; font-family: ui-monospace, monospace; word-break: break-all; }
.call-view .phone-qr-stage {
  border-radius: 12px; padding: 10px; margin: 4px auto 0;
  width: 140px; height: 140px;
  display: flex; align-items: center; justify-content: center;
}
.call-view .phone-qr-stage .wifi-qr-host { width: 100%; }
.call-view .phone-qr-stage svg, .call-view .phone-qr-stage canvas { width: 100%; height: auto; }
.call-actions {
  margin-top: auto; display: flex; justify-content: space-around; padding-bottom: 6px;
}
.call-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  font-size: 1.2rem; font-weight: 700; color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--t-fast) var(--ease);
}
.call-btn:hover { transform: scale(1.08); }
.call-decline { background: #ef4444; }
.call-accept  { background: #10b981; animation: pulseGreen 1.6s ease-in-out infinite; }
@keyframes pulseGreen {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.55); }
  50%      { box-shadow: 0 0 0 12px rgba(16,185,129,0); }
}

/* SMS screen */
.phone-mockup-call:has(.sms-view:not([hidden])) .phone-screen { background: #f3f4f6; color: #0f172a; }
.sms-view .phone-status-bar { color: #0f172a; }
.sms-header {
  display: grid; grid-template-columns: 32px 1fr 32px;
  align-items: center; padding: 6px 0; font-weight: 600; font-size: .875rem;
  text-align: center; border-bottom: 1px solid #e5e7eb;
}
.sms-back { background: transparent; border: 0; font-size: 1.4rem; color: #2563eb; cursor: pointer; }
.sms-to { font-size: .8rem; padding: 6px 0 8px; border-bottom: 1px solid #e5e7eb; }
.sms-to span { color: #6b7280; }
.sms-to strong { font-family: ui-monospace, monospace; word-break: break-all; }
.sms-view .phone-qr-stage {
  width: 130px; height: 130px;
  margin: 8px auto; padding: 8px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.sms-view .phone-qr-stage svg, .sms-view .phone-qr-stage canvas { width: 100%; height: auto; }
.sms-bubble {
  align-self: flex-end; max-width: 75%;
  background: #2563eb; color: #fff;
  padding: .55rem .8rem; border-radius: 16px 16px 4px 16px;
  font-size: .8125rem; line-height: 1.35;
  word-wrap: break-word;
}
.sms-input-bar {
  margin-top: auto;
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 999px; padding: 6px 6px 6px 14px;
  font-size: .8125rem; color: #9ca3af;
}
.sms-send {
  margin-left: auto; width: 28px; height: 28px;
  border-radius: 50%; border: 0; background: #2563eb; color: #fff;
  font-weight: 700; cursor: pointer;
}

/* ============================================================
   v3.5 — Business Card QR Code page
   ============================================================ */

.bcc-app {
  padding: 0 !important;
  overflow: hidden;
  border-radius: 16px !important;
  box-shadow: var(--shadow-lg);
  margin-bottom: 3rem;
}
.bcc-grid-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
}
@media (max-width: 1000px) { .bcc-grid-layout { grid-template-columns: 1fr; } }

.bcc-controls {
  padding: 1.75rem;
  border-right: 1px solid var(--border);
  background: var(--surface);
}
@media (max-width: 1000px) {
  .bcc-controls { border-right: 0; border-bottom: 1px solid var(--border); }
}

.bcc-preview-side {
  background: linear-gradient(160deg, #F1F5F9 0%, #E2E8F0 100%);
  display: flex; flex-direction: column;
  padding: 1.75rem;
  min-height: 480px;
}
html[data-theme="dark"] .bcc-preview-side {
  background: linear-gradient(160deg, #0B1120 0%, #050810 100%);
}

.bcc-preview-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 1.25rem;
}
.bcc-preview-head h2 { font-size: 1.0625rem; margin: 0; font-weight: 700; }
.bcc-preview-meta {
  font-size: .75rem;
  color: var(--muted);
  font-weight: 500;
  background: var(--surface);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.bcc-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.bcc-mockup-note {
  font-size: .75rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

/* ===== Orientation toggle ===== */
.bcc-orient {
  display: flex; gap: 8px;
}
.orient-btn {
  flex: 1;
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-2);
  transition: all var(--t-fast) var(--ease);
}
.orient-btn:hover { border-color: var(--primary); color: var(--primary); }
.orient-btn.active {
  border-color: var(--primary);
  background: var(--primary-50);
  color: var(--primary);
}

/* ===== Sliders helpers ===== */
.bcc-helper {
  font-size: .65rem;
  color: var(--muted-2);
  font-weight: 400;
  margin-left: 6px;
}

/* ===== Downloads grid ===== */
.bcc-downloads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bcc-downloads .btn {
  position: relative;
  min-height: 52px;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  font-size: .9rem;
}
.print-badge {
  font-size: .55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: rgba(255,255,255,.25);
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1;
}
.bcc-downloads .btn-outline .print-badge { background: var(--surface-3); color: var(--muted); }

/* ===== The actual business card ===== */
.bcard-wrap {
  display: flex; align-items: center; justify-content: center;
  perspective: 1000px;
  padding: 1rem;
}
.bcard {
  background: #fff;
  border-radius: 8px;
  box-shadow:
    0 24px 48px -12px rgba(15,23,42,.30),
    0 12px 24px -8px rgba(15,23,42,.18),
    0 0 0 1px rgba(0,0,0,.04);
  display: flex;
  position: relative;
  overflow: hidden;
  transition: all var(--t) var(--ease);
  font-family: 'Inter', sans-serif;
  color: #0F172A;
}

/* Horizontal: 3.5" × 2" → 350 × 200 */
.bcard-horizontal {
  width: 350px;
  height: 200px;
  flex-direction: row;
}
/* Vertical: 2" × 3.5" → 200 × 350 */
.bcard-vertical {
  width: 230px;
  height: 360px;
  flex-direction: column;
}

/* Subtle accent stripe */
.bcard::before {
  content: '';
  position: absolute;
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  border-radius: 2px;
}
.bcard-horizontal::before {
  top: 0; bottom: 0; left: 0; width: 5px;
}
.bcard-vertical::before {
  top: 0; left: 0; right: 0; height: 5px;
}

.bcard-text {
  flex: 1;
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 16px 18px;
  min-width: 0;
}
.bcard-vertical .bcard-text {
  flex: none;
  padding: 18px 16px 12px;
  text-align: center;
  align-items: center;
  justify-content: flex-start;
}

.bcard-name {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.1;
  margin-bottom: 2px;
  color: #0F172A;
}
.bcard-title {
  font-size: .7rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}
.bcard-divider {
  height: 1px;
  width: 28px;
  background: #CBD5E1;
  margin-bottom: 8px;
}
.bcard-vertical .bcard-divider { margin-left: auto; margin-right: auto; }
.bcard-org {
  font-size: .8rem;
  color: #475569;
  margin-bottom: 8px;
  font-weight: 500;
}
.bcard-meta {
  display: flex; flex-direction: column;
  gap: 3px;
  font-size: .65rem;
  color: #64748B;
  line-height: 1.4;
}
.bcard-vertical .bcard-meta { align-items: center; text-align: center; }
.bcard-row {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: ui-monospace, 'SF Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.bcard-row[hidden] { display: none; }

.bcard-qr {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px;
  background: #fff;
  flex-shrink: 0;
}
.bcard-horizontal .bcard-qr {
  width: 130px;
  border-left: 1px dashed #E2E8F0;
}
.bcard-vertical .bcard-qr {
  flex: 1;
  border-top: 1px dashed #E2E8F0;
  width: 100%;
}
.bcard-qr-render {
  width: 28%;     /* overridden by JS via state.size */
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
}
.bcard-vertical .bcard-qr-render { width: 50%; max-width: 150px; }
.bcard-horizontal .bcard-qr-render { width: 100%; max-width: 100px; }
.bcard-qr-render canvas, .bcard-qr-render svg {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}
.bcard-qr-cap {
  font-size: .55rem;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  margin-top: 8px;
  text-align: center;
}

/* Mobile compact */
@media (max-width: 480px) {
  .bcard-horizontal { width: 280px; height: 160px; }
  .bcard-horizontal .bcard-qr { width: 100px; padding: 8px; }
  .bcard-name { font-size: .9rem; }
  .bcard-vertical { width: 200px; height: 320px; }
  .bcc-downloads { grid-template-columns: 1fr; }
}

/* ============================================================
   v3.6 — Tools hub page + unified card system
   ============================================================ */
.tools-section { margin: 4rem 0; }
.tools-h2 {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.625rem; font-weight: 800; letter-spacing: -.015em;
  color: var(--text); margin-bottom: 8px;
  padding-bottom: 0.5rem;
}
.tools-h2-num {
  font-size: .7rem; font-weight: 800;
  color: var(--primary);
  background: var(--primary-50);
  padding: 5px 10px;
  border-radius: 6px;
  letter-spacing: .05em;
}
.tools-h2-sub { color: var(--muted); font-size: .95rem; margin: 0 0 2rem; font-weight: 500; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.tool-card {
  display: flex; flex-direction: column;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none; color: inherit;
  transition: transform var(--t) var(--ease-out), box-shadow var(--t) var(--ease), border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(37,99,235,.03), transparent);
  pointer-events: none;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15,23,42,.18), 0 4px 8px rgba(15,23,42,.08);
  border-color: var(--primary);
  text-decoration: none;
  color: inherit;
}
.tool-card-primary {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary-50), var(--surface));
  position: relative;
}
.tool-card-primary::before {
  background: linear-gradient(135deg, rgba(37,99,235,.08), transparent);
}
.tool-card-primary::after {
  content: 'Most popular';
  position: absolute; top: 16px; right: 16px;
  background: linear-gradient(135deg, #F59E0B, #DC2626);
  color: #fff; font-size: .5rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 10px; border-radius: 6px;
  box-shadow: 0 4px 12px rgba(220,38,38,.3);
}
.tool-card-primary:hover {
  box-shadow: 0 16px 40px rgba(37,99,235,.16), 0 4px 8px rgba(15,23,42,.08);
}
.tool-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  box-shadow: 0 6px 16px rgba(15,23,42,.14), inset 0 1px 0 rgba(255,255,255,.2);
  flex-shrink: 0;
}
.tool-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: .5rem;
  color: var(--text);
  line-height: 1.3;
}
.tool-card p {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}
.tool-cta {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex; align-items: center; gap: 4px;
  transition: gap var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
  text-decoration: none;
}
.tool-card:hover .tool-cta {
  gap: 8px;
}

@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   v3.7 — Blog dark-mode polish + missing coverage
   ============================================================ */
html[data-theme="dark"] .blog-hero {
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(37,99,235,.15), transparent 70%),
    linear-gradient(180deg, rgba(37,99,235,.05) 0%, var(--bg) 100%);
}
html[data-theme="dark"] .blog-hero h1 { color: var(--text); }
html[data-theme="dark"] .blog-hero p   { color: var(--text-2); }
html[data-theme="dark"] .blog-card     { background: var(--surface); border-color: var(--border-strong); }
html[data-theme="dark"] .blog-card:hover { border-color: var(--primary); }
html[data-theme="dark"] .blog-card h2  { color: var(--text); }
html[data-theme="dark"] .blog-card p   { color: var(--text-2); }
html[data-theme="dark"] .blog-card .tag { background: rgba(37,99,235,.2); color: #93C5FD; }

html[data-theme="dark"] .post-header h1 { color: var(--text); }
html[data-theme="dark"] .post-lede      { color: var(--text-2); }
html[data-theme="dark"] .post-body      { color: var(--text-2); }
html[data-theme="dark"] .post-body h2,
html[data-theme="dark"] .post-body h3,
html[data-theme="dark"] .post-body strong { color: var(--text); }
html[data-theme="dark"] .post-body code { background: var(--surface-3); color: #F1F5F9; }
html[data-theme="dark"] .post-body blockquote { background: rgba(37,99,235,.1); color: var(--text); border-left-color: var(--primary); }
html[data-theme="dark"] .post-callout {
  background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(14,165,233,.08));
  border-color: rgba(59,130,246,.3);
}
html[data-theme="dark"] .post-callout strong { color: #93C5FD; }
html[data-theme="dark"] .post-meta .tag { background: rgba(37,99,235,.2); color: #93C5FD; }
html[data-theme="dark"] .post-related { border-top-color: var(--border-strong); }
html[data-theme="dark"] .post-related h3 { color: var(--muted); }
html[data-theme="dark"] .post-related-grid a {
  background: var(--surface); border-color: var(--border-strong); color: var(--text);
}
html[data-theme="dark"] .post-related-grid a:hover { border-color: var(--primary); color: #93C5FD; }
html[data-theme="dark"] .breadcrumbs li:not(:last-child)::after { color: var(--muted); }
html[data-theme="dark"] .breadcrumbs a { color: var(--muted); }
html[data-theme="dark"] .breadcrumbs a:hover { color: var(--primary); }

/* Tools hub dark mode */
html[data-theme="dark"] .tool-card { background: var(--surface); border-color: var(--border-strong); }
html[data-theme="dark"] .tool-card:hover { border-color: var(--primary); }
html[data-theme="dark"] .tool-card-primary { background: linear-gradient(135deg, rgba(37,99,235,.15), var(--surface)); }
html[data-theme="dark"] .tool-card h3 { color: var(--text); }
html[data-theme="dark"] .tool-card p { color: var(--text-2); }
html[data-theme="dark"] .tools-h2 { color: var(--text); }
html[data-theme="dark"] .tools-h2-num { background: rgba(37,99,235,.2); color: #93C5FD; }

/* Bulk hero dark mode */
html[data-theme="dark"] .bulk-hero h1 { color: var(--text); }
html[data-theme="dark"] .bulk-hero .lead { color: var(--text-2); }

/* Section titles */
html[data-theme="dark"] .section-title { color: var(--text); }
html[data-theme="dark"] .section-sub { color: var(--text-2); }
html[data-theme="dark"] .feature-card h3 { color: var(--text); }
html[data-theme="dark"] .feature-card p { color: var(--text-2); }

/* Hero stats */
html[data-theme="dark"] .hstat strong { color: #93C5FD; }
html[data-theme="dark"] .hstat span { color: var(--muted); }

/* Content page */
html[data-theme="dark"] .content-page h1,
html[data-theme="dark"] .content-page h2 { color: var(--text); }
html[data-theme="dark"] .content-page p,
html[data-theme="dark"] .content-page li { color: var(--text-2); }

/* Step numbers + step text */
html[data-theme="dark"] .step h3 { color: var(--text); }
html[data-theme="dark"] .step p { color: var(--text-2); }

/* FAQ */
html[data-theme="dark"] .faq-item summary { color: var(--text); }
html[data-theme="dark"] .faq-item p { color: var(--text-2); }

/* ============================================================
   v3.8 — Homepage refinement + QR generator polish
   ============================================================ */

/* === Homepage hero refinement === */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 5vw, 4rem); }

.hero-text h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem) !important;
  letter-spacing: -.04em;
  font-weight: 800;
  background: linear-gradient(180deg, var(--text) 0%, #334155 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
html[data-theme="dark"] .hero-text h1 {
  background: linear-gradient(180deg, #fff 0%, #CBD5E1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-eyebrow {
  background: linear-gradient(135deg, var(--primary-50), #DBEAFE);
  border-color: rgba(37,99,235,.2);
}

.hero-stats {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}
html[data-theme="dark"] .hero-stats { border-top-color: var(--border); }

/* Hero creator: more refined */
.hero-creator {
  border-radius: 20px !important;
  box-shadow:
    0 30px 60px -15px rgba(15,23,42,.18),
    0 12px 24px -8px rgba(15,23,42,.10),
    0 0 0 1px var(--border);
}
html[data-theme="dark"] .hero-creator {
  box-shadow:
    0 30px 60px -15px rgba(0,0,0,.5),
    0 12px 24px -8px rgba(0,0,0,.3),
    0 0 0 1px var(--border-strong);
}

/* === QR generator polish === */

/* Refine accordion appearance */
.acc {
  border-radius: 14px;
  transition: all var(--t) var(--ease);
}
.acc summary {
  padding: 1.1rem 1.4rem;
  font-size: .9375rem;
  letter-spacing: -.005em;
}
.acc-num {
  width: 24px; height: 24px;
  font-size: .7rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
}
.acc[open] {
  box-shadow: var(--shadow-md), 0 0 0 1px var(--primary-100);
}
html[data-theme="dark"] .acc[open] {
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(37,99,235,.3);
}

/* Templates bar polish */
.tb-title {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .75rem;
}
.tpl {
  border-radius: 10px;
  padding: 8px 12px;
  font-size: .8125rem;
  border-width: 1px;
}
.tpl:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.tpl-swatch {
  width: 16px; height: 16px;
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}

/* Preview panel */
.preview-panel {
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
}
html[data-theme="dark"] .preview-panel {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
}

.preview-checker {
  background-color: var(--surface);
  padding: 12px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--border);
}

/* Mockup heading polish */
.mockup-heading {
  display: flex; align-items: center; gap: 8px;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--border);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* History panel polish */
.history-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-top: 1rem;
}
html[data-theme="dark"] .history-panel {
  background: var(--surface);
  border-color: var(--border-strong);
}
.history-head h2 {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: -.005em;
}
.history-note {
  font-size: .7rem;
  color: var(--muted);
  font-style: italic;
}

/* Frame downloads */
.preview-panel .download-row .btn {
  font-size: .85rem;
  min-height: 40px;
  font-weight: 600;
}

/* Feature card refinement on home */
.features-grid { gap: 1.25rem; }
.feature-card {
  padding: 1.5rem;
  border-radius: 14px;
  transition: all var(--t) var(--ease);
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.feature-card .feature-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary-50), #DBEAFE);
  font-size: 1.25rem;
}
html[data-theme="dark"] .feature-card .feature-icon {
  background: linear-gradient(135deg, rgba(37,99,235,.2), rgba(37,99,235,.1));
  color: #93C5FD;
}

/* Section spacing tightening */
section { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.section-title { margin-bottom: .5rem; }
.section-sub { margin-bottom: 2.5rem; }

/* CTA polish */
.btn-primary {
  font-weight: 600;
  letter-spacing: -.01em;
}
.hero-cta .btn { padding: 14px 28px; font-size: 1rem; min-height: 50px; border-radius: 10px; }

/* Footer polish */
.site-footer { padding: 4rem 0 2rem; }
.footer-grid { gap: 2.5rem; }
.footer-col h4 { font-size: .8rem; letter-spacing: .1em; }

/* Smoother card transitions everywhere */
.tool-card, .feature-card, .blog-card, .preset {
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease), border-color .15s var(--ease);
}

/* ============================================================
   vCard — iOS Contact App mockup
   ============================================================ */
.phone-mockup-contact .phone-screen.contact-screen {
  background: #F2F2F7;
  color: #0F172A;
}
.contact-status-bar { color: #0F172A; padding-top: 18px; }
.contact-header {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; padding: .5rem 1rem; gap: .5rem;
  font-size: .875rem;
}
.contact-header > span { text-align: center; font-weight: 700; color: #0F172A; }
.contact-cancel, .contact-done {
  background: transparent; border: 0; padding: .25rem .5rem; cursor: pointer;
  font: inherit; font-size: .875rem;
}
.contact-cancel { color: #007AFF; text-align: left; }
.contact-done { color: #007AFF; text-align: right; font-weight: 600; }

.contact-body {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 1.25rem 1rem 1rem;
  background: #F2F2F7;
}
.contact-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #2563EB, #1E40AF);
  color: #fff; font-size: 1.6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px -8px rgba(37,99,235,.5);
}
.contact-name {
  font-size: 1rem; font-weight: 700; margin-top: .75rem;
  text-align: center; word-break: break-word;
}
.contact-title {
  font-size: .8125rem; color: #6B7280; margin-top: 2px; text-align: center;
  word-break: break-word; min-height: 1em;
}

.contact-fields {
  list-style: none; padding: 0; margin: 1rem 0 0;
  width: 100%; background: #FFFFFF; border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.contact-field {
  display: flex; flex-direction: column; gap: 2px;
  padding: .55rem .85rem;
  border-bottom: 1px solid rgba(0,0,0,.06);
  font-size: .8125rem; word-break: break-word;
}
.contact-field:last-child { border-bottom: none; }
.contact-field-label {
  font-size: .65rem; color: #6B7280; font-weight: 600;
  text-transform: lowercase; letter-spacing: .02em;
}
.contact-field-value { color: #0F172A; }
.contact-field-value[href] { color: #007AFF; text-decoration: none; }
.contact-empty {
  padding: 1rem .85rem; color: #9CA3AF; font-size: .8125rem; text-align: center;
  background: transparent;
}

.contact-qr-strip {
  margin-top: 1rem; width: 100%;
  background: #FFFFFF; border-radius: 12px; padding: .85rem;
  text-align: center;
}
.contact-qr-strip .wifi-qr-host {
  width: 130px; height: 130px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.contact-qr-strip .wifi-qr-host svg,
.contact-qr-strip .wifi-qr-host canvas { width: 100%; height: auto; }
.contact-qr-strip small {
  display: block; margin-top: .35rem; font-size: .65rem; color: #6B7280;
}

[data-theme="dark"] .phone-mockup-contact .phone-screen.contact-screen {
  background: #000;
}
[data-theme="dark"] .contact-body { background: #000; }
[data-theme="dark"] .contact-status-bar,
[data-theme="dark"] .contact-name,
[data-theme="dark"] .contact-field-value { color: #F2F2F7; }
[data-theme="dark"] .contact-fields,
[data-theme="dark"] .contact-qr-strip { background: #1C1C1E; }
[data-theme="dark"] .contact-field { border-bottom-color: rgba(255,255,255,.08); }
[data-theme="dark"] .contact-field-label,
[data-theme="dark"] .contact-title { color: #98989D; }

/* ============================================================
   Scanner — Dual-Input Mode (Sprint 4)
   ============================================================ */
.scan-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  margin: var(--s-4) 0 var(--s-6);
}
.scan-mode-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  padding: 1.25rem 1rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  font: inherit; color: var(--text);
  text-align: center;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.scan-mode-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.scan-mode-btn.is-active {
  border-color: var(--primary);
  background: var(--primary-50, #EFF6FF);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.scan-mode-icon { font-size: 2rem; line-height: 1; }
.scan-mode-label { font-size: 1rem; font-weight: 700; }
.scan-mode-sub { font-size: .75rem; color: var(--muted); }

/* When dual mode is active, dim the inactive panel slightly */
.scan-panel-focus { box-shadow: var(--shadow-md); }
.scan-camera-panel:not(.scan-panel-focus):not(:hover),
.scan-result-panel:not(.scan-panel-focus):not(:hover) { opacity: .92; }

@media (max-width: 480px) {
  .scan-dual { grid-template-columns: 1fr; }
  .scan-mode-btn { padding: 1rem; }
}

/* qr-drop-zone host fits inline within the panel */
qr-drop-zone { display: block; margin-bottom: var(--s-2); }

/* ============================================================
   Tool CTA — content page → live tool cross-link
   ============================================================ */
.tool-cta {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--s-4);
  align-items: center;
  margin: var(--s-5) 0;
  padding: var(--s-5) var(--s-5);
  background: linear-gradient(135deg, var(--primary-50, #EFF6FF), var(--surface));
  border: 1px solid var(--primary);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}
.tool-cta-icon {
  width: 64px; height: 64px; border-radius: var(--r);
  background: var(--primary);
  color: #fff; font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
}
.tool-cta-title { margin: 0 0 .25rem; font-size: 1.25rem; font-weight: 700; }
.tool-cta-text  { margin: 0 0 .75rem; color: var(--muted); font-size: .9375rem; }
.tool-cta-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 560px) {
  .tool-cta { grid-template-columns: 1fr; text-align: center; }
  .tool-cta-icon { margin: 0 auto; }
  .tool-cta-actions { justify-content: center; }
}

/* ============================================================
   MOBILE UX OVERHAUL — Sprint 9 (full-site + RTL + i18n-aware)
   All rules below are mobile-first additive fixes that override
   earlier desktop-centric defaults inside breakpoints.
   ============================================================ */

/* ---------- Universal touch + iOS safety ---------- */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }                /* prevent horizontal scroll from rogue elements */
* { -webkit-tap-highlight-color: rgba(37,99,235,.15); }

/* 16px minimum on inputs prevents iOS Safari auto-zoom on focus */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="password"],
  input[type="search"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Universal min tap target = 44×44 (Apple HIG / Google Material) */
@media (max-width: 768px) {
  .btn, button, a.btn, a.tool-cta, .mode-btn, .tpl-tab, .scan-mode-btn,
  .nav-toggle, .password-toggle, .faq-item summary, .template-card {
    min-height: 44px;
  }
}

/* ---------- Hero + headings — clamp() everywhere ---------- */
@media (max-width: 640px) {
  .container { padding-inline: 1rem; }
  main.tool-page h1 {
    font-size: clamp(1.5rem, 5.5vw, 2rem);
    line-height: 1.25;
    word-break: break-word;
  }
  p.lead {
    font-size: 0.9375rem;
    line-height: 1.6;
  }
  .trust-badges {
    gap: 0.375rem;
    font-size: 0.75rem;
    margin: 0.75rem 0 1.25rem;
  }
  .trust-badges li { padding: 0.375rem 0.625rem; }
}

/* ---------- Mobile nav improvements ---------- */
@media (max-width: 768px) {
  /* Show toggle clearly */
  .nav-toggle {
    width: 44px; height: 44px;
    border-radius: var(--r-sm);
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
  }
  /* Nav drops below header with smooth slide */
  .main-nav {
    transform: translateY(-8px);
    transition: opacity .15s ease, transform .15s ease;
    opacity: 0;
    pointer-events: none;
  }
  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  /* Bigger nav items */
  .main-nav a {
    font-size: 1rem;
    padding: 0.875rem 1rem !important;
    border-radius: var(--r-sm);
  }
  .main-nav a[aria-current="page"] {
    background: var(--primary-50, #EFF6FF);
    color: var(--primary);
    font-weight: 600;
  }
  /* Language selector takes full width */
  .lang-switch-host .lang-select {
    width: 100%;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
  }
}

/* Dark-mode nav backdrop */
[data-theme="dark"] .main-nav {
  background: rgba(15, 23, 42, .98) !important;
  border-bottom-color: var(--border);
}

/* ---------- Tool grids: clean stacking ---------- */
@media (max-width: 900px) {
  .wifi-grid,
  .scan-grid {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }
}

/* ---------- Phone mockup: never overflow viewport ---------- */
@media (max-width: 480px) {
  .phone-mockup {
    width: min(280px, 88vw);
    margin-left: auto;
    margin-right: auto;
  }
  .phone-mockup-call .phone-screen,
  .phone-mockup-contact .phone-screen { border-radius: 28px; }
}

/* ---------- Form grids: stack on phones ---------- */
@media (max-width: 560px) {
  .form-grid-2,
  .form-grid-phone {
    grid-template-columns: 1fr;
    gap: var(--s-3);
  }
  .form-row label { margin-bottom: 0.375rem; }
  .form-row input[type="color"] { height: 44px; }
}

/* ---------- Scanner dual-input mode on phones ---------- */
@media (max-width: 480px) {
  .scan-dual {
    grid-template-columns: 1fr;
    gap: var(--s-2);
    margin-bottom: var(--s-4);
  }
  .scan-mode-btn { padding: 0.875rem 1rem; flex-direction: row; gap: 0.75rem; }
  .scan-mode-icon { font-size: 1.5rem; }
  .scan-mode-label { font-size: 0.9375rem; }
  .scan-mode-sub { font-size: 0.6875rem; }
  /* Scanner stage downsize */
  .scan-stage { aspect-ratio: 1 / 1; }
  .scan-frame { inset: 14%; }
}

/* ---------- Template tabs: 4-per-row on phones ---------- */
@media (max-width: 640px) {
  .template-tabs {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
  }
  .tpl-tab small { font-size: 0.625rem; }
}
@media (max-width: 360px) {
  .template-tabs { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Action card actions wrap properly ---------- */
@media (max-width: 480px) {
  .scan-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .scan-actions .btn,
  .scan-actions a.btn {
    flex: 1 1 calc(50% - 0.25rem);
    text-align: center;
    font-size: 0.8125rem;
    padding: 0.625rem 0.75rem;
  }
  .scan-data { font-size: 0.75rem; max-height: 120px; }
}

/* ---------- FAQ accordions: thumb-friendly ---------- */
@media (max-width: 640px) {
  .faq-item {
    padding: 1rem 1rem;
  }
  .faq-item summary h3 { font-size: 0.9375rem; }
  .faq-item p { font-size: 0.875rem; line-height: 1.6; }
  .faq-item summary::after { font-size: 1.25rem; }
}

/* ---------- Compare/data tables: horizontal scroll wrapper ---------- */
.compare-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) {
  .compare-table table { min-width: 480px; font-size: 0.8125rem; }
  .compare-table th, .compare-table td { padding: 0.625rem 0.75rem; }
}

/* ---------- History list: stack on small phones ---------- */
@media (max-width: 480px) {
  .hist-item {
    grid-template-columns: 40px 1fr;
    gap: var(--s-2);
    padding: var(--s-3);
  }
  .hist-thumb { width: 40px; height: 40px; }
  .hist-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: 0.25rem;
  }
}

/* ---------- Tools page grid ---------- */
@media (max-width: 640px) {
  .tools-grid { grid-template-columns: 1fr; gap: var(--s-3); }
  .tool-card { padding: 1rem; }
  .tool-icon { width: 44px; height: 44px; }
}

/* ---------- Features grid (6-card sections) ---------- */
@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; gap: var(--s-3); }
  .feature-card { padding: 1rem; }
  .feature-card h3 { font-size: 1rem; }
  .feature-card p { font-size: 0.875rem; }
}

/* ---------- Download row: wrap properly ---------- */
@media (max-width: 480px) {
  .download-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .download-row .btn { flex: 1 1 calc(50% - 0.25rem); }
}

/* ---------- tool-cta block on phones ---------- */
@media (max-width: 480px) {
  .tool-cta { padding: 1rem; gap: 0.75rem; }
  .tool-cta-icon { width: 48px; height: 48px; font-size: 1.5rem; }
  .tool-cta-title { font-size: 1.0625rem; }
  .tool-cta-text { font-size: 0.875rem; }
  .tool-cta-actions { flex-direction: column; align-items: stretch; }
  .tool-cta-actions .btn { margin: 0 !important; text-align: center; }
}

/* ---------- RTL safety (Arabic / Persian / Urdu) ---------- */
[dir="rtl"] .scan-laser { right: 4%; left: 4%; }
[dir="rtl"] .mode-toggle { direction: rtl; }
[dir="rtl"] .scan-actions { justify-content: flex-end; }
[dir="rtl"] .breadcrumbs ol { flex-direction: row-reverse; justify-content: flex-end; }
[dir="rtl"] .hero-cta { justify-content: flex-end; }
[dir="rtl"] .trust-badges { padding-inline-start: 0; }
[dir="rtl"] .password-toggle { right: auto; left: 8px; }
[dir="rtl"] .password-wrap input { padding-right: 1rem !important; padding-left: 3rem !important; }
[dir="rtl"] .faq-item summary { direction: rtl; }
[dir="rtl"] .faq-item summary::after { margin-right: auto; margin-left: 0; }

/* Mirror directional arrows in CTAs for RTL */
[dir="rtl"] .btn::after,
[dir="rtl"] a.btn-primary,
[dir="rtl"] a.tool-cta { unicode-bidi: plaintext; }

/* RTL font-feature for Arabic — use system Arabic numerals when present */
[dir="rtl"] .scan-data,
[dir="rtl"] .hero-stats strong { unicode-bidi: plaintext; }

/* ---------- Sticky-safe bottom bar (avoids iOS notch overlap) ---------- */
.site-footer { padding-bottom: max(2rem, env(safe-area-inset-bottom, 0)); }

/* ---------- Avoid mobile-only horizontal overflow gotchas ---------- */
.tool-page > .container,
.content-page { overflow-wrap: break-word; word-wrap: break-word; }
pre, code { overflow-x: auto; max-width: 100%; }
img, svg, video, canvas { max-width: 100%; height: auto; }
qr-drop-zone { max-width: 100%; }

/* ---------- Reduce paint complexity on phones ---------- */
@media (max-width: 480px) and (prefers-reduced-motion: no-preference) {
  .scan-laser { animation-duration: 3s; }
}

/* ============================================================
   PASS 2 — Strict Consolidation (2026-05-10)
   Universal touch targets · global focus halo · shadow/radius
   standardization · specific transitions · iconography
   ============================================================ */

/* 1. Universal 44px touch targets (WCAG 2.5.5 AA) ------------ */
.btn-sm,
.tab,
.pmode,
.ctab,
.btab,
.bctab,
.field input[type=text],
.field input[type=url],
.field input[type=email],
.field input[type=tel],
.field input[type=number],
.field input[type=search],
.field input[type=password],
.field input[type=date],
.field input[type=time],
.field textarea,
.field select {
  min-height: 44px;
}
.btn-sm { padding: var(--s-2) var(--s-4); }
.tab { padding: var(--s-2) var(--s-4); }
.pmode { padding: var(--s-2) var(--s-4); }
.field input[type=color] { height: 44px; }
.checkbox-field { min-height: 44px; padding: var(--s-2) 0; }
.checkbox-field input[type=checkbox],
.checkbox-field input[type=radio] { width: 20px; height: 20px; }

/* On the tab strips, padding already exceeds 44px on desktop —
   the min-height above is a safety floor for narrow viewports. */

/* 2. Global :focus-visible halo (low specificity via :where) -- */
:where(a, button, [role="button"], input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
/* Components that already use box-shadow glow keep it — explicit > generic */
.btn:focus-visible,
.theme-toggle:focus-visible,
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: 0;
  box-shadow: var(--shadow-glow);
}
/* Dark mode: brighter halo for contrast on dark surfaces */
html[data-theme="dark"] :where(a, button, [role="button"], input, textarea, select, summary, [tabindex]):focus-visible {
  outline-color: #93C5FD;
}
html[data-theme="dark"] .btn:focus-visible,
html[data-theme="dark"] .theme-toggle:focus-visible,
html[data-theme="dark"] .field input:focus-visible,
html[data-theme="dark"] .field textarea:focus-visible,
html[data-theme="dark"] .field select:focus-visible {
  box-shadow: 0 0 0 4px rgba(147, 197, 253, .35);
}

/* 3. Preview-frame & phone-mockup shadow standardization ------ */
.preview-frame { box-shadow: var(--shadow-lg); }
.phone-mockup .phone-frame,
.phone-mockup-bc .phone-frame { box-shadow: var(--shadow-xl); }
html[data-theme="dark"] .preview-frame { box-shadow: 0 10px 25px -5px rgba(0,0,0,.55), 0 4px 10px -4px rgba(0,0,0,.4); }
html[data-theme="dark"] .phone-mockup .phone-frame,
html[data-theme="dark"] .phone-mockup-bc .phone-frame { box-shadow: 0 20px 40px -8px rgba(0,0,0,.7), 0 8px 16px -8px rgba(0,0,0,.5); }

/* 4. Border-radius token alignment ---------------------------- */
.preset { border-radius: var(--r-lg); }
.preset-icon { border-radius: var(--r); }
.pmode { border-radius: var(--r-sm); }
.preview-frame.frame-rounded { border-radius: var(--r-xl); }
.preview-frame.frame-scanme,
.preview-frame.frame-custom { border-radius: var(--r-lg); }

/* 5. Replace `transition: all` with specific properties ------- */
.tab,
.pmode,
.ctab,
.btab,
.bctab,
.preset,
.preview-frame {
  transition:
    background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    box-shadow var(--t) var(--ease),
    transform var(--t-fast) var(--ease-out);
}

/* 6. Iconography normalization — strict 2px stroke ------------ */
.site-header svg,
.site-footer svg,
.btn svg,
.field svg,
.tool-card svg,
.theme-toggle svg,
.feature-icon svg,
.nav-toggle svg {
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 7. Reduced-motion respect — propagated to Pass 2 additions -- */
@media (prefers-reduced-motion: reduce) {
  .tab,
  .pmode,
  .ctab,
  .btab,
  .bctab,
  .preset,
  .preview-frame,
  .theme-toggle,
  .btn { transition: none !important; }
  .preset:hover,
  .btn:hover { transform: none !important; }
}


/* ============================================================
   DESIGN REFRESH v2 — Sprint 10
   Final, opinionated unification pass. Overrides earlier drift.
   Append-only; mobile-first; respects design tokens.
   ============================================================ */

/* ---------- A11y: bullet-proof skip link (visually hidden, visible on focus) ---------- */
.skip-link {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  top: 0 !important; left: 0 !important;
}
.skip-link:focus,
.skip-link:focus-visible {
  position: fixed !important;
  width: auto !important; height: auto !important;
  padding: 0.75rem 1.25rem !important;
  margin: 0 !important;
  clip: auto !important;
  overflow: visible !important;
  top: 0.5rem !important; left: 0.5rem !important;
  background: var(--text) !important; color: #fff !important;
  border-radius: var(--r-sm) !important;
  font-weight: 600 !important;
  z-index: 9999 !important;
  outline: 3px solid var(--primary) !important;
  outline-offset: 2px !important;
  text-decoration: none !important;
}

/* ---------- Typography hierarchy (calmer, more confident) ---------- */
:root {
  --refresh-font-feature: "cv02", "cv03", "cv04", "cv11";
}
body {
  font-feature-settings: var(--refresh-font-feature);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}
h1, h2, h3, h4 { letter-spacing: -0.02em; }
main h1 { font-weight: 800; }
main h2 { font-weight: 700; }
main h3 { font-weight: 600; }

/* ---------- Site header: cleaner glass on every page ---------- */
.site-header {
  background: rgba(255, 255, 255, 0.88) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
}
[data-theme="dark"] .site-header {
  background: rgba(11, 18, 32, 0.85) !important;
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}
.header-inner {
  padding-block: 0.625rem;
  min-height: 56px;
}

/* ---------- Logo: tighter ---------- */
.logo {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  gap: 0.5rem;
  display: inline-flex;
  align-items: center;
}
.logo-mark {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary, #2563EB), var(--primary-700, #1E40AF));
  flex-shrink: 0;
}

/* ---------- Nav (desktop): subtle pill highlights ---------- */
@media (min-width: 769px) {
  .main-nav a {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    color: var(--text-2, #334155);
    transition: background-color 0.15s ease, color 0.15s ease;
  }
  .main-nav a:hover { background: var(--surface-2, #F8FAFC); color: var(--text); }
  .main-nav a[aria-current="page"] {
    background: var(--primary-50, #EFF6FF);
    color: var(--primary, #2563EB);
    font-weight: 600;
  }
  [data-theme="dark"] .main-nav a:hover { background: rgba(255,255,255,0.05); }
  [data-theme="dark"] .main-nav a[aria-current="page"] {
    background: rgba(37, 99, 235, 0.18); color: #60A5FA;
  }
}

/* ---------- Buttons: a single confident shape ---------- */
.btn {
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: 10px;
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary, #2563EB);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.15), 0 4px 12px -2px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
  background: var(--primary-700, #1E40AF);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2), 0 8px 20px -4px rgba(37, 99, 235, 0.35);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border, #E2E8F0);
}
.btn-outline:hover { background: var(--surface-2, #F8FAFC); border-color: var(--border-strong, #CBD5E1); }
[data-theme="dark"] .btn-outline { color: var(--text); border-color: rgba(255,255,255,0.12); }
[data-theme="dark"] .btn-outline:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.2); }

/* ---------- Cards: cleaner border, softer shadow ---------- */
.panel,
.feature-card,
.tool-card,
.faq-item {
  border-radius: 14px;
}
.feature-card,
.tool-card {
  border: 1px solid var(--border, #E2E8F0);
  background: var(--surface, #FFFFFF);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.feature-card:hover,
.tool-card:hover {
  border-color: var(--primary, #2563EB);
  box-shadow: 0 8px 24px -8px rgba(37, 99, 235, 0.18);
  transform: translateY(-2px);
}
[data-theme="dark"] .feature-card,
[data-theme="dark"] .tool-card,
[data-theme="dark"] .panel,
[data-theme="dark"] .faq-item {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

/* ---------- Lead paragraph: more breathing room ---------- */
.lead {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-2, #334155);
  max-width: 65ch;
}
@media (min-width: 768px) {
  .lead { font-size: 1.125rem; }
}

/* ---------- Trust badges: subtle pills ---------- */
.trust-badges {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  list-style: none; padding: 0;
  margin: 1.25rem 0 2rem;
}
.trust-badges li {
  background: var(--surface-2, #F8FAFC);
  color: var(--text-2, #334155);
  border: 1px solid var(--border, #E2E8F0);
  padding: 0.4375rem 0.875rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
[data-theme="dark"] .trust-badges li {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.08);
  color: var(--text);
}

/* ---------- Form rows + inputs: cleaner ---------- */
.form-row label,
.field label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  display: block;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="url"],
.form-row input[type="password"],
.form-row input[type="number"],
.form-row select,
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field input[type="number"],
.field select {
  border-radius: 10px;
  border: 1px solid var(--border, #E2E8F0);
  background: var(--surface, #FFFFFF);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-row input:focus,
.field input:focus,
.form-row select:focus,
.field select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--primary, #2563EB);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* ---------- Tool grid spacing ---------- */
.wifi-grid,
.scan-grid {
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .wifi-grid, .scan-grid { gap: 2rem; }
}

/* ---------- Phone mockup polish ---------- */
.phone-mockup {
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.08),
    0 20px 50px -20px rgba(15, 23, 42, 0.35),
    inset 0 0 0 2px rgba(255, 255, 255, 0.05),
    inset 0 0 0 8px rgba(0, 0, 0, 0.35);
}

/* ---------- Breadcrumbs: lighter ---------- */
.breadcrumbs {
  padding-block: 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted, #64748B);
}
.breadcrumbs ol {
  display: flex;
  gap: 0.375rem;
  list-style: none;
  padding: 0; margin: 0;
  flex-wrap: wrap;
}
.breadcrumbs li + li::before {
  content: "›";
  margin-right: 0.375rem;
  color: var(--muted-2, #94A3B8);
}
.breadcrumbs a { color: var(--muted, #64748B); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary, #2563EB); }

/* ---------- Footer: tighter ---------- */
.site-footer {
  background: #0F172A;
  color: var(--text);
  padding-block: 3rem 2rem;
  margin-top: 4rem;
}
.site-footer h4 {
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.875rem;
  letter-spacing: 0.01em;
}
.site-footer a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.9;
  opacity: 0.85;
}
.site-footer a:hover { opacity: 1; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.75rem;
  color: var(--text);
  opacity: 0.65;
  text-align: center;
}

/* ---------- Spacing rhythm on tool pages ---------- */
main.tool-page h1 { margin-bottom: 0.75rem; }
main.tool-page > .container > h1 + .lead { margin-top: 0; }

/* ---------- Theme toggle alignment ---------- */
.theme-toggle {
  width: 36px; height: 36px;
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { background: var(--surface-2, #F8FAFC); border-color: var(--border-strong, #CBD5E1); }
[data-theme="dark"] .theme-toggle { border-color: rgba(255,255,255,0.12); }
[data-theme="dark"] .theme-toggle:hover { background: rgba(255,255,255,0.05); }
.theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon { display: inline-block; }
@media (max-width: 768px) {
  .theme-toggle { width: 44px; height: 44px; }
}

/* ---------- Mobile-specific final polish ---------- */
@media (max-width: 640px) {
  /* Tighter container padding */
  .container { padding-inline: 1rem; }

  /* Section spacing */
  main.tool-page { padding-block: 1rem 2rem; }
  .content-section { padding-block: 2rem; }

  /* H1 hierarchy on phones */
  main.tool-page h1 {
    font-size: 1.625rem;
    line-height: 1.25;
    margin-bottom: 0.625rem;
  }

  /* Section titles */
  .section-title { font-size: 1.5rem; line-height: 1.3; }
  .section-sub { font-size: 0.9375rem; }

  /* Less crowded panels */
  .panel { padding: 1.25rem; }

  /* Footer grid stacks */
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .site-footer { padding-block: 2rem 1.5rem; }

  /* Breadcrumbs cleaner */
  .breadcrumbs { padding-block: 0.5rem; font-size: 0.75rem; }
}

/* ---------- RTL refinements ---------- */
[dir="rtl"] .breadcrumbs li + li::before { content: "‹"; margin-right: 0; margin-left: 0.375rem; }
[dir="rtl"] .logo { flex-direction: row-reverse; }
[dir="rtl"] .header-inner { direction: rtl; }

/* ---------- Print: minimal but functional ---------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .theme-toggle, .breadcrumbs,
  .skip-link, .tool-cta, .download-row { display: none !important; }
  body { background: white !important; color: black !important; }
}

/* ---------- Final guard: nothing should overflow viewport ---------- */
html, body { max-width: 100vw; }
.container { box-sizing: border-box; }

/* ============================================================
   Sprint 11 — Mobile sizing fixes from real-device feedback
   ============================================================ */
@media (max-width: 640px) {
  /* Hero CTAs: shorter on phones, side-by-side instead of stretching full-width */
  .hero-cta { gap: 0.5rem; justify-content: flex-start; }
  .hero-cta .btn {
    padding: 0.75rem 1.25rem !important;
    font-size: 0.9375rem !important;
    min-height: 48px !important;
    flex: 1 1 auto;
  }

  /* Hero stats: stack 3 cards vertically without overlap */
  .hero-stats { gap: 0.5rem; flex-wrap: wrap; }
  .hero-stats > * { flex: 1 1 calc(33% - 0.4rem); min-width: 0; }

  /* Hero creator panel: cap height, scroll inside on phones */
  .hero-creator {
    margin-top: 1.25rem;
    border-radius: 14px;
    padding: 1rem !important;
  }
  .creator-tabs .ctab { font-size: 0.875rem; padding: 0.625rem 0.75rem; }
  .creator-pane .field input,
  .creator-pane .field select,
  .creator-pane .field textarea { font-size: 16px !important; }
  .creator-preview { padding: 0.5rem; }
  .creator-preview svg, .creator-preview canvas { max-width: 100%; height: auto; }
  .creator-actions { flex-wrap: wrap; gap: 0.375rem; }
  .creator-actions .btn { flex: 1 1 calc(50% - 0.2rem); }

  /* Templates grid: compact on phones */
  .templates-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.5rem; }
  .template { padding: 0.625rem !important; font-size: 0.8125rem; }

  /* Logo gallery: 4 per row on phones */
  .logo-gallery { grid-template-columns: repeat(4, 1fr) !important; gap: 0.375rem; }
  .logo-tile { min-height: 48px !important; }

  /* QR layout: stack vertically */
  .qr-layout { grid-template-columns: 1fr !important; gap: 1rem; }

  /* Accordion (Content/Design/Logo): tighter padding */
  .acc summary { padding: 0.875rem 1rem; font-size: 0.9375rem; }
  .acc-body { padding: 0.75rem 1rem 1rem !important; }
}

/* Fix iOS Safari sticky header overlap with content */
@media (max-width: 640px) {
  main.tool-page,
  main.content-page { padding-top: 0; }
  .breadcrumbs { margin-top: 0.5rem; }
}
