/* ==========================================================================
   AI Calculator Hub — Public Design System
   Deep forest teal + warm amber. Not purple, not cream/terracotta, not
   newspaper. Fonts: DM Sans (UI) + Fraunces (display headlines).
   ========================================================================== */

:root {
  --brand: #0B6E4F;
  --brand-dark: #084C37;
  --brand-rgb: 11, 110, 79;
  --accent: #F4A259;
  --accent-rgb: 244, 162, 89;
  --ink: #1A1A1A;
  --muted: #5C6B73;
  --surface: #F7F9F8;
  --card: #FFFFFF;
  --border: rgba(26, 26, 26, 0.08);
  --shadow-color: rgba(8, 34, 26, 0.10);

  --font-ui: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', Georgia, serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --transition-fast: 150ms ease;
  --transition-base: 220ms ease;

  color-scheme: light;
}

html[data-theme='dark'] {
  --brand: #16A579;
  --brand-dark: #0B6E4F;
  --accent: #F4A259;
  --ink: #EDF3F0;
  --muted: #A2B3AC;
  --surface: #0E1512;
  --card: #16201C;
  --border: rgba(237, 243, 240, 0.09);
  --shadow-color: rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background-color: var(--surface);
  transition: background-color var(--transition-base), color var(--transition-base);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-dark);
}

h1, h2, h3, h4, .display-font {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.01em;
}

.text-muted-custom {
  color: var(--muted) !important;
}

/* Cookie consent (AdSense / GDPR-friendly) */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1080;
  padding: 1rem 0;
  background: rgba(8, 34, 26, 0.96);
  color: #edf3f0;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.25);
}

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

.cookie-consent-copy {
  flex: 1 1 280px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.cookie-consent-copy a {
  color: var(--accent);
  text-decoration: underline;
}

.cookie-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

.text-brand {
  color: var(--brand) !important;
}

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

/* ==========================================================================
   Atmosphere — soft gradient mesh backgrounds (never flat white)
   ========================================================================== */

.atmosphere {
  position: relative;
  background-color: var(--surface);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(var(--brand-rgb), 0.16) 0%, transparent 45%),
    radial-gradient(circle at 85% 8%, rgba(var(--accent-rgb), 0.14) 0%, transparent 40%),
    radial-gradient(circle at 78% 82%, rgba(var(--brand-rgb), 0.10) 0%, transparent 50%),
    linear-gradient(160deg, rgba(var(--brand-rgb), 0.05) 0%, rgba(92, 107, 115, 0.04) 55%, transparent 100%);
  /* overflow must stay visible — overflow:hidden kills position:sticky descendants */
}

.atmosphere::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(var(--brand-rgb), 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--brand-rgb), 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
  pointer-events: none;
}

.atmosphere-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
}

/* ==========================================================================
   Header / Navbar
   ========================================================================== */

.site-header {
  background-color: rgba(var(--brand-rgb), 0);
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1030;
  overflow: visible;
  transition: background-color var(--transition-base), border-color var(--transition-base);
}

.site-header .navbar,
.site-header .container,
.site-header .navbar-collapse,
.site-header .navbar-nav {
  overflow: visible;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
}

.brand-logo .brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.35);
}

.brand-logo:hover {
  color: var(--ink);
}

.main-nav .nav-link {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active,
.main-nav .nav-link.show {
  background-color: rgba(var(--brand-rgb), 0.10);
  color: var(--brand-dark);
}

html[data-theme='dark'] .main-nav .nav-link.active,
html[data-theme='dark'] .main-nav .nav-link:hover,
html[data-theme='dark'] .main-nav .nav-link.show {
  color: var(--accent);
}

.main-nav .dropdown-toggle::after {
  margin-left: 0.35em;
  vertical-align: 0.15em;
}

/* Desktop: open nav dropdowns on hover */
@media (min-width: 992px) {
  .main-nav .js-nav-dropdown {
    position: relative;
  }

  .main-nav .js-nav-dropdown > .dropdown-menu {
    display: none;
    position: absolute;
    inset: auto auto auto 0;
    top: 100%;
    margin: 0;
    z-index: 1050;
    transform: none !important;
  }

  .main-nav .js-nav-dropdown:hover > .nav-link,
  .main-nav .js-nav-dropdown:focus-within > .nav-link,
  .main-nav .js-nav-dropdown.is-open > .nav-link {
    background-color: rgba(var(--brand-rgb), 0.10);
    color: var(--brand-dark);
  }

  html[data-theme='dark'] .main-nav .js-nav-dropdown:hover > .nav-link,
  html[data-theme='dark'] .main-nav .js-nav-dropdown:focus-within > .nav-link,
  html[data-theme='dark'] .main-nav .js-nav-dropdown.is-open > .nav-link {
    color: var(--accent);
  }

  .main-nav .js-nav-dropdown:hover > .dropdown-menu,
  .main-nav .js-nav-dropdown:focus-within > .dropdown-menu,
  .main-nav .js-nav-dropdown.is-open > .dropdown-menu {
    display: block !important;
    animation: navDropdownIn 0.16s ease;
  }
}

@keyframes navDropdownIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-dropdown {
  min-width: 280px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: 0 16px 36px var(--shadow-color);
}

/* Mobile: tap to open */
@media (max-width: 991.98px) {
  .main-nav .js-nav-dropdown > .dropdown-menu {
    display: none;
    position: static;
    float: none;
    width: 100%;
    margin: 0.25rem 0 0.5rem;
    box-shadow: none;
  }

  .main-nav .js-nav-dropdown.is-open > .dropdown-menu {
    display: block !important;
  }

  .main-nav .js-nav-dropdown.is-open > .nav-link {
    background-color: rgba(var(--brand-rgb), 0.10);
    color: var(--brand-dark);
  }
}

.nav-dropdown .dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
  white-space: normal;
  position: relative;
}

.nav-dropdown .dropdown-item.has-flyout {
  padding-right: 2rem;
}

.nav-dropdown .dropdown-item .flyout-caret {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--muted);
}

.nav-dropdown .dropdown-item i:not(.flyout-caret) {
  flex-shrink: 0;
  width: 1.25rem;
  margin-top: 0.1rem;
  color: var(--brand);
  font-size: 1.05rem;
}

.nav-dropdown .dropdown-item span {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.25;
  min-width: 0;
}

.nav-dropdown .dropdown-item strong {
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-dropdown .dropdown-item small {
  color: var(--muted);
  font-size: 0.75rem;
}

.nav-dropdown .dropdown-item:hover,
.nav-dropdown .dropdown-item:focus,
.nav-dropdown .dropdown-item.active {
  background-color: rgba(var(--brand-rgb), 0.10);
  color: var(--brand-dark);
}

.nav-dropdown .dropdown-divider {
  margin: 0.35rem 0.5rem;
  border-color: var(--border);
  opacity: 1;
}

/* Nested flyout (Tools → QR / Card / Categories) */
.nav-flyout {
  position: relative;
}

.nav-flyout-menu {
  display: none;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: 0 16px 36px var(--shadow-color);
  z-index: 1060;
  overflow: visible;
}

.nav-flyout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  width: 420px;
  max-width: min(420px, 70vw);
}

