/* ── Reset & base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Dark premium palette ─────────────────────────────────── */
  --bg-primary:          #0B0F19;
  --bg-secondary:        #121826;
  --bg-card:             #161B2E;

  --text-primary:        #E5E7EB;
  --text-secondary:      #C4C9D4;

  --accent-primary:      #7C3AED;
  --accent-primary-soft: rgba(124, 58, 237, 0.15);
  --accent-secondary:    #60A5FA;
  --accent-highlight:    #EAB308;

  --border-soft:         rgba(255, 255, 255, 0.08);

  /* ── Semantic aliases (preserve compatibility with all existing selectors) ── */
  --deep-indigo:   #0B0F19;
  --purple:        #7C3AED;
  --purple-light:  #A78BFA;
  --neon-blue:     #22D3EE;
  --soft-gray:     #0B0F19;
  --text:          #E5E7EB;
  --text-2:        #C4C9D4;
  --text-muted:    #9CA3AF;

  /* Semantic tokens */
  --bg:            var(--bg-primary);
  --card:          var(--bg-card);
  --card-border:   rgba(255, 255, 255, 0.06);
  --card-shadow:   0 4px 24px rgba(0, 0, 0, 0.35), 0 1px 4px rgba(0, 0, 0, 0.2);
  --card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(124, 58, 237, 0.2);

  --accent:        var(--purple);
  --accent-grad:   linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  --accent-soft:   rgba(124, 58, 237, 0.15);

  --success:       #059669;
  --success-soft:  rgba(5, 150, 105, 0.12);
  --error:         #dc2626;
  --error-soft:    rgba(220, 38, 38, 0.1);

  --radius:        16px;
  --radius-sm:     10px;
  --tr:            0.22s ease;
  --nav-h:         64px;
  --container-w:   1100px;
}

html { font-size: 16px; scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Section alternating depth ────────────────────────────────────────── */
.section-alt {
  background: #101526;
}

/* ── Keyframes ────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}
@keyframes progress {
  0%   { width: 5%; }
  25%  { width: 30%; }
  50%  { width: 58%; }
  75%  { width: 80%; }
  100% { width: 95%; }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(1.08); }
}

@keyframes ambientCircuitGlow {
  0% {
    stroke-dashoffset: 230;
    opacity: 0.28;
    filter: drop-shadow(0 0 3px rgba(34, 211, 238, 0.2));
  }
  38% {
    opacity: 0.92;
    filter:
      drop-shadow(0 0 6px rgba(34, 211, 238, 0.72))
      drop-shadow(0 0 18px rgba(96, 165, 250, 0.42));
  }
  100% {
    stroke-dashoffset: -230;
    opacity: 0.28;
    filter: drop-shadow(0 0 4px rgba(124, 58, 237, 0.28));
  }
}

/* ── Ambient circuit background ──────────────────────────────────────── */
.ambient-circuit-bg {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(90deg,
    rgba(0, 0, 0, 0.96) 0%,
    rgba(0, 0, 0, 0.86) 13%,
    rgba(0, 0, 0, 0.2) 24%,
    rgba(0, 0, 0, 0) 33%,
    rgba(0, 0, 0, 0) 67%,
    rgba(0, 0, 0, 0.2) 76%,
    rgba(0, 0, 0, 0.86) 87%,
    rgba(0, 0, 0, 0.96) 100%);
  mask-image: linear-gradient(90deg,
    rgba(0, 0, 0, 0.96) 0%,
    rgba(0, 0, 0, 0.86) 13%,
    rgba(0, 0, 0, 0.2) 24%,
    rgba(0, 0, 0, 0) 33%,
    rgba(0, 0, 0, 0) 67%,
    rgba(0, 0, 0, 0.2) 76%,
    rgba(0, 0, 0, 0.86) 87%,
    rgba(0, 0, 0, 0.96) 100%);
  transition: opacity 0.22s ease-out;
}

.ambient-circuit-bg.is-scrolling {
  opacity: 0.92;
}

.ambient-circuit-bg::before,
.ambient-circuit-bg::after {
  display: none;
}

.ambient-circuit-layer {
  position: absolute;
  top: 12vh;
  width: min(38vw, 560px);
  height: 76vh;
  opacity: 1;
}

.ambient-circuit-layer--left {
  left: -18vw;
}

.ambient-circuit-layer--right {
  right: -18vw;
}

.ambient-circuit-traces path,
.ambient-circuit-glow path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ambient-circuit-traces path {
  opacity: 0;
  stroke-width: 1.15;
  stroke-dasharray: none;
  transition: opacity 0.18s ease-out, stroke-width 0.18s ease-out;
}

.ambient-circuit-bg.is-scrolling .ambient-circuit-traces path {
  opacity: 0.32;
  stroke-width: 1.25;
}

.ambient-circuit-glow path {
  opacity: 0;
  stroke-width: 2.2;
  stroke-dasharray: 92 260;
  stroke-dashoffset: 230;
}

.ambient-circuit-bg.is-scrolling .ambient-circuit-glow path {
  animation: ambientCircuitGlow 1.55s linear infinite;
}

.ambient-circuit-bg.is-scrolling .ambient-circuit-layer--right .ambient-circuit-glow path {
  animation-duration: 1.7s;
  animation-delay: -0.45s;
}

.ambient-circuit-bg.is-scrolling .ambient-circuit-glow .ambient-circuit-soft {
  stroke-width: 1.7;
  stroke-dasharray: 72 260;
  animation-duration: 1.95s;
}

.ambient-circuit-bg:not(.is-scrolling) .ambient-circuit-glow path {
  animation: none;
}

body > :not(.ambient-circuit-bg) {
  position: relative;
  z-index: 1;
}

body > .navbar {
  z-index: 100;
}

body > .auth-page {
  z-index: 3;
}

@media (max-width: 1180px) {
  .ambient-circuit-bg {
    -webkit-mask-image: linear-gradient(90deg,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(0, 0, 0, 0.42) 13%,
      rgba(0, 0, 0, 0) 25%,
      rgba(0, 0, 0, 0) 75%,
      rgba(0, 0, 0, 0.42) 87%,
      rgba(0, 0, 0, 0.9) 100%);
    mask-image: linear-gradient(90deg,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(0, 0, 0, 0.42) 13%,
      rgba(0, 0, 0, 0) 25%,
      rgba(0, 0, 0, 0) 75%,
      rgba(0, 0, 0, 0.42) 87%,
      rgba(0, 0, 0, 0.9) 100%);
  }

  .ambient-circuit-layer {
    width: 42vw;
  }

  .ambient-circuit-layer--left {
    left: -28vw;
  }

  .ambient-circuit-layer--right {
    right: -28vw;
  }
}

@media (max-width: 760px) {
  .ambient-circuit-bg {
    -webkit-mask-image: linear-gradient(90deg,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.16) 18%,
      rgba(0, 0, 0, 0) 30%,
      rgba(0, 0, 0, 0) 70%,
      rgba(0, 0, 0, 0.16) 82%,
      rgba(0, 0, 0, 0.72) 100%);
    mask-image: linear-gradient(90deg,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.16) 18%,
      rgba(0, 0, 0, 0) 30%,
      rgba(0, 0, 0, 0) 70%,
      rgba(0, 0, 0, 0.16) 82%,
      rgba(0, 0, 0, 0.72) 100%);
  }

  .ambient-circuit-bg.is-scrolling {
    opacity: 0.62;
  }

  .ambient-circuit-layer {
    width: 62vw;
    top: 14vh;
    height: 68vh;
  }

  .ambient-circuit-layer--left {
    left: -52vw;
  }

  .ambient-circuit-layer--right {
    right: -52vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-circuit-bg,
  .ambient-circuit-layer {
    transform: none !important;
  }

  .ambient-circuit-traces path {
    animation: none !important;
  }

  .ambient-circuit-bg.is-scrolling {
    opacity: 0.24;
  }
}

/* ── Reveal on scroll (driven by IntersectionObserver in JS) ──────────── */
/* NOTE: opacity/transform initial state is set by JS, not here.
   This ensures content is always visible if JS is slow or fails. */
.reveal {
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.will-animate {
  opacity: 0;
  transform: translateY(24px);
}
.reveal.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ── Container ────────────────────────────────────────────────────────── */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Utility ──────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

.grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ════════════════════════════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
  height: var(--nav-h);
  transition: box-shadow var(--tr);
}

.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.nav-inner {
  max-width: min(100% - 2rem, 1920px);
  margin: 0 auto;
  padding: 0 clamp(0.75rem, 1.7vw, 1.35rem);
  height: 100%;
  display: flex;
  align-items: center;
  gap: clamp(0.45rem, 0.9vw, 0.85rem);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.header-left {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.35rem, 0.7vw, 0.65rem);
  flex: 0 0 auto;
  min-width: max-content;
}

/* ── Brand logo (navbar + footer) ───────────────────────────────────── */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.28rem, 0.45vw, 0.35rem);
  text-decoration: none;
  flex: 0 0 auto;
  min-width: max-content;
}

.brand-icon {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.brand-text {
  font-size: clamp(19px, 1.45vw, 22px);
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0;
  color: var(--text);
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: clamp(0.28rem, 0.45vw, 0.35rem);
}

.brand-name {
  color: #ffffff;
}

.brand-ai {
  font-size: 0.72em;
  font-style: italic;
}

.brand-inline {
  display: inline-flex;
  align-items: baseline;
  gap: clamp(0.28rem, 0.45vw, 0.35rem);
  color: #ffffff;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}

.brand-inline--inline {
  vertical-align: -0.04em;
}

.brand-text strong,
.brand-ai {
  font-weight: 800;
  background: linear-gradient(90deg, #7C3AED, #22D3EE);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-text--light {
  color: #ffffff;
}

.footer-brand-logo {
  margin-bottom: 0.25rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: clamp(0.08rem, 0.25vw, 0.22rem);
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  overflow: visible;
}

.nav-links li {
  flex: 0 0 auto;
  min-width: max-content;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  color: var(--text-2);
  text-decoration: none;
  font-size: clamp(0.78rem, 0.9vw, 0.88rem);
  font-weight: 500;
  padding: 0.4rem clamp(0.42rem, 0.75vw, 0.62rem);
  border-radius: var(--radius-sm);
  transition: color var(--tr), background var(--tr);
  white-space: nowrap;
  max-width: none;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-menu-only {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.35rem, 0.75vw, 0.55rem);
  flex: 0 0 auto;
  margin-left: auto;
  min-width: max-content;
}

.header-lang-switcher {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: clamp(1rem, 1.6vw, 1.5rem);
  padding-left: clamp(0.9rem, 1.4vw, 1.25rem);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-grad);
  color: #fff;
  text-decoration: none;
  font-size: clamp(0.78rem, 0.9vw, 0.85rem);
  font-weight: 700;
  padding: 0.45rem clamp(0.75rem, 1.2vw, 1.15rem);
  border-radius: 99px;
  transition: opacity var(--tr), transform var(--tr), box-shadow var(--tr);
  box-shadow: 0 3px 12px rgba(124, 58, 237, 0.3);
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(124, 58, 237, 0.4);
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.34);
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}

.language-option {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  line-height: 1;
  padding: 0.28rem 0.38rem;
  transition: background var(--tr), color var(--tr), box-shadow var(--tr);
}

.language-option:hover,
.language-option.active {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 3px 12px rgba(124, 58, 237, 0.3);
}

/* ── Auth buttons ────────────────────────────────────────────────────── */
.nav-auth {
  display: flex;
  align-items: center;
  gap: clamp(0.3rem, 0.7vw, 0.5rem);
  flex-shrink: 0;
}

.nav-menu-auth {
  align-items: center;
  gap: 0.5rem;
}

.nav-btn-login,
.nav-btn-signup,
.nav-btn-account,
.nav-btn-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  font-family: inherit;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--tr), border-color var(--tr), background var(--tr), color var(--tr), box-shadow var(--tr);
}

.nav-btn-login {
  background: rgba(124, 58, 237, 0.12);
  border: 1.5px solid rgba(167, 139, 250, 0.34);
  color: #ddd6fe;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.38rem clamp(0.58rem, 0.9vw, 0.9rem);
  border-radius: 99px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-btn-account {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 650;
  gap: 0.42rem;
  padding: 0.18rem clamp(0.58rem, 0.9vw, 0.8rem) 0.18rem 0.2rem;
  border-radius: 99px;
  cursor: pointer;
}

.nav-avatar,
.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  user-select: none;
}

.nav-avatar {
  width: 30px;
  height: 30px;
  font-size: 0.78rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 4px 12px rgba(0, 0, 0, 0.24);
}

.nav-btn-signup {
  background: rgba(124, 58, 237, 0.12);
  border: 1.5px solid rgba(167, 139, 250, 0.34);
  color: #ddd6fe;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.38rem clamp(0.62rem, 1vw, 1rem);
  border-radius: 99px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-btn-logout {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 650;
  padding: 0.38rem clamp(0.58rem, 0.9vw, 0.9rem);
  border-radius: 99px;
  cursor: pointer;
}

.nav-user {
  max-width: clamp(7rem, 12vw, 11rem);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-credit-status {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 34px;
  padding: 0.25rem 0.62rem;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.12;
  white-space: nowrap;
}

.nav-credit-status small {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.15;
}

.nav-credit-remaining {
  color: inherit;
}

.nav-credit-remaining.credit-remaining-high {
  color: #5FD38D;
}

.nav-credit-remaining.credit-remaining-mid {
  color: #E6C85A;
}

.nav-credit-remaining.credit-remaining-low {
  color: #F08080;
}

.nav-credit-status.hidden {
  display: none;
}

.nav-btn-login:hover,
.nav-btn-signup:hover,
.nav-btn-account:hover,
.nav-btn-logout:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(196, 181, 253, 0.56);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Mobile burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  margin-left: 0;
  flex: 0 0 auto;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--tr), opacity var(--tr);
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ════════════════════════════════════════════════════════════════════════
   HOMEPAGE GLOBAL BANNER
   ══════════════════════════════════════════════════════════════════════ */
.global-banner-wrap {
  position: relative;
  z-index: 3;
  max-width: 920px;
  margin: 0 auto 2.85rem;
  padding: 0;
  animation: globalBannerFade 0.32s ease both;
}

.global-banner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.62rem;
  min-height: 38px;
  padding: 0.42rem 0.6rem 0.42rem 0.62rem;
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(34, 211, 238, 0.07)),
    rgba(18, 24, 38, 0.82);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.global-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 8% 20%, rgba(167, 139, 250, 0.16), transparent 36%);
}

.global-banner-icon {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 10px;
  color: #F8FAFC;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(249, 115, 22, 0.78)),
    rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 8px 18px rgba(245, 158, 11, 0.13);
  flex: 0 0 auto;
}

.global-banner-icon svg {
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
}

.global-banner--offer .global-banner-icon {
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.96), rgba(236, 72, 153, 0.82)),
    rgba(124, 58, 237, 0.18);
  border-color: rgba(216, 180, 254, 0.3);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.045) inset,
    0 8px 18px rgba(236, 72, 153, 0.13);
}

.global-banner--announcement .global-banner-icon {
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.96), rgba(34, 211, 238, 0.78)),
    rgba(59, 130, 246, 0.15);
  border-color: rgba(147, 197, 253, 0.3);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.045) inset,
    0 8px 18px rgba(34, 211, 238, 0.12);
}

.global-banner-text {
  position: relative;
  z-index: 1;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

[data-banner-lang] {
  display: none;
}

html:not([lang="de"]) [data-banner-lang="en"],
html[lang="de"] [data-banner-lang="de"] {
  display: inline;
}

.global-banner-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.36rem;
  min-height: 26px;
  padding: 0.27rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.26);
  background: rgba(124, 58, 237, 0.18);
  color: #F5F3FF;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--tr), border-color var(--tr), background var(--tr), box-shadow var(--tr);
}

.global-banner-cta-icon {
  display: block;
  flex: 0 0 auto;
  opacity: 0.88;
  transition: transform var(--tr), opacity var(--tr);
}

.global-banner-cta:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(124, 58, 237, 0.24);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.2);
}

.global-banner-cta:hover .global-banner-cta-icon {
  opacity: 1;
  transform: translate(1px, -1px);
}

.global-banner-close {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color var(--tr), background var(--tr), border-color var(--tr);
}

.global-banner-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

@keyframes globalBannerFade {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .global-banner-wrap { margin-bottom: 2.1rem; }
  .global-banner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.56rem;
    padding: 0.56rem;
    border-radius: 15px;
  }
  .global-banner-cta {
    grid-column: 2 / 3;
    justify-self: start;
    margin-top: 0.15rem;
  }
  .global-banner-close {
    grid-column: 3;
    grid-row: 1;
  }
  .global-banner-text { font-size: 0.82rem; }
  .tool-unavailable-notice {
    margin-bottom: 1.35rem;
    padding: 0.56rem;
    border-radius: 15px;
    align-items: flex-start;
  }
  .tool-unavailable-text { font-size: 0.82rem; }
}

/* ════════════════════════════════════════════════════════════════════════
   HOMEPAGE PROMOTION POPUP
   ══════════════════════════════════════════════════════════════════════ */
.promo-popup-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw;
  min-height: 100dvh;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  margin: 0;
  background:
    radial-gradient(circle at 50% 22%, rgba(124, 58, 237, 0.08), transparent 36%),
    rgba(5, 8, 15, 0.18);
  backdrop-filter: blur(1.5px);
  animation: promoBackdropIn 0.22s ease both;
}

.promo-popup-backdrop[hidden] {
  display: none !important;
}

body.promo-popup-open {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

.promo-popup-shell {
  position: relative;
  width: min(94vw, 520px);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(22, 27, 46, 0.9), rgba(11, 15, 25, 0.88)),
    var(--bg-card);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.38),
    0 0 48px rgba(124, 58, 237, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.promo-popup-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 10%, rgba(34, 211, 238, 0.15), transparent 28%),
    radial-gradient(circle at 88% 0%, rgba(167, 139, 250, 0.22), transparent 30%);
}

.promo-popup-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: background var(--tr), color var(--tr), border-color var(--tr), transform var(--tr);
}

.promo-popup-close:hover {
  transform: translateY(-1px);
  border-color: rgba(167, 139, 250, 0.24);
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
}

.promo-popup-track {
  position: relative;
  z-index: 1;
}

.promo-popup-card {
  display: flex;
  min-height: 0;
  padding: 1.9rem 2rem 1.65rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.promo-popup-card--with-cta {
  padding-bottom: 1.55rem;
}

.promo-popup-card--no-cta {
  padding-top: 2.15rem;
  padding-bottom: 1.85rem;
}

.promo-popup-card[hidden] {
  display: none;
}

.promo-popup-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0;
  border-radius: 17px;
  color: #F8FAFC;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(34, 211, 238, 0.75)),
    rgba(124, 58, 237, 0.16);
  box-shadow:
    0 14px 34px rgba(124, 58, 237, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.promo-popup-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
}

.promo-popup-icon--sparkles,
.promo-popup-card--offer .promo-popup-icon {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.96), rgba(236, 72, 153, 0.82));
  box-shadow: 0 14px 34px rgba(236, 72, 153, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.promo-popup-icon--rocket,
.promo-popup-icon--video,
.promo-popup-card--new_feature .promo-popup-icon {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(34, 211, 238, 0.78));
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.promo-popup-icon--calendar,
.promo-popup-card--coming_soon .promo-popup-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(167, 139, 250, 0.82));
}

.promo-popup-icon--gift,
.promo-popup-card--upgrade .promo-popup-icon,
.promo-popup-card--pricing .promo-popup-icon {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(234, 179, 8, 0.78));
}

.promo-popup-icon--lock,
.promo-popup-card--notice .promo-popup-icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.93), rgba(249, 115, 22, 0.74));
}

.promo-popup-card--accent-purple .promo-popup-icon {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.96), rgba(167, 139, 250, 0.78));
  box-shadow: 0 14px 34px rgba(124, 58, 237, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.promo-popup-card--accent-blue .promo-popup-icon {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.78));
  box-shadow: 0 14px 34px rgba(59, 130, 246, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.promo-popup-card--accent-cyan .promo-popup-icon {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.95), rgba(34, 211, 238, 0.75));
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.promo-popup-card--accent-amber .promo-popup-icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.93), rgba(249, 115, 22, 0.74));
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.promo-popup-card--accent-pink .promo-popup-icon {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(236, 72, 153, 0.82));
  box-shadow: 0 14px 34px rgba(236, 72, 153, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.promo-popup-card--accent-green .promo-popup-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.94), rgba(34, 197, 94, 0.72));
  box-shadow: 0 14px 34px rgba(16, 185, 129, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.promo-popup-card--accent-indigo .promo-popup-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.96), rgba(79, 70, 229, 0.78));
  box-shadow: 0 14px 34px rgba(99, 102, 241, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.promo-popup-card--accent-orange .promo-popup-icon {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.95), rgba(251, 146, 60, 0.78));
  box-shadow: 0 14px 34px rgba(249, 115, 22, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.promo-popup-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 auto 0.72rem;
  padding: 0.22rem 0.56rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background: rgba(124, 58, 237, 0.12);
  color: #DDD6FE;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
  box-shadow: 0 10px 22px rgba(124, 58, 237, 0.1);
}

.promo-popup-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
  max-width: 440px;
  margin: 0 auto 1rem;
  text-align: left;
}

.promo-popup-heading-copy {
  min-width: 0;
}

.promo-popup-heading .promo-popup-badge {
  margin: 0 0 0.32rem;
}

.promo-popup-title {
  max-width: 420px;
  margin: 0;
  color: transparent;
  background: linear-gradient(135deg, #E0E7FF 0%, #A78BFA 46%, #60A5FA 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(1.28rem, 3vw, 1.78rem);
  font-style: italic;
  line-height: 1.16;
  letter-spacing: -0.012em;
  font-weight: 650;
}

.promo-popup-body {
  display: block;
  width: min(100%, 430px);
  max-width: 430px;
  margin: 0.05rem auto 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
  text-align: center;
  text-wrap: pretty;
}

.promo-popup-body [data-promo-lang] {
  width: 100%;
}

[data-promo-lang] {
  display: none;
}

html:not([lang="de"]) [data-promo-lang="en"],
html[lang="de"] [data-promo-lang="de"] {
  display: inline;
}

.promo-popup-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  margin: 1.18rem auto 0;
  padding: 0.56rem 0.84rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.9), rgba(91, 33, 182, 0.82));
  color: #FFFFFF;
  font-size: 0.84rem;
  font-weight: 680;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.18);
  transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
}

.promo-popup-cta:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.36);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.22);
}

.promo-popup-cta svg {
  flex: 0 0 auto;
  transition: transform var(--tr);
}

.promo-popup-cta:hover svg {
  transform: translate(1px, -1px);
}

.promo-popup-controls {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.15rem 1.35rem 1.35rem;
}

.promo-popup-nav {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  transition: background var(--tr), color var(--tr), border-color var(--tr), transform var(--tr);
}

.promo-popup-nav:hover {
  transform: translateY(-1px);
  border-color: rgba(167, 139, 250, 0.22);
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
}

.promo-popup-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.promo-popup-dot {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: width var(--tr), background var(--tr);
}

.promo-popup-dot.is-active {
  width: 22px;
  background: linear-gradient(90deg, var(--purple-light), var(--neon-blue));
}

@keyframes promoBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 560px) {
  .promo-popup-backdrop {
    align-items: end;
    padding: 1rem;
  }
  .promo-popup-shell {
    width: 100%;
    border-radius: 22px;
  }
  .promo-popup-card {
    min-height: 0;
    padding: 1.65rem 1.35rem 1.35rem;
  }
  .promo-popup-card--no-cta {
    padding-top: 1.85rem;
    padding-bottom: 1.55rem;
  }
  .promo-popup-heading {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 0.75rem;
  }
  .promo-popup-heading .promo-popup-badge {
    margin: 0 auto 0.35rem;
  }
  .promo-popup-close {
    top: 0.7rem;
    right: 0.7rem;
  }
  .promo-popup-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
  }
  .promo-popup-title {
    font-size: clamp(1.45rem, 8vw, 2rem);
  }
  .promo-popup-body {
    width: min(100%, 390px);
    font-size: 0.94rem;
    line-height: 1.6;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════════════ */
.hero-section {
  position: relative;
  padding: 7rem 0 5.5rem;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 30%, rgba(124, 58, 237, 0.12), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(96, 165, 250, 0.10), transparent 45%),
    var(--bg-primary);
}

.hero-section--with-banner {
  padding-top: 3rem;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  animation: glowPulse 6s ease-in-out infinite;
}

.hero-glow-1 {
  width: 480px;
  height: 480px;
  background: rgba(124, 58, 237, 0.06);
  top: -120px;
  left: -80px;
}

.hero-glow-2 {
  width: 380px;
  height: 380px;
  background: rgba(34, 211, 238, 0.04);
  bottom: -60px;
  right: -60px;
  animation-delay: 3s;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 99px;
  padding: 0.35rem 1.05rem;
  margin-bottom: 1.3rem;
  border: 1px solid rgba(124, 58, 237, 0.12);
}

.hero-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 486;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 900px;
  margin: 0 auto 0.75rem;
  overflow-wrap: break-word;
}

.hero-tagline {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 400;
  color: var(--text-muted);
  max-width: 980px;
  margin: 0 auto 0.35rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  text-align: center;
}

.gradient-text {
  display: block;
  background: linear-gradient(90deg, #7C3AED, #22D3EE);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-muted);
  font-size: clamp(0.92rem, 1.35vw, 1rem);
  font-style: italic;
  max-width: 980px;
  margin: 0 auto 2.1rem;
  line-height: 1.5;
  opacity: 0.76;
  text-align: center;
  overflow-wrap: break-word;
}

/* ── German hero text layout — DE strings are ~15% longer; reduce font and widen the box */
html[lang="de"] .hero-title {
  font-size: clamp(1.6rem, 2.9vw, 2rem);
  line-height: 1.22;
  max-width: 900px;
}

html[lang="de"] .hero-tagline {
  max-width: 720px;
}

html[lang="de"] .hero-sub {
  max-width: 980px;
  font-size: clamp(0.82rem, 1.1vw, 0.9rem);
}

.hero-ctas {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent-grad);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.8rem 1.75rem;
  text-decoration: none;
  transition: opacity var(--tr), transform var(--tr), box-shadow var(--tr);
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.35);
  font-family: inherit;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
  width: auto;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.45);
  opacity: 0.95;
}

.btn-primary:hover:not(:disabled)::after {
  opacity: 1;
  animation: shimmer 1.2s ease infinite;
}

.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Override width inside form to full */
form .btn-primary { width: 100%; }

.btn-icon { font-size: 0.9rem; }

.btn-ghost-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1.5px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-weight: 600;
  padding: 0.8rem 1.75rem;
  text-decoration: none;
  transition: background var(--tr), border-color var(--tr), transform var(--tr);
  font-size: 1rem;
  font-family: inherit;
}

.btn-ghost-hero:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ── Secondary button (ghost style, neutral) ── */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.8rem 1.75rem;
  text-decoration: none;
  transition: border-color var(--tr), background var(--tr), transform var(--tr);
  font-family: inherit;
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.btn-icon { font-size: 0.9rem; }

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.trust-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 99px;
  padding: 0.3rem 0.85rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* ════════════════════════════════════════════════════════════════════════
   SHARED SECTION CHROME
   ══════════════════════════════════════════════════════════════════════ */
