:root {
  /* EU Design System — Primary Blue scale */
  --navy: #051036;
  --navy-light: #0A1F6C;
  --blue-deep: #0F2FA2;
  --blue-mid: #143FD9;
  --blue-bright: #3860ED;
  /* EU Design System — Secondary Amber scale */
  --yellow: #FFBE5C;
  --yellow-dark: #FF9D0A;
  /* Neutrals */
  --white: #ffffff;
  --gray-50: #F8F9FD;
  --gray-100: #F3F5FB;
  --gray-200: #E0E5F5;
  --gray-400: #99AACC;
  --gray-600: #546FA6;
  --gray-800: #26324B;
  --ink: #26324B;
  /* Interactive */
  --accent: #3860ED;
  --accent-hover: #0F2FA2;
  /* EU Branding */
  --eu-blue: #004494;
  --eu-gold: #FFBE5C;
  /* Extended palette tokens */
  --eu-blue-20: #D8E0FB;
  --eu-amber-20: #FFF2DE;
  --eu-bg: #FCFCFC;
  /* Panels */
  --panel-bg: rgba(255, 255, 255, 0.94);
  --panel-border: rgba(38, 50, 75, 0.10);
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "DM Sans", Arial, Helvetica, sans-serif;
  background: var(--eu-bg);
  background-image:
    radial-gradient(circle at 20% 80%, rgba(56, 96, 237, 0.015), transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 190, 92, 0.01), transparent 50%);
  -webkit-font-smoothing: antialiased;
}

/* ===================================================
   KEYFRAME ANIMATIONS
   =================================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroEntrance {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(6px, -10px) rotate(2deg); }
  50% { transform: translate(-4px, -18px) rotate(-1deg); }
  75% { transform: translate(8px, -8px) rotate(1.5deg); }
}

@keyframes floatReverse {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-8px, -6px) rotate(-2deg); }
  50% { transform: translate(5px, -14px) rotate(1.5deg); }
  75% { transform: translate(-6px, -10px) rotate(-1deg); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(5, 16, 54, 0.05); }
  50% { box-shadow: 0 4px 28px rgba(56, 96, 237, 0.10); }
}

@keyframes searchGlow {
  0%, 100% {
    box-shadow: 0 4px 24px rgba(5, 16, 54, 0.06);
  }
  50% {
    box-shadow: 0 6px 32px rgba(56, 96, 237, 0.08), 0 0 0 2px rgba(56, 96, 237, 0.03);
  }
}

@keyframes chipFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rotateShape {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===================================================
   NAVBAR
   =================================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: none;
  padding: 0 1.5rem;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
  transition: background 200ms ease, box-shadow 200ms ease;
}

/* EU gradient stripe — rendered as a pseudo-element for cross-browser reliability */
.navbar::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--eu-blue) 0%,
    var(--blue-bright) 35%,
    var(--eu-gold) 50%,
    var(--blue-bright) 65%,
    var(--eu-blue) 100%
  );
  opacity: 0.85;
}

.navbar.navbar-scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 2px 16px rgba(5, 16, 54, 0.06),
    0 0 0 1px rgba(5, 16, 54, 0.02);
}

.navbar.navbar-scrolled::after {
  opacity: 1;
}

.navbar-inner {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.navbar-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.navbar-brand:hover .navbar-logo {
  transform: scale(1.06);
}

.navbar-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: color 160ms ease;
}

.navbar-title:hover {
  color: var(--accent);
}

.navbar-title-eu {
  color: var(--eu-gold);
  font-weight: 800;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 160ms ease, background 160ms ease;
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover {
  color: var(--navy);
  background: var(--gray-50);
}

.nav-link svg {
  opacity: 0.5;
  transition: opacity 160ms ease;
}

.nav-link:hover svg {
  opacity: 0.8;
}

.language-switcher {
  position: relative;
}

.i18n-pending .language-switcher-toggle {
  visibility: hidden;
}

.i18n-pending .language-switcher-menu {
  display: none !important;
}

.i18n-pending [data-i18n],
.i18n-pending [data-i18n-html] {
  visibility: hidden;
}

.language-switcher-toggle {
  min-width: 140px;
  justify-content: space-between;
}

.language-switcher-flag {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  border: 1px solid var(--gray-200);
  object-fit: cover;
  flex-shrink: 0;
}

.language-switcher-label {
  font-size: 0.8rem;
  color: inherit;
}

.language-switcher-toggle[aria-expanded="true"] {
  color: var(--navy);
  background: var(--gray-50);
}

.language-switcher-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  width: 260px;
  max-height: 300px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(5, 16, 54, 0.12);
  z-index: 120;
}

.language-switcher-menu[hidden] {
  display: none;
}

