/* ============================================================
   AITHRIX — AI Plumbing · 通脉 practice page
   Inherits tokens + nav/footer/buttons + .svc-seal from style.css.
   Grammar (same as demos.css, see CLAUDE.md "Demo widget grammar"): one card at most
   (.pipe-board / .pipe-diag), hairline columns instead of cards, seals for states,
   .btn-shaped deep links, sans kickers + real mono for data, serif voice lines,
   glow only on activation (chip .on, pipe/branch .sel).
   ============================================================ */

/* ===== hero — landing-style, cover pipes art on the right ===== */
.pl-hero{padding:150px 0 80px;position:relative;overflow:hidden}
.pl-hero::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(700px 460px at 82% 18%, rgba(55,224,176,.13), transparent 60%)}
.pl-hero .wrap{position:relative;z-index:1;display:grid;
  grid-template-columns:minmax(0,1.02fr) minmax(0,.98fr);gap:54px;align-items:center}
.pl-hero h1{font-size:clamp(34px,4.4vw,60px);font-weight:800;letter-spacing:-.02em;line-height:1.08;margin:18px 0 20px}
.pl-hero h1 .accent{color:var(--accent)}
body.zh .pl-hero h1{letter-spacing:.02em;line-height:1.22}
.pl-hero .slogan{font-size:15px;letter-spacing:.32em;color:var(--accent);opacity:.9;margin-bottom:20px}
.pl-hero .lede{color:var(--dim);font-size:16px;line-height:1.85;max-width:52ch}
.pl-hero .cta{margin-top:32px;display:flex;gap:14px;flex-wrap:wrap}
.pl-cover{width:100%;max-width:560px;justify-self:end;display:block}

/* ===== generic section scaffolding ===== */
.pl-sec{padding:104px 0;border-top:1px solid var(--line)}
.pl-sec .eyebrow{margin-bottom:14px;display:block}
.pl-sec h2.display{font-size:clamp(28px,3.4vw,48px);margin-bottom:34px;line-height:1.12}
.pl-duo{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);gap:60px;align-items:center}
.pl-duo .txt p{color:var(--dim);font-size:16px;line-height:1.9;margin-bottom:16px}
.pl-duo .txt p b{color:var(--ink);font-weight:600}
.pl-diagram{width:100%;display:block}
.pl-center{max-width:780px;margin:0 auto}
.pl-cap{margin-top:18px;text-align:center;color:var(--dim);font-size:14.5px;line-height:1.7;font-family:var(--serif);font-style:italic}
/* voice lines fall back to --cjk, upright, in Chinese (style.css .st-echo pattern) */
body.zh .pl-cap,body.zh .entry-echo,body.zh .cat-note{font-family:var(--cjk);font-style:normal;letter-spacing:.04em}
/* 汉字 seal inside the h2s (诊 / 通 / 枢): the .svc-seal mark scaled to the heading */
.pl-sec h2 .svc-seal{display:inline-block;font-style:normal;font-family:var(--cjk);font-weight:400;font-size:.46em;line-height:1;
  vertical-align:.32em;color:var(--dim);border:1px solid rgba(242,239,233,.3);border-radius:var(--r-mark);
  padding:.16em .3em .12em;margin:0 .12em;letter-spacing:0}

/* diagram flow dashes (cover / building / hub) — periods divide the offset for a seamless loop */
.fl-a{stroke-dasharray:3 13;animation:pflow 3.8s linear infinite}   /* aging drip-feed  (16) */
.fl-m{stroke-dasharray:7 9;animation:pflow 1.9s linear infinite}    /* modern flow      (16) */
.fl-o{stroke-dasharray:10 6;animation:pflow 1.3s linear infinite}   /* owned full bore  (16) */
.fl-b{stroke-dasharray:6 10;animation:pflow 1.6s linear infinite}   /* branch feeds     (16) */
.fl-mesh{stroke-dasharray:5 11;animation:pflow 2.6s linear infinite}/* hub agent mesh   (16) */
.fl-up{stroke-dasharray:7 9;animation:pflow 1.7s linear infinite}   /* hub uplinks      (16) */
@keyframes pflow{to{stroke-dashoffset:-32}}
.drip{animation:pdrip 2.8s ease-in infinite}
.drip.d2,.pm-drip.d2{animation-delay:1.4s}
@keyframes pdrip{0%{transform:translateY(-10px);opacity:0}30%{opacity:.85}100%{transform:translateY(8px);opacity:0}}