.nav-flyout-grid--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 320px;
  max-width: min(320px, 70vw);
}

.nav-flyout-grid--templates {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 300px;
  max-width: min(300px, 70vw);
}

.nav-flyout-menu--stack {
  padding: 0.5rem;
  min-width: 220px;
}

.nav-flyout-stack {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.nav-flyout-nested {
  position: relative;
}

.nav-flyout-tile.has-nested {
  position: relative;
  padding-right: 1.75rem;
}

.nav-flyout-tile .nested-caret {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--muted);
}

.nav-flyout-submenu {
  display: none;
  margin: 0;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: 0 16px 36px var(--shadow-color);
  z-index: 1070;
}

.nav-flyout-tile {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  min-height: 2.5rem;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.nav-flyout-tile i {
  flex-shrink: 0;
  color: var(--brand);
  font-size: 0.95rem;
}

.nav-flyout-tile span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-flyout-tile:hover,
.nav-flyout-tile:focus,
.nav-flyout-tile.active {
  background: rgba(var(--brand-rgb), 0.10);
  border-color: rgba(var(--brand-rgb), 0.35);
  color: var(--brand-dark);
}

.nav-flyout-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.55rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-dark);
  text-decoration: none;
  background: rgba(var(--brand-rgb), 0.08);
}

.nav-flyout-footer:hover {
  background: rgba(var(--brand-rgb), 0.14);
  color: var(--brand-dark);
}

@media (min-width: 992px) {
  .nav-flyout-menu {
    position: absolute;
    left: calc(100% - 4px);
    top: 0;
  }

  .nav-flyout-submenu {
    position: absolute;
    left: calc(100% - 4px);
    top: 0;
  }

  .nav-flyout:hover > .nav-flyout-menu,
  .nav-flyout:focus-within > .nav-flyout-menu,
  .nav-flyout.is-open > .nav-flyout-menu {
    display: block;
    animation: navDropdownIn 0.14s ease;
  }

  .nav-flyout:hover > .has-flyout,
  .nav-flyout.is-open > .has-flyout {
    background-color: rgba(var(--brand-rgb), 0.10);
    color: var(--brand-dark);
  }

  .nav-flyout-nested:hover > .nav-flyout-submenu,
  .nav-flyout-nested:focus-within > .nav-flyout-submenu,
  .nav-flyout-nested.is-open > .nav-flyout-submenu {
    display: block;
    animation: navDropdownIn 0.14s ease;
  }

  .nav-flyout-nested:hover > .has-nested,
  .nav-flyout-nested.is-open > .has-nested {
    background: rgba(var(--brand-rgb), 0.10);
    border-color: rgba(var(--brand-rgb), 0.35);
    color: var(--brand-dark);
  }
}

@media (max-width: 991.98px) {
  .nav-flyout-menu {
    position: static;
    width: 100%;
    margin: 0.15rem 0 0.35rem;
    box-shadow: none;
  }

  .nav-flyout-submenu {
    position: static;
    width: 100%;
    margin: 0.3rem 0 0.2rem;
    box-shadow: none;
  }

  .nav-flyout-grid,
  .nav-flyout-grid--compact,
  .nav-flyout-grid--templates {
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-flyout.is-open > .nav-flyout-menu {
    display: block;
  }

  .nav-flyout-nested.is-open > .nav-flyout-submenu {
    display: block;
  }

  .nav-flyout .flyout-caret {
    transform: translateY(-50%) rotate(90deg);
  }

  .nav-flyout.is-open .flyout-caret {
    transform: translateY(-50%) rotate(-90deg);
  }

  .nav-flyout-nested .nested-caret {
    transform: translateY(-50%) rotate(90deg);
  }

  .nav-flyout-nested.is-open .nested-caret {
    transform: translateY(-50%) rotate(-90deg);
  }
}

.header-actions {
  flex-shrink: 0;
}

.header-search {
  width: 100%;
  max-width: none;
}

@media (min-width: 992px) {
  .header-search {
    width: 168px;
    max-width: 168px;
    transition: width var(--transition-fast), max-width var(--transition-fast);
  }

  .header-search:focus-within {
    width: 240px;
    max-width: 240px;
  }
}

.search-box {
  position: relative;
}

.search-box .form-control {
  border-radius: 999px;
  padding-left: 2.4rem;
  padding-right: 0.9rem;
  height: 38px;
  font-size: 0.875rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  color: var(--ink);
}

.search-box .bi-search {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 40px var(--shadow-color);
  z-index: 1050;
  overflow: hidden;
  max-height: 360px;
  overflow-y: auto;
}

.search-suggestions .suggestion-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  color: var(--ink);
  cursor: pointer;
}

.search-suggestions .suggestion-item:hover {
  background-color: rgba(var(--brand-rgb), 0.08);
}

.lang-switch .btn {
  border-radius: 999px;
  font-size: 0.82rem;
  padding: 0.3rem 0.7rem;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.theme-toggle:hover {
  transform: rotate(15deg);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-brand {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.65rem 1.6rem;
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 10px 24px rgba(var(--brand-rgb), 0.28);
}

.btn-brand:hover,
.btn-brand:focus {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-accent {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #1A1A1A;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.65rem 1.6rem;
  transition: filter var(--transition-fast), transform var(--transition-fast);
}

.btn-accent:hover {
  filter: brightness(0.94);
  color: #1A1A1A;
  transform: translateY(-1px);
}

.btn-outline-brand {
  border: 1.5px solid var(--brand);
  color: var(--brand);
  font-weight: 600;
  border-radius: 999px;
  background: transparent;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.btn-outline-brand:hover {
  background-color: var(--brand);
  color: #fff;
}

.btn-soft {
  background-color: rgba(var(--brand-rgb), 0.10);
  color: var(--brand-dark);
  border: none;
  border-radius: 999px;
  font-weight: 600;
}

html[data-theme='dark'] .btn-soft {
  color: var(--accent);
  background-color: rgba(var(--accent-rgb), 0.14);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card-surface {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.calc-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.calc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px var(--shadow-color);
  border-color: rgba(var(--brand-rgb), 0.35);
  color: var(--ink);
}

.calc-card .calc-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.16), rgba(var(--accent-rgb), 0.18));
  color: var(--brand-dark);
}

html[data-theme='dark'] .calc-card .calc-icon {
  color: var(--accent);
}

.calc-card .calc-title {
  font-weight: 600;
  font-size: 1.02rem;
  margin: 0;
}

.calc-card .calc-desc {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
  flex-grow: 1;
}

.calc-card .calc-badge {
  align-self: flex-start;
}

.category-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px var(--shadow-color);
  color: var(--ink);
}

.category-card .cat-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero-section {
  padding: 6rem 0 5rem;
  position: relative;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(var(--brand-rgb), 0.10);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

html[data-theme='dark'] .hero-eyebrow {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.14);
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  line-height: 1.08;
  font-weight: 600;
  margin: 1.1rem 0 1rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 2rem;
}

.hero-subtitle--left {
  margin-left: 0;
  margin-right: 0;
}

@media (min-width: 992px) {
  .hero-subtitle--left {
    margin-left: 0;
    margin-right: auto;
  }
}

/* ==========================================================================
   Try a Quick One — home widget
   ========================================================================== */

[x-cloak] {
  display: none !important;
}

.quick-try {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 48px var(--shadow-color);
  overflow: hidden;
  animation: quick-try-in 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes quick-try-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.quick-try__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem 0.85rem;
}

.quick-try__title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.quick-try__title i {
  color: var(--brand);
}

.quick-try__live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.quick-try__live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0.45);
  animation: quick-live-pulse 1.8s ease-out infinite;
}