.section { padding: 3.5rem 0; }

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-chip {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 99px;
  padding: 0.35rem 1.05rem;
  margin-bottom: 0.9rem;
  border: 1px solid rgba(124, 58, 237, 0.12);
}

.section-title {
  font-size: clamp(1.55rem, 3.5vw, 2.2rem);
  font-weight: 567;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ════════════════════════════════════════════════════════════════════════
   TOOLS SECTION
   ══════════════════════════════════════════════════════════════════════ */
.tools-section {
  background: var(--bg-secondary);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

.tool-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--tr), transform var(--tr);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
}

.tool-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}

.tool-card--active {
  border-color: rgba(124, 58, 237, 0.2);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.15);
}

.tool-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.ecosystem-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.13rem 0.48rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 1.25;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(229, 231, 235, 0.78);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.075);
  opacity: 0.9;
  flex-shrink: 0;
}

.ecosystem-badge--education {
  color: rgba(125, 211, 252, 0.86);
  background: rgba(14, 165, 233, 0.075);
  border-color: rgba(14, 165, 233, 0.16);
}

.ecosystem-badge--career {
  color: rgba(196, 181, 253, 0.88);
  background: rgba(124, 58, 237, 0.075);
  border-color: rgba(124, 58, 237, 0.16);
}

.ecosystem-badge--business {
  color: rgba(110, 231, 183, 0.84);
  background: rgba(16, 185, 129, 0.075);
  border-color: rgba(16, 185, 129, 0.16);
}

.ecosystem-badge--tech {
  color: rgba(251, 191, 36, 0.86);
  background: rgba(234, 179, 8, 0.075);
  border-color: rgba(234, 179, 8, 0.16);
}

.ecosystem-badge--travel {
  color: rgba(45, 212, 191, 0.88);
  background: rgba(20, 184, 166, 0.07);
  border-color: rgba(20, 184, 166, 0.16);
}

.tool-icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: 12px;
  flex-shrink: 0;
}

.tool-icon--active {
  background: linear-gradient(135deg, rgba(124,58,237,0.15) 0%, rgba(34,211,238,0.12) 100%);
}

.tool-icon--datapilot {
  color: #22D3EE;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(16, 185, 129, 0.12));
}

.tool-icon--datapilot svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-icon--archflow {
  color: #22d3ee;
  background: linear-gradient(135deg, rgba(124,58,237,0.15) 0%, rgba(34,211,238,0.12) 100%);
}

.tool-icon--archflow svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-icon--shopwise {
  color: #22d3ee;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(34, 211, 238, 0.13));
}

.tool-icon--shopwise svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-icon--shopwise .shopwise-card {
  fill: rgba(229, 231, 255, 0.72);
  stroke: rgba(124, 58, 237, 0.42);
}

.tool-icon--shopwise .shopwise-card--middle {
  fill: rgba(238, 242, 255, 0.86);
  stroke: rgba(34, 211, 238, 0.44);
}

.tool-icon--shopwise .shopwise-card--front {
  fill: #4657ff;
  stroke: rgba(167, 139, 250, 0.9);
}

.tool-icon--shopwise .shopwise-ray {
  stroke: #7c8cff;
  stroke-width: 2.2;
}

.tool-icon--shopwise .shopwise-card-line {
  stroke: rgba(219, 234, 254, 0.82);
  stroke-width: 1.35;
}

.tool-icon--shopwise .shopwise-bag {
  fill: #fff;
  stroke: none;
}

.tool-icon--shopwise .shopwise-bag-handle {
  stroke: #fff;
  stroke-width: 1.8;
}

.tool-icon--shopwise .shopwise-check-disc {
  fill: #4657ff;
  stroke: none;
}

.tool-icon--shopwise .shopwise-check {
  stroke: #fff;
  stroke-width: 1.7;
}

.tool-icon--travia {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18) 0%, rgba(49, 93, 255, 0.14) 100%);
  overflow: hidden;
  padding: 0;
}

.tool-icon--travia svg {
  width: 44px;
  height: 44px;
  display: block;
  border-radius: 12px;
}

.tool-icon--mailcraft {
  background:
    radial-gradient(circle at 26% 18%, rgba(167, 139, 250, 0.28), rgba(167, 139, 250, 0) 42%),
    linear-gradient(145deg, #2C2446 0%, #1F2437 54%, #151B2B 100%);
  box-shadow:
    inset 0 0 0 1px rgba(167, 139, 250, 0.24),
    0 10px 22px rgba(2, 6, 23, 0.22);
}

.tool-icon--mailcraft svg {
  width: 40px;
  height: 40px;
  display: block;
}

.tool-icon-mailcraft {
  width: 40px;
  height: 40px;
  display: block;
}

.tool-status {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  white-space: nowrap;
  flex-shrink: 0;
}

.tool-status--active {
  background: rgba(124, 58, 237, 0.08);
  color: var(--accent);
  border-color: rgba(124, 58, 237, 0.2);
}

.tool-status--beta {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.3);
}

.tool-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.tool-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.tool-cta {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  margin-top: auto;     /* pins CTA to bottom of flex card */
  padding-top: 0.5rem;
  transition: color var(--tr);
}

.tool-cta:hover { color: var(--deep-indigo); }

/* ════════════════════════════════════════════════════════════════════════
   HOW IT WORKS
   ══════════════════════════════════════════════════════════════════════ */
.hiw-section { background: var(--bg); }

.hiw-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
}

.hiw-grid::before {
  content: '';
  position: absolute;
  top: 2.1rem;
  left: calc(12.5% + 0.5rem);
  right: calc(12.5% + 0.5rem);
  height: 2px;
  background: linear-gradient(90deg, var(--purple) 0%, var(--neon-blue) 100%);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.hiw-card {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.75rem 1.4rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--tr), transform var(--tr);
}

.hiw-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}

.hiw-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 auto 0.9rem;
}

.hiw-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.hiw-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ════════════════════════════════════════════════════════════════════════
   GENERATOR SECTION
   ══════════════════════════════════════════════════════════════════════ */
.generator-section {
  background: var(--bg-secondary);
  padding-top: 1.25rem;
  padding-bottom: 4rem;
}

.generator-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.generator-layout--single {
  grid-template-columns: 1fr;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Generator card (form) ── */
.generator-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

.tool-output-block {
  color: var(--text-secondary);
}

.draft-field {
  border-top: 1px solid var(--card-border);
  padding-top: 0.9rem;
  margin-top: 0.9rem;
}

.draft-field:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.draft-field strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.draft-field p {
  margin: 0 0 0.6rem;
  line-height: 1.7;
}

.draft-field ul {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
}

/* ── Form fields ── */
.field {
  margin-bottom: 1.2rem;
}

.field--full {
  width: 100%;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.field label {
  display: block;
  font-size: 0.81rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

.req { color: var(--accent); }
.opt { color: var(--text-muted); font-weight: 400; font-size: 0.78rem; }

.field input,
.field select,
.field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color var(--tr), box-shadow var(--tr), background var(--tr);
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.field input[type="checkbox"] {
  width: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  appearance: auto;
  -webkit-appearance: auto;
  transition: none;
  flex-shrink: 0;
}

.field textarea {
  resize: vertical;
  min-height: 7rem;
  line-height: 1.6;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
  cursor: pointer;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--text-muted); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.field-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* ── ResearchDeck adaptive-slide info tooltip ── */
.rd-slide-hint-wrap {
  display: flex;
  align-items: center;
  gap: 0.28rem;
}

.rd-info-tip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.rd-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s;
  vertical-align: middle;
}

.rd-info-icon:hover,
.rd-info-icon:focus-visible {
  opacity: 1;
  outline: none;
}

.rd-info-tooltip {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: #1F1F2E;
  color: #D1D5DB;
  font-size: 0.72rem;
  line-height: 1.5;
  white-space: normal;
  width: 230px;
  padding: 0.5rem 0.7rem;
  border-radius: 7px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.38);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 200;
}

.rd-info-tooltip__title {
  display: block;
  font-size: 0.73rem;
  font-weight: 600;
  color: #F3F4F6;
  margin-bottom: 0.28rem;
}

.rd-info-tooltip__body {
  display: block;
}

.rd-info-tip-wrap:hover .rd-info-tooltip,
.rd-info-tip-wrap:focus-within .rd-info-tooltip,
.rd-info-tip-wrap.rd-tip-open .rd-info-tooltip {
  opacity: 1;
  visibility: visible;
}

.form-helper-text {
  font-size: 0.82rem;
  color: var(--text-2);
  background: rgba(124, 58, 237, 0.08);
  border-left: 3px solid #7C3AED;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.55rem 0.85rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

/* ── File input ── */
.file-input-hidden {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.file-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px dashed rgba(124, 58, 237, 0.45);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.55rem 0.9rem;
  flex: 1;
  transition: border-color var(--tr), background var(--tr), color var(--tr);
  min-width: 0;
}

.file-label:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.file-label.has-file {
  border-style: solid;
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--success);
}

#fileLabelText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-clear {
  background: transparent;
  border: 1.5px solid var(--border-soft);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.7rem;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--tr), color var(--tr);
  padding: 0;
  font-family: inherit;
}

.file-clear:hover { border-color: var(--error); color: var(--error); }

/* ── Error banner ── */
.error-banner {
  background: var(--error-soft);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-sm);
  color: var(--error);
  font-size: 0.85rem;
  padding: 0.65rem 0.9rem;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  white-space: pre-line;
}

/* ── Handbook timing note ── */
.handbook-timing-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(139, 92, 246, 0.07);
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ── Brand infinity button spinner ── */
.spinner {
  display: inline-block;
  width: 28px;
  height: 12px;
  flex-shrink: 0;
  vertical-align: middle;
}

.btn-inf-track { opacity: 0.25; stroke-width: 2.5; }

.btn-inf-arc {
  stroke-dasharray: 0.38 0.62;
  animation: btnSpinnerTravel 1.8s linear infinite;
  stroke-width: 2.5;
}

.btn-inf-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: navSpinnerDotPulse 1.6s ease-in-out infinite;
}

@keyframes btnSpinnerTravel {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-inf-arc { animation-duration: 5s; }
  .btn-inf-dot { animation: none; }
}

/* ── Progress row ── */
.progress-row {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}

.progress-bar-wrap {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.progress-bar {
  height: 100%;
  background: var(--accent-grad);
  border-radius: 99px;
  width: 5%;
  transition: width 0.6s ease;
}

.progress-bar.running {
  animation: progress 18s ease forwards;
}

.progress-steps {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  flex-wrap: wrap;
}

.step {
  color: var(--text-muted);
  transition: color var(--tr), font-weight var(--tr);
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
}

.step.active {
  color: var(--accent);
  font-weight: 700;
  background: var(--accent-soft);
  animation: pulse 1.4s ease infinite;
}

.step.done { color: var(--success); font-weight: 600; }

.step-sep { color: var(--text-muted); font-size: 0.65rem; }

/* ── Download row ── */
.download-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.success-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 99px;
  padding: 0.4rem 0.9rem;
  width: fit-content;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: var(--success);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.7rem 1.3rem;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--tr), transform var(--tr);
  font-family: inherit;
  width: 100%;
  box-shadow: 0 3px 12px rgba(5, 150, 105, 0.3);
}

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

.btn-ghost {
  display: block;
  width: 100%;
  background: transparent;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  cursor: pointer;
  transition: border-color var(--tr), color var(--tr), background var(--tr);
  font-family: inherit;
  text-align: center;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Auth pages ──────────────────────────────────────────────────────── */
.auth-page {
  position: relative;
  z-index: 3;
  min-height: calc(100vh - var(--nav-h));
  padding: calc(var(--nav-h) + 3rem) 1.25rem 4rem;
  overflow: hidden;
}

.auth-page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 0;
  width: 100vw;
  height: clamp(8rem, 18vw, 13rem);
  transform: translateX(-50%);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-soft);
}

.auth-page::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 0;
  width: 100vw;
  height: clamp(8rem, 18vw, 13rem);
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 18%, rgba(124, 58, 237, 0.1), transparent 46%);
  pointer-events: none;
}

.auth-page--signup {
  --signup-top-band-height: clamp(8rem, 18vw, 13rem);
  padding-top: calc(var(--signup-top-band-height) + 1.15rem);
}

.auth-page--signup::before,
.auth-page--signup::after {
  height: var(--signup-top-band-height);
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  margin: 0 auto;
}

.auth-shell--signup {
  width: min(100%, 480px);
}

.auth-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(13, 19, 34, 0.92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.auth-shell--signup .auth-panel {
  width: 100%;
  margin: 0 auto;
}

.signup-offer-banner {
  position: absolute;
  top: calc(var(--signup-top-band-height) / 2);
  left: 50%;
  z-index: 2;
  width: max-content;
  max-width: calc(100vw - 2.5rem);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.62rem;
  margin: 0;
  padding: 0.62rem 0.85rem;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(34, 211, 238, 0.08)),
    rgba(18, 24, 38, 0.84);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.signup-offer-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #F8FAFC;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.96), rgba(236, 72, 153, 0.82)),
    rgba(124, 58, 237, 0.18);
  border: 1px solid rgba(216, 180, 254, 0.3);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.045) inset,
    0 8px 18px rgba(236, 72, 153, 0.13);
}

.signup-offer-icon svg {
  display: block;
}

.signup-offer-text {
  min-width: 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .auth-page--signup {
    padding-top: calc(var(--signup-top-band-height) + 1rem);
  }

  .signup-offer-banner {
    width: calc(100vw - 2.5rem);
    max-width: none;
  }

  .signup-offer-text {
    white-space: normal;
  }
}

.auth-copy {
  margin-bottom: 1.35rem;
}

.auth-copy .section-chip {
  display: table;
  margin-left: auto;
  margin-right: auto;
}

.auth-title {
  margin: 0.55rem 0 0.55rem;
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  line-height: 1.04;
}

.auth-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-field {
  display: grid;
  gap: 0.42rem;
}

.auth-field label,
.auth-check {
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font: inherit;
  padding: 0.75rem 0.9rem;
  outline: none;
  transition: border-color var(--tr), box-shadow var(--tr), background var(--tr);
}

.auth-field input:focus {
  border-color: rgba(96, 165, 250, 0.7);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14);
}

.auth-hint,
.auth-privacy-note {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.auth-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 0.65rem;
  line-height: 1.45;
}

.auth-check input {
  width: 18px;
  height: 18px;
  margin-top: 0.1rem;
  accent-color: var(--accent-primary);
}

.auth-inline-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--purple-light);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  line-height: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-inline-link:hover {
  color: #ffffff;
}

.auth-row--split {
  display: flex;
  justify-content: flex-end;
}

.auth-row a,
.auth-switch a {
  color: var(--accent-secondary);
  font-weight: 700;
  text-decoration: none;
}

.auth-row a:hover,
.auth-switch a:hover {
  text-decoration: underline;
}

.auth-feedback {
  display: none;
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(220, 38, 38, 0.1);
  color: #fecaca;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.45;
  padding: 0.75rem 0.85rem;
}

.auth-feedback--visible {
  display: block;
}

.auth-feedback--success {
  border-color: rgba(5, 150, 105, 0.34);
  background: rgba(5, 150, 105, 0.12);
  color: #bbf7d0;
}

.auth-feedback--neutral {
  border-color: rgba(96, 165, 250, 0.32);
  background: rgba(96, 165, 250, 0.12);
  color: #bfdbfe;
}

.auth-resend {
  display: grid;
  gap: 0.65rem;
}

.auth-submit {
  min-height: 48px;
}

.auth-switch {
  margin-top: 1.25rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  text-align: center;
}

.auth-google-button,
.auth-google-placeholder {
  width: 100%;
  min-height: 48px;
  margin-bottom: 1rem;
  border: 1.5px solid rgba(167, 139, 250, 0.34);
  border-radius: var(--radius-sm);
  background: rgba(124, 58, 237, 0.12);
  color: #ddd6fe;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color var(--tr), background var(--tr), color var(--tr), transform var(--tr);
}

.auth-google-button:hover {
  border-color: rgba(196, 181, 253, 0.56);
  background: rgba(124, 58, 237, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
}

.auth-google-placeholder:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.auth-resend-form {
  margin-top: 1rem;
}

.account-shell {
  width: min(100%, 680px);
}

.account-profile-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.3rem 0 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
}

.account-avatar {
  width: 72px;
  height: 72px;
  font-size: 1.55rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 12px 28px rgba(0, 0, 0, 0.28);
}

.account-profile-text {
  min-width: 0;
}

.account-profile-name {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.account-profile-email {
  margin-top: 0.18rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.account-details {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
}

.account-detail-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.85fr) minmax(0, 1.15fr);
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.025);
}

.account-detail-row + .account-detail-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.account-detail-row dt {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.account-detail-row dd {
  min-width: 0;
  color: var(--text-primary);
  font-size: 0.94rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.account-lifecycle {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.15rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
}

.account-lifecycle h2 {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 850;
}

.account-lifecycle p,
.account-lifecycle-modal-panel p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.55;
}

.account-lifecycle-actions,
.account-lifecycle-modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.account-lifecycle-button {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid rgba(167, 139, 250, 0.34);
  border-radius: var(--radius-sm);
  background: rgba(124, 58, 237, 0.12);
  color: #ddd6fe;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color var(--tr), background var(--tr), color var(--tr), transform var(--tr);
}

.account-lifecycle-button:hover {
  border-color: rgba(196, 181, 253, 0.56);
  background: rgba(124, 58, 237, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
}

.account-lifecycle-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.account-lifecycle-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw;
  height: 100dvh;
  margin: 0 !important;
  transform: none !important;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.account-lifecycle-modal.hidden {
  display: none;
}

.account-lifecycle-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(8px);
}

.account-lifecycle-modal-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  width: min(100%, 560px);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.98), rgba(15, 23, 42, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.account-lifecycle-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
}

.account-lifecycle-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.account-lifecycle-modal-panel h2 {
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 850;
}

.account-lifecycle-button--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color, #374151);
}

.account-lifecycle-button--ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.account-otp-field {
  margin: 1rem 0 0.5rem;
  display: flex;
  justify-content: center;
}

.account-otp-input {
  width: 100%;
  max-width: 180px;
  padding: 0.65rem 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-align: center;
  font-family: monospace;
  background: var(--input-bg, #111827);
  border: 1px solid var(--border-color, #374151);
  border-radius: 8px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s;
}

.account-otp-input:focus {
  border-color: #7c3aed;
}

.account-otp-feedback {
  font-size: 0.85rem;
  margin: 0.35rem 0 0;
  text-align: center;
}

.account-otp-feedback.auth-feedback--error { color: #f87171; }
.account-otp-feedback.auth-feedback--success { color: #34d399; }

.auth-post-reset-otp {
  margin-top: 1.5rem;
}

.tool-auth-hint,
.tool-auth-reattach {
  margin-top: 0.55rem;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.45;
  text-align: center;
}

.tool-auth-reattach {
  color: #fbbf24;
}

.tool-auth-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10030 !important;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  width: 100vw;
  height: 100dvh;
  margin: 0 !important;
  transform: none !important;
  pointer-events: auto;
}

.tool-auth-modal.hidden {
  display: none;
}

.tool-auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 9, 18, 0.72);
  backdrop-filter: blur(10px);
}

.tool-auth-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
    #101827;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  padding: 1.35rem;
}

.tool-auth-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
}

.tool-auth-modal-title {
  margin: 0.7rem 2rem 0.55rem 0;
  color: var(--text-primary);
  font-size: 1.45rem;
  line-height: 1.15;
}

.tool-auth-modal-copy {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.tool-auth-modal-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.tool-auth-modal-actions .btn-primary,
.tool-auth-modal-actions .btn-ghost {
  width: 100%;
}

/* ── Post-download feedback survey modal ─────────────────────────────────── */
.survey-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10025;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  width: 100vw;
  height: 100dvh;
  margin: 0 !important;
  transform: none !important;
  pointer-events: auto;
}

.survey-modal.hidden {
  display: none !important;
}

.survey-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 9, 18, 0.72);
  backdrop-filter: blur(10px);
}

.survey-panel {
  position: relative;
  z-index: 1;
  width: min(96%, 820px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)), #101827;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  padding: 2.5rem 2.5rem 2.2rem;
}

.survey-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
}

.survey-chip {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 999px;
  padding: 0.2em 0.75em;
  margin-bottom: 0.6rem;
}

.survey-title {
  margin: 0 2.5rem 0.4rem 0;
  color: var(--text-primary);
  font-size: 1.85rem;
  line-height: 1.2;
}

.survey-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.4rem;
}

.survey-stars {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.6rem;
}

.survey-star {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 2.8rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.2);
  padding: 0.15rem;
  transition: color 0.12s, transform 0.1s;
}

.survey-star:hover,
.survey-star.active {
  color: #f59e0b;
}

.survey-star:hover {
  transform: scale(1.12);
}

.survey-comment-wrap {
  margin-bottom: 1.4rem;
}

.survey-comment-wrap.hidden {
  display: none;
}

.survey-label {
  display: block;
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.survey-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font: inherit;
  font-size: 1rem;
  padding: 0.8rem 1rem;
  resize: vertical;
  min-height: 100px;
  box-sizing: border-box;
}

.survey-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

.survey-hint {
  font-size: 0.8rem;
  color: #f87171;
  margin-top: 0.3rem;
}

.survey-hint.hidden {
  display: none;
}

.survey-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.survey-submit {
  flex: 1;
  min-width: 0;
}

.survey-skip {
  flex-shrink: 0;
}

.survey-thankyou {
  text-align: center;
  color: #34d399;
  font-size: 0.95rem;
  margin-top: 0.9rem;
  margin-bottom: 0;
}

.survey-thankyou.hidden {
  display: none;
}

.survey-disclosure {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0.75rem 0 0;
  line-height: 1.4;
}

.terms-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10020 !important;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  width: 100vw;
  height: 100dvh;
  margin: 0 !important;
  transform: none !important;
  pointer-events: auto;
}

.terms-modal.hidden {
  display: none;
}

.terms-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 9, 18, 0.76);
  backdrop-filter: blur(10px);
}

.terms-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 860px);
  max-height: min(88vh, 860px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
    #101827;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
  padding: 1.35rem;
}

.terms-modal-panel > .section-chip {
  align-self: center;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.terms-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
}

.terms-modal-title {
  margin: 0.7rem 2rem 0.7rem 0;
  color: var(--text-primary);
  font-size: 1.55rem;
  line-height: 1.15;
}

.terms-modal-scroll-wrap {
  position: relative;
  min-height: 0;
}

.terms-modal-scroll-wrap::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 1px;
  height: 74px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: linear-gradient(180deg, rgba(16, 24, 39, 0), rgba(16, 24, 39, 0.94));
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.terms-modal-scroll-wrap.is-scrolled::after {
  opacity: 0;
}

.terms-modal-scroll {
  min-height: 0;
  overflow-y: auto;
  max-height: min(58vh, 590px);
  padding: 1rem 1rem 3.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
}

.terms-modal-scroll:focus {
  outline: 2px solid rgba(96, 165, 250, 0.65);
  outline-offset: 2px;
}

.terms-modal-scroll h2 {
  margin-bottom: 0.65rem;
  color: var(--text);
  font-size: 1.05rem;
}

.terms-modal-scroll h3 {
  margin: 1rem 0 0.4rem;
  color: rgba(255,255,255,0.88);
  font-size: 0.92rem;
}

.terms-modal-scroll p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.modal-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 0.95rem;
  z-index: 2;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: 0.45rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(5, 9, 18, 0.82);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.terms-modal-scroll-wrap.is-scrolled .modal-scroll-hint {
  opacity: 0;
  transform: translate(-50%, 0.3rem);
}

.modal-load-error {
  color: #fecaca;
}

.terms-modal-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.terms-modal-actions .btn-primary,
.terms-modal-actions .btn-ghost {
  min-width: 160px;
}

/* ── Generator aside ── */
.generator-aside {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.aside-card {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.05);
  transition: box-shadow var(--tr), transform var(--tr);
}

.aside-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateX(2px);
}

.aside-icon {
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: 9px;
  flex-shrink: 0;
}

.aside-card strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.aside-card p {
  font-size: 0.77rem;
  color: var(--text-2);
  margin: 0;
  line-height: 1.45;
}

/* ════════════════════════════════════════════════════════════════════════
   TRUST SECTION
   ══════════════════════════════════════════════════════════════════════ */
.trust-section { background: var(--bg); }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.trust-grid--platform {
  grid-template-columns: repeat(4, 1fr);
}

.trust-grid--platform .trust-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.85rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124,58,237,0.15) 0%, rgba(34,211,238,0.12) 100%);
  font-size: 1.45rem;
  line-height: 1;
  flex-shrink: 0;
}

.trust-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.75rem 1.4rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--tr), transform var(--tr);
}

.trust-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}

.trust-icon {
  font-size: 1.75rem;
  margin-bottom: 0.85rem;
  display: block;
}

.trust-card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.trust-card p {
  font-size: 0.81rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.faq-section {
  background: var(--bg);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.faq-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.15rem 1.2rem;
  box-shadow: var(--card-shadow);
}

.faq-card h3 {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.3;
}

.faq-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

/* ════════════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════════ */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-soft);
  color: rgba(255,255,255,0.55);
  padding: 3rem 0 2.5rem;
}

.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.2rem;
}

.footer-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.footer-tagline {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.1rem;
}

.footer-sub {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.4);
  max-width: 420px;
  line-height: 1.5;
  margin-top: 0;
}

.footer-system {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.52);
  max-width: 560px;
  line-height: 1.5;
  margin-top: 0.45rem;
}

.footer-domain,
.footer-contact-links {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--purple-light);
  margin-top: 0.5rem;
}

.footer-contact-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.footer-contact-label {
  color: rgba(255,255,255,0.34);
  font-size: 0.76rem;
  font-weight: 500;
}

.footer-contact-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.footer-contact-row a {
  color: var(--purple-light);
  text-decoration: none;
  transition: color var(--tr), opacity var(--tr);
}

.footer-contact-row a:hover {
  color: #C4B5FD;
  opacity: 0.92;
}

.footer-contact-separator {
  color: rgba(255,255,255,0.26);
  font-weight: 500;
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.28);
  max-width: 560px;
  line-height: 1.55;
  margin-top: 0.75rem;
}

.footer-faq-link {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.52);
  margin-top: 0.2rem;
}

.footer-faq-link a {
  color: var(--purple-light);
  font-weight: 700;
  text-decoration: none;
}

.footer-faq-link a:hover {
  color: #C4B5FD;
}

.footer-copyright {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.2);
  margin-top: 0.6rem;
}

