/* ==========================================================================
   HEALTHCARE — /healthcare   (design: assets/html/teamian-healthcare (4).html)
   Namespace: everything is scoped under .thc. Loaded via $pageStyles in
   healthcare.php, paired with assets/js/teamian-healthcare.js.

   1. :root, html and body collapse onto .thc — on :root the mock's tokens
      would redefine --ink and --line site-wide, and its body background would
      restyle the shared header and footer.
   2. .reveal became .thc-rv. main.js runs its own IntersectionObserver over
      every .reveal and toggles .is-visible, while this page's toggles .in.
   3. @keyframes wave became thc-wave. Keyframe names are global however the
      selectors are scoped, and style.css already defines `wave`.
   4. Elements that start hidden do so only under .thc-js, on both the hidden
      and revealed state so neither outranks the other.
   5. The `*` box-sizing reset is dropped (Tailwind preflight owns it) but the
      `*` inside the reduced-motion query is KEPT and scoped to `.thc *` — that
      one is the motion guard, not a reset.
   6. Every `Nfr` grid track became `minmax(0,Nfr)` (9 grids).
   7. .hero clears the 76px fixed nav.
   ========================================================================== */

.thc{
    --page:#efefec;
    --card:#ffffff;
    --card-2:#f7f7f4;
    --dark:#0a0a0a;
    --dark-2:#151515;
    --dark-3:#1c1c1c;

    --ink:#0a0a0a;
    --ink-soft:#5b5b5b;
    --ink-mute:#8a8a86;

    --line:#e6e6e2;
    --line-soft:#eeeeea;
    --line-dark:#1f1f1f;
    --line-dark-2:#2a2a2a;

    --paper-inv:#f5f5f0;
    --paper-inv-soft:rgba(245,245,240,0.62);
    --paper-inv-mute:rgba(245,245,240,0.38);

    --teal:#0d9488;
    --teal-bright:#14b8a6;
    --teal-glow:rgba(20,184,166,0.18);

    --radius-xl:32px;
    --radius-lg:20px;
    --radius-md:14px;

    --shadow-card: 0 24px 60px -30px rgba(10,10,10,0.18);
    --shadow-mockup: 0 30px 60px -25px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.05) inset;
    --shadow-mockup-light: 0 20px 40px -18px rgba(10,10,10,0.28);
    --shadow-stack: 0 -1px 0 rgba(255,255,255,0.03) inset, 0 40px 80px -40px rgba(0,0,0,0.6);
  }

  
  .thc{scroll-behavior:smooth;}
  .thc{
    background:var(--page);
    color:var(--ink);
    font-family:'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-feature-settings:'ss01','cv11','tnum';
    line-height:1.5;
    letter-spacing:-0.005em;
    -webkit-font-smoothing:antialiased;
    /* clip, not hidden. This came off the mock's `body` rule, where it is
       harmless. On a regular wrapper div `overflow-x:hidden` forces
       overflow-y to compute to `auto`, which makes the element a scroll
       container and kills `position:sticky` for every descendant — the
       pinned diagram/stack just scrolled away. `clip` clips on the same
       axis without creating that scroll container, so sticky survives. */
    overflow-x:clip;
  }
  @media (prefers-reduced-motion: reduce){
    .thc *{animation-duration:0.01ms !important; transition-duration:0.01ms !important; scroll-behavior:auto !important;}
    .thc .stack-card{ position:relative !important; top:auto !important; }
  }
  .thc a{color:inherit; text-decoration:none;}
  .thc h1,.thc h2,.thc h3,.thc h4{font-weight:500; letter-spacing:-0.032em; line-height:1.02; color:var(--ink);}
  .thc em.accent{ font-style:normal; color:var(--teal); }

  /* ---------- Layout ---------- */
  .thc .wrap{max-width:1240px; margin:0 auto; padding:0 24px;}

  .thc .panel{
    border-radius:var(--radius-xl);
    padding:80px 72px;
    position:relative;
    overflow:hidden;
  }
  .thc .panel.light{ background:var(--card); color:var(--ink); box-shadow:var(--shadow-card); border:1px solid var(--line-soft);}
  .thc .panel.dark{ background:var(--dark);  color:var(--paper-inv); }
  .thc .panel.dark h1,.thc .panel.dark h2,.thc .panel.dark h3{ color:var(--paper-inv); }
  .thc section{ padding:10px 0; }

  .thc .eyebrow{
    display:inline-flex; align-items:center; gap:10px;
    font-size:11.5px; letter-spacing:0.16em; text-transform:uppercase;
    color:var(--ink-mute); font-weight:500;
  }
  .thc .eyebrow::before{ content:''; width:14px; height:1px; background:currentColor; opacity:.5;}
  .thc .panel.dark .eyebrow{ color:var(--paper-inv-mute); }

  /* ---------- Scroll progress bar (top edge) ---------- */
  .thc .scroll-progress{
    position:fixed; top:0; left:0; right:0; height:2px;
    background:var(--teal-bright);
    transform-origin:left center;
    transform:scaleX(0);
    z-index:100;
    box-shadow:0 0 10px rgba(20,184,166,0.5);
    will-change:transform;
  }

  /* ---------- Floating top-right "Book a demo" pill ---------- */
  /* Moved from top:22px to the bottom-right. The mock had no site chrome, so a
     fixed pill in the top-right corner was free real estate; here it landed
     directly on the shared nav's own "Book demo" button. Dropped under the nav
     (z-50) too, so it can never cover it. The drop-in animation is retuned to
     rise from below rather than fall from above. */
  .thc .float-cta{
    position:fixed; bottom:22px; right:22px; z-index:45;
    background:var(--ink); color:#fff;
    padding:11px 20px; border-radius:999px;
    font-size:13px; font-weight:500;
    box-shadow:0 8px 24px -8px rgba(10,10,10,0.4), 0 0 0 1px rgba(255,255,255,0.05) inset;
    display:inline-flex; align-items:center; gap:8px;
    transition:transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease, background .3s ease;
    opacity:0; transform:translateY(16px);
    animation:ctaDrop .8s cubic-bezier(.2,.8,.2,1) .4s forwards;
  }
  @keyframes ctaDrop{ to{ opacity:1; transform:none;}}
  .thc .float-cta:hover{
    transform:translateY(-2px);
    box-shadow:0 12px 32px -8px rgba(10,10,10,0.5), 0 0 0 1px rgba(20,184,166,0.3);
    background:#000;
  }
  .thc .float-cta .cta-dot{
    width:6px; height:6px; border-radius:50%; background:var(--teal-bright);
    box-shadow:0 0 0 3px rgba(20,184,166,0.25);
    animation:ctaPulse 2s ease-in-out infinite;
  }
  @keyframes ctaPulse{
    0%,100%{ box-shadow:0 0 0 3px rgba(20,184,166,0.25);}
    50%{ box-shadow:0 0 0 5px rgba(20,184,166,0.15);}
  }
  @media (max-width:640px){ .thc .float-cta{ bottom:14px; right:14px; padding:9px 16px; font-size:12.5px;}}

  /* ---------- Right pill nav ---------- */
  .thc .side-nav{
    position:fixed; right:22px; top:50%; transform:translateY(-50%);
    z-index:70;
    background:var(--card); border:1px solid var(--line);
    box-shadow:0 8px 30px -8px rgba(10,10,10,0.16);
    border-radius:16px; padding:6px;
    display:flex; flex-direction:column; gap:4px;
    min-width:130px;
  }
  .thc .side-nav a{
    font-size:12.5px; font-weight:500;
    padding:10px 14px; border-radius:11px;
    color:var(--ink-soft);
    transition:all .25s cubic-bezier(.2,.8,.2,1);
    display:flex; align-items:center; gap:8px;
  }
  .thc .side-nav a:hover{ color:var(--ink); background:var(--card-2);}
  .thc .side-nav a.active{ background:var(--ink); color:#fff;}
  .thc .side-nav a.active::before{
    content:''; width:5px; height:5px; border-radius:50%;
    background:var(--teal-bright); box-shadow:0 0 0 3px rgba(20,184,166,0.28);
  }
  @media (max-width:1080px){ .thc .side-nav{ display:none; }}

  /* ---------- HERO ---------- */
  .thc .hero{ padding:calc(76px + 80px) 24px 40px; }
  .thc .hero-inner{
    max-width:1240px; margin:0 auto;
    display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:40px; align-items:center;
    padding:64px 12px 32px;
  }
  .thc .hero .display{
    font-size:clamp(46px, 5.6vw, 74px);
    letter-spacing:-0.038em; line-height:1.0;
    margin:24px 0 22px; font-weight:450;
  }
  /* Word-by-word cascade reveal for hero heading */
  .thc .hero .display .word{
    display:inline-block;
    opacity:0;
    transform:translateY(40px);
    animation:wordUp .9s cubic-bezier(.2,.8,.2,1) forwards;
    animation-delay:calc(.15s + var(--i) * .08s);
    margin-right:0.22em;
  }
  .thc .hero .display .word.accent{ color:var(--teal);}
  @keyframes wordUp{ to{ opacity:1; transform:none;}}

  /* Hero eyebrow fade-in */
  .thc .hero .eyebrow{
    opacity:0; animation:fadeUp .7s ease .1s forwards;
  }
  .thc .hero .sub,.thc .hero .cta-row,.thc .hero .trust{
    opacity:0; animation:fadeUp .8s ease forwards;
  }
  .thc .hero .sub{ animation-delay:.95s;}
  .thc .hero .cta-row{ animation-delay:1.1s;}
  .thc .hero .trust{ animation-delay:1.25s;}
  @keyframes fadeUp{ from{ opacity:0; transform:translateY(16px);} to{ opacity:1; transform:none;}}
  .thc .hero p.sub{
    font-size:17px; color:var(--ink-soft); max-width:440px; margin-bottom:34px; line-height:1.55;
  }
  .thc .hero .trust{
    display:flex; align-items:center; gap:24px; margin-top:36px; flex-wrap:wrap;
    font-size:12px; color:var(--ink-mute);
  }
  .thc .hero .trust span{ display:inline-flex; align-items:center; gap:6px; }
  .thc .hero .trust span::before{ content:''; width:4px; height:4px; border-radius:50%; background:var(--teal-bright);}
  .thc .cta-row{ display:flex; align-items:center; gap:20px; flex-wrap:wrap;}
  .thc .btn-primary{
    background:var(--ink); color:#fff;
    padding:14px 26px; border-radius:999px;
    font-weight:500; font-size:14.5px;
    transition:transform .22s ease, background .22s ease;
    display:inline-flex; align-items:center; gap:10px;
  }
  .thc .btn-primary:hover{ background:#000; transform:translateY(-1px);}
  .thc .btn-primary .arr{ transition:transform .22s ease;}
  .thc .btn-primary:hover .arr{ transform:translateX(3px);}
  .thc .btn-ghost{
    font-size:14px; color:var(--ink); padding:12px 0;
    border-bottom:1px solid var(--line); transition:border-color .2s ease;
  }
  .thc .btn-ghost:hover{ border-color:var(--ink);}

  /* Hero visual — floating mockup composition with parallax */
  .thc .hero-visual{
    position:relative; height:480px;
    display:flex; align-items:center; justify-content:center;
    will-change:transform;
  }

  /* Slow pulsing halo behind the composition */
  .thc .pulse-halo{
    position:absolute; top:50%; left:50%;
    width:340px; height:340px;
    border-radius:50%;
    background:radial-gradient(circle, rgba(20,184,166,0.06), transparent 65%);
    transform:translate(-50%,-50%);
    animation:haloPulse 5s ease-in-out infinite;
    z-index:1;
  }
  @keyframes haloPulse{
    0%,100%{ transform:translate(-50%,-50%) scale(1); opacity:.9;}
    50%{ transform:translate(-50%,-50%) scale(1.15); opacity:.5;}
  }

  /* Float wrapper — handles position + drift-in + continuous float */
  .thc .fw{
    position:absolute;
    opacity:0;
    animation:
      fwDriftIn 1.1s cubic-bezier(.2,.8,.2,1) var(--delay, .2s) forwards,
      fwFloat 6s ease-in-out infinite calc(var(--delay, .2s) + 1.2s);
  }
  @keyframes fwDriftIn{
    from{ opacity:0; transform:translateY(34px);}
    to{ opacity:1; transform:translateY(0);}
  }
  @keyframes fwFloat{
    0%,100%{ transform:translateY(0);}
    50%{ transform:translateY(-10px);}
  }
  .thc .fw1{ top:8%;   left:0%;   --delay:.25s;}
  .thc .fw2{ top:12%;  right:2%;  --delay:.5s;  animation-delay:.5s, 1.9s;}
  .thc .fw3{ bottom:8%; left:6%;  --delay:1.05s; animation-delay:1.05s, 2.5s;}
  .thc .fw4{ bottom:14%; right:0%; --delay:1.3s; animation-delay:1.3s, 3.1s;}
  .thc .fw-record{ top:50%; left:50%; margin:-115px 0 0 -150px; --delay:.8s; z-index:5;}

  /* Chip: static positioning within wrapper, with hover state */
  .thc .chip{
    background:var(--card); border:1px solid var(--line);
    border-radius:12px; padding:11px 14px;
    box-shadow:var(--shadow-mockup-light);
    font-size:12.5px; font-weight:500;
    display:flex; align-items:center; gap:10px;
    min-width:170px;
    transform:rotate(var(--r, 0deg));
    transition:box-shadow .3s ease, transform .35s cubic-bezier(.34, 1.56, 0.64, 1);
    cursor:default;
  }
  .thc .chip:hover{
    transform:rotate(var(--r, 0deg)) scale(1.06);
    box-shadow:0 24px 44px -18px rgba(10,10,10,0.35);
  }
  .thc .chip .ico{
    width:26px; height:26px; border-radius:7px;
    background:var(--card-2); display:flex; align-items:center; justify-content:center;
    color:var(--ink); flex-shrink:0;
  }
  .thc .chip .ico svg{ width:13px; height:13px;}
  .thc .chip small{ display:block; font-size:11px; color:var(--ink-mute); font-weight:400; margin-top:2px;}
  .thc .chip .txt{ line-height:1.2;}
  .thc .c1{ --r:-6deg;}
  .thc .c2{ --r:5deg;}
  .thc .c3{ --r:4deg;}
  .thc .c4{ --r:-5deg;}

  .thc .record-card{
    width:300px; padding:22px 24px;
    background:var(--card); border:1px solid var(--line);
    border-radius:14px;
    box-shadow:var(--shadow-mockup-light);
    transition:transform .35s cubic-bezier(.34, 1.56, 0.64, 1), box-shadow .35s ease;
    cursor:default;
  }
  .thc .record-card:hover{
    transform:translateY(-4px);
    box-shadow:0 30px 60px -22px rgba(10,10,10,0.35);
  }
  .thc .rc-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px;}
  .thc .rc-tag{ font-size:11px; text-transform:uppercase; letter-spacing:.14em; color:var(--ink-mute); font-weight:500;}
  .thc .rc-avatar{
    width:34px; height:34px; border-radius:50%;
    background:linear-gradient(135deg, #d9d9d9, #ededed);
    display:flex; align-items:center; justify-content:center;
    font-size:12px; font-weight:600;
  }
  .thc .rc-name{ font-size:17px; font-weight:550; margin-bottom:2px;}
  .thc .rc-meta{ font-size:12px; color:var(--ink-mute); margin-bottom:12px;}
  .thc .rc-row{
    display:flex; justify-content:space-between; align-items:center;
    font-size:13px; color:var(--ink-soft); padding:10px 0;
    border-top:1px solid var(--line-soft);
  }
  .thc .rc-row .rc-val{ color:var(--ink); font-weight:500;}
  .thc .rc-row .rc-val.ok{ color:var(--teal); display:inline-flex; align-items:center; gap:6px;}
  .thc .rc-row .rc-val.ok::before{ content:''; width:6px; height:6px; border-radius:50%; background:var(--teal-bright);}

  .thc .chip{
    background:var(--card); border:1px solid var(--line);
    border-radius:12px; padding:11px 14px;
    box-shadow:var(--shadow-mockup-light);
    font-size:12.5px; font-weight:500;
    display:flex; align-items:center; gap:10px;
    min-width:170px;
    z-index:4; position:absolute;
  }
  .thc .chip .ico{
    width:26px; height:26px; border-radius:7px;
    background:var(--card-2); display:flex; align-items:center; justify-content:center;
    color:var(--ink); flex-shrink:0;
  }
  .thc .chip .ico svg{ width:13px; height:13px;}
  .thc .chip small{ display:block; font-size:11px; color:var(--ink-mute); font-weight:400; margin-top:2px;}
  .thc .chip .txt{ line-height:1.2;}
  /* ---------- Chapter interstitial ---------- */
  .thc .chapter{
    min-height:70vh;
    display:flex; align-items:center; justify-content:center;
    background:var(--dark); color:var(--paper-inv);
    border-radius:var(--radius-xl);
    margin:10px 24px;
    position:relative; overflow:hidden;
    text-align:center;
  }
  /* Ambient breathing glow behind chapter title */
  .thc .chapter::before{
    content:''; position:absolute; inset:-40%;
    background:radial-gradient(ellipse at center, rgba(20,184,166,0.14), transparent 55%);
    pointer-events:none;
    animation:breathe 7s ease-in-out infinite;
    transform-origin:center;
  }
  @keyframes breathe{
    0%,100%{ opacity:.75; transform:scale(1);}
    50%{ opacity:1; transform:scale(1.08);}
  }
  /* Second slower rotating layer */
  .thc .chapter::after{
    content:''; position:absolute; inset:0;
    background:
      radial-gradient(circle at 20% 30%, rgba(20,184,166,0.08), transparent 40%),
      radial-gradient(circle at 80% 70%, rgba(20,184,166,0.06), transparent 40%);
    pointer-events:none;
    animation:driftGlow 18s linear infinite;
  }
  @keyframes driftGlow{
    0%{ transform:rotate(0deg);}
    100%{ transform:rotate(360deg);}
  }
  .thc .chapter-inner{ position:relative; z-index:2; padding:80px 32px; max-width:820px;}

  .thc .chapter-icon{
    width:78px; height:78px; margin:0 auto 32px;
    background:var(--card); border-radius:20px;
    display:flex; align-items:center; justify-content:center;
    box-shadow:var(--shadow-mockup);
    opacity:0;
    transform:scale(0.5) rotate(-20deg);
    transition:opacity .6s ease, transform 1s cubic-bezier(.34, 1.56, 0.64, 1);
  }
  .thc .chapter.in .chapter-icon{
    opacity:1; transform:none;
  }
  .thc .chapter-icon svg{ width:36px; height:36px; color:var(--ink); }

  .thc .chapter-title{
    font-size:clamp(60px, 9vw, 130px);
    font-weight:400; color:var(--paper-inv);
    letter-spacing:-0.04em; line-height:1;
  }
  /* Letter-by-letter reveal (spans injected by JS) */
  .thc .chapter-title .l{
    display:inline-block;
    opacity:0;
    transform:translateY(80px) rotateX(-40deg);
    transform-origin:50% 100%;
    transition:opacity .7s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1);
    transition-delay:calc(.25s + var(--i) * .05s);
  }
  .thc .chapter.in .chapter-title .l{
    opacity:1; transform:none;
  }

  .thc .chapter-sub{
    font-size:15px; color:var(--paper-inv-soft);
    margin-top:24px; letter-spacing:0.14em; text-transform:uppercase; font-weight:500;
    opacity:0; transform:translateY(20px);
    transition:opacity .6s ease .1s, transform .6s cubic-bezier(.2,.8,.2,1) .1s;
  }
  .thc .chapter.in .chapter-sub{ opacity:1; transform:none;}

  .thc .chapter-desc{
    font-size:16px; color:var(--paper-inv-soft); margin-top:28px;
    max-width:560px; margin-left:auto; margin-right:auto; line-height:1.55;
    opacity:0; transform:translateY(20px);
    transition:opacity .7s ease .9s, transform .7s cubic-bezier(.2,.8,.2,1) .9s;
  }
  .thc .chapter.in .chapter-desc{ opacity:1; transform:none;}

  /* ---------- Panel layouts ---------- */
  .thc .panel-grid{
    display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:56px; align-items:center;
    min-height:400px;
  }
  .thc .panel-copy .eyebrow{ margin-bottom:20px; }
  .thc .panel-copy h2{
    font-size:clamp(34px, 3.8vw, 48px);
    line-height:1.05; letter-spacing:-0.032em;
    margin-bottom:20px;
  }
  .thc .panel-copy p{
    font-size:16px; line-height:1.6; max-width:440px;
    color:var(--ink-soft); margin-bottom:14px;
  }
  .thc .panel.dark .panel-copy p{ color:var(--paper-inv-soft); }
  .thc .panel-copy p strong{ color:var(--ink); font-weight:550;}
  .thc .panel.dark .panel-copy p strong{ color:#fff;}

  /* ---------- Journey EKG ---------- */
  .thc .journey-viz{ position:relative; width:100%; height:280px;}
  .thc .ekg-line{ width:100%; height:120px; display:block;}
  .thc .ekg-path{
    fill:none; stroke:var(--teal-bright); stroke-width:1.6;
    stroke-linecap:round; stroke-linejoin:round;
    stroke-dasharray:1400; stroke-dashoffset:1400;
    filter:drop-shadow(0 0 6px rgba(20,184,166,0.35));
  }
  .thc .ekg-dot{
    fill:var(--teal-bright); opacity:0;
    transition:opacity .3s ease;
    filter:drop-shadow(0 0 6px rgba(20,184,166,0.6));
    transform-origin:center;
    transform-box:fill-box;
  }
  .thc .ekg-dot.pulsing{
    animation:dotPulse 1.8s ease-in-out infinite;
  }
  @keyframes dotPulse{
    0%,100%{ transform:scale(1); filter:drop-shadow(0 0 6px rgba(20,184,166,0.6));}
    50%{ transform:scale(1.4); filter:drop-shadow(0 0 12px rgba(20,184,166,0.9));}
  }
  .thc .ekg-baseline{ stroke:rgba(245,245,240,0.08); stroke-width:1; stroke-dasharray:3 5;}

  .thc .ekg-stages{
    display:flex; justify-content:space-between; margin-top:30px; gap:16px;
  }
  .thc .ekg-stage{
    flex:1; padding-top:16px; border-top:1px solid var(--line-dark);
    opacity:0; transform:translateY(12px);
    transition:opacity .6s ease, transform .6s ease;
  }
  .thc .ekg-stage.in-view{ opacity:1; transform:none;}
  .thc .ekg-stage .s-num{
    font-size:11px; color:var(--paper-inv-mute); letter-spacing:.14em; text-transform:uppercase; font-weight:500;
    margin-bottom:8px; display:flex; align-items:center; gap:6px;
  }
  .thc .ekg-stage .s-num::before{ content:''; width:5px; height:5px; border-radius:50%; background:var(--teal-bright);}
  .thc .ekg-stage h4{ font-size:15px; color:var(--paper-inv); font-weight:500; letter-spacing:-0.015em; margin-bottom:4px;}
  .thc .ekg-stage p{ font-size:12.5px; color:var(--paper-inv-mute); line-height:1.45;}

  /* ---------- WhatsApp phone mockup ---------- */
  .thc .wa-mockup{
    position:relative; width:100%; height:400px;
    display:flex; align-items:center; justify-content:center;
  }
  .thc .wa-phone{
    width:290px; background:var(--dark-2); border:1px solid var(--line-dark);
    border-radius:22px; padding:16px; position:relative;
    box-shadow:var(--shadow-mockup);
  }
  .thc .wa-header{
    display:flex; align-items:center; gap:10px; padding-bottom:12px;
    border-bottom:1px solid var(--line-dark);
  }
  .thc .wa-avatar{
    width:32px; height:32px; border-radius:50%;
    background:var(--teal); color:#fff; font-size:11px; font-weight:600;
    display:flex; align-items:center; justify-content:center;
  }
  .thc .wa-header .name{ font-size:13px; color:var(--paper-inv); font-weight:500;}
  .thc .wa-header .status{ font-size:10.5px; color:var(--paper-inv-mute);}
  .thc .wa-body{ padding-top:14px; display:flex; flex-direction:column; gap:8px;}
  .thc .wa-msg{
    max-width:82%; padding:9px 12px; border-radius:12px;
    font-size:12.5px; line-height:1.4;
    background:var(--dark-3); color:var(--paper-inv-soft);
    align-self:flex-start;
    opacity:0; animation:msgIn .6s ease forwards;
  }
  .thc .wa-msg.mine{ background:rgba(20,184,166,0.18); color:#e2fbf6; align-self:flex-end;}
  .thc .wa-msg.m1{ animation-delay:.3s;}
  .thc .wa-msg.m2{ animation-delay:.9s;}
  .thc .wa-msg.m3{ animation-delay:1.5s;}
  .thc .wa-msg.m4{ animation-delay:2.1s;}
  @keyframes msgIn{ from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:none;}}
  .thc .wa-time{ font-size:10px; color:var(--paper-inv-mute); text-align:center; margin:8px 0 2px;}

  /* ═══════════════════════════════════════════════════════════ */
  /* ══════════  SCROLL-STACK OVERLAP CARDS  ═════════════════════ */
  /* ═══════════════════════════════════════════════════════════ */
  .thc .stack-header{
    max-width:640px; margin:0 auto 60px; text-align:center;
  }
  .thc .stack-header .eyebrow{ justify-content:center;}
  .thc .stack-header h2{
    font-size:clamp(38px, 4.4vw, 56px);
    margin-top:14px; letter-spacing:-0.035em; line-height:1.03;
  }
  .thc .stack-header p{
    font-size:16.5px; color:var(--ink-soft); margin-top:18px; line-height:1.55;
  }
  .thc .stack-header .scroll-cue{
    font-size:11.5px; text-transform:uppercase; letter-spacing:.14em; color:var(--ink-mute);
    margin-top:28px; font-weight:500;
    display:inline-flex; align-items:center; gap:8px;
    animation:bob 2.2s ease-in-out infinite;
  }
  @keyframes bob{ 0%,100%{ transform:translateY(0);} 50%{ transform:translateY(4px);}}

  .thc .stack-cards{
    position:relative;
    padding-bottom:20vh; /* extra room so last card can scroll fully */
    isolation:isolate;
  }
  .thc .stack-card{
    position:sticky;
    /* 60px in the mock; the fixed nav is 76px tall, so the first cards in the
       stack were tucking behind it. Offset past the nav, stagger unchanged. */
    top: calc(76px + 20px + var(--i) * 22px);
    z-index: calc(var(--i) + 1); /* later cards always paint over earlier ones */
    background:var(--dark); color:var(--paper-inv);
    border-radius:var(--radius-xl);
    padding:56px 60px;
    margin-bottom:28px;
    min-height:70vh; max-height:520px;
    box-shadow:var(--shadow-stack);
    border:1px solid var(--line-dark-2);
    overflow:hidden;
    display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,0.95fr); gap:48px; align-items:center;
    transition:transform .5s cubic-bezier(.2,.8,.2,1), border-color .4s ease, box-shadow .4s ease;
  }
  /* Covered cards recede behind an opaque scrim instead of turning translucent —
     fading the card itself let the card underneath bleed through the text. */
  .thc .stack-card::after{
    content:'';
    position:absolute; inset:0;
    border-radius:inherit;
    background:#000;
    opacity:var(--cover, 0);
    pointer-events:none;
    transition:opacity .45s cubic-bezier(.2,.8,.2,1);
    z-index:5;
  }
  .thc .stack-card:hover{
    border-color:rgba(20,184,166,0.35);
    box-shadow:var(--shadow-stack), 0 0 40px -10px rgba(20,184,166,0.25);
  }
  .thc .stack-card[data-tone="light"]:hover{
    border-color:rgba(20,184,166,0.4);
    box-shadow:var(--shadow-card), 0 0 40px -10px rgba(20,184,166,0.3);
  }
  /* Alternate card backgrounds — dark → slightly lighter dark → light card for variation */
  .thc .stack-card[data-tone="light"]{
    background:var(--card); color:var(--ink); border-color:var(--line-soft);
    box-shadow:var(--shadow-card);
  }
  .thc .stack-card[data-tone="light"] .sc-num,.thc .stack-card[data-tone="light"] .sc-eyebrow{
    color:var(--ink-mute);
  }
  .thc .stack-card[data-tone="light"] .sc-copy p{ color:var(--ink-soft);}
  .thc .stack-card[data-tone="light"] .sc-badge{ background:var(--card-2); border-color:var(--line);}
  .thc .stack-card[data-tone="light"] .sc-badge strong{ color:var(--ink);}

  .thc .sc-num{
    font-size:12px; color:var(--paper-inv-mute); letter-spacing:.16em;
    text-transform:uppercase; font-weight:500; margin-bottom:20px;
    display:flex; align-items:center; gap:10px;
  }
  .thc .sc-num::before{
    content:''; width:6px; height:6px; border-radius:50%; background:var(--teal-bright);
  }
  .thc .sc-copy h3{
    font-size:clamp(30px, 3.2vw, 42px); font-weight:500;
    letter-spacing:-0.03em; line-height:1.05; margin-bottom:16px;
    color:inherit;
  }
  .thc .sc-copy p{
    font-size:16px; color:var(--paper-inv-soft); line-height:1.6; max-width:440px;
    margin-bottom:20px;
  }
  .thc .sc-badge{
    display:inline-flex; align-items:center; gap:10px;
    background:var(--dark-2); border:1px solid var(--line-dark);
    padding:10px 16px; border-radius:999px;
    font-size:13px; color:var(--paper-inv-soft);
    margin-top:8px;
  }
  .thc .sc-badge strong{ color:#fff; font-weight:600;}
  .thc .sc-badge .dot{ width:6px; height:6px; border-radius:50%; background:var(--teal-bright);}

  /* Right-side visuals inside each stack card */
  .thc .sc-viz{
    position:relative; height:100%; min-height:280px;
    display:flex; align-items:center; justify-content:center;
  }

  /* Mini record card viz for stack cards */
  .thc .sc-record{
    width:280px; padding:20px 22px;
    background:var(--dark-2); border:1px solid var(--line-dark);
    border-radius:14px;
    box-shadow:0 20px 40px -20px rgba(0,0,0,0.7);
    color:var(--paper-inv);
  }
  .thc .stack-card[data-tone="light"] .sc-record{
    background:var(--card); border-color:var(--line);
    box-shadow:var(--shadow-mockup-light);
    color:var(--ink);
  }
  .thc .sc-record .rr-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:12px;}
  .thc .sc-record .rr-tag{ font-size:10.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--paper-inv-mute); font-weight:500;}
  .thc .stack-card[data-tone="light"] .sc-record .rr-tag{ color:var(--ink-mute);}
  .thc .sc-record .rr-name{ font-size:16px; font-weight:550; margin-bottom:2px;}
  .thc .sc-record .rr-meta{ font-size:11.5px; color:var(--paper-inv-mute); margin-bottom:12px;}
  .thc .stack-card[data-tone="light"] .sc-record .rr-meta{ color:var(--ink-mute);}
  .thc .sc-record .rr-row{
    display:flex; justify-content:space-between; font-size:12.5px;
    color:var(--paper-inv-soft); padding:8px 0;
    border-top:1px solid var(--line-dark);
  }
  .thc .stack-card[data-tone="light"] .sc-record .rr-row{ color:var(--ink-soft); border-color:var(--line-soft);}
  .thc .sc-record .rr-row .v{ color:#fff; font-weight:500;}
  .thc .stack-card[data-tone="light"] .sc-record .rr-row .v{ color:var(--ink);}

  /* Voice waveform viz */
  .thc .sc-voice{
    width:280px; padding:22px 24px;
    background:var(--dark-2); border:1px solid var(--line-dark);
    border-radius:14px;
    box-shadow:0 20px 40px -20px rgba(0,0,0,0.7);
    color:var(--paper-inv);
  }
  .thc .voice-head{ display:flex; align-items:center; gap:12px; margin-bottom:16px;}
  .thc .voice-head .call-ico{
    width:36px; height:36px; border-radius:50%;
    background:var(--teal); display:flex; align-items:center; justify-content:center;
    color:#fff;
  }
  .thc .voice-head .call-ico svg{ width:15px; height:15px;}
  .thc .voice-head .lbl{ font-size:12.5px; color:var(--paper-inv); font-weight:500;}
  .thc .voice-head .sub{ font-size:10.5px; color:var(--paper-inv-mute); text-transform:uppercase; letter-spacing:.12em; margin-top:1px;}
  .thc .voice-waves{ display:flex; align-items:center; justify-content:center; gap:3px; height:40px; margin-top:14px;}
  .thc .voice-waves span{
    width:3px; background:var(--teal-bright); border-radius:2px;
    animation:thc-wave 1.4s ease-in-out infinite;
  }
  .thc .voice-waves span:nth-child(1){ height:35%; animation-delay:0s;}
  .thc .voice-waves span:nth-child(2){ height:60%; animation-delay:.15s;}
  .thc .voice-waves span:nth-child(3){ height:85%; animation-delay:.3s;}
  .thc .voice-waves span:nth-child(4){ height:100%; animation-delay:.45s;}
  .thc .voice-waves span:nth-child(5){ height:70%; animation-delay:.6s;}
  .thc .voice-waves span:nth-child(6){ height:45%; animation-delay:.75s;}
  .thc .voice-waves span:nth-child(7){ height:80%; animation-delay:.9s;}
  .thc .voice-waves span:nth-child(8){ height:55%; animation-delay:1.05s;}
  .thc .voice-waves span:nth-child(9){ height:30%; animation-delay:1.2s;}
  @keyframes thc-wave{
    0%,100%{ transform:scaleY(0.6); opacity:.6;}
    50%{ transform:scaleY(1); opacity:1;}
  }
  .thc .voice-lang{ display:flex; gap:6px; margin-top:16px; flex-wrap:wrap;}
  .thc .voice-lang span{
    font-size:10.5px; color:var(--paper-inv-soft);
    background:var(--dark-3); border:1px solid var(--line-dark-2);
    padding:4px 9px; border-radius:6px;
  }

  /* Mini WhatsApp bubbles viz */
  .thc .sc-msgs{ width:280px; display:flex; flex-direction:column; gap:8px;}
  .thc .sc-msgs .m{
    padding:10px 13px; border-radius:12px; font-size:13px; line-height:1.45;
    background:var(--dark-2); color:var(--paper-inv-soft);
    border:1px solid var(--line-dark);
    max-width:88%;
  }
  .thc .stack-card[data-tone="light"] .sc-msgs .m{
    background:var(--card-2); color:var(--ink-soft); border-color:var(--line-soft);
  }
  .thc .sc-msgs .m.mine{
    background:rgba(20,184,166,0.15); color:#e2fbf6; border-color:rgba(20,184,166,0.2);
    align-self:flex-end;
  }
  .thc .stack-card[data-tone="light"] .sc-msgs .m.mine{
    background:var(--ink); color:#fff; border-color:var(--ink);
  }

  /* Chatbot bubble viz */
  .thc .sc-chatbot{
    width:280px; padding:20px 22px;
    background:var(--dark-2); border:1px solid var(--line-dark);
    border-radius:14px;
    box-shadow:0 20px 40px -20px rgba(0,0,0,0.7);
    color:var(--paper-inv);
  }
  .thc .cb-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px;}
  .thc .cb-header .site{ font-size:12px; color:var(--paper-inv-mute);}
  .thc .cb-header .status{ font-size:10px; color:var(--teal-bright); display:inline-flex; align-items:center; gap:5px;}
  .thc .cb-header .status::before{ content:''; width:5px; height:5px; border-radius:50%; background:var(--teal-bright);}
  .thc .cb-msg{
    background:var(--dark-3); border:1px solid var(--line-dark-2);
    padding:11px 13px; border-radius:10px 10px 10px 3px;
    font-size:12.5px; color:var(--paper-inv-soft); line-height:1.45;
    margin-bottom:8px;
  }
  .thc .cb-input{
    display:flex; align-items:center; gap:8px; padding:10px 12px;
    background:var(--dark-3); border-radius:8px; margin-top:10px;
    font-size:12px; color:var(--paper-inv-mute);
  }

  /* Calendar viz */
  .thc .sc-cal{
    width:290px; padding:18px 20px;
    background:var(--dark-2); border:1px solid var(--line-dark);
    border-radius:14px;
    box-shadow:0 20px 40px -20px rgba(0,0,0,0.7);
    color:var(--paper-inv);
  }
  .thc .cal-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:14px;}
  .thc .cal-head .month{ font-size:13px; font-weight:500; color:var(--paper-inv);}
  .thc .cal-head .nav{ font-size:11px; color:var(--paper-inv-mute); letter-spacing:.1em;}
  .thc .cal-days{ display:grid; grid-template-columns:repeat(7, minmax(0,1fr)); gap:3px; font-size:10.5px; color:var(--paper-inv-mute); text-align:center;}
  .thc .cal-days .day-name{ padding:4px 0; font-weight:500;}
  .thc .cal-days .day{
    padding:8px 0; border-radius:6px; color:var(--paper-inv-soft);
    background:var(--dark-3);
  }
  .thc .cal-days .day.booked{ background:rgba(20,184,166,0.2); color:#e2fbf6;}
  .thc .cal-days .day.today{ background:var(--teal); color:#fff; font-weight:600;}
  .thc .cal-days .day.empty{ background:transparent;}

  /* Analytics chart viz */
  .thc .sc-chart{
    width:320px; padding:22px 24px;
    background:var(--dark-2); border:1px solid var(--line-dark);
    border-radius:14px;
    box-shadow:0 20px 40px -20px rgba(0,0,0,0.7);
    color:var(--paper-inv);
  }
  .thc .ch-head{ display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:16px;}
  .thc .ch-title{ font-size:13px; color:var(--paper-inv); font-weight:500;}
  .thc .ch-sub{ font-size:10.5px; color:var(--paper-inv-mute); text-transform:uppercase; letter-spacing:.14em; margin-top:2px;}
  .thc .ch-value{ font-size:26px; font-weight:500; color:var(--paper-inv); letter-spacing:-0.02em; font-variant-numeric:tabular-nums;}
  .thc .ch-change{ font-size:11px; color:var(--teal-bright); margin-top:2px; font-weight:500;}
  .thc .chart-bars{
    display:flex; align-items:flex-end; justify-content:space-between; gap:5px;
    height:72px; margin-top:12px;
  }
  .thc .chart-bars span{
    flex:1; background:var(--line-dark-2); border-radius:3px 3px 0 0;
    transform-origin:bottom; transform:scaleY(0);
    animation:barGrow .8s cubic-bezier(.2,.8,.2,1) forwards;
  }
  .thc .chart-bars span:nth-child(1){ height:32%; animation-delay:.1s;}
  .thc .chart-bars span:nth-child(2){ height:48%; animation-delay:.15s;}
  .thc .chart-bars span:nth-child(3){ height:38%; animation-delay:.2s;}
  .thc .chart-bars span:nth-child(4){ height:62%; animation-delay:.25s;}
  .thc .chart-bars span:nth-child(5){ height:55%; animation-delay:.3s;}
  .thc .chart-bars span:nth-child(6){ height:72%; animation-delay:.35s;}
  .thc .chart-bars span:nth-child(7){ height:88%; animation-delay:.4s; background:var(--teal-bright);}
  @keyframes barGrow{ to{ transform:scaleY(1);}}

  /* Analytics mockup (Chapter 3 panel) */
  .thc .analytics-mockup{
    position:relative; width:100%; height:360px;
    display:flex; align-items:center; justify-content:center;
  }
  .thc .chart-card-lg{
    background:var(--dark-2); border:1px solid var(--line-dark);
    border-radius:16px; padding:22px 24px;
    box-shadow:var(--shadow-mockup);
    width:340px; position:relative;
    color:var(--paper-inv);
  }
  .thc .stat-chip{
    background:var(--dark-2); border:1px solid var(--line-dark);
    border-radius:14px; padding:16px 20px;
    box-shadow:var(--shadow-mockup);
    color:var(--paper-inv); position:absolute;
  }
  .thc .stat-chip .lbl{ font-size:10.5px; color:var(--paper-inv-mute); text-transform:uppercase; letter-spacing:.14em; font-weight:500;}
  .thc .stat-chip .val{ font-size:26px; font-weight:500; color:var(--paper-inv); letter-spacing:-0.02em; margin-top:4px; font-variant-numeric:tabular-nums;}
  .thc .stat-chip .sub{ font-size:11px; color:var(--teal-bright); margin-top:2px;}
  .thc .sc-a{ top:6%;   right:8%;  transform:rotate(4deg);}
  .thc .sc-b{ bottom:6%; left:8%;   transform:rotate(-3deg);}

  /* ---------- Big statement / Comparison ---------- */
  .thc .statement.panel{ padding:100px 72px; text-align:center;}
  .thc .statement .eyebrow{ justify-content:center; color:var(--paper-inv-mute);}
  .thc .statement .eyebrow::before{ background:var(--paper-inv-mute);}
  .thc .statement h2{
    font-size:clamp(38px, 5.4vw, 68px);
    letter-spacing:-0.038em; line-height:1.02; max-width:900px; margin:20px auto 30px;
    font-weight:400;
  }
  .thc .statement h2 em{ color:var(--teal-bright); font-style:normal;}
  .thc .statement p.lead{
    color:var(--paper-inv-soft); max-width:600px; margin:0 auto 40px; font-size:16px; line-height:1.6;
  }

  /* Compact comparison inside statement */
  .thc .mini-compare{
    display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:1px;
    background:var(--line-dark-2);
    border:1px solid var(--line-dark-2); border-radius:var(--radius-md);
    overflow:hidden; max-width:820px; margin:36px auto 0;
    text-align:left;
  }
  .thc .mini-compare > div{
    background:var(--dark-2); padding:24px 28px;
  }
  .thc .mini-compare .h{
    font-size:11px; color:var(--paper-inv-mute); text-transform:uppercase; letter-spacing:.14em; font-weight:500; margin-bottom:14px;
  }
  .thc .mini-compare .row{
    display:flex; justify-content:space-between; align-items:center;
    padding:8px 0; font-size:13.5px; color:var(--paper-inv-soft);
    border-top:1px solid var(--line-dark);
  }
  .thc .mini-compare .row:first-of-type{ border-top:none;}
  .thc .mini-compare > div.teamian{
    background:linear-gradient(180deg, var(--dark-2), rgba(20,184,166,0.08));
    position:relative;
  }
  .thc .mini-compare > div.teamian .h{ color:var(--teal-bright);}
  .thc .mini-compare > div.teamian .row{ color:#fff;}
  .thc .mini-compare > div.teamian::before{
    content:''; position:absolute; left:0; top:0; bottom:0; width:2px; background:var(--teal-bright);
  }

  /* Specialty tag row */
  .thc .spec-tags{
    display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-top:36px;
  }
  .thc .spec-tags span{
    font-size:13px; padding:9px 16px; border-radius:999px;
    border:1px solid var(--line-dark-2); color:var(--paper-inv-soft);
    background:rgba(255,255,255,0.02);
    display:inline-flex; align-items:center; gap:8px;
    transition:border-color .2s, color .2s;
  }
  .thc .spec-tags span::before{ content:''; width:5px; height:5px; border-radius:50%; background:var(--paper-inv-mute); transition:background .2s;}
  .thc .spec-tags span:hover{ border-color:var(--teal-bright); color:#fff;}
  .thc .spec-tags span:hover::before{ background:var(--teal-bright);}

  /* ---------- FAQ ---------- */
  .thc .faq.panel{ padding:80px 72px;}
  .thc .faq-head{ max-width:600px; margin-bottom:40px;}
  .thc .faq-head h2{ font-size:clamp(32px, 3.6vw, 44px); margin-top:14px; letter-spacing:-0.032em;}
  .thc .faq-head p{ color:var(--ink-soft); margin-top:16px; font-size:15px; line-height:1.55;}
  .thc .faq-list{ border-top:1px solid var(--line-soft);}
  .thc .faq-item{ border-bottom:1px solid var(--line-soft);}
  .thc .faq-q{
    display:flex; justify-content:space-between; align-items:center; gap:20px;
    padding:22px 4px; cursor:pointer; font-size:16.5px; font-weight:500;
    transition:color .2s ease;
  }
  .thc .faq-q:hover{ color:var(--teal);}
  .thc .faq-q .icon{
    width:28px; height:28px; border-radius:50%; border:1px solid var(--line);
    display:flex; align-items:center; justify-content:center;
    font-size:15px; color:var(--ink-soft); flex-shrink:0;
    transition:transform .3s ease, border-color .2s, color .2s;
    line-height:1;
  }
  .thc .faq-item.open .faq-q .icon{ transform:rotate(45deg); color:var(--teal); border-color:var(--teal);}
  .thc .faq-a{
    max-height:0; overflow:hidden; transition:max-height .4s ease;
    color:var(--ink-soft); font-size:15px; line-height:1.6;
  }
  .thc .faq-a p{ padding:0 4px 22px; max-width:760px;}
  .thc .faq-item.open .faq-a{ max-height:280px;}

  /* ---------- Closer ---------- */
  .thc .closer.panel{ text-align:center; padding:130px 40px; position:relative;}
  .thc .closer::before{
    content:''; position:absolute; inset:0;
    background:radial-gradient(ellipse at center top, rgba(20,184,166,0.12), transparent 60%);
    pointer-events:none;
  }
  .thc .closer h2{
    font-size:clamp(38px, 5vw, 68px); max-width:720px; margin:0 auto 20px;
    letter-spacing:-0.036em; font-weight:400;
  }
  .thc .closer p{ color:var(--paper-inv-soft); max-width:460px; margin:0 auto 36px; font-size:16px;}
  .thc .closer .btn-primary{ background:#fff; color:var(--ink);}
  .thc .closer .btn-primary:hover{ background:var(--teal-bright); color:var(--ink);}
  .thc .closer .foot-note{ font-size:12px; color:var(--paper-inv-mute); margin-top:24px;}
  /* Extra bottom breathing room since no footer */
  .thc{ padding-bottom:60px;}

    .thc :focus-visible{ outline:2px solid var(--teal); outline-offset:3px; border-radius:4px;}

  /* Reveal on scroll */
  /* Gated on .thc-js (set inline at the top of healthcare.php): these start
     invisible and are revealed by the observer in teamian-healthcare.js, so
     without the gate a stylesheet that loads while the script fails would
     leave the page blank. Prefix on BOTH states. */
  .thc-js .thc .thc-rv{ opacity:0; transform:translateY(24px); transition:opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1);}
  .thc-js .thc .thc-rv.in{ opacity:1; transform:none;}

  /* ---------- Responsive ---------- */
  @media (max-width:1024px){
    .thc .panel{ padding:56px 40px;}
    .thc .panel-grid{ grid-template-columns:minmax(0,1fr); gap:36px;}
    .thc .hero-inner{ grid-template-columns:minmax(0,1fr); gap:36px;}
    .thc .hero-visual{ height:400px;}
    .thc .chapter{ margin:10px 16px;}
    .thc .chapter-title{ font-size:clamp(52px, 12vw, 90px);}
    .thc .side-nav{ display:none;}
    .thc .faq.panel,.thc .statement.panel{ padding-left:40px; padding-right:40px;}
    .thc .stack-card{
      grid-template-columns:minmax(0,1fr); gap:28px; padding:40px 36px;
      min-height:auto; max-height:none;
    }
    .thc .sc-viz{ min-height:200px;}
    .thc .mini-compare{ grid-template-columns:minmax(0,1fr);}
  }
  @media (max-width:640px){
    .thc .panel{ padding:44px 24px; border-radius:24px;}
    .thc .chapter{ border-radius:24px; min-height:60vh;}
    .thc .hero{ padding:calc(76px + 60px) 14px 20px;}
    .thc .hero-inner{ padding:20px 6px;}
    .thc .hero-visual{ height:380px;}
    .thc .closer h2{ font-size:38px;}
    .thc .chip{ min-width:150px; font-size:12px;}
    .thc .fw1{ left:-4%;} .thc .fw2{ right:-4%;} .thc .fw4{ right:-4%;}
    .thc .fw-record{ margin:-115px 0 0 -140px;}
    .thc .stack-card{ padding:32px 24px; border-radius:24px; top:calc(50px + var(--i) * 12px);}
  }
