/* =========================================================
   Clearstone Group — Design System
   Trust-first, editorial, accessible
   ========================================================= */

:root {
  /* Brand */
  --teal-900: #08403D;
  --teal-800: #0E5F5C;
  --teal-700: #14807A;
  --teal-600: #1F9A91;
  --teal-500: #4DB1A9;
  --teal-300: #9FCEC8;
  --teal-100: #DBEDEA;
  --teal-50:  #ECF5F3;

  --ink-900: #0B1F2A;
  --ink-700: #2A3D47;
  --ink-500: #56666E;
  --ink-400: #7E8B92;
  --ink-300: #B6BEC2;

  --cream:    #F7F2E9;
  --cream-2:  #F1EADD;
  --paper:    #FBF8F2;
  --bg:       #FBFAF6;
  --white:    #FFFFFF;

  --line:     #E6DFD0;
  --line-2:   #D9D2C2;

  --gold:     #C8A65A;
  --rose:     #B86A55;
  --success:  #2F8F5C;
  --warn:     #B57E1A;
  --danger:   #B23E2C;

  /* Semantic status tints — single source for chips, pills, badges */
  --success-bg:     #E5F4EC;
  --success-fg:     #1E6B43;
  --success-border: #C9E6D5;
  --warn-bg:        #FAF1DC;
  --warn-fg:        #7A5612;
  --warn-border:    #EDDFB6;

  /* Live / data-direction accents */
  --online:     #3FC97C;  /* presence dot */
  --up-bright:  #46E6A3;  /* positive figure on dark surfaces */
  --down-bright:#FF8B76;  /* negative figure on dark surfaces */
  --gold-bright:#E8B873;  /* on-dark variant of --gold; the bonded-BTC mark on deep teal */

  /* Neutral text on dark (ink-900) surfaces — readable, not stark white */
  --on-dark-1: #C9D2D6;
  --on-dark-2: #9AA6AC;

  /* Type */
  --font-display: "Newsreader", "Source Serif 4", Georgia, serif;
  --font-body: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* Shadows (subtle, editorial) — layered for softer, more natural depth */
  --shadow-1: 0 1px 2px rgba(11,31,42,.04), 0 1px 1px rgba(11,31,42,.03);
  --shadow-2: 0 2px 4px rgba(11,31,42,.04), 0 10px 28px -14px rgba(11,31,42,.20);
  --shadow-3: 0 4px 12px rgba(11,31,42,.05), 0 28px 56px -28px rgba(11,31,42,.24);
  /* Soft resting elevation for panels/cards, and a brand-tinted lift for dark gradient surfaces */
  --shadow-soft: 0 1px 2px rgba(11,31,42,.04), 0 6px 20px -10px rgba(11,31,42,.12);
  --shadow-teal: 0 4px 10px -4px rgba(8,64,61,.20), 0 20px 44px -20px rgba(8,64,61,.42);
  --shadow-pop: 0 18px 48px -16px rgba(11,31,42,.34), 0 4px 10px rgba(11,31,42,.10);
  --ring: 0 0 0 4px var(--teal-100);

  /* Spacing scale (8px-based) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Layout */
  --container: 1200px;
  --container-tight: 920px;

  /* Easing */
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* Reset */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01","cv11";
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}
::selection { background: var(--teal-100); color: var(--ink-900); }
img, svg { display: block; max-width: 100%; }
a { color: var(--teal-700); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--teal-800); }
button { font-family: inherit; cursor: pointer; }
h1,h2,h3,h4,h5 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  margin: 0 0 0.5em;
  line-height: 1.1;
  text-wrap: balance;
}
/* Tight display leading suits large h1/h2; relax it for small headings so they breathe when wrapping. */
h4, h5 { line-height: 1.25; letter-spacing: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-700);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--teal-700);
}
.serif { font-family: var(--font-display); font-weight: 400; }
.tabular { font-variant-numeric: tabular-nums; }

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container-tight {
  width: 100%;
  max-width: var(--container-tight);
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--ink-900);
  color: var(--paper);
  border-color: var(--ink-900);
  box-shadow: var(--shadow-1);
}
.btn-primary:hover {
  background: var(--teal-800);
  border-color: var(--teal-800);
  color: var(--paper);
  transform: translateY(-1px);
  box-shadow: var(--shadow-teal);
}
.btn-teal {
  background: var(--teal-700);
  color: white;
  border-color: var(--teal-700);
  box-shadow: var(--shadow-1);
}
.btn-teal:hover {
  background: var(--teal-800);
  border-color: var(--teal-800);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-teal);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-900);
  border-color: var(--line-2);
}
.btn-ghost:hover {
  border-color: var(--ink-900);
  background: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.btn-link {
  background: transparent;
  color: var(--ink-900);
  border-color: transparent;
  padding: 0 4px;
  height: auto;
}
.btn-link::after {
  content: "→";
  transition: transform .25s var(--ease);
}
.btn-link:hover::after { transform: translateX(4px); }
.btn-sm { height: 44px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 60px; padding: 0 32px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }
.btn:disabled, .btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  pointer-events: none;
}