/* ════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .hiw-grid { grid-template-columns: repeat(2, 1fr); }
  .hiw-grid::before { display: none; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .generator-layout { grid-template-columns: 1fr; }
  .generator-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
}

@media (max-width: 1320px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(18, 24, 38, 0.98);
    backdrop-filter: blur(12px);
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-soft);
    gap: 0.25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    z-index: 99;
    overflow: visible;
  }
  .nav-links.open li {
    width: 100%;
    min-width: 0;
  }
  .nav-links.open a,
  .nav-links.open button {
    width: 100%;
    padding: 0.65rem 0.75rem;
    font-size: 1rem;
  }
  .nav-links.open .nav-menu-cta {
    padding-top: 0.45rem;
    margin-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav-links.open .nav-menu-cta a {
    justify-content: center;
    background: var(--accent-grad);
    color: #ffffff;
    font-weight: 700;
    border-radius: 99px;
  }
  .nav-links.open .nav-menu-auth {
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    padding: 0.35rem 0 0;
  }
  .nav-links.open .nav-user {
    max-width: 100%;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 1120px) {
  .nav-actions > .nav-auth { display: none; }
  .nav-links.open .nav-menu-auth { display: flex; }
}

@media (max-width: 760px) {
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .account-detail-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .nav-inner { gap: 0.45rem; }
  .nav-actions { margin-left: auto; }
  .header-lang-switcher {
    margin-left: 0.35rem;
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .nav-actions > .nav-cta { display: none; }
  .nav-links.open .nav-menu-cta { display: flex; }
}

@media (max-width: 600px) {
  .hero-section { padding: 4rem 0 3.5rem; }
  .section { padding: 2.5rem 0; }
  .hiw-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .generator-card { padding: 1.4rem; }
  .generator-aside { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .brand-icon {
    width: 37px;
    height: 37px;
  }
  .brand-text { font-size: 17px; }
}

@media (max-width: 400px) {
  .nav-inner { padding: 0 0.7rem; }
  .brand-icon {
    width: 35px;
    height: 35px;
  }
  .brand-text { font-size: 16px; }
  .language-switcher {
    min-height: 30px;
    gap: 0.22rem;
    padding: 0.16rem 0.32rem;
    font-size: 0.74rem;
  }
  .language-option { padding: 0.24rem 0.32rem; }
  .trust-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .btn-primary, .btn-ghost-hero { width: 100%; justify-content: center; }
}

/* ════════════════════════════════════════════════════════════════════════
   MULTI-PAGE ADDITIONS
   ══════════════════════════════════════════════════════════════════════ */

/* ── Active nav link ─────────────────────────────────────────────────── */
.nav-links a.nav-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
  border-bottom: 2px solid var(--accent-highlight);
  border-radius: 0;
  padding-bottom: 0.28rem;
}

/* ── Logo image in navbar ────────────────────────────────────────────── */
.nav-logo-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ── Footer nav ─────────────────────────────────────────────────────── */
.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  margin-bottom: 0.25rem;
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0.25rem 0;
}

.footer-nav a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color var(--tr);
}

.footer-nav a:hover { color: rgba(255,255,255,0.85); }

/* ── Section CTA (below tools grid on homepage) ──────────────────────── */
.section-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* ── CTA band ────────────────────────────────────────────────────────── */
.cta-band {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-soft);
  padding: 3.4rem 0 3.6rem;
  text-align: center;
}

.cta-band h2 {
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.6rem;
  letter-spacing: -0.018em;
}

.cta-band p {
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.65);
  max-width: 690px;
  margin: 0 auto 1.45rem;
}

.cta-band .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 44px;
  padding: 0.72rem 1.35rem;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 700;
}

/* ── Inner page hero ─────────────────────────────────────────────────── */
.page-hero {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-soft);
  padding: 2.5rem 0 2rem;
  text-align: center;
  overflow: hidden;
  width: 100%;
}

.page-hero--tool {
  background: var(--bg-secondary);
  padding-bottom: 1.25rem;
}

.page-title {
  font-size: clamp(1.5rem, 3.5vw, 2.4rem) !important;
  font-weight: 567;
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--text);
  margin: 0 auto 0.75rem;
  max-width: 780px;
  width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
}

.page-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}

.page-hero--mailcraft-hiw .page-sub {
  max-width: 980px;
  white-space: nowrap;
}

.tool-context-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 920px;
  margin: 1.25rem auto 0;
  text-align: left;
}

.tool-context-card {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface);
  padding: 0.9rem 1rem;
}

.tool-context-card h2 {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}

.tool-context-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

@media (max-width: 820px) {
  .tool-context-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* ── Tool page header label ──────────────────────────────────────────── */
.tool-page-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.tool-hero-title {
  max-width: 950px;
  margin: 12px auto 16px;
  text-align: center;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: break-word;
}

.page-hero--shopwise .tool-hero-title {
  max-width: none;
  font-size: 38px;
  white-space: nowrap;
}

.page-hero--shopwise .page-sub {
  max-width: none;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .tool-hero-title {
    font-size: clamp(22px, 6vw, 32px);
    letter-spacing: -0.01em;
  }

  .page-hero--shopwise .tool-hero-title,
  .page-hero--shopwise .page-sub {
    white-space: normal;
  }
}

.back-to-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color var(--tr);
}

.back-to-tools:hover {
  color: var(--text);
}

.tool-name-chip {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 99px;
  padding: 0.35rem 1.05rem;
  border: 1px solid rgba(124, 58, 237, 0.12);
}

.tool-badge-icon {
  height: 22px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

/* ── Large tool cards (tools page) ──────────────────────────────────── */
.tools-grid-lg {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* ── Featured tool card (full-width) ── */
.tool-card-featured {
  background: var(--card);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius);
  box-shadow: 0 4px 28px rgba(124, 58, 237, 0.13);
  overflow: hidden;
}

.tool-card-featured-inner {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-card-lg {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--tr), transform var(--tr);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 0 0 calc(33.333% - 1rem);
  min-width: 260px;
  max-width: 380px;
  box-sizing: border-box;
}

.tool-card-lg:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}

.tool-card-lg--active {
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 4px 28px rgba(124, 58, 237, 0.13);
}

.tool-card-lg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tool-card-lg-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0;
}

.tool-card-lg-desc {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.6;
  flex: 1;
}

.tool-card-lg-sub {
  font-size: 0.78rem;
  color: var(--text-3, #9CA3AF);
  margin-top: -0.25rem;
  margin-bottom: 0.25rem;
  font-style: italic;
}

.tools-catalog-grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.9rem;
  max-width: 1120px;
  margin: 1.5rem auto 0;
}

.tools-catalog-grid .tool-card-lg {
  width: 100%;
  max-width: none;
  min-width: 0;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  grid-template-areas:
    "header actions"
    "desc actions"
    "sub actions"
    "share actions"
    "meta actions";
  align-items: center;
  column-gap: 1.35rem;
  row-gap: 0.32rem;
  padding: 1rem 1.15rem;
}

.tools-catalog-grid .tool-card-lg-header {
  grid-area: header;
  justify-content: flex-start;
  gap: 0.55rem;
  min-width: 0;
  flex-wrap: nowrap;
}

.tools-catalog-grid .tool-card-lg-header .tool-icon {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  align-self: center;
  margin-right: 0.15rem;
}

.tools-catalog-grid .tool-card-lg-name {
  font-size: 1.08rem;
  line-height: 1.25;
  flex: 0 0 auto;
  white-space: nowrap;
}

.tools-catalog-grid .tool-card-lg-desc {
  grid-area: desc;
  flex: initial;
  line-height: 1.45;
  margin: 0;
}

.tools-catalog-grid .tool-card-lg-sub {
  grid-area: sub;
  margin: 0;
}

.tools-catalog-grid .tool-card-lg-share {
  grid-area: share;
}

.tools-catalog-grid .tool-card-lg-meta {
  grid-area: meta;
  margin: 0.45rem 0 0 !important;
  line-height: 1.45;
}

.tools-catalog-grid .tool-card-lg > div:last-child {
  grid-area: actions;
  align-self: center;
  justify-self: end;
  width: 212px;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0.7rem !important;
}

.tools-catalog-grid .tool-card-lg > div:last-child .btn-primary,
.tools-catalog-grid .tool-card-lg > div:last-child .btn-ghost {
  min-height: 38px;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.82rem !important;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.tools-catalog-grid .tool-card-lg > div:last-child .btn-ghost {
  width: 100%;
}

.tools-catalog-grid .tool-card-lg > div:last-child .btn-tooltip-wrap {
  width: 100%;
}

.hiw-tools-grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.9rem;
  max-width: 1100px;
  margin: 1.5rem auto 0;
}

.hiw-tools-grid .tool-card-lg {
  width: 100%;
  max-width: none;
  min-width: 0;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  grid-template-areas:
    "header action"
    "desc action";
  align-items: center;
  column-gap: 1.1rem;
  row-gap: 0.55rem;
  padding: 1rem 1.15rem;
}

.hiw-tools-grid .tool-card-lg-header .tool-icon {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  align-self: center;
  margin-right: 0.15rem;
}

.hiw-tools-grid .tool-card-lg-header {
  grid-area: header;
  justify-content: flex-start;
  gap: 0.55rem;
  min-width: 0;
  flex-wrap: wrap;
}

.hiw-tools-grid .tool-card-lg-name {
  font-size: 1.08rem;
  line-height: 1.25;
  margin-left: 0.1rem;
}

.hiw-tools-grid .tool-card-lg-desc {
  grid-area: desc;
  flex: initial;
  line-height: 1.45;
  margin: 0.08rem 0 0;
}

.hiw-tools-grid .tool-card-lg > .btn-primary {
  grid-area: action;
  align-self: center;
  justify-self: end;
  width: 190px;
  min-height: 38px;
  margin: 0 !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.82rem !important;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

/* ── Coming soon button tooltip ── */
.btn-tooltip-wrap {
  position: relative;
  display: block;
}

.btn-tooltip-wrap::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1F1F2E;
  color: #D1D5DB;
  font-size: 0.73rem;
  line-height: 1.4;
  white-space: nowrap;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.btn-tooltip-wrap:hover::after,
.btn-tooltip-wrap:focus-within::after {
  opacity: 1;
}

@media (hover: none) {
  .btn-tooltip-wrap::after { display: none; }
}

.tool-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.25rem 0;
}

.tool-features li {
  font-size: 0.83rem;
  color: var(--text-2);
  font-weight: 500;
}

/* ── How it works — vertical steps ──────────────────────────────────── */
.hiw-steps-vertical {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hiw-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(124, 58, 237, 0.08);
  align-items: start;
}

.hiw-step:last-child { border-bottom: none; }

.hiw-step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.hiw-step-content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
}

.hiw-step-content p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.65;
}

.hiw-step-content ul {
  margin: 0.65rem 0 0 1.1rem !important;
  padding: 0;
  color: var(--text-2);
  line-height: 1.65 !important;
}

.hiw-step-content li {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.65;
  font-weight: 400;
  margin: 0.35rem 0;
}

.hiw-step-content code {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.82rem;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* ── About page ──────────────────────────────────────────────────────── */
.about-layout {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.about-block h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.9rem;
  letter-spacing: -0.02em;
}

.about-block p {
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

.about-block p:last-child { margin-bottom: 0; }

.about-closing {
  max-width: 760px;
  margin: 2.5rem auto 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.65;
  text-align: center;
  letter-spacing: -0.01em;
}

/* ── Multi-page responsive overrides ────────────────────────────────── */
@media (max-width: 900px) {
  .nav-cta { display: none; }
  .brand-icon { width: 30px; height: 30px; }
  .brand-text { font-size: 18px; }
}

@media (max-width: 768px) {
  .tools-grid-lg { gap: 1rem; }
  .tool-card-lg { flex: 0 0 calc(50% - 0.5rem); max-width: calc(50% - 0.5rem); }
  .tools-catalog-grid .tool-card-lg {
    max-width: none;
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "desc"
      "sub"
      "meta"
      "actions";
    row-gap: 0.4rem;
  }
  .tools-catalog-grid .tool-card-lg-header {
    flex-wrap: wrap;
    row-gap: 0.45rem;
  }
  .tools-catalog-grid .tool-card-lg-header .tool-icon {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }
  .tools-catalog-grid .tool-card-lg > div:last-child {
    justify-self: stretch;
    width: 100%;
    padding-top: 0.35rem !important;
  }
  .hiw-tools-grid .tool-card-lg {
    max-width: none;
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "desc"
      "action";
    row-gap: 0.45rem;
  }
  .hiw-tools-grid .tool-card-lg-header .tool-icon {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }
  .hiw-tools-grid .tool-card-lg > .btn-primary {
    justify-self: stretch;
    width: 100%;
    margin-top: 0.35rem !important;
  }
  .page-hero { padding: 2.5rem 0 2rem; }
  .page-title {
    font-size: clamp(1.4rem, 8vw, 2rem);
    letter-spacing: -0.02em;
    padding: 0 0.5rem;
  }
  .page-sub { padding: 0 0.5rem; }
  .page-hero--mailcraft-hiw .page-sub {
    white-space: normal;
  }
}

@media (max-width: 600px) {
  .tools-grid-lg { gap: 0.75rem; }
  .tool-card-lg { flex: 0 0 100%; max-width: 100%; }
  .tools-catalog-grid .tool-card-lg {
    padding: 0.95rem;
  }
  .hiw-tools-grid .tool-card-lg {
    padding: 0.95rem;
  }
  .hiw-step { grid-template-columns: 44px 1fr; gap: 1rem; }
  .hiw-step-num { width: 40px; height: 40px; font-size: 0.75rem; }
  .about-layout { gap: 2rem; }
}

/* ── Hero fade-up on load ────────────────────────────────────────────── */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge   { animation: heroFadeUp 0.65s ease both; animation-delay: 0.05s; }
.hero-title   { animation: heroFadeUp 0.65s ease both; animation-delay: 0.18s; }
.hero-tagline { animation: heroFadeUp 0.65s ease both; animation-delay: 0.26s; }
.hero-sub     { animation: heroFadeUp 0.65s ease both; animation-delay: 0.34s; }
.hero-ctas    { animation: heroFadeUp 0.65s ease both; animation-delay: 0.46s; }
.trust-badges { animation: heroFadeUp 0.65s ease both; animation-delay: 0.56s; }

/* Override reveal will-animate for hero children so they always show */
.hero-section .reveal.will-animate {
  opacity: 1;
  transform: translateY(0);
}

/* ── Hero container z-index — keeps content above blobs/star ──────────── */
.hero-container {
  position: relative;
  z-index: 2;
}

/* ── Shooting star (one-shot, homepage only) ─────────────────────────── */
/* ── Hero glide star ────────────────────────────────────────────────────── */
/* left: 0% → 100% travels the full width of the h1.
   Speed: change 1.8s. Glow: adjust box-shadow rgba alpha. */
@keyframes glideAcrossText {
  0%   { left: 0%;    opacity: 0; transform: translateY(-50%) scale(0.8); }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { left: 100%; opacity: 0; transform: translateY(-50%) scale(0.9); }
}

/* ── Hero glide star wrapper ────────────────────────────────────────────── */
.hero-brand-orbit {
  position: relative;
  display: inline-block;
  width: 100%;
  text-align: center;
}

/* Overlay covers the same box as the h1 so left:0% and left:100%
   are exactly the left and right edges of the title text */
.brand-text-wrap {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50vw);
  width: 100vw;
  bottom: 0;
  pointer-events: none;
}

.text-glide-star {
  position: absolute;
  top: calc(100% - 0.375rem);
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #60A5FA;
  box-shadow:
    0 0 6px  rgba(96, 165, 250, 0.9),
    0 0 14px rgba(124, 58, 237, 0.5);
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  animation: glideAcrossText 2.8s ease-out 0.6s forwards;
}

.text-glide-star::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.55));
  left: -35px;
  top: 2px;
}

@media (max-width: 768px) {
  .text-glide-star {
    width: 5px;
    height: 5px;
  }
  .text-glide-star::after {
    width: 28px;
    left: -24px;
  }
}

/* ── Hero soft blob background ────────────────────────────────────────── */
/* Three large radial-gradient blobs replace all dots and diagonal lines.
   Intensity: raise/lower the rgba alpha (currently 0.12–0.16).
   Drift speed: change the animation duration (currently 20s).
   Blob size: change the ellipse % values or pixel radii. */
@keyframes blobDrift {
  from { transform: translateY(0)    scale(1);    }
  to   { transform: translateY(-18px) scale(1.03); }
}

/* Blob 1 — purple, top-left */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 55% 55% at 8% 10%,
    rgba(124, 58, 237, 0.06) 0%, transparent 70%);
  animation: blobDrift 20s ease-in-out infinite alternate;
}

/* Blob 2 — cyan, right side */
.hero-particles::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 48% 52% at 94% 30%,
    rgba(34, 211, 238, 0.12) 0%, transparent 70%);
  animation: blobDrift 26s ease-in-out infinite alternate-reverse;
}

/* Blob 3 — soft lavender, lower-center for depth */
.hero-particles::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 95%,
    rgba(167, 139, 250, 0.10) 0%, transparent 70%);
  animation: blobDrift 32s ease-in-out infinite alternate;
}

/* ── Tool card lift on hover (boost) ─────────────────────────────────── */
.tool-card:hover {
  transform: translateY(-6px);
}

/* ── Benefit list on active tool card ───────────────────────────────── */
.tool-benefit-list {
  list-style: none;
  margin: 0.4rem 0 0.6rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.tool-benefit-list li {
  font-size: 0.82rem;
  color: var(--text-2);
  padding-left: 1.1rem;
  position: relative;
}

.tool-benefit-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ── Contact page ────────────────────────────────────────────────────── */
.contact-section {
  padding: 2rem 0 5rem;
}

.contact-info-card {
  max-width: 760px;
  margin: 0 auto 1.25rem;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(15, 23, 42, 0.28)),
    var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
}

.contact-info-header {
  text-align: center;
  margin-bottom: 1.1rem;
}

.contact-info-header h1 {
  color: var(--text);
  font-size: 1.55rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.contact-info-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 auto;
  max-width: 560px;
}

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.contact-info-block {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  padding: 1rem;
}

.contact-info-block h2 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 650;
  margin: 0 0 0.35rem;
}

.contact-info-block p {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.5;
  margin: 0 0 0.7rem;
}

.contact-info-block a {
  color: var(--purple-light);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  word-break: break-word;
}

.contact-info-block a:hover {
  color: #C4B5FD;
}

.contact-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.contact-card-header {
  background: var(--accent-grad);
  padding: 2rem 2.5rem 1.8rem;
  text-align: center;
}

.contact-card-header h1 {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.contact-card-header p {
  color: rgba(255,255,255,0.88);
  font-size: 0.95rem;
  margin: 0;
}

.contact-card-body {
  padding: 2rem 2.5rem 2.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  color: var(--text);
  font-family: inherit;
  transition: border-color var(--tr), box-shadow var(--tr);
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.contact-submit {
  margin-top: 0.4rem;
}

.contact-feedback {
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  text-align: center;
  display: none;
}

.contact-feedback.success {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid rgba(5,150,105,0.2);
  display: block;
}

.contact-feedback.error {
  background: var(--error-soft);
  color: var(--error);
  border: 1px solid rgba(220,38,38,0.2);
  display: block;
}

.contact-response-note {
  max-width: 640px;
  margin: 1rem auto 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: center;
  opacity: 0.82;
}

@media (max-width: 680px) {
  .contact-info-card { padding: 1.25rem; }
  .contact-info-grid { grid-template-columns: 1fr; }
  .contact-card-header { padding: 1.5rem 1.5rem 1.4rem; }
  .contact-card-body   { padding: 1.5rem; }
}

/* ── Reduced motion: disable all decorative animations ──────────────── */
@media (prefers-reduced-motion: reduce) {
  .text-glide-star { display: none !important; }
  .hero-particles,
  .hero-particles::before,
  .hero-particles::after,
  .hdot,
  .hero-glow,
  .hero-badge,
  .hero-title,
  .hero-sub,
  .hero-ctas,
  .trust-badges {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ────────────────────────────────────────────────────────────────────────────
   Match My Skills — file upload + full results UI
   ──────────────────────────────────────────────────────────────────────────── */

/* File upload input */
.file-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1.5px dashed rgba(124, 58, 237, 0.35);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s;
}
.file-input-wrap:focus-within { border-color: var(--accent); }
.file-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  flex: 1;
}
.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.file-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.file-clear:hover {
  color: var(--error, #dc2626);
  background: rgba(220,38,38,0.06);
}
.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  display: block;
}
.form-helper-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

/* ── Process stepper ── */
.mms-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 auto 2.5rem;
  max-width: 480px;
}
.mms-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.mms-step-dot {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  transition: all 0.25s;
}
.mms-step-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color 0.25s;
}
.mms-step-connector {
  flex: 1;
  height: 2px;
  background: var(--border-soft);
  margin: 0 0.4rem;
  margin-bottom: 1.2rem; /* align with dot center */
  min-width: 2rem;
  transition: background 0.25s;
}
/* Active step */
.mms-step--active .mms-step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(124,58,237,0.12);
}
.mms-step--active .mms-step-label { color: var(--accent); }
/* Done step */
.mms-step--done .mms-step-dot {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.mms-step--done .mms-step-label { color: #10b981; }

/* ── Loading state ── */
.mms-loading {
  padding: 2rem 1rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mms-loading--compact {
  padding-top: 0.15rem;
}
.mms-loading-dots {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.mms-loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: mmsDotPulse 1.4s ease-in-out infinite;
}
.mms-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.mms-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes mmsDotPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1;   }
}
.mms-loading-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.25rem;
  text-align: center;
}

/* ── Stage progress indicator ── */
.rb-stages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 340px;
  margin: 0 auto 1.5rem;
}
.rb-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  position: relative;
  z-index: 1;
  min-width: 52px;
}
.rb-stage-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.rb-stage-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.3s;
  letter-spacing: 0.01em;
}
.rb-stage-connector {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.1);
  min-width: 24px;
  margin-bottom: 18px;
  transition: background 0.3s;
}
/* Active stage */
.rb-stage.is-active .rb-stage-dot {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(124,58,237,0.45);
}
.rb-stage.is-active .rb-stage-label { color: var(--accent-primary); font-weight: 600; }
/* Done stage */
.rb-stage.is-done .rb-stage-dot {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.rb-stage.is-done .rb-stage-label { color: #10b981; }
.rb-stage-connector.is-done { background: #10b981; }

.mms-loading-steps {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-align: left;
  max-width: 260px;
  margin: 0 auto;
  width: 100%;
}
.mms-loading-step {
  font-size: 0.81rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}
.mms-lstep-icon {
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
  font-size: 0.78rem;
}
.mms-lstep--active { color: var(--accent); font-weight: 600; }
.mms-lstep--done   { color: #10b981; }

.dp-section .rb-stages {
  max-width: 540px;
}

.dp-section .mms-loading-steps {
  max-width: 420px;
}

.dp-section .mms-loading-step {
  align-items: flex-start;
  line-height: 1.4;
}

.dp-section .mms-loading-step span:last-child {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* ── Results section wrapper ── */
.mms-results-section {
  margin-top: 0.5rem;
}
.mms-results-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.mms-results-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 0.2rem;
}
.mms-results-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}


/* ── Generic MMS card ── */
.mms-card {
  background: var(--card);
  border: 1.5px solid var(--card-border);
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1rem;
}
.mms-card-label {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.mms-body {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.7;
  margin: 0;
}

/* Two-column layout */
.mms-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0;
}
@media (max-width: 640px) {
  .mms-two-col { grid-template-columns: 1fr; }
}
.mms-two-col .mms-card { margin-bottom: 0; }

/* ── Experience level ── */
.mms-level-badge {
  display: inline-block;
  padding: 0.4rem 1.1rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.mms-level--entry     { background: rgba(16,185,129,0.12);  color: #6ee7b7; border: 1px solid rgba(16,185,129,0.3); }
.mms-level--junior    { background: rgba(59,130,246,0.12);  color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.mms-level--mid       { background: rgba(124,58,237,0.12); color: var(--purple-light); border: 1px solid rgba(124,58,237,0.25); }
.mms-level--senior    { background: rgba(245,158,11,0.12);  color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }
.mms-level--lead      { background: rgba(239,68,68,0.12);  color: #fca5a5; border: 1px solid rgba(239,68,68,0.25); }
.mms-level--principal { background: rgba(236,72,153,0.12); color: #f9a8d4; border: 1px solid rgba(236,72,153,0.3); }
.mms-level--director  { background: rgba(168,85,247,0.12); color: #d8b4fe; border: 1px solid rgba(168,85,247,0.3); }
.mms-level--vp        { background: rgba(99,102,241,0.12); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.3); }
.mms-level--executive { background: rgba(251,191,36,0.15); color: #fde68a; border: 1px solid rgba(251,191,36,0.35); }
.mms-level-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0.55rem 0 0;
  line-height: 1.5;
}

/* ── Key skills — pills ── */
.mms-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.mms-pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border-soft);
  transition: background 0.15s, border-color 0.15s;
}
.mms-pill:hover {
  background: rgba(124,58,237,0.07);
  border-color: rgba(124,58,237,0.2);
}

/* ── Role cards ── */
.mms-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}
.mms-role-card {
  background: var(--card);
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.mms-role-card:hover {
  border-color: rgba(124,58,237,0.3);
  box-shadow: 0 2px 10px rgba(124,58,237,0.08);
}
.mms-role-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
}
.mms-role-title {
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--text);
}
.mms-role-reason {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}
.mms-confidence {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.18rem 0.55rem;
  border-radius: 99px;
  white-space: nowrap;
}
.mms-confidence--high   { background: rgba(16,185,129,0.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.3); }
.mms-confidence--medium { background: rgba(245,158,11,0.15);  color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }
.mms-confidence--low    { background: rgba(255,255,255,0.06); color: var(--text-muted); border: 1px solid var(--border-soft); }

/* ── Dot lists (strengths / improvement areas) ── */
.mms-dotlist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.mms-dotlist li {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.55;
  padding-left: 1.3rem;
  position: relative;
}
.mms-dotlist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.mms-dotlist--green li::before { background: #10b981; }
.mms-dotlist--amber  li::before { background: #f59e0b; }

/* ── AI next steps ordered list ── */
.mms-steplist {
  margin: 0;
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.mms-steplist li {
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.6;
}
.mms-steplist li::marker { color: var(--accent); font-weight: 700; }

/* ── Coming next card ── */
.mms-card--coming {
  background: rgba(124, 58, 237, 0.06);
  border-color: rgba(124,58,237,0.2);
}
.mms-coming-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 1.1rem;
  line-height: 1.55;
}
.mms-coming-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.btn-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1.5px solid var(--border-soft);
  cursor: not-allowed;
  opacity: 0.75;
  position: relative;
}
.btn-preview-icon { font-size: 0.9rem; }
.btn-preview-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(124,58,237,0.08);
  color: var(--accent);
  border: 1px solid rgba(124,58,237,0.18);
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
  margin-left: 0.15rem;
}

/* ── Trust note ── */
.mms-trust-note {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 0.9rem 1.1rem;
  background: rgba(124,58,237,0.04);
  border: 1px solid rgba(124,58,237,0.1);
  border-radius: 8px;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}
.mms-trust-note strong { color: var(--text); }

/* ── Misc ── */
.mms-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ══════════════════════════════════════════════════════════
   MMS Step 2 — Job match cards
   ══════════════════════════════════════════════════════════ */

.mms-jobs-section {
  margin-top: 2rem;
}
.mms-jobs-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.mms-jobs-title {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.25rem;
}
.mms-jobs-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0;
}
.mms-jobs-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.mms-jobs-loading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 54px;
  margin: 0 0 1.05rem;
  font-size: 1rem;
  font-weight: 750;
  color: #ede9fe;
  white-space: nowrap;
  padding: 0.8rem 1.2rem;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(168,85,247,0.12));
  border: 1px solid rgba(168,85,247,0.36);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(124,58,237,0.08),
    0 14px 32px rgba(124,58,237,0.18);
}
.mms-loading-line {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 9px;
  height: 2px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,0.08);
}
.mms-loading-line::after {
  content: "";
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #c4b5fd, transparent);
  animation: mmsLoadingSweep 1.35s ease-in-out infinite;
}

