/* ============================================================
   Denticode - shared site styles
   ============================================================ */

:root {
  /* Brand */
  --teal: #19ADC5;
  --teal-hover: #1490A5;
  --teal-deep: #0F7689;
  --teal-wash: #E5F5F9;
  --teal-glow: rgba(25, 173, 197, 0.18);

  /* Surfaces */
  --bg: #FAFBFC;
  --bg-warm: #F6F4EF;     /* warm cream for variety, very subtle */
  --surface: #FFFFFF;
  --surface-subtle: #F8FAFC;
  --surface-muted: #F1F5F9;
  --border: #E6EAEF;
  --border-strong: #CFD6DE;

  /* Dark */
  --ink: #0B1220;
  --ink-2: #131B2C;
  --charcoal: #1C1F24;

  /* Text */
  --text: #0F172A;
  --text-muted: #5B6573;
  --text-soft: #8A95A3;
  --text-on-dark: #E9EEF5;
  --text-on-dark-muted: #9AA4B2;

  /* Status */
  --success: #15803D; --success-bg: #DCFCE7;
  --warning: #B45309; --warning-bg: #FEF3C7;
  --danger:  #B91C1C; --danger-bg:  #FEE2E2;
  --info:    #0369A1; --info-bg:    #E0F2FE;

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

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.04), 0 1px 1px rgba(11, 18, 32, 0.03);
  --shadow-md: 0 6px 20px -4px rgba(11, 18, 32, 0.08), 0 2px 6px rgba(11, 18, 32, 0.04);
  --shadow-lg: 0 24px 60px -16px rgba(11, 18, 32, 0.18), 0 8px 24px -10px rgba(11, 18, 32, 0.10);
  --shadow-glow: 0 24px 60px -22px var(--teal-glow);

  /* Type */
  --font-sans: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Instrument Serif", "Cambria", "Times New Roman", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

body {
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  padding: 0;
}

/* -----------------------------------------------------------
   Typography scale
   ----------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-wash);
}
.eyebrow.on-dark { color: #6BD7E8; }
.eyebrow.on-dark::before { box-shadow: 0 0 0 4px rgba(107, 215, 232, 0.12); }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.display {
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 600;
}
.display .ink-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--teal-deep);
}

.h-xl { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.02; letter-spacing: -0.035em; }
.h-lg { font-size: clamp(28px, 3vw, 40px); line-height: 1.08; letter-spacing: -0.025em; }
.h-md { font-size: 22px; line-height: 1.2; letter-spacing: -0.012em; }
.h-sm { font-size: 17px; line-height: 1.3; letter-spacing: -0.005em; font-weight: 600; }

.lede {
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.45;
  color: var(--text-muted);
  text-wrap: pretty;
  max-width: 60ch;
}

.body { font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.caption { font-size: 13px; line-height: 1.5; color: var(--text-soft); }
.mono { font-family: var(--font-mono); font-feature-settings: "ss01"; }

/* -----------------------------------------------------------
   Layout
   ----------------------------------------------------------- */

.wrap { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.wrap-narrow { width: min(960px, calc(100% - 48px)); margin: 0 auto; }
.wrap-wide { width: min(1480px, calc(100% - 32px)); margin: 0 auto; }

section { position: relative; }

.section-pad { padding: clamp(72px, 9vw, 140px) 0; }
.section-pad-sm { padding: clamp(48px, 6vw, 96px) 0; }

.section-dark {
  background: var(--ink);
  color: var(--text-on-dark);
}
.section-dark .hero-bg {
  background: transparent !important;
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 {
  color: var(--text-on-dark);
}
.section-dark .lede, .section-dark .body { color: var(--text-on-dark-muted); }

.section-warm {
  background: var(--bg-warm);
}

/* -----------------------------------------------------------
   Buttons
   ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform .15s ease, background .15s ease, box-shadow .2s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(25, 173, 197, 0.55), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary:hover { background: var(--teal-hover); box-shadow: 0 10px 24px -8px rgba(25, 173, 197, 0.7); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface); }

.btn-ghost-dark {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-color: rgba(255,255,255,0.16);
}
.btn-ghost-dark:hover { background: rgba(255,255,255,0.1); }

.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 15.5px; }

.arrow-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14.5px; font-weight: 500;
  color: var(--teal-deep);
}
.arrow-link::after { content: "→"; transition: transform .2s ease; }
.arrow-link:hover::after { transform: translateX(3px); }

/* -----------------------------------------------------------
   Floating pill nav
   ----------------------------------------------------------- */

.nav-shell {
  position: fixed;
  top: 18px;
  left: 0; right: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 0 16px;
  transition: top .2s ease;
}
.has-dc-banner .nav-shell {
  top: calc(var(--dc-banner-h, 40px) + 12px);
}
.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 56px;
  padding: 6px 6px 6px 22px;
  background: rgba(255,255,255,0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--r-pill);
  box-shadow: 0 14px 40px -16px rgba(11, 18, 32, 0.16), 0 2px 6px rgba(11, 18, 32, 0.04);
  max-width: calc(100vw - 32px);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  color: var(--text);
  text-decoration: none;
}
.nav-brand-logo {
  height: 28px;
  width: auto;
  display: block;
  /* SVG uses currentColor for stroke/fill so the logo follows text color in dark sections */
  color: inherit;
}
.nav-brand-logo--footer {
  height: 36px;
  color: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--r-pill);
  transition: background .15s ease, color .15s ease;
}
.nav-link:hover { background: var(--surface-muted); }
.nav-link.active { color: var(--teal-deep); background: var(--teal-wash); }

