/**
 * QRGen - Modern & Simplified Design System
 * Clean, lightweight, and ultra-fast (<15KB)
 * Theme: Light Green / Emerald (#10b981 / #059669) on crisp surfaces
 */

:root {
  /* Layout */
  --card-max-width: 780px;
  --content-max-width: 1080px;
  --container-max-width: 1200px;
  --container-padding: clamp(1rem, 3vw, 1.75rem);

  /* Primary Emerald Palette */
  --primary-50: #f0fdf4;
  --primary-100: #dcfce7;
  --primary-200: #bbf7d0;
  --primary-300: #86efac;
  --primary-400: #4ade80;
  --primary-500: #10b981;
  --primary-600: #059669;
  --primary-700: #047857;
  --primary-800: #065f46;
  --primary-900: #064e3b;

  /* Surfaces & Backgrounds */
  --bg-page: #f8faf9;
  --card-bg: #ffffff;
  --card-border: rgba(16, 185, 129, 0.20);
  --card-border-focus: #10b981;
  --border-subtle: #e2e8f0;

  /* Typography Colors (High Contrast WCAG AA/AAA Compliant) */
  --text-main: #0f172a;
  --text-muted: #334155;
  --text-light: #475569;
  --text-emerald: #065f46;

  /* Status / feedback colors */
  --color-weak: #dc2626;
  --color-weak-bg: #fef2f2;
  --color-fair: #d97706;
  --color-fair-bg: #fffbeb;
  --color-good: #0284c7;
  --color-good-bg: #f0f9ff;
  --color-strong: #059669;
  --color-strong-bg: #ecfdf5;

  /* Radiuses */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 1px 3px rgba(0, 0, 0, 0.08);

  /* Fonts with system-ui fallbacks */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(16, 185, 129, 0.15);
  background: rgba(255, 255, 255, 0.96);
}

.header-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-600);
  color: #ffffff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand:hover .brand-icon {
  background: var(--primary-700);
}

.brand-icon.small {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.brand-icon svg {
  width: 18px;
  height: 18px;
}

.brand-logo-custom {
  max-height: 36px;
  max-width: 170px;
  object-fit: contain;
}

.brand-logo-custom.small {
  max-height: 24px;
  max-width: 120px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  color: var(--primary-700);
  background: var(--primary-50);
}

.nav-link.active {
  color: var(--primary-800);
  background: var(--primary-100);
  font-weight: 700;
}

.mobile-nav-toggle {
  display: none;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.45rem;
  cursor: pointer;
  line-height: 0;
}

/* ==========================================================================
   Main Layout & Hero
   ========================================================================== */
.main-wrapper {
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 1rem var(--container-padding) 3rem;
  width: 100%;
}

.hero-section {
  text-align: center;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  font-weight: 800;
  line-height: 1.22;
  color: var(--text-main);
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
}

.hero-title span {
  color: var(--primary-600);
}

.hero-desc {
  font-size: clamp(0.88rem, 1.4vw, 1rem);
  color: var(--text-muted);
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ==========================================================================
   Modern Generator Card Box Design
   ========================================================================== */
.generator-card {
  background: var(--card-bg);
  border: 1.5px solid rgba(16, 185, 129, 0.22);
  border-radius: 20px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 12px 36px -8px rgba(16, 185, 129, 0.09), 0 4px 16px rgba(15, 23, 42, 0.03);
  margin: 0 auto 2.25rem;
  max-width: var(--card-max-width);
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.generator-card:hover {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 16px 40px -8px rgba(16, 185, 129, 0.12), 0 6px 20px rgba(15, 23, 42, 0.04);
}

/* Display & Output Box */
.display-group {
  margin-bottom: 0.85rem;
}

.display-box {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid rgba(16, 185, 129, 0.25);
  border-radius: 14px;
  padding: 0.6rem 0.85rem;
  gap: 0.6rem;
  min-height: 52px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.display-box:focus-within {
  background: #ffffff;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

.action-buttons {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-shrink: 0;
}

.icon-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
  border-color: #94a3b8;
}

.copy-btn {
  width: auto;
  padding: 0 1.1rem;
  height: 38px;
  gap: 0.45rem;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff !important;
  border: 1px solid #047857;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.2);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.copy-btn:hover,
.copy-btn:focus,
.copy-btn:focus-visible,
.copy-btn:active,
.copy-btn.copied {
  background: linear-gradient(135deg, #047857 0%, #064e3b 100%);
  border-color: #064e3b;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.3);
}

.copy-btn span,
.copy-btn svg {
  color: #ffffff !important;
  stroke: #ffffff;
}

/* ==========================================================================
   QR Studio Section Spacing
   ========================================================================== */
.control-header,
.control-header-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.control-title,
.control-sub-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.control-title svg {
  color: var(--primary-600);
}

/* Range Slider */
.range-slider-wrapper {
  margin-bottom: 0.45rem;
}

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: #e2e8f0;
  outline: none;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-600);
  border: 2px solid #ffffff;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  background: var(--primary-700);
}

.range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-600);
  border: 2px solid #ffffff;
  cursor: pointer;
}

/* QR primary action button */
.generate-hero-btn {
  width: 100%;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border: 1px solid #047857;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.28);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  margin-top: 0.9rem;
}

.generate-hero-btn:hover {
  background: #065f46;
  border-color: #065f46;
}

.generate-hero-btn:active {
  background: #064e3b;
}

/* ==========================================================================
   Ad Slots (With Accessible WCAG AA Contrast)
   ========================================================================== */
.ad-slot-container {
  max-width: var(--content-max-width);
  margin: 0.5rem auto 0.75rem;
  padding: 0 var(--container-padding);
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.ad-placeholder-box {
  width: 100%;
  min-height: 60px;
  background: #f8faf9;
  border: 1.5px dashed var(--primary-300);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem 0.55rem;
  position: relative;
  text-align: center;
}

.ad-native-box {
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}

/* Fixed Accessible Contrast for Lighthouse 100% */
.ad-tag {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1e293b;
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
}

.ad-content-inner p {
  font-size: 0.9rem;
  color: var(--primary-900);
  margin-bottom: 0.15rem;
}

.ad-content-inner small {
  font-size: 0.78rem;
  color: var(--text-light);
}

/* ==========================================================================
   SEO Content Area, Feature Cards, Guide Table & FAQ
   ========================================================================== */
.seo-content-area {
  max-width: var(--content-max-width);
  margin: 3rem auto 0;
  width: 100%;
}

.content-block {
  background: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.16);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.content-block h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.content-block h2 svg {
  color: var(--primary-600);
  flex-shrink: 0;
}

.content-block p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* Feature Cards Grid (3 Columns) */
.feature-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.feature-card {
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 1.4rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.02);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-500);
  box-shadow: 0 10px 28px -4px rgba(16, 185, 129, 0.14);
}

.feature-card-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-200) 100%);
  color: var(--primary-800);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.95rem;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.55;
  margin-bottom: 0;
}