@keyframes quick-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(var(--brand-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0); }
}

.quick-try__tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0 0.85rem 0.85rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.quick-try__tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.quick-try__tab:hover {
  color: var(--brand-dark);
  background: rgba(var(--brand-rgb), 0.08);
}

.quick-try__tab.is-active {
  background: rgba(var(--brand-rgb), 0.12);
  color: var(--brand-dark);
}

html[data-theme='dark'] .quick-try__tab.is-active {
  color: var(--accent);
  background: rgba(var(--brand-rgb), 0.22);
}

.quick-try__body {
  padding: 0 1.15rem 1.15rem;
}

.quick-try__fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.quick-try__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.quick-try__field--wide {
  grid-column: 1 / -1;
}

.quick-try__input {
  position: relative;
  display: flex;
  align-items: center;
}

.quick-try__input input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 0.62rem 2.4rem 0.62rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-ui);
}

.quick-try__input input[type="date"] {
  padding-right: 0.75rem;
}

.quick-try__input input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 0.2rem rgba(var(--brand-rgb), 0.15);
  background: var(--card);
}

.quick-try__suffix {
  position: absolute;
  right: 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
  text-transform: none;
  letter-spacing: 0;
}

.quick-try__result {
  background: rgba(var(--brand-rgb), 0.10);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  transition: background var(--transition-base);
}

.quick-try__result-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-dark);
}

html[data-theme='dark'] .quick-try__result-label {
  color: var(--accent);
}

.quick-try__result-value {
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--brand-dark);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

html[data-theme='dark'] .quick-try__result-value {
  color: var(--ink);
}

.quick-try__result-sub {
  font-size: 0.9rem;
  color: var(--brand-dark);
  opacity: 0.85;
}

html[data-theme='dark'] .quick-try__result-sub {
  color: var(--muted);
  opacity: 1;
}

.quick-try__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.15rem;
  border-top: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(var(--brand-rgb), 0.03);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.quick-try__footer span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.quick-try__footer i.bi-stars {
  color: var(--brand);
}

.quick-try__footer:hover {
  background: rgba(var(--brand-rgb), 0.10);
  color: var(--brand-dark);
}

/* Breath Hold Test card (compact, beside Try a Quick One) */
.breath-card {
  padding: 1.1rem 1.15rem 1rem;
  display: flex;
  flex-direction: column;
}

.breath-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.breath-card__title {
  font-size: 1.15rem;
  margin: 0.2rem 0 0;
  line-height: 1.25;
}

.breath-card__timer {
  font-size: 1.65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--brand-dark);
  min-width: 4.75rem;
  text-align: right;
  flex-shrink: 0;
}

.breath-card__timer.is-holding {
  color: var(--accent);
  animation: breath-pulse 1.4s ease-in-out infinite;
}

.breath-card__timer.is-done {
  color: var(--brand);
}

@keyframes breath-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.88; }
}

.breath-card__timeline {
  margin-bottom: 0.85rem;
}

.breath-card__track {
  position: relative;
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--border);
}

.breath-card__zone {
  display: block;
  height: 100%;
}

.breath-card__zone--poor { background: #fecaca; }
.breath-card__zone--medium { background: #fde68a; }
.breath-card__zone--healthy { background: #bbf7d0; }

html[data-theme='dark'] .breath-card__zone--poor { background: #7f1d1d; }
html[data-theme='dark'] .breath-card__zone--medium { background: #854d0e; }
html[data-theme='dark'] .breath-card__zone--healthy { background: #14532d; }

.breath-card__fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, rgba(var(--brand-rgb), 0.55), var(--brand));
  border-radius: 999px;
  pointer-events: none;
  transition: width 0.05s linear;
}

.breath-card__marker {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand-dark);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.16);
  transform: translateY(-50%);
  pointer-events: none;
  transition: left 0.05s linear;
  z-index: 2;
}

.breath-card__scale {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 600;
}

.breath-card__scale span:nth-child(2) { color: #b91c1c; }
.breath-card__scale span:nth-child(3) { color: #a16207; }
.breath-card__scale span:nth-child(4) { color: #15803d; }

.breath-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.breath-card__actions .btn {
  border-radius: 999px;
  font-weight: 600;
}

.breath-card__hint {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.breath-card__report {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(var(--brand-rgb), 0.05);
  margin-bottom: 0.65rem;
}

.breath-card__report-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  align-self: flex-start;
}

.breath-card__report-badge.is-poor {
  background: #fee2e2;
  color: #991b1b;
}

.breath-card__report-badge.is-medium {
  background: #fef3c7;
  color: #92400e;
}

.breath-card__report-badge.is-healthy {
  background: #dcfce7;
  color: #166534;
}

.breath-card__report-msg {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.breath-card__disclaimer {
  margin: auto 0 0;
  padding-top: 0.35rem;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.35;
}

.breath-card__cert-status {
  color: var(--brand, #0B6E4F);
  font-weight: 500;
}

.breath-cert-modal-img {
  max-height: min(70vh, 720px);
  width: auto;
  box-shadow: 0 12px 40px rgba(16, 24, 40, 0.12);
  background: #fffef8;
}

@media (max-width: 767.98px) {
  .breath-card__scale span:nth-child(2),
  .breath-card__scale span:nth-child(3) {
    max-width: 4.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 992px) {
  .hero-copy .hero-title {
    font-size: clamp(1.75rem, 2.4vw, 2.35rem);
  }

  .hero-copy .hero-subtitle {
    font-size: 0.98rem;
    margin-bottom: 1.25rem;
  }
}

/* ==========================================================================
   How to use — home section
   ========================================================================== */

.how-to-section {
  padding-top: 3.5rem;
}

.how-to-intro {
  max-width: 640px;
  margin-bottom: 2rem;
}

.how-to-intro .eyebrow {
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

html[data-theme='dark'] .how-to-intro .eyebrow {
  color: var(--accent);
}

.how-to-intro h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0.45rem 0 0.75rem;
}

.how-to-lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
  line-height: 1.55;
}

.how-to-card {
  height: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.4rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  animation: how-to-card-in 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.how-to-card:nth-child(1),
.col-md-4:nth-child(1) .how-to-card { animation-delay: 60ms; }
.col-md-4:nth-child(2) .how-to-card { animation-delay: 140ms; }
.col-md-4:nth-child(3) .how-to-card { animation-delay: 220ms; }

@keyframes how-to-card-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.how-to-card__icons {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.25rem;
}

.how-to-card__num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(var(--brand-rgb), 0.12);
  color: var(--brand-dark);
}

html[data-theme='dark'] .how-to-card__num {
  color: var(--accent);
}

.how-to-card__glyph {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--brand-rgb), 0.08);
  color: var(--brand);
}

.how-to-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-ui);
}

.how-to-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  flex-grow: 1;
}

.how-to-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--brand);
  text-decoration: none;
}

