:root {
  --wc-navy: #002f6c;
  --wc-navy-deep: #001f4d;
  --wc-blue: #0055a5;
  --wc-blue-bright: #1a6fc4;
  --wc-light-blue: #d6e6f5;
  --wc-panel: #eef5fb;
  --wc-orange: #f36c00;
  --wc-text: #2c3a4a;
  --wc-muted: #6b7a8c;
  --font-nav: "Montserrat", "Arial Narrow", sans-serif;
  --font-body: "Open Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--wc-text);
  background: #f4f7fb;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

/* —— Nav —— */
.wc-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  padding: 0.55rem 1.25rem;
  background: var(--wc-navy);
  color: #fff;
}

.wc-logo img {
  height: 42px;
  width: auto;
  display: block;
}

.wc-nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.75rem;
}

.wc-nav-links a,
.wc-more {
  font-family: var(--font-nav);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.wc-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hamburger {
  width: 16px;
  height: 11px;
  border-top: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: linear-gradient(#fff, #fff) center / 100% 2px no-repeat;
}

.wc-nav-actions {
  display: flex;
  gap: 0.55rem;
}

.wc-outline-btn {
  font-family: var(--font-nav);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  padding: 0.45rem 0.85rem;
  white-space: nowrap;
}

.wc-outline-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* —— Home page —— */
.home-banner {
  margin: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

.home-hero {
  position: relative;
  min-height: min(78vh, 720px);
  overflow: hidden;
  background: #001530;
}

.home-slides {
  position: relative;
  height: min(78vh, 720px);
}

.home-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background:
    linear-gradient(90deg, rgba(0, 20, 50, 0.72) 0%, rgba(0, 20, 50, 0.28) 48%, rgba(0, 20, 50, 0.15) 100%),
    var(--slide-image) center / cover no-repeat;
  display: flex;
  align-items: center;
}

.home-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.home-slide-copy {
  width: min(560px, 90vw);
  margin-left: clamp(1.25rem, 6vw, 5rem);
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  animation: heroIn 0.8s ease both;
}

.home-slide-copy .eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--font-nav);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: #ffd7a8;
}

.home-slide-copy h1 {
  margin: 0;
  font-family: var(--font-nav);
  font-weight: 800;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.home-slide-copy .price {
  margin: 0.45rem 0 0;
  font-family: var(--font-nav);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: #fff;
}

.home-slide-copy .slide-blurb {
  margin: 0.75rem 0 0;
  max-width: 28rem;
  font-size: 1rem;
  line-height: 1.45;
  opacity: 0.95;
}

.home-cta {
  display: inline-block;
  margin-top: 1.15rem;
  padding: 0.7rem 1.15rem;
  border-radius: 4px;
  background: var(--wc-orange);
  color: #fff;
  font-family: var(--font-nav);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.82rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.home-cta:hover {
  filter: brightness(1.06);
}

.home-hero-controls {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 2;
}

.home-hero-controls button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--wc-navy);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.home-dots {
  display: flex;
  gap: 0.4rem;
}

.home-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.home-dot.is-active {
  background: #fff;
}

.home-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.home-strip-card {
  background: #fff;
  border: 1px solid #d7e3ef;
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 10px 28px rgba(0, 31, 77, 0.08);
}

.home-strip-card.accent {
  background: linear-gradient(145deg, #0b2a5b, #1450a0);
  color: #fff;
  border-color: transparent;
}

.home-strip-card h2 {
  margin: 0;
  font-family: var(--font-nav);
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.home-strip-card p {
  margin: 0.55rem 0 0.9rem;
  line-height: 1.45;
  color: inherit;
  opacity: 0.9;
}

.home-strip-card a {
  font-weight: 800;
  color: var(--wc-orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-strip-card.accent a {
  color: #ffd7a8;
}

.strip-open-chat {
  margin-top: 0.35rem;
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
  font-family: var(--font-nav);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.strip-open-chat:hover {
  background: #fff;
  color: var(--wc-navy);
}

.home-footer {
  padding: 1.5rem 1.25rem 6.5rem;
  text-align: center;
  color: var(--wc-muted);
  font-size: 0.8rem;
}

.home-footer .footer-logo {
  height: 36px;
  width: auto;
  margin-bottom: 0.55rem;
  opacity: 0.9;
}

@media (max-width: 860px) {
  .home-strip {
    grid-template-columns: 1fr;
  }

  .home-slide-copy {
    margin-left: 1rem;
  }
}

/* —— Legacy nutrition hero (unused on home) —— */
.hero {
  position: relative;
  min-height: min(72vh, 620px);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    url("./assets/hero.jpg") center / cover no-repeat;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 25, 60, 0.35) 0%,
    rgba(0, 25, 60, 0.25) 45%,
    rgba(0, 25, 60, 0.45) 100%
  );
}

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1rem 4rem;
  animation: heroIn 0.9s ease both;
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--font-nav);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55), 0 8px 24px rgba(0, 0, 0, 0.35);
  line-height: 1.05;
}

.hero-copy p {
  margin: 0.35rem 0 0;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.2vw, 2.3rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55);
}