/* Popular Use Cases Grid */
.use-case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.use-case-card {
  background: var(--surface);
  border: 1.5px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 1.35rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.use-case-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-500);
  box-shadow: 0 8px 24px -4px rgba(16, 185, 129, 0.12);
}

.use-case-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.6rem;
  color: var(--primary-700);
}

.use-case-header svg {
  flex-shrink: 0;
}

.use-case-header h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.use-case-card p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.55;
  margin-bottom: 0;
}

/* Printing Guidelines Grid */
.guide-callout-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
  margin-top: 1.35rem;
}

.guide-callout {
  background: linear-gradient(135deg, #f8fafc 0%, #f0fdf4 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.18);
  border-radius: 14px;
  padding: 1.25rem;
}

.guide-callout h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--primary-900);
  margin-bottom: 0.4rem;
}

.guide-callout p {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

/* Vector vs Raster Export Format Grid */
.format-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.35rem;
}

.format-card {
  background: var(--surface);
  border: 1.5px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 1.4rem;
  position: relative;
}

.format-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.format-badge-svg {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.format-badge-png {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.format-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.format-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.format-card li {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.15rem;
}

.format-card li::before {
  content: "•";
  color: var(--primary-500);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Security Table Box */
.table-container {
  overflow-x: auto;
  border: 1.5px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  margin: 1.5rem 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.security-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.security-table th {
  background: var(--primary-50);
  color: var(--primary-900);
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--primary-200);
}

.security-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-muted);
}

.security-table tr:last-child td {
  border-bottom: none;
}

.security-table tr:hover td {
  background: #f0fdf4;
}

.badge-status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-warning {
  background: #fef3c7;
  color: #b45309;
}

.badge-success {
  background: #dcfce7;
  color: #15803d;
}

/* Responsive Card Layout for Guide Table on Mobile */
@media (max-width: 720px) {
  .table-container {
    overflow-x: visible;
    border: none;
    background: transparent;
    box-shadow: none;
    margin: 1.25rem 0;
    padding: 0;
  }

  .security-table {
    display: block;
    width: 100%;
  }

  .security-table thead {
    display: none;
  }

  .security-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
  }

  .security-table tr {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1.5px solid rgba(16, 185, 129, 0.2);
    border-radius: 14px;
    padding: 0.85rem 1.05rem;
    gap: 0.45rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .security-table tr:hover {
    border-color: var(--primary-500);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.1);
  }

  .security-table tr:hover td {
    background: transparent;
  }

  .security-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
    font-size: 0.88rem;
    text-align: right;
    gap: 0.75rem;
  }

  .security-table td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .security-table td:first-child {
    padding-top: 0;
    border-bottom: 1.5px solid rgba(16, 185, 129, 0.15);
    padding-bottom: 0.55rem;
    margin-bottom: 0.15rem;
  }

  .security-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: left;
    flex-shrink: 0;
  }

  .security-table td:first-child::before {
    color: var(--primary-900);
    font-weight: 700;
  }

  .security-table td strong {
    color: var(--primary-800);
    font-size: 0.95rem;
  }
}

/* FAQ Accordion Cards */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  border: 1.5px solid rgba(16, 185, 129, 0.2);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.faq-item.active {
  border-color: var(--primary-500);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.12);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.05rem 1.25rem;
  background: #ffffff;
  border: none;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.faq-question:hover {
  background: var(--primary-50);
}

.faq-icon {
  width: 18px;
  height: 18px;
  color: var(--primary-600);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1.25rem 1.1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  background: #ffffff;
}

.faq-item.active .faq-answer {
  display: block;
}

/* ==========================================================================
   Secondary Pages (About, Contact, Privacy, Terms)
   ========================================================================== */
/* ==========================================================================
   Secondary Pages (About, Contact, Privacy, Terms)
   ========================================================================== */
