/**
 * QRFixer - Master Stylesheet
 * Universal Architecture, High Contrast WCAG AA, Zero CLS, Mobile 360px Safe.
 * Features exact .nw-* classes for More Tools Hub, Star Rating, and Justified Content.
 */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #334155;
  --text-subtle: #475569;
  --border-color: #cbd5e1;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 14px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

[data-theme="dark"] {
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: #1e293b;
  --bg-body: #0b0f17;
  --bg-card: #151d2a;
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-subtle: #94a3b8;
  --border-color: #334155;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
}

html {
  font-size: 16px;
  overflow-y: scroll; 
  scrollbar-gutter: stable;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: clip; 
  padding-top: var(--sat);
  padding-bottom: var(--sab);
  padding-left: var(--sal);
  padding-right: var(--sar);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Master Semantic Landmark Wrap */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  flex: 1;
}

/* Header & Navigation Bar - Rock-Solid Lock */
header {
  position: sticky;
  top: 0;
  z-index: 100000;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  height: 64px;
  max-height: 64px;
}

.nav-wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
  max-height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

@media (max-width: 990px) {
  .nav-wrap {
    display: flex;
    justify-content: space-between;
  }
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 18px;
  list-style: none;
  align-items: center;
  justify-content: center;
  margin: 0;
}

/* Mobile Navigation Button & Floating Card Menu */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}

.nav-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.mobile-menu {
  display: none;
  position: absolute;
  left: 16px;
  right: 16px;
  top: calc(100% + 8px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
  padding: 8px 16px;
  z-index: 999999;
}

[data-theme="dark"] .mobile-menu {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.mobile-menu.open {
  display: flex !important;
  flex-direction: column;
}

.mobile-menu a {
  padding: 11px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  transition: color 0.15s ease;
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--primary);
}

@media (max-width: 990px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.header-right-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  height: 64px;
  min-height: 64px;
  flex-shrink: 0;
}

/* ===================================================
   EXACT MORE TOOLS HUB INTEGRATION (.nw-* classes)
=================================================== */
[data-network="menu"],
.nw-menu {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  position: relative !important;
  z-index: 999999 !important;
  height: 36px !important;
  width: 114px !important;
  min-width: 114px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}

.nw-menu-btn {
  height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 0 14px !important;
  border-radius: 9999px !important;
  border: 1px solid var(--border-color) !important;
  background: var(--bg-card) !important;
  color: var(--text-main) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  margin: 0 !important;
  cursor: pointer !important;
  transition: color 0.15s ease, border-color 0.15s ease !important;
  white-space: nowrap !important;
}

.nw-menu-btn:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

/* More Tools Dropdown: Clean, Portrait Card */
.nw-pop {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
  width: 300px !important;
  min-width: 300px !important;
  max-width: 300px !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 16px !important;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.16) !important;
  padding: 16px !important;
  z-index: 9999999 !important;
  box-sizing: border-box !important;
}

[data-theme="dark"] .nw-pop {
  background: #151d2a !important;
  border-color: #334155 !important;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45) !important;
}

.nw-pop-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 12px !important;
  padding-bottom: 8px !important;
  border-bottom: 1px solid var(--border-color) !important;
}

.nw-pop-title {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #0b63c5 !important;
  text-decoration: none !important;
}

.nw-pop-title:hover {
  text-decoration: underline !important;
}

.nw-pill {
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  border-radius: 9999px !important;
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
  white-space: nowrap !important;
}

/* Popup Tool Items Stack */
.nw-pop-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.nw-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  color: var(--text-main) !important;
  background: var(--bg-card) !important;
  border: 1.5px solid transparent !important;
  box-sizing: border-box !important;
  transition: border-color 0.15s ease, background-color 0.15s ease !important;
  width: 100% !important;
}

.nw-item:hover {
  border-color: #2563eb !important;
  background: #eff6ff !important;
}

[data-theme="dark"] .nw-item:hover {
  border-color: #3b82f6 !important;
  background: rgba(37, 99, 235, 0.15) !important;
}

.nw-ico {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  flex-shrink: 0 !important;
}

.nw-item span:last-child {
  display: flex !important;
  flex-direction: column !important;
  line-height: 1.3 !important;
  overflow: hidden !important;
}