.language-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid var(--gray-200);
  background: var(--white);
  border-radius: 8px;
  padding: 0.35rem 0.25rem;
  cursor: pointer;
  color: var(--gray-600);
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.language-option:hover {
  color: var(--navy);
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.language-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.language-option--active {
  border-color: var(--accent);
  background: var(--eu-blue-20);
  color: var(--navy);
}

.language-option__flag {
  width: 22px;
  height: 16px;
  border-radius: 2px;
  border: 1px solid var(--gray-200);
  object-fit: cover;
}

.language-option__code {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.back-btn {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  font-size: 0.82rem;
  border: 1px solid var(--gray-200);
}

.back-btn:hover {
  background: var(--gray-200);
  color: var(--accent);
  border-color: var(--gray-200);
}

.navbar-brand-home {
  display: inline-flex;
  text-decoration: none;
}

.navbar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  align-items: flex-start;
}

.navbar-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.navbar-subtitle {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  letter-spacing: 0.01em;
  align-self: flex-end;
}

.navbar-brand > .beta-badge {
  margin-left: -0.3rem;
  align-self: flex-start;
  margin-top: 0.18rem;
}

.navbar-inari-logo {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  border-radius: 50%;
  opacity: 0.7;
  transition: opacity 160ms ease;
}

.navbar-subtitle:hover .navbar-inari-logo {
  opacity: 1;
}

.navbar-inari-link {
  color: var(--gray-600);
  text-decoration: none;
  transition: color 160ms ease;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
}

.navbar-inari-link:hover {
  color: var(--accent);
}

.brand-inari-highlight {
  color: #DC9852;
}

.brand-solutions {
  color: #2F2B36;
}

.site-footer .brand-solutions {
  color: var(--white);
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(56, 96, 237, 0.08), rgba(56, 96, 237, 0.04));
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.12rem 0.36rem;
  border-radius: 4px;
  border: 1px solid rgba(56, 96, 237, 0.12);
  white-space: nowrap;
}

/* ===================================================
   HERO
   =================================================== */

.hero-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 60% at 20% 0%, rgba(56, 96, 237, 0.10), transparent 50%),
    radial-gradient(ellipse 80% 50% at 80% 10%, rgba(56, 96, 237, 0.06), transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(255, 190, 92, 0.05), transparent 30%),
    linear-gradient(175deg, var(--gray-100) 0%, var(--gray-50) 40%, var(--eu-blue-20) 100%);
  padding: 3.5rem 1.5rem 2.5rem;
  text-align: center;
}

/* Floating geometric decorations */
.hero-shape {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform;
}

.hero-shape-1 {
  width: 200px;
  height: 200px;
  border: none;
  border-radius: 0;
  top: 5%;
  right: 5%;
  background-image: radial-gradient(circle, rgba(56, 96, 237, 0.12) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  opacity: 0.5;
  animation: float 12s ease-in-out infinite;
}

.hero-shape-2 {
  width: 120px;
  height: 120px;
  background: none;
  border: 2.5px solid rgba(255, 190, 92, 0.18);
  bottom: 10%;
  left: 5%;
  animation: floatReverse 14s ease-in-out infinite;
}

.hero-inner {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Staggered entrance animations */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #0F2FA2, #3860ED);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.8rem;
  box-shadow: 0 2px 12px rgba(56, 96, 237, 0.2);
  animation: heroEntrance 0.7s ease both;
  animation-delay: 0.1s;
}

.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.035em;
  color: var(--navy);
  margin: 0 0 1.2rem;
  animation: heroEntrance 0.7s ease both;
  animation-delay: 0.25s;
}

.hero-title-accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--gray-600);
  margin-left: auto;
  margin-right: auto;
  animation: heroEntrance 0.7s ease both;
  animation-delay: 0.4s;
}

/* Stat Cards — inline style */
.stat-cards {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 0;
  animation: heroEntrance 0.7s ease both;
  animation-delay: 0.55s;
}

.stat-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 96, 237, 0.08);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.8rem;
  text-align: center;
  flex: 1;
  min-width: 110px;
  max-width: 150px;
  box-shadow: 0 2px 16px rgba(5, 16, 54, 0.05);
  transition: transform 250ms ease, box-shadow 250ms ease;
}

.stat-card:nth-child(1) { border-top: 3px solid var(--accent); }
.stat-card:nth-child(2) { border-top: 3px solid var(--yellow); }
.stat-card:nth-child(3) { border-top: 3px solid var(--blue-deep); }

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(5, 16, 54, 0.08);
}

.stat-icon {
  color: var(--gray-400);
  margin-bottom: 0.35rem;
}

.stat-card:nth-child(1) .stat-icon { color: var(--accent); }
.stat-card:nth-child(2) .stat-icon { color: var(--yellow-dark); }
.stat-card:nth-child(3) .stat-icon { color: var(--blue-deep); }

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.1rem;
}

/* ===================================================
   SEARCH BAR
   =================================================== */

.search-section {
  position: relative;
  padding: 3rem 1.5rem 2.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeInUp 0.7s ease both;
  animation-delay: 0.7s;
}

.search-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    var(--eu-blue) 0%,
    var(--blue-bright) 35%,
    var(--eu-gold) 50%,
    var(--blue-bright) 65%,
    var(--eu-blue) 100%
  );
  z-index: 1;
}

.search-backdrop {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(56, 96, 237, 0.06) 0%,
    rgba(56, 96, 237, 0.03) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.search-helper-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0 0 1rem;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.7s ease both;
  animation-delay: 0.65s;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: 60px;
  padding: 0.5rem 0.55rem 0.5rem 1.5rem;
  width: 100%;
  max-width: 780px;
  position: relative;
  z-index: 1;
  transition: border-color 250ms ease, box-shadow 250ms ease, transform 250ms ease;
  box-shadow: 0 4px 24px rgba(5, 16, 54, 0.06), 0 0 0 1px rgba(56, 96, 237, 0.04);
  animation: searchGlow 6s ease-in-out infinite;
}