/* ============================================================
   Interactive pipe-network diagnosis
   ============================================================ */
.pl-hint{color:var(--dim);font-size:14px;margin:-20px 0 26px}
/* SOLID background is load-bearing: .pm-halo strokes in the same colour carve the
   weave gaps where pipes cross. NEVER change this to a gradient. */
.pipe-board{--pipes-bg:var(--bg2);background:var(--pipes-bg);border:1px solid var(--line);
  border-radius:var(--r-card);padding:26px 26px 14px}
.pipemap{width:100%;display:block}
.pm-pipe{color:var(--c);transition:opacity .35s var(--ease)}
.pipemap.has-sel .pm-pipe:not(.sel){opacity:.5}
.pipemap.has-sel .pm-pipe.hov{opacity:.85}
.pm-halo{stroke:var(--pipes-bg);stroke-width:27;fill:none}
.pm-body{stroke:var(--c);stroke-width:16;fill:none;opacity:.92;transition:filter .3s var(--ease),opacity .3s var(--ease)}
.pm-bore{stroke:var(--pipes-bg);stroke-width:11;fill:none}
.pm-flow{stroke:var(--c);stroke-width:2.2;fill:none;stroke-linecap:round}
.pm-pipe[data-state="modern"] .pm-flow{stroke-dasharray:10 18;animation:pflow2 1.7s linear infinite}
.pm-pipe[data-state="owned"] .pm-flow{stroke-dasharray:14 14;stroke-width:2.8;animation:pflow2 1.2s linear infinite}
.pm-pipe[data-state="aging"] .pm-flow{stroke-dasharray:4 24;animation:pflow2 4s linear infinite;opacity:.85}
.pm-pipe[data-state="blocked"] .pm-flow{display:none}
.pm-pipe[data-state="blocked"] .pm-body{opacity:.5;filter:saturate(.45)}
@keyframes pflow2{to{stroke-dashoffset:-28}} /* all pipemap dash periods = 28 */
.pm-pipe.hov .pm-body{filter:brightness(1.3)}
.pm-pipe.sel .pm-body{filter:drop-shadow(0 0 7px currentColor)}
.pm-pipe.sel[data-state="blocked"] .pm-body{opacity:.8;filter:saturate(.7) drop-shadow(0 0 7px currentColor)}
.pm-pipe.hov .pm-flow,.pm-pipe.sel .pm-flow{animation-duration:.9s}
.pm-drip{animation:pdrip 2.8s ease-in infinite;opacity:.85}
.pm-ring{fill:none;stroke:var(--c);stroke-width:2;opacity:0}
.pm-pipe.sel .pm-ring{animation:pring .9s var(--ease-out) both}  /* 得气 */
@keyframes pring{0%{r:6px;opacity:.7}100%{r:26px;opacity:0}}
.pm-hit{fill:none;stroke:transparent;stroke-width:30;pointer-events:stroke;cursor:pointer}

/* dept chips — the tablist, and the primary control on touch/keyboard */
.pipe-chips{display:flex;flex-wrap:wrap;gap:10px;margin:24px 0 26px}
.pipe-chip{display:inline-flex;align-items:center;gap:9px;background:none;border:1px solid var(--line);
  border-radius:999px;padding:10px 16px;cursor:pointer;font:inherit;font-size:13px;color:var(--dim);
  transition:border-color .25s var(--ease),color .25s var(--ease),box-shadow .25s var(--ease)}
.pipe-chip i{width:9px;height:9px;border-radius:50%;background:var(--c);flex:0 0 auto}
.pipe-chip .st{font-family:var(--mono);font-size:10.5px;letter-spacing:.06em;color:var(--c);opacity:.9}
.pipe-chip:hover{border-color:var(--c);color:var(--ink)}
.pipe-chip.on{border-color:var(--c);color:var(--ink);box-shadow:0 0 16px -7px var(--c)}
.pipe-chip:focus-visible{outline:1px solid var(--accent);outline-offset:2px}