.page-container {
  max-width: 1040px;
  margin: 0 auto;
}

.page-intro-header {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  padding: 0.5rem 0 0.25rem;
}

.page-title {
  font-size: clamp(2.1rem, 4.5vw, 2.85rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.035em;
  line-height: 1.22;
  margin: 0;
  display: inline-block;
  position: relative;
}

.page-title span {
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #22c55e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.page-intro-header::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  border-radius: 99px;
  margin: 1.1rem auto 0;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.content-card,
.rich-text-card {
  background: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 20px;
  padding: clamp(2rem, 4.5vw, 3.25rem);
  box-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.04), 0 2px 10px rgba(16, 185, 129, 0.03);
  margin-bottom: 2.25rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.content-card:hover,
.rich-text-card:hover {
  border-color: rgba(16, 185, 129, 0.32);
  box-shadow: 0 14px 44px -10px rgba(15, 23, 42, 0.06), 0 4px 14px rgba(16, 185, 129, 0.05);
}

.content-card h2,
.content-block h2,
.rich-text-card h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.7rem);
  font-weight: 800;
  color: var(--text-main);
  margin: 2.25rem 0 1rem;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  line-height: 1.3;
}

.content-card h2::before,
.content-block h2::before,
.rich-text-card h2::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 1.15em;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  border-radius: 99px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.content-card h2:first-child,
.content-block h2:first-child,
.rich-text-card h2:first-child {
  margin-top: 0;
}

.content-block h3,
.rich-text-card h3,
.content-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 1.85rem 0 0.8rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1.35;
}

.content-block h3::before,
.rich-text-card h3::before,
.content-card h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1em;
  background: #22c55e;
  border-radius: 99px;
  flex-shrink: 0;
  opacity: 0.85;
}

.content-block h3:first-child,
.rich-text-card h3:first-child,
.content-card h3:first-child {
  margin-top: 0;
}

/* Paragraphs & Typography */
.content-card p,
.rich-text-card p,
.content-block p {
  color: #334155;
  font-size: 1.02rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.content-card > p:first-of-type,
.rich-text-card > p:first-of-type {
  font-size: 1.08rem;
  line-height: 1.82;
  color: #1e293b;
  font-weight: 450;
  margin-bottom: 1.75rem;
}

/* Custom Styled Lists */
.content-card ul,
.rich-text-card ul,
.content-block ul {
  padding-left: 0;
  list-style: none;
  color: #334155;
  margin-bottom: 1.5rem;
}

.content-card ul li,
.rich-text-card ul li,
.content-block ul li {
  position: relative;
  padding-left: 1.75rem;
  font-size: 0.98rem;
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

.content-card ul li::before,
.rich-text-card ul li::before,
.content-block ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 7px;
  height: 7px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.content-card ol,
.rich-text-card ol,
.content-block ol {
  padding-left: 1.5rem;
  color: #334155;
  margin-bottom: 1.5rem;
}

.content-card ol li,
.rich-text-card ol li,
.content-block ol li {
  font-size: 0.98rem;
  line-height: 1.75;
  margin-bottom: 0.75rem;
  padding-left: 0.35rem;
}

.content-card ol li::marker,
.rich-text-card ol li::marker,
.content-block ol li::marker {
  color: var(--primary-600);
  font-weight: 700;
}

/* Inline Elements & Code Badges */
.content-card strong,
.rich-text-card strong,
.content-block strong {
  color: #0f172a;
  font-weight: 700;
}

.content-card code,
.rich-text-card code,
.content-block code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.88em;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.content-card a,
.rich-text-card a,
.content-block a {
  color: var(--primary-600);
  font-weight: 600;
  text-decoration: none;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.06);
  border-bottom: 1.5px solid rgba(16, 185, 129, 0.3);
  transition: all 0.15s ease;
}

.content-card a:hover,
.rich-text-card a:hover,
.content-block a:hover {
  color: var(--primary-700);
  background: rgba(16, 185, 129, 0.12);
  border-bottom-color: var(--primary-600);
}

/* Callout Blockquotes */
.content-card blockquote,
.rich-text-card blockquote,
.content-block blockquote {
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.8) 0%, rgba(236, 253, 245, 0.5) 100%);
  border-left: 4px solid var(--primary-500);
  border-radius: 0 14px 14px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  color: #1e293b;
  font-size: 0.98rem;
  line-height: 1.75;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.05);
}

/* CTA Banner Card */
.cta-banner-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f0fdf4 0%, #e6f7ed 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.28);
  border-radius: 18px;
  padding: 1.75rem 2.25rem;
  gap: 1.5rem;
  margin-bottom: 2.25rem;
  box-shadow: 0 8px 25px -5px rgba(16, 185, 129, 0.1);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cta-banner-card:hover {
  border-color: var(--primary-500);
  box-shadow: 0 12px 32px -6px rgba(16, 185, 129, 0.16);
}

.cta-content h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-900);
  margin-bottom: 0.3rem;
  letter-spacing: -0.015em;
}

.cta-content p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
}

.cta-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.94rem;
  padding: 0.8rem 1.45rem;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.cta-action-btn:hover {
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35);
}

/* ==========================================================================
   Contact Page: Split Support Desk Layout
   ========================================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.5rem;
  align-items: stretch;
}

/* Info Rail (right column on desktop, below form on mobile) */
.contact-rail {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

.rail-card {
  background: #ffffff;
  border: 1.5px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rail-card:hover {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.08);
}

.rail-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.rail-card-title svg {
  color: var(--primary-600);
  flex-shrink: 0;
}

.rail-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.7rem 0;
}

