/* ==========================================================================
   Qanoonak — Landing Page
   Custom styles layered on top of Tailwind CSS
   ========================================================================== */

:root {
  --navy-950: #070c17;
  --navy-900: #0f172a;
  --royal-600: #2563eb;
  --royal-500: #3b82f6;
  --gold-400: #d9b44a;
  --slate-50: #f8fafc;

  /* Apple-grade glass tokens */
  --glass-light: rgba(255, 255, 255, 0.72);
  --glass-light-strong: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.66);
  --glass-dark: rgba(15, 23, 42, 0.44);
  --glass-dark-border: rgba(255, 255, 255, 0.15);
  --glass-inset: inset 0 1px 1px rgba(255, 255, 255, 0.35);
  --glass-shadow: 0 8px 32px rgba(2, 6, 23, 0.12);
  --glass-shadow-deep: 0 24px 60px -28px rgba(2, 6, 23, 0.3);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  color-scheme: light;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: var(--royal-600);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border: 2px solid #f1f5f9;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  background: transparent;
  transition: padding 0.3s ease;
}

.header-shell {
  isolation: isolate;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58));
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.72),
    inset 0 -1px 1px rgba(15, 23, 42, 0.04),
    0 8px 32px rgba(2, 6, 23, 0.14);
  transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.header-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.04) 40%, transparent 68%),
    radial-gradient(120% 80% at 12% 0%, rgba(255, 255, 255, 0.35), transparent 55%);
  opacity: 0.8;
  pointer-events: none;
}

.header-shell > * {
  position: relative;
  z-index: 1;
}

.site-header.is-scrolled .header-shell {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.82));
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    inset 0 -1px 1px rgba(15, 23, 42, 0.05),
    0 16px 44px -18px rgba(2, 6, 23, 0.35),
    0 8px 32px rgba(2, 6, 23, 0.1);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.52rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.nav-link:focus-visible,
.nav-link:hover {
  color: #2563eb;
  background: rgba(239, 246, 255, 0.62);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.nav-link.is-active {
  color: #2563eb;
  background: rgba(239, 246, 255, 0.84);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    inset 0 0 0 1px rgba(191, 219, 254, 0.78);
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 0.85rem;
  left: 0.85rem;
  bottom: 0.16rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link.is-active::after {
  transform: scaleX(0);
}

.aman-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 243, 208, 0.7);
  background: #ecfdf5;
  padding: 0.16rem 0.42rem;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.1;
  color: #059669;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.05);
}

.aman-dot {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 999px;
  background: #10b981;
  animation: amanPulse 2.2s ease-out infinite;
}

@keyframes amanPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  70%,
  100% {
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0);
  }
}

/* Mobile menu */
#mobile-menu {
  max-height: 0;
  margin-top: 0;
  border-width: 0;
  box-shadow: none;
  visibility: hidden;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.4s ease,
    margin 0.3s ease;
}

#mobile-menu.is-open {
  max-height: calc(100dvh - 6.5rem);
  margin-top: 0.5rem;
  border-width: 1px;
  visibility: visible;
  overflow-y: auto;
}

.mobile-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border-radius: 1rem;
  padding: 0.62rem 0.7rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e293b;
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-link:hover,
.mobile-link:focus-visible {
  background: #f8fafc;
  color: #1d4ed8;
}

.mobile-link-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(191, 219, 254, 0.65);
  border-radius: 0.7rem;
  background: #eff6ff;
  color: #2563eb;
}