.nav-cta {
  margin-left: 4px;
}

/* Hamburger toggle - hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  margin-left: 6px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.nav-toggle:hover { background: var(--surface-subtle); }
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* The mobile drawer covers the full viewport, so we no longer render
   a dim overlay behind it. .nav-backdrop is kept as a no-op so the
   existing markup/JS doesn't break, but it's invisible. */
.nav-backdrop {
  display: none;
}

/* In-drawer CTA group (hidden on desktop) */
.nav-drawer-cta { display: none; }

@media (max-width: 1100px) {
  .nav-link { padding: 8px 10px; font-size: 13px; }
  .nav { padding: 6px 6px 6px 16px; }
  .nav-brand-logo { height: 24px; }
}

@media (max-width: 880px) {
  .nav-shell {
    /* Pin nav-shell so the mobile bar stays put and the drawer opens beneath it */
    padding: 8px 12px;
  }
  .nav {
    padding: 6px 6px 6px 14px;
    height: 56px;
    border-radius: 14px;
    /* Solid background on mobile - backdrop-filter blur reads as a fuzzy
       smear on small screens and confuses the eye, especially over hero
       imagery. Use an opaque white pill instead. */
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* Show the hamburger, drop the secondary ghost CTAs */
  .nav-toggle { display: inline-flex; }
  .nav-cta[href*="sign-in"],
  .nav-cta[href*="sign-up"] { display: none; }
  /* Keep the primary 'Book a demo' button visible for one-tap access */
  .nav-cta[href="/book"] { padding: 6px 12px; font-size: 12.5px; }

  /* Hide the nav-links entirely until the hamburger is tapped. Using
     display:none guarantees the drawer cannot leak into nav flow even
     if a fixed-positioning quirk (transform on an ancestor, viewport
     unit weirdness on iOS, etc) breaks position:fixed. */
  .nav-links {
    display: none;
  }
  html.nav-open .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 88px 22px 32px;
    gap: 4px;
    overflow-y: auto;
    z-index: 100;
    animation: nav-fade-in 0.18s ease-out;
  }
  @keyframes nav-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  .nav-link {
    font-size: 17px;
    font-weight: 500;
    padding: 14px 14px;
    border-radius: 10px;
    width: 100%;
  }
  .nav-link.active { background: var(--teal-wash); color: var(--teal-deep); }

  .nav-drawer-cta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
  }
  .nav-drawer-cta .btn { justify-content: center; width: 100%; }

  /* Lock body scroll while drawer is open */
  html.nav-open, html.nav-open body { overflow: hidden; }
}