.rail-item + .rail-item {
  border-top: 1px solid #f1f5f9;
}

.rail-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-200) 100%);
  color: var(--primary-800);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rail-item-label {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 0.1rem;
}

.rail-item-value {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary-900);
  text-decoration: none;
  line-height: 1.4;
  word-break: break-word;
}

a.rail-item-value:hover {
  color: var(--primary-600);
  text-decoration: underline;
}

/* Response Promise Accent Card */
.rail-card-accent {
  background: linear-gradient(135deg, #f0fdf4 0%, #e6f7ed 100%);
  border-color: rgba(16, 185, 129, 0.3);
}

.rail-promise {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.rail-promise-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rail-promise h3 {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--primary-900);
  margin-bottom: 0.15rem;
  letter-spacing: -0.01em;
}

.rail-promise p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Quick Help Links */
.rail-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.rail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.rail-link:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

.rail-link svg {
  color: var(--primary-400);
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}

.rail-link:hover svg {
  transform: translateX(3px);
  color: var(--primary-600);
}

/* Message Form Card (primary column) */
.contact-form-card {
  background: #ffffff;
  border: 1.5px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 1.35rem 1.65rem;
  box-shadow: 0 8px 30px -10px rgba(15, 23, 42, 0.04), 0 2px 8px rgba(16, 185, 129, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form-card:hover {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 12px 36px -10px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(16, 185, 129, 0.05);
}

.form-card-header {
  margin-bottom: 1rem;
}

.form-card-header h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.form-card-header h2 svg {
  color: var(--primary-600);
  flex-shrink: 0;
}

.form-card-header p {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0;
}

.form-row-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.15rem;
}

.char-counter {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
  letter-spacing: normal;
}

.char-counter.limit {
  color: var(--color-weak);
}

.contact-form-card .captcha-field {
  width: 76px;
}

/* Confidentiality Note (inside form card) */
.contact-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.95rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(16, 185, 129, 0.35);
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.contact-privacy-note svg {
  color: var(--primary-600);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.contact-privacy-note strong {
  color: var(--primary-900);
}

/* Contact CMS Rich Text Content Section */
.contact-cms-content {
  margin-top: 2rem;
  padding: 1.5rem 1.75rem;
  background: #ffffff;
  border: 1.5px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.contact-cms-content p:last-child {
  margin-bottom: 0;
}

/* Success State Panel */
.contact-success {
  text-align: center;
  padding: 2.25rem 1rem 1.75rem;
}

.success-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.15rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px -6px rgba(5, 150, 105, 0.45);
}

.contact-success h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
}

.contact-success p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 430px;
  margin: 0 auto 1.5rem;
}

.full-width-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.standard-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-label,
.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.required {
  color: #ef4444;
  font-weight: 700;
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--border-subtle);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text-main);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
  background-color: #ffffff;
}

select.form-control,
.select-styled {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 16px 16px;
  padding-right: 2.35rem;
  cursor: pointer;
  line-height: 1.5;
}

select.form-control:hover,
.select-styled:hover {
  border-color: var(--primary-500);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08);
}

select.form-control:focus,
.select-styled:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
  background-color: #ffffff;
}

select.form-control option {
  background-color: #ffffff;
  color: var(--text-main);
  padding: 0.4rem 0.65rem;
  font-size: 0.88rem;
}

select.form-control:disabled {
  background-color: #f8fafc;
  cursor: not-allowed;
  opacity: 0.65;
}

textarea.form-control {
  min-height: 85px;
  resize: vertical;
}

.captcha-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #e6f7ed 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  margin-top: 0.1rem;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.05);
}

.captcha-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.captcha-title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-900);
}

.captcha-title svg {
  color: var(--primary-600);
  width: 14px;
  height: 14px;
}

.captcha-subtext {
  font-size: 0.75rem;
  color: var(--primary-700);
  font-weight: 600;
}

.captcha-body {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.captcha-equation {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 800;
  font-size: 1rem;
  color: var(--primary-900);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.05);
}

.eq-op,
.eq-equals {
  color: var(--primary-600);
}

.captcha-field {
  width: 70px;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  border: 1.5px solid var(--primary-400);
  background: #ffffff;
  color: var(--primary-900);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.captcha-field:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.alert-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.alert-box svg {
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.alert-success {
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  color: #065f46;
}

.alert-danger {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #991b1b;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 14px -2px rgba(16, 185, 129, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  margin-top: 0.25rem;
}

.submit-btn svg {
  width: 16px;
  height: 16px;
}

.submit-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  box-shadow: 0 6px 18px -2px rgba(16, 185, 129, 0.45);
}

.submit-btn:active {
  transform: translateY(0);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid rgba(16, 185, 129, 0.15);
  background: #ffffff;
  padding: 1.5rem 0;
  margin-top: auto;
}

.footer-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.footer-simple-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-simple-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-simple-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.05rem;
}

.footer-divider {
  color: var(--text-light);
}

.footer-copyright {
  font-size: 0.84rem;
  color: var(--text-light);
}

.footer-simple-nav {
  display: flex;
  gap: 1.25rem;
}

.footer-simple-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.footer-simple-nav a:hover {
  color: var(--primary-600);
}

.footer-mobile-copy-wrap {
  display: none;
}