.mobile-link-icon--emerald {
  border-color: rgba(167, 243, 208, 0.7);
  background: #ecfdf5;
  color: #059669;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero-shell {
  isolation: isolate;
  background:
    radial-gradient(1100px 620px at 82% -12%, rgba(37, 99, 235, 0.34), transparent 62%),
    radial-gradient(780px 500px at 8% 8%, rgba(14, 165, 233, 0.15), transparent 58%),
    linear-gradient(158deg, #0a1120 0%, #0f172a 48%, #101d3a 100%);
}

.hero-grid {
  background-image:
    linear-gradient(to left, rgba(148, 163, 184, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.09) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(ellipse 78% 68% at 50% 34%, #000 22%, transparent 76%);
  mask-image: radial-gradient(ellipse 78% 68% at 50% 34%, #000 22%, transparent 76%);
}

.noise {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
}

.glass {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045));
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.22),
    0 8px 32px rgba(0, 0, 0, 0.12);
}

/* --------------------------------------------------------------------------
   Apple-grade liquid glass surfaces
   -------------------------------------------------------------------------- */
.glass-card,
.service-card,
#how .lift,
#news article,
#library,
#faq .faq-item,
#faq .faq-help,
.calc-shell {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.62));
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.72),
    inset 0 -1px 1px rgba(15, 23, 42, 0.03),
    var(--glass-shadow);
}

.glass-card:hover,
.service-card:hover,
#how .lift:hover,
#news article:hover,
#library:hover,
#faq .faq-item:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78));
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.85),
    0 22px 54px -28px rgba(2, 6, 23, 0.28),
    0 8px 32px rgba(2, 6, 23, 0.08);
}

.glass-specular {
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.18),
    0 8px 32px rgba(0, 0, 0, 0.12);
}

.glass-btn {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.44));
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.75),
    0 4px 18px rgba(2, 6, 23, 0.08);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease,
    border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.glass-btn:hover {
  border-color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.64));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 10px 26px -12px rgba(2, 6, 23, 0.2);
}

.glass-btn:active {
  transform: scale(0.95);
}

/* Glass button specular cap */
.btn-shine::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 44%);
  pointer-events: none;
}

/* Soft ambient tints so the glass has something to refract */
#how,
#news,
#calculator,
#faq {
  background-image:
    radial-gradient(900px 480px at 12% 0%, rgba(37, 99, 235, 0.055), transparent 65%),
    radial-gradient(720px 420px at 92% 8%, rgba(14, 165, 233, 0.045), transparent 62%);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-card,
  .service-card,
  #how .lift,
  #news article,
  #library,
  #faq .faq-item,
  #faq .faq-help,
  .calc-shell,
  .glass-btn {
    background: rgba(255, 255, 255, 0.94);
  }

  .header-shell {
    background: rgba(255, 255, 255, 0.97);
  }
}

.float-slow {
  animation: floatSlow 8s ease-in-out infinite;
}

.float-slow-delayed {
  animation: floatSlow 9s ease-in-out 1.6s infinite;
}

@keyframes floatSlow {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* Assistant card */
.ai-shell {
  isolation: isolate;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.36);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.48),
    inset 0 -1px 1px rgba(2, 6, 23, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 50px 100px -40px rgba(2, 6, 23, 0.85),
    0 24px 50px -30px rgba(37, 99, 235, 0.4);
}

.ai-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.32), transparent 34%, transparent 68%, rgba(255, 255, 255, 0.12)),
    radial-gradient(80% 46% at 18% 0%, rgba(255, 255, 255, 0.22), transparent 62%);
  pointer-events: none;
  z-index: 0;
}

.ai-shell > div {
  position: relative;
  z-index: 1;
}

.ai-textarea {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

#assistant button[data-prompt] {
  border-color: rgba(255, 255, 255, 0.72);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(248, 250, 252, 0.4));
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  backdrop-filter: blur(12px) saturate(150%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.82);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    transform 0.2s ease, box-shadow 0.2s ease;
}

#assistant button[data-prompt]:hover {
  border-color: rgba(191, 219, 254, 0.95);
  background: rgba(255, 255, 255, 0.86);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    0 8px 18px -12px rgba(37, 99, 235, 0.35);
}

#assistant button[data-prompt]:active {
  transform: scale(0.97);
}

.mic-btn {
  border-color: rgba(255, 255, 255, 0.75);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(248, 250, 252, 0.5));
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.85);
}