.search-bar:focus-within {
  border-color: var(--blue-bright);
  box-shadow:
    0 8px 40px rgba(56, 96, 237, 0.16),
    0 0 0 4px rgba(56, 96, 237, 0.07);
  animation: none;
  transform: scale(1.015);
}

.search-icon {
  color: var(--blue-bright);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  padding: 0.75rem 0.85rem;
  min-height: 48px;
}

.search-input::placeholder {
  color: var(--gray-400);
  transition: opacity 400ms ease, color 400ms ease;
}

.search-input:focus::placeholder {
  opacity: 0.5;
  color: var(--blue-mid);
}

.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--yellow);
  color: var(--navy);
  border: none;
  border-radius: 50px;
  padding: 0.8rem 1.8rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 190, 92, 0.3);
}

.search-btn:hover {
  background: var(--yellow-dark);
  box-shadow: 0 4px 16px rgba(255, 190, 92, 0.4);
  transform: translateY(-1px);
}

.search-btn:active {
  transform: scale(0.97) translateY(0);
  box-shadow: 0 1px 4px rgba(255, 190, 92, 0.2);
}

.search-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--gray-200);
  max-width: 780px;
  position: relative;
  z-index: 1;
}

.search-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 50px;
  padding: 0.45rem 1rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  animation: chipFadeIn 0.5s ease both;
}

.search-chip:nth-child(1) { animation-delay: 0.9s; }
.search-chip:nth-child(2) { animation-delay: 1.0s; }
.search-chip:nth-child(3) { animation-delay: 1.1s; }
.search-chip:nth-child(4) { animation-delay: 1.2s; }

.search-chip:hover {
  border-color: var(--blue-bright);
  color: var(--accent);
  background: rgba(56, 96, 237, 0.04);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 2px 8px rgba(56, 96, 237, 0.08);
}

.search-chip:active {
  transform: scale(0.97);
}

.search-chip svg {
  color: var(--gray-400);
  flex-shrink: 0;
}

.search-chip:hover svg {
  color: var(--blue-bright);
}

/* ===================================================
   CREDIBILITY BAR
   =================================================== */

.credibility-bar {
  text-align: center;
  padding: 1.2rem 1.5rem;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.credibility-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-600);
  margin: 0;
}

.credibility-text a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.credibility-text a:hover {
  text-decoration: underline;
}

.credibility-text svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* ===================================================
   HOW IT WORKS
   =================================================== */

.how-section {
  background: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%);
  padding: 4rem 1.5rem 4.5rem;
  text-align: center;
  border-top: 1px solid var(--gray-200);
}

.how-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
}

.how-subtitle {
  font-size: 0.92rem;
  color: var(--blue-bright);
  margin: 0 0 3rem;
  font-weight: 500;
}

.how-cards {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
}

.how-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  font-family: "JetBrains Mono", monospace;
  box-shadow: 0 0 0 4px rgba(56, 96, 237, 0.1);
}

.how-card-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  padding: 0 0.4rem;
  align-self: center;
  flex-shrink: 0;
}

.how-card {
  flex: 1;
  max-width: 240px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 2rem 1.3rem 1.8rem;
  text-align: center;
  transition: transform 300ms ease, box-shadow 300ms ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(5, 16, 54, 0.04);
  /* Scroll reveal: start hidden */
  opacity: 0;
  transform: translateY(20px);
}

.how-card::before {
  content: "";
  position: absolute;
  top: -12px;
  right: -12px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.5;
}

.how-card:nth-child(odd)::before {
  background: rgba(56, 96, 237, 0.06);
}

.how-card:nth-child(even)::before {
  background: rgba(255, 190, 92, 0.08);
}

/* Scroll-triggered visible state */
.how-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  animation: cardReveal 0.5s ease both;
}

/* Stagger delays set via JS (nth-of-type unreliable with mixed siblings) */

.how-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(5, 16, 54, 0.08);
  border-color: rgba(56, 96, 237, 0.15);
}

.how-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.35rem;
}

.how-icon-blue {
  background: linear-gradient(135deg, #D8E0FB, #E0E5F5);
  color: var(--accent);
}

.how-icon-yellow {
  background: linear-gradient(135deg, #FFF2DE, #FFE5BE);
  color: var(--navy);
}

.how-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.55rem;
}

.how-card-text {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--gray-600);
  margin: 0;
}

@media (max-width: 768px) {
  .how-cards {
    flex-wrap: wrap;
    gap: 1.2rem;
    justify-content: center;
  }
  .how-card {
    flex: 0 1 calc(50% - 0.6rem);
    max-width: none;
  }
  .how-card-connector {
    display: none;
  }
}

@media (max-width: 480px) {
  .how-section {
    padding: 2.5rem 1rem 3rem;
  }
  .how-card {
    flex: 1 1 100%;
  }
}

/* ===================================================
   FOOTER
   =================================================== */