.how-to-card__link:hover {
  color: var(--brand-dark);
}

html[data-theme='dark'] .how-to-card__link:hover {
  color: var(--accent);
}

@media (max-width: 767.98px) {
  .quick-try__fields {
    grid-template-columns: 1fr;
  }

  .hero-copy .hero-title {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .quick-try__fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .quick-try,
  .how-to-card,
  .quick-try__live-dot {
    animation: none !important;
  }
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding: 4.5rem 0;
}

.section-heading {
  margin-bottom: 2.5rem;
}

.section-heading .eyebrow {
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

html[data-theme='dark'] .section-heading .eyebrow {
  color: var(--accent);
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-top: 0.4rem;
}

/* ==========================================================================
   Calculator show page
   ========================================================================== */

.calc-form-card,
.calc-result-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.calc-form-card .form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.calc-form-card .form-control,
.calc-form-card .form-select {
  border-radius: var(--radius-sm);
  border-color: var(--border);
  background-color: var(--surface);
  color: var(--ink);
  padding: 0.62rem 0.9rem;
}

.calc-form-card .form-control:focus,
.calc-form-card .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.2rem rgba(var(--brand-rgb), 0.15);
  background-color: var(--card);
}

.calc-result-card {
  position: relative;
  min-height: 220px;
}

.result-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--card) 85%, transparent);
  border-radius: var(--radius-lg);
  z-index: 5;
}

.result-loading.active {
  display: flex;
}

.result-metric {
  background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.08), rgba(var(--accent-rgb), 0.08));
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
}

.result-metric .metric-label {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.result-metric .metric-value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--brand-dark);
}

html[data-theme='dark'] .result-metric .metric-value {
  color: var(--accent);
}

.breakdown-table td,
.breakdown-table th {
  border-color: var(--border);
  color: var(--ink);
}

.result-actions:not(.d-none) {
  display: flex;
}

.ai-explain-box {
  background-color: rgba(var(--accent-rgb), 0.10);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: none;
}

.ai-explain-box.active {
  display: block;
}

.invalid-feedback {
  display: none;
  font-size: 0.82rem;
}

.is-invalid ~ .invalid-feedback,
.was-validated .is-invalid + .invalid-feedback {
  display: block;
}

/* ==========================================================================
   FAQ accordion
   ========================================================================== */

.faq-accordion .accordion-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md) !important;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-accordion .accordion-button {
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  font-family: var(--font-ui);
}

.faq-accordion .accordion-button:not(.collapsed) {
  background: rgba(var(--brand-rgb), 0.06);
  color: var(--brand-dark);
  box-shadow: none;
}

html[data-theme='dark'] .faq-accordion .accordion-button:not(.collapsed) {
  color: var(--accent);
}

.faq-accordion .accordion-body {
  color: var(--muted);
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */

.custom-breadcrumb {
  font-size: 0.86rem;
}

.custom-breadcrumb a {
  color: var(--muted);
}

.custom-breadcrumb a:hover {
  color: var(--brand);
}

.custom-breadcrumb .current {
  color: var(--ink);
  font-weight: 600;
}

/* ==========================================================================
   Ads slots
   ========================================================================== */

.ad-slot {
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  display: block;
  overflow: hidden;
}

.ad-slot.ad-sticky {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1040;
  width: min(180px, 32vw);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  border-radius: 14px;
}

@media (max-width: 767.98px) {
  .ad-slot.ad-sticky {
    display: none;
  }
}

/* Designed banner slides */
.ad-banner-slide {
  display: block;
  text-decoration: none !important;
  color: inherit;
  border-radius: 14px;
  overflow: hidden;
  height: 100%;
}

.ad-banner-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 110px;
  padding: 1.15rem 1.35rem;
  color: #fff !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ad-slot-box .ad-banner-card,
.ad-slot-sticky .ad-banner-card {
  flex-direction: column;
  align-items: flex-start;
  min-height: 260px;
  padding: 1.35rem;
  justify-content: flex-end;
}

.ad-slot-sticky .ad-banner-card {
  min-height: 220px;
  padding: 1rem;
}

.ad-banner-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
  color: #fff !important;
}

.ad-theme-forest {
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.18), transparent 40%),
    linear-gradient(135deg, #0B6E4F 0%, #084C37 55%, #0A3D2E 100%);
}

.ad-theme-ocean {
  background:
    radial-gradient(circle at 10% 80%, rgba(255, 255, 255, 0.16), transparent 45%),
    linear-gradient(135deg, #1B4965 0%, #126782 50%, #0B6E4F 100%);
}

.ad-theme-sunset {
  background:
    radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.16), transparent 40%),
    linear-gradient(135deg, #C96A2B 0%, #0B6E4F 70%);
}

.ad-theme-slate {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 40%),
    linear-gradient(135deg, #2C3338 0%, #1B4965 60%, #0B6E4F 100%);
}

.ad-banner-sponsored {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.ad-banner-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  font-size: 1.35rem;
  flex-shrink: 0;
}

.ad-slot-box .ad-banner-icon,
.ad-slot-sticky .ad-banner-icon {
  margin-bottom: 0.75rem;
}

.ad-banner-copy {
  min-width: 0;
}

.ad-banner-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

.ad-slot-sticky .ad-banner-title {
  font-size: 0.92rem;
}

.ad-banner-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  opacity: 0.92;
}

.ad-slot-sticky .ad-banner-text {
  font-size: 0.78rem;
}

.ad-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
}

.ad-banner-image {
  position: relative;
  display: block;
}

.ad-banner-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  object-fit: cover;
  background: #e9ecef;
}

/* Standard slot sizes (IAB-aligned) for uploaded creatives */
.ad-slot-leaderboard .ad-banner-img {
  aspect-ratio: 728 / 90;
  max-height: 90px;
  width: 100%;
  object-fit: cover;
}