.hero-scroll {
  position: absolute;
  z-index: 1;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  border-radius: 4px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  animation: bob 1.8s ease-in-out infinite;
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(5px);
  }
}

/* —— Nutrition body —— */
.nutrition-page {
  max-width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 1.25rem 1rem 7rem;
}

.demo-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: #fff8ef;
  border: 1px solid rgba(243, 108, 0, 0.28);
  color: #6a3d08;
  font-size: 0.82rem;
}

.demo-banner a {
  color: var(--wc-blue);
  font-weight: 700;
}

.mode-pill {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 47, 108, 0.08);
  color: var(--wc-navy);
}

.mode-pill.live {
  background: rgba(39, 174, 96, 0.15);
  color: #1e7a45;
}

.mode-pill.demo {
  background: rgba(243, 108, 0, 0.15);
  color: #b34f00;
}

.product-picker {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: stretch;
  border: 2px solid var(--wc-blue-bright);
  background: #fff;
  min-height: 64px;
  margin-bottom: 0.85rem;
}

.picker-arrow {
  border: 0;
  background: #fff;
  color: #b7c2cf;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.picker-arrow:hover {
  color: var(--wc-blue);
  background: #f3f8fc;
}

.picker-label {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0.75rem 0.5rem;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--wc-blue);
  border: 0;
  background: #fff;
  cursor: pointer;
  width: 100%;
}

.picker-label:hover,
.product-picker.open .picker-label {
  background: #f3f8fc;
}

.picker-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  max-height: min(420px, 55vh);
  overflow: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  background: rgba(45, 48, 54, 0.96);
  color: #fff;
  border-radius: 4px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  padding: 0.35rem 0 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.45) rgba(255, 255, 255, 0.08);
}

.picker-dropdown::-webkit-scrollbar {
  width: 8px;
}

.picker-dropdown::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  margin: 8px 0;
}

.picker-dropdown::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.28));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.picker-dropdown::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.4));
  background-clip: padding-box;
  border: 2px solid transparent;
}

.picker-dropdown::-webkit-scrollbar-thumb:active {
  background: rgba(26, 111, 196, 0.85);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.picker-dropdown[hidden] {
  display: none !important;
}

.picker-dropdown::before,
.picker-dropdown::after {
  content: "";
  position: sticky;
  left: 50%;
  display: block;
  width: 0;
  height: 0;
  margin-left: -5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  z-index: 1;
}

.picker-dropdown::before {
  top: 4px;
  border-bottom: 6px solid rgba(255, 255, 255, 0.45);
}

.picker-dropdown::after {
  bottom: 4px;
  border-top: 6px solid rgba(255, 255, 255, 0.45);
}

.picker-section-header {
  padding: 0.65rem 1.1rem 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.picker-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  padding: 0.45rem 1.1rem 0.45rem 0.85rem;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.18s ease;
}

.picker-option:hover {
  background: rgba(26, 111, 196, 0.35);
}

.picker-option.selected {
  background: linear-gradient(90deg, rgba(26, 111, 196, 0.55), rgba(26, 111, 196, 0.15));
}

.picker-check {
  width: 1rem;
  flex: 0 0 1rem;
  color: #fff;
  font-size: 0.85rem;
}

.picker-option-text {
  flex: 1;
}

.facts-card {
  background: #fff;
  border: 1px solid #d7e3ef;
  overflow: hidden;
}

.facts-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 0;
  border-top: 1px solid #d7e3ef;
  background: var(--wc-light-blue);
  color: var(--wc-blue);
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.85rem 1rem;
  cursor: pointer;
}

.facts-toggle:first-child {
  border-top: 0;
}

.facts-toggle .toggle-icon {
  width: 1.1rem;
  text-align: center;
  font-size: 1.2rem;
  line-height: 1;
}

.facts-body {
  display: none;
  background: #fff;
}

.facts-body.open {
  display: block;
}

.facts-grid,
.allergen-grid {
  padding: 0.35rem 0;
}