.site-footer {
  background: linear-gradient(180deg, #071542 0%, var(--navy) 100%);
  color: rgba(255, 255, 255, 0.8);
  padding: 3.5rem 1.5rem 0;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
  max-width: 440px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.footer-brand-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  font-family: 'Roboto', sans-serif;
}

.footer-brand-link {
  text-decoration: none !important;
  color: inherit;
}

.footer-brand-link * {
  text-decoration: none !important;
}

.footer-brand-link:visited,
.footer-brand-link:hover,
.footer-brand-link:focus,
.footer-brand-link:active {
  text-decoration: none !important;
  color: inherit;
}

.footer-desc {
  font-size: 0.82rem;
  line-height: 1.6;
  margin: 0;
}

.footer-tech {
  text-align: right;
}

.footer-tech-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 0.6rem;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

.footer-badge {
  display: inline-block;
  background: var(--navy-light);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-badge-link {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  transition: color 160ms ease, background 160ms ease;
  cursor: pointer;
}

.footer-badge-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.footer-hackathon {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
}

.footer-inari-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.footer-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-cta-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

.footer-cta-btn {
  display: inline-block;
  background: var(--eu-gold);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.55rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 160ms ease, transform 160ms ease;
  box-shadow: 0 2px 12px rgba(255, 190, 92, 0.25);
}

.footer-cta-btn:hover {
  background: #ffc96e;
  transform: scale(1.03);
  color: var(--navy);
}

.footer-bottom {
  padding: 1.4rem 0;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
    gap: 1.5rem;
  }
  .footer-tech {
    text-align: left;
  }
  .footer-badges {
    justify-content: flex-start;
  }
}

/* ===================================================
   LANDING / APP VIEW TRANSITION
   =================================================== */

#landingView {
  opacity: 1;
  max-height: 10000px;
  overflow: hidden;
  transition: opacity 300ms ease, transform 300ms ease, max-height 300ms ease;
}

#landingView.landing-hidden {
  opacity: 0;
  max-height: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

.app-view {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 300ms ease, transform 300ms ease, max-height 300ms ease;
}

.app-view-hidden {
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  transform: translateY(10px);
}

.app-view-visible {
  display: flex;
  flex-direction: column;
  opacity: 1;
  max-height: 10000px;
  pointer-events: auto;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: visible;
  transform: translateY(0);
}

/* ===================================================
   APP SHELL
   =================================================== */

.navbar-app {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  border-image: none;
  box-shadow: none;
}

.app-shell {
  max-width: 780px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  flex: 1 0 auto;
  min-height: 0;
}

.app-view .site-footer {
  margin-top: auto;
}

/* ===================================================
   PROGRESS STEPPER
   =================================================== */

.stepper {
  padding: 0.25rem 0 0;
}

.stepper-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  flex-shrink: 0;
}

.stepper-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: transform 300ms ease, box-shadow 300ms ease, opacity 300ms ease, filter 300ms ease;
  position: relative;
}

.stepper-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--gray-600);
  text-align: center;
  white-space: nowrap;
  transition: color 300ms ease, font-weight 300ms ease;
}

/* --- Connector line --- */
.stepper-connector {
  flex: 1;
  height: 2px;
  min-width: 16px;
  max-width: 72px;
  background: var(--gray-200);
  border-radius: 1px;
  margin: 0 0.3rem;
  /* vertically center with icon (40px icon / 2 = 20px from top) */
  margin-top: 19px;
  transition: background 300ms ease;
}

/* --- State: Upcoming --- */
.stepper-step--upcoming .stepper-icon {
  opacity: 0.4;
  filter: grayscale(50%);
}

.stepper-step--upcoming .stepper-label {
  color: var(--gray-400);
}

/* --- State: Active --- */
.stepper-step--active .stepper-icon {
  transform: scale(1.12);
  box-shadow: 0 0 0 3px rgba(56, 96, 237, 0.15), 0 4px 12px rgba(56, 96, 237, 0.12);
  animation: stepperGlow 2.4s ease-in-out infinite;
}

.stepper-step--active .stepper-label {
  color: var(--accent);
  font-weight: 700;
}

/* --- State: Completed --- */
.stepper-step--completed .stepper-icon::after {
  content: "\2713";
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 0.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(56, 96, 237, 0.3);
}

.stepper-step--completed .stepper-label {
  color: var(--accent);
}

/* Connector turns accent when preceding step is completed */
.stepper-step--completed + .stepper-connector {
  background: var(--accent);
}