.ad-slot-box .ad-banner-img {
  aspect-ratio: 300 / 250;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

.ad-slot-sticky .ad-banner-img {
  aspect-ratio: 160 / 600;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.ad-slot-inline .ad-banner-img {
  aspect-ratio: 728 / 90;
  max-height: 100px;
  width: 100%;
  object-fit: cover;
}

.ad-slot-leaderboard .ad-banner-card { min-height: 100px; }
.ad-slot-inline .ad-banner-card { min-height: 96px; }

/* Carousel */
.ad-carousel {
  border-radius: 14px;
  overflow: hidden;
}

.ad-carousel .carousel-item {
  transition: transform 0.55s ease-in-out;
}

.ad-carousel-indicators {
  margin-bottom: 0.45rem;
}

.ad-carousel-indicators [data-bs-target] {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.55);
  border: 0;
  opacity: 1;
}

.ad-carousel-indicators .active {
  background-color: #fff;
  width: 18px;
  border-radius: 999px;
}

.ad-carousel-control {
  width: 8%;
  opacity: 0.85;
}

.ad-carousel-control .carousel-control-prev-icon,
.ad-carousel-control .carousel-control-next-icon {
  width: 1.1rem;
  height: 1.1rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.ad-slot-box .ad-carousel-control,
.ad-slot-sticky .ad-carousel-control {
  width: 14%;
}

/* Fallback demo */
.ad-demo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100px;
  border-radius: 14px;
  border: 1px dashed rgba(var(--brand-rgb), 0.35);
  background:
    linear-gradient(135deg, rgba(var(--brand-rgb), 0.10), rgba(var(--accent-rgb), 0.12)),
    repeating-linear-gradient(135deg, rgba(var(--brand-rgb), 0.05) 0 8px, transparent 8px 16px);
  color: var(--ink);
  text-align: center;
  padding: 1rem;
}

.ad-demo-leaderboard { min-height: 90px; }
.ad-demo-box { min-height: 260px; }
.ad-demo-sticky { min-height: 220px; }
.ad-demo-inline { min-height: 100px; }

.ad-demo-badge {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--brand);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}

.ad-demo-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-width: 22rem;
}

.ad-demo-body strong { font-size: 0.95rem; }
.ad-demo-body span,
.ad-demo-body small { font-size: 0.78rem; color: var(--muted); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--brand-dark);
  color: rgba(255, 255, 255, 0.82);
  padding: 4rem 0 1.5rem;
  margin-top: 3rem;
}

.site-footer h6 {
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.1rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer .brand-logo {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(var(--brand-rgb), 0.10);
  margin-right: 0.5rem;
  color: var(--brand);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.social-icons a:hover {
  background: var(--accent);
  color: #1A1A1A;
}

.site-footer .social-icons a {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ==========================================================================
   Blog
   ========================================================================== */

.blog-card img,
.blog-hero img {
  border-radius: var(--radius-md);
}

.reading-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.blog-sidebar-col {
  position: relative;
}

.blog-sidebar-sticky {
  position: sticky;
  top: 96px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.blog-sidebar-sticky > .ad-slot {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.toc-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  /* Leave room below for the ad so it never sits under the viewport edge */
  max-height: min(48vh, calc(100dvh - 360px));
  overflow: hidden;
}

.toc-box > h6 {
  flex: 0 0 auto;
  margin-bottom: 0.65rem;
}

.toc-box__links {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 0.25rem;
}

.toc-box__links::-webkit-scrollbar {
  width: 6px;
}

.toc-box__links::-webkit-scrollbar-thumb {
  background: rgba(var(--brand-rgb), 0.35);
  border-radius: 999px;
}

.toc-box a {
  display: block;
  padding: 0.3rem 0;
  color: var(--muted);
  font-size: 0.88rem;
  border-left: 2px solid transparent;
  padding-left: 0.55rem;
  margin-left: -0.55rem;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.toc-box a:hover,
.toc-box a.is-active {
  color: var(--brand);
}

.toc-box a.is-active {
  border-left-color: var(--brand);
  font-weight: 600;
}

.blog-content h2,
.blog-content h3 {
  margin-top: 2rem;
  scroll-margin-top: 100px;
  border-radius: 0.35rem;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.blog-content h2.is-highlighted,
.blog-content h3.is-highlighted {
  background: rgba(var(--brand-rgb), 0.12);
  box-shadow: 0 0 0 0.35rem rgba(var(--brand-rgb), 0.12);
  animation: toc-heading-pulse 1.1s ease;
}

@keyframes toc-heading-pulse {
  0% { background: rgba(var(--accent-rgb), 0.28); box-shadow: 0 0 0 0.45rem rgba(var(--accent-rgb), 0.22); }
  100% { background: rgba(var(--brand-rgb), 0.12); box-shadow: 0 0 0 0.35rem rgba(var(--brand-rgb), 0.12); }
}

.blog-content img {
  border-radius: var(--radius-md);
  max-width: 100%;
}

.qr-inline-blog {
  max-height: none;
  line-height: 1.7;
  font-size: 1.02rem;
}

.qr-inline-blog p {
  margin-bottom: 1rem;
  color: var(--text-muted, #4b5563);
}

.qr-inline-blog ul,
.qr-inline-blog ol {
  margin-bottom: 1.1rem;
  padding-left: 1.25rem;
}

.qr-inline-blog li {
  margin-bottom: 0.35rem;
}

.qr-inline-blog h2 {
  font-size: 1.35rem;
  margin-top: 1.75rem;
}

.qr-inline-blog h3 {
  font-size: 1.1rem;
  margin-top: 1.25rem;
}

/* ==========================================================================
   Pricing
   ========================================================================== */

.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  height: 100%;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.price-card.featured {
  border-color: var(--brand);
  box-shadow: 0 20px 50px var(--shadow-color);
  position: relative;
}

.price-card:hover {
  transform: translateY(-4px);
}

.price-card .price-amount {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--ink);
}

.price-card ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.price-card ul li {
  padding: 0.4rem 0;
  display: flex;
  align-items: start;
  gap: 0.6rem;
  color: var(--muted);
}

.price-card ul li i {
  color: var(--brand);
  margin-top: 0.15rem;
}

/* ==========================================================================
   Pagination (Bootstrap 5)
   ========================================================================== */

.pagination {
  gap: 0.35rem;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-ui);
  line-height: 1;
  color: var(--ink);
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: none;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.pagination .page-item:not(:first-child) .page-link {
  margin-left: 0;
}

.pagination .page-link:hover {
  z-index: 2;
  color: var(--brand);
  background-color: rgba(var(--brand-rgb), 0.08);
  border-color: rgba(var(--brand-rgb), 0.25);
}

.pagination .page-link:focus {
  z-index: 3;
  box-shadow: 0 0 0 0.2rem rgba(var(--brand-rgb), 0.2);
  color: var(--brand);
}

.pagination .page-item.active .page-link {
  color: #fff;
  background-color: var(--brand);
  border-color: var(--brand);
}

.pagination .page-item.disabled .page-link {
  color: var(--muted);
  background-color: var(--surface);
  border-color: var(--border);
  opacity: 0.7;
  pointer-events: none;
}

/* Keep Previous/Next chevrons aligned with label text size */
.pagination .page-link span[aria-hidden="true"],
.pagination .page-link .page-link-icon {
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
  padding-inline: 0.75rem;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.badge-soft-brand {
  background-color: rgba(var(--brand-rgb), 0.12);
  color: var(--brand-dark);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
}

html[data-theme='dark'] .badge-soft-brand {
  color: var(--accent);
}

.badge-soft-accent {
  background-color: rgba(var(--accent-rgb), 0.18);
  color: #8a5620;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
}

html[data-theme='dark'] .badge-soft-accent {
  color: var(--accent);
  background-color: rgba(var(--accent-rgb), 0.22);
}

.divider-soft {
  border-color: var(--border);
}

.share-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--ink);
  margin-right: 0.5rem;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.share-buttons a:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* ==========================================================================
   Auth pages (login / register / password)
   ========================================================================== */

/* Auth modal popup */
.auth-modal-content {
  border: none;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.auth-modal-content .modal-header,
.auth-modal-content .modal-body {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.auth-modal-tabs .btn {
  border: 1px solid rgba(var(--brand-rgb), 0.2);
  background: rgba(var(--brand-rgb), 0.06);
  color: var(--ink);
  font-weight: 600;
}

.auth-modal-tabs .btn:first-child {
  border-radius: 10px 0 0 10px;
}

.auth-modal-tabs .btn:last-child {
  border-radius: 0 10px 10px 0;
}

.auth-modal-tabs .btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.auth-modal-alert {
  border-radius: 10px;
  background: rgba(220, 53, 69, 0.12);
  color: #b02a37;
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
}

.auth-body {
  min-height: 100vh;
  margin: 0;
  background: var(--surface);
}

.auth-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 12% 18%, rgba(var(--brand-rgb), 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 88% 82%, rgba(var(--accent-rgb), 0.18), transparent 50%),
    linear-gradient(165deg, var(--surface) 0%, rgba(var(--brand-rgb), 0.06) 100%);
}

.auth-atmosphere::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(var(--brand-rgb), 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--brand-rgb), 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  animation: auth-grid-drift 28s linear infinite;
}

@keyframes auth-grid-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-48px, -48px, 0); }
}

.auth-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.5rem;
}

.auth-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem 2rem;
}

.auth-panel {
  width: 100%;
  max-width: 440px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem 1.75rem;
  box-shadow: 0 24px 60px var(--shadow-color);
}

.auth-panel-enter {
  animation: auth-panel-in 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes auth-panel-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-panel-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.brand-mark-lg {
  width: 56px;
  height: 56px;
  font-size: 1.45rem;
  margin: 0 auto 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 10px 24px rgba(var(--brand-rgb), 0.35);
  animation: auth-mark-pop 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes auth-mark-pop {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.auth-panel-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.1rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.auth-panel-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 auto;
  max-width: 32ch;
}

.auth-form .form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap > i {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1rem;
  pointer-events: none;
  z-index: 2;
}

.auth-input-wrap .form-control {
  border-radius: var(--radius-sm);
  border-color: var(--border);
  background-color: var(--surface);
  color: var(--ink);
  padding: 0.72rem 0.95rem 0.72rem 2.65rem;
  min-height: 48px;
}

.auth-input-wrap .form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.2rem rgba(var(--brand-rgb), 0.18);
  background-color: var(--card);
}

.auth-input-wrap .form-control::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

.auth-form .form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}

.auth-form .form-check-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-submit {
  min-height: 48px;
  font-size: 1rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(var(--ink-rgb, 20, 30, 40), 0.12);
}

.auth-divider span {
  text-transform: lowercase;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 48px;
  border: 1px solid rgba(var(--ink-rgb, 20, 30, 40), 0.16);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  border-radius: var(--radius-sm, 0.5rem);
  text-decoration: none;
}

.btn-google:hover {
  background: rgba(var(--brand-rgb, 11, 110, 79), 0.04);
  border-color: rgba(var(--brand-rgb, 11, 110, 79), 0.35);
  color: var(--ink);
}

[data-theme="dark"] .btn-google {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.16);
  color: #f3f5f7;
}