#ai-submit {
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.28),
    0 12px 28px -14px rgba(37, 99, 235, 0.7);
}

#ai-submit:active {
  transform: scale(0.96);
}

.ai-textarea::-webkit-scrollbar {
  width: 6px;
}
.ai-textarea::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.is-shaking {
  animation: shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

/* Microphone */
.mic-btn {
  position: relative;
}

.mic-btn.is-listening {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fecaca;
}

.mic-btn.is-listening::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 2px solid rgba(239, 68, 68, 0.5);
  animation: micPulse 1.25s ease-out infinite;
  pointer-events: none;
}

@keyframes micPulse {
  0% {
    transform: scale(1);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

/* Typing indicator */
.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #2563eb;
  display: inline-block;
  animation: typingBounce 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}
.typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typingBounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   Buttons & cards
   -------------------------------------------------------------------------- */
.btn-shine::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -80%;
  width: 45%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transition: left 0.65s ease;
  pointer-events: none;
}

.btn-shine:hover::before {
  left: 135%;
}

.lift {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease,
    border-color 0.35s ease, background 0.35s ease;
}

.lift:hover {
  transform: translateY(-6px);
}

.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 2rem;
  left: 2rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.55), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.service-card:hover::after {
  opacity: 1;
}

.service-tile {
  border-color: rgba(255, 255, 255, 0.72);
  background: linear-gradient(145deg, rgba(248, 250, 252, 0.7), rgba(255, 255, 255, 0.46));
  -webkit-backdrop-filter: blur(12px) saturate(145%);
  backdrop-filter: blur(12px) saturate(145%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease,
    box-shadow 0.25s ease;
}

.service-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(191, 219, 254, 0.95);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.65));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 10px 22px -14px rgba(37, 99, 235, 0.3);
}

.service-tile:active {
  transform: scale(0.985);
}

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

/* --------------------------------------------------------------------------
   Footer, toast, back-to-top
   -------------------------------------------------------------------------- */
.footer-heading {
  position: relative;
  padding-bottom: 0.65rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff;
}

.footer-glass {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.68), rgba(15, 23, 42, 0.46));
  border-color: rgba(148, 163, 184, 0.2);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.12);
}

.footer-heading::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1.65rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #22d3ee);
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.1rem 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #94a3b8;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-link:hover {
  color: #fff;
  transform: translateX(-3px);
}

.footer-icon {
  flex-shrink: 0;
  color: #475569;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-link:hover .footer-icon {
  color: #60a5fa;
  transform: translateY(-1px) scale(1.06);
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(51, 65, 85, 0.8);
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease,
    border-color 0.25s ease, box-shadow 0.25s ease;
}

.social-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -12px rgba(37, 99, 235, 0.75);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 90;
  width: calc(100% - 2rem);
  max-width: 26rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.72));
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.16),
    0 20px 50px -20px rgba(2, 6, 23, 0.7);
  transform: translate(-50%, 16px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease,
    visibility 0.35s ease, border-color 0.25s ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

.toast[data-type="success"] {
  border-color: rgba(16, 185, 129, 0.38);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.16),
    0 0 0 4px rgba(16, 185, 129, 0.06),
    0 20px 50px -20px rgba(2, 6, 23, 0.7);
}

.toast[data-type="error"] {
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.16),
    0 0 0 4px rgba(244, 63, 94, 0.06),
    0 20px 50px -20px rgba(2, 6, 23, 0.7);
}

.toast[data-type="success"] .toast-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
}

.toast[data-type="error"] .toast-icon {
  background: rgba(244, 63, 94, 0.2);
  color: #fecdd3;
}

#to-top {
  display: none;
}

#to-top.is-visible {
  display: inline-flex;
}

#to-top:not(.is-visible) + .dock-divider {
  display: none;
}

/* --------------------------------------------------------------------------
   Editorial imagery
   -------------------------------------------------------------------------- */