@keyframes stepperGlow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(56, 96, 237, 0.15), 0 4px 12px rgba(56, 96, 237, 0.12); }
  50%      { box-shadow: 0 0 0 5px rgba(56, 96, 237, 0.10), 0 4px 20px rgba(56, 96, 237, 0.18); }
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .stepper-list {
    gap: 0;
  }

  .stepper-connector { display: none; }

  .stepper-step {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
  }

  .stepper-icon {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  .stepper-label {
    font-size: 0.58rem;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stepper-step--active .stepper-icon { animation: none !important; }
  .stepper-icon, .stepper-label, .stepper-connector { transition: none !important; }
  .input-bar-wrapper.input-ready .input-follow-up-label,
  .input-bar-wrapper.input-ready .chat-bar { animation: none !important; }
}

@media (max-width: 480px) {
  .input-follow-up-label { display: none; }
}

/* ===================================================
   INPUT CARD
   =================================================== */

.input-bar-wrapper {
  position: sticky;
  bottom: 1rem;
  z-index: 10;
  margin: 1.5rem 0 0.5rem;
  padding: 0;
}

.input-follow-up-label {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  margin: 0.2rem 0 0.35rem 1.5rem;
}

/* Entrance animation: label fades in first, then the bar rises up */
.input-bar-wrapper.input-ready .input-follow-up-label {
  animation: inputLabelReveal 350ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.input-bar-wrapper.input-ready .chat-bar {
  animation: inputBarReveal 500ms cubic-bezier(0.34, 1.56, 0.64, 1) 100ms both;
}

@keyframes inputLabelReveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes inputBarReveal {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  60% {
    opacity: 1;
    transform: translateY(-2px) scale(1.005);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chat-bar {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: 60px;
  padding: 0.5rem 0.55rem 0.5rem 1.5rem;
  width: 100%;
  transition: border-color 250ms ease, box-shadow 250ms ease;
}

.chat-bar:focus-within {
  border-color: var(--blue-bright);
  box-shadow:
    0 8px 40px rgba(56, 96, 237, 0.16),
    0 0 0 4px rgba(56, 96, 237, 0.07);
}

/* ===================================================
   QUESTION ECHO
   =================================================== */

.question-echo {
  border-radius: 12px;
  padding: 0.7rem 1.2rem;
  margin-bottom: 0.5rem;
  background: rgba(5, 16, 54, 0.025);
  max-height: 280px;
  transition: opacity 260ms ease, max-height 260ms ease, padding 260ms ease, margin 260ms ease, transform 260ms ease;
}

.question-echo-label {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  margin-bottom: 0.25rem;
}

.question-echo-text {
  font-size: 0.93rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--gray-600);
  margin: 0;
}

/* ===================================================
   REPLY CARD
   =================================================== */

.reply-card {
  background: var(--white);
  border: 1px solid var(--panel-border);
  border-left: 4px solid var(--yellow);
  border-radius: 16px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 2px 8px rgba(5, 16, 54, 0.03);
  max-height: 1200px;
  transition: opacity 260ms ease, transform 260ms ease, max-height 260ms ease, padding 260ms ease, margin 260ms ease, border-width 260ms ease;
}

.reply-hidden {
  opacity: 0;
  max-height: 0;
  transform: translateY(-4px);
  overflow: hidden;
  padding: 0;
  margin: 0;
  border-width: 0;
  pointer-events: none;
}

.reply-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.reply-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(160deg, #FFF2DE, #FFE5BE);
  color: #8F5600;
  border: 1px solid #FFBE5C;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  font-family: "JetBrains Mono", monospace;
  flex-shrink: 0;
}

.reply-sender {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--eu-blue);
}

.reply-sender-eu {
  color: var(--eu-gold);
  font-weight: 800;
}

.reply-body {
  font-size: 0.96rem;
  line-height: 1.55;
  min-height: 1.55em;
  color: var(--ink);
  white-space: normal;
  word-break: break-word;
}

.reply-body p:last-child { margin-bottom: 0; }
.reply-body a { color: var(--accent); text-decoration: underline; }
.reply-body code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.84em;
  background: rgba(5, 16, 54, 0.05);
  padding: 0.1rem 0.3rem;
  border-radius: 6px;
}
.reply-body pre {
  background: rgba(5, 16, 54, 0.05);
  padding: 0.6rem;
  border-radius: 10px;
  overflow-x: auto;
}
.reply-body ul, .reply-body ol { padding-left: 1.4rem; }
.reply-body li { margin-bottom: 0.25rem; }

/* ===================================================
   RESULTS SECTION
   =================================================== */

.results-section {
  max-height: 10000px;
  transition: opacity 260ms ease, transform 260ms ease, max-height 260ms ease, padding 260ms ease, margin 260ms ease, border-width 260ms ease;
  transform-origin: top;
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.results-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-600);
}