/* Toast Notice */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #064e3b;
  color: #ffffff;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
  z-index: 200;
}

.toast-notice.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ==========================================================================
   Responsive Media Queries (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 880px) {
  .generator-card {
    max-width: 640px;
    padding: 1rem 1.15rem;
  }

  .generator-controls-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .feature-cards-grid,
  .use-case-grid,
  .guide-callout-grid,
  .format-compare-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }



  .cta-banner-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1.25rem;
  }

  /* Contact Page: stack form above info rail */
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-rail {
    order: 0;
    height: auto;
    justify-content: flex-start;
    gap: 1.25rem;
  }
}

@media (max-width: 720px) {
  .mobile-nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
    box-shadow: var(--shadow-card);
    z-index: 105;
  }

  .nav-links.nav-open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 0.6rem 0.85rem;
  }

  .generator-card {
    max-width: 560px;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
  }

  /* Footer Mobile */
  .footer-simple-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.85rem;
  }

  .footer-simple-left {
    justify-content: center;
  }

  .footer-desktop-copy,
  .footer-divider {
    display: none;
  }

  .footer-simple-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
  }

  .footer-mobile-copy-wrap {
    display: block;
  }
}

@media (max-width: 600px) {
  .generator-card {
    max-width: 100%;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    margin-bottom: 1rem;
  }

  .display-group {
    margin-bottom: 0.6rem;
  }

  .display-box {
    flex-direction: column;
    align-items: stretch;
    padding: 0.45rem 0.55rem;
    gap: 0.35rem;
    min-height: 40px;
  }

  .action-buttons {
    width: 100%;
    gap: 0.35rem;
  }

  .action-buttons .copy-btn {
    flex: 1;
    justify-content: center;
    height: 34px;
    font-size: 0.8rem;
  }

  .control-sub-title {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
  }

  .generate-hero-btn {
    height: 40px;
    font-size: 0.88rem;
    margin-top: 0.6rem;
  }

  /* Contact Page Mobile */
  .contact-form-card {
    padding: 1.25rem 1.15rem;
    border-radius: 16px;
  }

  .rail-card {
    padding: 1.15rem 1.2rem;
  }

  .contact-success {
    padding: 1.5rem 0.25rem 1rem;
  }

  .form-row-dual {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 420px) {
  .generator-card {
    padding: 0.55rem 0.65rem;
  }
}

/* Global Keyboard Focus Accessibility (:focus-visible) */
:focus-visible {
  outline: 3px solid #059669 !important;
  outline-offset: 2px !important;
  border-radius: 4px;
}

/* ==========================================================================
   QRGen Studio: Create plus Scan (qrcode-monkey style, green theme)
   ========================================================================== */
.qr-studio-card {
  max-width: 1020px;
  padding: 0.85rem 1rem 1rem;
  scroll-margin-top: 80px;
}

.qr-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.25rem;
  margin-bottom: 0.75rem;
}

.qr-mode-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  border-radius: 9px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.qr-mode-tab svg { flex-shrink: 0; }

.qr-mode-tab.active {
  background: #ffffff;
  color: var(--primary-800);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.qr-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 265px);
  gap: 1rem;
  align-items: start;
}

.qr-block {
  padding: 0.4rem 0;
  border-top: 1px solid #e2e8f0;
}

.qr-block:first-child {
  border-top: none;
  padding-top: 0;
}

.qr-block-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.65rem;
  margin: 0 0 0.35rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.qr-block-header:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.qr-block-header:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 1px;
}

.qr-block-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex: 1;
  margin-right: 0.5rem;
}

.qr-block-chevron {
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s ease;
  flex-shrink: 0;
}

.qr-block-header:hover .qr-block-chevron {
  color: var(--primary-600);
}

.qr-block-collapsible.collapsed .qr-block-chevron {
  transform: rotate(-90deg);
}

.qr-block-body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  opacity: 1;
}

.qr-block-body-inner {
  overflow: hidden;
  padding: 0.15rem 0.15rem 0.35rem;
}

.qr-block-collapsible:not(.collapsed) .qr-block-body-inner {
  overflow: visible;
}

.qr-block-collapsible.collapsed .qr-block-body {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}

.qr-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 0.4rem;
}

.qr-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.45rem 0.3rem;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.qr-type-btn svg { color: var(--primary-600); width: 16px; height: 16px; }

.qr-type-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.qr-type-btn.active {
  background: #f0fdf4;
  border-color: var(--primary-500);
  color: var(--primary-900);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}

.qr-char-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-light);
}

.qr-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.qr-form { display: none; }
.qr-form-active { display: block; animation: qrFade 0.18s ease; }
@keyframes qrFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.qr-payload-details {
  margin-top: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.qr-payload-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--primary-700);
}

.qr-payload-text {
  display: block;
  margin-top: 0.3rem;
  padding: 0.45rem 0.6rem;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  word-break: break-all;
  white-space: pre-wrap;
  max-height: 72px;
  overflow: auto;
}

.qr-color-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed var(--border-subtle, #cbd5e1);
}

.qr-color-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.qr-color-section-head {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.qr-color-options-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.qr-radio-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.qr-radio-label,
.qr-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-body, #334155);
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}