.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  opacity: 0.26;
  filter: saturate(0.75) contrast(1.08);
  transform: scale(1.05);
  animation: heroDrift 26s ease-in-out infinite alternate;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 12, 23, 0.52) 0%, rgba(15, 23, 42, 0.7) 46%, #0f172a 100%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.25) 50%, rgba(15, 23, 42, 0.85) 100%);
}

@keyframes heroDrift {
  0% {
    transform: scale(1.05) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.12) translate3d(-1.5%, -1.5%, 0);
  }
}

.img-zoom {
  overflow: hidden;
}

.img-zoom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
}

.group:hover .img-zoom img,
.img-zoom:hover img {
  transform: scale(1.07);
}

.media-overlay {
  background:
    linear-gradient(180deg, rgba(7, 12, 23, 0.02) 0%, rgba(7, 12, 23, 0.35) 42%, rgba(7, 12, 23, 0.94) 100%);
}

.media-overlay-soft {
  background: linear-gradient(180deg, rgba(7, 12, 23, 0.05) 0%, rgba(15, 23, 42, 0.55) 100%);
}

.card-media {
  position: relative;
  height: 10.5rem;
  overflow: hidden;
}

.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
}

.group:hover .card-media img {
  transform: scale(1.08);
}

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 12, 23, 0.0) 18%, rgba(7, 12, 23, 0.18) 48%, rgba(7, 12, 23, 0.82) 100%);
}

.card-media--tall {
  height: 13rem;
}

.photo-credit {
  font-size: 0.65rem;
  color: #64748b;
}

/* --------------------------------------------------------------------------
   Assistant glow & micro-interactions
   -------------------------------------------------------------------------- */
.ai-halo {
  position: absolute;
  inset: -1.25rem;
  border-radius: 2.75rem;
  background: radial-gradient(closest-side, rgba(37, 99, 235, 0.26), transparent 72%);
  filter: blur(16px);
  opacity: 0.7;
  pointer-events: none;
  animation: aiBreathe 5.5s ease-in-out infinite;
}

@keyframes aiBreathe {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.025);
  }
}

#assistant.is-active .ai-shell {
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.52),
    0 0 0 4px rgba(37, 99, 235, 0.12),
    0 45px 100px -35px rgba(37, 99, 235, 0.72),
    0 25px 60px -40px rgba(2, 6, 23, 0.85);
}

#assistant.is-listening .ai-halo {
  background: radial-gradient(closest-side, rgba(16, 185, 129, 0.32), transparent 72%);
}

.btn-press {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease,
    background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn-press:hover {
  transform: translateY(-2px) scale(1.015);
}

.btn-press:active {
  transform: translateY(0) scale(0.955);
}

/* --------------------------------------------------------------------------
   Service finder / legal estimator
   -------------------------------------------------------------------------- */
.calc-shell {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.68));
  border-color: rgba(255, 255, 255, 0.78);
}

.calc-chip {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.46));
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.72),
    0 2px 10px rgba(2, 6, 23, 0.035);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease,
    box-shadow 0.25s ease, transform 0.25s ease;
}

.calc-chip:hover {
  border-color: rgba(191, 219, 254, 0.9);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.72));
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 10px 24px -16px rgba(37, 99, 235, 0.35);
}

.calc-chip:active {
  transform: scale(0.975);
}

.calc-chip.is-active {
  border-color: rgba(15, 23, 42, 0.9);
  background: linear-gradient(145deg, #1e293b, #0f172a);
  color: #fff;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.14),
    0 12px 30px -16px rgba(15, 23, 42, 0.55);
}

.calc-chip.is-active .calc-chip-icon {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.14);
  color: #93c5fd;
}

.calc-chip.is-active .calc-chip-note {
  color: #94a3b8;
}

.calc-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 0.55rem;
  border: 1px solid transparent;
  background: transparent;
  padding: 0.5rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #475569;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.calc-toggle:hover {
  background: #fff;
  color: #0f172a;
}

.calc-toggle.is-active {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 8px 18px -12px rgba(15, 23, 42, 0.6);
}