.results-meta-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.results-filters-btn {
  background: var(--yellow-dark);
  color: var(--white);
  border: 1px solid var(--yellow-dark);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.results-filters-btn:hover {
  background: var(--yellow);
  border-color: var(--yellow);
}

.sort-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sort-pill {
  background: var(--gray-100);
  border: 1px solid var(--panel-border);
  border-radius: 50px;
  padding: 0.35rem 0.9rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: background 160ms, color 160ms, border-color 160ms;
}

.sort-pill-reset {
  padding: 0.35rem 0.72rem;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}

.sort-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sort-pill--active,
.sort-pill--active:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

/* Result Cards */
.results-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.results-cards-grid.results-cards--loading {
  cursor: not-allowed;
}

.results-cards-grid.results-cards--loading,
.results-cards-grid.results-cards--loading .result-card,
.results-cards-grid.results-cards--loading .result-card * {
  cursor: not-allowed !important;
}

.results-cards-grid.results-cards--loading .result-card,
.results-cards-grid.results-cards--loading .result-open-link {
  pointer-events: none;
}

.result-card {
  background: var(--white);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.result-card:hover {
  box-shadow: 0 4px 16px rgba(5, 16, 54, 0.06);
  transform: translateY(-1px);
}

.result-card--highlighted {
  border-left: 4px solid var(--accent);
  background: #F3F5FB;
}

.result-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.result-card-title-wrap {
  flex: 1;
  min-width: 0;
}

.result-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.result-card:hover .result-card-title {
  color: var(--accent);
}

.result-card-publisher {
  font-size: 0.8rem;
  color: var(--gray-600);
}

.result-star {
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.result-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.result-card-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.provenance-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
  background: var(--gray-100);
  color: var(--navy);
}

.provenance-flag {
  width: 1rem;
  height: 0.75rem;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(38, 50, 75, 0.08);
}

.format-pill {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
  background: var(--gray-100);
  color: var(--gray-600);
}

.format-pill--highlighted {
  background: #D8E0FB;
  color: var(--accent);
}

.result-open-link {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  transition: background 160ms, color 160ms;
  white-space: nowrap;
}

.result-open-link:hover {
  background: var(--accent);
  color: var(--white);
}

.no-results-msg {
  font-size: 0.85rem;
  color: var(--gray-400);
  text-align: center;
  padding: 2rem 0;
}

.results-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.6rem 0 0.4rem;
  margin-top: 0.5rem;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 0.75rem;
}

.results-section-header:first-child {
  margin-top: 0;
}

.results-section-header--highlighted {
  color: var(--accent);
}

.results-section-header--other {
  color: var(--gray-600);
}

.results-section-icon {
  font-size: 0.85rem;
}

.results-cards-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* ===================================================
   FILTERS CARD
   =================================================== */

.filters-card {
  background: var(--white);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 2px 8px rgba(5, 16, 54, 0.03);
  max-height: 2600px;
  transition: opacity 260ms ease, transform 260ms ease, max-height 260ms ease, padding 260ms ease, margin 260ms ease, border-width 260ms ease;
  transform-origin: top;
}

.filters-hidden {
  opacity: 0;
  max-height: 0;
  transform: translateY(-4px);
  overflow: hidden;
  padding: 0;
  margin: 0;
  border-width: 0;
  pointer-events: none;
}

.filters-visible {
  opacity: 1;
  max-height: 2600px;
  transform: translateY(0);
  pointer-events: auto;
}

.filters-heading {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.4rem;
}

.filters-hint {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--gray-400);
  margin: 0 0 0.75rem;
}

.filters-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.apply-filters-btn {
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 0.55rem 1.4rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease;
}

.apply-filters-btn:hover {
  background: var(--accent-hover);
}

.apply-filters-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chat-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  padding: 0.75rem 0.85rem;
  min-height: 48px;
}

.chat-input::placeholder {
  color: var(--gray-400);
  transition: opacity 400ms ease, color 400ms ease;
}

.chat-input:focus::placeholder {
  opacity: 0.5;
  color: var(--blue-mid);
}

.chat-ask-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--yellow);
  color: var(--navy);
  border: none;
  border-radius: 50px;
  padding: 0.8rem 1.8rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 190, 92, 0.3);
}

.chat-ask-btn:hover {
  background: var(--yellow-dark);
  box-shadow: 0 4px 16px rgba(255, 190, 92, 0.4);
  transform: translateY(-1px);
}

.chat-ask-btn:active {
  transform: scale(0.97) translateY(0);
  box-shadow: 0 1px 4px rgba(255, 190, 92, 0.2);
}

.chat-ask-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.chat-bar:has(.chat-input:disabled) {
  cursor: not-allowed;
}

.chat-input:disabled {
  cursor: not-allowed;
}

/* (Old chat window/bubble styles removed — replaced by reply-card) */

/* ===================================================
   BUTTON LOADING STATE
   =================================================== */

.btn.is-loading,
.search-btn.is-loading,
.chat-ask-btn.is-loading {
  position: relative;
  padding-right: 2.2rem;
  cursor: wait;
  opacity: 0.85;
}

.btn.is-loading::after,
.search-btn.is-loading::after,
.chat-ask-btn.is-loading::after {
  content: "";
  position: absolute;
  right: 0.72rem;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: currentColor;
  animation: button-spin 0.7s linear infinite;
}

@keyframes button-spin {
  to { transform: rotate(360deg); }
}

/* Results visibility (class-scoped for reuse) */
.results-visible {
  opacity: 1;
  max-height: 10000px;
  transform: translateY(0);
  overflow: visible;
  pointer-events: auto;
}

.results-hidden {
  opacity: 0;
  transform: translateY(-4px);
  max-height: 0;
  overflow: hidden;
  padding: 0 !important;
  margin: 0 !important;
  border-width: 0;
  pointer-events: none;
}

/* ===================================================
   FACETS / FILTERS (preserved from original)
   =================================================== */

.facet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.facet-card {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 0.65rem;
  background: var(--gray-50);
}

.facet-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 0.35rem;
}

.facet-select {
  font-size: 0.78rem;
  white-space: normal;
}