@media (max-width: 640px) {
  .mms-jobs-loading {
    width: 100%;
    min-height: 50px;
    font-size: 0.94rem;
    margin-top: 0;
  }
}

@keyframes mmsLoadingSweep {
  from { transform: translateX(-110%); }
  to { transform: translateX(275%); }
}

.mms-jobs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

/* ── Source-backed job result rows ── */
.mms-job-card {
  background: var(--bg-card);
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
  transition: box-shadow 0.18s, border-color 0.18s;
}
.mms-job-card:hover {
  box-shadow: 0 4px 18px rgba(124,58,237,0.1);
  border-color: rgba(124,58,237,0.3);
}

.mms-job-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mms-job-side {
  flex: 0 0 164px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.6rem;
}

.mms-job-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.6rem;
  min-width: 0;
}

.mms-job-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px;
  flex: 0 0 auto;
}

.shopwise-product-image {
  width: 54px;
  height: 54px;
  flex-basis: 54px;
}

.shopwise-product-image--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #A78BFA;
  font-size: 0.72rem;
  font-weight: 800;
}

.sw-location-field .form-label {
  display: block;
  font-size: 0.81rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.sw-location-options {
  display: grid;
  gap: 0.75rem;
}

.sw-location-option {
  display: block;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
}

.sw-location-radio-row,
.sw-location-search-row,
.sw-location-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sw-location-radio-row {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 650;
}

.sw-location-radio-row input[type="radio"] {
  width: auto;
  padding: 0;
  appearance: auto;
  -webkit-appearance: auto;
}

.sw-location-search-row {
  justify-content: space-between;
  flex-wrap: wrap;
}

.sw-location-search-wrap {
  position: relative;
  flex: 1 1 320px;
  min-width: 240px;
}

.sw-location-search-wrap input {
  padding-right: 3rem;
}

.sw-location-search-btn {
  position: absolute;
  right: 0.35rem;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.2);
  color: var(--text);
  font-size: 1.15rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sw-inline-spinner {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
}

.sw-location-search-btn .spinner {
  width: 24px;
  height: 11px;
}

.sw-location-status {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.8rem;
  line-height: 1.45;
}

.sw-location-confirmed {
  color: #86efac;
}

.sw-location-error {
  color: #fca5a5;
}

.sw-location-results {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.sw-location-result {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  border: 1px solid rgba(134, 239, 172, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(134, 239, 172, 0.08);
  color: var(--text);
  padding: 0.65rem 0.75rem;
  text-align: left;
  cursor: pointer;
}

.sw-location-result small {
  color: #86efac;
  white-space: nowrap;
}

.sw-upload-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 4.8rem;
  padding: 0.85rem;
  border: 1.5px dashed var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--tr), background var(--tr), box-shadow var(--tr);
}

.sw-upload-card:hover,
.sw-upload-card:focus-visible,
.sw-upload-card--active {
  border-color: rgba(167, 139, 250, 0.7);
  background: rgba(124, 58, 237, 0.1);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.sw-upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.18);
  color: #c4b5fd;
  font-size: 1.35rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.sw-upload-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.sw-upload-copy strong {
  font-size: 0.92rem;
}

.sw-upload-copy small {
  color: var(--text-muted);
  line-height: 1.4;
}

.sw-upload-preview {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.55rem;
  min-width: 0;
}

.sw-upload-preview img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-soft);
}

.sw-upload-preview span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.82rem;
  flex: 1 1 auto;
}

.sw-progress-stages {
  max-width: 420px;
}

.sw-result-meta {
  align-items: center;
}

.sw-pill {
  border-width: 1px;
  border-style: solid;
}

.sw-pill--price {
  color: #fcd34d;
  border-color: rgba(252, 211, 77, 0.28);
  background: rgba(252, 211, 77, 0.08);
}

.sw-pill--rating {
  color: #c4b5fd;
  border-color: rgba(196, 181, 253, 0.28);
  background: rgba(124, 58, 237, 0.1);
}

.sw-pill--delivery {
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.28);
  background: rgba(59, 130, 246, 0.09);
}

.sw-pill--offer {
  color: #f9a8d4;
  border-color: rgba(249, 168, 212, 0.26);
  background: rgba(219, 39, 119, 0.09);
}

.sw-rec-badge {
  border-color: rgba(167, 139, 250, 0.24) !important;
  background: rgba(124, 58, 237, 0.12) !important;
  color: #ddd6fe !important;
}

.sw-rec-badge--value {
  border-color: rgba(134, 239, 172, 0.28) !important;
  background: rgba(34, 197, 94, 0.1) !important;
  color: #86efac !important;
}

.sw-confidence-panel {
  justify-content: center;
}

.shopwise-result-card {
  flex-wrap: wrap;
}

.shopwise-result-card.sw-result-card--expanded {
  border-color: rgba(124, 58, 237, 0.42);
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.12);
}

.sw-product-seller span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  background: rgba(14, 165, 233, 0.08);
  color: #bae6fd;
  overflow-wrap: anywhere;
}

.shopwise-result-card .mms-job-main,
.shopwise-result-card .mms-job-title-row > div {
  min-width: 0;
}

.shopwise-result-card .mms-job-role,
.shopwise-result-card .mms-job-snippet {
  overflow-wrap: anywhere;
}

.sw-seller-panel {
  width: 100%;
  flex: 0 0 100%;
  border-top: 1px solid var(--border-soft);
  padding-top: 0.9rem;
  animation: swSellerPanelIn 0.18s ease-out;
}

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

.sw-seller-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
}

.sw-seller-loading .spinner {
  width: 28px;
  height: 12px;
}

.sw-seller-panel-head h3 {
  margin: 0 0 0.75rem;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.25;
}

.sw-seller-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.sw-seller-tile {
  min-width: 0;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.sw-seller-tile--skeleton {
  min-height: 10rem;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent),
    rgba(255, 255, 255, 0.035);
  background-size: 220% 100%;
  animation: mmsLoadingSweep 1.4s infinite;
}

/* Structured seller skeleton tiles */
@keyframes sw2SkelPulse {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.sw2-seller-skeleton {
  background: rgba(20, 26, 44, 0.8);
  border: 1px solid rgba(30, 38, 56, 0.9);
  border-radius: 11px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 190px;
  animation: sw2SkelFadeIn 0.3s ease both;
}
@keyframes sw2SkelFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sw2-skel {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: sw2SkelPulse 1.5s ease-in-out infinite;
  border-radius: 5px;
}
.sw2-skel-head {
  display: flex;
  gap: 10px;
  align-items: center;
}
.sw2-skel-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}
.sw2-skel-name {
  height: 12px;
  width: 60%;
}
.sw2-skel-line {
  height: 10px;
  width: 100%;
}
.sw2-skel-mid  { width: 85%; }
.sw2-skel-short { width: 65%; }
.sw2-skel-btn {
  height: 30px;
  width: 100%;
  border-radius: 8px;
  margin-top: auto;
}

.sw-seller-tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.sw-seller-tile h4 {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.sw-seller-price {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(252, 211, 77, 0.28);
  background: rgba(252, 211, 77, 0.08);
  color: #fcd34d;
  font-size: 0.76rem;
  font-weight: 780;
  padding: 0.18rem 0.46rem;
}

.sw-seller-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 1.35rem;
}

.sw-seller-badge {
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.24);
  background: rgba(124, 58, 237, 0.1);
  color: #ddd6fe;
  font-size: 0.66rem;
  font-weight: 750;
  padding: 0.16rem 0.42rem;
}

.sw-seller-badge--best-price {
  border-color: rgba(252, 211, 77, 0.3);
  background: rgba(252, 211, 77, 0.09);
  color: #fde68a;
}

.sw-seller-badge--fast-delivery {
  border-color: rgba(147, 197, 253, 0.28);
  background: rgba(59, 130, 246, 0.09);
  color: #bfdbfe;
}

.sw-seller-badge--best-rated {
  border-color: rgba(196, 181, 253, 0.28);
  background: rgba(124, 58, 237, 0.1);
  color: #ddd6fe;
}

.sw-seller-badge--best-value {
  border-color: rgba(134, 239, 172, 0.28);
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}

.sw-seller-delivery,
.sw-seller-rating,
.sw-seller-offer {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.sw-seller-rating {
  color: #c4b5fd;
}

.sw-seller-offer {
  color: #f9a8d4;
}

.sw-seller-deal {
  width: 100%;
  min-height: 32px;
  margin-top: auto;
  border-radius: 8px;
  font-size: 0.76rem;
}

.sw-seller-error {
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.08);
  color: #fecaca;
  padding: 0.8rem;
}

.sw-seller-error strong {
  color: #fecaca;
}

.sw-seller-error p {
  margin: 0.25rem 0 0;
  color: #fca5a5;
  font-size: 0.82rem;
}

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

@media (max-width: 920px) {
  .sw-seller-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .sw-seller-grid {
    grid-template-columns: 1fr;
  }
}

.mms-job-role {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.mms-job-company {
  margin: -0.1rem 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.mms-job-company strong {
  color: var(--text);
  font-weight: 650;
}

/* Match level badges */
.mms-match-level {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 99px;
  padding: 0.2rem 0.55rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.mms-match--complete,
.mms-match--excellent,
.mms-match--strong {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.mms-match--medium,
.mms-match--moderate {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.mms-match--partial,
.mms-match--weak {
  background: rgba(249, 115, 22, 0.14);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.32);
}

/* Score bar */
.mms-score-bar-wrap {
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}
.mms-score-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  transition: width 0.6s ease;
}
.mms-score-label {
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 800;
  color: var(--text);
}

.mms-score-panel {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  text-align: right;
  width: 100%;
}

.mms-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.mms-job-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.mms-job-meta-pill strong {
  color: var(--text);
  font-weight: 650;
}

.mms-job-why {
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.55;
  margin: 0;
}

.mms-job-snippet {
  margin: -0.1rem 0 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.mms-job-skill-strip {
  margin-top: 0.05rem;
}

.mms-job-skills-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.mms-skill-row-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* Pill variants */
.mms-pill--green {
  background: rgba(16,185,129,0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16,185,129,0.3);
}
.mms-pill--missing {
  background: rgba(239,68,68,0.1);
  color: #fca5a5;
  border: 1px dashed rgba(239,68,68,0.35);
}

/* Job card bottom row */
.mms-job-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-soft);
}
.mms-job-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  width: 100%;
}
.mms-search-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  width: 100%;
  font-size: 0.74rem;
  font-weight: 720;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border: 1px solid rgba(167, 139, 250, 0.48);
  box-shadow: 0 8px 18px rgba(124,58,237,0.18);
  border-radius: 8px;
  padding: 0.42rem 0.72rem;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  white-space: nowrap;
}
.mms-search-link:hover {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  border-color: rgba(196, 181, 253, 0.7);
  box-shadow: 0 10px 22px rgba(124,58,237,0.25);
  transform: translateY(-1px);
}

.mms-verified-note {
  grid-column: 1 / -1;
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.btn-tailor {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 720;
  min-height: 32px;
  width: 100%;
  justify-content: center;
  padding: 0.42rem 0.72rem;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.10);
  color: #ede9fe;
  border: 1px solid rgba(167, 139, 250, 0.28);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}
.btn-tailor:hover  {
  background: rgba(124, 58, 237, 0.16);
  border-color: rgba(167, 139, 250, 0.46);
}
.btn-tailor:active { transform: scale(0.97); }
.btn-tailor:disabled,
.btn-tailor[aria-disabled="true"] {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-tailor:disabled:hover,
.btn-tailor[aria-disabled="true"]:hover {
  background: rgba(124, 58, 237, 0.10);
  border-color: rgba(167, 139, 250, 0.28);
}
.btn-prepare-interview {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(124, 58, 237, 0.13));
  border-color: rgba(96, 165, 250, 0.28);
}
.btn-prepare-interview:not(:disabled):hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(124, 58, 237, 0.2));
  border-color: rgba(125, 211, 252, 0.45);
}
.mms-disabled-action-wrap {
  display: block;
  width: 100%;
}

@media (max-width: 720px) {
  .mms-job-card {
    flex-direction: column;
  }

  .mms-job-side {
    flex: 0 0 auto;
    align-items: stretch;
    justify-content: flex-start;
    border-top: 1px solid var(--border-soft);
    padding-top: 0.75rem;
  }

  .mms-score-panel {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .mms-job-links,
  .mms-job-links .mms-search-link,
  .btn-tailor {
    width: 100%;
    justify-content: center;
  }
}

/* ══════════════════════════════════════════════════════════
   MMS Step 3 — Tailor resume modal
   ══════════════════════════════════════════════════════════ */

.mms-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
@media (min-width: 640px) {
  .mms-modal { align-items: center; }
}
.mms-modal.hidden { display: none; }

#tailorModal.mms-modal:not(.hidden),
#prepareInterviewModal.mms-modal:not(.hidden),
#ncToRdModal.mms-modal:not(.hidden),
#afDiagramModal.mms-modal:not(.hidden),
#dpShareModal.mms-modal:not(.hidden) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 6000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100vw !important;
  height: 100dvh !important;
  padding: 1rem;
  box-sizing: border-box;
}

.mms-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.mms-modal-panel {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-height: 92dvh;
  overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
}
@media (min-width: 640px) {
  .mms-modal-panel {
    border-radius: 16px;
    width: min(540px, 96vw);
    max-height: 86dvh;
  }
  .mms-modal-panel--interview {
    width: min(580px, 96vw);
  }
}

.mms-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.4rem 0.9rem;
  border-bottom: 1px solid var(--border-soft);
  gap: 0.75rem;
  flex-shrink: 0;
}
.mms-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}
.mms-modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.15s;
}
.mms-modal-close:hover { background: rgba(255,255,255,0.08); color: var(--text); }

.mms-modal-body {
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  flex: 1;
  overflow-y: auto;
}

.mms-tailor-warning {
  font-size: 0.82rem;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  line-height: 1.5;
}
.mms-tailor-warning strong { color: #fde68a; }

.mms-tailor-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.mms-tailor-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.8rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.mms-tailor-summary > div {
  min-width: 0;
}

.mms-tailor-summary-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-bottom: 0.2rem;
}

.mms-tailor-summary strong {
  display: block;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.35;
  word-break: break-word;
}
.hero-title .brand-inline,
.hero-title .brand-inline *,
.page-title .brand-inline,
.page-title .brand-inline *,
.section-title .brand-inline,
.section-title .brand-inline * {
  font-weight: 648;
}

@media (max-width: 640px) {
  .mms-tailor-summary {
    grid-template-columns: 1fr;
  }
}

.mms-tailor-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  display: block;
}
.mms-tailor-optional {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
}
.mms-tailor-jd {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border-soft);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  resize: vertical;
  min-height: 160px;
  line-height: 1.55;
  transition: border-color 0.15s;
}
.mms-tailor-jd:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.mms-tailor-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: -0.3rem 0 0;
}

.mms-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 0.9rem 1.4rem 1.2rem;
  border-top: 1px solid var(--border-soft);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.mms-modal-footer--processing {
  display: none;
}
.mms-modal-footer--success {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.mms-modal-footer--success .btn-primary,
.mms-modal-footer--success .btn-ghost {
  width: min(340px, 100%);
  justify-content: center;
}

.mms-prepare-summary {
  border: 1px solid rgba(125, 211, 252, 0.18);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(255, 255, 255, 0.04));
  border-radius: 12px;
  padding: 0.9rem 1rem;
}
.mms-prepare-kicker {
  display: inline-flex;
  margin-bottom: 0.45rem;
  color: #93c5fd;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mms-prepare-title {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.3;
}
.mms-prepare-meta {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.mms-prepare-score {
  display: inline-flex;
  margin-top: 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.34);
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  font-size: 0.74rem;
  font-weight: 760;
  padding: 0.22rem 0.62rem;
}
.mms-prepare-copy {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.6;
}
.mms-prepare-progress {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(167, 139, 250, 0.24);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(14, 165, 233, 0.05));
  padding: 1rem;
}
.mms-prepare-stages {
  padding-top: 0;
  margin: 0 auto;
}
.mms-prepare-loading {
  margin: 0;
  padding: 0.6rem 0 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.mms-prepare-loading .mms-loading-steps {
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}
.success-banner {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--radius-sm);
  color: #6ee7b7;
  font-size: 0.85rem;
  padding: 0.65rem 0.9rem;
}

.btn-notecraft-researchdeck {
  width: 100%;
  margin-top: 1rem;
  justify-content: center;
  background:
    radial-gradient(circle at 18% 20%, rgba(34, 211, 238, 0.24), transparent 34%),
    linear-gradient(135deg, #7c3aed, #2563eb 54%, #0ea5e9);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.18);
}
.btn-notecraft-researchdeck:disabled,
.btn-notecraft-researchdeck.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}
.ecosystem-card-section {
  padding-top: 0;
  padding-bottom: 1.5rem;
}
.ecosystem-card {
  max-width: 820px;
  margin: 0 auto;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 10%, rgba(34, 211, 238, 0.13), transparent 34%),
    linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(15, 23, 42, 0.2));
  box-shadow:
    0 18px 46px rgba(15, 23, 42, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset;
}
.ecosystem-card-copy {
  text-align: center;
}
.ecosystem-card-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  flex-wrap: wrap;
  margin-bottom: 0.38rem;
  color: #93c5fd;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ecosystem-card-kicker .brand-inline {
  font-size: clamp(0.88rem, 1.4vw, 1rem);
  text-transform: none;
}
.ecosystem-card-kicker .brand-inline,
.ecosystem-card-kicker .brand-inline * {
  letter-spacing: 0;
}
.ecosystem-card h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  font-weight: 760;
  letter-spacing: -0.01em;
}
.ecosystem-card p {
  max-width: 620px;
  margin: 0.45rem auto 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}
@media (max-width: 720px) {
  .ecosystem-card-section {
    padding-bottom: 1.1rem;
  }
  .ecosystem-card {
    padding: 0.9rem 0.85rem;
    border-radius: 14px;
  }
  .ecosystem-card p {
    font-size: 0.86rem;
  }
}
.nc-to-rd-hint {
  margin-top: 0.45rem;
  text-align: center;
}
.mms-modal-panel--notecraft-rd {
  width: min(720px, 96vw);
}
.nc-rd-options {
  border: 1px solid rgba(167, 139, 250, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  padding: 0.95rem;
}
.nc-rd-options .field-row {
  margin: 0 0 0.85rem;
}
.nc-rd-options .field-row:last-child {
  margin-bottom: 0;
}
.nc-rd-modal-footer {
  justify-content: center;
}
.nc-rd-modal-footer .btn-primary,
.nc-rd-modal-footer .btn-ghost {
  min-width: min(260px, 100%);
  justify-content: center;
}
#ncToRdProgress .mms-loading {
  margin-top: 0.85rem;
}

@media (max-width: 640px) {
  .nc-rd-options {
    padding: 0.8rem;
  }
  .nc-rd-modal-footer .btn-primary,
  .nc-rd-modal-footer .btn-ghost {
    width: 100%;
  }
}

/* ── Resume Builder ──────────────────────────────────────────────────────── */

.form-section-heading {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin: 1.4rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-soft);
}

.required-star {
  color: #F87171;
  margin-left: 0.15em;
}

.optional-label {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 0.35em;
  text-transform: none;
  letter-spacing: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.char-counter {
  display: block;
  text-align: right;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.rb-tab-bar {
  margin-bottom: 1.15rem;
}

.rb-tab-intro {
  display: block;
  margin: -0.25rem 0 1rem;
  max-width: 58rem;
  line-height: 1.55;
}

/* Inline field validation errors */
.field-error {
  display: none;
  font-size: 0.78rem;
  color: #F87171;
  margin-top: 0.3rem;
  min-height: 1em;
}
.field-error.visible {
  display: block;
}
.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: #F87171 !important;
  box-shadow: 0 0 0 2px rgba(248,113,113,0.18);
}

/* Result card */
.result-success-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.15);
  color: var(--accent-primary);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.result-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 0.4rem;
}

.result-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 42ch;
  margin: 0 auto;
}

/* InterviewCraft profile match checkpoint */
.ic-match-card {
  --ic-match-accent: #c4b5fd;
  --ic-match-accent-rgb: 196, 181, 253;
  --ic-match-text: #ede9fe;
  border-color: rgba(var(--ic-match-accent-rgb), 0.28);
  background:
    radial-gradient(circle at top right, rgba(var(--ic-match-accent-rgb), 0.16), transparent 34%),
    linear-gradient(135deg, rgba(var(--ic-match-accent-rgb), 0.08), rgba(255, 255, 255, 0.02)),
    var(--card);
  box-shadow: 0 18px 42px rgba(var(--ic-match-accent-rgb), 0.08);
}

.ic-match-tier--excellent {
  --ic-match-accent: #86efac;
  --ic-match-accent-rgb: 134, 239, 172;
  --ic-match-text: #dcfce7;
}

.ic-match-tier--strong {
  --ic-match-accent: #5eead4;
  --ic-match-accent-rgb: 94, 234, 212;
  --ic-match-text: #ccfbf1;
}

.ic-match-tier--moderate {
  --ic-match-accent: #facc15;
  --ic-match-accent-rgb: 250, 204, 21;
  --ic-match-text: #fef9c3;
}

.ic-match-tier--partial {
  --ic-match-accent: #fb923c;
  --ic-match-accent-rgb: 251, 146, 60;
  --ic-match-text: #ffedd5;
}

.ic-match-tier--weak {
  --ic-match-accent: #f87171;
  --ic-match-accent-rgb: 248, 113, 113;
  --ic-match-text: #fee2e2;
}

.ic-match-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ic-match-accent);
  margin-bottom: 0.75rem;
}

.ic-match-header {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.35rem;
}

.ic-match-header .result-title,
.ic-match-header .result-sub {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.ic-match-score {
  flex: 0 0 auto;
  width: 132px;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  text-align: center;
  background: rgba(var(--ic-match-accent-rgb), 0.12);
  border: 1px solid rgba(var(--ic-match-accent-rgb), 0.32);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.ic-match-score span {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ic-match-text);
  line-height: 1;
}

.ic-match-score small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.35rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ic-match-text);
  background: rgba(var(--ic-match-accent-rgb), 0.14);
  border: 1px solid rgba(var(--ic-match-accent-rgb), 0.2);
}

.ic-match-meter {
  width: 100%;
  height: 6px;
  margin-top: 0.65rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.ic-match-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(var(--ic-match-accent-rgb), 0.68), var(--ic-match-accent));
  transition: width 0.35s ease;
}

.ic-match-advisory {
  margin: -0.55rem 0 1.35rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.ic-match-confidence-note {
  margin: -0.85rem 0 1.35rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  color: var(--ic-match-text);
  background: rgba(var(--ic-match-accent-rgb), 0.1);
  border: 1px solid rgba(var(--ic-match-accent-rgb), 0.22);
  font-size: 0.8rem;
  line-height: 1.5;
}

.ic-match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.ic-match-panel {
  padding: 1rem;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.ic-match-panel h3 {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.ic-match-panel ul {
  margin: 0;
  padding-left: 1.05rem;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.55;
}

.ic-match-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 640px) {
  .ic-match-header,
  .ic-match-grid,
  .ic-match-actions {
    grid-template-columns: 1fr;
  }

  .ic-match-header {
    display: grid;
  }

  .ic-match-score {
    width: 100%;
  }

  .ic-match-advisory {
    margin-top: -0.35rem;
  }
}

/* Post-generation CTA */
.rb-cta-banner {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: var(--accent-primary-soft);
  border: 1px solid rgba(124, 58, 237, 0.25);
  text-align: center;
}

.rb-cta-banner .btn-ghost {
  width: auto;
  min-width: 0;
  padding-inline: 1.15rem;
}

.rb-cta-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.1rem;
}

.rb-cta-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* ── NoteCraft tab bar ─────────────────────────────────────────────────────── */
.nc-tab-bar {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 0;
  flex-wrap: wrap;
}

.nc-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px 4px 0 0;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: -1.5px;
}

.nc-tab-btn:hover {
  color: var(--text-primary);
}

.nc-tab-btn--active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  font-weight: 600;
}

.nc-beta-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  line-height: 1.4;
}

/* ── NoteCraft tab panels ─────────────────────────────────────────────────── */
.nc-tab-panel {
  display: block;
}

.nc-tab-panel--hidden {
  display: none;
}

.rd-business-preserve-note {
  margin-top: 0.75rem;
  line-height: 1.55;
}

.rd-business-trust-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.25rem 0 1rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.09), rgba(124, 58, 237, 0.07));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.rd-business-trust-mark {
  flex: 0 0 auto;
  color: #14b8a6;
  font-size: 0.72rem;
  line-height: 1.45rem;
}

.rd-business-trust-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ── NoteCraft beta notice ─────────────────────────────────────────────────── */
.nc-beta-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: var(--accent-primary-soft);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.nc-beta-notice svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--accent-primary);
}

/* ── NoteCraft important notes ───────────────────────────────────────────── */
.important-notes-box {
  padding: 1rem 1.25rem;
  opacity: 0.45;
}

.important-notes-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.important-notes-list {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.important-notes-list li {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── Legal and cookie policy ──────────────────────────────────────────── */
.policy-page {
  background: var(--bg);
}

.faq-list-section {
  padding-top: 2rem;
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-list-item {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border-soft);
}

.faq-list-item:first-child {
  padding-top: 0;
}

.faq-list-item h2 {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
}

.faq-list-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.legal-nav {
  display: flex;
  gap: 10px;
  margin: 20px 0 28px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.legal-nav--footer {
  margin: 0.3rem 0 0;
}

.legal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 12px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d1d5db;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: all 0.2s ease;
}

.legal-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.legal-link.active {
  background: var(--accent-grad);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.35);
}

.legal-button {
  font-family: inherit;
}

.policy-layout {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.policy-section {
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--border-soft);
}

.policy-section:last-child {
  border-bottom: 0;
}

.policy-section-major {
  padding-bottom: 1.5rem;
}

.policy-section h2 {
  margin-bottom: 0.65rem;
  font-size: 1.05rem;
  color: var(--text);
}

.policy-section h3 {
  margin: 1rem 0 0.4rem;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.88);
}

.policy-section p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.policy-link {
  color: var(--purple-light);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.terms-document {
  display: grid;
  gap: 0.85rem;
}

.terms-document p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.terms-section {
  padding-top: 0.3rem;
}

.terms-section h2 {
  margin-bottom: 0.45rem;
  font-size: 0.98rem;
  color: var(--text);
}

.terms-version {
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-soft);
}

.terms-version p {
  color: var(--text-secondary);
  font-weight: 700;
}

@media (max-width: 640px) {
  .terms-modal {
    padding: 0.75rem;
  }

  .terms-modal-panel {
    max-height: 92vh;
    padding: 1rem;
  }

  .terms-modal-scroll {
    max-height: 56vh;
  }

  .terms-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .terms-modal-actions .btn-primary,
  .terms-modal-actions .btn-ghost {
    width: 100%;
  }

  .account-lifecycle-actions,
  .account-lifecycle-modal-actions {
    grid-template-columns: 1fr;
  }

  .account-lifecycle-modal-panel {
    padding: 1.25rem;
  }
}