.qr-radio-label:hover,
.qr-checkbox-label:hover {
  color: var(--text-heading, #0f172a);
}

.qr-radio-label input[type="radio"],
.qr-checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--border-subtle, #cbd5e1);
  background-color: var(--bg-surface, #ffffff);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

/* Custom Radio Circle */
.qr-radio-label input[type="radio"] {
  border-radius: 50%;
}

.qr-radio-label input[type="radio"]::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.15s ease-in-out;
  background-color: #ffffff;
}

.qr-radio-label input[type="radio"]:checked {
  border-color: var(--brand-500, #10b981);
  background-color: var(--brand-500, #10b981);
}

.qr-radio-label input[type="radio"]:checked::before {
  transform: scale(1);
}

/* Custom Checkbox Rounded Square */
.qr-checkbox-label input[type="checkbox"] {
  border-radius: 4px;
}

.qr-checkbox-label input[type="checkbox"]::before {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg) scale(0) translate(1px, -1px);
  transition: transform 0.15s ease-in-out;
}

.qr-checkbox-label input[type="checkbox"]:checked {
  border-color: var(--brand-500, #10b981);
  background-color: var(--brand-500, #10b981);
}

.qr-checkbox-label input[type="checkbox"]:checked::before {
  transform: rotate(-45deg) scale(1) translate(1px, -1px);
}

/* Hover and Focus States */
.qr-radio-label input[type="radio"]:hover,
.qr-checkbox-label input[type="checkbox"]:hover {
  border-color: var(--brand-500, #10b981);
}

.qr-radio-label input[type="radio"]:focus-visible,
.qr-checkbox-label input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--brand-500, #10b981);
  outline-offset: 2px;
}

.qr-radio-label span,
.qr-checkbox-label span {
  color: var(--text-body, #334155);
}

/* Color Box Container */
.qr-color-box {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.qr-eye-box {
  border-left: 3.5px solid var(--brand-500, #10b981);
  background: var(--bg-surface-subtle, rgba(248, 250, 252, 0.75));
}

/* Unified Color Swatch + Hex Input Row */
.qr-color-row {
  display: flex;
  align-items: center;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: 8px;
  padding: 3px 6px;
  height: 38px;
  width: 100%;
  max-width: 220px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.qr-bg-color-row {
  max-width: 220px;
}

.qr-color-row:focus-within {
  border-color: var(--brand-500, #10b981);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.qr-color-row input[type="color"] {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.qr-color-row .form-control {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 30px !important;
  padding: 0 8px !important;
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-body, #334155);
}

/* Gradients Layout */
.qr-gradient-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.65rem;
  align-items: flex-end;
}

.qr-gradient-grid .qr-color-row {
  max-width: 100%;
}

.qr-color-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.qr-sub-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #64748b);
}

.qr-sub-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-heading, #1e293b);
  margin-bottom: 0.5rem;
}

/* Eye Controls Layout */
.qr-eye-controls-row {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.qr-eye-controls-row .qr-color-field {
  flex: 1 1 130px;
}

.qr-eye-controls-row .qr-color-row {
  max-width: 100%;
}

.qr-eye-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 38px;
}

.qr-eye-actions .btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border-subtle, #cbd5e1);
  background: var(--bg-surface, #ffffff);
  color: var(--text-body, #334155);
  transition: all 0.15s ease;
}

.qr-eye-actions .btn-icon:hover {
  border-color: var(--brand-500, #10b981);
  color: var(--brand-600, #059669);
  background: var(--bg-surface-subtle, #f8fafc);
}

.qr-eye-actions .btn-sm {
  height: 38px;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0 0.75rem;
  white-space: nowrap;
  border-radius: 8px;
  border: 1px solid var(--border-subtle, #cbd5e1);
  background: var(--bg-surface, #ffffff);
  color: var(--text-body, #334155);
  transition: all 0.15s ease;
}

.qr-eye-actions .btn-sm:hover {
  border-color: var(--brand-500, #10b981);
  color: var(--brand-600, #059669);
  background: var(--bg-surface-subtle, #f8fafc);
}

.qr-design-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.qr-color-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.qr-color-row input[type="color"] {
  width: 38px;
  height: 34px;
  padding: 2px;
  border: 1.5px solid var(--border-subtle);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.qr-color-row .form-control {
  font-family: var(--font-mono);
  text-transform: lowercase;
  height: 34px;
}

.qr-slider-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.qr-logo-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  align-items: flex-end;
}

.qr-logo-subrow {
  margin-top: 0.65rem;
  display: flex;
  align-items: center;
}

.qr-logo-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.qr-logo-controls .form-control { flex: 1; }

.form-hint-inline {
  font-weight: 500;
  color: var(--text-light);
  font-size: 0.72rem;
}

/* Preview column */
.qr-preview-col { min-width: 0; }
.qr-controls-col { min-width: 0; }

.qr-preview-sticky {
  position: sticky;
  top: 76px;
  background: #f8fafc;
  border: 1.5px solid rgba(16, 185, 129, 0.22);
  border-radius: 12px;
  padding: 0.55rem;
}

.qr-preview-frame {
  background: #ffffff;
  background-image: linear-gradient(45deg, #f1f5f9 25%, transparent 25%), linear-gradient(-45deg, #f1f5f9 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f1f5f9 75%), linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  min-height: 165px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem;
  overflow: hidden;
}

#qr-preview { display: flex; align-items: center; justify-content: center; max-width: 100%; width: 100%; }
#qr-preview canvas, #qr-preview svg, #qr-preview img { width: min(100%, 200px); height: auto; aspect-ratio: 1 / 1; max-width: 100%; max-height: 200px; margin: 0 auto; border-radius: 6px; }

.qr-preview-empty { text-align: center; color: var(--text-light); font-size: 0.82rem; }

.qr-lib-error { color: #b91c1c; font-size: 0.82rem; text-align: center; }

.qr-preview-meta {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin: 0.4rem 0 0.35rem 0;
}

.qr-meta-pill {
  font-size: 0.65rem;
  font-weight: 700;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
}

.qr-export-grid { display: flex; flex-direction: column; gap: 0.32rem; }

.qr-dl-primary { margin-top: 0; height: 36px; font-size: 0.84rem; }

.qr-export-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.32rem; }

.qr-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.qr-btn-secondary:hover { border-color: var(--primary-500); background: #f0fdf4; }

.qr-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  background: transparent;
  border: 1px dashed #cbd5e1;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.32rem 0.45rem;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.qr-btn-ghost:hover { border-color: var(--primary-500); color: var(--primary-700); }

.qr-btn-secondary.is-disabled, .qr-btn-ghost.is-disabled, .generate-hero-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.qr-privacy-note {
  display: flex;
  gap: 0.35rem;
  align-items: flex-start;
  font-size: 0.67rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.28;
}

.qr-privacy-note svg { color: var(--primary-600); flex-shrink: 0; margin-top: 0.05rem; }

/* Compact studio density: fit first viewport */
.qr-studio-card .form-group { gap: 0.2rem; }
.qr-studio-card .form-control { padding: 0.45rem 0.65rem; font-size: 0.82rem; line-height: 1.45; }
.qr-studio-card select.form-control { padding-right: 2.2rem; }
.qr-studio-card textarea.form-control { min-height: 64px; }
.qr-studio-card input[type="file"].form-control { padding: 0.25rem 0.4rem; font-size: 0.78rem; height: 34px; display: flex; align-items: center; }
.qr-studio-card input[type="file"].form-control::file-selector-button { border: 1px solid var(--border-subtle); background: #f1f5f9; border-radius: 6px; padding: 0.2rem 0.5rem; font-size: 0.76rem; font-weight: 600; color: var(--text-main); cursor: pointer; margin-right: 0.5rem; transition: background-color 0.15s ease; }
.qr-studio-card input[type="file"].form-control::file-selector-button:hover { background: #e2e8f0; }
.qr-studio-card .form-row-dual { gap: 0.6rem; }
.qr-studio-card .form-hint, .qr-studio-card .form-hint-inline { font-size: 0.72rem; }
.qr-studio-card .form-hint { margin-top: 0.15rem; color: var(--text-light); }
.qr-char-count { font-size: 0.7rem; }
.qr-studio-card .range-slider { height: 6px; margin: 0.35rem 0; }
.qr-studio-card .qr-slider-group .qr-label { margin-bottom: 0.1rem; }

/* Scanner */
.qr-scan-wrap { max-width: 480px; margin: 0 auto; }

.qr-scan-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 0.3rem;
  margin-bottom: 1rem;
}

.qr-scan-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.55rem;
  border-radius: 9px;
  cursor: pointer;
}

.qr-scan-mode.active { background: #fff; color: var(--primary-800); box-shadow: 0 2px 6px rgba(15,23,42,0.08); }

.qr-scan-pane { display: none; }
.qr-scan-pane-active { display: block; }

.qr-camera-frame {
  position: relative;
  background: #0f172a;
  border-radius: 14px;
  overflow: hidden;
  min-height: 220px;
  aspect-ratio: 4 / 3;
  max-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

#qr-video { width: 100%; height: 100%; max-height: 320px; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #0f172a; }
#qr-scan-canvas { max-width: 100%; }

.qr-camera-idle { text-align: center; color: #cbd5e1; padding: 1.75rem 1.25rem; }
.qr-camera-idle svg { color: var(--primary-400); margin-bottom: 0.75rem; }
.qr-camera-idle p { font-size: 0.9rem; }

.qr-viewfinder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  max-width: 72%;
  max-height: 72%;
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.45), inset 0 0 15px rgba(16, 185, 129, 0.15);
  pointer-events: none;
  z-index: 10;
}

.qr-vf-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: #10b981;
  border-style: solid;
  border-width: 0;
  filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.6));
}

.qr-vf-tl {
  top: 0;
  left: 0;
  border-top-width: 3.5px;
  border-left-width: 3.5px;
  border-top-left-radius: 12px;
}

.qr-vf-tr {
  top: 0;
  right: 0;
  border-top-width: 3.5px;
  border-right-width: 3.5px;
  border-top-right-radius: 12px;
}

.qr-vf-bl {
  bottom: 0;
  left: 0;
  border-bottom-width: 3.5px;
  border-left-width: 3.5px;
  border-bottom-left-radius: 12px;
}

.qr-vf-br {
  bottom: 0;
  right: 0;
  border-bottom-width: 3.5px;
  border-right-width: 3.5px;
  border-bottom-right-radius: 12px;
}

.qr-viewfinder.qr-vf-detected {
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.45), inset 0 0 25px rgba(34, 197, 94, 0.4);
  transition: box-shadow 0.2s ease;
}
.qr-viewfinder.qr-vf-detected .qr-vf-corner {
  border-color: #22c55e;
  filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.9));
  transition: border-color 0.2s ease, filter 0.2s ease;
}

.qr-scan-line {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 6%;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #34d399 30%, #10b981 70%, transparent);
  box-shadow: 0 0 14px #34d399, 0 0 4px #10b981;
  animation: qrScanMove 2.2s ease-in-out infinite alternate;
}

@keyframes qrScanMove { from { top: 6%; } to { top: 88%; } }

.qr-scan-actions { display: flex; gap: 0.5rem; margin-top: 0.85rem; flex-wrap: wrap; }
.qr-scan-actions .generate-hero-btn { margin-top: 0; flex: 1 1 200px; }
.qr-scan-actions .qr-btn-secondary { flex: 1 1 160px; }

.qr-scan-hint { font-size: 0.78rem; color: var(--text-light); margin-top: 0.5rem; text-align: center; }

.qr-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  border: 2px dashed var(--primary-300);
  border-radius: 14px;
  background: #f0fdf4;
  padding: 1.5rem 1.25rem;
  text-align: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.qr-dropzone:hover, .qr-dropzone.dragging { border-color: var(--primary-600); background: #ecfdf5; }
.qr-dropzone svg { color: var(--primary-600); }
.qr-dropzone p { font-size: 0.92rem; }
.qr-dropzone small { font-size: 0.78rem; color: var(--text-light); }

.qr-upload-preview { margin-top: 0.85rem; text-align: center; }
.qr-upload-preview img { max-width: 100%; max-height: 260px; border-radius: 12px; border: 1px solid var(--border-subtle); }

.qr-scan-result {
  margin-top: 1rem;
  background: #f0fdf4;
  border: 1.5px solid var(--primary-300);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}

.qr-scan-result-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }

.qr-result-badge { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--primary-800); }
.qr-result-type { font-size: 0.72rem; font-weight: 800; background: var(--primary-600); color: #fff; padding: 0.2rem 0.6rem; border-radius: 9999px; }

.qr-scan-text {
  display: block;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  word-break: break-all;
  white-space: pre-wrap;
  max-height: 160px;
  overflow: auto;
}

.qr-scan-result-actions { display: flex; gap: 0.5rem; margin-top: 0.7rem; flex-wrap: wrap; }
.qr-scan-result-actions .qr-btn-secondary, .qr-scan-result-actions .qr-btn-ghost { flex: 1 1 140px; }

.qr-scan-error {
  margin-top: 0.85rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
}

@media (max-width: 960px) {
  .qr-studio-card { max-width: 720px; }
  .qr-studio-grid { grid-template-columns: 1fr; }
  /* Show QR preview on top on tablet + mobile */
  .qr-preview-col { order: -1; }
  .qr-controls-col { order: 0; }
  .qr-preview-sticky { position: static; }
  .qr-type-grid { grid-template-columns: repeat(4, 1fr); }
  .qr-camera-frame { min-height: 200px; max-height: 280px; }
  #qr-video { max-height: 280px; }
}

@media (max-width: 600px) {
  .qr-studio-card { padding: 0.85rem; }
  .qr-type-grid { grid-template-columns: repeat(3, 1fr); }
  .qr-design-grid, .qr-slider-row { grid-template-columns: 1fr; }
  .qr-logo-row { flex-direction: column; align-items: stretch; }
  /* Preview stays on top, compact on phones */
  .qr-preview-sticky { padding: 0.6rem; }
  .qr-preview-frame { min-height: 180px; padding: 0.5rem; }
  #qr-preview canvas, #qr-preview svg, #qr-preview img { width: min(100%, 220px); max-height: 220px; }
  .qr-mode-tabs { gap: 0.3rem; padding: 0.2rem; }
  .qr-mode-tab { font-size: 0.8rem; padding: 0.5rem 0.4rem; gap: 0.35rem; min-width: 0; }
  .qr-mode-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Scanner mobile fixes: no overflow, full-width touch targets */
  .qr-scan-wrap { max-width: 100%; }
  .qr-scan-modes { gap: 0.3rem; padding: 0.2rem; }
  .qr-scan-mode { font-size: 0.8rem; padding: 0.5rem 0.4rem; min-width: 0; }
  .qr-camera-frame { min-height: 200px; aspect-ratio: 4 / 3; border-radius: 12px; max-height: 280px; }
  #qr-video { aspect-ratio: 4 / 3; max-height: 280px; }
  .qr-camera-idle { padding: 1.5rem 1rem; }
  .qr-camera-idle p { font-size: 0.85rem; }
  .qr-scan-actions { flex-direction: column; align-items: stretch; }
  .qr-scan-actions .generate-hero-btn, .qr-scan-actions .qr-btn-secondary { width: 100%; min-height: 44px; flex: none; height: auto; padding: 0.7rem 0.6rem; }
  .qr-dropzone { padding: 1.5rem 1rem; gap: 0.4rem; }
  .qr-dropzone p { font-size: 0.85rem; }
  .qr-scan-result { padding: 0.85rem; }
  .qr-scan-result-head { flex-wrap: wrap; }
  .qr-scan-result-actions { display: grid; grid-template-columns: 1fr; gap: 0.4rem; }
  .qr-scan-result-actions .qr-btn-secondary, .qr-scan-result-actions .qr-btn-ghost { width: 100%; min-height: 42px; }
  .qr-scan-text { font-size: 0.78rem; max-height: 120px; }
  .qr-export-row { gap: 0.35rem; }
  .qr-btn-secondary, .qr-btn-ghost { min-height: 42px; }
}