.calc-result {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.calc-result.is-updating {
  opacity: 0.35;
  transform: translateY(5px);
}

.calc-doc-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.5rem 0.65rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #cbd5e1;
}

/* --------------------------------------------------------------------------
   Testimonials carousel
   -------------------------------------------------------------------------- */
.carousel-track {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-card {
  scroll-snap-align: start;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035));
  border-color: rgba(255, 255, 255, 0.17);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  backdrop-filter: blur(26px) saturate(170%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.18);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease,
    transform 0.3s ease;
}

.carousel-card:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.26),
    0 20px 44px -22px rgba(0, 0, 0, 0.4);
}

.carousel-dot {
  height: 0.4rem;
  width: 0.4rem;
  border-radius: 999px;
  background: #cbd5e1;
  transition: width 0.3s ease, background 0.3s ease;
}

.carousel-dot.is-active {
  width: 1.5rem;
  background: #2563eb;
}

/* --------------------------------------------------------------------------
   FAQ accordion
   -------------------------------------------------------------------------- */
.faq-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.faq-item.is-open {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.86));
  border-color: rgba(191, 219, 254, 0.9);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 18px 40px -24px rgba(37, 99, 235, 0.28),
    0 8px 32px rgba(2, 6, 23, 0.06);
}

.faq-item.is-open .faq-panel {
  opacity: 1;
}

.faq-icon {
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
  background: #2563eb;
  color: #fff;
}

.faq-question {
  transition: color 0.2s ease;
}

.faq-item.is-open .faq-question {
  color: #1d4ed8;
}

/* --------------------------------------------------------------------------
   Authentication modal / user menu
   -------------------------------------------------------------------------- */
.auth-modal {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.auth-backdrop {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.auth-modal.is-open .auth-backdrop {
  opacity: 1;
}

.auth-dialog {
  min-width: 0;
  opacity: 0;
  transform: translateY(22px) scale(0.97);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

#auth-dialog > .grid,
#auth-dialog section,
#auth-dialog aside {
  min-width: 0;
}

.auth-modal.is-open .auth-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body.auth-open {
  overflow: hidden;
}

.auth-aside-glow {
  position: absolute;
  top: -8rem;
  right: -6rem;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  background: radial-gradient(closest-side, rgba(59, 130, 246, 0.55), transparent 70%);
  filter: blur(24px);
  pointer-events: none;
}

.auth-aside-glow::after {
  content: "";
  position: absolute;
  bottom: -12rem;
  left: -10rem;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  background: radial-gradient(closest-side, rgba(16, 185, 129, 0.25), transparent 70%);
}

.auth-aside-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to left, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 20%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 20%, #000 10%, transparent 72%);
  pointer-events: none;
}

.auth-panel-view {
  animation: authPanelIn 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.auth-step.is-entering {
  animation: authStepIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes authStepIn {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.auth-tabs {
  isolation: isolate;
}

.auth-tab {
  position: relative;
  z-index: 1;
  border-radius: 999px;
  padding: 0.62rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: #64748b;
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.auth-tab:hover {
  color: #1d4ed8;
}

.auth-tab.is-active {
  background: linear-gradient(145deg, #ffffff, #eff6ff);
  color: #1d4ed8;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 4px 14px -8px rgba(37, 99, 235, 0.45);
}

.auth-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #2563eb;
}

.auth-title {
  margin-top: 0.35rem;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.auth-subtitle {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  line-height: 1.75;
  color: #64748b;
}

.auth-step-label {
  flex-shrink: 0;
  border: 1px solid rgba(191, 219, 254, 0.8);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.8);
  padding: 0.3rem 0.65rem;
  font-size: 0.62rem;
  font-weight: 800;
  color: #2563eb;
}

.auth-field {
  min-width: 0;
}

.auth-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
  font-size: 0.7rem;
  font-weight: 800;
  color: #334155;
}

.auth-required {
  color: #e11d48;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 0.9rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(248, 250, 252, 0.46));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 1px 4px rgba(2, 6, 23, 0.025);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-input-wrap:focus-within {
  border-color: rgba(96, 165, 250, 0.9);
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    0 0 0 4px rgba(37, 99, 235, 0.1),
    0 8px 22px -16px rgba(37, 99, 235, 0.4);
}

.auth-input-icon {
  position: absolute;
  right: 0.85rem;
  width: 1rem;
  height: 1rem;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.2s ease;
}

.auth-input-wrap:focus-within .auth-input-icon {
  color: #2563eb;
}

.auth-input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  padding: 0.72rem 2.55rem 0.72rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0f172a;
  outline: none;
}

.auth-input::placeholder {
  font-weight: 400;
  color: #94a3b8;
}

.auth-input:focus {
  outline: none;
}

select.auth-input {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.auth-input-wrap:has(select)::after {
  content: "";
  position: absolute;
  left: 0.95rem;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid #94a3b8;
  border-bottom: 1.5px solid #94a3b8;
  transform: rotate(45deg);
  pointer-events: none;
}

.auth-input-wrap.has-eye .auth-input {
  padding-left: 2.55rem;
}

.auth-eye {
  position: absolute;
  left: 0.45rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 0.65rem;
  color: #94a3b8;
  transition: color 0.2s ease, background 0.2s ease;
}

.auth-eye:hover {
  background: rgba(239, 246, 255, 0.8);
  color: #2563eb;
}

.auth-field.is-invalid .auth-input-wrap {
  border-color: rgba(244, 63, 94, 0.65);
  background: rgba(255, 241, 242, 0.7);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.08);
}

.auth-field.is-invalid .auth-input-icon {
  color: #e11d48;
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.7rem;
  line-height: 1.6;
  color: #64748b;
  cursor: pointer;
}

.auth-check input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
  accent-color: #2563eb;
}

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  border-radius: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #2563eb, #4338ca);
  padding: 0.82rem 1rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.3),
    0 14px 30px -14px rgba(37, 99, 235, 0.7);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease,
    background 0.25s ease, opacity 0.25s ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #1d4ed8, #3730a3);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.34),
    0 18px 38px -16px rgba(37, 99, 235, 0.8);
}