.fact-row,
.allergen-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.95rem;
  color: #3a4a5c;
  border-bottom: 1px solid #edf2f7;
}

.fact-row:nth-child(even),
.allergen-row:nth-child(even) {
  background: #f7fbfe;
}

.fact-row:last-child,
.allergen-row:last-child {
  border-bottom: 0;
}

.fact-row .value {
  font-weight: 700;
  color: #243447;
}

.allergen-row .value.contains {
  color: #b33b2c;
  font-weight: 700;
}

.allergen-row .value.may_contain {
  color: #b36b00;
  font-weight: 700;
}

.legal-note {
  margin: 1.25rem 0 0;
  font-size: 0.78rem;
  color: var(--wc-muted);
  line-height: 1.5;
}

/* —— Floating chat —— */
.chat-widget {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}

.chat-fab {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: linear-gradient(145deg, var(--wc-orange), #d85a00);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 47, 108, 0.28);
  display: grid;
  place-items: center;
  transition: transform 0.15s ease;
}

.chat-fab:hover {
  transform: translateY(-2px) scale(1.03);
}

.fab-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(243, 108, 0, 0.45);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.92);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}

.fab-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.fab-label {
  position: absolute;
  bottom: -0.15rem;
  font-family: var(--font-nav);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-panel {
  width: min(380px, calc(100vw - 1.5rem));
  height: min(560px, calc(100vh - 7rem));
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 50px rgba(0, 31, 77, 0.28);
  border: 1px solid #d5e2f0;
  animation: panelIn 0.22s ease both;
  transition: width 0.2s ease, height 0.2s ease;
}

.chat-panel.expanded {
  width: min(760px, calc(100vw - 1.5rem));
  height: min(640px, calc(100vh - 6.5rem));
}

.chat-panel.fullscreen {
  position: fixed;
  inset: 0.75rem;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  border-radius: 14px;
  z-index: 60;
}

.chat-widget:has(.chat-panel.fullscreen) {
  position: fixed;
  inset: 0;
  z-index: 60;
  align-items: stretch;
  justify-content: stretch;
  right: auto;
  bottom: auto;
  padding: 0;
}

.chat-widget:has(.chat-panel.fullscreen) .chat-fab {
  display: none;
}

.chat-panel.fullscreen .md-table {
  font-size: 0.82rem;
  min-width: 640px;
}

.chat-panel[hidden] {
  display: none !important;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.chat-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(115deg, var(--wc-navy-deep) 0%, var(--wc-navy) 55%, var(--wc-blue) 100%);
  color: #fff;
}

.chat-header-copy {
  min-width: 0;
}

.chat-title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #e8f7ee;
}

.chat-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5ddea0;
  box-shadow: 0 0 0 3px rgba(93, 222, 160, 0.25);
}

.chat-topic-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  background: #eef4fa;
  border-bottom: 1px solid #dce7f2;
}

.chat-topic-bar span {
  font-family: var(--font-nav);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--wc-navy);
  background: #fff;
  border: 1px solid #d0deec;
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  white-space: nowrap;
}

.chat-header-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.15rem;
}

#chat-expand,
#chat-fullscreen,
#chat-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  opacity: 0.9;
}

#chat-expand:hover,
#chat-fullscreen:hover,
#chat-close:hover {
  background: rgba(255, 255, 255, 0.12);
  opacity: 1;
}

#chat-fullscreen {
  font-size: 0.95rem;
  padding-top: 0.28rem;
}

#chat-close {
  font-size: 1.4rem;
}

.chat-panel-header strong {
  font-family: var(--font-nav);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.chat-panel-header p {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  opacity: 0.85;
}

.chat-messages {
  flex: 1 1 auto;
  min-height: 0; /* allow this pane to scroll inside the fixed chat panel */
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.65rem 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: #f7fafc;
}

.bubble {
  flex: 0 0 auto; /* never shrink messages when sources expand below */
  max-width: 92%;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.bubble.user {
  align-self: flex-end;
  background: var(--wc-navy);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.bubble.assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #dce7f2;
  border-bottom-left-radius: 4px;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-x: hidden;
}

.bubble.assistant .md-p {
  margin: 0 0 0.45rem;
}

.bubble.assistant .md-p:last-child {
  margin-bottom: 0;
}

.bubble.assistant .md-h {
  margin: 0 0 0.45rem;
  font-family: var(--font-nav);
  font-size: 0.88rem;
  color: var(--wc-navy);
}

.bubble.assistant .md-list {
  margin: 0.25rem 0 0.5rem;
  padding-left: 1.1rem;
}

.bubble.assistant .md-list li {
  margin: 0.15rem 0;
}

.bubble.assistant code {
  font-size: 0.78em;
  background: #eef3f8;
  padding: 0.05rem 0.28rem;
  border-radius: 4px;
}

.md-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  margin: 0.35rem 0 0.55rem;
  border: 1px solid #d5e2f0;
  border-radius: 10px;
  background: #fff;
}

.md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  line-height: 1.35;
  min-width: 420px;
}