/* ── Curio workflow assistant ─────────────────────────────────────────── */
.aa {
  position: fixed !important;
  right: max(1rem, env(safe-area-inset-right)) !important;
  bottom: max(1rem, env(safe-area-inset-bottom)) !important;
  left: auto !important;
  top: auto !important;
  width: max-content;
  max-width: calc(100vw - 2rem);
  display: flex;
  justify-content: flex-end;
  z-index: 6800 !important;
  pointer-events: none;
}

.aa-launcher,
.aa-panel {
  pointer-events: auto;
}

.aa-launcher {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  padding: 0.62rem 0.9rem 0.62rem 0.72rem;
  border: 1px solid rgba(167, 139, 250, 0.42);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.44), rgba(124, 58, 237, 0.64)),
    rgba(17, 24, 39, 0.68);
  color: #FFFFFF;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow:
    0 18px 46px rgba(10, 14, 28, 0.42),
    0 0 34px rgba(124, 58, 237, 0.2);
}

.aa-launcher-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.12), transparent 40%),
    rgba(2, 6, 23, 0.88);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16) inset,
    0 8px 18px rgba(2, 6, 23, 0.32);
}

.aa-launcher-icon img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}

.aa-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.75rem);
  width: min(92vw, 420px);
  max-height: min(78vh, 680px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0%, rgba(34, 211, 238, 0.16), transparent 32%),
    linear-gradient(145deg, rgba(19, 25, 43, 0.98), rgba(13, 17, 31, 0.98));
  border: 1px solid rgba(167, 139, 250, 0.28);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  transform-origin: bottom right;
  animation: askAstryxIn 180ms ease-out both;
}

.aa-panel[hidden] {
  display: none;
}

.aa-head {
  padding: 1rem 1rem 0.85rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.aa-kicker {
  margin: 0 0 0.2rem;
  color: #A78BFA;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.aa-head h2 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.22;
  letter-spacing: 0;
}

.aa-close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.aa-body {
  padding: 0.9rem 1rem;
  overflow: auto;
}

.aa-tool-context {
  display: grid;
  gap: 0.46rem;
  margin-bottom: 0.8rem;
  color: rgba(229, 231, 235, 0.86);
  font-size: 0.78rem;
  line-height: 1.4;
}

.aa-tool-context p {
  margin: 0;
}

.aa-tool-context strong {
  color: rgba(255, 255, 255, 0.92);
  display: block;
  font-size: 0.72rem;
  line-height: 1.25;
}

.aa-security-note {
  text-align: left;
  color: rgba(229, 231, 235, 0.72);
}

.aa-message {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
}

.aa-message {
  padding: 0.78rem 0.86rem;
  color: rgba(229, 231, 235, 0.92);
  font-size: 0.86rem;
  line-height: 1.5;
}

.aa-section {
  margin-top: 0.9rem;
}

.aa-section-title {
  margin: 0 0 0.52rem;
  color: rgba(229, 231, 235, 0.94);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
}

.aa-categories {
  display: grid;
  gap: 0.5rem;
}

.aa-chip {
  width: 100%;
  padding: 0.7rem 0.75rem;
  display: grid;
  gap: 0.16rem;
  text-align: left;
  border-radius: 10px;
  border: 1px solid rgba(167, 139, 250, 0.16);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.aa-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(26, 35, 58, 0.82);
}

.aa-chip-title {
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.25;
}

.aa-chip-desc {
  color: rgba(196, 201, 212, 0.88);
  font-size: 0.76rem;
  line-height: 1.38;
}

.aa-prompts {
  display: grid;
  gap: 0.45rem;
}

.aa-prompt {
  width: max-content;
  max-width: 100%;
  min-height: 34px;
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  background: rgba(96, 165, 250, 0.1);
  color: rgba(229, 231, 235, 0.94);
  font-size: 0.76rem;
  font-weight: 750;
  cursor: pointer;
}

.aa-answer {
  margin-top: 0.58rem;
  display: grid;
  gap: 0.46rem;
}

.aa-chat-row {
  display: flex;
  width: 100%;
  animation: aaBubbleIn 210ms ease-out both;
}

.aa-chat-row--user {
  justify-content: flex-end;
}

.aa-chat-row--assistant {
  justify-content: flex-start;
}

.aa-bubble {
  max-width: 92%;
  border-radius: 14px;
  padding: 0.62rem 0.74rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.aa-bubble--user {
  max-width: 82%;
  border-bottom-right-radius: 5px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.88), rgba(96, 165, 250, 0.7));
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.aa-bubble--assistant {
  border-bottom-left-radius: 5px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035)),
    rgba(15, 23, 42, 0.88);
}

.aa-bubble--typing {
  width: 58px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.24rem;
}

.aa-bubble--typing span {
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 999px;
  background: rgba(229, 231, 235, 0.82);
  animation: aaTypingDot 920ms ease-in-out infinite;
}

.aa-bubble--typing span:nth-child(2) {
  animation-delay: 120ms;
}

.aa-bubble--typing span:nth-child(3) {
  animation-delay: 240ms;
}

.aa-answer-label {
  margin: 0 0 0.24rem;
  color: #22D3EE;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.aa-answer h3 {
  margin: 0 0 0.36rem;
  font-size: 0.94rem;
  line-height: 1.24;
  letter-spacing: 0;
}

.aa-answer p {
  margin: 0;
  color: rgba(229, 231, 235, 0.9);
  font-size: 0.8rem;
  line-height: 1.42;
}

.aa-answer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
  margin: 0.55rem 0 0;
}

.aa-answer-meta span {
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.16);
  color: #CFC7FF;
  font-size: 0.68rem;
  font-weight: 800;
}

.aa-answer ul {
  margin: 0.55rem 0 0;
  padding-left: 1.1rem;
  color: rgba(229, 231, 235, 0.88);
  font-size: 0.77rem;
  line-height: 1.38;
}

.aa-faq-q {
  display: block;
  font-weight: 600;
  color: rgba(229, 231, 235, 0.95);
}

.aa-faq-a {
  display: block;
  padding-left: 0.6rem;
  margin-top: 0.15rem;
  color: rgba(229, 231, 235, 0.72);
}

.aa-cta {
  min-height: 34px;
  margin-top: 0.62rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.36rem 0.68rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #7C3AED, #5B21B6);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.aa-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.82rem 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.aa-form input {
  min-width: 0;
  height: 40px;
  padding: 0 0.72rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.78);
  color: var(--text-primary);
  font-size: 0.84rem;
}

.aa-form button {
  min-width: 52px;
  width: 52px;
  height: 40px;
  padding: 0 0.72rem;
  border: 0;
  border-radius: 10px;
  background: #FFFFFF;
  color: #111827;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.aa-submit-icon {
  width: 19px;
  height: 19px;
  display: block;
  margin: 0 auto;
  fill: currentColor;
  transform: translateX(1px);
}

.aa-submit-loading .aa-submit-icon {
  opacity: 0.55;
}

.aa-form button:disabled,
.aa-form input:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.aa-footnote {
  min-height: 2.6rem;
  margin: 0;
  padding: 0.52rem 1rem 0.85rem;
  color: rgba(196, 201, 212, 0.76);
  font-size: 0.72rem;
  line-height: 1.35;
}

@keyframes askAstryxIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes aaBubbleIn {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes aaTypingDot {
  0%, 80%, 100% {
    opacity: 0.38;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* ── Cookie consent ───────────────────────────────────────────────────── */
.cookie-consent {
  position: fixed !important;
  left: 1rem !important;
  right: 1rem !important;
  bottom: 1rem !important;
  z-index: 7000;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: rgba(17, 24, 39, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.3);
  color: #F9FAFB;
}

.cookie-consent[hidden] {
  display: none;
}

.cookie-consent p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #E5E7EB;
}

.cookie-learn-more {
  color: #FFFFFF;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-consent-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.cookie-btn {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.cookie-btn {
  min-height: 36px;
  padding: 0 0.85rem;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 700;
}

.cookie-btn-primary {
  background: #FFFFFF;
  color: #111827;
}

.cookie-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #F9FAFB;
}

/* ── Tool availability notice ─────────────────────────────────────────── */
.tool-unavailable-notice {
  position: relative;
  z-index: 2;
  max-width: 920px;
  min-height: 38px;
  margin: 0 auto 1.65rem;
  padding: 0.46rem 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.66rem;
  text-align: center;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(124, 58, 237, 0.1), rgba(34, 211, 238, 0.05)),
    rgba(18, 24, 38, 0.82);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.04) inset,
    0 10px 28px rgba(245, 158, 11, 0.08),
    0 18px 48px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: rgba(238, 242, 255, 0.92);
  overflow: hidden;
  animation: globalBannerFade 0.32s ease both;
}

.tool-unavailable-notice::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 20%, rgba(251, 191, 36, 0.16), transparent 38%),
    linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.08), transparent);
}

.tool-unavailable-icon {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #FEF3C7;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.88), rgba(249, 115, 22, 0.62)),
    rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 8px 18px rgba(245, 158, 11, 0.16);
}

.tool-unavailable-text {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 247, 237, 0.94);
  font-size: 0.86rem;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.005em;
}

button[data-tool-primary-action][disabled] {
  cursor: not-allowed;
  opacity: 0.58;
  filter: saturate(0.7);
  box-shadow: none;
}

.credit-cost-preview {
  margin: 0.55rem 0 0;
  color: var(--success, #059669);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  letter-spacing: 0;
}

.tool-credit-note,
.tool-security-note {
  margin: 0.35rem 0 0;
  color: var(--text-muted, #8A8FA3);
  font-size: 0.8rem;
  line-height: 1.4;
  text-align: center;
  letter-spacing: 0;
}

.tool-credit-note {
  font-weight: 600;
}

.tool-security-note {
  font-weight: 500;
}

.mms-modal-footer .credit-cost-preview,
.nc-rd-modal-footer .credit-cost-preview {
  flex-basis: 100%;
  order: 10;
  margin-top: 0.25rem;
}

.mms-modal-footer .tool-credit-note,
.nc-rd-modal-footer .tool-credit-note {
  flex-basis: 100%;
  order: 11;
  margin-top: 0.1rem;
}

/* ── Delayed processing reassurance messages ─────────────────────────── */
.processing-message {
  width: min(100%, 640px);
  min-height: 1.55rem;
  margin: 0.75rem auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  color: #CFC7FF;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

.processing-message[hidden] {
  display: none;
}

.processing-message-visible {
  opacity: 1;
  transform: translateY(0);
}

.processing-message-dot {
  width: 0.48rem;
  height: 0.48rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, #7C3AED, #38BDF8);
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.55);
  animation: processingPulse 1.8s ease-in-out infinite;
}

.processing-message-text {
  opacity: 0;
  transition: opacity 180ms ease;
}

.processing-message-text--visible {
  opacity: 1;
}

@keyframes processingPulse {
  0%, 100% {
    transform: scale(0.88);
    opacity: 0.65;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── Navigation loading spinner ──────────────────────────────────────── */
#navLoadingSpinner {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(6, 5, 18, 0.65);
  backdrop-filter: blur(4px);
}

#navLoadingSpinner[hidden] {
  display: none;
}

/* ── Navigation guard dialog ─────────────────────────────────────────────── */
#navGuardDialog {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 5, 18, 0.72);
  backdrop-filter: blur(6px);
}

#navGuardDialog[hidden] {
  display: none;
}

.nav-guard-card {
  background: var(--surface-2, #12111f);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 1.75rem 1.5rem 1.5rem;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.nav-guard-title {
  color: var(--text, #d4d4e8);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.nav-guard-msg {
  color: var(--text-muted, #9898b3);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.nav-guard-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.nav-guard-btn {
  white-space: nowrap;
}

.nav-spinner-svg {
  width: 200px;
  height: 80px;
  animation: navSpinnerPulse 2s ease-in-out infinite;
}

.nav-spinner-track {
  opacity: 0.3;
}

.nav-spinner-path {
  stroke-dasharray: 0.38 0.62;
  animation: navSpinnerTravel 2s linear infinite;
}

.nav-spinner-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: navSpinnerDotPulse 1.6s ease-in-out infinite;
}

@keyframes navSpinnerTravel {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}

@keyframes navSpinnerPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.8; }
}

@keyframes navSpinnerDotPulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(2.2); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-spinner-path { animation-duration: 5s; }
  .nav-spinner-dot  { animation: none; }
  .nav-spinner-svg  { animation: none; }
}

/* ── ArchFlow ──────────────────────────────────────────────────────── */

.af-diagram-wrap {
  margin-top: 1.5rem;
  border: 1px solid rgba(125, 211, 252, 0.15);
  border-radius: 10px;
  overflow: hidden;
}

.af-diagram-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: rgba(14, 165, 233, 0.06);
  border-bottom: 1px solid rgba(125, 211, 252, 0.12);
}

.af-diagram-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-2, #a0aec0);
  text-transform: uppercase;
}

.af-expand-btn {
  font-size: 0.78rem;
  padding: 0.3rem 0.75rem;
}

.af-diagram-container {
  padding: 1rem;
  overflow-x: auto;
  background: var(--surface, #0f1117);
  min-height: 120px;
}

.af-diagram-container svg {
  display: block;
  overflow: visible;
  height: auto;
}

.af-diagram-container foreignObject,
.af-modal-diagram-container foreignObject,
.af-diagram-container .label,
.af-modal-diagram-container .label,
.af-diagram-container .nodeLabel,
.af-modal-diagram-container .nodeLabel,
.af-diagram-container .edgeLabel,
.af-modal-diagram-container .edgeLabel,
.af-diagram-container .cluster-label,
.af-modal-diagram-container .cluster-label {
  overflow: visible !important;
  text-overflow: clip !important;
  max-width: none !important;
}

.af-diagram-container foreignObject div,
.af-modal-diagram-container foreignObject div,
.af-diagram-container .nodeLabel,
.af-modal-diagram-container .nodeLabel,
.af-diagram-container .edgeLabel,
.af-modal-diagram-container .edgeLabel,
.af-diagram-container .cluster-label,
.af-modal-diagram-container .cluster-label {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.25;
}

.af-downloads {
  margin-top: 0.25rem;
}

.af-visual-credit-note {
  max-width: 760px;
  margin: 0.7rem auto 0;
  color: var(--success, #059669);
  font-size: 0.84rem;
  line-height: 1.45;
  text-align: center;
}

.af-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  justify-content: center;
  align-items: center;
}

.af-action-row .btn-primary,
.af-action-row .btn-secondary {
  width: auto;
}

@media (max-width: 640px) {
  .af-action-row {
    flex-direction: column;
    align-items: center;
  }
}

.af-export-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.af-export-controls.hidden { display: none; }

.af-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.875rem;
  padding: 0.55rem 2.2rem 0.55rem 0.9rem;
  outline: none;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  cursor: pointer;
  transition: border-color var(--tr), box-shadow var(--tr), background var(--tr);
}

.af-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.btn-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.af-summary-section {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(125, 211, 252, 0.1);
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.af-summary-heading {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2, #a0aec0);
  margin: 0 0 0.65rem 0;
  flex-shrink: 0;
}

.af-summary-text {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text, #e2e8f0);
  margin: 0;
}

.af-summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.af-summary-list li {
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--text, #e2e8f0);
  padding-left: 1rem;
  position: relative;
}

.af-summary-list li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--brand-violet, #7c3aed);
}

.af-summary-list--flow li::before {
  content: "→";
  color: var(--brand-cyan, #06b6d4);
}

/* ── Result section (separate card, wider than input) ── */
.af-result-section {
  max-width: 1150px;
  margin: 1.5rem auto 0;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

@media (max-width: 768px) {
  .af-result-section {
    margin-top: 1rem;
    padding: 1.25rem;
  }
}

/* ── Scrollable summary sections (heading stays pinned, content scrolls) ── */
.af-summary-section--overview .af-summary-text {
  max-height: 220px;
  overflow-y: auto;
  min-height: 0;
}

.af-summary-section--components .af-summary-list {
  max-height: 340px;
  overflow-y: auto;
  min-height: 0;
}

.af-summary-section--flow .af-summary-list {
  max-height: 380px;
  overflow-y: auto;
  min-height: 0;
}

.af-summary-section--layers .af-summary-list {
  max-height: 240px;
  overflow-y: auto;
  min-height: 0;
}

.af-confirm-dialog {
  margin-top: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.06);
}

.af-confirm-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text, #e2e8f0);
  margin: 0 0 0.4rem 0;
}

.af-confirm-msg {
  font-size: 0.87rem;
  color: var(--text-2, #a0aec0);
  margin: 0 0 1rem 0;
  line-height: 1.55;
}

.af-confirm-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* ── DataPilot dashboard rendering and interaction shell ── */
.dp-generator-layout {
  max-width: 720px;
}

.dp-form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.55;
}

.dp-result {
  max-width: 1150px;
  margin: 1.5rem auto 0;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

.dp-result-sub {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.dp-result-helper {
  margin: 0.45rem auto 0.6rem;
  max-width: 520px;
  font-size: 0.78rem;
  color: var(--text-2);
  text-align: center;
  line-height: 1.5;
}

.dp-sheet-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin: 1.3rem 0 0.85rem;
}

.dp-sheet-tab {
  border: 1px solid rgba(124, 58, 237, 0.28);
  background: rgba(124, 58, 237, 0.08);
  color: var(--text-2);
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.dp-sheet-tab[aria-selected="true"] {
  color: #fff;
  border-color: rgba(125, 211, 252, 0.45);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.72), rgba(6, 182, 212, 0.42));
}

.dp-summary-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.dp-summary-card,
.dp-table-card,
.dp-chart-card,
.dp-insight-card,
.dp-kpi-card,
.dp-quality-section {
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.42);
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.16);
}

.dp-summary-card {
  padding: 1rem 1.1rem;
}

.dp-summary-card--primary {
  grid-column: 1 / -1;
  background: rgba(124, 58, 237, 0.08);
}

.dp-summary-card h3,
.dp-table-card h4,
.dp-chart-card h4,
.dp-insight-card h4,
.dp-kpi-card h4,
.dp-section-title {
  margin: 0 0 0.55rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
}

.dp-summary-card p,
.dp-table-card p,
.dp-insight-card p,
.dp-empty {
  margin: 0;
  color: var(--text-2);
  font-size: 0.88rem;
  line-height: 1.6;
}

.dp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.dp-list li {
  color: var(--text-2);
  font-size: 0.86rem;
  line-height: 1.55;
  padding-left: 1rem;
  position: relative;
}

.dp-list li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--brand-cyan, #06b6d4);
}

.dp-kicker {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dp-result-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.dp-result-actions .btn-primary,
.dp-result-actions .btn-ghost {
  width: auto;
  min-height: 48px;
  white-space: nowrap;
}

.dp-result-actions .btn-ghost {
  border-color: rgba(124, 58, 237, 0.45);
  color: #a78bfa;
}

.dp-dashboard {
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.35rem;
}

.dp-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dp-dashboard-title {
  margin: 0;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1.2;
}

.dp-reset-filters {
  white-space: nowrap;
}

.dp-filter-bar {
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.06);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.dp-filter-label {
  margin: 0 0 0.55rem;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.dp-filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dp-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: min(100%, 260px);
}

.dp-filter-name {
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 800;
}

.dp-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.dp-filter-chip {
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.52);
  color: var(--text-2);
  padding: 0.42rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color var(--tr), background var(--tr), color var(--tr), transform var(--tr);
}

.dp-filter-chip:hover,
.dp-filter-chip.is-active {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.1);
  color: var(--text);
}

.dp-filter-chip:active {
  transform: translateY(1px);
}

.dp-filter-chip span {
  color: var(--text-muted);
  margin-left: 0.3rem;
}

.dp-active-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: -0.35rem 0 1rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.06);
}

.dp-active-filter-label {
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 800;
}

.dp-active-filter-badge {
  border: 1px solid rgba(34, 197, 94, 0.32);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  color: var(--text);
  padding: 0.34rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.dp-active-filter-badge span {
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 0.3rem;
}

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

.dp-kpi-card {
  padding: 1rem;
}

.dp-kpi-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.dp-kpi-reason {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-top: 0.25rem;
  font-style: italic;
}

.dp-kpi-card span,
.dp-insight-card span,
.dp-source-columns,
.dp-table-meta span {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.dp-insight-grid,
.dp-chart-grid,
.dp-quality-section,
.dp-table-config {
  margin-top: 1rem;
}

.dp-insight-row,
.dp-chart-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.dp-insight-card {
  padding: 0.95rem 1rem;
}

.dp-chart-card {
  padding: 1rem;
  transition: border-color var(--tr), background var(--tr), transform var(--tr);
  cursor: pointer;
}

.dp-chart-card:hover,
.dp-chart-card.is-selected {
  border-color: rgba(125, 211, 252, 0.38);
  background: rgba(14, 165, 233, 0.07);
}

.dp-chart-card:active {
  transform: translateY(1px);
}

.dp-chart-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
}

.dp-chart-card-head > span {
  flex-shrink: 0;
  color: var(--brand-cyan, #06b6d4);
  border: 1px solid rgba(6, 182, 212, 0.24);
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dp-chart-placeholder {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0.85rem 0;
  border: 1px dashed rgba(125, 211, 252, 0.24);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.84rem;
  text-align: center;
  padding: 1rem;
  background: rgba(2, 6, 23, 0.2);
}

.dp-chart-placeholder strong {
  color: var(--text-2);
  font-size: 0.86rem;
}

.dp-chart-placeholder span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.dp-mini-chart {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0.85rem 0;
  padding: 0.85rem;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.18);
}

.dp-chart-canvas-wrap {
  position: relative;
  min-height: 260px;
  height: clamp(260px, 28vw, 360px);
  margin: 0.85rem 0;
  padding: 0.75rem;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.18);
}

.dp-chart-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.dp-chart-fallback {
  height: 100%;
}

.dp-mini-chart-row {
  display: grid;
  grid-template-columns: minmax(80px, 140px) 1fr auto;
  gap: 0.65rem;
  align-items: center;
}

.dp-mini-chart-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
  font-size: 0.78rem;
}

.dp-mini-chart-track {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.dp-mini-chart-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-violet, #7c3aed), var(--brand-cyan, #06b6d4));
}

.dp-mini-chart-row strong {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
}

.dp-source-columns {
  margin: 0 0 0.8rem;
}

.dp-chart-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.dp-chart-actions .btn-ghost {
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
}

.dp-interaction-panel {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.08);
}

.dp-interaction-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.dp-interaction-panel-head h4 {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
}

.dp-interaction-panel-head > span {
  flex-shrink: 0;
  color: var(--brand-cyan, #06b6d4);
  border: 1px solid rgba(6, 182, 212, 0.24);
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dp-interaction-panel p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.88rem;
  line-height: 1.6;
}

.dp-interaction-panel .dp-preview-note,
.dp-table-card .dp-preview-note {
  margin-top: 0.65rem;
  color: var(--text-2);
  font-size: 0.82rem;
  line-height: 1.5;
}

.dp-quality-section,
.dp-table-card {
  padding: 1rem 1.1rem;
}

.dp-table-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.dp-table-preview-wrap {
  margin-top: 1rem;
}

.dp-table-preview-wrap h5 {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
}

.dp-table-scroll {
  overflow-x: auto;
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 8px;
}

.dp-table-preview {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.dp-table-preview th,
.dp-table-preview td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  color: var(--text-2);
  font-size: 0.78rem;
  vertical-align: top;
}

.dp-table-preview th {
  color: var(--text);
  font-weight: 800;
  background: rgba(124, 58, 237, 0.08);
}

.dp-table-preview tr:last-child td {
  border-bottom: 0;
}

.dp-share-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dp-share-btn {
  width: 100%;
}

.dp-share-panel {
  margin-top: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.07);
}

.dp-share-ready {
  margin: 0 0 0.75rem;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
}

.dp-share-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
}

.dp-share-grid label,
.dp-shared-gate label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 800;
}

.dp-share-grid input,
.dp-shared-key-row input {
  width: 100%;
  min-height: 42px;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-sm, 8px);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.dp-share-grid input:focus,
.dp-shared-key-row input:focus {
  border-color: rgba(124, 58, 237, 0.6);
}

.dp-share-note {
  margin: 0.75rem 0;
  color: var(--text-2);
  font-size: 0.82rem;
  line-height: 1.5;
}

.dp-qr-download {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.3);
  color: var(--purple-light);
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  margin-top: 0.65rem;
}

.dp-qr-download:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.5);
  transform: translateY(-1px);
}

.dp-shared-shell {
  max-width: 1150px;
}

/* Phase 11: DataPilot highlight line */
.dp-highlight-line {
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: rgba(124,58,237,0.07);
  border: 1px solid rgba(124,58,237,0.18);
  border-radius: 6px;
  padding: 0.55rem 0.85rem;
  display: inline-block;
}

/* Phase 11: Trust microcopy */
.dp-trust-microcopy {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.55rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.85;
  flex-wrap: wrap;
}

.dp-trust-microcopy--center {
  justify-content: center;
  margin-top: 0.65rem;
  margin-bottom: 0;
}

.dp-trust-microcopy--share {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
}

.dp-trust-sep {
  color: var(--text-muted);
  opacity: 0.5;
}

.dp-trust-item {
  white-space: nowrap;
}

@media (max-width: 700px) {
  .dp-highlight-line {
    font-size: 0.84rem;
  }
}

.dp-shared-gate {
  max-width: 720px;
  margin: 1.25rem auto 1rem;
}

.dp-shared-key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

@media (max-width: 860px) {
  .dp-result {
    padding: 1.25rem;
  }

  .dp-summary-panel,
  .dp-kpi-grid,
  .dp-insight-row,
  .dp-chart-row {
    grid-template-columns: 1fr;
  }

  .dp-dashboard-header {
    align-items: stretch;
    flex-direction: column;
  }

  .dp-mini-chart-row {
    grid-template-columns: minmax(70px, 110px) 1fr auto;
  }

  .dp-share-grid,
  .dp-shared-key-row {
    grid-template-columns: 1fr;
  }
}

/* ── DataPilot full-page dashboard ─────────────────────────────────────── */
body.dashboard-shell {
  background: #f5f7fb;
  color: #172033;
}

.dp-dashboard-page {
  padding: 0;
  min-height: 100vh;
  background: #080c1e;
  color: #e2e8f0;
}