/* diagnosis panel */
.pipe-diag{border:1px solid var(--line);border-radius:var(--r-card);background:linear-gradient(180deg,var(--panel),var(--bg));
  padding:36px 40px;display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:44px}
/* kicker (unscoped: also used in .plx .links) — sans, like the site's .svc .k */
.pd-k{font-family:var(--sans);font-weight:600;font-size:10.5px;letter-spacing:.14em;color:var(--accent);
  text-transform:uppercase;margin-bottom:10px}
.pipe-diag .pd-badge{display:inline-flex;align-items:center;gap:11px;font-weight:700;font-size:18px;margin-bottom:16px}
.pipe-diag .pd-badge i{width:10px;height:10px;border-radius:50%;background:var(--c);flex:0 0 auto}
/* state = seal (the .svc-seal shape), coloured by the dept */
.pipe-diag .pd-badge .st{font-family:var(--mono);font-size:10.5px;letter-spacing:.02em;color:var(--c);
  border:1px solid var(--c);border-radius:var(--r-mark);padding:1px 7px;opacity:.9;font-weight:400}
.pipe-diag p{color:var(--dim);font-size:14.5px;line-height:1.8}
.pipe-diag .pd-cure-t{font-size:16.5px;font-weight:700;margin-bottom:8px}
.pipe-diag .pd-cure-t .accent{color:var(--accent)}
.pd-demos{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
/* deep links = small .btn-shaped buttons, not pills; hover darkens, never glows */
.pd-demos a,.plx .links a{border:1px solid rgba(55,224,176,.4);color:var(--accent);border-radius:var(--r-ctl);
  background:rgba(55,224,176,.06);padding:7px 13px;font-size:12px;letter-spacing:.04em;
  transition:background .2s,border-color .2s}
.pd-demos a:hover,.plx .links a:hover{background:rgba(55,224,176,.14);border-color:rgba(55,224,176,.65)}
.pipe-diag .pd-cat{margin-top:16px}
.pipe-diag .pd-cat a{font-size:12.5px;color:var(--accent);opacity:.8;transition:opacity .2s}
.pipe-diag .pd-cat a:hover{opacity:1}
/* panel entrance (retriggered on select) */
.pipe-diag .pd-left,.pipe-diag .pd-right{opacity:0;transform:translateY(12px);
  transition:opacity .5s var(--ease),transform .5s var(--ease)}
.pipe-diag.in .pd-left,.pipe-diag.in .pd-right{opacity:1;transform:none}
.pipe-diag.in .pd-right{transition-delay:.08s}

/* ===== treatment paths — hairline index (svc vocabulary) ===== */
.plx{border-top:1px solid var(--line);counter-reset:plx}
.plx .row{display:grid;grid-template-columns:56px 265px minmax(0,1fr);gap:0 36px;
  padding:30px 0;border-bottom:1px solid var(--line);align-items:start}
.plx .row::before{counter-increment:plx;content:"0" counter(plx);
  font-family:var(--mono);font-size:12px;color:var(--accent);padding-top:7px;letter-spacing:.1em}
.plx .k{font-family:var(--sans);font-weight:600;font-size:10.5px;letter-spacing:.14em;color:var(--accent);
  text-transform:uppercase;margin-bottom:10px;display:flex;align-items:center;gap:8px}
.plx .k i{width:8px;height:8px;border-radius:50%;flex:0 0 auto}
.plx h3{font-size:19px;font-weight:700;letter-spacing:-.01em;line-height:1.3}
.plx p{color:var(--dim);font-size:14px;line-height:1.75;margin-bottom:12px}
.plx .steps{font-family:var(--mono);font-size:12px;color:var(--dim);letter-spacing:.02em;
  line-height:1.9;margin-bottom:14px}
.plx .steps b{color:var(--ink);font-weight:600}
.plx .links{display:flex;flex-wrap:wrap;gap:9px}
.plx .links .pd-k{margin:0 4px 0 0}

/* ===== SAP comparison ===== */
/* two hairline-ruled columns (no cards): "them" under a cream rule, "us" under a jade rule */
.cmp{display:grid;grid-template-columns:1fr 1fr;gap:48px}
.cmp .col{border:0;border-top:2px solid var(--line);border-radius:0;padding:22px 0 0;background:none}
.cmp .col.us{border-top-color:var(--accent)}
.cmp h3{font-size:18px;margin-bottom:16px}
.cmp .col.them h3{color:var(--dim)}
.cmp .col.us h3{color:var(--accent)}
.cmp ul{list-style:none;margin:0;padding:0}
.cmp li{font-size:14px;color:var(--dim);line-height:1.75;padding:10px 0 10px 26px;position:relative;
  border-top:1px solid rgba(242,239,233,.07)}
.cmp li:first-child{border-top:none}
.cmp li b{color:var(--ink);font-weight:600}
.cmp .them li::before{content:"×";position:absolute;left:2px;color:#ff7d7d;font-weight:700}
.cmp .us li::before{content:"✓";position:absolute;left:0;color:var(--accent);font-weight:700}
.cmp .us li b{color:var(--accent)}

/* ===== entry-point cards ===== */
.entry{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:40px}
/* hairline-top columns, not cards; hover lights the rule (no lift, no glow) */
.ecard{border:0;border-top:1px solid var(--line);border-radius:0;padding:22px 0 0;background:none;
  transition:border-color .3s var(--ease)}
.ecard:hover{border-top-color:rgba(55,224,176,.6)}
.ecard .bic{width:21px;height:21px;display:block;margin-bottom:14px;color:var(--accent)}
.ecard .n{font-family:var(--sans);font-weight:600;font-size:10.5px;color:var(--accent);letter-spacing:.14em;text-transform:uppercase}
.ecard h3{font-size:19px;margin:12px 0 12px;line-height:1.3}
.ecard p{font-size:13.5px;color:var(--dim);line-height:1.75}
.entry-echo{margin-top:34px;font-size:16px;color:var(--dim);font-family:var(--serif);font-style:italic}
.entry-echo b{color:var(--accent);font-weight:600}
.bic{vertical-align:-3px}

/* ===== agent catalog · manifold (the estate's dashed trunk, now live) ===== */
.cat-cxo{display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:2px}
.cat-cxo .cxo-k{font-family:var(--sans);font-weight:600;font-size:10.5px;letter-spacing:.14em;color:var(--dim);margin-right:6px}
.cat-cxo .cxo-tile{border:1px solid rgba(55,224,176,.35);border-radius:var(--r-mark);padding:4px 10px;
  font-family:var(--mono);font-size:11px;letter-spacing:.02em;color:var(--accent)}
.cat-manifold{margin-bottom:27px;position:relative}
.manifold{width:100%;display:block}
.cm-body{stroke:var(--accent);stroke-width:16;opacity:.9}
.cm-bore{stroke:var(--bg);stroke-width:11}
.cm-flow{stroke:var(--accent);stroke-width:2.8;stroke-dasharray:14 14;stroke-linecap:round;animation:pflow2 1.2s linear infinite}
.cm-riser{stroke:rgba(55,224,176,.4);stroke-width:6}
.cm-riser-flow{stroke:var(--accent);stroke-width:1.6;stroke-dasharray:4 8;stroke-linecap:round;animation:pflow2 2s linear infinite reverse}
.cm-branch{color:var(--c);cursor:pointer;transition:opacity .3s var(--ease)}
.cm-bb{stroke:var(--c);stroke-width:10;opacity:.85;transition:filter .3s var(--ease)}
.cm-bbore{stroke:var(--bg);stroke-width:6}
.cm-bflow{stroke:var(--c);stroke-width:1.8;stroke-dasharray:5 9;stroke-linecap:round;animation:pflow2 2.4s linear infinite;opacity:.5}
.cm-valve{fill:var(--bg);stroke:var(--c);stroke-width:1.8;transition:filter .3s var(--ease)}
.cm-dot{fill:var(--c);opacity:.55;transition:opacity .3s var(--ease)}
.cm-ring{fill:none;stroke:var(--c);stroke-width:2;opacity:0}
.cm-name{transition:opacity .3s var(--ease)}
.manifold.has-sel .cm-branch:not(.sel){opacity:.45}
.manifold.has-sel .cm-branch.hov{opacity:.8}
.cm-branch.hov .cm-bb{filter:brightness(1.3)}
.cm-branch.sel .cm-bflow{animation-duration:.9s;opacity:1;stroke-width:2.4}
.cm-branch.sel .cm-bb,.cm-branch.sel .cm-valve{filter:drop-shadow(0 0 6px currentColor)}
.cm-branch.sel .cm-dot{opacity:1}
.cm-branch.sel .cm-ring{animation:pring .9s var(--ease-out) both}
.cm-hit{fill:none;stroke:transparent;stroke-width:56;pointer-events:stroke;cursor:pointer}
/* chips: a11y tablist — visually hidden on desktop (the branches are the control),
   shown as the primary control ≤760px. Kept focusable for keyboard users. */
.cat-chips{display:flex;flex-wrap:wrap;gap:8px}
@media(min-width:761px){
  .cat-chips{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .cat-chips:focus-within{position:static;width:auto;height:auto;overflow:visible;clip-path:none;margin-bottom:16px}
}
.cat-chip{display:inline-flex;align-items:center;gap:8px;background:none;border:1px solid var(--line);
  border-radius:999px;padding:9px 14px;cursor:pointer;font:inherit;font-size:12.5px;color:var(--dim);
  transition:border-color .25s var(--ease),color .25s var(--ease)}
.cat-chip i{width:8px;height:8px;border-radius:50%;background:var(--c);flex:0 0 auto}
.cat-chip em{font-style:normal;font-family:var(--mono);font-size:10.5px;color:var(--c)}
.cat-chip.on{border-color:var(--c);color:var(--ink)}
.cat-chip:focus-visible{outline:1px solid var(--accent);outline-offset:2px}
/* panel + falling connector pipe from the selected branch */
.cat-panel{position:relative;display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));
  gap:12px;min-height:132px;align-content:start}
.cat-panel::before{content:"";position:absolute;top:-28px;height:26px;width:3px;
  left:calc((var(--bi,0) + .5)/7*100% - 1.5px);
  background:repeating-linear-gradient(180deg,var(--dropc,var(--accent)) 0 6px,transparent 6px 12px);
  animation:catdrop 1s linear infinite}
@keyframes catdrop{to{background-position:0 12px}}
.cat-tile{display:flex;align-items:center;gap:8px;border-radius:var(--r-well);padding:13px 15px;
  font-size:13px;line-height:1.35;color:var(--ink);
  opacity:0;transform:translateY(10px);transition:opacity .45s var(--ease),transform .45s var(--ease),
  border-color .25s,box-shadow .25s}
.cat-panel.in .cat-tile{opacity:1;transform:none;transition-delay:calc(var(--i)*.03s),calc(var(--i)*.03s),0s,0s}
.cat-tile.adv{border:1.5px dashed rgba(55,224,176,.5)}
.cat-tile.auto{border:1.5px solid rgba(92,214,255,.55);background:rgba(92,214,255,.1)}
a.cat-tile{cursor:pointer}
a.cat-tile:hover{border-color:var(--accent)}
.cat-tile .dx{margin-left:auto;color:var(--accent);font-size:12px;flex:0 0 auto}
.cat-legend{display:flex;gap:26px;flex-wrap:wrap;margin-top:24px}
.cl-item{display:inline-flex;align-items:center;gap:9px;font-size:12.5px;color:var(--dim)}
.cl-item i{width:15px;height:15px;border-radius:3px;flex:0 0 auto}
.cl-item .cl-adv{border:1.5px dashed rgba(55,224,176,.55)}
.cl-item .cl-auto{border:1.5px solid rgba(92,214,255,.55);background:rgba(92,214,255,.14)}
.cat-note{margin-top:14px;font-size:13.5px;color:var(--dim);font-family:var(--serif);font-style:italic}

/* ===== CTA ===== */
.pl-cta{padding:120px 0;border-top:1px solid var(--line);text-align:center}
.pl-cta .big{font-size:clamp(34px,5.6vw,68px);font-weight:800;letter-spacing:-.02em;line-height:1.06}
.pl-cta .big .accent{color:var(--accent)}
.pl-cta .note{color:var(--dim);font-size:15px;margin-top:18px}
.pl-cta .cta{margin-top:34px;display:flex;justify-content:center;gap:14px;flex-wrap:wrap}

/* ===== reduced motion ===== */
@media(prefers-reduced-motion:reduce){
  .fl-a,.fl-m,.fl-o,.fl-b,.fl-mesh,.fl-up,.pm-flow,.drip,.pm-drip,.pm-ring{animation:none !important}
  .cm-flow,.cm-riser-flow,.cm-bflow,.cm-ring,.cat-panel::before{animation:none !important}
  .drip,.pm-drip{display:none}
  .pipe-diag .pd-left,.pipe-diag .pd-right{opacity:1;transform:none;transition:none}
  .pm-pipe,.pm-body{transition:none}
  .cat-tile{opacity:1;transform:none;transition:none}
}

/* ===== mobile — keep LAST for source order ===== */
@media(max-width:920px){
  .pl-hero .wrap{grid-template-columns:1fr;gap:40px}
  .pl-cover{max-width:460px;justify-self:center}
  .pl-duo{grid-template-columns:1fr;gap:36px}
  .pipe-diag{grid-template-columns:1fr;gap:26px}
  .cmp{grid-template-columns:1fr}
  .entry{grid-template-columns:1fr}
  .plx .row{grid-template-columns:40px minmax(0,1fr);grid-template-rows:auto auto}
  .plx .row>div:last-child{grid-column:2}
}
@media(max-width:760px){
  .pl-hero{padding:120px 0 56px}
  .pl-sec{padding:64px 0}
  .pl-sec h2.display{margin-bottom:26px}
  .pl-cta{padding:76px 0}
  /* pipemap: bump text + strokes in viewBox units (corridor-map precedent) —
     the 900-wide SVG renders ~1/3 size on phones */
  .pipe-board{padding:14px 10px 6px}
  /* dept names don't fit the left gutter at 1/3 scale — the chip row right
     below carries name + state, so the in-SVG labels go */
  .pipemap .pm-lbl,.pipemap .pm-st{display:none}
  .pipemap text[data-en="Target · unified data main"]{font-size:20px}
  .pm-halo{stroke-width:31}
  .pm-body{stroke-width:20}
  .pm-bore{stroke-width:13}
  .pm-flow{stroke-width:3.4}
  .pm-pipe[data-state="owned"] .pm-flow{stroke-width:4}
  .pm-hit{stroke-width:40}
  @keyframes pring{0%{r:8px;opacity:.7}100%{r:34px;opacity:0}}
  .pipe-chips{gap:8px;margin:18px 0 20px}
  .pipe-chip{padding:9px 13px;font-size:12.5px}
  .pipe-diag{padding:24px 22px}
  .pl-cover{max-width:340px}
  .plx .row{grid-template-columns:minmax(0,1fr);padding:22px 0}
  .plx .row::before{display:none}
  .plx .k{margin-bottom:8px}
  .plx h3{margin-bottom:10px}
  .plx .row>div:last-child{grid-column:auto}
  .pl-hero .cta .btn,.pl-cta .cta .btn{width:100%;text-align:center}
  /* catalog: the 7-branch manifold is unreadable at 1/3 scale — chips take over
     (same trade as the pipemap's in-SVG labels) */
  .cat-manifold{display:none}
  .cat-chips{margin-bottom:18px}
  .cat-panel::before{display:none}
  .cat-panel{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:9px}
  .cat-tile{font-size:12.5px;padding:11px 12px}
  .cat-cxo{justify-content:flex-start;margin-bottom:14px}
}