/* -----------------------------------------------------------
   Footer
   ----------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: var(--text-on-dark);
  padding: 80px 0 32px;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 14% 0%, rgba(25, 173, 197, 0.18), transparent 50%),
    radial-gradient(circle at 88% 30%, rgba(25, 173, 197, 0.08), transparent 55%);
  pointer-events: none;
}
.footer-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 56px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col h4 {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 18px;
  font-weight: 500;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer-col a {
  font-size: 14px;
  color: rgba(255,255,255,0.82);
  transition: color .15s ease;
}
.footer-col a:hover { color: #fff; }

.footer-brand {
  display: flex; flex-direction: column; gap: 18px;
  max-width: 320px;
}
.footer-brand p {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,0.6);
  margin: 0;
}

.footer-bottom {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  gap: 16px;
  flex-wrap: wrap;
}
.footer-soc {
  display: flex; gap: 10px;
}
.footer-soc a {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.7);
}
.footer-soc a:hover { background: rgba(255,255,255,0.06); color: #fff; }

/* Changelog ticker */
.ticker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  border-radius: var(--r-pill);
  padding: 10px 18px;
  margin-bottom: 56px;
  overflow: hidden;
  font-size: 13px;
}
.ticker-label {
  display: inline-flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.78);
  flex-shrink: 0;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  padding: 4px 12px 4px 10px;
  border-radius: var(--r-pill);
  background: var(--teal-deep);
  border: 1px solid var(--teal-deep);
  color: #fff;
  position: relative;
  z-index: 1;
}
.ticker-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px var(--teal);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.8); }
}
.ticker-track {
  display: flex;
  gap: 48px;
  animation: ticker 60s linear infinite;
  white-space: nowrap;
  color: rgba(255,255,255,0.82);
}
.ticker-track > span { display: inline-flex; align-items: center; gap: 8px; }
.ticker-track strong { color: #fff; font-weight: 500; }
.ticker-track .tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: rgba(25, 173, 197, 0.18);
  color: #6BD7E8;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* -----------------------------------------------------------
   Reusable bits
   ----------------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 500;
  background: var(--surface-muted);
  color: var(--text);
  border: 1px solid var(--border);
}
.chip-teal {
  background: var(--teal-wash);
  color: var(--teal-deep);
  border-color: rgba(25, 173, 197, 0.18);
}
.chip-success { background: var(--success-bg); color: var(--success); border-color: rgba(21, 128, 61, 0.16); }
.chip-warning { background: var(--warning-bg); color: var(--warning); border-color: rgba(180, 83, 9, 0.16); }
.chip-danger { background: var(--danger-bg); color: var(--danger); border-color: rgba(185, 28, 28, 0.16); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.divider {
  height: 1px;
  background: var(--border);
}

/* utility */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.center { display: grid; place-items: center; }
.grid { display: grid; }
.gap-xs { gap: 6px; } .gap-sm { gap: 10px; } .gap-md { gap: 16px; }
.gap-lg { gap: 24px; } .gap-xl { gap: 40px; }

.text-mute { color: var(--text-muted); }
.text-soft { color: var(--text-soft); }
.text-teal { color: var(--teal-deep); }

/* -----------------------------------------------------------
   Generic page header (subpages)
   ----------------------------------------------------------- */

.page-hero {
  padding: 168px 0 80px;
  text-align: left;
}
.page-hero .lede { margin-top: 22px; }
.page-hero .eyebrow { margin-bottom: 22px; }

/* Anchor offset for sticky nav */
[id] { scroll-margin-top: 96px; }

/* =============================================================
   Mobile fixes
   Forces multi-column inline grids to stack, tightens spacing
   for narrow viewports, and a few small touch-target tweaks.
   ============================================================= */

@media (max-width: 760px) {
  /* Inline 2-col grids that can't be overridden by class-only media queries */
  .lab-feat-grid[style*="grid-template-columns"],
  .pricing-2col {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Inline 3-col grids on home + lab pages */
  [style*="grid-template-columns: 1fr 1fr 1fr"],
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }

  /* Tighten wraps so content can breathe on narrow screens */
  .wrap, .wrap-narrow { width: min(1240px, calc(100% - 28px)); }
  .wrap-wide { width: min(1480px, calc(100% - 20px)); }

  /* Reduce section spacing on small screens */
  .section-pad { padding: clamp(56px, 12vw, 96px) 0; }
  .section-pad-sm { padding: clamp(40px, 8vw, 72px) 0; }

  /* Hero CTAs full-width-friendly */
  .hero-ctas .btn,
  .hero-ctas .btn-lg { width: 100%; justify-content: center; }
  .hero-ctas { flex-direction: column; align-items: stretch; }

  /* Tap-friendly button sizing */
  .btn-sm { padding: 10px 14px; }
  .btn-lg { padding: 14px 18px; font-size: 15px; }

  /* Inputs avoid iOS zoom-on-focus (min 16px) */
  input, select, textarea { font-size: 16px !important; }
}

/* Even tighter at very small widths */
@media (max-width: 480px) {
  .display { font-size: clamp(34px, 9vw, 48px); line-height: 1.02; }
  .h-xl    { font-size: clamp(26px, 7vw, 36px); }
  .h-lg    { font-size: clamp(22px, 6vw, 30px); }
  .lede    { font-size: 15.5px; }

  /* Trust-center / large tables wrap horizontally */
  [style*="grid-template-columns: 1.4fr 1fr 1.2fr"] {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    padding: 12px 14px !important;
  }
  [style*="grid-template-columns: 1.4fr 1fr 1.2fr"] code { word-break: break-all; }

  /* Lead form modal: shrink padding */
  .lead-modal-shell { padding: 24px 18px 18px !important; }
  .baa-modal-shell  { max-height: calc(100vh - 16px) !important; }

  /* Footer ticker: hide on tiny screens, save bandwidth */
  .ticker { font-size: 12px; }
}

/* iOS / Safari quirks */
html { -webkit-text-size-adjust: 100%; }
body { overscroll-behavior-y: none; }

/* -----------------------------------------------------------
   .mock-scale - wrapper that renders its child at a fixed
   design width and scales it down with CSS transform on
   narrower viewports. JS sets inline width/transform/height;
   we just need a base block layout here.
   ----------------------------------------------------------- */
.mock-scale {
  display: block;
  width: 100%;
}
.mock-scale > * {
  display: block;
  margin: 0;
}

/* -----------------------------------------------------------
   Announcement banner (site-wide, mounted above the nav)
   ----------------------------------------------------------- */
.dc-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 9px 44px 9px 20px;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal));
  color: #fff;
  font-size: 13.5px;
  line-height: 1.35;
  text-align: center;
}
.dc-banner-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  min-width: 0;
}
.dc-banner-link:hover .dc-banner-arrow { transform: translateX(3px); }
.dc-banner-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}
.dc-banner-copy { color: rgba(255,255,255,0.94); }
.dc-banner-copy strong { color: #fff; font-weight: 600; }
.dc-banner-cta {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.005em;
  transition: background .15s ease;
}
.dc-banner-link:hover .dc-banner-cta { background: rgba(255,255,255,0.22); }
.dc-banner-arrow {
  transition: transform .2s ease;
  opacity: 0.9;
}
.dc-banner-close {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--r-pill);
  background: transparent;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.dc-banner-close:hover { background: rgba(255,255,255,0.15); color: #fff; }
@media (max-width: 900px) {
  .dc-banner-cta { display: none; }
}
@media (max-width: 720px) {
  .dc-banner { font-size: 12.5px; padding: 8px 40px 8px 12px; gap: 8px; }
}
@media (max-width: 560px) {
  .dc-banner-copy {
    max-width: min(72vw, 340px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dc-banner-arrow { display: none; }
}

/* -----------------------------------------------------------
   Team section + live mock (used on index.html and patients.html)
   ----------------------------------------------------------- */
.section-team {
  background:
    radial-gradient(1200px 500px at 15% 0%, rgba(25, 173, 197, 0.10), transparent 60%),
    radial-gradient(900px 400px at 90% 100%, rgba(25, 173, 197, 0.07), transparent 60%),
    var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-team .eyebrow--new::before {
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(25, 173, 197, 0.18);
}
.team-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
}
.team-copy .h-xl { margin: 14px 0 18px; }
.team-pillars {
  display: grid;
  gap: 18px;
  margin: 28px 0 6px;
  padding: 0;
  list-style: none;
}
.team-pillar {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
}
.team-pillar-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-wash);
  color: var(--teal-deep);
  flex: none;
}
.team-pillar strong { display: block; font-weight: 600; margin-bottom: 2px; color: var(--text); }
.team-pillar p { margin: 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.5; }
@media (max-width: 900px) {
  .team-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---- The live mock ---- */
.dc-team-mock {
  --dc-r: 14px;
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  background: #F4F9FB;
  border-radius: 20px;
  padding: 14px;
  border: 1px solid #E1EBF0;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.dc-team-mock::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0) 40%);
}
.dc-team-frame {
  position: relative;
  background: #FFFFFF;
  border-radius: var(--dc-r);
  overflow: hidden;
  border: 1px solid rgba(15, 118, 137, 0.08);
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 380px;
}
.dc-team-side {
  padding: 14px 10px;
  background: #FBFDFE;
  border-right: 1px solid #EEF3F6;
}
.dc-team-side-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #8FA3AE;
  padding: 6px 10px 8px;
}
.dc-team-rooms {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.dc-team-room {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
  cursor: default;
  position: relative;
}
.dc-team-room strong { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.2; }
.dc-team-room em {
  display: block;
  font-style: normal;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
  transition: color .3s ease;
}
.dc-team-room--active {
  background: #E6F4F7;
  box-shadow: inset 3px 0 0 var(--teal);
}
.dc-team-room--active em { color: var(--danger); font-weight: 500; }
.dc-team-room--slim { grid-template-columns: 14px 1fr auto; font-size: 13px; }
.dc-hash { color: #8FA3AE; font-weight: 500; }
.dc-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}
.dc-status--red    { background: #DC2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18); animation: dc-pulse 2s ease-in-out infinite; }
.dc-status--green  { background: #16A34A; }
.dc-status--yellow { background: #D97706; }
.dc-status--teal   { background: var(--teal); }
.dc-status--slate  { background: #94A3B8; }
@keyframes dc-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.05); }
}

.dc-team-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--teal-wash);
  color: var(--teal-deep);
  font-size: 10.5px;
  font-weight: 600;
}

.dc-team-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dc-team-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #EEF3F6;
  font-size: 13.5px;
}
.dc-team-header strong { font-weight: 600; }
.dc-team-header-meta { color: var(--text-soft); font-size: 12px; flex: 1; }
.dc-team-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 500;
}
.dc-team-pill--danger { background: #FEECEC; color: #B91C1C; }
.dc-team-pill--danger::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #DC2626; }

.dc-team-thread {
  padding: 14px 16px 16px;
  display: grid;
  gap: 14px;
  overflow: hidden;
}
.dc-msg {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  opacity: 0;
  transform: translateY(6px);
  animation: dc-msg-in .5s ease forwards;
}
.dc-msg[data-appear="1"] { animation-delay: .35s; }
.dc-msg[data-appear="2"] { animation-delay: 1.6s; }
.dc-msg[data-appear="3"] { animation-delay: 2.7s; }
.dc-msg-in-view .dc-msg { animation-play-state: running; }
@keyframes dc-msg-in {
  to { opacity: 1; transform: none; }
}
.dc-msg-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #DDF0F4;
  color: var(--teal-deep);
  font-size: 10.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.dc-msg-head { font-size: 12.5px; color: var(--text); }
.dc-msg-head strong { font-weight: 600; }
.dc-msg-head span { color: var(--text-soft); margin-left: 8px; font-size: 11.5px; }
.dc-msg-body { font-size: 13.5px; color: var(--text); margin-top: 3px; line-height: 1.5; }
.dc-mention {
  background: var(--teal-wash);
  color: var(--teal-deep);
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 500;
}

.dc-pt-card {
  margin-top: 8px;
  border: 1px solid #E6EDF0;
  border-radius: 12px;
  background: #FCFEFE;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}
.dc-pt-head {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
}
.dc-pt-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #8FA3AE;
  text-transform: uppercase;
}
.dc-pt-name { font-weight: 600; font-size: 13.5px; color: var(--text); }
.dc-pt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  font-size: 12px;
  color: var(--text);
  padding-top: 6px;
  border-top: 1px solid #EEF3F6;
}
.dc-pt-grid > div > div:last-child { margin-top: 2px; font-weight: 500; }