.facet-select option {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* (Old table AI highlight / mark-col styles removed — replaced by result-card styles) */

/* ===================================================
   RESPONSIVE
   =================================================== */

@media (max-width: 640px) {
  .hero-section {
    padding: 2rem 1rem 1.5rem;
  }

  .hero-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .hero-subtitle {
    font-size: 0.92rem;
    max-width: 100%;
  }

  .hero-shape {
    display: none;
  }

  .stat-cards {
    gap: 1.5rem;
  }

  .stat-card {
    flex: 1;
    min-width: 0;
    max-width: none;
    padding: 0.8rem 1rem;
  }

  .search-section {
    animation-delay: 0.4s;
  }

  .search-backdrop {
    display: none;
  }

  .search-helper-text {
    font-size: 0.82rem;
    animation-delay: 0.35s;
  }

  .search-bar {
    flex-direction: row;
    flex-wrap: wrap;
    border-radius: 32px;
    padding: 0.4rem 0.5rem 0.4rem 0.75rem;
    animation: none;
    max-width: 100%;
    gap: 0;
  }

  .search-icon img {
    width: 32px;
    height: 32px;
  }

  .search-input {
    text-align: left;
    font-size: 0.93rem;
    min-height: 42px;
    padding: 0.5rem 0.6rem;
    flex: 1;
    min-width: 0;
  }

  .search-btn {
    width: auto;
    padding: 0.55rem 1.2rem;
    font-size: 0.85rem;
    border-radius: 50px;
    margin-left: auto;
    flex-shrink: 0;
  }

  .search-chips {
    gap: 0.45rem;
  }

  .search-chip {
    font-size: 0.72rem;
    padding: 0.4rem 0.8rem;
  }

  .credibility-text {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    line-height: 1.5;
  }

  .chat-bar {
    flex-direction: row;
    flex-wrap: wrap;
    border-radius: 32px;
    padding: 0.4rem 0.5rem 0.4rem 0.75rem;
    gap: 0;
  }

  .chat-bar .search-icon img {
    width: 32px;
    height: 32px;
  }

  .chat-input {
    flex: 1;
    min-width: 0;
    font-size: 0.93rem;
  }

  .chat-ask-btn {
    width: auto;
    padding: 0.55rem 1.2rem;
    font-size: 0.85rem;
    border-radius: 50px;
    margin-left: auto;
    flex-shrink: 0;
  }

  .navbar-links .nav-link:not(.back-btn):not(.language-switcher-toggle) {
    display: none;
  }

  .back-btn {
    order: 2;
  }

  .back-btn span {
    display: none;
  }

  .navbar-brand {
    gap: 0.4rem;
  }

  .navbar-logo img {
    width: 26px;
    height: 26px;
  }

  .navbar-title {
    font-size: 0.78rem;
  }

  .navbar-subtitle {
    font-size: 0.6rem;
  }

  .navbar-brand > .beta-badge {
    font-size: 0.4rem;
    padding: 0.08rem 0.28rem;
    margin-left: -0.15rem;
  }

  .navbar-links {
    gap: 0.75rem;
  }

  .language-switcher-toggle {
    min-width: 64px;
  }

  .language-switcher-label {
    display: none;
  }

  .language-switcher-menu {
    right: -0.35rem;
    width: min(260px, calc(100vw - 1.2rem));
  }

  .footer-cta {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .search-bar {
    border-radius: var(--radius-xl);
    padding: 0.35rem 0.5rem 0.35rem 0.65rem;
  }

  .search-icon img {
    width: 28px;
    height: 28px;
  }

  .search-input {
    font-size: 0.88rem;
    padding: 0.4rem 0.5rem;
    min-height: 38px;
  }

  .search-btn {
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
  }

  .search-btn span {
    display: none;
  }

  .search-btn svg {
    width: 16px;
    height: 16px;
  }

  .chat-bar {
    border-radius: var(--radius-xl);
    padding: 0.35rem 0.5rem 0.35rem 0.65rem;
  }

  .chat-bar .search-icon img {
    width: 28px;
    height: 28px;
  }

  .chat-input {
    font-size: 0.88rem;
  }

  .chat-ask-btn {
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
  }

  .chat-ask-btn span {
    display: none;
  }

  .chat-ask-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* ===================================================
   ERROR MODAL
   =================================================== */

.error-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.error-modal--visible {
  opacity: 1;
  pointer-events: auto;
}

.error-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 16, 54, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.error-modal-dialog {
  position: relative;
  z-index: 1;
  background: var(--white);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem 2rem;
  max-width: 420px;
  width: calc(100% - 2rem);
  text-align: center;
  box-shadow: 0 8px 40px rgba(5, 16, 54, 0.12), 0 2px 12px rgba(5, 16, 54, 0.06);
  transform: translateY(16px) scale(0.97);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.error-modal--visible .error-modal-dialog {
  transform: translateY(0) scale(1);
}

.error-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  transition: color 160ms ease, background 160ms ease;
  line-height: 0;
}

.error-modal-close:hover {
  color: var(--ink);
  background: var(--gray-50);
}

.error-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--eu-amber-20);
  color: var(--yellow-dark);
  margin-bottom: 1rem;
}

.error-modal-title {
  font-family: "DM Sans", Arial, Helvetica, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.75rem;
}

.error-modal-text {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.55;
  margin: 0 0 0.5rem;
}

.error-modal-cta {
  display: inline-block;
  background: var(--eu-gold);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.55rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  white-space: nowrap;
  margin-top: 1rem;
  transition: background 160ms ease, transform 160ms ease;
  box-shadow: 0 2px 12px rgba(255, 190, 92, 0.25);
}

.error-modal-cta:hover {
  background: #ffc96e;
  transform: scale(1.03);
  color: var(--navy);
}

@media (max-width: 480px) {
  .error-modal-dialog {
    padding: 1.75rem 1.25rem 1.5rem;
    max-width: calc(100% - 2.5rem);
    margin: 0 1.25rem;
    border-radius: var(--radius-md);
  }

  .error-modal-close {
    top: 0.5rem;
    right: 0.5rem;
  }

  .error-modal-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.75rem;
  }

  .error-modal-icon svg {
    width: 26px;
    height: 26px;
  }

  .error-modal-title {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
  }

  .error-modal-text {
    font-size: 0.82rem;
    line-height: 1.5;
  }

  .error-modal-cta {
    font-size: 0.8rem;
    padding: 0.5rem 1.3rem;
    margin-top: 0.75rem;
  }
}