.auth-submit:active {
  transform: scale(0.97);
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

.auth-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.95rem;
  padding: 0.82rem 1rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: #475569;
}

.auth-link {
  font-weight: 800;
  color: #2563eb;
  transition: color 0.2s ease;
}

.auth-link:hover {
  color: #1e40af;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.auth-legal {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(226, 232, 240, 0.7);
  font-size: 0.62rem;
  line-height: 1.7;
  color: #94a3b8;
}

.auth-legal svg {
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.auth-message {
  border-radius: 0.8rem;
  border: 1px solid transparent;
  padding: 0.65rem 0.8rem;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.6;
}

.auth-message.is-error {
  border-color: rgba(254, 205, 211, 0.9);
  background: rgba(255, 241, 242, 0.75);
  color: #be123c;
}

.auth-message.is-success {
  border-color: rgba(167, 243, 208, 0.8);
  background: rgba(236, 253, 245, 0.8);
  color: #047857;
}

.auth-message.is-pending {
  border-color: rgba(253, 230, 138, 0.9);
  background: rgba(255, 251, 235, 0.88);
  color: #92400e;
}

.auth-pending {
  margin-top: 1.25rem;
  border-radius: 1.35rem;
  border: 1px solid rgba(217, 180, 74, 0.42);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.95), transparent 45%),
    linear-gradient(145deg, rgba(255, 252, 244, 0.94), rgba(255, 246, 227, 0.82));
  box-shadow:
    0 24px 60px -34px rgba(120, 74, 10, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 1.3rem;
  text-align: center;
  animation: authPanelIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-pending.is-entering {
  animation: authPanelIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-pending__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #d9b44a, #b8860b);
  box-shadow:
    0 12px 24px -12px rgba(184, 134, 11, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.auth-pending__title {
  margin-top: 0.5rem;
  font-size: 1.25rem;
  font-weight: 900;
  color: #3f2d08;
}

.auth-pending__text {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  line-height: 1.85;
  color: #6b5320;
}

.auth-pending__text strong {
  color: #3f2d08;
  font-weight: 800;
}

.auth-pending__list {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  text-align: right;
}

.auth-pending__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(217, 180, 74, 0.2);
  background: rgba(255, 255, 255, 0.58);
  padding: 0.55rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.65;
  color: #5d4a20;
}

.auth-pending__list li svg {
  flex: 0 0 auto;
  margin-top: 0.12rem;
  color: #b8860b;
}

.auth-pending__note {
  margin: 0.9rem 0 0;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.7;
  color: #7a5b14;
}

.auth-pending__note span {
  border-radius: 999px;
  border: 1px solid rgba(217, 180, 74, 0.4);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.12rem 0.45rem;
  font-weight: 800;
  color: #8a6508;
}

.auth-pending .auth-submit {
  width: 100%;
  margin-top: 1rem;
}

.selected-role-banner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid rgba(191, 219, 254, 0.8);
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.9), rgba(255, 255, 255, 0.55));
  padding: 0.7rem 0.8rem;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.selected-role-banner .role-card-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.7rem;
}