.nw-item b {
  font-size: 13.5px !important;
  font-weight: 800 !important;
  color: var(--text-main) !important;
}

.nw-item small {
  font-size: 11px !important;
  color: var(--text-subtle) !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  overflow: hidden !important;
}

/* Hide Horizontal Slider Track & Arrows */
.nw-slider-track,
.ain-slider-track,
.ain-slider-controls,
.ain-slider-prev,
.ain-slider-next,
.ain-slider-dots,
[class*="slider"] {
  display: none !important;
}

/* Bottom "All tools" Navigation Link */
.nw-all {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: 12px !important;
  padding-top: 10px !important;
  border-top: 1px solid var(--border-color) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #0b63c5 !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
}

.nw-all:hover {
  color: #084ea3 !important;
  text-decoration: underline !important;
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

/* PWA Install Button (Desktop Default) */
.btn-app-install {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 36px;
  font-size: 12px;
  font-weight: 700;
  background: #065f46;
  color: #ffffff;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-app-install:hover {
  background: #047857;
  transform: translateY(-1px);
}

/* Ads Engine Slots */
.ad-slot {
  display: none;
  height: 0px;
  margin: 0px;
  padding: 0px;
  overflow: hidden;
}

.ad-slot.ad-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 728px;
  margin: 36px auto;
  min-height: 90px;
  background: var(--bg-body);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  padding: 8px;
}

.ad-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 6px;
  display: block;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 24px 0 8px 0;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(37, 99, 235, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.6px;
  margin-bottom: 12px;
  color: var(--text-main);
}

.hero-subtitle {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* Presets */
.preset-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 28px 0;
}

.preset-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.preset-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.preset-chip.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

.preset-chip.active svg {
  filter: brightness(0) invert(1);
}

/* Studio Layout */
.generator-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 40px;
}

@media (max-width: 900px) {
  .generator-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

.card-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.main-nav-tabs {
  display: flex;
  gap: 18px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 18px;
  padding-bottom: 2px;
}

.main-nav-tab {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-subtle);
  padding: 8px 4px 12px 4px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.main-nav-tab.active {
  color: var(--primary);
}

.main-nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
}

.type-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.type-pill-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.type-pill-btn:hover {
  border-color: var(--text-main);
}

.type-pill-btn.active {
  background: var(--text-main);
  border-color: var(--text-main);
  color: #ffffff;
}

.type-pill-btn.active svg {
  filter: brightness(0) invert(1);
}

[data-theme="dark"] .type-pill-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: var(--primary);
}

/* Studio Sub-cards */
.studio-sub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.studio-sub-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: block;
}

.theme-preset-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  transition: border-color 0.15s ease;
}

.theme-preset-chip:hover { border-color: var(--primary); }
.theme-preset-chip.active { border-color: var(--text-main); background: var(--bg-body); font-weight: 700; }

.color-input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2px;
  cursor: pointer;
  background: var(--bg-card);
}

