:root {
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-alt: #e9edf2;
  --ink: #15202b;
  --ink-soft: #445565;
  --line: #c6d1dc;
  --brand: #123250;
  --brand-strong: #0d2740;
  --accent: #2f5d86;
  --max: 1140px;
  --radius: 8px;
  --shadow: 0 6px 18px rgba(15, 35, 55, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Aptos", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top right, #eef3f8 0%, var(--bg) 38%, var(--bg) 100%);
  line-height: 1.52;
}

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

a:hover,
a:focus-visible {
  color: var(--brand-strong);
}

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.03), 0 4px 14px -2px rgba(15, 35, 55, 0.04);
  transition: all 0.2s ease;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 1.25rem;
}

.topbar-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(18, 50, 80, 0.18);
  border-radius: 6px;
  padding: 7px 6px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 36px;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(18, 50, 80, 0.05);
  border-color: var(--brand);
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: #123250;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 980px) {
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.65rem 0;
    gap: 0;
  }

  .topbar-brand-row {
    width: 100%;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    display: none;
    width: 100%;
    padding: 0.75rem 0 0.5rem;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    margin-top: 0.65rem;
    animation: fadeIn 0.15s ease-out;
  }

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

  .tabs {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    width: 100%;
  }

  .tabs a {
    display: flex;
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.94rem;
    border-radius: 6px;
  }

  .tabs a[href="contact-us.html"] {
    margin-left: 0;
    margin-top: 0.3rem;
  }
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.brand:hover {
  opacity: 0.94;
}

.brand-mark-img {
  width: 38px;
  height: auto;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 2px 4px rgba(15, 35, 55, 0.12));
}

.brand:hover .brand-mark-img {
  transform: scale(1.06) rotate(-2deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-weight: 750;
  font-size: 1.3rem;
  letter-spacing: -0.025em;
  color: #0b1d2e;
}

.brand-subtitle {
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #64748b;
  margin-top: 2px;
}

.tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 0.25rem;
}

.tabs a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 550;
  color: #475569;
  border-radius: 6px;
  padding: 0.42rem 0.7rem;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.18s ease-in-out;
  white-space: nowrap;
}

.tabs a:hover {
  color: #0f2337;
  background: rgba(15, 35, 55, 0.05);
}

.tabs a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tabs .active {
  color: #ffffff;
  background: #123250;
  border-color: #123250;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(18, 50, 80, 0.22);
}

.tabs a[href="contact-us.html"] {
  border: 1px solid rgba(18, 50, 80, 0.22);
  background: rgba(18, 50, 80, 0.03);
  color: #123250;
  font-weight: 600;
  margin-left: 0.25rem;
}

.tabs a[href="contact-us.html"]:hover {
  background: #123250;
  color: #ffffff;
  border-color: #123250;
  box-shadow: 0 2px 8px rgba(18, 50, 80, 0.2);
}

.tabs .active[href="contact-us.html"] {
  background: #123250;
  color: #ffffff;
  border-color: #123250;
}

.hero {
  padding: 3.6rem 0 3rem;
  background: radial-gradient(circle at 50% 0%, rgba(219, 234, 254, 0.4) 0%, rgba(248, 250, 252, 0.7) 50%, #ffffff 90%);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(147, 197, 253, 0.7);
  box-shadow: 0 1px 4px rgba(15, 35, 55, 0.04);
  color: #1e40af;
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 6px #3b82f6;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: #0c1e33;
}

h1 {
  margin: 0.4rem 0 0.9rem;
  font-size: clamp(2rem, 3.8vw, 2.9rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.prose h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--line);
  position: relative;
  margin-bottom: 1.2rem;
}

.prose h1::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--accent);
}

.lead {
  margin: 0 0 1.5rem;
  max-width: 74ch;
  color: #475569;
  font-size: 1.12rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.62rem 1.25rem;
  border-radius: 7px;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1.3;
}

.btn-primary {
  background: #123250;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(18, 50, 80, 0.25);
  border: 1px solid #123250;
}

.btn-primary:hover {
  background: #1a4269;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(18, 50, 80, 0.3);
}