[data-theme="dark"] .btn-google:hover {
  background: rgba(255, 255, 255, 0.08);
}

.auth-link {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

.auth-switch {
  text-align: center;
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.auth-alert {
  border-radius: var(--radius-sm);
  border: none;
  background: rgba(var(--brand-rgb), 0.12);
  color: var(--brand-dark);
  font-size: 0.92rem;
}

html[data-theme='dark'] .auth-alert {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.14);
}

.auth-footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 1rem 1.5rem 1.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-footer-links {
  display: inline-flex;
  gap: 1rem;
}

.auth-footer a {
  color: var(--muted);
}

.auth-footer a:hover {
  color: var(--brand);
}

@media (max-width: 575.98px) {
  .auth-panel {
    padding: 1.75rem 1.25rem 1.5rem;
  }

  .auth-topbar {
    padding: 1rem;
  }
}

/* ------------------------------------------------------------------ */
/* Legal + HTML sitemap                                               */
/* ------------------------------------------------------------------ */

.legal-content h2 {
  font-size: 1.2rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--ink);
}

.legal-content h2:first-of-type {
  margin-top: 0.5rem;
}

.legal-content ul {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.legal-content li {
  margin-bottom: 0.4rem;
}

.legal-content p {
  color: var(--muted);
  line-height: 1.7;
}

.legal-content a {
  color: var(--brand);
  font-weight: 600;
}

.sitemap-list a,
.sitemap-calc-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.sitemap-list a:hover,
.sitemap-calc-link:hover {
  color: var(--brand);
}

.sitemap-calc-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
}

.sitemap-calc-link:hover {
  background: rgba(var(--brand-rgb), 0.08);
}

.sitemap-calc-link i {
  color: var(--brand);
}

/* ------------------------------------------------------------------ */
/* Account / member area                                              */
/* ------------------------------------------------------------------ */

.account-sidebar {
  position: relative;
}

.account-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  flex-shrink: 0;
}

.account-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-weight: 500;
}

.account-nav .nav-link i {
  width: 1.1rem;
  color: var(--muted);
}

.account-nav .nav-link:hover,
.account-nav .nav-link.active {
  background: rgba(var(--brand-rgb), 0.10);
  color: var(--brand-dark);
}

.account-nav .nav-link.active i,
.account-nav .nav-link:hover i {
  color: var(--brand);
}

.account-stat .stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}

.account-stat .stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-top: 0.25rem;
}

.account-list-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(var(--brand-rgb), 0.08);
  color: var(--ink);
}

.account-list-item:last-child {
  border-bottom: 0;
}

.account-alert {
  border: none;
  border-radius: var(--radius-sm);
}

.account-dropdown {
  min-width: 220px;
  border-radius: 12px;
  border: 1px solid rgba(var(--brand-rgb), 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  padding: 0.4rem;
}

.account-dropdown .dropdown-item {
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
}

.account-dropdown .dropdown-item:hover,
.account-dropdown .dropdown-item:focus {
  background: rgba(var(--brand-rgb), 0.10);
  color: var(--brand-dark);
}

html[data-theme='dark'] .account-dropdown {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.08);
}

@media print {
  .site-header, .site-footer, .ad-slot, .no-print { display: none !important; }
}

@media (max-width: 767.98px) {
  .hero-section { padding: 3.5rem 0 2.5rem; }
  .blog-sidebar-sticky {
    position: static;
  }
  .toc-box {
    max-height: 280px;
  }
}

/* ==========================================================================
   About page
   ========================================================================== */

.about-stat__value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--brand);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

html[data-theme='dark'] .about-stat__value {
  color: var(--accent);
}