.selected-role-banner strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  color: #0f172a;
}

.selected-role-banner span span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.62rem;
  color: #64748b;
}

.role-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(248, 250, 252, 0.32));
  padding: 0.7rem;
  text-align: right;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease,
    border-color 0.25s ease, box-shadow 0.25s ease;
}

.role-card:hover {
  transform: translateY(-2px);
  border-color: rgba(191, 219, 254, 0.95);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(239, 246, 255, 0.6));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    0 10px 24px -14px rgba(37, 99, 235, 0.35);
}

.role-card:active {
  transform: scale(0.98);
}

.role-card.is-active {
  border-color: rgba(37, 99, 235, 0.65);
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.7));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    0 0 0 3px rgba(37, 99, 235, 0.08);
}

.role-card-icon {
  display: grid;
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(239, 246, 255, 0.8);
  color: #2563eb;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.role-card-icon--emerald {
  background: rgba(236, 253, 245, 0.9);
  color: #059669;
}

.role-card-icon--amber {
  background: rgba(255, 251, 235, 0.9);
  color: #d97706;
}

.role-card-icon--indigo {
  background: rgba(238, 242, 255, 0.9);
  color: #4f46e5;
}

.role-card-icon--cyan {
  background: rgba(236, 254, 255, 0.9);
  color: #0891b2;
}

.role-card-icon--violet {
  background: rgba(245, 243, 255, 0.9);
  color: #7c3aed;
}

.role-card-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  color: #0f172a;
}

.role-card-desc {
  display: block;
  margin-top: 0.16rem;
  font-size: 0.6rem;
  line-height: 1.45;
  color: #64748b;
}

.auth-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.auth-plan {
  position: relative;
  cursor: pointer;
}

.auth-plan input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-plan span {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.45);
  padding: 0.6rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 800;
  color: #334155;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.auth-plan span small {
  font-size: 0.58rem;
  font-weight: 600;
  color: #94a3b8;
}

.auth-plan input:checked + span {
  border-color: rgba(37, 99, 235, 0.65);
  background: rgba(239, 246, 255, 0.9);
  color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.07);
}

.auth-upload {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px dashed rgba(96, 165, 250, 0.55);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.35);
  padding: 0.7rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.auth-upload:hover {
  border-color: rgba(37, 99, 235, 0.7);
  background: rgba(239, 246, 255, 0.55);
}

.auth-upload.is-ready {
  border-style: solid;
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(236, 253, 245, 0.65);
}

.auth-upload-icon {
  display: grid;
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border-radius: 0.7rem;
  background: rgba(239, 246, 255, 0.9);
  color: #2563eb;
}