.dc-code-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.dc-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
}
.dc-code strong { font-family: var(--font-mono); font-weight: 600; font-size: 11.5px; }
.dc-code--green { background: #DEF7E5; color: #166534; }
.dc-code--amber { background: #FEF3C7; color: #92400E; }

.dc-typing {
  display: inline-flex;
  gap: 4px;
  padding: 8px 12px;
  background: #F1F5F7;
  border-radius: var(--r-pill);
  align-items: center;
  height: 22px;
  margin-top: 4px;
}
.dc-typing span {
  width: 5px; height: 5px; border-radius: 50%;
  background: #94A3B8;
  animation: dc-blink 1.2s infinite ease-in-out;
}
.dc-typing span:nth-child(2) { animation-delay: 0.15s; }
.dc-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dc-blink {
  0%, 60%, 100% { opacity: 0.3; }
  30%           { opacity: 1; }
}

/* Cycling status on OP 3 (Need assistant → Assistant en route → back) */
.dc-team-room--cycle .dc-team-status-text { position: relative; display: inline-block; }
.dc-team-room--cycle .dc-team-status-text::after {
  content: "Assistant en route";
  position: absolute;
  inset: 0;
  color: var(--success);
  font-weight: 500;
  opacity: 0;
  animation: dc-swap-text 8s ease-in-out infinite;
}
.dc-team-room--cycle .dc-team-status-text {
  animation: dc-swap-orig 8s ease-in-out infinite;
}
.dc-team-room--cycle .dc-status { animation: dc-swap-dot 8s ease-in-out infinite; }
@keyframes dc-swap-text  { 0%,45% {opacity:0;} 55%,90% {opacity:1;} 100% {opacity:0;} }
@keyframes dc-swap-orig  { 0%,45% {color:var(--text-muted);} 55%,90% {color:transparent;} 100% {color:var(--text-muted);} }
@keyframes dc-swap-dot   { 0%,45% {background:#D97706; box-shadow:0 0 0 3px rgba(217,119,6,0.15);} 55%,90% {background:#16A34A; box-shadow:0 0 0 3px rgba(22,163,74,0.15);} 100% {background:#D97706; box-shadow:0 0 0 3px rgba(217,119,6,0.15);} }

/* Tablet / phone: swap the sidebar for a horizontal chip rail across the top */
@media (max-width: 720px) {
  .dc-team-frame {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .dc-team-side {
    border-right: none;
    border-bottom: 1px solid #EEF3F6;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: #FBFDFE;
  }
  .dc-team-side::-webkit-scrollbar { display: none; }
  /* Section labels + CHANNELS list drop away — the operatory chip strip is the story */
  .dc-team-side .dc-team-side-label { display: none; }
  .dc-team-side ul + .dc-team-side-label + ul { display: none; }
  .dc-team-rooms {
    display: inline-flex;
    flex-direction: row;
    gap: 6px;
    padding: 0;
    margin: 0;
    flex: none;
  }
  .dc-team-room {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--r-pill);
    background: #F1F5F7;
    font-size: 12px;
    white-space: nowrap;
    flex: none;
    box-shadow: none;
  }
  .dc-team-room strong { font-size: 12px; }
  .dc-team-room em,
  .dc-team-room .dc-team-status-text,
  .dc-team-room .dc-team-status-text::after { display: none; }
  .dc-team-room--active {
    background: #E6F4F7;
    box-shadow: inset 0 0 0 1.5px var(--teal-deep);
  }
  .dc-team-badge { min-width: 16px; height: 16px; font-size: 10px; padding: 0 5px; }
}

/* Phones: tighten header, thread, patient card, code chips */
@media (max-width: 560px) {
  .dc-team-mock { padding: 8px; border-radius: 16px; }
  .dc-team-header {
    padding: 10px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .dc-team-header-meta { display: none; }
  .dc-team-thread { padding: 12px; gap: 12px; }
  .dc-msg { grid-template-columns: 24px 1fr; gap: 8px; }
  .dc-msg-av { width: 24px; height: 24px; font-size: 9.5px; }
  .dc-msg-body { font-size: 13px; line-height: 1.45; }
  .dc-pt-card { padding: 8px 10px; }
  .dc-pt-head { grid-template-columns: 24px 1fr auto; gap: 8px; }
  .dc-pt-name { font-size: 13px; }
  .dc-pt-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    font-size: 11.5px;
  }
  .dc-code { font-size: 11.5px; padding: 3px 8px; }
  .dc-code strong { font-size: 11px; }
}

/* Very narrow phones: stack the pt-grid single-column so no field truncates */
@media (max-width: 380px) {
  .dc-pt-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .dc-msg { opacity: 1; transform: none; animation: none; }
  .dc-status--red, .dc-team-room--cycle .dc-team-status-text::after,
  .dc-team-room--cycle .dc-team-status-text, .dc-team-room--cycle .dc-status,
  .dc-typing span { animation: none; }
}