.about-stat__label {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.about-coverage li {
  display: block;
  padding: 0.45rem 0;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.about-coverage li:last-child {
  border-bottom: 0;
}

.about-coverage__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
}

.about-coverage__link:hover {
  color: var(--brand);
}

.about-coverage__name {
  flex: 1 1 auto;
  min-width: 0;
}

.about-coverage__count {
  flex: 0 0 auto;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.about-coverage li i {
  color: var(--brand);
  font-size: 1.1rem;
  width: 1.25rem;
  text-align: center;
  flex: 0 0 auto;
}

html[data-theme='dark'] .about-coverage li i {
  color: var(--accent);
}

/* ==========================================================================
   QR Code Generator (Phase 1)
   ========================================================================== */

.qr-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  max-height: 22rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

@media (min-width: 576px) {
  .qr-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .qr-type-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-height: 26rem;
  }
}

.qr-type-card {
  margin: 0;
  cursor: pointer;
}

.qr-type-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 78px;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.qr-type-card__body i {
  font-size: 1.25rem;
  color: var(--brand);
}

.qr-type-card.is-active .qr-type-card__body,
.qr-type-card:hover .qr-type-card__body {
  border-color: rgba(var(--brand-rgb), 0.45);
  color: var(--ink);
  background: rgba(var(--brand-rgb), 0.06);
  box-shadow: 0 0 0 1px rgba(var(--brand-rgb), 0.12);
}

.qr-preview-frame {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(var(--brand-rgb), 0.28);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(var(--brand-rgb), 0.05), rgba(11, 110, 79, 0.02));
  padding: 1rem;
}

.qr-preview-placeholder {
  text-align: center;
  color: var(--muted);
}

.qr-preview-placeholder i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.qr-preview-image {
  max-width: min(100%, 320px);
  height: auto;
  border-radius: 8px;
  background: #fff;
}

.qr-preview-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-md);
}

html[data-theme='dark'] .qr-preview-loading {
  background: rgba(0, 0, 0, 0.35);
}

.qr-payload-code {
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(var(--brand-rgb), 0.06);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  color: var(--ink);
  font-size: 0.8rem;
}

.qr-panel .invalid-feedback {
  display: none;
}

.qr-panel .invalid-feedback:not(:empty) {
  display: block;
}

.qr-type-badge {
  display: inline-block;
  margin-top: 0.15rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--brand);
  background: rgba(var(--brand-rgb), 0.1);
  border-radius: 4px;
}

.qr-history-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.qr-history-tabs .btn.is-active {
  border-color: rgba(var(--brand-rgb), 0.4);
  color: var(--brand);
  background: rgba(var(--brand-rgb), 0.08);
}

.qr-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 320px;
  overflow-y: auto;
}

.qr-history-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.qr-history-thumb {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(var(--brand-rgb), 0.06);
  color: var(--brand);
  overflow: hidden;
}