/* ===================================================
   TERMS & CONDITIONS MODAL
   =================================================== */

.terms-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.terms-modal--visible {
  opacity: 1;
  pointer-events: auto;
}

.terms-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 16, 54, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.terms-modal-dialog {
  position: relative;
  z-index: 1;
  background: var(--white);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem 2rem;
  max-width: 560px;
  width: calc(100% - 2rem);
  text-align: center;
  box-shadow: 0 12px 48px rgba(5, 16, 54, 0.14), 0 2px 16px rgba(5, 16, 54, 0.08);
  transform: translateY(16px) scale(0.97);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.terms-modal--visible .terms-modal-dialog {
  transform: translateY(0) scale(1);
}

.terms-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  transition: color 160ms ease, background 160ms ease;
  line-height: 0;
}

.terms-modal-close:hover {
  color: var(--ink);
  background: var(--gray-50);
}

.terms-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--eu-blue-10, rgba(56, 96, 237, 0.1));
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.terms-modal-title {
  font-family: "DM Sans", Arial, Helvetica, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.25rem;
}

.terms-modal-subtitle {
  font-size: 0.82rem;
  color: var(--gray-500);
  margin: 0 0 1.25rem;
}

.terms-modal-summary {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  text-align: left;
}

.terms-modal-summary li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.terms-modal-summary li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

.terms-modal-expand {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background 160ms ease, color 160ms ease;
  margin-bottom: 0.5rem;
}

.terms-modal-expand svg {
  transition: transform 200ms ease;
}

.terms-modal-expand.terms-expand--open svg {
  transform: rotate(180deg);
}

.terms-modal-expand:hover {
  background: var(--eu-blue-10, rgba(56, 96, 237, 0.08));
}

.terms-modal-full {
  max-height: 0;
  overflow: hidden;
  transition: max-height 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

.terms-modal-full.terms-full--visible {
  max-height: 300px;
  overflow-y: auto;
  box-shadow: inset 0 8px 6px -6px rgba(5, 16, 54, 0.06), inset 0 -8px 6px -6px rgba(5, 16, 54, 0.06);
}

.terms-modal-full-inner {
  text-align: left;
  padding: 1rem 0.5rem 0.5rem;
  border-top: 1px solid var(--gray-100);
  margin-top: 0.5rem;
}

.terms-modal-full-inner h3 {
  font-family: "DM Sans", Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  margin: 1rem 0 0.35rem;
  border-left: 3px solid var(--accent);
  padding-left: 0.6rem;
}

.terms-modal-full-inner h3:first-child {
  margin-top: 0;
}

.terms-modal-full-inner p {
  font-size: 0.78rem;
  color: var(--gray-600);
  line-height: 1.55;
  margin: 0 0 0.5rem;
}

.terms-modal-full-inner ul {
  padding-left: 1.25rem;
  margin: 0 0 0.5rem;
}

.terms-modal-full-inner li {
  font-size: 0.78rem;
  color: var(--gray-600);
  line-height: 1.55;
  margin-bottom: 0.2rem;
}

.terms-modal-full-inner a {
  color: var(--accent);
  text-decoration: underline;
}

.terms-modal-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  text-align: left;
  font-size: 0.82rem;
  color: var(--gray-600);
  cursor: pointer;
  margin-top: 1rem;
  line-height: 1.4;
}

.terms-modal-checkbox input[type="checkbox"] {
  margin-top: 0.15rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.terms-modal-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.terms-modal-decline {
  display: inline-block;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.65rem 2rem;
  border: 1.5px solid var(--accent);
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease;
}

.terms-modal-decline:hover {
  background: var(--eu-blue-10, rgba(56, 96, 237, 0.08));
}

.terms-modal-accept {
  display: inline-block;
  background: var(--eu-gold);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.65rem 2rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 2px 12px rgba(255, 190, 92, 0.25);
}

.terms-modal-accept:hover:not([disabled]) {
  background: #ffc96e;
  transform: scale(1.03);
}

.terms-modal-accept[disabled] {
  background: var(--gray-200);
  color: var(--gray-400);
  cursor: not-allowed;
  box-shadow: none;
}


@media (max-width: 480px) {
  .terms-modal-dialog {
    padding: 2rem 1.25rem 1.5rem;
    max-width: calc(100% - 1.5rem);
  }
  .terms-modal-actions {
    flex-direction: column;
    width: 100%;
  }
  .terms-modal-accept,
  .terms-modal-decline {
    width: 100%;
    text-align: center;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .hero-shape,
  .hero-badge,
  .hero-title,
  .hero-subtitle,
  .stat-cards,
  .search-section,
  .how-card {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .search-bar {
    animation: none !important;
  }

  .search-chip {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .search-backdrop {
    display: none;
  }

  .error-modal,
  .error-modal-dialog,
  .terms-modal,
  .terms-modal-dialog,
  .terms-modal-full {
    transition: none !important;
  }
}