.md-table th,
.md-table td {
  padding: 0.4rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid #e4edf5;
  vertical-align: top;
  white-space: nowrap;
}

.md-table th {
  background: var(--wc-navy);
  color: #fff;
  font-family: var(--font-nav);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
}

.md-table tr:last-child td {
  border-bottom: 0;
}

.md-table tr:nth-child(even) td {
  background: #f7fbfe;
}

.chat-panel.expanded .md-table {
  font-size: 0.78rem;
  min-width: 520px;
}

.source-drawer {
  margin-top: 0.7rem;
  padding-top: 0.55rem;
  border-top: 1px solid #e4edf5;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.source-drawer-toggle {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #c5d8ef;
  background: #eef5fc;
  color: var(--wc-navy);
  font-family: var(--font-nav);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.source-drawer-toggle::-webkit-details-marker {
  display: none;
}

.source-drawer-caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--wc-blue);
  transition: transform 0.15s ease;
}

.source-drawer[open] .source-drawer-caret {
  transform: rotate(180deg);
}

.source-cards-rail {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.55rem;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.15rem 0.25rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.source-cards-rail::-webkit-scrollbar {
  height: 6px;
}

.source-cards-rail::-webkit-scrollbar-thumb {
  background: #c5d3e3;
  border-radius: 999px;
}

.source-card {
  flex: 0 0 200px;
  width: 200px;
  max-width: 200px;
  min-width: 200px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 1px solid #d5e2f0;
  background: #fff;
  color: inherit;
  text-decoration: none;
  min-height: 4.5rem;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.source-card:hover {
  border-color: var(--wc-blue);
  box-shadow: 0 4px 14px rgba(0, 47, 108, 0.1);
}

.source-card-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.source-card-index {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--wc-blue);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
}

.source-card-kind {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--wc-blue);
}

.source-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--wc-navy);
  line-height: 1.3;
}

.source-card-detail {
  font-size: 0.68rem;
  color: var(--wc-muted);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.bubble.system {
  align-self: center;
  background: transparent;
  color: var(--wc-muted);
  font-size: 0.72rem;
  text-align: center;
}

.bubble.pending {
  opacity: 1;
  font-style: normal;
  background: linear-gradient(110deg, #eef5fb 0%, #f8fbfe 45%, #eef5fb 90%);
  background-size: 200% 100%;
  animation: thinking-shimmer 1.8s ease-in-out infinite;
}

.thinking-indicator {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  flex-shrink: 0;
}

.thinking-dots span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--wc-blue);
  animation: thinking-bounce 1.2s ease-in-out infinite;
}

.thinking-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.thinking-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.thinking-label {
  color: var(--wc-navy);
  font-size: 0.82rem;
  font-weight: 500;
  animation: thinking-fade 0.35s ease;
}

@keyframes thinking-fade {
  from {
    opacity: 0.35;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes thinking-bounce {
  0%,
  70%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  35% {
    transform: translateY(-0.28rem);
    opacity: 1;
  }
}

@keyframes thinking-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.chat-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  padding: 0.7rem;
  border-top: 1px solid #dde7f1;
  background: #fff;
}

.chat-composer input {
  border: 1px solid #c9d8e8;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.88rem;
}

.chat-composer input:focus {
  outline: 2px solid rgba(0, 85, 165, 0.25);
  border-color: var(--wc-blue);
}

.chat-composer button {
  border: 0;
  border-radius: 10px;
  padding: 0 0.95rem;
  background: var(--wc-orange);
  color: #fff;
  font-family: var(--font-nav);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.75rem;
  cursor: pointer;
}

.chat-composer button:disabled {
  opacity: 0.55;
  cursor: wait;
}

@media (max-width: 860px) {
  .wc-nav {
    grid-template-columns: auto auto;
  }

  .wc-nav-links {
    display: none;
  }

  .hero {
    min-height: 52vh;
  }

  .hero-bg {
    background-image: url("./assets/hero-mobile.jpg");
  }
}