/* Tags / chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--teal-50);
  color: var(--teal-800);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--teal-100);
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal-600); }
.chip-success { background: var(--success-bg); color: var(--success-fg); border-color: var(--success-border); }
.chip-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-border); }
.chip-neutral { background: var(--cream-2); color: var(--ink-700); border-color: var(--line); }

/* Required-field marker (replaces scattered inline rose asterisks) */
.req { color: var(--rose); font-weight: 500; margin-left: 2px; }

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(251, 250, 246, 0.85);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled {
  background: rgba(251, 250, 246, 0.94);
  border-bottom-color: var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand img { height: 38px; width: auto; }
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-text .name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.brand-text .tag {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-top: 3px;
}
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  list-style: none;
  padding: 0; margin: 0;
}
.nav-links a {
  color: var(--ink-700);
  font-size: 14.5px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: var(--r-md);
  position: relative;
}
.nav-links a:hover { color: var(--ink-900); background: var(--cream-2); }
.nav-links a.active { color: var(--ink-900); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px;
  bottom: 4px;
  height: 1.5px;
  background: var(--teal-700);
  border-radius: 2px;
}
.nav-cta {
  display: flex;
  gap: 10px;
  align-items: center;
}
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--ink-900);
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 1.5px;
  background: currentColor;
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0; right: 0; height: 1.5px;
  background: currentColor;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 76px 0 auto 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transform: translateY(-110%);
  transition: transform .35s var(--ease);
  z-index: 70;
  padding: 8px 20px 20px;
  box-shadow: var(--shadow-3);
  max-height: calc(100vh - 76px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu ul {
  list-style: none;
  margin: 0 0 14px; padding: 0;
  display: flex; flex-direction: column;
}
.mobile-menu li { display: block; }
.mobile-menu ul a {
  display: block;
  padding: 13px 4px;
  font-size: 16px;
  color: var(--ink-900);
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  line-height: 1.25;
}
.mobile-menu ul li:last-child a { border-bottom: none; }
.mobile-menu .mobile-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
}
.mobile-menu .mobile-cta .btn { height: 48px; font-size: 15px; }
.mobile-menu .mobile-cta .btn-primary { color: var(--paper); }
.mobile-menu .mobile-cta .btn-ghost { color: var(--ink-900); border-color: var(--line-2); background: white; }
@media (max-width: 640px) {
  .mobile-menu { inset: 68px 0 auto 0; max-height: calc(100vh - 68px); padding: 6px 16px 18px; }
  .mobile-menu ul a { padding: 12px 4px; font-size: 15.5px; }
  .mobile-menu .mobile-cta .btn { height: 46px; }
}

/* Footer */
.site-footer {
  background: var(--ink-900);
  color: var(--ink-300);
  padding: 80px 0 28px;
  margin-top: 80px;
}
.site-footer h4 {
  color: white;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 20px;
}
.site-footer a { color: var(--ink-300); display: block; padding: 6px 0; font-size: 14.5px; }
.site-footer a:hover { color: white; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand .brand-text .name { color: white; }
.footer-brand .brand-text .tag { color: var(--on-dark-2); }
.footer-brand p {
  color: var(--ink-300);
  font-size: 14.5px;
  margin-top: 18px;
  max-width: 320px;
  line-height: 1.65;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 13px;
  color: var(--on-dark-2);
}
.footer-bottom .legal a { display: inline-block; margin-left: 24px; padding: 0; }
.footer-licenses {
  display: flex; gap: 24px; align-items: center;
  margin-top: 24px;
  flex-wrap: wrap;
}
.footer-licenses .license {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-2);
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-sm);
}
/* Static (non-link) footer info line — match the sibling footer links */
.footer-static { display: block; padding: 6px 0; font-size: 14.5px; color: var(--ink-300); }

/* Generic Section */
section { padding: 96px 0; }
.section-header { margin-bottom: 56px; max-width: 720px; }
.section-header h2 { font-size: clamp(34px, 4vw, 52px); margin-top: 14px; }
.section-header p { color: var(--ink-500); font-size: 18px; max-width: 580px; }