.dp-dash-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(11, 15, 25, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.dp-dashboard-brand {
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.dp-dash-title {
  display: none;
}

.dp-dash-topbar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.dp-dash-topbar-btns {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dp-dash-topbar-btns .btn-ghost {
  width: auto;
  white-space: nowrap;
}

.dp-dash-credit-note {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.42);
  margin: 0;
  white-space: nowrap;
  font-style: italic;
  letter-spacing: 0.01em;
}

.dp-dashboard-page-body {
  padding: 1.25rem 2rem;
  max-width: 1560px;
  margin: 0 auto;
}

.dp-dashboard-page-body > .dp-sheet-tabs {
  margin: 0 0 1.25rem;
  justify-content: flex-start;
}

.dp-dashboard-page .dp-filter-bar,
.dp-dashboard-page .dp-active-filters,
.dp-dashboard-page .dp-kpi-card,
.dp-dashboard-page .dp-insight-card,
.dp-dashboard-page .dp-chart-card,
.dp-dashboard-page .dp-table-card,
.dp-dashboard-page .dp-interaction-card,
.dp-dashboard-page .dp-quality-section {
  background: #0e1528;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.40);
}

.dp-dashboard-page .dp-kicker,
.dp-dashboard-page .dp-section-title,
.dp-dashboard-page .dp-source-columns,
.dp-dashboard-page .dp-table-card p,
.dp-dashboard-page .dp-table-meta,
.dp-dashboard-page .dp-preview-note,
.dp-dashboard-page .dp-chart-card-head span,
.dp-dashboard-page .dp-insight-card span {
  color: #64748b;
}

.dp-dashboard-page .dp-kpi-value {
  color: #f1f5f9;
}

.dp-dashboard-page .dp-kpi-card h4,
.dp-dashboard-page .dp-insight-card p,
.dp-dashboard-page .dp-chart-card h4,
.dp-dashboard-page .dp-table-card h4,
.dp-dashboard-page .dp-interaction-card h4 {
  color: #cbd5e1;
}

.dp-dashboard-page .dp-kpi-card h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.dp-dashboard-page .dp-kpi-card .dp-kicker {
  color: #475569;
  font-size: 0.68rem;
}

.dp-dashboard-page .dp-mini-chart-label,
.dp-dashboard-page .dp-mini-chart-row strong,
.dp-dashboard-page .dp-table-preview td,
.dp-dashboard-page .dp-table-preview th {
  color: #94a3b8;
}

.dp-dashboard-page .dp-chart-canvas-wrap {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.07);
}

.dp-dash-footer {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--card-border);
}

/* ── DataPilot share modal ──────────────────────────────────────────────── */
.dp-share-modal-panel {
  width: min(100%, 500px);
}

.dp-share-modal-copy {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
}

.dp-share-modal-content {
  margin-top: 0.25rem;
}

@media (max-width: 640px) {
  .dp-dash-topbar {
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .dp-dash-topbar-right {
    align-items: flex-end;
    margin-left: auto;
  }
}

.mms-modal-panel--af-diagram {
  width: min(85vw, 1400px);
  max-height: 85vh;
}

.af-modal-zoom-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  padding: 0 1.25rem 0.8rem;
  border-bottom: 1px solid rgba(125, 211, 252, 0.1);
}

.af-zoom-btn,
.af-zoom-reset {
  appearance: none;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text, #e2e8f0);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1;
  min-height: 2rem;
  transition: border-color var(--tr), background var(--tr), color var(--tr);
}

.af-zoom-btn {
  width: 2rem;
  padding: 0;
  font-size: 1rem;
}

.af-zoom-reset {
  padding: 0 0.7rem;
  font-weight: 600;
}

.af-zoom-btn:hover:not(:disabled),
.af-zoom-reset:hover:not(:disabled) {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(14, 165, 233, 0.12);
  color: #fff;
}

.af-zoom-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.af-zoom-value {
  min-width: 3.1rem;
  color: var(--text-2, #a0aec0);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.af-modal-diagram-body {
  overflow: auto;
  padding: 1.25rem;
}

.af-modal-diagram-container {
  --af-modal-zoom: 1;
  display: inline-block;
  min-width: 100%;
  overflow: visible;
  transform: scale(var(--af-modal-zoom));
  transform-origin: top left;
  transition: transform 120ms ease;
}

.af-modal-diagram-container svg {
  display: block;
  max-width: none;
  overflow: visible;
  height: auto;
}

@media (max-width: 640px) {
  .af-diagram-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .af-confirm-actions {
    flex-direction: column;
  }
  .af-modal-zoom-controls {
    justify-content: flex-start;
    padding: 0 1rem 0.75rem;
  }
}

@media (max-width: 640px) {
  .aa {
    right: max(0.75rem, env(safe-area-inset-right)) !important;
    bottom: max(0.75rem, env(safe-area-inset-bottom)) !important;
    left: auto !important;
    max-width: calc(100vw - 1.5rem);
  }

  .aa-launcher {
    margin-left: auto;
  }

  .aa-panel {
    right: 0;
    bottom: calc(100% + 0.65rem);
    width: min(calc(100vw - 1.5rem), 420px);
    max-height: min(78vh, 660px);
  }

  .aa-form {
    grid-template-columns: minmax(0, 1fr) 52px;
  }

  .aa-form button {
    width: 52px;
  }

  .cookie-consent {
    align-items: stretch;
    flex-direction: column;
  }

  .cookie-consent-actions {
    justify-content: flex-start;
  }

  .processing-message {
    max-width: 92%;
    font-size: 0.78rem;
  }
}

/* ── DataPilot shared access gate ───────────────────────────────────────── */
.dp-shared-gate-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.12), transparent 28rem),
    linear-gradient(180deg, #f8fafc 0%, #eef3fb 100%);
  color: #172033;
}

.dp-shared-gate-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}

.dp-shared-brand {
  /* in dp-dash-topbar — no absolute positioning needed */
}

.dp-shared-gate-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  padding: 2.25rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.12);
}

.dp-shared-gate-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dp-shared-gate-icon {
  font-size: 1.75rem;
  line-height: 1;
  color: var(--accent);
  flex-shrink: 0;
}

.dp-shared-gate-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #172033;
  margin: 0;
  line-height: 1.3;
}

.dp-shared-gate-sub {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.dp-shared-gate-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #475569;
  margin-bottom: 0.35rem;
}

.dp-shared-gate-input {
  width: 100%;
  margin-bottom: 0.75rem;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid rgba(148, 163, 184, 0.4);
  border-radius: var(--radius-sm, 8px);
  background: rgba(255, 255, 255, 0.9);
  color: #172033;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.dp-shared-gate-input:focus {
  border-color: var(--accent, #7c3aed);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.dp-shared-gate-btn {
  width: 100%;
  justify-content: center;
}

.dp-shared-gate-trust {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0.25rem 0 0;
  line-height: 1.5;
  opacity: 0.8;
}

@media (max-width: 500px) {
  .dp-shared-gate-card {
    padding: 1.5rem 1.1rem 1.25rem;
    border-radius: 10px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DataPilot Premium Design System — Phase 15 Step 8
   Layering: page canvas → section panel → card → content
   Color meaning: purple=driver, blue=comparison, red/amber=anomaly, green=success
   Applies to /datapilot (analysis), /datapilot/dashboard, /datapilot/shared
   Light workspace: original body.dashboard-shell and .dp-dashboard-page
   baseline rules (lines ~8827–8950) are the authority; only enhancements below.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 4. Hero insight card (summary-card--primary, full-width) ────────────── */
.dp-summary-card--primary {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.13) 0%, rgba(6, 182, 212, 0.05) 100%);
  border-color: rgba(124, 58, 237, 0.30);
  border-left: 3px solid rgba(124, 58, 237, 0.70);
  padding: 1.5rem 1.75rem;
}

.dp-summary-card--primary h3 {
  font-size: 1.0rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
  color: var(--purple-light, #A78BFA);
}

.dp-summary-card--primary p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-2);
}

/* ── 5. KPI cards: larger value, hover lift, accent underline ────────────── */
.dp-kpi-grid {
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dp-kpi-card {
  padding: 1.25rem 1.25rem 1.15rem;
  transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
  position: relative;
}

.dp-kpi-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 2px;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.55), rgba(6, 182, 212, 0.30));
  border-radius: 0 0 2px 2px;
  opacity: 0;
  transition: opacity var(--tr);
}

.dp-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(124, 58, 237, 0.28);
}

.dp-kpi-card:hover::after {
  opacity: 1;
}

.dp-kpi-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* ── 6. Insight cards: semantic accent border, hover lift ────────────────── */
.dp-insight-card {
  padding: 1rem 1.1rem 1rem 1.15rem;
  border-left: 3px solid rgba(125, 211, 252, 0.18);
  transition: transform var(--tr), box-shadow var(--tr);
}

.dp-insight-card[data-dp-severity="warning"] {
  border-left-color: rgba(239, 68, 68, 0.60);
  background: rgba(239, 68, 68, 0.04);
}

.dp-insight-card[data-dp-severity="driver"] {
  border-left-color: rgba(124, 58, 237, 0.60);
  background: rgba(124, 58, 237, 0.04);
}

.dp-insight-card[data-dp-severity="comparison"] {
  border-left-color: rgba(59, 130, 246, 0.60);
  background: rgba(59, 130, 246, 0.04);
}

.dp-insight-card[data-dp-severity="note"] {
  border-left-color: rgba(125, 211, 252, 0.28);
}

.dp-insight-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
}

/* ── 7. Chart cards: more breathing room, consistent lift ────────────────── */
.dp-chart-card {
  padding: 1.25rem;
}

.dp-chart-card:hover,
.dp-chart-card.is-selected {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(6, 182, 212, 0.18);
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(14, 165, 233, 0.04);
}

.dp-chart-canvas-wrap {
  min-height: 280px;
  height: clamp(280px, 30vw, 380px);
  margin: 1rem 0 0.75rem;
}

/* ── 8. Section vertical spacing ─────────────────────────────────────────── */
.dp-insight-grid,
.dp-chart-grid,
.dp-quality-section,
.dp-table-config {
  margin-top: 1.5rem;
}

.dp-insight-row,
.dp-chart-row {
  gap: 1rem;
}

/* ── 9. Table: clean light-surface visual weight ──────────────────────────── */
.dp-table-preview th,
.dp-table-preview td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.dp-table-scroll {
  border-color: rgba(148, 163, 184, 0.25);
}

/* ── 10. Micro-interactions: button transitions ───────────────────────────── */
.dp-chart-actions .btn-ghost {
  transition: transform var(--tr), border-color var(--tr), background var(--tr), color var(--tr);
}

.dp-chart-actions .btn-ghost:hover {
  transform: translateY(-1px);
}

/* ── 11. Responsive: mobile adjustments ──────────────────────────────────── */
@media (max-width: 860px) {
  .dp-kpi-value {
    font-size: 1.8rem;
  }

  .dp-chart-card,
  .dp-dashboard-page .dp-chart-card {
    padding: 1rem;
  }

  .dp-summary-card--primary {
    padding: 1.15rem 1.25rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DataPilot Premium Visual System — Phase 15 Step 9
   Vibrant KPI cards, tinted insight cards, hero chart cards, spacing.
   Light workspace only. No dark theme. No layout/data/logic changes.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── KPI grid gap ─────────────────────────────────────────────────────────── */
.dp-dashboard-page .dp-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 1rem;
}

/* ── KPI card: 6-color dark accent cycle ─────────────────────────────────── */
.dp-dashboard-page .dp-kpi-grid .dp-kpi-card:nth-child(6n+1) {
  background: rgba(124, 58, 237, 0.12);
  border-left: 3px solid #7c3aed;
  box-shadow: -2px 0 20px rgba(124, 58, 237, 0.18), 0 2px 14px rgba(0, 0, 0, 0.35);
}
.dp-dashboard-page .dp-kpi-grid .dp-kpi-card:nth-child(6n+2) {
  background: rgba(6, 182, 212, 0.10);
  border-left: 3px solid #06b6d4;
  box-shadow: -2px 0 20px rgba(6, 182, 212, 0.16), 0 2px 14px rgba(0, 0, 0, 0.35);
}
.dp-dashboard-page .dp-kpi-grid .dp-kpi-card:nth-child(6n+3) {
  background: rgba(5, 150, 105, 0.10);
  border-left: 3px solid #059669;
  box-shadow: -2px 0 20px rgba(5, 150, 105, 0.16), 0 2px 14px rgba(0, 0, 0, 0.35);
}
.dp-dashboard-page .dp-kpi-grid .dp-kpi-card:nth-child(6n+4) {
  background: rgba(217, 119, 6, 0.10);
  border-left: 3px solid #d97706;
  box-shadow: -2px 0 20px rgba(217, 119, 6, 0.16), 0 2px 14px rgba(0, 0, 0, 0.35);
}
.dp-dashboard-page .dp-kpi-grid .dp-kpi-card:nth-child(6n+5) {
  background: rgba(37, 99, 235, 0.10);
  border-left: 3px solid #2563eb;
  box-shadow: -2px 0 20px rgba(37, 99, 235, 0.16), 0 2px 14px rgba(0, 0, 0, 0.35);
}
.dp-dashboard-page .dp-kpi-grid .dp-kpi-card:nth-child(6n+6) {
  background: rgba(219, 39, 119, 0.10);
  border-left: 3px solid #db2777;
  box-shadow: -2px 0 20px rgba(219, 39, 119, 0.16), 0 2px 14px rgba(0, 0, 0, 0.35);
}

/* KPI value: compact for dense layout */
.dp-dashboard-page .dp-kpi-value {
  font-size: 1.85rem;
}

/* ── Insight cards: dark tinted backgrounds per severity ─────────────────── */
.dp-dashboard-page .dp-insight-grid {
  margin-top: 1.5rem;
}

.dp-dashboard-page .dp-insight-card[data-severity="warning"],
.dp-dashboard-page .dp-insight-card[data-type="warning"] {
  background: rgba(239, 68, 68, 0.10);
  border-left-color: #ef4444;
  color: #fca5a5;
}

.dp-dashboard-page .dp-insight-card[data-severity="driver"],
.dp-dashboard-page .dp-insight-card[data-type="driver"] {
  background: rgba(124, 58, 237, 0.10);
  border-left-color: #7c3aed;
  color: #c4b5fd;
}

.dp-dashboard-page .dp-insight-card[data-severity="comparison"],
.dp-dashboard-page .dp-insight-card[data-type="comparison"] {
  background: rgba(37, 99, 235, 0.10);
  border-left-color: #2563eb;
  color: #93c5fd;
}

.dp-dashboard-page .dp-insight-card[data-severity="info"],
.dp-dashboard-page .dp-insight-card[data-type="info"] {
  background: rgba(5, 150, 105, 0.10);
  border-left-color: #059669;
  color: #6ee7b7;
}

/* Fallback for insight cards without explicit severity */
.dp-dashboard-page .dp-insight-card {
  color: #cbd5e1;
}

/* ── Chart cards: 3-column grid, dominant spans 2 ────────────────────────── */
.dp-dashboard-page .dp-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
  align-items: start;
}

.dp-dashboard-page .dp-chart-grid .dp-chart-card--dominant {
  grid-column: span 2;
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: -2px 0 24px rgba(99, 102, 241, 0.15), 0 4px 20px rgba(0, 0, 0, 0.40);
}

@media (max-width: 860px) {
  .dp-dashboard-page .dp-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dp-dashboard-page .dp-chart-grid .dp-chart-card--dominant {
    grid-column: span 2;
  }
}
@media (max-width: 560px) {
  .dp-dashboard-page .dp-chart-grid {
    grid-template-columns: 1fr;
  }
  .dp-dashboard-page .dp-chart-grid .dp-chart-card--dominant {
    grid-column: span 1;
  }
}

.dp-dashboard-page .dp-chart-card {
  background: #0e1528;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.40);
}

/* Chart card header: accent top line */
.dp-dashboard-page .dp-chart-card::before {
  content: "";
  display: block;
  height: 2px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.6), rgba(6, 182, 212, 0.4));
  margin: -1rem -1rem 0.75rem;
}

.dp-dashboard-page .dp-chart-card canvas {
  background: transparent;
}

.dp-dashboard-page .dp-chart-canvas-wrap {
  min-height: 200px;
  height: clamp(200px, 18vw, 250px);
}

/* Dominant chart taller */
.dp-dashboard-page .dp-chart-grid .dp-chart-card--dominant .dp-chart-canvas-wrap {
  min-height: 230px;
  height: clamp(230px, 20vw, 280px);
}

.dp-dashboard-page .dp-chart-card-head > span {
  color: #475569;
  border-color: rgba(255, 255, 255, 0.10);
  font-size: 0.65rem;
}

/* ── Table: de-emphasized ─────────────────────────────────────────────────── */
.dp-dashboard-page .dp-table-config {
  margin-top: 2rem;
}

.dp-dashboard-page .dp-table-section-label {
  color: #64748b;
  font-weight: 500;
}

.dp-dashboard-page .dp-table-preview thead th {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.78rem;
}

.dp-dashboard-page .dp-table-preview td {
  border-color: rgba(255, 255, 255, 0.06);
}

.dp-dashboard-page .dp-table-card {
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Sheet tabs — dark dashboard */
.dp-dashboard-page .dp-sheet-tabs {
  border-bottom-color: rgba(255, 255, 255, 0.09);
}
.dp-dashboard-page .dp-sheet-tab {
  color: #64748b;
  border-bottom-color: transparent;
}
.dp-dashboard-page .dp-sheet-tab:hover {
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
}
.dp-dashboard-page .dp-sheet-tab[aria-selected="true"] {
  color: #e2e8f0;
  border-bottom-color: #7c3aed;
  background: transparent;
}

/* ── Quality section: light amber tint ────────────────────────────────────── */
.dp-dashboard-page .dp-quality-section {
  margin-top: 2rem;
  background: #fffbeb;
  border-color: rgba(217, 119, 6, 0.22);
}

/* ── Interaction / filter panel: light ───────────────────────────────────── */
.dp-dashboard-page .dp-interaction-panel {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.20);
  color: #334155;
}

/* ── Mobile adjustments for Step 9 additions ─────────────────────────────── */
@media (max-width: 860px) {
  .dp-dashboard-page .dp-kpi-value {
    font-size: 2.0rem;
  }
  .dp-dashboard-page .dp-chart-canvas-wrap {
    min-height: 260px;
  }
}

/* ── Phase 6D: Premium Dashboard Experience ──────────────────────────────── */

/* Hero insight card */
.dp-hero-insight {
  margin-bottom: 1.1rem;
}

.dp-hero-card {
  border-radius: 14px;
  background: linear-gradient(135deg, #eef6ff 0%, #f5f0ff 55%, #edfcf2 100%);
  border: 1px solid rgba(124, 58, 237, 0.22);
  padding: 1.35rem 1.6rem;
  box-shadow: 0 2px 14px rgba(124, 58, 237, 0.1);
}

.dp-hero-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #7c3aed;
  margin-bottom: 0.45rem;
}

.dp-hero-text {
  font-size: 1.18rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.45;
  margin: 0;
}

.dp-hero-subtext {
  font-size: 0.88rem;
  color: #475569;
  margin: 0.45rem 0 0;
  line-height: 1.5;
}

.dp-chart-reason {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0.15rem 0 0;
  line-height: 1.4;
  font-style: italic;
}