.btn-secondary {
  background: #ffffff;
  color: #123250;
  border: 1px solid rgba(18, 50, 80, 0.25);
  box-shadow: 0 1px 3px rgba(15, 35, 55, 0.05);
}

.btn-secondary:hover {
  background: #f8fafc;
  color: #0b1a2c;
  border-color: #123250;
  transform: translateY(-1px);
}

.section {
  padding: 2rem 0;
}

.section-alt {
  background: var(--surface-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem;
  box-shadow: var(--shadow);
}

.card h2,
.card h3,
.prose h1,
.prose h2 {
  margin-top: 0;
}

/* Promotional Components */
.promo-card {
  background: linear-gradient(135deg, #0d2238 0%, #163d63 100%);
  color: #ffffff;
  border-radius: var(--radius);
  padding: 2rem 2.2rem;
  box-shadow: 0 10px 28px rgba(13, 34, 56, 0.22);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: flex-start;
}

.promo-card h2,
.promo-card h3 {
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 0.2rem;
}

.promo-card p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 68ch;
  line-height: 1.6;
  font-size: 1.02rem;
  margin: 0;
}

.btn-white {
  background: #ffffff;
  color: #0d2238;
  font-weight: 700;
  border: 1px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  margin-top: 0.5rem;
}

.btn-white:hover {
  background: #f1f5f9;
  color: #05121e;
  transform: translateY(-1px);
}

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

.feature-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.feature-box h3 {
  margin-top: 0;
  margin-bottom: 0.1rem;
  font-size: 1.12rem;
  color: #0c1e33;
}

.feature-box p {
  margin: 0;
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.55;
}

.compare-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
  margin-top: 1.5rem;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.8rem;
  font-size: 0.9rem;
}

.compare-table th,
.compare-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.compare-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #0c1e33;
}

.compare-table td:first-child {
  font-weight: 600;
  color: #0c1e33;
}

.section-intro {
  color: var(--ink-soft);
  margin-top: -0.2rem;
}

.announcement-list {
  display: grid;
  gap: 0.8rem;
}

.announcement {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
}

.announcement h3 {
  margin: 0;
  font-size: 1.02rem;
}

.announcement time {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}

.announcement .content {
  margin-top: 0.52rem;
}

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.prose p,
.prose li {
  max-width: 78ch;
}

.prose pre {
  background: #0f2133;
  color: #e8eff7;
  padding: 0.75rem 0.85rem;
  border-radius: 6px;
  overflow-x: auto;
}

.prose code {
  font-family: "IBM Plex Mono", "Consolas", "Courier New", monospace;
}

.footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  padding: 1rem 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.footer-inner p {
  margin: 0.2rem 0;
}

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.contact-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 1rem 0 1.75rem;
  flex-wrap: wrap;
}

.contact-logo {
  max-width: 95px;
  height: auto;
  flex-shrink: 0;
}

.diagram-figure {
  max-width: 520px;
  margin: 1.5rem auto 2rem;
  padding: 0;
}

.diagram-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(15, 35, 55, 0.08);
  display: block;
  background: #ffffff;
}

figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.4;
}

