/* ============================================================
   Karhoosh v6 — unified visual layer (1405-08-08)
   Loaded LAST in <head>. Brand colors are taken from the logo
   (navy → royal blue, cyan accent). Font: Yekan Bakh (licensed
   for karhooshai.com, defined in karhoosh-font.css).
   Rollback: remove the <link> to this file in includes/header.php
   ============================================================ */
:root{
  --kh-bg:#F5F6F8;
  --kh-surface:#FFFFFF;
  --kh-ink:#0E1B3D;
  --kh-ink-2:#4A5675;
  --kh-ink-3:#5E6884;
  --kh-line:rgba(14,27,61,.09);
  --kh-line-2:rgba(14,27,61,.16);
  --kh-blue:#0A4FD1;
  --kh-blue-hover:#083FAA;
  --kh-blue-soft:#EAF1FE;
  --kh-navy:#071A4A;
  --kh-cyan:#12B9C8;
  --kh-cyan-soft:#E6F8FA;
  --kh-cyan-ink:#06606A;
  --kh-r-lg:24px;--kh-r-md:16px;--kh-r-sm:12px;
  --kh-shadow:0 1px 2px rgba(14,27,61,.04),0 12px 32px -18px rgba(14,27,61,.22);
}

/* ---------- base ---------- */
html{scroll-behavior:smooth}
html body.kh-shell{background:var(--kh-bg)!important;color:var(--kh-ink)!important;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
html body.kh-shell main{min-height:50vh}
html body.kh-shell :where(h1,h2,h3,h4){color:var(--kh-ink);letter-spacing:0;text-shadow:none}
html body.kh-shell :where(p,li){color:var(--kh-ink-2)}
html body.kh-shell a{color:var(--kh-blue)}
html body.kh-shell :focus-visible{outline:3px solid rgba(10,79,209,.35)!important;outline-offset:2px}
html body.kh-shell ::selection{background:var(--kh-blue-soft)}

/* ---------- header ---------- */
html body.kh-shell .site-header{position:sticky!important;top:0;z-index:50;background:rgba(255,255,255,.97)!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;border-bottom:1px solid var(--kh-line)!important;box-shadow:none!important}
html body.kh-shell .site-header .nav{min-height:64px!important;max-width:1200px!important;margin:0 auto!important;padding:0 24px!important;gap:24px}
/* logo: the PNG has wide empty margins — show only the mark */
html body.kh-shell .site-header .brand{display:block!important;position:relative!important;overflow:hidden!important;width:120px!important;height:36px!important;flex:0 0 auto;padding:0!important;margin:0!important;background:none!important}
html body.kh-shell .site-header .brand img{position:absolute!important;max-width:none!important;max-height:none!important;min-height:0!important;object-fit:fill!important;width:153.2px!important;height:76.6px!important;top:-19.3px!important;left:-17.5px!important;right:auto!important;margin:0!important;filter:none!important}
html body.kh-shell .desktop-nav{gap:4px!important}
html body.kh-shell .desktop-nav>a,html body.kh-shell .desktop-nav summary{color:var(--kh-ink)!important;font-size:14.5px!important;font-weight:500!important;padding:8px 12px!important;border-radius:10px!important;background:none!important;border:0!important;opacity:.86}
html body.kh-shell .desktop-nav>a:hover,html body.kh-shell .desktop-nav summary:hover{opacity:1;background:rgba(14,27,61,.05)!important}
html body.kh-shell .kh-dropdown-panel{background:#fff!important;border:1px solid var(--kh-line)!important;border-radius:var(--kh-r-md)!important;box-shadow:var(--kh-shadow)!important;padding:8px!important}
html body.kh-shell .kh-dropdown-panel a{color:var(--kh-ink)!important;border-radius:10px!important;font-size:14px!important}
html body.kh-shell .kh-dropdown-panel a:hover{background:var(--kh-bg)!important}
html body.kh-shell .apple-actions summary{color:var(--kh-ink)!important;background:none!important;border:1px solid var(--kh-line-2)!important;border-radius:999px!important;font-size:14px!important;padding:7px 14px!important}
html body.kh-shell .apple-link{color:var(--kh-ink)!important;font-size:14.5px!important;font-weight:500!important}
html body.kh-shell .apple-pill{background:var(--kh-blue)!important;color:#fff!important;border:0!important;border-radius:999px!important;padding:9px 18px!important;font-size:14px!important;font-weight:600!important;box-shadow:none!important}
html body.kh-shell .apple-pill:hover{background:var(--kh-blue-hover)!important}
/* logged-in: account dropdown already contains logout — hide the duplicate pill */
html body.kh-shell .apple-actions .kh-account-dropdown~.apple-pill{display:none!important}
html body.kh-shell .apple-menu-btn{background:transparent!important;border:1px solid var(--kh-line-2)!important;border-radius:12px!important;box-shadow:none!important;width:44px!important;height:44px!important}
html body.kh-shell .apple-menu-icon path{stroke:var(--kh-ink)!important}

/* ---------- market ticker ---------- */
html body.kh-shell #kh-market-ticker{background:#fff!important;border-bottom:1px solid var(--kh-line)!important;color:var(--kh-ink)!important;box-shadow:none!important;display:flex;align-items:center;flex-wrap:wrap;max-width:none}
html body.kh-shell #kh-market-ticker .kh-ticker-ribbon{flex:1 1 600px;min-width:0;background:transparent!important;border:0!important;min-height:40px!important;height:40px!important}
html body.kh-shell #kh-market-ticker .kh-ticker-label{background:var(--kh-cyan-soft)!important;color:var(--kh-cyan-ink)!important;border-radius:999px!important;padding:3px 12px!important;margin-inline:16px 8px!important;font-size:12.5px!important;font-weight:700!important;box-shadow:none!important;height:auto!important;align-self:center}
html body.kh-shell #kh-market-ticker .kh-ticker-track,html body.kh-shell #kh-market-ticker .kh-ticker-track *{color:var(--kh-ink-2)!important;font-size:13px!important}
html body.kh-shell #kh-market-ticker .kh-ticker-track :where(b,strong){color:var(--kh-ink)!important;font-weight:700!important}
html body.kh-shell #kh-market-ticker .kh-ticker-pause{background:transparent!important;color:var(--kh-ink-3)!important;border:0!important;width:40px!important;height:40px!important}
html body.kh-shell #kh-market-ticker .kh-ticker-meta{flex:0 0 auto;background:transparent!important;border:0!important;padding:0 16px!important;display:flex!important;gap:10px;align-items:center;min-height:40px}
html body.kh-shell #kh-market-ticker .kh-ticker-meta,html body.kh-shell #kh-market-ticker .kh-ticker-meta *{color:var(--kh-ink-3)!important;font-size:12px!important}
html body.kh-shell #kh-market-ticker .kh-ticker-window{-webkit-mask-image:linear-gradient(90deg,transparent,#000 32px,#000 calc(100% - 32px),transparent);mask-image:linear-gradient(90deg,transparent,#000 32px,#000 calc(100% - 32px),transparent)}

/* ---------- shared components ---------- */
html body.kh-shell .container{max-width:1200px!important;padding-inline:24px!important}
html body.kh-shell .section{padding-block:64px!important}
html body.kh-shell :where(.btn,.kh-action,.mini-btn,.kh-result-primary,.kc-next){font-weight:600!important;border-radius:999px!important;transition:background .15s,border-color .15s,color .15s;box-shadow:none!important;text-shadow:none!important}
html body.kh-shell :where(.btn.primary,.kh-action:not(.kh-action-outline),.kc-next,.kh-result-primary,.mini-btn.primary){background:var(--kh-blue)!important;color:#fff!important;border:1px solid var(--kh-blue)!important}
html body.kh-shell :where(.btn.primary,.kh-action:not(.kh-action-outline),.kc-next,.kh-result-primary,.mini-btn.primary):hover{background:var(--kh-blue-hover)!important;border-color:var(--kh-blue-hover)!important}
html body.kh-shell :where(.btn.secondary,.btn:not(.primary),.kh-action-outline,.mini-btn:not(.primary)){background:#fff!important;color:var(--kh-ink)!important;border:1px solid var(--kh-line-2)!important}
html body.kh-shell :where(.btn,.kh-action,.kc-next,.kh-result-primary){min-height:46px;padding-inline:22px!important}
html body.kh-shell :where(.form-card,.dash-card,.my-assistant-card,.kh-plan,.kc-sample-card,.auth-card .form-card,.kh-asset-panel,.kh-pnl-record,.kh-current,.ticket-list>*){background:var(--kh-surface)!important;border:1px solid var(--kh-line)!important;border-radius:var(--kh-r-lg)!important;box-shadow:var(--kh-shadow)!important}
html body.kh-shell :where(input[type=text],input[type=email],input[type=password],input[type=number],input[type=tel],input:not([type]),select,textarea){border:1px solid var(--kh-line-2)!important;border-radius:var(--kh-r-sm)!important;background:#fff!important;color:var(--kh-ink)!important;min-height:46px;box-shadow:none!important}
html body.kh-shell :where(input,select,textarea):focus{border-color:var(--kh-blue)!important;box-shadow:0 0 0 4px rgba(10,79,209,.12)!important;outline:none!important}
html body.kh-shell :where(.eyebrow,.kh-eyebrow,.kh-result-eyebrow){display:inline-block;background:var(--kh-cyan-soft)!important;color:var(--kh-cyan-ink)!important;border:0!important;border-radius:999px!important;padding:4px 12px!important;font-size:13px!important;font-weight:600!important;letter-spacing:0!important}
html body.kh-shell :where(.status-badge){border-radius:999px!important}
html body.kh-shell .error-box,html body.kh-shell .kc-error{border-radius:var(--kh-r-sm)!important}

/* page titles on inner pages */
html body.kh-shell main :where(.section,.kh-subscription,.kh-sub-checkout) h1{font-size:clamp(30px,4vw,44px)!important;font-weight:800!important;line-height:1.4!important;color:var(--kh-ink)!important}

/* ---------- homepage ---------- */
html body.kh-shell.kc-home .kc-page{background:transparent!important}
html body.kh-shell.kc-home .kc-hero{max-width:1200px!important;margin:0 auto!important;padding:80px 24px 64px!important;display:grid!important;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)!important;gap:56px!important;align-items:center!important;background:transparent!important}
html body.kh-shell.kc-home .kc-start{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;text-align:right!important}
html body.kh-shell.kc-home .kc-start .kh-eyebrow{margin:0 0 18px!important}
html body.kh-shell.kc-home .kc-start h1.kh-portfolio-title{font-size:clamp(36px,5vw,60px)!important;line-height:1.35!important;font-weight:800!important;color:var(--kh-ink)!important;margin:0 0 18px!important;text-align:right!important;text-wrap:balance}
html body.kh-shell.kc-home .kc-start h1.kh-portfolio-title em{font-style:normal;color:var(--kh-blue)}
html body.kh-shell.kc-home .kc-lead{font-size:clamp(17px,1.6vw,20px)!important;line-height:1.9!important;color:var(--kh-ink-2)!important;margin:0 0 28px!important;max-width:540px;text-align:right!important}
html body.kh-shell.kc-home .kc-form{background:var(--kh-surface)!important;border:1px solid var(--kh-line)!important;border-radius:var(--kh-r-lg)!important;box-shadow:var(--kh-shadow)!important;padding:24px!important;max-width:580px}
html body.kh-shell.kc-home .kc-form fieldset{border:0!important;padding:0!important;margin:0!important;background:none!important}
html body.kh-shell.kc-home .kc-form legend{font-size:17px!important;font-weight:700!important;color:var(--kh-ink)!important;margin-bottom:12px!important;display:flex;align-items:center;gap:10px}
html body.kh-shell.kc-home .kc-form legend span{width:28px;height:28px;border-radius:999px;background:var(--kh-blue-soft)!important;color:var(--kh-blue)!important;display:inline-flex!important;align-items:center;justify-content:center;font-size:14px!important;border:0!important}
html body.kh-shell.kc-home .kc-input{border:1px solid var(--kh-line-2)!important;border-radius:var(--kh-r-md)!important;background:#fff!important;min-height:56px;overflow:hidden;box-shadow:none!important}
html body.kh-shell.kc-home .kc-input:focus-within{border-color:var(--kh-blue)!important;box-shadow:0 0 0 4px rgba(10,79,209,.12)!important}
html body.kh-shell.kc-home .kc-input input{border:0!important;box-shadow:none!important;font-size:18px!important;min-height:54px}
html body.kh-shell.kc-home .kc-input b{color:var(--kh-ink-2)!important;background:var(--kh-bg)!important;border:0!important;font-weight:600!important}
html body.kh-shell.kc-home .kc-next{width:100%;min-height:54px!important;font-size:16px!important;margin-top:14px!important}
html body.kh-shell.kc-home .kc-hint{color:var(--kh-ink-3)!important;font-size:13.5px!important}
html body.kh-shell.kc-home .kc-choice span{border:1px solid var(--kh-line-2)!important;border-radius:var(--kh-r-md)!important;background:#fff!important;box-shadow:none!important}
html body.kh-shell.kc-home .kc-choice input:checked+span{border-color:var(--kh-blue)!important;background:var(--kh-blue-soft)!important;box-shadow:0 0 0 1px var(--kh-blue) inset!important}
html body.kh-shell.kc-home .kc-controls button[data-prev]{background:#fff!important;color:var(--kh-ink)!important;border:1px solid var(--kh-line-2)!important;border-radius:999px!important}
html body.kh-shell.kc-home .kc-sample-link{color:var(--kh-blue)!important;font-weight:600!important}
html body.kh-shell.kc-home .kc-free{text-align:center}
/* sample card */
html body.kh-shell.kc-home .kc-preview{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
html body.kh-shell.kc-home .kc-sample-card{padding:28px!important}
html body.kh-shell.kc-home .kc-sample-badge{background:var(--kh-cyan-soft)!important;color:var(--kh-cyan-ink)!important;border:0!important;border-radius:999px!important}
html body.kh-shell.kc-home .kc-sample-card h2{font-size:20px!important;color:var(--kh-ink)!important}
html body.kh-shell.kc-home .kc-sample-total{color:var(--kh-ink-2)!important}
html body.kh-shell.kc-home .kc-sample-rows li{border-color:var(--kh-line)!important}
html body.kh-shell.kc-home .kc-sample-rows strong{color:var(--kh-ink)!important;font-size:18px!important}
html body.kh-shell.kc-home .kc-dot.kc-fixed{background:var(--kh-blue)!important}
html body.kh-shell.kc-home .kc-dot.kc-gold{background:var(--kh-cyan)!important}
html body.kh-shell.kc-home .kc-dot.kc-cash{background:#A9B6D6!important}
html body.kh-shell.kc-home .kc-sample-note{color:var(--kh-ink-3)!important;font-size:13px!important}
html body.kh-shell.kc-home .kc-sample-meta>div{background:var(--kh-surface)!important;border:1px solid var(--kh-line)!important;border-radius:var(--kh-r-md)!important;box-shadow:none!important}
/* how it works */
html body.kh-shell.kc-home .kc-explain{max-width:1200px!important;margin:0 auto!important;padding:24px 24px 88px!important;background:transparent!important}
html body.kh-shell.kc-home .kc-explain>div{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:16px!important}
html body.kh-shell.kc-home .kc-explain article{background:var(--kh-surface)!important;border:1px solid var(--kh-line)!important;border-radius:var(--kh-r-lg)!important;padding:28px!important;box-shadow:none!important;counter-increment:khstep}
html body.kh-shell.kc-home .kc-explain>div{counter-reset:khstep}
html body.kh-shell.kc-home .kc-explain article::before{content:counter(khstep,persian);display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:12px;background:var(--kh-navy);color:#fff;font-weight:800;margin-bottom:16px}
html body.kh-shell.kc-home .kc-explain article b{display:block;font-size:19px!important;color:var(--kh-ink)!important;margin-bottom:6px}
html body.kh-shell.kc-home .kc-explain article p{color:var(--kh-ink-2)!important;margin:0!important}
html body.kh-shell.kc-home .kc-explain>.kc-hint{text-align:center!important;margin-top:24px!important}
html body.kh-shell.kc-home .kc-explain::before{content:"کارهوش چطور کمکت می‌کند؟";display:block;font-size:clamp(26px,3vw,34px);font-weight:800;color:var(--kh-ink);margin:0 0 24px}
/* result block */
html body.kh-shell.kc-home .kh-result{max-width:1200px;margin-inline:auto!important;background:var(--kh-surface)!important;border:1px solid var(--kh-line)!important;border-radius:28px!important;box-shadow:var(--kh-shadow)!important}

/* ---------- footer ---------- */
html body.kh-shell .kh-footer{background:#fff!important;border-top:1px solid var(--kh-line)!important;padding:0!important;color:var(--kh-ink-2)!important;margin-top:0!important;box-shadow:none!important}
html body.kh-shell .kh-footer .container{padding-block:48px 28px!important}
html body.kh-shell .kh-footer .v51-footer-grid{gap:32px!important}
html body.kh-shell .kh-footer .v51-footer-about img{display:block;height:96px!important;width:192px!important;max-height:none!important;max-width:none!important;object-fit:fill!important;margin:-24px -20px -26px -22px!important;background:none!important;padding:0!important;border-radius:0!important}
html body.kh-shell .kh-footer h4{color:var(--kh-ink)!important;font-size:14px!important;font-weight:700!important}
html body.kh-shell .kh-footer a{color:var(--kh-ink-2)!important;font-size:14px!important;text-decoration:none!important}
html body.kh-shell .kh-footer a:hover{color:var(--kh-blue)!important}
html body.kh-shell .kh-footer p{color:var(--kh-ink-3)!important;font-size:13.5px!important}
html body.kh-shell .kh-footer .v51-footer-bottom{border-top:1px solid var(--kh-line)!important;color:var(--kh-ink-3)!important;font-size:12.5px!important;background:none!important}
html body.kh-shell .kh-footer .v51-footer-bottom span{color:var(--kh-ink-3)!important}

/* ---------- responsive ---------- */
@media (max-width:900px){
  html body.kh-shell.kc-home .kc-hero{grid-template-columns:1fr!important;padding:40px 16px 40px!important;gap:32px!important}
  html body.kh-shell.kc-home .kc-explain{padding:8px 16px 56px!important}
  html body.kh-shell.kc-home .kc-explain>div{grid-template-columns:1fr!important}
  html body.kh-shell .container{padding-inline:16px!important}
  html body.kh-shell .site-header .nav{padding:0 16px!important}
  html body.kh-shell #kh-market-ticker .kh-ticker-meta{display:none!important}
}
@media (max-width:540px){
  html body.kh-shell.kc-home .kc-start h1.kh-portfolio-title{font-size:34px!important}
  html body.kh-shell.kc-home .kc-form{padding:18px!important}
  html body.kh-shell .section{padding-block:40px!important}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* ---------- fixes v6.1 ---------- */
html body.kh-shell.kc-home .kc-form .kc-next,html body.kh-shell.kc-home .kc-form .kc-next:active,html body.kh-shell.kc-home .kc-form .kc-next:focus{background:var(--kh-blue)!important;background-image:none!important;border-color:var(--kh-blue)!important;color:#fff!important}
html body.kh-shell.kc-home .kc-form .kc-next:hover{background:var(--kh-blue-hover)!important}
html body.kh-shell.kc-home .kc-sample-meta b{color:var(--kh-ink)!important}
html body.kh-shell.kc-home .kc-sample-meta span{color:var(--kh-ink-3)!important}
html body.kh-shell.kc-home .kc-explain{border-top:0!important}

/* ---------- v6.2 — inner pages (dashboard, product, results) ---------- */
html body.kh-shell :is(.dashboard-page,.kh-dashboard-assets,.kh-pnl-summary,.kh-portfolios,.kh-saved-portfolio,.kh-field-heading,.kh-help-button,.kh-pnl-gain,.kh-account-extras,.kh-account-extras summary,.kh-saved-row,.kh-snapshot-heading,.kh-snapshot-metrics,.kh-snapshot-date,.kh-snapshot-groups,.dash-card,.kh-portfolio-list){color:var(--kh-ink)!important}
html body.kh-shell main :is(h1,h2,h3,h4){color:var(--kh-ink)!important;text-shadow:none!important}
html body.kh-shell :is(.kh-dashboard-assets,.kh-pnl-summary,.kh-saved-portfolio){background:var(--kh-surface)!important;border:1px solid var(--kh-line)!important;border-radius:var(--kh-r-lg)!important;box-shadow:var(--kh-shadow)!important}
html body.kh-shell .kh-snapshot-bar{border-radius:999px!important;overflow:hidden;gap:3px}
html body.kh-shell .kh-snapshot-bar>:nth-child(4n+1),html body.kh-shell .kh-snapshot-groups>:nth-child(4n+1) i,html body.kh-shell.kc-home .kh-result-series-0{background:var(--kh-blue)!important}
html body.kh-shell .kh-snapshot-bar>:nth-child(4n+2),html body.kh-shell .kh-snapshot-groups>:nth-child(4n+2) i,html body.kh-shell.kc-home .kh-result-series-1{background:var(--kh-cyan)!important}
html body.kh-shell .kh-snapshot-bar>:nth-child(4n+3),html body.kh-shell .kh-snapshot-groups>:nth-child(4n+3) i,html body.kh-shell.kc-home .kh-result-series-2{background:#A9B6D6!important}
html body.kh-shell .kh-snapshot-bar>:nth-child(4n+4),html body.kh-shell .kh-snapshot-groups>:nth-child(4n+4) i,html body.kh-shell.kc-home .kh-result-series-3{background:var(--kh-navy)!important}
html body.kh-shell :is(.kh-snapshot-link,.dash-icon,.kh-saved-portfolio summary,.kh-portfolios summary){color:var(--kh-blue)!important}
html body.kh-shell .kh-capital-overview{background:var(--kh-navy)!important;border:0!important;border-radius:var(--kh-r-lg)!important;color:#fff!important}
html body.kh-shell .kh-capital-overview :is(h1,h2,h3,h4,strong,b,p,span){color:#fff!important}
html body.kh-shell .kh-capital-overview a{color:#7FE3EC!important}
html body.kh-shell .kh-sub-status{background:var(--kh-blue-soft)!important;color:var(--kh-ink)!important;border:0!important;border-radius:var(--kh-r-sm)!important}
html body.kh-shell .kh-live-offline{border-radius:var(--kh-r-sm)!important}
html body.kh-shell :is(.btn.primary,.kh-action:not(.kh-action-outline),.kh-result-primary,.mini-btn.primary){background:var(--kh-blue)!important;background-image:none!important;color:#fff!important;border:1px solid var(--kh-blue)!important;border-radius:999px!important;box-shadow:none!important}
html body.kh-shell :is(.btn.primary,.kh-action:not(.kh-action-outline),.kh-result-primary,.mini-btn.primary):hover{background:var(--kh-blue-hover)!important;border-color:var(--kh-blue-hover)!important}
html body.kh-shell :is(.btn.secondary,.btn:not(.primary),.kh-action-outline,.mini-btn:not(.primary)){background:#fff!important;background-image:none!important;color:var(--kh-ink)!important;border:1px solid var(--kh-line-2)!important;border-radius:999px!important;box-shadow:none!important}
html body.kh-shell :is(.form-card,.dash-card,.my-assistant-card,.kh-plan,.kh-asset-panel,.kh-pnl-record,.kh-current){border-color:var(--kh-line)!important;border-top-color:var(--kh-line)!important;border-radius:var(--kh-r-lg)!important}

/* ---------- v6.3 — account pages (login/register/dashboard) ---------- */
html body.kh-shell :is(.kh-auth,.kh-dashboard){background:transparent!important;color:var(--kh-ink)!important}
html body.kh-shell :is(.kh-auth,.kh-dashboard) h1{color:var(--kh-ink)!important;font-weight:800!important}
html body.kh-shell .kh-auth .auth-card{background:var(--kh-surface)!important;border:1px solid var(--kh-line)!important;border-radius:28px!important;box-shadow:var(--kh-shadow)!important;padding:36px!important}
html body.kh-shell .kh-auth label{color:var(--kh-ink)!important}
html body.kh-shell .kh-auth input:not([type=hidden]):not([type=checkbox]):not([type=radio]){border:1px solid var(--kh-line-2)!important;border-radius:var(--kh-r-sm)!important;color:var(--kh-ink)!important}
html body.kh-shell :is(.kh-auth,.kh-dashboard) .btn.primary{background:var(--kh-blue)!important;border-color:var(--kh-blue)!important;color:#fff!important;border-radius:999px!important}
html body.kh-shell :is(.kh-auth,.kh-dashboard) .btn.primary:hover{background:var(--kh-blue-hover)!important;border-color:var(--kh-blue-hover)!important}
html body.kh-shell .kh-dashboard :is(.btn.secondary,.mini-btn:not(.primary)){background:#fff!important;color:var(--kh-ink)!important;border:1px solid var(--kh-line-2)!important;border-radius:999px!important}
html body.kh-shell .kh-auth .success-box{background:var(--kh-cyan-soft)!important;color:var(--kh-cyan-ink)!important;border:0!important;border-radius:var(--kh-r-sm)!important}
html body.kh-shell .kh-dashboard .dash-card strong{color:var(--kh-ink)!important}

/* ---------- v6.4 — header pill (logged out), auth details ---------- */
html body.kh-shell .site-header .apple-actions .apple-pill{background:var(--kh-blue)!important;background-image:none!important;color:#fff!important;border:0!important;border-radius:999px!important}
html body.kh-shell .site-header .apple-actions .apple-pill:hover{background:var(--kh-blue-hover)!important}
html body.kh-shell .kh-auth .auth-card .form-card{border:0!important;box-shadow:none!important;padding:0!important;background:transparent!important}
html body.kh-shell .kh-auth a:not(.btn){color:var(--kh-blue)!important}

/* ---------- v6.5 — advisor pages (advice.php, admin-advice.php) ---------- */
html body.kh-shell .kha .container{max-width:960px!important}
html body.kh-shell .kha-head{margin-bottom:24px}
html body.kh-shell .kha-head h1{margin:12px 0 6px!important}
html body.kh-shell .kha-muted{color:var(--kh-ink-3)!important}
html body.kh-shell .kha-note{background:var(--kh-blue-soft);color:var(--kh-ink);border-radius:var(--kh-r-sm);padding:12px 16px;margin:0 0 16px}
html body.kh-shell .kha-error{background:#FDECEC;color:#8A1C1C}
html body.kh-shell .kha-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:0 0 16px}
html body.kh-shell .kha-stat{background:var(--kh-surface);border:1px solid var(--kh-line);border-radius:var(--kh-r-lg);padding:18px 20px;display:flex;flex-direction:column;gap:4px}
html body.kh-shell .kha-stat span{color:var(--kh-ink-3);font-size:14px}
html body.kh-shell .kha-stat strong{font-size:26px;font-weight:800;color:var(--kh-ink);font-variant-numeric:tabular-nums}
html body.kh-shell .kha-stat strong small{font-size:13px;font-weight:500;color:var(--kh-ink-3)}
html body.kh-shell .kha-stat>small{color:var(--kh-ink-3);font-size:12.5px}
html body.kh-shell .kha-up,html body.kh-shell .kha-up strong{color:#0B7A43!important}
html body.kh-shell .kha-down,html body.kh-shell .kha-down strong{color:#B42318!important}
html body.kh-shell .kha-card{background:var(--kh-surface);border:1px solid var(--kh-line);border-radius:var(--kh-r-lg);box-shadow:var(--kh-shadow);padding:24px;margin:0 0 16px}
html body.kh-shell .kha-card h2{font-size:20px!important;margin:0 0 12px!important}
html body.kh-shell .kha-card-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}
html body.kh-shell .kha-card-head h2{margin:0!important}
html body.kh-shell .kha-profile fieldset{border:0;padding:0;margin:0 0 16px}
html body.kh-shell .kha-profile legend{font-weight:700;color:var(--kh-ink);margin-bottom:10px}
html body.kh-shell .kha-pills{display:flex;flex-wrap:wrap;gap:8px}
html body.kh-shell .kha-pills label{cursor:pointer}
html body.kh-shell .kha-pills input{position:absolute;opacity:0;pointer-events:none}
html body.kh-shell .kha-pills span{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border:1px solid var(--kh-line-2);border-radius:999px;background:#fff;color:var(--kh-ink);font-size:15px}
html body.kh-shell .kha-pills input:checked+span{background:var(--kh-blue);border-color:var(--kh-blue);color:#fff}
html body.kh-shell .kha-pills input:focus-visible+span{outline:3px solid rgba(10,79,209,.35);outline-offset:2px}
html body.kh-shell .kha-field{display:grid;gap:6px;margin:0 0 16px;font-weight:600;color:var(--kh-ink)}
html body.kh-shell .kha-field :is(input,textarea){width:100%;padding:10px 14px;font:inherit;font-weight:400}
html body.kh-shell .kha-profile-line{color:var(--kh-ink-2);margin:0 0 16px;font-size:14.5px}
html body.kh-shell .kha-advice-top{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;margin-bottom:10px;font-size:13.5px}
html body.kh-shell .kha-date{color:var(--kh-ink-3)}
html body.kh-shell .kha-approved{background:var(--kh-cyan-soft);color:var(--kh-cyan-ink);border-radius:999px;padding:2px 12px;font-weight:600}
html body.kh-shell .kha-advice h2{font-size:22px!important;line-height:1.6!important}
html body.kh-shell .kha-view{color:var(--kh-ink-2);line-height:2;margin:0 0 16px}
html body.kh-shell .kha-actions{list-style:none;padding:0;margin:0 0 16px;display:grid;gap:10px}
html body.kh-shell .kha-act{border:1px solid var(--kh-line);border-radius:var(--kh-r-md);padding:14px 16px;background:#FBFCFE}
html body.kh-shell .kha-act-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
html body.kh-shell .kha-act-head b{font-size:16.5px;color:var(--kh-ink)}
html body.kh-shell .kha-act p{margin:0 0 4px;color:var(--kh-ink-2);line-height:1.9}
html body.kh-shell .kha-act small{color:var(--kh-ink-3);font-size:12.5px}
html body.kh-shell .kha-chip{border-radius:999px;padding:3px 12px;font-size:13.5px;font-weight:700;background:#EEF1F6;color:var(--kh-ink)}
html body.kh-shell .kha-act-buy .kha-chip,html body.kh-shell .kha-act-increase .kha-chip{background:#E3F5EA;color:#0B6B3A}
html body.kh-shell .kha-act-sell .kha-chip,html body.kh-shell .kha-act-reduce .kha-chip{background:#FDECEC;color:#9B1C1C}
html body.kh-shell .kha-watch h3{font-size:15px!important;margin:0 0 6px!important}
html body.kh-shell .kha-watch ul{margin:0 0 12px;padding-inline-start:20px;color:var(--kh-ink-2)}
html body.kh-shell .kha-sources{font-size:13px;color:var(--kh-ink-3)}
html body.kh-shell .kha-disclaimer{font-size:12.5px;color:var(--kh-ink-3);border-top:1px solid var(--kh-line);padding-top:12px;margin:12px 0 0;line-height:1.9}
html body.kh-shell .kha-locked{text-align:center}
html body.kh-shell .kha-bar{display:flex;height:12px;border-radius:999px;overflow:hidden;gap:3px;margin:4px 0 10px}
html body.kh-shell .kha-s0{background:var(--kh-blue)}html body.kh-shell .kha-s1{background:var(--kh-cyan)}html body.kh-shell .kha-s2{background:#A9B6D6}html body.kh-shell .kha-s3{background:var(--kh-navy)}html body.kh-shell .kha-s4{background:#6FA8F5}
html body.kh-shell .kha-legend{list-style:none;padding:0;margin:0 0 14px;display:flex;flex-wrap:wrap;gap:6px 18px;font-size:13.5px;color:var(--kh-ink-2)}
html body.kh-shell .kha-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-inline-end:6px}
html body.kh-shell .kha-table-wrap{overflow-x:auto}
html body.kh-shell .kha-table{width:100%;border-collapse:collapse;font-size:14.5px}
html body.kh-shell .kha-table th{text-align:right;color:var(--kh-ink-3);font-weight:600;font-size:13px;padding:8px 10px;border-bottom:1px solid var(--kh-line)}
html body.kh-shell .kha-table td{padding:12px 10px;border-bottom:1px solid var(--kh-line);vertical-align:top;color:var(--kh-ink);font-variant-numeric:tabular-nums}
html body.kh-shell .kha-table td small{display:block;color:var(--kh-ink-3);font-size:12.5px}
html body.kh-shell .kha-old{border-top:1px solid var(--kh-line);padding:10px 0}
html body.kh-shell .kha-old summary{cursor:pointer;color:var(--kh-ink)}
html body.kh-shell .kha-old summary span{color:var(--kh-ink-3);margin-inline-end:8px}
html body.kh-shell .kha-old ul{color:var(--kh-ink-2);font-size:14px;line-height:1.9}
html body.kh-shell .kha-remove{display:inline-flex;gap:6px;align-items:center;font-size:13px;color:#9B1C1C;margin-top:6px}
html body.kh-shell .kha-buttons{display:flex;flex-wrap:wrap;gap:10px}
@media (max-width:540px){html body.kh-shell .kha-card{padding:18px}html body.kh-shell .kha-stat strong{font-size:22px}}

/* ---------- v6.6 — keep ticker inside the viewport ---------- */
html body.kh-shell #kh-market-ticker{overflow:hidden!important;max-width:100vw}
html body.kh-shell #kh-market-ticker .kh-ticker-ribbon{display:flex!important;align-items:center;max-width:100%;min-width:0;overflow:hidden}
html body.kh-shell #kh-market-ticker .kh-ticker-window{flex:1 1 auto;min-width:0;overflow:hidden!important}
html body.kh-shell .kha-pills label{position:relative}
html body.kh-shell .kha-pills input{width:1px!important;height:1px!important;min-height:0!important;margin:0!important;padding:0!important;inset:50% auto auto 50%}
html body.kh-shell .kha-remove{white-space:nowrap}
html body.kh-shell .kha-remove input{width:18px!important;height:18px!important;min-height:0!important;margin:0!important;padding:0!important;flex:0 0 auto}

/* ---------- v6.7 — new-advice badge, email preference ---------- */
html body.kh-shell .kha-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#E5484D;margin-inline-start:6px;vertical-align:middle;box-shadow:0 0 0 2px #fff}
html body.kh-shell .kha-mail-pref{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;background:var(--kh-bg);border-radius:var(--kh-r-sm);padding:10px 14px;margin:14px 0 0;font-size:14px;color:var(--kh-ink-2)}
html body.kh-shell .kha-mail-pref .btn{min-height:40px!important;padding-inline:16px!important;font-size:13.5px!important}

/* ---------- v6.8 — advice scorecard ---------- */
html body.kh-shell .khs-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:0 0 16px}
html body.kh-shell .khs-stat{background:var(--kh-bg);border-radius:var(--kh-r-md);padding:14px 16px;display:flex;flex-direction:column;gap:2px}
html body.kh-shell .khs-stat span{color:var(--kh-ink-3);font-size:13.5px}
html body.kh-shell .khs-stat strong{font-size:28px;font-weight:800;color:var(--kh-ink)}
html body.kh-shell .khs-stat small{color:var(--kh-ink-3);font-size:12.5px}
html body.kh-shell .khs-table td small{display:block}
html body.kh-shell .khs-pct{text-align:right;white-space:nowrap}
html body.kh-shell .khs-chip{display:inline-block;border-radius:999px;padding:2px 10px;font-size:12.5px;font-weight:700;background:#EEF1F6;color:var(--kh-ink-2);white-space:nowrap}
html body.kh-shell .khs-correct{background:#E3F5EA;color:#0B6B3A}
html body.kh-shell .khs-wrong{background:#FDECEC;color:#9B1C1C}
html body.kh-shell .khs-pending{background:var(--kh-blue-soft);color:var(--kh-blue)}
@media (max-width:600px){html body.kh-shell .khs-stats{grid-template-columns:1fr 1fr;gap:8px}html body.kh-shell .khs-stat{padding:10px 12px}html body.kh-shell .khs-stat strong{font-size:22px}html body.kh-shell .khs-table thead{display:none}html body.kh-shell .khs-table,html body.kh-shell .khs-table tbody{display:block}html body.kh-shell .khs-table tr{display:grid;grid-template-columns:1fr auto;gap:4px 12px;padding:12px 0;border-bottom:1px solid var(--kh-line)}html body.kh-shell .khs-table td{border:0!important;padding:0!important}html body.kh-shell .khs-table td:nth-child(1){order:0;grid-column:1/-1;color:var(--kh-ink-3);font-size:12.5px}html body.kh-shell .khs-table td:nth-child(2){order:1}html body.kh-shell .khs-table td:nth-child(5){order:2;text-align:left}html body.kh-shell .khs-table td:nth-child(3){order:3;color:var(--kh-ink-2)}html body.kh-shell .khs-table td:nth-child(4){order:4;text-align:left}}

/* ---------- v6.9 — portfolio health, rebalancing, timeline ---------- */
html body.kh-shell .khr h3{font-size:16px!important;margin:18px 0 10px!important}
html body.kh-shell .khr-health{list-style:none;padding:0;margin:0 0 6px;display:grid;gap:8px}
html body.kh-shell .khr-health li{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border-radius:var(--kh-r-sm);background:var(--kh-bg);color:var(--kh-ink-2);font-size:14.5px;line-height:1.8}
html body.kh-shell .khr-health li span{flex:0 0 22px;height:22px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;margin-top:3px}
html body.kh-shell .khr-health .khr-ok span{background:#E3F5EA;color:#0B6B3A}
html body.kh-shell .khr-health .khr-warn span{background:#FFF1DB;color:#8A5300}
html body.kh-shell .khr-rows{display:grid;gap:12px}
html body.kh-shell .khr-row-head{display:flex;justify-content:space-between;gap:8px;font-size:14.5px;margin-bottom:6px}
html body.kh-shell .khr-row-head b{color:var(--kh-ink)}
html body.kh-shell .khr-row-head small{color:var(--kh-ink-3)}
html body.kh-shell .khr-track{position:relative;height:10px;border-radius:999px;background:#E9EDF5;overflow:visible}
html body.kh-shell .khr-fill{position:absolute;inset-block:0;inset-inline-start:0;border-radius:999px;background:var(--kh-blue)}
html body.kh-shell .khr-off .khr-fill{background:#E08A00}
html body.kh-shell .khr-target{position:absolute;top:-4px;width:2px;height:18px;background:var(--kh-ink);border-radius:2px}
html body.kh-shell .khr-trade{margin:6px 0 0;font-size:13.5px;color:var(--kh-ink-2)}
html body.kh-shell .khr-status{margin:16px 0 8px;padding:10px 14px;border-radius:var(--kh-r-sm);font-size:14px;line-height:1.9}
html body.kh-shell .khr-status.khr-warn{background:#FFF6E8;color:#6B4200}
html body.kh-shell .khr-status.khr-ok{background:#E9F7EF;color:#0B5B32}
html body.kh-shell .khr-cash{margin-top:16px;display:grid;gap:8px;font-size:14.5px;color:var(--kh-ink)}
html body.kh-shell .khr-cash>div{display:flex;flex-wrap:wrap;gap:8px}
html body.kh-shell .khr-cash input{flex:1 1 200px;min-width:0;padding:10px 14px;font:inherit}
html body.kh-shell .khr-alloc{list-style:none;padding:0;margin:10px 0 0;display:grid;gap:6px}
html body.kh-shell .khr-alloc li{display:flex;justify-content:space-between;padding:8px 12px;background:var(--kh-blue-soft);border-radius:var(--kh-r-sm);color:var(--kh-ink)}
html body.kh-shell .khr-svg{width:100%;height:auto;display:block;margin:4px 0}
html body.kh-shell .khr-axis{stroke:var(--kh-line-2);stroke-width:1}
html body.kh-shell .khr-line-port{fill:none;stroke:var(--kh-blue);stroke-width:3;stroke-linejoin:round;stroke-linecap:round}
html body.kh-shell .khr-line-gold{fill:none;stroke:#C9A24E;stroke-width:2.5;stroke-dasharray:6 5;stroke-linejoin:round}
html body.kh-shell .khr-legend{list-style:none;padding:0;margin:6px 0 0;display:flex;flex-wrap:wrap;gap:8px 20px;font-size:14px;color:var(--kh-ink-2)}
html body.kh-shell .khr-legend i{display:inline-block;width:18px;height:3px;border-radius:2px;margin-inline-end:6px;vertical-align:middle}
html body.kh-shell .khr-key-port{background:var(--kh-blue)}
html body.kh-shell .khr-key-gold{background:#C9A24E}

/* ---------- v6.10 — price alerts ---------- */
html body.kh-shell .khal-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;align-items:end}
html body.kh-shell .khal-form label{display:grid;gap:6px;font-size:13.5px;font-weight:600;color:var(--kh-ink)}
html body.kh-shell .khal-form :is(select,input){width:100%;min-height:46px;padding:0 12px;font:inherit;font-weight:400}
html body.kh-shell .khal-form .btn{min-height:46px}
html body.kh-shell .khal-list{list-style:none;padding:0;margin:16px 0 0;display:grid;gap:8px}
html body.kh-shell .khal-list li{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--kh-line);border-radius:var(--kh-r-md);background:#FBFCFE}
html body.kh-shell .khal-list li>div{display:grid;gap:2px;font-size:14px;color:var(--kh-ink-2)}
html body.kh-shell .khal-list li b{color:var(--kh-ink)}
html body.kh-shell .khal-list li small{color:var(--kh-ink-3);font-size:12.5px}
html body.kh-shell .khal-list .khal-triggered{background:#E9F7EF;border-color:#CDEBD9}
html body.kh-shell .khal-list .btn{min-height:38px!important;padding-inline:14px!important;font-size:13px!important}
/* v6.11 — UI/UX Pro Max checklist: contrast, focus, reduced motion, skip link, pointer */
html body.kh-shell :focus-visible{outline:2px solid #0A4FD1!important;outline-offset:2px}
html body.kh-shell .kha-pills input:focus-visible+span{outline:2px solid #0A4FD1!important;outline-offset:2px}
html body.kh-shell :where(button,[type=submit],[type=button],select,summary,label:has(>input[type=radio]),label:has(>input[type=checkbox])){cursor:pointer}
html body.kh-shell .kh-skip{position:absolute;top:-80px;right:16px;z-index:10000;background:var(--kh-navy);color:#fff!important;padding:10px 18px;border-radius:12px;font-weight:600;font-size:14px;text-decoration:none!important;transition:top .15s}
html body.kh-shell .kh-skip:focus{top:12px}
html body.kh-shell #kh-main:focus{outline:none!important}
@media (prefers-reduced-motion:reduce){html body.kh-shell *,html body.kh-shell *::before,html body.kh-shell *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}html body.kh-shell #kh-market-ticker .kh-ticker-track{animation:none!important;transform:none!important}}

/* v6.12 — ui1 (1405-08-09): menu close color, password toggle alignment, ticker pause icon. Rollback: delete this block. */
html body.kh-shell #mainMenu .kh-menu-close{color:var(--kh-ink)!important}
html body.kh-shell .password-wrap{position:relative!important;display:block!important;margin-top:8px}
html body.kh-shell .password-wrap input{margin:0!important;width:100%;padding-left:78px!important}
html body.kh-shell .password-wrap .password-toggle{position:absolute!important;left:8px!important;right:auto!important;top:50%!important;transform:translateY(-50%)!important;min-height:36px!important;height:36px!important;padding:0 12px!important;margin:0!important;border:0!important;border-radius:10px!important;background:var(--kh-blue-soft)!important;color:var(--kh-blue)!important;font:inherit;font-size:12.5px!important;font-weight:600!important;line-height:36px!important;box-shadow:none!important}
html body.kh-shell #kh-market-ticker .kh-ticker-pause{font-size:0!important;position:relative;flex:none}
html body.kh-shell #kh-market-ticker .kh-ticker-pause::before{content:"";position:absolute;inset:0;margin:auto;width:10px;height:12px;border-left:3px solid currentColor;border-right:3px solid currentColor;box-sizing:border-box}
html body.kh-shell #kh-market-ticker .kh-ticker-pause[aria-pressed="true"]::before{width:0;height:0;border-right:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:10px solid currentColor}

/* v6.13 — ui2 (1405-08-10): compact stats + foldable sections on advice.php, help page FAQ. Rollback: delete this block. */
html body.kh-shell .kha-fold-btn{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:44px;cursor:pointer;font:inherit;color:inherit}
html body.kh-shell .kha-fold-btn::after{content:"";flex:none;width:9px;height:9px;margin-inline:4px;border-left:2px solid var(--kh-ink-3);border-bottom:2px solid var(--kh-ink-3);transform:translateY(-3px) rotate(-45deg);transition:transform .2s}
html body.kh-shell .kha-fold.is-open .kha-fold-btn::after{transform:translateY(2px) rotate(135deg)}
html body.kh-shell .kha-fold-btn:focus-visible{outline:2px solid #0A4FD1!important;outline-offset:4px;border-radius:8px}
html body.kh-shell .kha-fold:not(.is-open)>:not(.kha-fold-head){display:none!important}
html body.kh-shell .kha-fold:not(.is-open){padding-block:12px!important}
html body.kh-shell .kha-fold:not(.is-open)>.kha-fold-head{margin:0!important}
html body.kh-shell .kha-fold-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
html body.kh-shell .kha-fold-head h2,html body.kh-shell h2.kha-fold-head{flex:1 1 auto;margin:0!important}
@media (max-width:600px){
html body.kh-shell .kha-stats{grid-template-columns:1fr 1fr!important;gap:8px!important;margin-bottom:12px!important}
html body.kh-shell .kha-stat{padding:12px 14px!important;border-radius:var(--kh-r-md)!important;min-width:0}
html body.kh-shell .kha-stat:first-child{grid-column:1/-1}
html body.kh-shell .kha-stat span{font-size:12.5px!important}
html body.kh-shell .kha-stat strong{font-size:18px!important}
html body.kh-shell .kha-stat:first-child strong{font-size:24px!important}
html body.kh-shell .kha-stat strong small{font-size:11.5px!important}
html body.kh-shell .kha-stat>small{font-size:11.5px!important}
}
html body.kh-shell .kh-help .kha-head p{color:var(--kh-ink-2);margin-top:8px}
html body.kh-shell .kh-help .kha-card{margin-bottom:16px}
html body.kh-shell .kh-help-actions{display:flex;gap:10px;flex-wrap:wrap}
html body.kh-shell .kh-faq-item{border-top:1px solid var(--kh-line)}
html body.kh-shell .kh-faq-item:first-of-type{border-top:0}
html body.kh-shell .kh-faq-item summary{list-style:none;display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:48px;padding:12px 0;cursor:pointer;font-weight:700;color:var(--kh-ink)}
html body.kh-shell .kh-faq-item summary::-webkit-details-marker{display:none}
html body.kh-shell .kh-faq-item summary::after{content:"+";flex:none;font-size:22px;line-height:1;color:var(--kh-blue)}
html body.kh-shell .kh-faq-item[open] summary::after{content:"−"}
html body.kh-shell .kh-faq-item p{margin:0 0 14px;line-height:2}

/* v6.14 — admin card payments (1405-08-10) + fold scroll offset. Rollback: delete this block. */
html body.kh-shell .kha-fold{scroll-margin-top:84px}
html body.kh-shell .kh-pay .container{max-width:860px}
html body.kh-shell .kh-pay-title{font-size:18px;margin:8px 0 12px}
html body.kh-shell .kh-pay-item{margin-bottom:14px;position:relative}
html body.kh-shell .kh-pay-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
html body.kh-shell .kh-pay-who{display:flex;flex-direction:column;gap:2px;min-width:0}
html body.kh-shell .kh-pay-who b{font-size:17px;color:var(--kh-ink)}
html body.kh-shell .kh-pay-who small{color:var(--kh-ink-3);font-size:13px;overflow-wrap:anywhere;text-align:right}
html body.kh-shell .kh-pay-amount{text-align:left;display:flex;flex-direction:column}
html body.kh-shell .kh-pay-amount strong{font-size:20px;font-weight:800;color:var(--kh-navy)}
html body.kh-shell .kh-pay-amount small{color:var(--kh-ink-3);font-size:12.5px}
html body.kh-shell .kh-pay-meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;margin:14px 0;padding:12px 14px;background:var(--kh-bg);border-radius:var(--kh-r-sm)}
html body.kh-shell .kh-pay-meta dt{font-size:12px;color:var(--kh-ink-3)}
html body.kh-shell .kh-pay-meta dd{margin:2px 0 0;color:var(--kh-ink);display:flex;align-items:center;gap:8px;flex-wrap:wrap}
html body.kh-shell .kh-pay-meta dd b{font-size:17px;letter-spacing:.5px}
html body.kh-shell .kh-copy{border:1px solid var(--kh-line-2);background:#fff;color:var(--kh-blue);border-radius:999px;padding:4px 12px;font:inherit;font-size:12.5px;min-height:32px;cursor:pointer}
html body.kh-shell .kh-pay-approve{display:grid;gap:10px}
html body.kh-shell .kh-pay-approve label{display:flex;flex-direction:column;gap:6px;font-size:13.5px;color:var(--kh-ink-2)}
html body.kh-shell .kh-pay-approve label small{color:var(--kh-ink-3);font-size:12px}
html body.kh-shell .kh-pay-approve input{min-height:46px;font-size:16px}
html body.kh-shell .kh-pay-approve .btn{width:100%;min-height:50px!important;font-size:16px!important}
html body.kh-shell .kh-pay-reject{margin-top:10px}
html body.kh-shell .kh-pay-reject summary{cursor:pointer;color:#B42318;font-size:13.5px;min-height:40px;display:flex;align-items:center}
html body.kh-shell .kh-pay-reject .btn{border-color:#F4C7C3!important;color:#B42318!important}
html body.kh-shell .kh-pay-id{position:absolute;left:16px;bottom:10px;color:var(--kh-ink-3);font-size:11px}
html body.kh-shell .kh-pay-recent{list-style:none;margin:0;padding:0}
html body.kh-shell .kh-pay-recent li{padding:10px 0;border-top:1px solid var(--kh-line);font-size:13.5px;line-height:1.9}
html body.kh-shell .kh-pay-recent li:first-child{border-top:0}
html body.kh-shell .kh-pay-recent small{color:var(--kh-ink-3);margin-inline-start:6px}
html body.kh-shell .kh-pay-badge{display:inline-block;border-radius:999px;padding:1px 10px;font-size:12px;font-weight:700}
html body.kh-shell .kh-pay-paid{background:#E9F7EF;color:#146C43}
html body.kh-shell .kh-pay-rejected{background:#FDECEA;color:#B42318}
html body.kh-shell .kh-pay-settings{margin-top:16px}
html body.kh-shell .kh-pay-settings summary{cursor:pointer;font-weight:700;color:var(--kh-ink);min-height:44px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
html body.kh-shell .kh-pay-settings summary small{font-weight:400;color:var(--kh-ink-3)}
html body.kh-shell .kh-pay-settings form{display:grid;gap:10px}
html body.kh-shell .kh-pay-settings label{display:flex;flex-direction:column;gap:6px}
html body.kh-shell .kh-pay-settings label.kh-pay-check{flex-direction:row;align-items:center}
html body.kh-shell .kh-pay-links{margin-top:16px;font-size:14px}
html body.kh-shell .kh-pay .kha-stat:first-child{grid-column:auto}
html body.kh-shell .kh-pay .kha-stat strong{font-size:18px!important}
html body.kh-shell .kh-pay-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;margin-inline-start:6px;border-radius:999px;background:#E5484D;color:#fff!important;font-size:12px;font-weight:700;line-height:1}

/* v6.15 — subscription page for active subscribers + admin notify (1405-08-10). Rollback: delete this block. */
html body.kh-shell .kh-subx .container{max-width:760px}
html body.kh-shell .kh-subx .kha-card{margin-bottom:16px}
html body.kh-shell .kh-subx-admin{font-size:14px;margin:0 0 12px}
html body.kh-shell .kh-subx-status{border-top:4px solid #1F9D55!important}
html body.kh-shell .kh-subx-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
html body.kh-shell .kh-subx-badge{background:#E9F7EF;color:#146C43;border-radius:999px;padding:3px 12px;font-size:13px;font-weight:700}
html body.kh-shell .kh-subx-plan{color:var(--kh-ink-2);font-size:14px;font-weight:600}
html body.kh-shell .kh-subx-until{margin:14px 0 4px;font-size:17px;color:var(--kh-ink)}
html body.kh-shell .kh-subx-until small{color:var(--kh-ink-3);font-size:12.5px}
html body.kh-shell .kh-subx-left{margin:0 0 10px;color:var(--kh-ink-2)}
html body.kh-shell .kh-subx-left b{font-size:28px;font-weight:800;color:var(--kh-navy)}
html body.kh-shell .kh-subx-bar{height:8px;border-radius:999px;background:var(--kh-blue-soft);overflow:hidden;margin-bottom:16px}
html body.kh-shell .kh-subx-bar span{display:block;height:100%;background:linear-gradient(90deg,var(--kh-cyan),var(--kh-blue));border-radius:999px}
html body.kh-shell .kh-subx-actions{display:flex;gap:10px;flex-wrap:wrap}
html body.kh-shell .kh-subx-actions .btn{flex:1 1 140px;justify-content:center}
html body.kh-shell .kh-subx-open{border-inline-start:4px solid var(--kh-cyan)!important}
html body.kh-shell .kh-subx-open h2,html body.kh-shell .kh-subx-order h2{font-size:18px;margin:0 0 8px}
html body.kh-shell .kh-subx-id{color:var(--kh-ink-3);font-size:12px}
html body.kh-shell .kh-subx-card input{font-size:1.3rem!important;letter-spacing:2px;text-align:left}
html body.kh-shell .kh-subx-form{display:grid;gap:10px;margin-top:10px}
html body.kh-shell .kh-subx-form label,html body.kh-shell .kh-subx-card{display:flex;flex-direction:column;gap:6px}
html body.kh-shell .kh-subx-renew>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;min-height:44px;font-weight:700;color:var(--kh-ink);font-size:17px}
html body.kh-shell .kh-subx-renew>summary::-webkit-details-marker{display:none}
html body.kh-shell .kh-subx-renew>summary small{font-weight:400;font-size:13px;color:var(--kh-ink-3);flex:1 1 auto}
html body.kh-shell .kh-subx-renew>summary::after{content:"";flex:none;width:9px;height:9px;border-left:2px solid var(--kh-ink-3);border-bottom:2px solid var(--kh-ink-3);transform:translateY(-3px) rotate(-45deg);transition:transform .2s}
html body.kh-shell .kh-subx-renew[open]>summary::after{transform:translateY(2px) rotate(135deg)}
html body.kh-shell .kh-subx-plans{list-style:none;margin:8px 0 0;padding:0}
html body.kh-shell .kh-subx-row{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:12px;padding:14px 0;border-top:1px solid var(--kh-line)}
html body.kh-shell .kh-subx-row:first-child{border-top:0}
html body.kh-shell .kh-subx-info{display:flex;flex-direction:column;gap:2px;min-width:0}
html body.kh-shell .kh-subx-info b{color:var(--kh-ink);font-size:15.5px}
html body.kh-shell .kh-subx-info small{color:var(--kh-ink-3);font-size:12.5px}
html body.kh-shell .kh-subx-price{font-size:16px;font-weight:800;color:var(--kh-navy);white-space:nowrap}
html body.kh-shell .kh-subx-row form{display:flex;flex-direction:column;gap:6px}
html body.kh-shell .kh-subx-row .btn{min-height:40px!important;padding-inline:18px!important;font-size:14px!important;white-space:nowrap}
html body.kh-shell .kh-subx-demo{font-size:11.5px!important;min-height:30px!important}
html body.kh-shell .kh-subx-terms{font-size:12.5px;margin-top:8px}
html body.kh-shell .kh-subx-links{font-size:14px}
@media (max-width:520px){html body.kh-shell .kh-subx-row{grid-template-columns:1fr auto}html body.kh-shell .kh-subx-row form{grid-column:1/-1}html body.kh-shell .kh-subx-row .btn{width:100%}}
html body.kh-shell .kh-pay-notify{margin-top:16px;padding-top:14px;border-top:1px solid var(--kh-line)}

/* v6.16 — subscription purchase redesign + discount codes (1405-08-10). Rollback: delete this block. */
html body.kh-shell .kh-buy .container{max-width:640px}
html body.kh-shell .kh-buy-admin{font-size:13.5px;margin:0 0 10px;text-align:left}
html body.kh-shell .kh-buy-hero{text-align:center}
html body.kh-shell .kh-buy-hero h1{font-size:clamp(26px,6vw,36px);line-height:1.5}
html body.kh-shell .kh-buy-hero p{color:var(--kh-ink-2);margin-top:6px}
html body.kh-shell .kh-feats{list-style:none;margin:20px 0 28px;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:10px}
html body.kh-shell .kh-feats li{background:var(--kh-surface);border:1px solid var(--kh-line);border-radius:var(--kh-r-md);padding:14px;display:flex;flex-direction:column;gap:2px}
html body.kh-shell .kh-feats svg{width:26px;height:26px;padding:6px;margin-bottom:6px;border-radius:10px;background:var(--kh-blue-soft);stroke:var(--kh-blue);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;box-sizing:content-box}
html body.kh-shell .kh-feats b{color:var(--kh-ink);font-size:14.5px}
html body.kh-shell .kh-feats span{color:var(--kh-ink-3);font-size:12.5px;line-height:1.8}
html body.kh-shell .kh-buy-form{background:var(--kh-surface);border:1px solid var(--kh-line);border-radius:var(--kh-r-lg);box-shadow:var(--kh-shadow);padding:20px;margin:0 0 16px;scroll-margin-top:84px}
html body.kh-shell .kh-buy-title{font-size:20px;margin:0 0 4px}
html body.kh-shell .kh-buy-sub{color:var(--kh-ink-3);font-size:13.5px;margin:0 0 6px}
html body.kh-shell .kh-plans{display:grid;gap:10px;margin:14px 0 6px}
html body.kh-shell .kh-plan-opt{position:relative;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:16px 14px;border:1.5px solid var(--kh-line-2);border-radius:var(--kh-r-md);background:#fff;cursor:pointer;transition:border-color .15s,box-shadow .15s,background .15s;margin:0!important}
html body.kh-shell .kh-plan-opt:hover{border-color:rgba(10,79,209,.45)}
html body.kh-shell .kh-plan-opt input{position:absolute;opacity:0;pointer-events:none}
html body.kh-shell .kh-plan-radio{width:20px;height:20px;border-radius:50%;border:2px solid var(--kh-line-2);box-sizing:border-box;transition:border .15s}
html body.kh-shell .kh-plan-opt:has(input:checked){border-color:var(--kh-blue);background:#F7FAFF;box-shadow:0 0 0 3px rgba(10,79,209,.12)}
html body.kh-shell .kh-plan-opt:has(input:checked) .kh-plan-radio{border:6px solid var(--kh-blue)}
html body.kh-shell .kh-plan-opt:has(input:focus-visible){outline:2px solid #0A4FD1;outline-offset:2px}
html body.kh-shell .kh-plan-body{display:flex;flex-direction:column;gap:4px;min-width:0}
html body.kh-shell .kh-plan-name{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
html body.kh-shell .kh-plan-name b{font-size:16px;color:var(--kh-ink)}
html body.kh-shell .kh-plan-tag{font-style:normal;font-size:11.5px;font-weight:700;color:#fff;background:linear-gradient(90deg,var(--kh-blue),var(--kh-cyan));border-radius:999px;padding:2px 9px}
html body.kh-shell .kh-plan-sub{font-size:12.5px;color:var(--kh-ink-3)}
html body.kh-shell .kh-plan-price{display:flex;flex-direction:column;align-items:flex-end;text-align:left}
html body.kh-shell .kh-plan-price b{font-size:18px;font-weight:800;color:var(--kh-navy);font-variant-numeric:tabular-nums;line-height:1.4}
html body.kh-shell .kh-plan-price small{font-size:11.5px;color:var(--kh-ink-3)}
html body.kh-shell .kh-plan-total{font-size:11.5px;color:var(--kh-ink-3);margin-top:2px;white-space:nowrap}
html body.kh-shell .kh-plan-total s,html body.kh-shell .kh-ord-off s{color:#9AA3B8}
html body.kh-shell .kh-chip-ok{display:inline-block;background:#E9F7EF;color:#146C43;border-radius:999px;padding:2px 10px;font-size:12px;font-weight:700}
html body.kh-shell .kh-coupon{margin:10px 0 4px}
html body.kh-shell .kh-coupon summary{cursor:pointer;color:var(--kh-blue);font-size:14px;font-weight:600;min-height:40px;display:inline-flex;align-items:center;list-style:none}
html body.kh-shell .kh-coupon summary::-webkit-details-marker{display:none}
html body.kh-shell .kh-coupon-row{display:flex;gap:8px;margin-top:4px}
html body.kh-shell .kh-coupon-row input{flex:1;min-width:0;min-height:44px;text-transform:uppercase;letter-spacing:1px;margin:0!important}
html body.kh-shell .kh-coupon-row .btn{min-height:44px!important;flex:none}
html body.kh-shell .kh-coupon-ok{margin:4px 0;font-size:13px}
html body.kh-shell .kh-coupon-err{color:#B42318;font-size:13px;margin:8px 0 0}
html body.kh-shell .kh-buy-cta{border-top:1px solid var(--kh-line);margin-top:12px;padding-top:14px;display:grid;gap:8px}
html body.kh-shell .kh-buy-pay{margin:0;display:flex;justify-content:space-between;align-items:baseline;color:var(--kh-ink-2);font-size:14px}
html body.kh-shell .kh-buy-pay b{font-size:20px;color:var(--kh-ink);font-weight:800}
html body.kh-shell .kh-buy-go{width:100%;min-height:54px!important;font-size:17px!important;justify-content:center}
html body.kh-shell .kh-trust{list-style:none;padding:0;margin:12px 0 0;display:flex;flex-wrap:wrap;justify-content:center;gap:6px 14px;font-size:12px;color:var(--kh-ink-3)}
html body.kh-shell .kh-trust li::before{content:"✓";color:#1F9D55;margin-inline-end:4px;font-weight:700}
html body.kh-shell .kh-buy-legal{font-size:12px;text-align:center}
html body.kh-shell .kh-ord-sum{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap;padding-bottom:14px;border-bottom:1px solid var(--kh-line);margin-bottom:6px}
html body.kh-shell .kh-ord-sum span{display:block;color:var(--kh-ink-3);font-size:13px}
html body.kh-shell .kh-ord-sum strong{font-size:28px;font-weight:800;color:var(--kh-navy)}
html body.kh-shell .kh-ord-sum strong small{font-size:14px;font-weight:500;color:var(--kh-ink-3)}
html body.kh-shell .kh-ord-off{display:flex;flex-direction:column;align-items:flex-end;gap:4px;font-size:13px}
html body.kh-shell .kh-ord-done{display:flex;gap:14px;align-items:center;margin:16px 0}
html body.kh-shell .kh-ord-ico{flex:none;width:48px;height:48px;border-radius:50%;background:#1F9D55;color:#fff;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:700}
html body.kh-shell .kh-ord-done b{font-size:17px;color:var(--kh-ink)}
html body.kh-shell .kh-ord-done p{margin:2px 0 0;font-size:13.5px}
html body.kh-shell .kh-ord-warn{font-size:12.5px;margin-top:10px}
html body.kh-shell .kh-steps{list-style:none;counter-reset:st;margin:8px 0 0;padding:0}
html body.kh-shell .kh-steps>li{counter-increment:st;position:relative;padding:14px 44px 14px 0;border-inline-start:2px solid var(--kh-line);margin-inline-start:15px;padding-inline-start:0;display:flex;flex-direction:column;gap:6px}
html body.kh-shell .kh-steps>li{border:0;margin:0;padding:12px 44px 14px 0}
html body.kh-shell .kh-steps>li::before{content:counter(st);position:absolute;right:0;top:10px;width:30px;height:30px;border-radius:50%;background:var(--kh-bg);color:var(--kh-ink-3);font-weight:700;display:flex;align-items:center;justify-content:center;font-size:14px}
html body.kh-shell .kh-steps>li:not(:last-child)::after{content:"";position:absolute;right:14px;top:44px;bottom:-6px;width:2px;background:var(--kh-line)}
html body.kh-shell .kh-steps>li.is-current::before{background:var(--kh-blue);color:#fff}
html body.kh-shell .kh-steps>li.is-done::before{content:"✓";background:#1F9D55;color:#fff}
html body.kh-shell .kh-steps>li>b{color:var(--kh-ink);font-size:15px;line-height:30px}
html body.kh-shell .kh-steps>li>span,html body.kh-shell .kh-steps>li>small{color:var(--kh-ink-3);font-size:13px;line-height:1.9}
html body.kh-shell .kh-card-box{background:linear-gradient(135deg,var(--kh-navy),var(--kh-blue));color:#fff;border-radius:16px;padding:16px 18px;display:flex;flex-direction:column;gap:6px;box-shadow:0 12px 28px -16px rgba(7,26,74,.6)}
html body.kh-shell .kh-card-bank{font-size:13px;opacity:.85}
html body.kh-shell .kh-card-no{font-size:clamp(18px,5.5vw,23px);letter-spacing:2px;font-weight:700;text-align:left;font-family:ui-monospace,Menlo,Consolas,monospace}
html body.kh-shell .kh-card-holder{font-size:13.5px;opacity:.9}
html body.kh-shell .kh-card-copy{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}
html body.kh-shell .kh-card-box .kh-copy{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.35);color:#fff}
html body.kh-shell .kh-ord .kh-subx-form .btn{width:100%}
@media (max-width:420px){html body.kh-shell .kh-plan-opt{grid-template-columns:auto 1fr;row-gap:8px}html body.kh-shell .kh-plan-price{grid-column:2;flex-direction:row;align-items:baseline;gap:6px;flex-wrap:wrap}html body.kh-shell .kh-plan-total{margin:0}html body.kh-shell .kh-feats li{padding:12px}}
/* admin coupons */
html body.kh-shell .kh-cpn-made{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border:2px dashed var(--kh-blue)!important}
html body.kh-shell .kh-cpn-made b{font-size:22px;letter-spacing:2px;color:var(--kh-navy)}
html body.kh-shell .kh-cpn-made span,html body.kh-shell .kh-cpn-made small{color:var(--kh-ink-3)}
html body.kh-shell .kh-cpn-new>summary{cursor:pointer;font-weight:700;font-size:17px;color:var(--kh-blue);min-height:44px;display:flex;align-items:center}
html body.kh-shell .kh-cpn-form{display:grid;gap:14px;margin-top:8px}
html body.kh-shell .kh-cpn-form fieldset{border:0;padding:0;margin:0}
html body.kh-shell .kh-cpn-form legend{font-weight:700;color:var(--kh-ink);margin-bottom:8px;font-size:14px}
html body.kh-shell .kh-cpn-form legend small,html body.kh-shell .kh-cpn-grid label small{font-weight:400;color:var(--kh-ink-3);font-size:12px}
html body.kh-shell .kh-cpn-kinds{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}
html body.kh-shell .kh-cpn-kinds label{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1.5px solid var(--kh-line-2);border-radius:var(--kh-r-sm);cursor:pointer}
html body.kh-shell .kh-cpn-kinds label:has(input:checked){border-color:var(--kh-blue);background:#F7FAFF}
html body.kh-shell .kh-cpn-kinds span{display:flex;flex-direction:column}
html body.kh-shell .kh-cpn-kinds small{color:var(--kh-ink-3);font-size:12px}
html body.kh-shell .kh-cpn-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
html body.kh-shell .kh-cpn-grid label{display:flex;flex-direction:column;gap:6px;font-size:13.5px;color:var(--kh-ink-2)}
html body.kh-shell .kh-cpn-grid label[hidden]{display:none}
html body.kh-shell .kh-cpn-plans label,html body.kh-shell .kh-cpn-check{display:inline-flex;align-items:center;gap:6px;margin-inline-end:16px;min-height:36px;font-size:14px}
html body.kh-shell .kh-cpn-form>.btn{justify-self:start;min-width:160px}
html body.kh-shell .kh-cpn-item{margin-bottom:12px}
html body.kh-shell .kh-cpn-off{opacity:.65}
html body.kh-shell .kh-cpn-top{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
html body.kh-shell .kh-cpn-code{font-size:19px;letter-spacing:1.5px;color:var(--kh-navy)}
html body.kh-shell .kh-cpn-state{font-size:12px;font-weight:700;border-radius:999px;padding:2px 10px;background:#E9F7EF;color:#146C43}
html body.kh-shell .kh-cpn-off .kh-cpn-state{background:#F1F2F5;color:var(--kh-ink-3)}
html body.kh-shell .kh-cpn-label{font-weight:700;color:var(--kh-ink);margin:8px 0}
html body.kh-shell .kh-cpn-label small{font-weight:400;color:var(--kh-ink-3)}
html body.kh-shell .kh-cpn-meta{list-style:none;padding:0;margin:0 0 12px;display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:4px 16px;font-size:13px;color:var(--kh-ink-2)}
html body.kh-shell .kh-cpn-meta small{color:var(--kh-ink-3)}
html body.kh-shell .kh-pay-coupon{font-size:12.5px;color:#146C43;margin-top:4px}

/* v6.17 — allocation model v2 result + 6-step form (1405-08-14). Rollback: delete this block. */
html body.kh-shell .kc-progress{margin:10px 0 0;font-size:12px;color:var(--kh-ink-3);text-align:center}
html body.kh-shell .kc-form .kc-controls{display:flex;gap:10px;justify-content:space-between;margin-top:12px}
html body.kh-shell .kh-r2-score{display:flex;gap:18px;align-items:center;flex-wrap:wrap;background:var(--kh-surface);border:1px solid var(--kh-line);border-radius:var(--kh-r-lg);padding:18px;margin:18px 0}
html body.kh-shell .kh-r2-gauge{position:relative;width:140px;flex:none;text-align:center}
html body.kh-shell .kh-r2-gauge svg{width:140px;height:78px;display:block}
html body.kh-shell .kh-r2-gauge strong{position:absolute;left:0;right:0;top:34px;font-size:28px;font-weight:800;color:var(--kh-navy);line-height:1}
html body.kh-shell .kh-r2-gauge span{display:block;font-size:12px;color:var(--kh-ink-3);margin-top:2px}
html body.kh-shell .kh-r2-score-text{flex:1 1 220px;min-width:0}
html body.kh-shell .kh-r2-score-text>b{font-size:18px;color:var(--kh-ink)}
html body.kh-shell .kh-r2-score-text ul{list-style:none;padding:0;margin:8px 0;display:grid;gap:4px;font-size:14px;color:var(--kh-ink-2)}
html body.kh-shell .kh-r2-score-text small{color:var(--kh-ink-3);font-size:12.5px;line-height:1.9}
html body.kh-shell .kh-result .kh-r2-warn{background:#FFF8E6;border:1px solid #F3DFA8;color:#6B4E00!important;border-radius:var(--kh-r-sm);padding:12px 14px;font-size:14px;margin:10px 0}
html body.kh-shell .kh-r2-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin:18px 0}
html body.kh-shell .kh-r2-card{background:var(--kh-surface);border:1px solid var(--kh-line);border-radius:var(--kh-r-lg);padding:18px}
html body.kh-shell .kh-r2-card h3{font-size:17px;margin:0 0 6px;color:var(--kh-ink)}
html body.kh-shell .kh-result .kh-r2-card p{font-size:14px;margin:8px 0}
html body.kh-shell .kh-r2-loss{display:block;font-size:26px;font-weight:800;color:#B42318;margin:6px 0}
html body.kh-shell .kh-r2-loss small{font-size:13px;font-weight:500;color:var(--kh-ink-3)}
html body.kh-shell .kh-result .kh-r2-fact{background:var(--kh-bg);border-radius:var(--kh-r-sm);padding:10px 12px;font-size:13px!important}
html body.kh-shell .kc-dot.kc-equity{background:#12B9C8}
html body.kh-shell.kc-home .kc-choice{border:1px solid var(--kh-line-2)!important;border-radius:var(--kh-r-md)!important;background:#fff!important;padding:14px!important;align-items:center}
html body.kh-shell.kc-home .kc-choice:has(input:checked){border-color:var(--kh-blue)!important;background:var(--kh-blue-soft)!important;box-shadow:0 0 0 1px var(--kh-blue) inset!important}
html body.kh-shell.kc-home .kc-choice span,html body.kh-shell.kc-home .kc-choice input:checked+span{border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;flex:1;min-width:0}
html body.kh-shell.kc-home .kc-choice b{display:block;color:var(--kh-ink)}

/* v6.18 — web push opt-in card (1405-08-14). Rollback: delete this block. */
html body.kh-shell .kh-push-card{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:linear-gradient(135deg,#F7FAFF,#EAF8FA);border:1px solid var(--kh-line-2);border-radius:var(--kh-r-md);padding:12px 14px;margin:0 0 14px;position:relative}
html body.kh-shell .kh-push-ico{font-size:22px;flex:none}
html body.kh-shell .kh-push-txt{flex:1 1 200px;min-width:0;padding-inline-end:20px}
html body.kh-shell .kh-push-txt b{display:block;color:var(--kh-ink);font-size:14.5px}
html body.kh-shell .kh-push-txt small{display:block;color:var(--kh-ink-3);font-size:12.5px;line-height:1.8}
html body.kh-shell .kh-push-on{min-height:40px!important;font-size:14px!important;padding-inline:16px!important}
html body.kh-shell .kh-push-x{position:absolute;top:6px;left:8px;border:0;background:transparent;color:var(--kh-ink-3);font-size:20px;line-height:1;cursor:pointer;width:32px;height:32px;font-family:inherit}

/* v6.19 — trial, consultation request, chat suggestions, trust page (1405-08-15). Rollback: delete this block. */
html body.kh-shell .kh-trial{display:flex;align-items:center;gap:14px;flex-wrap:wrap;background:linear-gradient(135deg,#071A4A,#0A4FD1)!important;color:#fff;border:0!important;margin:0 0 16px}
html body.kh-shell .kh-trial div{flex:1 1 220px;min-width:0}
html body.kh-shell .kh-trial b{display:block;font-size:19px;color:#fff}
html body.kh-shell .kh-trial small{display:block;color:#DCE6FA;font-size:13px;line-height:1.9}
html body.kh-shell .kh-trial .btn{background:#fff!important;color:var(--kh-navy)!important;min-height:48px!important;font-weight:800!important}
html body.kh-shell .kh-lead{margin:16px 0}
html body.kh-shell .kh-lead h2{font-size:18px;margin:0 0 6px}
html body.kh-shell .kh-lead-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;align-items:end}
html body.kh-shell .kh-lead-form label{display:flex;flex-direction:column;gap:6px;font-size:13.5px;color:var(--kh-ink-2)}
html body.kh-shell .kh-lead-form .kh-lead-note{grid-column:1/-1}
html body.kh-shell .kh-lead-form .btn{grid-column:1/-1;min-height:48px!important}
html body.kh-shell .kh-chips{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 12px;justify-content:flex-start}
html body.kh-shell .kh-chip{border:1px solid var(--kh-line-2);background:#fff;color:var(--kh-blue);border-radius:999px;padding:8px 14px;font:inherit;font-size:13px;cursor:pointer;min-height:36px;text-align:right}
html body.kh-shell .kh-chip:hover{background:var(--kh-blue-soft);border-color:var(--kh-blue)}
html body.kh-shell .kh-trust .kha-card{margin-bottom:16px}
html body.kh-shell .kh-trust-sum{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;margin:12px 0}
html body.kh-shell .kh-trust-box{background:var(--kh-bg);border-radius:var(--kh-r-md);padding:14px}
html body.kh-shell .kh-trust-box span{display:block;color:var(--kh-ink-3);font-size:13px}
html body.kh-shell .kh-trust-box strong{display:block;font-size:28px;font-weight:800;color:var(--kh-navy)}
html body.kh-shell .kh-trust-box small{color:var(--kh-ink-3);font-size:12.5px}
html body.kh-shell .kh-trust-correct{color:#146C43;font-weight:700}
html body.kh-shell .kh-trust-wrong{color:#B42318;font-weight:700}
html body.kh-shell .kh-trust-neutral,html body.kh-shell .kh-trust-pending,html body.kh-shell .kh-trust-unscored{color:var(--kh-ink-3)}
html body.kh-shell .kh-trust-list{padding-inline-start:18px;margin:0;line-height:2.1;color:var(--kh-ink-2)}

/* v6.20 (1405-08-15): the hidden file chip in chat must stay hidden */
html body.kh-shell .chat-file-chip[hidden]{display:none!important}

/* v6.21 (1405-08-16): hint under "asset type" for cash / bank deposit choices */
html body.kh-shell .kh-manual-hint{display:block;margin-top:6px;font-size:12.5px;line-height:1.8;font-weight:400;color:#5b6478}
html body.kh-shell .kh-manual-hint.is-active{color:#0b5bd3;background:#eef4ff;border-radius:10px;padding:8px 10px}

/* v6.22 (1405-08-17): UI phase 1 — full-screen chat on phones, readable workspace title, chat summary chip */
@media (max-width:767px){
html body.kh-shell:has(.v5-chat-page){padding-bottom:0!important}
html body.kh-shell:has(.v5-chat-page) .kh-footer,html body.kh-shell:has(.v5-chat-page) #kh-market-ticker{display:none!important}
html body.kh-shell .v5-chat-page{height:calc(100dvh - 69px - 63px - env(safe-area-inset-bottom,0px));min-height:0;padding:0!important;margin:0!important;overflow:hidden}
html body.kh-shell .v5-chat-page .v5-chat-layout,html body.kh-shell .v5-chat-page .v5-chat-main{height:100%;min-height:0;padding-top:0;padding-bottom:0;margin:0}
html body.kh-shell .v5-chat-page .v5-chat-main{display:flex;flex-direction:column}
html body.kh-shell .v5-chat-page .v5-chat-bar{position:static;flex:0 0 auto}
html body.kh-shell .v5-chat-page .chat-window{flex:1 1 auto;min-height:0;height:auto!important;display:flex;flex-direction:column}
html body.kh-shell .v5-chat-page .chat-messages{flex:1 1 auto;min-height:0;height:auto!important;max-height:none!important}
html body.kh-shell .v5-chat-page .chat-window form{position:static;flex:0 0 auto}
}
html body.kh-shell .v5-chat-main>button[data-prompt]{align-self:flex-start;margin:6px 12px;padding:6px 14px;border:1px solid #cfdcf5;border-radius:999px;background:#eef4ff;color:#0a4fd1;font:inherit;font-size:13px;font-weight:700;cursor:pointer}
html body.kh-shell .inv-hero h1,html body.kh-shell .inv-hero .ku-hero-copy h1{color:#fff!important}
html body.kh-shell .v5-chat-page .chat-messages{scroll-behavior:auto!important}

/* v6.23 (1405-08-17): phase 2 — account, password reset, consent, legal pages */
html body.kh-shell .kh-forgot{margin:2px 0 10px;text-align:left;font-size:13.5px}
html body.kh-shell .kh-forgot a{color:#0a4fd1;font-weight:700}
html body.kh-shell .kh-consent{display:flex!important;flex-direction:row!important;align-items:flex-start;gap:8px;margin:8px 0 12px;font-size:13.5px;line-height:1.9;font-weight:400}
html body.kh-shell .kh-consent input{width:18px!important;min-height:18px!important;height:18px;flex:0 0 18px;margin-top:4px}
html body.kh-shell .kh-consent a{color:#0a4fd1;font-weight:700}
html body.kh-shell .kh-form-hint{margin:-4px 0 10px;font-size:12.5px;color:#5b6478;line-height:1.8}
html body.kh-shell .kh-account-page .kha-card{max-width:640px;margin-inline:auto}
html body.kh-shell .kh-account-form{box-shadow:none;border:0;padding:0;background:transparent}
html body.kh-shell .kh-account-links{list-style:none;padding:0;margin:0 0 14px;display:grid;gap:10px}
html body.kh-shell .kh-account-links a{color:#0a4fd1;font-weight:700}
html body.kh-shell .kh-legal .kha-card p,html body.kh-shell .kh-legal .kha-card li{line-height:2}
html body.kh-shell .v51-footer-bottom a{color:inherit;text-decoration:underline}

/* v6.24 (1405-08-17): phase 3 — home cards on dashboard */
html body.kh-shell .kh-home{margin:8px 0 22px}
html body.kh-shell .kh-home-grid{display:grid;grid-template-columns:2fr 1fr;gap:14px}
@media (max-width:767px){html body.kh-shell .kh-home-grid{grid-template-columns:1fr}}
html body.kh-shell .kh-home-card{background:#fff;border:1px solid #e3e8f2;border-radius:20px;padding:18px 18px 16px;display:flex;flex-direction:column;gap:8px;box-shadow:0 6px 20px rgba(14,27,61,.05)}
html body.kh-shell .kh-home-advice{background:linear-gradient(160deg,#0b2a6b,#0a4fd1);color:#fff;border:0}
html body.kh-shell .kh-home-advice h2{color:#fff;font-size:18px;line-height:1.8;margin:0}
html body.kh-shell .kh-home-advice p{color:#dbe6ff;margin:0;line-height:1.9}
html body.kh-shell .kh-home-eyebrow{font-size:12.5px;font-weight:700;color:#5b6478;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
html body.kh-shell .kh-home-advice .kh-home-eyebrow{color:#bcd2ff}
html body.kh-shell .kh-home-eyebrow i{font-style:normal;background:rgba(255,255,255,.16);border-radius:999px;padding:2px 8px;font-weight:600}
html body.kh-shell .kh-home-acts{list-style:none;margin:2px 0 4px;padding:0;display:flex;flex-wrap:wrap;gap:8px}
html body.kh-shell .kh-home-acts li{display:flex;gap:6px;align-items:center;background:rgba(255,255,255,.12);border-radius:12px;padding:6px 10px;font-size:13.5px}
html body.kh-shell .kh-home-acts li span{font-weight:700;color:#ffd7d7}
html body.kh-shell .kh-home-acts .kh-home-act-buy span,html body.kh-shell .kh-home-acts .kh-home-act-increase span{color:#b8f5cf}
html body.kh-shell .kh-home-acts .kh-home-act-hold span{color:#e6ecff}
html body.kh-shell .kh-home-advice .btn.primary{background:#fff;color:#0a4fd1;align-self:flex-start;margin-top:auto}
html body.kh-shell .kh-home-sub .btn{align-self:flex-start;margin-top:auto}
html body.kh-shell .kh-home-days{font-size:26px;font-weight:800;color:#0e1b3d}
html body.kh-shell .kh-home-days small{font-size:14px;font-weight:600;color:#5b6478}
html body.kh-shell .kh-home-days.is-warn{color:#c2410c}
html body.kh-shell .kh-home-sub p{margin:0;color:#5b6478}
html body.kh-shell .kh-home-quick{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:12px}
html body.kh-shell .kh-home-quick a{display:flex;flex-direction:column;align-items:center;gap:6px;background:#fff;border:1px solid #e3e8f2;border-radius:16px;padding:12px 6px;color:#0e1b3d;font-size:13px;font-weight:700;text-align:center;text-decoration:none}
html body.kh-shell .kh-home-quick svg{width:24px;height:24px;fill:none;stroke:#0a4fd1;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html body.kh-shell .kh-home-advice h2,html body.kh-shell .kh-home-advice b{color:#fff!important}
html body.kh-shell .kh-home-acts li b{color:#fff!important;font-weight:700}
@media (max-width:767px){html body.kh-shell .kh-home-quick a{font-size:12px;padding:10px 4px}}

/* v6.25 (1405-08-17): phase 3 — grouped mobile menu, last item above the tab bar */
html body.kh-shell .kh-mobile-menu .kh-menu-group{display:block;margin:14px 6px 4px;font-size:12px;font-weight:800;color:#8a93a6;letter-spacing:0}
html body.kh-shell.kh-nav-open .kh-tabbar{display:none!important}

/* v6.26 (1405-08-17): phase 3 — assets page: list first, add form behind a button */
html body.kh-shell .kh-asset-add>summary.kh-add-summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;background:#0a4fd1;color:#fff;border-radius:14px;padding:13px 16px;font-weight:800;font-size:15.5px}
html body.kh-shell .kh-asset-add>summary.kh-add-summary::-webkit-details-marker{display:none}
html body.kh-shell .kh-asset-add>summary span{font-size:20px;line-height:1}
html body.kh-shell .kh-asset-add[open]>summary.kh-add-summary{background:#eef4ff;color:#0a4fd1;margin-bottom:14px}
html body.kh-shell .kh-asset-add:not([open]){padding:8px!important}
html body.kh-shell .kh-asset-submit{width:100%;background:#0a4fd1!important;color:#fff!important;border:0;border-radius:14px;padding:13px 16px;font-weight:800;font-size:15.5px;margin-top:10px;cursor:pointer}
