/* =====================================================================
   TREEI DESIGN SYSTEM — the finishing layer, loaded last on every page.
   Principles (after Apple's HIG): one type scale, three corners, three
   kinds of button, every target ≥44px, motion with meaning, calm forms.
   Tokens live in treei-global.css (:root). Change them there.
   ===================================================================== */

/* ---------- 1 · Type: readable rhythm ---------- */
button,input,select,textarea{font-family:inherit}
[class*="crumb"] a{padding-top:12px!important;padding-bottom:12px!important;margin-top:-12px!important;margin-bottom:-12px!important}
main p,main li{text-wrap:pretty}
main h1,main h2,main h3{text-wrap:balance}
[data-live],.tstat-num,.th-num,.pp-core-n,.cp-fig-top b,.cpk-psum b{font-variant-numeric:tabular-nums}
/* stat strips: big numbers that always fit their column */
.th-stats .th-num{font-size:clamp(28px,2.5vw,38px)!important;white-space:nowrap}

/* ---------- 2 · Buttons: three kinds only ----------
   A. Primary  — solid pill (.th-btn, .btn): 48px tall
   B. Secondary — outline/soft pill (chips, copy, pick, tabs): 44px tall
   C. Round icon — arrows, close, play: 44 × 44                         */
.th-btn,.btn{min-height:48px;border-radius:999px!important;font-size:var(--fs-body)!important;font-weight:700!important;letter-spacing:0!important;transition:transform var(--dur) var(--ease),background-color .25s,box-shadow .25s,color .25s}
.th-btn:active,.btn:active{transform:scale(.97)}

.dn-pick,.dn-copy,.ct-copy,.mc-copy,.th-yt-sub,.th-amt,.cpk-mode,.dn-freq button,.pr-chips button,.mc-chips button,.vo-chips button,.rl-chips button,
.pp-tabs button,.pp-bt-tabs button,.pp-calc-pre button,.rr-kinds a,.rr-quick a,.tc-jump a,.mc-jump a,.cp-share a,.cpk-via a,.cpk-add,.gi-nav-v,.gi-nav-c,.pp-rel a{
  min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center;gap:6px;border-radius:999px;font-size:var(--fs-small)!important;font-weight:700;
  transition:transform .3s var(--ease),background-color .25s,border-color .25s,color .25s}
.cpk-add{border-radius:var(--r-s)}
.dn-pick:active,.dn-copy:active,.ct-copy:active,.mc-copy:active,.th-amt:active,.cpk-add:active,.pr-chips button:active,.mc-chips button:active{transform:scale(.96)}

.cpk-arr,.pp-vnext,.pp-vprev,.pr-ix-prev,.pr-ix-next,.mc-gx-nav,.pp-vw-nav,.pp-vw-x,.th-now-ctl,.mc-lb-nav{
  min-width:44px!important;min-height:44px!important;border-radius:50%}
.burger{min-height:44px;justify-content:center;align-items:center;border-radius:var(--r-s);position:relative}

/* ---------- 3 · Tap targets: ≥44px without moving the layout ---------- */
:is([class*="crumb"] a,.th-row-head a,.tc-row-head a,.th-link,.th-sand,.th-door-foot a,.th-stats-foot a,.th-next a,.pr-src a,.pr-ix-nav a,
.pp-more-a,.pp-vw-more,.pp-fund-pdf,.dn-sec a,.dn-prog-a a,.pr-node-h,.foot-col a):not(.th-btn,.btn,[class*="-btn"]){
  padding-top:11px;padding-bottom:11px;margin-top:-11px;margin-bottom:-11px}