.qr-history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qr-history-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.qr-history-meta strong {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qr-history-meta span {
  font-size: 0.75rem;
}

.qr-history-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.qr-dynamic-box {
  background: rgba(11, 110, 79, 0.04);
  border-color: rgba(11, 110, 79, 0.2) !important;
}

.bg-success-subtle {
  background-color: rgba(11, 110, 79, 0.12) !important;
}

.qr-heat-map {
  position: relative;
  min-height: 220px;
  border-radius: 0.75rem;
  background:
    radial-gradient(circle at 20% 40%, rgba(11,110,79,.12), transparent 40%),
    radial-gradient(circle at 70% 55%, rgba(244,162,89,.12), transparent 45%),
    linear-gradient(180deg, #f4f7f5, #e8efea);
  overflow: hidden;
  border: 1px solid var(--border-color, #dde5df);
}

.qr-heat-point {
  position: absolute;
  width: var(--w, 16px);
  height: var(--w, 16px);
  border-radius: 50%;
  background: rgba(11, 110, 79, 0.55);
  box-shadow: 0 0 0 4px rgba(11, 110, 79, 0.15);
  /* Map lat/lng roughly into the box */
  left: calc((var(--lng) + 180) / 360 * 100%);
  top: calc((90 - var(--lat)) / 180 * 100%);
  transform: translate(-50%, -50%);
}

/* Visiting Card Designer */
.vc-template-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.vc-filter-btn.is-active {
  color: #fff;
}

.vc-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  max-height: 34rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

@media (min-width: 576px) {
  .vc-template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .vc-template-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.vc-template-card {
  cursor: pointer;
  margin: 0;
}

.vc-template-card.is-hidden {
  display: none;
}

.vc-template-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.45rem;
  border: 1px solid var(--border-color, #dde5df);
  border-radius: 0.75rem;
  background: var(--surface, #fff);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.vc-template-card.is-active .vc-template-card__body,
.vc-template-card:hover .vc-template-card__body {
  border-color: var(--brand, #0b6e4f);
  box-shadow: 0 0 0 1px rgba(11, 110, 79, 0.22);
  transform: translateY(-1px);
}

.vc-template-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1050 / 600;
  border-radius: 0.45rem;
  overflow: hidden;
  position: relative;
  background: #f4f7f5;
}

.vc-template-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0 0.15rem 0.15rem;
}

.vc-template-name {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text, #1a1a1a);
}

.vc-template-cat {
  font-size: 0.68rem;
  color: var(--muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Mini layout previews */
.vc-thumb-classic { background: linear-gradient(90deg, #0b6e4f 12%, #f4a259 13%, #fff 13.5%); }
.vc-thumb-modern { background: linear-gradient(180deg, #0b6e4f 38%, #f4a259 40%, #fff 41%); }
.vc-thumb-minimal { background: #fafaf8; }
.vc-thumb-minimal::before { content: ''; position: absolute; left: 12%; top: 18%; width: 28%; height: 4px; background: #1a1a1a; }
.vc-thumb-bold { background: #0b6e4f; box-shadow: inset 0 0 0 8px #0b6e4f, inset 0 0 0 12px #fff; }
.vc-thumb-bold::after { content: ''; position: absolute; inset: 10%; background: #fff; border-radius: 2px; }
.vc-thumb-split { background: linear-gradient(90deg, #123c2e 34%, #fff 34%); }
.vc-thumb-noir { background: #121212; }
.vc-thumb-noir::before { content: ''; position: absolute; left: 12%; top: 18%; width: 3px; height: 35%; background: #d4af37; }
.vc-thumb-editorial { background: #fff; }
.vc-thumb-editorial::before { content: ''; position: absolute; left: 10%; top: 20%; width: 55%; height: 14px; background: #111; border-radius: 1px; }
.vc-thumb-editorial::after { content: ''; position: absolute; left: 10%; top: 48%; width: 18%; height: 4px; background: #e4572e; }
.vc-thumb-luxe { background: #f7f3ea; box-shadow: inset 0 0 0 3px #b08d57, inset 0 0 0 6px #f7f3ea, inset 0 0 0 7px #2c2c2c; }
.vc-thumb-horizon { background: linear-gradient(180deg, #fff 72%, #f2c14e 74%, #0e4d6c 76%); }
.vc-thumb-diagonal { background: linear-gradient(115deg, #0b6e4f 0 38%, #163a2c 38% 44%, #fff 44%); }
.vc-thumb-duotone { background: linear-gradient(90deg, #1b3a4b 50%, #e8d5b5 50%); }
.vc-thumb-corner { background: #fff; }
.vc-thumb-corner::before { content: ''; position: absolute; left: 0; top: 0; border-top: 36px solid #0b6e4f; border-right: 36px solid transparent; }
.vc-thumb-corner::after { content: ''; position: absolute; right: 0; bottom: 0; border-bottom: 30px solid #f4a259; border-left: 30px solid transparent; }
.vc-thumb-monogram { background: #fff; }
.vc-thumb-monogram::before { content: ''; position: absolute; left: 12%; top: 28%; width: 28%; aspect-ratio: 1; border-radius: 50%; background: #1f3a5f; box-shadow: 0 0 0 3px #c9a227; }
.vc-thumb-stack { background: #fff; }
.vc-thumb-stack::before { content: ''; position: absolute; left: 30%; right: 30%; top: 28%; height: 8px; background: #111827; border-radius: 1px; }
.vc-thumb-stack::after { content: ''; position: absolute; left: 42%; right: 42%; top: 48%; height: 3px; background: #9ca3af; }
.vc-thumb-ribbon { background: linear-gradient(90deg, #7a1f2b 14%, #fffcf8 14%); }
.vc-thumb-geometric { background: repeating-linear-gradient(90deg, #042f2e 0 18px, #134e4a 18px 36px); }
.vc-thumb-geometric::after { content: ''; position: absolute; inset: 18% 10%; background: #0f766e; border-radius: 2px; }
.vc-thumb-neon { background: #0a0a0a; box-shadow: inset 0 3px 0 #39ff14, inset 0 -3px 0 #00e5ff; }
.vc-thumb-swiss { background: #fff; }
.vc-thumb-swiss::before { content: ''; position: absolute; left: 0; top: 0; width: 28%; height: 42%; background: #e10600; }
.vc-thumb-swiss::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 4px; background: #111; }
.vc-thumb-crest { background: #fbf8f1; box-shadow: inset 0 0 0 2px #1c2a44; }
.vc-thumb-crest::before { content: ''; position: absolute; left: 50%; top: 18%; width: 14px; height: 14px; transform: translateX(-50%); border-radius: 50%; background: #c5a572; box-shadow: 0 0 0 2px #1c2a44; }
.vc-thumb-cascade { background: linear-gradient(180deg, #0b6e4f 0 28%, #2a9d8f 28% 52%, #084c38 52%); }
.vc-thumb-aurora { background: radial-gradient(circle at 20% 10%, #5b2c6f 0 35%, transparent 36%), radial-gradient(circle at 80% 40%, #1abc9c 0 30%, transparent 31%), #1a0b2e; }
.vc-thumb-marble { background: #f4efe6; box-shadow: inset 0 0 0 2px #c9a227, inset 0 0 0 5px #f4efe6, inset 0 0 0 6px #8b7355; }
.vc-thumb-orbit { background: #fff; }
.vc-thumb-orbit::before { content: ''; position: absolute; left: 10%; top: 22%; width: 34%; aspect-ratio: 1; border-radius: 50%; border: 4px solid #2563eb; box-shadow: inset 0 0 0 10px #fff, inset 0 0 0 14px #f59e0b; }
.vc-thumb-pulse { background: #f0fdfa; }
.vc-thumb-pulse::before { content: ''; position: absolute; left: 10%; top: 20%; bottom: 20%; width: 6px; background: linear-gradient(#0f766e 0 40%, #14b8a6 40% 70%, #0f766e 70%); box-shadow: 10px 8px 0 #14b8a6, 20px -6px 0 #0f766e, 30px 12px 0 #14b8a6; }
.vc-thumb-ledger { background: #fff; }
.vc-thumb-ledger::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: #1e3a5f; }
.vc-thumb-ledger::after { content: ''; position: absolute; left: 12%; right: 12%; top: 38%; height: 2px; background: #94a3b8; }
.vc-thumb-studio { background: linear-gradient(90deg, #ea580c 32%, #fffaf5 32%); }
.vc-thumb-ink { background: #fff; }
.vc-thumb-ink::before { content: 'A'; position: absolute; left: 8%; top: 8%; font-size: 2.4rem; font-weight: 800; color: rgba(17,24,39,.12); line-height: 1; }
.vc-thumb-metro { background: linear-gradient(180deg, #fff 0 78%, #f4a259 78% 82%, #0b6e4f 82%); }
.vc-thumb-prism { background: #fff; }
.vc-thumb-prism::before { content: ''; position: absolute; left: 0; top: 0; border-top: 42px solid #7c3aed; border-right: 42px solid transparent; }
.vc-thumb-prism::after { content: ''; position: absolute; right: 0; bottom: 0; border-bottom: 36px solid #f43f5e; border-left: 36px solid transparent; }
.vc-thumb-velvet { background: #3b0a2e; }
.vc-thumb-velvet::before { content: ''; position: absolute; left: 10%; top: 15%; bottom: 15%; width: 4px; background: #e8b4b8; box-shadow: 6px 0 0 #f5d0c5; }
.vc-thumb-executive { background: #fff; box-shadow: inset 0 0 0 3px #1c2a44, inset 0 0 0 6px #fff, inset 0 0 0 7px #c5a572; }
.vc-thumb-wave { background: linear-gradient(180deg, #0c4a6e 0 48%, #38bdf8 48% 62%, #0284c7 62% 78%, #063554 78%); }

.vc-preview-frame {
  position: relative;
  aspect-ratio: 1050 / 600;
  border-radius: 0.75rem;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(11, 110, 79, 0.06), transparent 55%),
    var(--surface-muted, #f4f7f5);
  border: 1px solid var(--border-color, #dde5df);
}

.vc-preview-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--muted, #6b7280);
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

.vc-preview-placeholder i {
  font-size: 2rem;
  opacity: 0.7;
}

.vc-preview-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.vc-preview-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.55);
}

html[data-theme='dark'] .vc-preview-loading {
  background: rgba(0, 0, 0, 0.35);
}

.vc-panel .invalid-feedback {
  display: none;
}

.vc-panel .invalid-feedback:not(:empty) {
  display: block;
}

.vc-logo-drop {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 6.5rem;
  padding: 1rem 1.15rem;
  border: 1.5px dashed var(--border-color, #c9d6cf);
  border-radius: 0.85rem;
  background: var(--surface-muted, #f4f7f5);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.vc-logo-drop:hover,
.vc-logo-drop.is-dragover,
.vc-logo-box.has-logo .vc-logo-drop {
  border-color: var(--brand, #0b6e4f);
  background: rgba(11, 110, 79, 0.04);
}

.vc-logo-placeholder {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: var(--muted, #6b7280);
  font-size: 0.85rem;
}

.vc-logo-placeholder i {
  font-size: 1.5rem;
  color: var(--brand, #0b6e4f);
  margin-bottom: 0.15rem;
}

.vc-logo-placeholder strong {
  color: var(--text, #1a1a1a);
  font-size: 0.95rem;
}

.vc-logo-preview {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 0.65rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border-color, #dde5df);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vc-logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

html[data-theme='dark'] .vc-logo-preview {
  background: #1a1f1c;
}