/* Palette data attribute overrides for planner-chosen color schemes */
[data-dp-palette="green_blue"] .dp-hero-label { color: #059669; }
[data-dp-palette="green_blue"] .dp-hero-card {
  background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 100%);
  border-color: rgba(5, 150, 105, 0.2);
}
[data-dp-palette="orange_purple"] .dp-hero-label { color: #d97706; }
[data-dp-palette="orange_purple"] .dp-hero-card {
  background: linear-gradient(135deg, #fffbeb 0%, #f5f0ff 100%);
  border-color: rgba(217, 119, 6, 0.22);
}
[data-dp-palette="mixed_vibrant"] .dp-hero-label { color: #db2777; }
[data-dp-palette="mixed_vibrant"] .dp-hero-card {
  background: linear-gradient(135deg, #fdf2f8 0%, #eff6ff 55%, #f0fdf4 100%);
  border-color: rgba(219, 39, 119, 0.2);
}

/* KPI accent colors — four named variants always applied by JS */
.dp-kpi-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dp-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}

.dp-kpi-card--success { border-top: 3px solid #22c55e; }
.dp-kpi-card--success .dp-kpi-value { color: #15803d; }
.dp-kpi-card--warning { border-top: 3px solid #f59e0b; }
.dp-kpi-card--warning .dp-kpi-value { color: #b45309; }
.dp-kpi-card--negative { border-top: 3px solid #ef4444; }
.dp-kpi-card--negative .dp-kpi-value { color: #dc2626; }
.dp-kpi-card--neutral { border-top: 3px solid #7c3aed; }
.dp-kpi-card--neutral .dp-kpi-value { color: #7c3aed; }

/* Dashboard-page overrides for KPI accent (light workspace already sets dark text) */
.dp-dashboard-page .dp-kpi-card--success .dp-kpi-value { color: #15803d; }
.dp-dashboard-page .dp-kpi-card--warning .dp-kpi-value { color: #b45309; }
.dp-dashboard-page .dp-kpi-card--negative .dp-kpi-value { color: #dc2626; }
.dp-dashboard-page .dp-kpi-card--neutral .dp-kpi-value { color: #7c3aed; }

/* Chart grid — primary (first 2) + secondary (rest) */
.dp-charts-primary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.dp-charts-secondary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.dp-chart-card--primary .dp-chart-canvas-wrap {
  min-height: 300px;
  height: clamp(300px, 32vw, 420px);
}

/* Dominant primary chart — single full-width hero chart */
.dp-chart-card--dominant {
  border: 1.5px solid rgba(124, 58, 237, 0.22);
  box-shadow: 0 6px 28px rgba(15, 23, 42, 0.10), 0 2px 8px rgba(124, 58, 237, 0.12);
  background: linear-gradient(135deg, #fafbff 0%, #f8fafc 100%);
}

.dp-chart-card--dominant .dp-chart-canvas-wrap {
  min-height: 340px;
  height: clamp(340px, 36vw, 480px);
}

.dp-chart-card--dominant h4 {
  font-size: 1.05rem;
  font-weight: 700;
}

.dp-charts-primary .dp-chart-card--dominant {
  width: 100%;
}

.dp-dashboard-page .dp-chart-card--dominant {
  background: linear-gradient(135deg, #fafbff 0%, #ffffff 100%);
  border-color: rgba(124, 58, 237, 0.20);
}

.dp-dashboard-page .dp-chart-card--dominant .dp-chart-canvas-wrap {
  min-height: 360px;
}

/* Palette-aware dominant border */
[data-dp-palette="green_blue"] .dp-chart-card--dominant {
  border-color: rgba(5, 150, 105, 0.25);
  box-shadow: 0 6px 28px rgba(15, 23, 42, 0.10), 0 2px 8px rgba(5, 150, 105, 0.12);
}

[data-dp-palette="orange_purple"] .dp-chart-card--dominant {
  border-color: rgba(217, 119, 6, 0.22);
  box-shadow: 0 6px 28px rgba(15, 23, 42, 0.10), 0 2px 8px rgba(217, 119, 6, 0.10);
}

[data-dp-palette="mixed_vibrant"] .dp-chart-card--dominant {
  border-color: rgba(219, 39, 119, 0.20);
  box-shadow: 0 6px 28px rgba(15, 23, 42, 0.10), 0 2px 8px rgba(219, 39, 119, 0.10);
}

/* No-chart limitation card */
.dp-chart-limitation-card {
  border-radius: 12px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef9c3 100%);
  border: 1px solid rgba(234, 179, 8, 0.35);
  padding: 1.35rem 1.6rem;
  color: #78350f;
}

.dp-chart-limitation-card .dp-kicker {
  color: #92400e;
  margin-bottom: 0.5rem;
}

/* Insight card severity — left-border accent + subtle tint */
.dp-insight-card[data-dp-severity="warning"],
.dp-insight-card[data-dp-severity="anomaly"] {
  border-left: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.07);
}

.dp-insight-card[data-dp-severity="driver"] {
  border-left: 4px solid #7c3aed;
  background: rgba(124, 58, 237, 0.07);
}

.dp-insight-card[data-dp-severity="comparison"] {
  border-left: 4px solid #3b82f6;
  background: rgba(59, 130, 246, 0.07);
}

.dp-insight-card[data-dp-severity="note"] {
  border-left: 4px solid #f59e0b;
  background: rgba(245, 158, 11, 0.07);
}

/* Light-workspace overrides for insight severity on dashboard page */
.dp-dashboard-page .dp-insight-card[data-dp-severity="warning"],
.dp-dashboard-page .dp-insight-card[data-dp-severity="anomaly"] {
  background: #fff5f5;
}

.dp-dashboard-page .dp-insight-card[data-dp-severity="driver"] {
  background: #faf5ff;
}

.dp-dashboard-page .dp-insight-card[data-dp-severity="comparison"] {
  background: #eff6ff;
}

.dp-dashboard-page .dp-insight-card[data-dp-severity="note"] {
  background: #fffbeb;
}

/* Table collapse (<details> inside dp-table-card) */
.dp-table-collapse {
  margin-top: 0.85rem;
}

.dp-table-collapse > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-2);
  user-select: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dp-table-collapse > summary::-webkit-details-marker { display: none; }

.dp-table-collapse > summary::after {
  content: "▾";
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: transform 0.2s;
  margin-left: 0.5rem;
}

.dp-table-collapse[open] > summary::after {
  transform: rotate(-180deg);
}

/* Light-workspace summary style for dashboard page + analysis widget */
.dp-dashboard-page .dp-table-collapse > summary,
.dp-dashboard[data-dp-dashboard-root] .dp-table-collapse > summary {
  color: #475569;
  border-top-color: rgba(148, 163, 184, 0.25);
}

/* Analysis page dashboard widget — light workspace */
.dp-dashboard[data-dp-dashboard-root] {
  background: #f1f5f9;
  border-radius: 14px;
  padding: 1.35rem;
  border-top: none;
  margin-top: 1.5rem;
}

.dp-dashboard[data-dp-dashboard-root] .dp-filter-bar,
.dp-dashboard[data-dp-dashboard-root] .dp-active-filters,
.dp-dashboard[data-dp-dashboard-root] .dp-kpi-card,
.dp-dashboard[data-dp-dashboard-root] .dp-insight-card,
.dp-dashboard[data-dp-dashboard-root] .dp-chart-card,
.dp-dashboard[data-dp-dashboard-root] .dp-table-card,
.dp-dashboard[data-dp-dashboard-root] .dp-quality-section {
  background: rgba(255, 255, 255, 0.93);
  border-color: rgba(148, 163, 184, 0.24);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.dp-dashboard[data-dp-dashboard-root] .dp-kpi-card h4,
.dp-dashboard[data-dp-dashboard-root] .dp-insight-card p,
.dp-dashboard[data-dp-dashboard-root] .dp-chart-card h4,
.dp-dashboard[data-dp-dashboard-root] .dp-table-card h4,
.dp-dashboard[data-dp-dashboard-root] .dp-section-title,
.dp-dashboard[data-dp-dashboard-root] .dp-dashboard-title {
  color: #1e293b;
}

.dp-dashboard[data-dp-dashboard-root] .dp-kicker,
.dp-dashboard[data-dp-dashboard-root] .dp-kpi-card span,
.dp-dashboard[data-dp-dashboard-root] .dp-insight-card span,
.dp-dashboard[data-dp-dashboard-root] .dp-source-columns,
.dp-dashboard[data-dp-dashboard-root] .dp-table-meta span,
.dp-dashboard[data-dp-dashboard-root] .dp-preview-note,
.dp-dashboard[data-dp-dashboard-root] .dp-table-card p {
  color: #64748b;
}

.dp-dashboard[data-dp-dashboard-root] .dp-chart-canvas-wrap {
  background: rgba(248, 250, 252, 0.76);
  border-color: rgba(148, 163, 184, 0.2);
}

.dp-dashboard[data-dp-dashboard-root] .dp-table-preview th,
.dp-dashboard[data-dp-dashboard-root] .dp-table-preview td {
  color: #334155;
}

.dp-dashboard[data-dp-dashboard-root] .dp-chart-placeholder {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.1);
  color: #94a3b8;
}

.dp-dashboard[data-dp-dashboard-root] .dp-insight-card[data-dp-severity="warning"],
.dp-dashboard[data-dp-dashboard-root] .dp-insight-card[data-dp-severity="anomaly"] { background: #fff5f5; }
.dp-dashboard[data-dp-dashboard-root] .dp-insight-card[data-dp-severity="driver"] { background: #faf5ff; }
.dp-dashboard[data-dp-dashboard-root] .dp-insight-card[data-dp-severity="comparison"] { background: #eff6ff; }
.dp-dashboard[data-dp-dashboard-root] .dp-insight-card[data-dp-severity="note"] { background: #fffbeb; }

.dp-dashboard[data-dp-dashboard-root] .dp-kpi-card--success .dp-kpi-value { color: #15803d; }
.dp-dashboard[data-dp-dashboard-root] .dp-kpi-card--warning .dp-kpi-value { color: #b45309; }
.dp-dashboard[data-dp-dashboard-root] .dp-kpi-card--negative .dp-kpi-value { color: #dc2626; }
.dp-dashboard[data-dp-dashboard-root] .dp-kpi-card--neutral .dp-kpi-value { color: #7c3aed; }

/* Phase 6D responsive */
@media (max-width: 640px) {
  .dp-charts-primary,
  .dp-charts-secondary {
    grid-template-columns: 1fr;
  }

  .dp-hero-text {
    font-size: 1rem;
  }

  .dp-hero-card {
    padding: 1rem 1.1rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DataPilot Phase 9 — Visual Polish & Product Identity Baseline
   Light workspace. No dark theme. No layout/data/logic changes.
   Applies to: /datapilot (analysis widget), /datapilot/dashboard, /datapilot/shared
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 9A. Section title: more prominent hierarchy ─────────────────────────── */
.dp-section-title {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.dp-dashboard-page .dp-section-title,
.dp-dashboard[data-dp-dashboard-root] .dp-section-title {
  color: #94a3b8;
}

/* ── 9B. Hero card: taller, stronger accent, larger headline ─────────────── */
.dp-hero-card {
  border-left: 4px solid #7c3aed;
  padding: 1.5rem 1.75rem;
  position: relative;
}

.dp-dashboard-page .dp-hero-card {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.14) 0%, rgba(14, 21, 40, 0.9) 100%);
  border-color: rgba(124, 58, 237, 0.30);
  border-left: 4px solid #7c3aed;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.20), 0 2px 8px rgba(0, 0, 0, 0.40);
}
.dp-dashboard-page .dp-summary-headline { color: #f1f5f9; }
.dp-dashboard-page .dp-meaning-sub { color: #94a3b8; }

.dp-dashboard-page .dp-hero-text {
  font-size: 1.3rem;
}

[data-dp-palette="green_blue"] .dp-hero-card { border-left-color: #059669; }
[data-dp-palette="orange_purple"] .dp-hero-card { border-left-color: #d97706; }
[data-dp-palette="mixed_vibrant"] .dp-hero-card { border-left-color: #db2777; }

/* ── 9C. KPI gradients on analysis-page dashboard widget ────────────────── */
.dp-dashboard[data-dp-dashboard-root] .dp-kpi-grid .dp-kpi-card:nth-child(6n+1) {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border-left: 4px solid #7c3aed;
}
.dp-dashboard[data-dp-dashboard-root] .dp-kpi-grid .dp-kpi-card:nth-child(6n+2) {
  background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
  border-left: 4px solid #0891b2;
}
.dp-dashboard[data-dp-dashboard-root] .dp-kpi-grid .dp-kpi-card:nth-child(6n+3) {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-left: 4px solid #059669;
}
.dp-dashboard[data-dp-dashboard-root] .dp-kpi-grid .dp-kpi-card:nth-child(6n+4) {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-left: 4px solid #d97706;
}
.dp-dashboard[data-dp-dashboard-root] .dp-kpi-grid .dp-kpi-card:nth-child(6n+5) {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-left: 4px solid #2563eb;
}
.dp-dashboard[data-dp-dashboard-root] .dp-kpi-grid .dp-kpi-card:nth-child(6n+6) {
  background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
  border-left: 4px solid #db2777;
}
/* Neutralise tone-accent top-border on widget so nth-child left-border wins */
.dp-dashboard[data-dp-dashboard-root] .dp-kpi-grid .dp-kpi-card--success,
.dp-dashboard[data-dp-dashboard-root] .dp-kpi-grid .dp-kpi-card--warning,
.dp-dashboard[data-dp-dashboard-root] .dp-kpi-grid .dp-kpi-card--negative,
.dp-dashboard[data-dp-dashboard-root] .dp-kpi-grid .dp-kpi-card--neutral {
  border-top: none;
}

/* ── 9D. Chart cards: consistent visual weight on both pages ─────────────── */
/* Dashboard page chart card subtle divider between header and canvas */
.dp-dashboard-page .dp-chart-card-head,
.dp-dashboard[data-dp-dashboard-root] .dp-chart-card-head {
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  margin-bottom: 0.1rem;
}

/* Secondary charts minimum height */
.dp-charts-secondary .dp-chart-canvas-wrap {
  min-height: 240px;
  height: clamp(240px, 25vw, 320px);
}

.dp-dashboard-page .dp-charts-secondary .dp-chart-canvas-wrap {
  min-height: 260px;
}

/* ── 9E. Insight card: severity type badge pill ──────────────────────────── */
.dp-insight-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.45rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.dp-insight-card[data-dp-severity="warning"] .dp-insight-type-badge,
.dp-insight-card[data-dp-severity="anomaly"] .dp-insight-type-badge {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.dp-insight-card[data-dp-severity="driver"] .dp-insight-type-badge {
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
}

.dp-insight-card[data-dp-severity="comparison"] .dp-insight-type-badge {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.dp-insight-card[data-dp-severity="note"] .dp-insight-type-badge {
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}

.dp-insight-card[data-dp-severity="info"] .dp-insight-type-badge {
  background: rgba(5, 150, 105, 0.10);
  color: #065f46;
}

/* Light-workspace overrides */
.dp-dashboard-page .dp-insight-card[data-dp-severity="warning"] .dp-insight-type-badge,
.dp-dashboard-page .dp-insight-card[data-dp-severity="anomaly"] .dp-insight-type-badge,
.dp-dashboard[data-dp-dashboard-root] .dp-insight-card[data-dp-severity="warning"] .dp-insight-type-badge,
.dp-dashboard[data-dp-dashboard-root] .dp-insight-card[data-dp-severity="anomaly"] .dp-insight-type-badge {
  background: rgba(239, 68, 68, 0.10);
}

/* ── 9F. Quality section: collapsible summary styling ────────────────────── */
.dp-quality-collapse {
  margin-top: 0;
}

.dp-quality-collapse > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #78350f;
  user-select: none;
  border-bottom: 1px solid rgba(217, 119, 6, 0.15);
  margin-bottom: 0.65rem;
}

.dp-quality-collapse > summary::-webkit-details-marker { display: none; }

.dp-quality-collapse > summary::after {
  content: "▾";
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: transform 0.2s;
  margin-left: 0.5rem;
}

.dp-quality-collapse[open] > summary::after {
  transform: rotate(-180deg);
}

/* Light-workspace quality collapse summary color */
.dp-dashboard-page .dp-quality-collapse > summary,
.dp-dashboard[data-dp-dashboard-root] .dp-quality-collapse > summary {
  color: #92400e;
}

/* ── 9G. Preview table: visually quiet when collapsed ────────────────────── */
.dp-table-collapse > summary {
  font-weight: 600;
}

.dp-dashboard-page .dp-table-card,
.dp-dashboard[data-dp-dashboard-root] .dp-table-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.9);
}

/* ── 9H. Shared gate card: brand top accent ──────────────────────────────── */
.dp-shared-gate-card::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
  border-radius: 14px 14px 0 0;
  margin: -2.25rem -2rem 1.5rem;
}

@media (max-width: 500px) {
  .dp-shared-gate-card::before {
    margin: -1.5rem -1.1rem 1.25rem;
  }
}

/* ── 9I. Responsive polish ───────────────────────────────────────────────── */
@media (max-width: 1024px) and (min-width: 641px) {
  .dp-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dp-charts-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dp-insight-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .dp-hero-card {
    padding: 1.15rem 1.25rem;
  }

  .dp-dashboard-page .dp-hero-text {
    font-size: 1.1rem;
  }

  .dp-charts-secondary .dp-chart-canvas-wrap {
    min-height: 220px;
  }
}

@media (max-width: 640px) {
  .dp-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dp-insight-row,
  .dp-charts-primary,
  .dp-charts-secondary {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DataPilot Phase 10 — Smart Restraint & Premium Visual Polish
   Chart suppression, dominant primary card, action buttons, limitation state,
   summary conciseness classes. Light workspace only.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Primary / dominant chart card ──────────────────────────────────────── */
.dp-chart-card--dominant {
  border-left: 4px solid #7c3aed;
  background: linear-gradient(135deg, #fafbff 0%, #f8f5ff 100%);
}

.dp-dashboard-page .dp-chart-card--dominant {
  box-shadow: 0 6px 28px rgba(124, 58, 237, 0.13), 0 2px 8px rgba(15, 23, 42, 0.06);
  border-left-width: 4px;
  border-left-color: #7c3aed;
}

.dp-dashboard-page .dp-chart-card--dominant .dp-chart-card-head h4 {
  font-size: 1.08rem;
  font-weight: 700;
}

/* Palette overrides for dominant card accent */
[data-dp-palette="green_blue"] .dp-chart-card--dominant { border-left-color: #059669; }
[data-dp-palette="orange_purple"] .dp-chart-card--dominant { border-left-color: #d97706; }
[data-dp-palette="mixed_vibrant"] .dp-chart-card--dominant { border-left-color: #2563eb; }

/* ── Elegant limitation card (no charts available) ───────────────────────── */
.dp-chart-limitation-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: 12px;
  padding: 2rem 2rem;
  text-align: center;
  color: #64748b;
}

.dp-chart-limitation-card .dp-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.dp-chart-limitation-card p {
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

/* ── Chart action buttons ─────────────────────────────────────────────────── */
.dp-chart-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dp-chart-action:hover {
  background: rgba(124, 58, 237, 0.06);
  border-color: rgba(124, 58, 237, 0.30);
  color: #7c3aed;
}

/* ── Summary page: concise 3-block layout ─────────────────────────────────── */
.dp-summary-headline {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.45;
  margin: 0 0 0.35rem;
}

.dp-summary-capability {
  border-left: 3px solid rgba(6, 182, 212, 0.50);
  padding-left: 1rem;
  background: rgba(6, 182, 212, 0.04);
}

.dp-summary-highlight {
  border-left: 3px solid rgba(124, 58, 237, 0.40);
  padding-left: 1rem;
  background: rgba(124, 58, 237, 0.03);
}

.dp-summary-capability p,
.dp-summary-highlight p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: #334155;
  margin: 0;
}

/* ── Insight type badge improvements ─────────────────────────────────────── */
.dp-insight-type-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
}

.dp-insight-card[data-dp-severity="warning"] .dp-insight-type-badge,
.dp-insight-card[data-dp-severity="anomaly"] .dp-insight-type-badge {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.dp-insight-card[data-dp-severity="driver"] .dp-insight-type-badge {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}

.dp-insight-card[data-dp-severity="comparison"] .dp-insight-type-badge {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.dp-insight-card[data-dp-severity="note"] .dp-insight-type-badge {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

/* ── KPI card: stronger value prominence ─────────────────────────────────── */
.dp-kpi-card .dp-kpi-value {
  display: block;
  margin-bottom: 0.3rem;
}

.dp-kpi-card h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin: 0 0 0.15rem;
  text-transform: none;
}

.dp-kpi-reason {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.35rem;
  line-height: 1.4;
}

/* ── Chart canvas: better min height for secondary charts ────────────────── */
.dp-charts-secondary .dp-chart-canvas-wrap {
  min-height: 240px;
}

/* ── Responsive: Phase 10 mobile adjustments ─────────────────────────────── */
@media (max-width: 640px) {
  .dp-chart-limitation-card {
    padding: 1.5rem 1.25rem;
  }
  .dp-summary-headline {
    font-size: 0.95rem;
  }
}

/* ── Phase 10C — Multi-Sheet UX & Structured Dashboard ─────────────────────── */

/* Analysis note */
.dp-analysis-note {
  font-size: 0.78rem;
  color: rgba(100,116,139,0.9);
  background: rgba(248,250,252,0.8);
  border: 1px solid rgba(226,232,240,0.7);
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  margin: 0.5rem 0 0.25rem;
  letter-spacing: 0.01em;
}

/* Sheet navigation (primary sheets only) */
.dp-sheet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.5rem;
  padding: 0.5rem 0 0.25rem;
  margin-bottom: 0.25rem;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, #f8fafc 85%, transparent 100%);
  padding-top: 0.55rem;
  padding-bottom: 0.45rem;
}

.dp-sheet-nav-link {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(100,116,139,0.9);
  background: rgba(241,245,249,0.8);
  border: 1px solid rgba(226,232,240,0.8);
  border-radius: 20px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.dp-sheet-nav-link:hover {
  color: #7c3aed;
  background: rgba(124,58,237,0.07);
  border-color: rgba(124,58,237,0.2);
}

.dp-sheet-nav-link.is-active {
  color: #7c3aed;
  background: rgba(124,58,237,0.09);
  border-color: rgba(124,58,237,0.35);
  font-weight: 600;
}

/* Sheet groups */
.dp-sheet-group {
  margin: 1rem 0 0;
}

.dp-secondary-group {
  border: 1px solid rgba(226,232,240,0.7);
  border-radius: 10px;
  overflow: hidden;
}

.dp-secondary-group > summary.dp-group-title {
  list-style: none;
  cursor: pointer;
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(71,85,105,0.85);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(248,250,252,0.9);
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dp-secondary-group > summary.dp-group-title::before {
  content: "›";
  font-size: 1rem;
  font-weight: 700;
  color: rgba(124,58,237,0.5);
  transition: transform 0.2s;
  display: inline-block;
}

.dp-secondary-group[open] > summary.dp-group-title::before {
  transform: rotate(90deg);
}

.dp-secondary-group > summary::-webkit-details-marker { display: none; }

/* Compact card grid */
.dp-compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  padding: 0.75rem 1rem 1rem;
  background: rgba(248,250,252,0.5);
}

.dp-sheet-compact {
  background: #fff;
  border: 1px solid rgba(226,232,240,0.8);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 60px;
}

.dp-sheet-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dp-sheet-summary {
  font-size: 0.75rem;
  color: rgba(71,85,105,0.85);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dp-sheet-meta {
  font-size: 0.7rem;
  color: rgba(148,163,184,0.9);
  letter-spacing: 0.02em;
  margin-top: auto;
}

/* Unsupported sheet message card */
.dp-unsupported-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px dashed rgba(148,163,184,0.45);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.dp-unsupported-card p {
  font-size: 0.85rem;
  color: rgba(100,116,139,0.85);
  margin: 0;
  font-style: italic;
}

/* Visual hierarchy — dominant chart span */
.dp-chart-card--dominant {
  grid-column: span 2;
  min-height: 420px;
}

@media (max-width: 640px) {
  .dp-chart-card--dominant {
    grid-column: span 1;
    min-height: 300px;
  }
}

/* KPI card — enhanced size */
.dp-kpi-card .dp-kpi-value {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ── DataPilot V2 dashboard components ─────────────────────────────────── */

/* Dominant chart wrapper — full-width card above the chart grid */
.dp-dominant-chart-wrap {
  width: 100%;
  margin-bottom: 1.25rem;
}

.dp-dominant-chart-wrap .dp-chart-card {
  min-height: 420px;
  width: 100%;
}

@media (max-width: 640px) {
  .dp-dominant-chart-wrap .dp-chart-card {
    min-height: 280px;
  }
}

/* Insight strip — horizontal scrolling row of chips */
.dp-insight-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1.5rem;
  padding: 0 0 0.25rem;
}

/* Individual insight chip */
.dp-insight-chip {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--surface-2, rgba(99,102,241,0.06));
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: 10px;
  padding: 0.625rem 0.875rem;
  min-width: 200px;
  max-width: 340px;
  flex: 1 1 200px;
}

.dp-insight-chip p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary, rgba(100,116,139,0.9));
  line-height: 1.45;
}

/* Chip type badge */
.dp-insight-chip-type {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent, #6366f1);
  opacity: 0.85;
}

/* Trend chip accent */
.dp-insight-chip[data-dp-insight-type="trend_direction"] {
  border-color: rgba(6,182,212,0.22);
  background: rgba(6,182,212,0.05);
}
.dp-insight-chip[data-dp-insight-type="trend_direction"] .dp-insight-chip-type {
  color: #06b6d4;
}

/* Peak chip accent */
.dp-insight-chip[data-dp-insight-type="peak_value"] {
  border-color: rgba(245,158,11,0.22);
  background: rgba(245,158,11,0.05);
}
.dp-insight-chip[data-dp-insight-type="peak_value"] .dp-insight-chip-type {
  color: #f59e0b;
}

@media (max-width: 640px) {
  .dp-insight-chip {
    min-width: 160px;
    max-width: 100%;
    flex: 1 1 160px;
  }
}

/* ── V2 compact preview (analysis page) ─────────────────────────────────────── */

.dp-v2-preview {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.8rem;
}

/* Top row: up to 4 KPI cards — auto-fit stretches them to fill the row */
.dp-v2-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

/* Bottom row: 2 charts side by side */
.dp-v2-chart {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: stretch;
}

/* Compact canvas for preview charts */
.dp-v2-chart-canvas {
  min-height: 155px;
  height: 170px;
}

/* KPI card accents in the analyze preview top row — 4-colour cycle */
.dp-v2-kpis .dp-kpi-card:nth-child(4n+1) {
  border-left: 3px solid #7c3aed;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe 100%);
}
.dp-v2-kpis .dp-kpi-card:nth-child(4n+2) {
  border-left: 3px solid #06b6d4;
  background: linear-gradient(135deg, #ecfeff, #cffafe 100%);
}
.dp-v2-kpis .dp-kpi-card:nth-child(4n+3) {
  border-left: 3px solid #059669;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7 100%);
}
.dp-v2-kpis .dp-kpi-card:nth-child(4n+4) {
  border-left: 3px solid #d97706;
  background: linear-gradient(135deg, #fffbeb, #fef3c7 100%);
}

/* Preview KPI value: compact, explicitly dark so it shows on light gradients */
.dp-v2-preview .dp-kpi-value {
  font-size: 1.45rem;
  color: #0f172a;
}
.dp-v2-preview .dp-kpi-card h4 {
  font-size: 0.72rem;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dp-v2-preview .dp-kpi-card .dp-kicker {
  font-size: 0.67rem;
  color: #64748b;
}

.dp-data-observations {
  max-width: 1180px;
  margin: 2rem auto 0;
  padding: 1.2rem 1.35rem;
  border: 1px solid rgba(139, 92, 246, 0.24);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.10), rgba(34, 211, 238, 0.05)),
    rgba(17, 24, 39, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.dp-data-observations-head {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 0.75rem;
}

.dp-data-observations-head h3 {
  margin: 0;
  color: var(--text-1);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.dp-data-observations-head p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.82rem;
  line-height: 1.45;
}

.dp-data-observations-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-2);
  font-size: 0.84rem;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .dp-v2-kpis { grid-template-columns: repeat(2, 1fr); }
  .dp-v2-chart { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .dp-v2-kpis { grid-template-columns: 1fr 1fr; }
}

/* ===================================================================
   ShopWise Results v2 — design handoff implementation
   =================================================================== */

/* Filter/sort controls row */
/* === ShopWise results header === */
.mms-results-title .sw2-query-em {
  font-style: normal;
  color: #c4b5fd;
}
#shopwiseResultsMeta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 2px 0 10px;
}
.sw2-pulse-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.25);
  animation: swPulseDot 2s infinite;
  flex-shrink: 0;
}
@keyframes swPulseDot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(124,58,237,0.25); }
  50% { box-shadow: 0 0 0 5px rgba(124,58,237,0.15); }
}
.sw2-meta-dot {
  display: inline-block;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  opacity: 0.5;
}

/* === Insight bar (AI summary card) === */
.sw2-insight-bar {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  background: linear-gradient(135deg, rgba(20,26,44,0.95) 0%, rgba(17,23,42,0.95) 100%);
  border: 1px solid rgba(30,38,56,0.9);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.sw2-insight-icon {
  flex-shrink: 0;
}
.sw2-insight-text {
  font-size: 0.845rem;
  color: var(--text);
  line-height: 1.55;
}
.sw2-insight-text strong { font-weight: 600; }
.sw2-insight-line2 { display: block; margin-top: 3px; color: var(--text-muted); font-size: 0.8rem; }
.sw2-sale-tag { font-style: normal; color: #c4b5fd; font-weight: 600; }

/* === Price format === */
.sw2-price-major {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.sw2-price-cur {
  font-size: 0.55em;
  color: var(--text-muted);
  margin-right: 3px;
  vertical-align: top;
  line-height: 1.6;
}
.sw2-price-cents {
  font-size: 0.55em;
  vertical-align: top;
  line-height: 1.6;
}
.sw2-price-tag {
  font-size: 0.5em;
  color: var(--text-muted);
  margin-left: 5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  vertical-align: middle;
  font-family: monospace;
}
.sw2-price-na { color: var(--text-muted); font-size: 0.875rem; }

/* === Product image thumbnails === */
.sw2-thumb-strip-wrap {
  width: 34px;
  border-left: 1px solid rgba(30, 38, 56, 0.9);
  display: flex;
  flex-direction: column;
  padding: 4px 3px;
  gap: 3px;
  background: rgba(10, 14, 26, 0.5);
  overflow-y: auto;
}
.sw2-thumb-strip {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sw2-thumb {
  width: 26px; height: 26px;
  border-radius: 6px;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.sw2-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sw2-thumb.active { border-color: #7c3aed; }
.sw2-thumb:hover { border-color: rgba(124,58,237,0.6); }

/* === Seller tile enhancements === */
.sw2-seller-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.sw2-seller-rank {
  margin-left: auto;
  font-family: monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
  align-self: center;
}
.sw2-in-stock-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(34,197,94,0.15);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  letter-spacing: 0.02em;
}
.sw2-seller-rating-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}
.sw2-seller-stars { font-size: 0.7rem; }
.sw2-seller-rnum { font-size: 0.73rem; font-weight: 600; }
.sw2-seller-rvotes { font-size: 0.68rem; color: var(--text-muted); }

/* === Bundle button design === */
.sw2-btn-bundle {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: var(--text) !important;
  gap: 6px;
}
.sw2-btn-bundle:hover {
  border-color: rgba(255,255,255,0.25) !important;
  background: rgba(255,255,255,0.04) !important;
}
.sw2-btn-bundle svg { opacity: 0.7; }

/* === Smart rec "Buy Product" button === */
.sw2-smart-rec-buy {
  display: block;
  margin-top: 10px;
  padding: 6px 14px;
  background: #7c3aed;
  color: #fff;
  border-radius: 7px;
  font-size: 0.73rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  width: fit-content;
  align-self: center;
  transition: background 0.15s;
}
.sw2-smart-rec-buy:hover { background: #6d28d9; }

.sw2-results-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sw2-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.sw2-sort-seg {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 3px;
  display: inline-flex;
}
.sw2-sort-seg button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.sw2-sort-seg button.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.sw2-sort-seg button:not(.active):hover { color: var(--text); }
.sw2-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.sw2-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.74rem;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}
.sw2-chip:hover { border-color: var(--text-muted); color: var(--text); }
.sw2-chip.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.sw2-chip-count {
  font-family: monospace;
  font-size: 0.65rem;
  opacity: 0.7;
}

/* Card v2 — 3-column grid layout */
.shopwise-result-card.sw2-card {
  display: grid !important;
  grid-template-columns: 140px 1fr 190px;
  flex-wrap: unset;
  background: rgba(20, 26, 44, 0.9);
  border: 1px solid rgba(30, 38, 56, 0.9);
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.shopwise-result-card.sw2-card:hover {
  border-color: rgba(44, 54, 84, 0.9);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
}
.shopwise-result-card.sw2-card.sw-result-card--expanded {
  border-color: rgba(124, 58, 237, 0.42);
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.18), 0 10px 28px rgba(124, 58, 237, 0.12);
}

/* Media column */
.sw2-media-col {
  border-right: 1px solid rgba(30, 38, 56, 0.9);
  display: flex;
  flex-direction: column;
  background: rgba(17, 23, 42, 0.8);
}
.sw2-media-main-row {
  display: flex;
  flex-direction: row;
  flex: 1;
  overflow: hidden;
}
.sw2-card-media {
  position: relative;
  flex: 1;
  min-width: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(17, 23, 42, 0.8);
  flex-shrink: 0;
}
.sw2-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10%;
  transition: transform 0.4s ease;
}
.shopwise-result-card.sw2-card:hover .sw2-card-media img { transform: scale(1.04); }
.sw2-media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  background: repeating-linear-gradient(
    45deg,
    rgba(17, 23, 42, 0.8), rgba(17, 23, 42, 0.8) 8px,
    rgba(10, 14, 26, 0.8) 8px, rgba(10, 14, 26, 0.8) 16px
  );
}
.sw2-media-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: monospace;
  font-size: 0.62rem;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(30, 38, 56, 0.9);
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.sw2-media-foot {
  border-top: 1px solid rgba(30, 38, 56, 0.9);
  padding: 7px 9px;
  background: rgba(10, 14, 26, 0.5);
  flex: 1;
  min-height: 32px;
  display: flex;
  align-items: center;
}
.sw2-rating-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: var(--text-muted);
  width: 100%;
  flex-wrap: wrap;
}
.sw2-rating-stars {
  display: inline-flex;
  gap: 0;
  color: #f59e0b;
}
.sw2-star { font-size: 0.7rem; line-height: 1; }
.sw2-rating-num { font-weight: 600; color: var(--text); font-size: 0.7rem; }
.sw2-rating-votes { font-size: 0.62rem; color: var(--text-muted); font-family: monospace; }

/* Body column */
.sw2-card-body {
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.sw2-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.sw2-product-title {
  font-size: 0.93rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Match badge */
.sw2-match-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-family: monospace;
  white-space: nowrap;
}
.sw2-match-badge-glyph {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.52rem;
}
.sw2-match-best {
  background: oklch(0.30 0.10 145);
  color: oklch(0.92 0.13 145);
  box-shadow: inset 0 0 0 1px oklch(0.50 0.12 145);
}
.sw2-match-best .sw2-match-badge-glyph { background: oklch(0.78 0.18 145); color: #0e0d0b; }
.sw2-match-strong {
  background: oklch(0.30 0.10 75);
  color: oklch(0.92 0.13 75);
  box-shadow: inset 0 0 0 1px oklch(0.50 0.13 75);
}
.sw2-match-strong .sw2-match-badge-glyph { background: oklch(0.82 0.15 75); color: #0e0d0b; }
.sw2-match-considerable {
  background: oklch(0.30 0.10 250);
  color: oklch(0.88 0.10 250);
  box-shadow: inset 0 0 0 1px oklch(0.50 0.13 250);
}
.sw2-match-considerable .sw2-match-badge-glyph { background: oklch(0.72 0.15 250); color: #0e0d0b; }
.sw2-match-low {
  background: oklch(0.28 0.05 30);
  color: oklch(0.85 0.08 30);
  box-shadow: inset 0 0 0 1px oklch(0.45 0.10 30);
}
.sw2-match-low .sw2-match-badge-glyph { background: oklch(0.68 0.14 30); color: #0e0d0b; }

/* Tag chips inside body */
.sw2-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 0;
}
.sw2-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.sw2-tag-best-value { background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(134, 239, 172, 0.28); color: #86efac; }
.sw2-tag-best-price { background: rgba(252, 211, 77, 0.08); border: 1px solid rgba(252, 211, 77, 0.28); color: #fcd34d; }
.sw2-tag-best-rated { background: rgba(124, 58, 237, 0.10); border: 1px solid rgba(196, 181, 253, 0.28); color: #c4b5fd; }
.sw2-tag-generic    { background: rgba(124, 58, 237, 0.08); border: 1px solid rgba(124, 58, 237, 0.20); color: #ddd6fe; }
.sw2-tag-sale   { background: rgba(251, 191, 36, 0.14); border: 1px solid rgba(251, 191, 36, 0.36); color: #fbbf24; font-weight: 700; letter-spacing: 0.04em; }
.sw2-tag-refurb { background: rgba(148, 163, 184, 0.10); border: 1px solid rgba(148, 163, 184, 0.28); color: #94a3b8; }

/* Seller row in body */
.sw2-seller-row {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.sw2-seller-avatar {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}
.sw2-seller-name {
  color: oklch(0.85 0.10 75);
  font-weight: 500;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Spec chips */
.sw2-specs-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.sw2-spec {
  border: 1px solid var(--border-soft);
  background: rgba(10, 14, 26, 0.5);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 0.68rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sw2-spec strong { color: var(--text); font-weight: 500; }
.sw2-spec-color-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

/* Description */
.sw2-description {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Delivery */
.sw2-delivery-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(10, 14, 26, 0.4);
  border-radius: 5px;
  border: 1px dashed rgba(30, 38, 56, 0.9);
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* Actions column */
.sw2-card-actions {
  padding: 13px 13px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.16));
  border-left: 1px solid rgba(30, 38, 56, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
}
.sw2-price-block { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; }
.sw2-price-major {
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  font-weight: 700;
  font-style: italic;
}
.sw2-price-note {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: monospace;
  margin-top: 2px;
  line-height: 1.3;
}
.sw2-btn-cluster {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.sw2-btn-compare {
  background: #7c3aed;
  color: #ffffff;
  border: 1px solid #7c3aed;
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s ease;
  width: 100%;
  cursor: pointer;
  text-align: center;
}
.sw2-btn-compare:hover { background: #6d28d9; border-color: #6d28d9; }
.sw2-btn-compare.sw-compare-active {
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(196, 181, 253, 0.4);
  color: #c4b5fd;
}
.sw2-btn-bundle {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  transition: all 0.15s ease;
}

/* Seller panel override for grid cards */
.shopwise-result-card.sw2-card .sw-seller-panel {
  grid-column: 1 / -1;
  width: auto;
  flex: none;
  border-top: 1px solid rgba(30, 38, 56, 0.9);
  padding-top: 0;
  animation: swSellerPanelIn 0.22s ease-out;
}

/* Expansion body */
.sw2-expand-body {
  padding: 14px 18px 18px;
  background: rgba(10, 14, 26, 0.45);
}
.sw2-expand-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.sw2-expand-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}
.sw2-expand-count {
  color: #c4b5fd;
  margin-left: 5px;
  font-weight: 500;
}

/* Smart comparison button */
.sw2-smart-btn {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: white;
  border: 1px solid #7c3aed;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.sw2-smart-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px -5px rgba(124, 58, 237, 0.7);
}
.sw2-smart-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

/* Smart summary card */
.sw2-smart-summary {
  border: 1px solid rgba(124, 58, 237, 0.7);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.10) 0%, rgba(124, 58, 237, 0.02) 60%), rgba(20, 26, 44, 0.9);
  border-radius: 11px;
  padding: 13px 15px;
  margin-bottom: 14px;
  animation: swSmartIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes swSmartIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sw2-smart-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.sw2-smart-summary-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
}
.sw2-smart-summary-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.6rem;
  font-style: normal;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18) 0%, rgba(99, 102, 241, 0.22) 100%);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.35);
  padding: 2px 8px 2px 7px;
  border-radius: 999px;
  margin-left: 3px;
}
.sw2-smart-summary-pill em {
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.62rem;
  letter-spacing: 0.01em;
}
.sw2-smart-summary-close {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sw2-smart-summary-close:hover { color: var(--text); border-color: var(--text-muted); background: rgba(255,255,255,0.05); }
.sw2-smart-summary-text {
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.58;
  margin: 0;
}

/* Seller tile v2 — extends .sw-seller-tile */
.sw-seller-tile.sw2-seller-v2 {
  background: rgba(20, 26, 44, 0.9);
  border: 1px solid rgba(30, 38, 56, 0.9);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color 0.15s ease, transform 0.15s ease;
  animation: swTileIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.sw-seller-tile.sw2-seller-v2:hover {
  border-color: rgba(44, 54, 84, 0.9);
  transform: translateY(-1px);
}
@keyframes swTileIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sw2-seller-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.sw2-seller-logo {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: rgba(17, 23, 42, 0.9);
  border: 1px solid rgba(30, 38, 56, 0.9);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--text);
}
.sw2-seller-logo img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.sw2-seller-name-block { min-width: 0; flex: 1; }
.sw2-seller-name-block h4 {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sw2-seller-domain {
  font-family: monospace;
  font-size: 0.6rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
}
.sw2-seller-product {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 7px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 2.4em;
}
.sw2-seller-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.sw2-seller-rating-inline {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
}
.sw2-seller-rating-inline .sw2-rnum { color: #c4b5fd; font-weight: 600; }
.sw2-seller-rating-inline .sw2-rvotes { font-family: monospace; font-size: 0.62rem; color: var(--text-muted); }

.sw2-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(30, 38, 56, 0.9);
  margin-top: auto;
  margin-bottom: 8px;
}
.sw2-seller-price-main {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.sw2-seller-price-main .sw2-cur-after {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-family: monospace;
  margin-left: 3px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.sw2-seller-shipping {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-family: monospace;
  text-align: right;
  line-height: 1.3;
}
.sw2-seller-shipping strong { color: var(--text-muted); font-weight: 500; }

/* View deal anchor — adds to btn-primary sw-seller-deal */
.sw2-view-btn {
  background: #7c3aed;
  color: white;
  border: 1px solid #7c3aed;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 0.73rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s ease;
}
.sw2-view-btn:hover { background: #6d28d9; border-color: #6d28d9; }

/* Bundle panel — full-width span identical to seller panel */
.shopwise-result-card.sw2-card .sw-bundle-panel {
  grid-column: 1 / -1;
  width: auto;
  flex: none;
  border-top: 1px solid rgba(124, 58, 237, 0.25);
  padding-top: 0;
  animation: swSellerPanelIn 0.22s ease-out;
}

/* Smart comparison loading state */
.sw2-smart-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 6px 0 10px;
}

/* Smart comparison AI result blocks */
.sw2-smart-recs-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.sw2-smart-rec {
  flex: 1 1 180px;
  background: rgba(20, 26, 44, 0.8);
  border: 1px solid rgba(60, 40, 120, 0.5);
  border-radius: 9px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sw2-smart-rec-type {
  font-family: monospace;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c4b5fd;
  background: rgba(45, 29, 87, 1);
  padding: 1px 5px;
  border-radius: 3px;
  align-self: flex-start;
}
.sw2-smart-rec-seller {
  font-size: 0.84rem;
  color: var(--text);
  margin-top: 4px;
}
.sw2-smart-rec-headline {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
}
.sw2-smart-rec-reason {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 3px 0 0;
}
.sw2-smart-tradeoffs {
  list-style: none;
  padding: 0;
  margin: 6px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sw2-smart-tradeoffs li {
  font-size: 0.74rem;
  color: var(--text-muted);
  padding-left: 12px;
  position: relative;
}
.sw2-smart-tradeoffs li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: rgba(196, 181, 253, 0.6);
}
.sw2-smart-watchout {
  font-size: 0.7rem;
  color: rgba(251, 191, 36, 0.7);
  margin: 4px 0 0;
  padding-left: 12px;
  border-left: 2px solid rgba(251, 191, 36, 0.3);
}
.sw2-smart-error {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  padding: 6px 0;
}

/* Bundle summary line */
.sw2-bundle-summary {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin: 0 0 10px;
  line-height: 1.5;
}

/* Seller grid override */
.sw-seller-grid.sw2-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

/* Bundle placeholder */
.sw2-bundle-list { display: flex; flex-direction: column; gap: 6px; }
.sw2-bundle-row {
  display: grid;
  grid-template-columns: 32px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(20, 26, 44, 0.9);
  border: 1px solid rgba(30, 38, 56, 0.9);
  border-radius: 9px;
  animation: swBundleIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: border-color 0.15s ease;
}
@keyframes swBundleIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sw2-bundle-row:hover { border-color: rgba(44, 54, 84, 0.9); }
.sw2-bundle-swatch {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}
.sw2-bundle-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sw2-bundle-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sw2-bundle-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
  overflow: hidden;
}
.sw2-bundle-cat-tag {
  font-family: monospace;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #c4b5fd;
  background: rgba(45, 29, 87, 1);
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}
.sw2-bundle-why { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw2-bundle-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  white-space: nowrap;
}
.sw2-bundle-price-label {
  font-size: 0.58rem;
  color: var(--text-muted);
  font-family: monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sw2-bundle-price-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.sw2-bundle-cta {
  background: #7c3aed;
  color: white;
  border: 1px solid #7c3aed;
  padding: 6px 11px;
  border-radius: 7px;
  font-size: 0.7rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.sw2-bundle-cta:hover { background: #6d28d9; border-color: #6d28d9; }
.sw2-bundle-body {
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.04), rgba(10, 14, 26, 0.4) 60%);
}

/* Responsive */
@media (max-width: 900px) {
  .shopwise-result-card.sw2-card { grid-template-columns: 110px 1fr 160px; }
}
@media (max-width: 680px) {
  .shopwise-result-card.sw2-card {
    grid-template-columns: 90px 1fr;
    grid-template-rows: auto auto;
  }
  .sw2-media-col {
    grid-row: 1;
    border-right: none;
    border-bottom: 1px solid rgba(30, 38, 56, 0.9);
  }
  .sw2-card-body { grid-row: 2; grid-column: 1 / -1; }
  .sw2-card-actions {
    grid-row: 1;
    grid-column: 2;
    border-left: 1px solid rgba(30, 38, 56, 0.9);
    justify-content: flex-end;
  }
  .shopwise-result-card.sw2-card .sw-seller-panel { grid-row: 3; grid-column: 1 / -1; }
  .shopwise-result-card.sw2-card .sw-bundle-panel { grid-row: 4; grid-column: 1 / -1; }
  .sw2-bundle-row { grid-template-columns: 32px 1fr; row-gap: 5px; }
  .sw2-bundle-price { grid-column: 2 / 3; justify-self: start; }
  .sw2-bundle-cta { grid-column: 1 / -1; }
  .sw2-smart-recs-row { flex-direction: column; }
}

/* ============================================================
   TRAVIA — Travel Intelligence interactive section
   All rules scoped to .tv-* prefix to avoid global collisions.
   Design system mirrors design_handoff_travia/travia/travia.css.
   ============================================================ */

.tv-section { padding-top: 0 !important; }

.tv-app {
  --tv-bg-1: #0b0e14;
  --tv-panel: #11151e;
  --tv-panel-2: #151a25;
  --tv-panel-3: #1b2230;
  --tv-line: rgba(255,255,255,0.07);
  --tv-line-2: rgba(255,255,255,0.12);
  --tv-line-strong: rgba(255,255,255,0.18);
  --tv-tx: #eef1f7;
  --tv-tx-2: #aab2c2;
  --tv-tx-3: #6c7689;
  --tv-tx-4: #3a4252;
  --tv-teal: #2fd4ab;
  --tv-teal-2: #34d399;
  --tv-cyan: #38bdf8;
  --tv-blue: #3b82f6;
  --tv-violet: #8b5cf6;
  --tv-violet-2: #a78bfa;
  --tv-pin: #ff5a5f;
  --tv-ok: #34d399;
  --tv-ok-dim: rgba(52,211,153,0.14);
  --tv-warn: #f5b945;
  --tv-warn-dim: rgba(245,185,69,0.14);
  --tv-danger: #fb7185;
  --tv-danger-dim: rgba(251,113,133,0.14);
  --tv-info: #38bdf8;
  --tv-info-dim: rgba(56,189,248,0.12);
  --tv-r-sm: 10px;
  --tv-r: 14px;
  --tv-r-lg: 20px;
  --tv-r-xl: 26px;
  --tv-ease: cubic-bezier(.22,.61,.36,1);
  background: radial-gradient(1200px 700px at 50% -10%, rgba(139,92,246,0.10), transparent 60%),
              radial-gradient(900px 600px at 85% 110%, rgba(56,189,248,0.07), transparent 55%),
              var(--tv-bg-1);
  color: var(--tv-tx);
  font-family: 'DM Sans', system-ui, sans-serif;
  border-radius: 20px;
  overflow: hidden;
  min-height: 540px;
}

/* Screen transitions */
.tv-screen { display: none; padding: clamp(16px,3vw,40px); min-height: 440px; }
.tv-screen--active { display: block; animation: tvRiseIn .45s var(--tv-ease) both; }

@keyframes tvRiseIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes tvSpin { to { transform: rotate(360deg); } }
@keyframes tvPulseGlow { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes tvShimmer { 100% { background-position: 200% 0; } }

/* Layout */
.tv-col { width: 100%; max-width: 560px; margin: 0 auto; }
.tv-col-wide { width: 100%; max-width: 1060px; margin: 0 auto; }
.tv-center { text-align: center; }
.tv-row { display: flex; align-items: center; gap: 12px; }
.tv-between { justify-content: space-between; }
.tv-stack { display: flex; flex-direction: column; }
.tv-grow { flex: 1; }
.tv-grid { display: grid; gap: 14px; }
.tv-rise { animation: tvRiseIn .55s var(--tv-ease) both; }

/* Spacing */
.tv-gap-6 { gap: 6px; } .tv-gap-8 { gap: 8px; } .tv-gap-10 { gap: 10px; }
.tv-gap-12 { gap: 12px; } .tv-gap-14 { gap: 14px; } .tv-gap-16 { gap: 16px; }
.tv-gap-20 { gap: 20px; }
.tv-mt-12 { margin-top: 12px; } .tv-mt-16 { margin-top: 16px; }
.tv-mt-20 { margin-top: 20px; } .tv-mt-24 { margin-top: 24px; }

/* Typography */
.tv-h1 { font-size: clamp(30px,4.6vw,48px); line-height: 1.05; letter-spacing: -0.025em; font-weight: 800; font-style: italic; margin: 0 0 14px; background: linear-gradient(90deg,var(--tv-violet-2) 0%,var(--tv-teal) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.tv-h2 { font-size: clamp(15px,1.7vw,20px); line-height: 1.2; letter-spacing: -0.01em; font-weight: 800; font-style: italic; margin: 0 0 6px; white-space: nowrap; background: linear-gradient(90deg,var(--tv-violet-2) 0%,var(--tv-teal) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.tv-lede { font-size: 1rem; line-height: 1.55; font-weight: 400; font-style: italic; color: var(--tv-tx-3); margin: 0; }
.tv-sub { color: var(--tv-tx-3); font-size: 14px; line-height: 1.55; }
.tv-mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; }
.tv-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--tv-violet-2); margin: 0 0 14px; display: inline-flex; align-items: center; gap: 8px; }

/* Buttons */
.tv-btn {
  font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  border: 1px solid var(--tv-line-2); background: var(--tv-panel-2); color: var(--tv-tx);
  padding: 12px 20px; border-radius: var(--tv-r); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: transform .14s var(--tv-ease), background .18s, border-color .18s;
  -webkit-tap-highlight-color: transparent;
}
.tv-btn:hover { background: var(--tv-panel-3); border-color: var(--tv-line-strong); }
.tv-btn:active { transform: translateY(1px) scale(.995); }
.tv-btn:disabled { opacity: .4; cursor: not-allowed; }
.tv-btn-lg { padding: 15px 24px; font-size: 16px; border-radius: var(--tv-r-lg); }
.tv-btn-block { width: 100%; }
.tv-btn-primary { background: linear-gradient(135deg,#8b5cf6,#6366f1); border-color: transparent; color: #fff; box-shadow: 0 14px 34px -16px rgba(124,92,246,.8); }
.tv-btn-primary:hover { filter: brightness(1.08); background: linear-gradient(135deg,#8b5cf6,#6366f1); }
.tv-btn-ghost { background: transparent; border-color: var(--tv-line); color: var(--tv-tx-2); }
.tv-btn-ghost:hover { background: rgba(255,255,255,.04); color: var(--tv-tx); }

/* Cards */
.tv-card { background: var(--tv-panel); border: 1px solid var(--tv-line); border-radius: var(--tv-r-lg); box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 18px 50px -28px rgba(0,0,0,.9); }
.tv-card-pad { padding: clamp(16px,2.6vw,24px); }

/* Choice cards */
.tv-choice {
  position: relative; text-align: left; width: 100%;
  background: var(--tv-panel); border: 1px solid var(--tv-line); border-radius: var(--tv-r-lg);
  padding: 20px; cursor: pointer; color: var(--tv-tx);
  display: flex; align-items: flex-start; gap: 16px;
  flex-direction: column;
  transition: transform .16s var(--tv-ease), border-color .18s, background .18s;
  -webkit-tap-highlight-color: transparent;
}
.tv-choice:hover { border-color: var(--tv-line-strong); background: var(--tv-panel-2); transform: translateY(-2px); }
.tv-choice.tv-choice--sel { border-color: rgba(139,92,246,.7); background: linear-gradient(160deg,rgba(139,92,246,.12),transparent 70%); box-shadow: 0 0 0 1px rgba(139,92,246,.5); }
.tv-choice-ico { width: 48px; height: 48px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--tv-panel-2); border: 1px solid var(--tv-line); font-size: 22px; }
.tv-choice-tt { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; display: block; }
.tv-choice-sb { color: var(--tv-tx-3); font-size: 13px; margin-top: 3px; line-height: 1.4; display: block; }
.tv-choice-check { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; flex: none; border: 1.5px solid var(--tv-line-2); display: grid; place-items: center; color: transparent; transition: all .2s; font-size: 12px; }
.tv-choice.tv-choice--sel .tv-choice-check { background: var(--tv-violet); border-color: var(--tv-violet); color: #fff; }
.tv-choice--compact { flex-direction: column; align-items: center; justify-content: center; padding: 14px; text-align: center; gap: 6px; }

/* Fields */
.tv-field-label { font-size: 13px; font-weight: 600; color: var(--tv-tx-2); margin-bottom: 8px; display: block; }
.tv-input, .tv-select {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--tv-tx);
  background: var(--tv-panel-2); border: 1px solid var(--tv-line-2); border-radius: var(--tv-r);
  padding: 13px 15px; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.tv-input::placeholder { color: var(--tv-tx-4); }
.tv-input:focus, .tv-select:focus { border-color: rgba(139,92,246,.65); box-shadow: 0 0 0 3px rgba(139,92,246,.18); }
.tv-input-wrap { position: relative; }
.tv-input-wrap .tv-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--tv-tx-3); pointer-events: none; }
.tv-input-wrap .tv-input { padding-left: 42px; }

/* Chips */
.tv-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.tv-chip {
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  color: var(--tv-tx-2); background: var(--tv-panel-2); border: 1px solid var(--tv-line-2);
  padding: 8px 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s var(--tv-ease); -webkit-tap-highlight-color: transparent;
}
.tv-chip:hover { border-color: var(--tv-line-strong); color: var(--tv-tx); }
.tv-chip--on, .tv-chip.on { color: #fff; background: rgba(139,92,246,.18); border-color: rgba(139,92,246,.6); }

/* Segmented control */
.tv-seg { display: inline-flex; background: var(--tv-panel-2); border: 1px solid var(--tv-line-2); border-radius: 999px; padding: 4px; gap: 2px; }
.tv-seg button { font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--tv-tx-3); background: transparent; border: none; padding: 8px 16px; border-radius: 999px; transition: all .15s; }
.tv-seg button.on { background: var(--tv-panel-3); color: var(--tv-tx); }

/* API chips */
.tv-api-chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 10.5px; font-weight: 500; color: var(--tv-tx-3); background: rgba(255,255,255,.03); border: 1px solid var(--tv-line); padding: 3px 8px; border-radius: 999px; }
.tv-led { width: 6px; height: 6px; border-radius: 50%; background: var(--tv-teal-2); box-shadow: 0 0 6px var(--tv-teal-2); }
.tv-led--violet { background: var(--tv-violet-2); box-shadow: 0 0 6px var(--tv-violet-2); }
.tv-led--blue { background: var(--tv-cyan); box-shadow: 0 0 6px var(--tv-cyan); }
.tv-api-chip--violet .tv-led { background: var(--tv-violet-2); box-shadow: 0 0 6px var(--tv-violet-2); }
.tv-api-chip--blue .tv-led { background: var(--tv-cyan); box-shadow: 0 0 6px var(--tv-cyan); }

/* Badges */
.tv-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: .01em; white-space: nowrap; }
.tv-badge--ok { color: var(--tv-ok); background: var(--tv-ok-dim); }
.tv-badge--warn { color: var(--tv-warn); background: var(--tv-warn-dim); }
.tv-badge--danger { color: var(--tv-danger); background: var(--tv-danger-dim); }
.tv-badge--info { color: var(--tv-info); background: var(--tv-info-dim); }
.tv-badge--violet { color: var(--tv-violet-2); background: rgba(139,92,246,.14); }
.tv-badge--teal { color: var(--tv-teal-2); background: rgba(47,212,171,.14); }
.tv-badge--neutral { color: var(--tv-tx-2); background: rgba(255,255,255,.06); }

/* Actions bar */
.tv-actions { display: flex; gap: 12px; margin-top: 28px; }
.tv-actions .tv-btn { flex: 1; }

/* Package two-column */
.tv-pkg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; margin-top: 20px; }

/* Spinner */
.tv-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); border-top-color: var(--tv-violet-2); animation: tvSpin .8s linear infinite; flex-shrink: 0; display: inline-block; }
.tv-pulse-glow { animation: tvPulseGlow 2s infinite; }

/* Skeleton */
.tv-skeleton { background: linear-gradient(90deg,rgba(255,255,255,.04) 25%,rgba(255,255,255,.09) 37%,rgba(255,255,255,.04) 63%); background-size: 200% 100%; animation: tvShimmer 1.4s infinite; border-radius: 8px; }

/* Why / advisory box */
.tv-why { padding: 12px 14px; background: rgba(139,92,246,.08); border: 1px solid rgba(139,92,246,.22); border-radius: 12px; display: flex; gap: 9px; font-size: 14px; color: #cfc4f5; }

/* Planning stage row */
.tv-stage-row { display: flex; align-items: flex-start; gap: 13px; padding: 11px 2px; border-top: 1px solid var(--tv-line); }
.tv-stage-row:first-child { border-top: none; }
.tv-stage-icon { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; font-size: 15px; background: var(--tv-panel-2); border: 1px solid var(--tv-line); }
.tv-stage-icon--done { background: var(--tv-ok-dim); }
.tv-stage-icon--done::after { content: '✓'; color: var(--tv-ok); font-size: 14px; font-weight: 700; }
.tv-stage-label { font-weight: 600; font-size: 14px; }
.tv-stage-result { font-size: 12.5px; margin-top: 2px; color: var(--tv-tx-2); }

/* Destination discovery card */
.tv-dest-card { width: 100%; text-align: left; cursor: pointer; overflow: hidden; padding: 0; border: 1px solid var(--tv-line); border-radius: var(--tv-r-lg); background: var(--tv-panel); transition: transform .16s var(--tv-ease), border-color .18s; }
.tv-dest-card:hover { transform: translateY(-2px); border-color: var(--tv-line-strong); }
.tv-dest-hero { height: 88px; position: relative; display: flex; align-items: flex-end; padding: 14px; }
.tv-dest-body { padding: 14px 16px 16px; }

/* Weather strip day cell */
.tv-weather-cell { flex: 1 0 90px; background: var(--tv-panel-2); border: 1px solid var(--tv-line); border-radius: 12px; padding: 11px 10px; text-align: center; }

/* Attraction card */
.tv-attraction-card { background: var(--tv-panel); border: 1px solid var(--tv-line); border-radius: var(--tv-r-lg); overflow: hidden; display: flex; flex-direction: column; }
.tv-attraction-header { height: 100px; background: linear-gradient(150deg,#1a1730,#2b2456); position: relative; display: grid; place-items: center; font-size: 32px; }

/* Day plan timeline */
.tv-timeline { position: relative; }
.tv-timeline::before { content: ''; position: absolute; left: 51px; top: 6px; bottom: 6px; width: 1.5px; background: var(--tv-line-2); }
.tv-timeline-row { display: flex; align-items: flex-start; gap: 12px; padding: 7px 0; }
.tv-act-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 4px; z-index: 1; box-shadow: 0 0 0 3px var(--tv-panel); }

/* Progress bar */
.tv-progress-track { height: 5px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; }
.tv-progress-fill { height: 100%; background: linear-gradient(100deg,#34d399,#38bdf8 48%,#8b5cf6); transition: width .6s var(--tv-ease); }

/* Stop candidate cards */
.tv-stop-card { cursor: pointer; transition: border-color .18s; position: relative; }
.tv-stop-card:hover { border-color: var(--tv-line-strong); }
.tv-stop-card--sel { border-color: rgba(139,92,246,.5) !important; background: rgba(139,92,246,.06) !important; }
.tv-stop-card-check { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--tv-violet-2); color: #fff; display: none; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.tv-stop-card--sel .tv-stop-card-check { display: flex; }

/* Suggested combination cards */
.tv-combo-card { text-align: left; padding: 14px 16px; border-radius: var(--tv-r-lg); border: 1px solid var(--tv-line); background: var(--tv-panel); cursor: pointer; transition: border-color .18s; min-width: 200px; max-width: 260px; flex-shrink: 0; }
.tv-combo-card:hover { border-color: var(--tv-line-strong); }
.tv-combo-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.tv-combo-scroll::-webkit-scrollbar { display: none; }

/* Responsive */
@media (max-width: 860px) { .tv-pkg-grid { grid-template-columns: 1fr; gap: 16px; } }
@media (max-width: 720px) { .tv-grid[data-cols="3"] { grid-template-columns: 1fr 1fr !important; } }
@media (max-width: 560px) {
  .tv-choice { padding: 14px; gap: 12px; }
  .tv-choice-ico { width: 42px; height: 42px; font-size: 20px; }
  .tv-h1 { font-size: 28px; }
  .tv-h2 { font-size: 15px; white-space: normal; }
}