.socials a,.foot-social a,.ct-soc a{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
.topbar .socials a{min-width:44px!important;min-height:44px!important;margin:-15px -8px!important}
.th-now-ctl button{min-width:44px;min-height:44px}
.pr-fit-list label{min-height:44px;display:flex;align-items:center;gap:10px;cursor:pointer}
/* tiny dots keep their look; the touch area grows invisibly */
.cpk-dots button,.pp-dots button,.th-dots button,[class*="-dots"] button{position:relative}
.cpk-dots button::after,.pp-dots button::after,.th-dots button::after,[class*="-dots"] button::after{content:"";position:absolute;inset:-10px}
input[type=checkbox],input[type=radio]{width:20px;height:20px;accent-color:var(--teal)}

/* ---------- 4 · Contrast: fixes for specific low-contrast text (see below) ---------- */

/* ---------- 5 · Live numbers: one look everywhere ---------- */
.th-live-dot,.dn-dot,.ff-dot,.th-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--live)!important;
  box-shadow:0 0 0 0 rgba(60,192,138,.55);animation:dsLive 2.2s var(--ease) infinite;vertical-align:1px}
.th-live-dot.is-rest{background:#9AA6A3!important;animation:none;box-shadow:none}
@keyframes dsLive{0%{box-shadow:0 0 0 0 rgba(60,192,138,.55)}70%{box-shadow:0 0 0 7px rgba(60,192,138,0)}100%{box-shadow:0 0 0 0 rgba(60,192,138,0)}}

/* ---------- 6 · Header that steps back while you read ---------- */
.head{transition:transform .45s var(--ease),box-shadow .3s,background-color .3s}
.head.ds-compact{box-shadow:0 10px 30px -22px rgba(1,42,40,.45)}
.head.ds-hide{transform:translateY(-100%)}
.head[data-open="1"],.head:focus-within{transform:none!important}

/* ---------- 7 · Motion with meaning ---------- */
.ds-rv{opacity:0;transform:translateY(18px);transition:opacity .7s var(--ease),transform .7s var(--ease)}
.ds-rv.ds-in{opacity:1;transform:none}
.nav-dd .dd-p,.nav-dd [class*="dd-m"]{transition:opacity .22s var(--ease),transform .32s var(--ease-spring),visibility .22s}
a,button{-webkit-tap-highlight-color:transparent}
:focus-visible{outline:3px solid var(--sky,#53C0E6);outline-offset:3px;border-radius:6px}

/* ---------- 8 · Calm forms ---------- */
main input[type=text],main input[type=email],main input[type=tel],main input[type=number],main input[type=url],main select,main textarea,.rl-form input,.rl-form select,.rl-form textarea{
  min-height:48px;font-size:var(--fs-body)!important;border-radius:var(--r-s)!important;transition:border-color .2s,box-shadow .2s,background-color .2s}
main textarea{min-height:120px}
main input:focus,main select:focus,main textarea:focus{outline:none;border-color:var(--teal)!important;box-shadow:0 0 0 4px rgba(2,82,80,.14)!important}
main input:user-invalid,main textarea:user-invalid,main select:user-invalid{border-color:#B3261E!important;box-shadow:0 0 0 4px rgba(179,38,30,.10)!important}
main label{font-size:var(--fs-small)}
main ::placeholder{color:#7C8A87;opacity:1}
main button[type=submit],main input[type=submit]{min-height:48px}
.ds-why{display:block;margin-top:6px;font-size:var(--fs-label);color:#5A6B68;font-weight:500;line-height:1.45}
.ds-sending{opacity:.7;pointer-events:none}

/* ---------- 9 · Reduced motion: calm for those who ask ---------- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
  .ds-rv{opacity:1;transform:none}
  .head.ds-hide{transform:none}
}

/* header fit: Manrope sets a touch wider than the old face */
@media (min-width:1101px) and (max-width:1480px){.head .nav{gap:12px}.head-in{gap:16px}.head .nav .cta{padding:10px 13px}}
@media (min-width:1280px) and (max-width:1380px){.head .nav{gap:8px}.head-in{gap:12px}.head .nav .cta{padding:10px 12px}}
.rr-pages a{min-width:44px;min-height:44px}