.auth-upload.is-ready .auth-upload-icon {
  background: rgba(209, 250, 229, 0.9);
  color: #059669;
}

.auth-upload-copy {
  min-width: 0;
}

.auth-upload-title {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  color: #334155;
}

.auth-upload-name {
  display: block;
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.58rem;
  color: #94a3b8;
}

.auth-upload-preview {
  width: 2.4rem;
  height: 2.4rem;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: #fff;
}

.auth-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#user-actions {
  display: none;
}

@media (min-width: 1024px) {
  #user-actions.is-authed {
    display: flex;
  }
}

.user-menu {
  transform-origin: top left;
  animation: userMenuIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes userMenuIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 639px) {
  .auth-dialog {
    border-radius: 1.5rem;
  }

  .auth-title {
    font-size: 1.3rem;
  }

  .auth-subtitle {
    font-size: 0.72rem;
  }

  .role-card {
    padding: 0.62rem;
  }

  .role-card-icon {
    width: 2.05rem;
    height: 2.05rem;
  }

  .auth-legal {
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   Floating glass dock
   -------------------------------------------------------------------------- */
.dock-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
  color: #0f172a;
  box-shadow: 0 6px 16px -8px rgba(15, 23, 42, 0.35);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease,
    box-shadow 0.25s ease;
}

.dock-btn:hover {
  transform: translateY(-2px) scale(1.04);
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 12px 22px -12px rgba(37, 99, 235, 0.55);
}

.dock-btn--navy {
  border-color: rgba(15, 23, 42, 0.9);
  background: #0f172a;
  color: #fff;
}

.dock-btn--navy:hover {
  background: #1d4ed8;
  color: #fff;
}

.dock-btn--emerald {
  border-color: rgba(16, 185, 129, 0.6);
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

.dock-btn--emerald:hover {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
}

.dock-pulse {
  animation: dockPulse 2.8s ease-in-out infinite;
}

@keyframes dockPulse {
  0%,
  100% {
    box-shadow: 0 6px 18px -8px rgba(5, 150, 105, 0.55), 0 0 0 0 rgba(16, 185, 129, 0);
  }
  50% {
    box-shadow: 0 10px 24px -10px rgba(5, 150, 105, 0.7), 0 0 0 6px rgba(16, 185, 129, 0.07);
  }
}

.dock-label {
  position: absolute;
  left: calc(100% + 0.7rem);
  z-index: 2;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.65rem;
  background: #0f172a;
  padding: 0.4rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 12px 28px -14px rgba(7, 12, 23, 0.7);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.dock-btn:hover .dock-label,
.dock-btn:focus-visible .dock-label {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* --------------------------------------------------------------------------
   Floating quick actions
   -------------------------------------------------------------------------- */
.fab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 999px;
  box-shadow: 0 16px 35px -12px rgba(7, 12, 23, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.fab:hover {
  transform: translateY(-3px) scale(1.04);
}

.fab-label {
  position: absolute;
  left: calc(100% + 0.65rem);
  white-space: nowrap;
  border-radius: 0.65rem;
  background: #0f172a;
  color: #fff;
  padding: 0.45rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: 0 10px 25px -12px rgba(7, 12, 23, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.fab:hover .fab-label,
.fab:focus-visible .fab-label {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.fab-pulse::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.35);
  animation: fabPulse 2.6s ease-out infinite;
  z-index: -1;
}

@keyframes fabPulse {
  0% {
    transform: scale(1);
    opacity: 0.65;
  }
  70%,
  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

/* Scroll progress */
#scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 70;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, #2563eb, #60a5fa, #d9b44a);
  transition: width 0.1s linear;
  pointer-events: none;
}

/* Real-data source link */
.source-link {
  text-decoration: underline;
  text-decoration-color: rgba(148, 163, 184, 0.45);
  text-underline-offset: 0.18em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.source-link:hover {
  color: #1d4ed8;
  text-decoration-color: #1d4ed8;
}

/* --------------------------------------------------------------------------
   Accessibility / reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