code {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Contact Form */
.contact-form-card {
  margin: 1.2rem 0 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
  max-width: 620px;
}

.contact-form-card h2 {
  margin-top: 0;
  margin-bottom: 0.2rem;
  font-size: 1.2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

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

.form-label .required {
  color: #dc2626;
  margin-left: 0.15rem;
}

.form-control {
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  background-color: #ffffff;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.45rem 0.65rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47, 93, 134, 0.18);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-submit-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-top: 0.2rem;
}

.form-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.form-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  padding: 0.9rem 1.1rem;
  border-radius: 6px;
  font-size: 0.92rem;
  line-height: 1.45;
  border: 1px solid transparent;
}

.form-status-success {
  background-color: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.form-status-error {
  background-color: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

/* Evaluation Checklist Form Components */
.form-fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 0.5rem 0 0.85rem;
  background: #fbfcfe;
}

.form-legend {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0c1e33;
  padding: 0 0.4rem;
}

.form-help {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.25rem;
  line-height: 1.45;
}

.form-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.form-check-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.86rem;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  line-height: 1.35;
}

.form-check-label input[type="checkbox"],
.form-check-label input[type="radio"] {
  margin-top: 0.15rem;
  cursor: pointer;
}

.form-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.checklist-indent {
  margin-top: 0.65rem;
  padding: 0.75rem 0.9rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.form-status-notice {
  background-color: #eff6ff;
  border-color: #3b82f6;
  color: #1e40af;
}

.contact-notice {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}

@media (max-width: 640px) {
  .hero {
    padding: 2.2rem 0 1.8rem;
  }

  .eyebrow {
    font-size: 0.72rem;
    line-height: 1.35;
    padding: 0.35rem 0.75rem;
    white-space: normal;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .brand-title {
    font-size: 1.2rem;
  }

  .brand-subtitle {
    font-size: 0.66rem;
  }

  .section {
    padding: 1.5rem 0;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .contact-form-card {
    padding: 1.1rem;
  }

  .form-submit-btn {
    width: 100%;
  }
}

.contact-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* AI Chatbot Widget */
.chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  font-family: inherit;
}

.chat-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  padding: 0.6rem 1.05rem;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(18, 50, 80, 0.3);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease, box-shadow 0.2s ease;
}

.chat-toggle-btn:hover {
  background: var(--brand-strong);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(18, 50, 80, 0.4);
}

.chat-toggle-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  fill: currentColor;
}

.chat-panel {
  display: none;
  flex-direction: column;
  position: absolute;
  bottom: calc(100% + 0.6rem);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 2rem);
  height: 480px;
  max-height: calc(100vh - 6rem);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(15, 35, 55, 0.22);
  overflow: hidden;
  animation: chatFadeIn 0.2s ease-out;
}

.chat-panel.is-open {
  display: flex;
}

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

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--brand);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header-title {
  display: flex;
  flex-direction: column;
}

.chat-header-title strong {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
}

.chat-header-title span {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.75);
}

.chat-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.chat-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #f8fafc;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  font-size: 0.84rem;
  line-height: 1.45;
}

.chat-msg-user {
  align-self: flex-end;
  background: var(--brand);
  color: #ffffff;
  padding: 0.55rem 0.85rem;
  border-radius: 10px 10px 2px 10px;
}

.chat-msg-bot {
  align-self: flex-start;
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.55rem 0.85rem;
  border-radius: 10px 10px 10px 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.chat-msg-bot p {
  margin: 0.25rem 0;
}

.chat-msg-bot p:first-child {
  margin-top: 0;
}

.chat-msg-bot p:last-child {
  margin-bottom: 0;
}

.chat-msg-bot ul, .chat-msg-bot ol {
  margin: 0.25rem 0;
  padding-left: 1.2rem;
}

.chat-msg-bot li {
  margin: 0.15rem 0;
}

.chat-msg-bot code {
  background: #edf2f7;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.8em;
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.3rem;
}

.chat-chip {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 9999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  color: var(--brand);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chat-chip:hover {
  background: #f0f4f8;
  border-color: var(--brand);
}

.chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.6rem;
}

.chat-typing-dot {
  width: 5px;
  height: 5px;
  background: var(--ink-soft);
  border-radius: 50%;
  animation: chatDotPulse 1.2s infinite ease-in-out;
}

.chat-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes chatDotPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.chat-footer {
  padding: 0.55rem 0.75rem;
  background: #ffffff;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.chat-form {
  display: flex;
  gap: 0.4rem;
}

.chat-input {
  flex: 1;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  background: #ffffff;
  color: var(--ink);
}

.chat-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(18, 50, 80, 0.15);
}

.chat-send-btn {
  background: var(--brand);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.chat-send-btn:hover {
  background: var(--brand-strong);
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-disclaimer {
  font-size: 0.68rem;
  color: var(--ink-soft);
  text-align: center;
}

.chat-sources {
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

@media (max-width: 480px) {
  .chat-widget {
    bottom: 1rem;
    right: 1rem;
  }

  .chat-panel {
    width: calc(100vw - 2rem);
    height: 420px;
    bottom: calc(100% + 0.5rem);
    right: 0;
  }
}