/* Forms */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.input, .select, .textarea {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink-900);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  outline: none;
}
.textarea {
  height: auto;
  min-height: 130px;
  padding: 14px 16px;
  resize: vertical;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-2); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--teal-700);
  box-shadow: var(--ring);
}
.input.error { border-color: var(--danger); }
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }
.checkbox-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--ink-700);
  cursor: pointer;
  user-select: none;
}
.checkbox-row input[type=checkbox] {
  width: 18px; height: 18px;
  margin-top: 3px;
  accent-color: var(--teal-700);
  flex-shrink: 0;
}
.help-text { font-size: 13px; color: var(--ink-500); margin-top: 6px; }
.error-text { font-size: 13px; color: var(--danger); margin-top: 6px; }

/* Live chat widget */
#cs-chat-launcher {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 90;
  height: 60px; min-width: 60px;
  padding: 0 22px 0 18px;
  border-radius: var(--r-pill);
  background: var(--ink-900);
  color: white;
  border: none;
  box-shadow: 0 12px 32px -8px rgba(11,31,42,.45), 0 4px 8px rgba(11,31,42,.15);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 500;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
#cs-chat-launcher:hover { transform: translateY(-2px); }
#cs-chat-launcher .live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--online);
  position: relative;
}
#cs-chat-launcher .live-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--online);
  opacity: .6;
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(.8); opacity: .8; }
  80%,100% { transform: scale(1.8); opacity: 0; }
}
#cs-chat-window {
  position: fixed;
  right: 22px; bottom: 96px;
  z-index: 91;
  width: 380px;
  max-width: calc(100vw - 28px);
  height: 560px;
  max-height: calc(100vh - 120px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(.96);
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
#cs-chat-window.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.cs-chat-header {
  background: linear-gradient(165deg, var(--teal-800) 0%, var(--teal-900) 100%);
  color: white;
  padding: 18px 20px 16px;
}
.cs-chat-header .who {
  display: flex; align-items: center; gap: 12px;
}
.cs-chat-avatars {
  display: flex; align-items: center;
}
.cs-chat-avatars .av {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--teal-300);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px;
  color: var(--teal-900);
  border: 2px solid var(--teal-800);
  margin-left: -10px;
  letter-spacing: 0.02em;
}
.cs-chat-avatars .av:first-child { margin-left: 0; }
.cs-chat-avatars .av:nth-child(2) { background: var(--cream); }
.cs-chat-avatars .av:nth-child(3) { background: var(--gold); color: var(--ink-900); }
.cs-chat-header .title { font-family: var(--font-display); font-size: 17px; font-weight: 500; }
.cs-chat-header .status {
  font-size: 12px; color: rgba(255,255,255,0.75);
  display: flex; align-items: center; gap: 6px;
}
.cs-chat-header .status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--online); box-shadow: 0 0 0 3px rgba(74,222,128,0.25);
}
.cs-chat-close {
  position: absolute; top: 14px; right: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: white; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.cs-chat-close:hover { background: rgba(255,255,255,0.22); }
.cs-chat-body {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  background: var(--paper);
  display: flex; flex-direction: column; gap: 12px;
}
.cs-msg {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.5;
}
.cs-msg.them {
  background: white;
  color: var(--ink-900);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.cs-msg.me {
  background: var(--teal-800);
  color: white;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.cs-msg .meta {
  font-size: 11px;
  margin-top: 4px;
  opacity: 0.6;
}
.cs-typing {
  align-self: flex-start;
  background: white;
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.cs-typing span {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--ink-400);
  border-radius: 50%;
  margin: 0 1px;
  animation: typing 1.2s infinite ease-in-out;
}
.cs-typing span:nth-child(2) { animation-delay: 0.15s; }
.cs-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  0%,60%,100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.cs-quick {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 0 18px 10px;
  background: var(--paper);
}
.cs-quick button {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink-700);
  font-size: 13px;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.cs-quick button:hover { border-color: var(--teal-700); color: var(--teal-800); }
.cs-chat-input {
  padding: 12px;
  border-top: 1px solid var(--line);
  background: white;
  display: flex; gap: 8px; align-items: center;
}
.cs-chat-input input {
  flex: 1;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 14.5px;
  outline: none;
}
.cs-chat-input input:focus { border-color: var(--teal-700); }
.cs-chat-input button {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ink-900);
  color: white;
  border: none;
  display: flex; align-items: center; justify-content: center;
}
.cs-chat-input button:hover { background: var(--teal-800); }
.cs-chat-disclaimer {
  font-size: 11px;
  color: var(--ink-400);
  text-align: center;
  padding: 6px 12px 10px;
  background: white;
  border-top: 1px solid var(--line);
}

/* ----- Live chat: status, presence, smoothness ----- */
/* Each incoming/outgoing bubble eases in. */
.cs-msg {
  animation: csMsgIn .22s var(--ease, ease) both;
  word-break: break-word;
  white-space: pre-wrap;
}
@keyframes csMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cs-msg .meta {
  display: flex; align-items: center; gap: 5px;
  justify-content: flex-end;
}
.cs-msg.them .meta { justify-content: flex-start; }
.cs-msg .meta .edited { font-style: italic; opacity: .8; }

/* Delivery status ticks on my own messages. */
.cs-tick { font-size: 11px; line-height: 1; letter-spacing: -1px; display: inline-flex; }
.cs-tick.sending { letter-spacing: 0; opacity: .7; animation: csSpin 1.1s linear infinite; }
.cs-tick.sent { opacity: .8; }
.cs-tick.delivered { opacity: .85; }
.cs-tick.seen { color: #6FE3FF; opacity: 1; }
.cs-tick.failed { color: #FFD0CC; font-weight: 700; letter-spacing: 0; }
@keyframes csSpin { to { transform: rotate(360deg); } }

/* Live presence dot in the header — grey by default, green when online. */
.cs-chat-header .status::before {
  background: var(--ink-400);
  box-shadow: none;
  transition: background .2s var(--ease, ease);
}
.cs-chat-header .status.is-online::before {
  background: var(--online);
  box-shadow: 0 0 0 3px rgba(74,222,128,.28);
  animation: csPulseDot 1.8s ease-out infinite;
}
@keyframes csPulseDot {
  0% { box-shadow: 0 0 0 0 rgba(74,222,128,.45); }
  70%,100% { box-shadow: 0 0 0 6px rgba(74,222,128,0); }
}

/* Closed-conversation banner. */
.cs-chat-closed-banner {
  padding: 12px 16px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-500);
  text-align: center;
  line-height: 1.5;
}
.cs-chat-closed-banner .cs-reopen {
  display: inline-block;
  margin-top: 4px;
  color: var(--teal-800);
  font-weight: 600;
  background: none; border: none; cursor: pointer;
  text-decoration: underline;
}
#cs-chat-window.cs-closed .cs-quick { display: none; }

/* Utility */
.hide-mobile { display: flex; }
.show-mobile { display: none !important; }

/* ============== RESPONSIVE ============== */
@media (max-width: 980px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta .nav-cta-account { display: none; }
  section { padding: 72px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { height: 68px; }
  .mobile-menu { inset: 68px 0 auto 0; }
  section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; gap: 14px; align-items: flex-start; }
  .footer-bottom .legal a { margin-left: 0; margin-right: 18px; }
  #cs-chat-launcher { right: 14px; bottom: 14px; padding: 0 18px 0 14px; height: 54px; display: flex; align-items: center; justify-content: center; }
  #cs-chat-launcher .label-text { display: none; }
  #cs-chat-window { right: 8px; left: 8px; bottom: 78px; width: auto; height: calc(100vh - 100px); }
  .hide-mobile { display: none !important; }
  .show-mobile { display: initial !important; }
  .card { padding: 22px; }
  .btn { height: 48px; }
}

/* ============================================================
   Polish layer — accessibility, motion preferences, print
   ============================================================ */

/* Honor user motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Clearer keyboard focus everywhere */
:focus-visible {
  outline: 2px solid var(--teal-700, #0E6B66);
  outline-offset: 2px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) { outline: none; }

/* Scroll progress bar (driven by JS in main.js) */
#cs-scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--teal-700, #0E6B66), var(--teal-300, #6EC1B8));
  z-index: 1000;
  pointer-events: none;
  transition: width .12s linear, opacity .25s;
}

/* Skip-to-content link */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink-900, #0B1F2A);
  color: #fff;
  padding: 10px 14px;
  border-radius: 0 0 8px 0;
  z-index: 10001;
  font-size: 13px;
}
.skip:focus { left: 0; }

/* Subtle button press feedback */
.btn:active { transform: translateY(1px); }

/* Lazy/loaded image fade-in */
img[loading="lazy"] { opacity: 0; transition: opacity .35s ease; }
img[loading="lazy"].is-loaded,
img[loading="lazy"][src*="favicon"],
img[loading="lazy"][src*="logo"] { opacity: 1; }

/* ============================================================
   Refinement layer — elevated depth & smoother surfaces
   (purely cosmetic; no layout/structure changes)
   ============================================================ */

/* Quiet, on-brand scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border: 3px solid var(--bg);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-300); }

/* Print: hide chrome, save ink */
@media print {
  #cs-chat-launcher, #cs-chat-window, .site-header, .site-footer,
  .mobile-menu, .nav-toggle, .skip, #cs-scroll-progress { display: none !important; }
  body { background: #fff !important; color: #000; }
  a { color: inherit; text-decoration: underline; }
  .container { max-width: 100% !important; }
}