.color-swatch-list { display: flex; gap: 10px; margin-top: 10px; }
.color-swatch { width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid #ffffff; box-shadow: 0 0 0 1px var(--border-color); transition: transform 0.15s ease; }
.color-swatch:hover { transform: scale(1.15); }

.brand-badge-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.brand-badge-btn:hover { border-color: var(--primary); transform: translateY(-1px); }
.brand-badge-btn.active { background: var(--text-main); border-color: var(--text-main); color: #ffffff; }
[data-theme="dark"] .brand-badge-btn.active { background: var(--primary); border-color: var(--primary); color: #ffffff; }

.file-input-wrap { display: flex; align-items: center; gap: 8px; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 6px; padding: 6px 10px; }
.file-input-wrap input[type="file"] { border: none; background: transparent; padding: 0; font-size: 12px; flex: 1; }
.btn-inline-remove { background: #fee2e2; color: #ef4444; border: 1px solid #fca5a5; border-radius: 4px; padding: 3px 8px; font-size: 11px; font-weight: 700; cursor: pointer; }

/* Viewfinder */
.viewfinder-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: sticky;
  top: 80px;
  align-self: start;
}

.viewfinder-box {
  width: 100%;
  min-height: 290px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease;
}

.vf-corner { position: absolute; width: 18px; height: 18px; border-color: #0f172a; pointer-events: none; }
.vf-tl { top: 12px; left: 12px; border-top: 3px solid; border-left: 3px solid; }
.vf-tr { top: 12px; right: 12px; border-top: 3px solid; border-right: 3px solid; }
.vf-bl { bottom: 12px; left: 12px; border-bottom: 3px solid; border-left: 3px solid; }
.vf-br { bottom: 12px; right: 12px; border-bottom: 3px solid; border-right: 3px solid; }

#qr-empty-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-subtle); padding: 30px 10px; }

/* Merchant Card Frames */
#frame-rendered-container { display: flex; flex-direction: column; align-items: center; width: 100%; border-radius: 14px; padding: 0; overflow: hidden; transition: border-color 0.2s ease; background: #ffffff; }
.viewfinder-box.card-solid #frame-rendered-container { border: 2px solid var(--border-color); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); }
.viewfinder-box.card-outlined #frame-rendered-container { border: 3px solid #2563eb; padding: 8px; }
.viewfinder-box.viewfinder-corners #frame-rendered-container { border: 2px dashed #2563eb; padding: 14px; border-radius: 12px; }

#preview-frame-header { width: 100%; font-size: 13px; font-weight: 900; letter-spacing: 0.8px; text-transform: uppercase; padding: 10px 14px; text-align: center; color: #ffffff !important; }
#preview-frame-cta { font-size: 12px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; padding: 8px 18px; border-radius: 999px; margin: 10px auto 14px; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
#qr-code svg, #qr-code canvas { max-width: 100%; height: auto; display: block; margin: 0 auto; }

.scannability-wrap { width: 100%; margin: 18px 0 14px 0; text-align: left; }
.scannability-header { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-subtle); margin-bottom: 6px; }
.scannability-bar { width: 100%; height: 6px; border-radius: 999px; background: linear-gradient(to right, #ef4444 0%, #eab308 50%, #10b981 100%); position: relative; }
.scannability-pointer { position: absolute; top: 50%; left: 92%; transform: translate(-50%, -50%); width: 12px; height: 12px; background: #ffffff; border: 3px solid #0f172a; border-radius: 50%; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: left 0.3s ease; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: #ffffff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-secondary { background: var(--bg-card); color: var(--text-main); border-color: var(--border-color); }
.btn-secondary:hover { border-color: var(--text-main); }

.btn-action-black {
  background: #0f172a;
  color: #ffffff;
  width: 100%;
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s ease;
}
.btn-action-black:hover { background: #1e293b; }
[data-theme="dark"] .btn-action-black { background: var(--primary); }

.btn-action-standee {
  background: #ffffff;
  color: #2563eb;
  border: 1.5px solid #2563eb;
  width: 100%;
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  transition: background-color 0.2s ease;
}
.btn-action-standee:hover { background: #eff6ff; }

.download-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  margin-bottom: 35px;
}
@media (max-width: 600px) { .download-grid { grid-template-columns: repeat(3, 1fr); } }
.btn-format {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  padding: 9px 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.btn-format:hover {
  border-color: #2563eb;
  color: #2563eb;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

.whatsapp-share-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #047857; 
  text-decoration: none;
  margin-top: 14px;
  transition: color 0.15s;
}
.whatsapp-share-link:hover { color: #047857; text-decoration: underline; }

/* Dividers & Content */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 3.5rem auto;
  max-width: 280px;
  height: 14px;
  position: relative;
}
.section-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #cbd5e1, #2563eb, #cbd5e1, transparent);
  transform: translateY(-50%);
}
.section-divider span {
  position: relative;
  z-index: 2;
  width: 9px;
  height: 9px;
  background: #2563eb;
  border-radius: 50%;
  border: 2px solid var(--bg-body);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

.content-card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.content-card-box h2 {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.4px;
  margin-bottom: 12px;
  color: var(--text-main);
}
.content-card-box p,
.step-desc,
.showcase-card p,
.faq-answer,
.privacy-note-card p,
.trust-card-panel p,
.trust-card-panel li,
.article p,
.article li {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.75;
  text-align: justify !important;
  text-justify: inter-word !important;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Steps Zigzag Layout */
.steps-flow-container { display: flex; flex-direction: column; gap: 3.5rem; margin-top: 1.5rem; }
.step-row { display: flex; flex-direction: column; align-items: stretch; gap: 2rem; width: 100%; }
.step-text-col, .step-visual-col { width: 100%; box-sizing: border-box; }
@media (min-width: 768px) {
  .step-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 3.5rem; }
  .step-row-reverse { flex-direction: row-reverse; }
  .step-text-col, .step-visual-col { flex: 1; width: 50%; }
}
.step-num-badge { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--primary); color: #ffffff; font-size: 14px; font-weight: 900; margin-bottom: 0.85rem; }
.step-title { font-size: 1.35rem; font-weight: 900; color: var(--text-main); margin-bottom: 0.65rem; letter-spacing: -0.02em; }
.tech-visual-card { width: 100%; box-sizing: border-box; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 1.4rem; box-shadow: var(--shadow-md); }
.tv-header { display: flex; align-items: center; gap: 6px; padding-bottom: 0.85rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
.tv-dot { width: 8px; height: 8px; border-radius: 50%; }
.tv-red { background: #ef4444; }
.tv-yellow { background: #f59e0b; }
.tv-green { background: #10b981; }
.tv-blue { background: #2563eb; }
.tv-title { font-size: 0.78rem; font-weight: 700; color: var(--text-subtle); margin-left: 4px; text-transform: uppercase; letter-spacing: 0.05em; }

.tv-compare-row { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; border-radius: 8px; font-size: 0.88rem; margin-bottom: 0.5rem; }
.tv-dim { background: var(--bg-body); color: var(--text-subtle); border: 1px dashed var(--border-color); }
.tv-highlight { background: var(--primary-light); border: 1px solid rgba(37, 99, 235, 0.3); color: var(--text-main); }
.tv-tag-red { font-size: 0.75rem; font-weight: 800; background: #fee2e2; color: #b91c1c; padding: 3px 8px; border-radius: 99px; text-decoration: line-through; }
.tv-tag-green { font-size: 0.75rem; font-weight: 800; background: #ecfdf5; color: #047857; padding: 3px 8px; border-radius: 99px; }

.privacy-flow-graphic { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 1rem; }
.p-box { font-size: 0.76rem; font-weight: 700; padding: 8px 10px; border-radius: 8px; background: var(--bg-body); color: var(--text-muted); border: 1px solid var(--border-color); text-align: center; flex: 1; }
.p-box-active { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; font-weight: 800; }
.p-arrow { color: var(--text-subtle); font-weight: 900; font-size: 0.85rem; }
.p-server-status { font-size: 0.8rem; color: #047857; display: flex; align-items: center; gap: 6px; background: #f0fdf4; padding: 8px 12px; border-radius: 8px; }

.showcase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 18px; }
.showcase-card { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 22px; }
.showcase-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px; }
.showcase-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 8px; color: var(--text-main); }
.faq-block { margin-top: 20px; }
.faq-card-item { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 10px; padding: 18px 20px; margin-bottom: 14px; }
.faq-card-item:last-child { margin-bottom: 0; }
.faq-question { font-size: 15.5px; font-weight: 800; color: var(--text-main); margin-bottom: 6px; }

/* Interactive Star Rating Styles */
.star-rating-wrap { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.star-btns-group { display: flex; gap: 4px; }
.star-btn { background: none; border: none; font-size: 1.7rem; color: #cbd5e1; cursor: pointer; padding: 0; line-height: 1; transition: color 0.15s; }
.star-btn.active { color: #f59e0b; }
.rating-feedback-txt { font-size: 0.9rem; font-weight: 700; color: #475569; min-width: 140px; }

/* Trust & Compliance Clean Card Layout */
.trust-card-panel {
  max-width: 760px;
  margin: 32px auto 48px auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
}

.trust-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.trust-back-link {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.trust-badge-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.trust-card-panel h1 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text-main);
  margin-bottom: 8px;
}

.trust-card-panel h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 24px;
  margin-bottom: 8px;
}

.trust-card-panel p,
.trust-card-panel li {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.7;
}

.trust-card-panel ul {
  padding-left: 20px;
  margin: 10px 0;
}

/* 5-Column High-Trust Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 28px 0;
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
}

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

.footer-col h3,
.footer-col h4 {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-main);
  margin-bottom: 14px;
}

.footer-brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.footer-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #065f46 !important; 
  background: #ecfdf5 !important;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #a7f3d0 !important;
}

.footer-links-list { list-style: none; }
.footer-links-list li { margin-bottom: 9px; }

.site-footer a,
.footer-links-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s ease;
}

.site-footer a:hover,
.footer-links-list a:hover {
  color: var(--primary);
}

[data-network="footer"] {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 9px !important;
  width: 100% !important;
}

/* Footer AI InnoCore Styling: Soft Highlight */
[data-network="footer"] .network-title,
[data-network="footer"] h4,
[data-network="footer"] a[href*="aiinnocore"] {
  color: #0b63c5 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  text-decoration: underline !important;
  letter-spacing: 0.5px !important;
  display: inline-block !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  transition: background-color 0.2s ease !important;
}

[data-network="footer"] .network-title:hover,
[data-network="footer"] h4:hover,
[data-network="footer"] a[href*="aiinnocore"]:hover {
  background: #eff6ff !important;
  color: #084ea3 !important;
}

[data-theme="dark"] [data-network="footer"] .network-title:hover,
[data-theme="dark"] [data-network="footer"] h4:hover,
[data-theme="dark"] [data-network="footer"] a[href*="aiinnocore"]:hover {
  background: rgba(37, 99, 235, 0.15) !important;
  color: #60a5fa !important;
}

/* Tool links inside column 4 */
[data-network="footer"] a:not([href*="aiinnocore"]) {
  color: var(--text-muted) !important;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  transition: color 0.15s ease !important;
}

[data-network="footer"] a:not([href*="aiinnocore"]):hover {
  color: var(--primary) !important;
}

/* Parent Brand Credit Hover Animation */
.parent-credit-line {
  font-size: 13px;
  color: var(--text-subtle);
  margin-top: 10px;
  font-weight: 600;
}

.parent-credit-line a {
  color: #0b63c5 !important;
  font-weight: 800 !important;
  text-decoration: underline !important;
  display: inline-block !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
}

.parent-credit-line a:hover {
  color: #084ea3 !important;
  transform: translateY(-2.5px) !important;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Floating Toast Notification */
#toast {
  display: none;
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  z-index: 10000000;
  pointer-events: none;
  white-space: nowrap;
}

/* More Tools Dropdown Overflow Containment */
.nw-pop,
.nw-pop-list {
  overflow-x: hidden !important;
}

.nw-item {
  transform: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.nw-item:hover {
  transform: none !important;
  border-color: #2563eb !important;
  background: #eff6ff !important;
}

/* ===================================================
   RESPONSIVE MEDIA QUERIES (Mobile Viewports)
=================================================== */

/* Header & Mobile Action Bar (max-width: 640px) */
@media (max-width: 640px) {
  .nav-wrap {
    padding: 0 12px;
  }
  .logo {
    font-size: 16px;
    gap: 6px;
    white-space: nowrap;
  }
  .logo-icon {
    width: 28px;
    height: 28px;
  }
  .header-right-actions {
    gap: 6px !important;
  }

  /* More Tools: Locked Dimensions on Mobile */
  [data-network="menu"],
  .nw-menu {
    min-width: 36px !important;
    width: 36px !important;
    max-width: 36px !important;
    flex-shrink: 0 !important;
  }
  .nw-menu-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    font-size: 0 !important;
    gap: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .nw-menu-btn svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    margin: 0 !important;
  }

  /* Compact 36x36 PWA Install Button on Mobile */
  .btn-app-install {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    justify-content: center !important;
  }
  .btn-app-install .pwa-btn-text {
    display: none !important;
  }

  /* More Tools Dropdown: Mobile Viewport Containment */
  .nw-pop {
    position: fixed !important;
    left: 14px !important;
    right: 14px !important;
    width: auto !important;
    min-width: unset !important;
    max-width: calc(100vw - 28px) !important;
    top: 68px !important;
  }
}

/* Privacy Pipeline Graphic Mobile Optimization (max-width: 600px) */
@media (max-width: 600px) {
  .privacy-flow-graphic {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .privacy-flow-graphic .p-arrow {
    transform: rotate(90deg); 
    font-size: 1rem;
  }
  .privacy-flow-graphic .p-box {
    width: 100% !important;
    padding: 8px 12px;
  }
}