/* =========================================================================
   kaido-heroes.css (v9, agent H, 6 Nov 2026): purposeful hero compositions.
   Every hero shows one thing from the page's own world, built from real content only:
   industry flows (src/_data/heroFlows.js), the four gates (/services), the founders (/about),
   case counts from front matter (/cases/), the office (/contact), platform evidence (/partners),
   the published comparisons (/compare/), the author and the article facts (posts).
   Tokens come from the top of kaido-system-v2.css (--k-*). Logical properties, so RTL mirrors.
   Selectors start with :root body so they hold against page-level <style> blocks.
   ========================================================================= */

/* ---------- 0. Shared: the operational rail (a vertical sequence of steps) ---------- */
:root body .kh-flow{margin:0;background:#fff;border:1px solid var(--k-line);border-radius:var(--k-r-lg);padding:var(--k-s-5) var(--k-s-5) var(--k-s-4)}
:root body .kh-flow-h{display:block;font-family:'Inter Tight','Inter',system-ui,sans-serif;font-size:var(--k-t-h4);line-height:1.25;font-weight:400;color:var(--k-ink);margin:0 0 var(--k-s-4);letter-spacing:-.01em}
html[lang="ar"] body .kh-flow-h{font-family:'Readex','Inter',sans-serif;line-height:1.4}
:root body .kh-steps{list-style:none;margin:0;padding:0;display:grid;gap:0;counter-reset:none}
:root body .kh-steps li{position:relative;display:grid;grid-template-columns:28px minmax(0,1fr);column-gap:var(--k-s-3);padding:0 0 var(--k-s-4);margin:0;background:none}
:root body .kh-steps li::before{content:none !important}
/* the rail: a hairline from this node to the next */
:root body .kh-steps li:not(:last-child)::after{content:'';position:absolute;inset-inline-start:13.5px;top:28px;bottom:0;width:1px;background:var(--k-line)}
:root body .kh-steps li:last-child{padding-bottom:0}
:root body .kh-n{grid-row:1 / span 2;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--k-r-pill);
  border:1px solid var(--k-ink);background:#fff;color:var(--k-ink);font:600 var(--k-t-small)/1 'Inter',system-ui,sans-serif;font-variant-numeric:tabular-nums;position:relative;z-index:1}
:root body .kh-t{display:flex;align-items:center;flex-wrap:wrap;gap:var(--k-s-2);min-height:28px;font-family:'Inter',system-ui,sans-serif;font-size:var(--k-t-body-s);font-weight:600;line-height:1.3;color:var(--k-ink)}
html[lang="ar"] body :is(.kh-t,.kh-d,.kh-n){font-family:'Readex','Inter',sans-serif}
:root body .kh-code{display:inline-block;font:600 var(--k-t-micro)/1 'Inter',system-ui,sans-serif;letter-spacing:.02em;color:var(--k-ink2);background:var(--k-sand);border-radius:var(--k-r-sm);padding:4px 7px}
:root body .kh-d{display:block;font-family:'Inter',system-ui,sans-serif;font-size:var(--k-t-ui);line-height:1.45;color:var(--k-ink2);margin-top:2px}
/* the outcome: the last step is the one the business is buying */
:root body .kh-out .kh-n{background:var(--k-copper);border-color:var(--k-copper);color:#fff}
:root body .kh-out .kh-code{background:var(--k-ink);color:#fff}
/* lite flows: labels only, tighter rhythm */
:root body .kh-flow--lite .kh-steps li{padding-bottom:var(--k-s-3)}
:root body .kh-flow--lite .kh-steps li:last-child{padding-bottom:0}

/* ---------- 1. Industry heroes: text on the start side, the sector's flow on the end side ---------- */
:root body .kh-ihero{display:block}
@media (min-width:1024px){
  :root body .kh-ihero.has-flow{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,400px);column-gap:var(--k-s-8);align-items:start;margin:18px 0 var(--k-s-7)}
  :root body .kh-ihero.has-flow .phead{margin:0;max-width:none}
}
:root body .kh-ihero.has-flow .kt-ind-ic{display:none !important}
@media (max-width:1023px){
  :root body .kh-ihero.has-flow .kh-flow{margin:var(--k-s-5) 0 var(--k-s-6)}
}
@media (max-width:600px){
  :root body .kh-flow{padding:var(--k-s-4) var(--k-s-4) var(--k-s-3)}
}

/* ---------- 2. Platform and capability pages: one action in the hero, the guide in its own band ---------- */
:root body .kh-plat .ctas{margin-bottom:0}
:root body .kh-plat .bestfor{margin-top:var(--k-s-5)}
:root body section.kh-guide{padding:var(--k-s-6) 0;border-bottom:1px solid var(--k-line)}
:root body .kh-guide-in{background:var(--k-sand);border-radius:var(--k-r-lg);padding:var(--k-s-6)}
:root body .kh-guide form.leadbox{max-width:none;margin:0;background:transparent;border:0;padding:0;
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);column-gap:var(--k-s-6);align-items:start}
:root body .kh-guide form.leadbox > input,:root body .kh-guide form.leadbox > .kf-hp{position:absolute}
:root body .kh-guide form.leadbox .lh{grid-column:1;grid-row:1;font-family:'Inter Tight','Inter',system-ui,sans-serif;font-size:var(--k-t-h3);line-height:1.2;font-weight:400;color:var(--k-ink);margin:0}
html[lang="ar"] body .kh-guide form.leadbox .lh{font-family:'Readex','Inter',sans-serif;line-height:1.4}
:root body .kh-guide form.leadbox small{grid-column:1;grid-row:2;align-self:start;font-size:var(--k-t-ui);color:var(--k-ink2);margin:var(--k-s-2) 0 0}
:root body .kh-guide form.leadbox .lead2-stack{grid-column:2;grid-row:1 / span 3}
:root body .kh-guide form.leadbox .lead2-stack .btn{width:auto}
:root body .kh-guide .form-success{max-width:none;margin:0}
@media (max-width:760px){
  :root body .kh-guide-in{padding:var(--k-s-5) var(--k-s-4)}
  :root body .kh-guide form.leadbox{grid-template-columns:minmax(0,1fr)}
  :root body .kh-guide form.leadbox :is(.lh,small,.lead2-stack){grid-column:1;grid-row:auto}
  :root body .kh-guide form.leadbox .lh{margin-bottom:var(--k-s-4)}
  :root body .kh-guide form.leadbox small{margin:var(--k-s-3) 0 0}
  :root body .kh-guide form.leadbox .lead2-stack .btn{width:100%}
}

/* ---------- shared two-column hero frame (start: text, end: the evidence) ---------- */
@media (min-width:1024px){
  :root body :is(.kh-svc,.kh-cmp,.kh-ph,.kh-ct,.kh-pt){display:grid !important;grid-template-columns:minmax(0,1fr) minmax(0,420px);column-gap:var(--k-s-8);align-items:start}
  :root body :is(.kh-svc-l,.kh-cmp-l,.kh-ph-l,.kh-ct-l,.kh-pt-l){min-width:0}
}
@media (max-width:1023px){
  :root body :is(.kh-gates,.kh-res,.kh-cmpfig,.kh-office,.kh-plats){margin-top:var(--k-s-6)}
}

/* ---------- 3. /services: the four gates you sign ---------- */
:root body .kh-svc .kh-svc-l > h1{max-width:15em}
:root body .kh-gates{align-self:start}
@media (min-width:1024px){:root body .kh-svc{margin-bottom:var(--k-s-2)}:root body .kh-gates{margin-top:6px}}

/* ---------- 4. /about: the two founders in the hero, the mission as its own band ---------- */
:root body .kh-founders{margin:0;display:grid;grid-template-columns:1fr 1fr;gap:var(--k-s-4);align-self:center}
:root body a.kh-fd{display:flex;flex-direction:column;gap:2px;text-decoration:none !important;color:var(--k-ink) !important;border:0 !important}
:root body a.kh-fd img{width:100%;max-width:240px;height:auto;aspect-ratio:1/1;object-fit:contain;border-radius:var(--k-r-pill);margin-bottom:var(--k-s-3)}
:root body .kh-fd-n{font-family:'Inter Tight','Inter',system-ui,sans-serif;font-size:var(--k-t-h4);line-height:1.25;font-weight:400 !important;color:var(--k-ink)}
:root body .kh-fd-r{font-size:var(--k-t-ui);line-height:1.4;color:var(--k-ink2);font-weight:400 !important}
html[lang="ar"] body :is(.kh-fd-n,.kh-fd-r){font-family:'Readex','Inter',sans-serif}
:root body a.kh-fd:is(:hover,:focus-visible) .kh-fd-n{text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:2px;text-decoration-color:var(--k-copper)}
:root body a.kh-fd:focus-visible{outline:2px solid var(--k-copper-text);outline-offset:4px;border-radius:var(--k-r-lg)}
@media (min-width:761px){:root body .kh-about .ka-in{align-items:center !important}}
@media (max-width:760px){
  :root body .kh-founders{gap:var(--k-s-3)}
}
/* mission band: the same ink card, one row: statement on the start side, the gates under it */
:root body .kh-misband{padding-block:0 var(--k-s-7)}
:root body .kh-misband .ka-in{display:block !important;padding-block:0 !important}
:root body .kh-misband .ka-mis{flex-direction:column;gap:var(--k-s-5)}
:root body .kh-misband .ka-mis p{max-width:46ch}

/* ---------- 5. /cases/: results computed from the case files (one wide panel under the heading) ---------- */
:root body .kh-cases .ki-sf{max-width:62ch}
:root body .kh-res{margin:var(--k-s-6) 0 var(--k-s-2);background:#fff;border:1px solid var(--k-line);border-radius:var(--k-r-lg);padding:var(--k-s-5);display:grid;gap:var(--k-s-5) var(--k-s-6)}
@media (min-width:1024px){:root body .kh-res{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr) minmax(0,1fr)}:root body .kh-res-h{grid-column:1 / -1}}
@media (min-width:700px) and (max-width:1023px){:root body .kh-res{grid-template-columns:1fr 1fr}:root body .kh-res-h,:root body .kh-res-g:last-child{grid-column:1 / -1}}
:root body .kh-res-h{display:flex;align-items:baseline;gap:var(--k-s-2);font-family:'Inter Tight','Inter',system-ui,sans-serif;font-size:var(--k-t-h4);line-height:1.3;color:var(--k-ink);font-weight:400;padding-bottom:var(--k-s-4);border-bottom:1px solid var(--k-line)}
:root body .kh-res-h b{font-weight:400 !important;font-size:var(--k-t-h2) !important;line-height:1 !important;color:var(--k-copper) !important;font-variant-numeric:tabular-nums}
html[lang="ar"] body .kh-res-h{font-family:'Readex','Inter',sans-serif}
:root body .kh-res-k{font-size:var(--k-t-small) !important;font-weight:600 !important;color:var(--k-soft) !important;margin:0 0 var(--k-s-3) !important}
:root body .kh-bars,:root body .kh-inds,:root body .kh-kpis{list-style:none;margin:0;padding:0}
:root body .kh-bars li{display:grid;grid-template-columns:minmax(0,128px) minmax(0,1fr) 28px;align-items:center;gap:var(--k-s-3);padding:3px 0;margin:0}
:root body :is(.kh-bars,.kh-inds,.kh-kpis) li::before{content:none !important}
:root body .kh-bl{font-size:var(--k-t-ui);color:var(--k-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:root body .kh-bv{display:block;height:8px;background:var(--k-sand);border-radius:var(--k-r-pill);overflow:hidden}
:root body .kh-bv i{display:block;height:100%;min-width:6px;background:var(--k-ink);border-radius:var(--k-r-pill)}
:root body .kh-bars li:first-child .kh-bv i{background:var(--k-copper)}
:root body .kh-bars b{font-size:var(--k-t-ui);font-weight:600;color:var(--k-ink);text-align:end;font-variant-numeric:tabular-nums}
:root body .kh-inds{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
:root body .kh-inds li{margin:0}
:root body .kh-inds a{display:flex;justify-content:space-between;gap:var(--k-s-3);padding:3px 0;font-size:var(--k-t-ui);line-height:1.5;color:var(--k-ink) !important;text-decoration:none !important;font-weight:400 !important}
:root body .kh-inds a b{font-weight:600;font-variant-numeric:tabular-nums;color:var(--k-ink)}
:root body .kh-inds a:is(:hover,:focus-visible){color:var(--k-copper-text) !important;text-decoration:underline !important;text-underline-offset:3px}
:root body .kh-kpis{display:grid;gap:0}
:root body .kh-kpis li{margin:0;border-top:1px solid var(--k-line)}
:root body .kh-kpis li:first-child{border-top:0}
:root body .kh-kpis a{display:grid;grid-template-columns:76px minmax(0,1fr);column-gap:var(--k-s-3);padding:8px 0;text-decoration:none !important;color:var(--k-ink) !important;font-weight:400 !important}
:root body .kh-kpis li:first-child a{padding-top:0}
:root body .kh-kpis a b{grid-row:1 / span 2;font-family:'Inter Tight','Inter',system-ui,sans-serif;font-size:var(--k-t-h3);font-weight:400;line-height:1.1;color:var(--k-copper-text);font-variant-numeric:tabular-nums;align-self:center}
:root body .kh-kpis a span{font-size:var(--k-t-ui);font-weight:600;line-height:1.35}
:root body .kh-kpis a i{font-style:normal;font-size:var(--k-t-small);color:var(--k-soft);line-height:1.35}
:root body .kh-kpis a:is(:hover,:focus-visible) span{text-decoration:underline;text-underline-offset:3px}

/* ---------- 6. /compare/: the published comparisons as a network ---------- */
:root body .kh-cmpfig{margin:0;background:#fff;border:1px solid var(--k-line);border-radius:var(--k-r-lg);padding:var(--k-s-4) var(--k-s-4) var(--k-s-4)}
:root body .kh-net{display:block;width:100%;height:auto}
:root body .kh-net-e line{stroke:var(--k-copper);stroke-width:1.5;stroke-linecap:round}
:root body .kh-net-n rect{fill:#fff;stroke:var(--k-ink);stroke-width:1}
:root body .kh-net-n .hub rect{fill:var(--k-ink)}
:root body .kh-net-n text{font:500 13px/1 'Inter',system-ui,sans-serif;fill:var(--k-ink)}
:root body .kh-net-n .hub text{fill:#fff;font-weight:600}
:root body .kh-cmpfig figcaption{font-size:var(--k-t-ui);line-height:1.5;color:var(--k-ink2);margin-top:var(--k-s-3);padding-inline:var(--k-s-1)}
:root body .kh-cmpfig figcaption b{color:var(--k-ink);font-weight:600}

/* ---------- 7. Posts: who wrote it and what the reader gets ---------- */
:root body main.article .container > .article-head.kh-ph{max-width:none !important;margin-inline:0 !important}
:root body .kh-ph-l{max-width:var(--v2-read,720px)}
:root body .kh-pcard{display:none}
@media (min-width:1024px){
  :root body .kh-pcard{display:block;align-self:end;background:#fff;border:1px solid var(--k-line);border-radius:var(--k-r-lg);padding:var(--k-s-5)}
  :root body .kh-ph .byline{display:none !important}
}
:root body a.kh-pcard-au{display:grid;grid-template-columns:72px minmax(0,1fr);gap:var(--k-s-4);align-items:center;text-decoration:none !important;color:var(--k-ink) !important;padding-bottom:var(--k-s-4);border-bottom:1px solid var(--k-line) !important}
:root body a.kh-pcard-au img{width:72px;height:72px;border-radius:var(--k-r-pill);object-fit:cover;background:var(--k-sand)}
:root body .kh-pcard-au > span{display:flex;flex-direction:column;gap:2px}
:root body .kh-pcard-k{font-size:var(--k-t-small);color:var(--k-soft)}
:root body .kh-pcard-au b{font-family:'Inter Tight','Inter',system-ui,sans-serif;font-size:var(--k-t-h4);font-weight:400;line-height:1.2}
:root body .kh-pcard-r{font-size:var(--k-t-small);color:var(--k-ink2);line-height:1.35}
html[lang="ar"] body :is(.kh-pcard-au b,.kh-pcard-k,.kh-pcard-r,.kh-pcard-f){font-family:'Readex','Inter',sans-serif}
:root body a.kh-pcard-au:is(:hover,:focus-visible) b{text-decoration:underline;text-underline-offset:4px;text-decoration-color:var(--k-copper)}
:root body .kh-pcard-f{margin:var(--k-s-4) 0 0;display:grid;gap:var(--k-s-2)}
:root body .kh-pcard-f div{display:flex;justify-content:space-between;gap:var(--k-s-4);font-size:var(--k-t-ui);line-height:1.4}
:root body .kh-pcard-f dt{color:var(--k-soft);font-weight:400}
:root body .kh-pcard-f dd{margin:0;color:var(--k-ink);font-weight:600;font-variant-numeric:tabular-nums;text-align:end}

/* ---------- 8. /contact: the office, its hours and whether it is open now ---------- */
:root body .kh-ct{max-width:none !important}
:root body .kh-ct-l{max-width:720px}
:root body .kh-office{position:relative;background:var(--k-sand);border-radius:var(--k-r-lg);padding:var(--k-s-5) var(--k-s-5) var(--k-s-5);display:grid;gap:var(--k-s-2);align-self:start}
:root body .kh-office p{margin:0 !important;max-width:none}
:root body .kh-pin{width:28px;height:28px;fill:none;stroke:var(--k-copper);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;margin-bottom:var(--k-s-1)}
:root body .kh-office-h{font-family:'Inter Tight','Inter',system-ui,sans-serif !important;font-size:var(--k-t-h4) !important;line-height:1.25;color:var(--k-ink) !important}
html[lang="ar"] body .kh-office-h{font-family:'Readex','Inter',sans-serif !important}
:root body .kh-office-a{font-size:var(--k-t-body-s) !important;line-height:1.55;color:var(--k-ink) !important}
:root body .kh-office-t,:root body .kh-office-r{font-size:var(--k-t-ui) !important;line-height:1.5;color:var(--k-ink2) !important}
:root body .kh-open{display:inline-flex;align-items:baseline;gap:8px;font-size:var(--k-t-ui) !important;font-weight:600;color:var(--k-ink) !important}
:root body .kh-open::before{content:'';width:8px;height:8px;transform:translateY(-1px);border-radius:var(--k-r-pill);background:var(--k-soft);flex:none}
:root body .kh-open.is-on::before{background:var(--k-copper)}
:root body .kh-open[hidden]{display:none !important}
:root body .kh-office-l{padding-top:var(--k-s-1)}
:root body .kh-office-l a,:root body .kh-office-c a{font-size:var(--k-t-body-s);font-weight:600;color:var(--k-copper-text) !important;text-decoration:none !important}
:root body .kh-office-l a:is(:hover,:focus-visible),:root body .kh-office-c a:is(:hover,:focus-visible){text-decoration:underline !important;text-underline-offset:4px;text-decoration-thickness:2px}
:root body .kh-office-c{font-size:var(--k-t-ui) !important;color:var(--k-ink2) !important;padding-top:var(--k-s-2);border-top:1px solid rgba(10,11,13,.1)}
:root body .kh-office-c a{unicode-bidi:isolate}

/* ---------- 9. /partners: the platforms, with the published case studies behind each ---------- */
:root body .kh-pt{max-width:none !important}
:root body .kh-pt-l{max-width:720px}
:root body .kh-plats{margin:0}
:root body .kh-plats ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:var(--k-s-3)}
:root body .kh-plats li{margin:0}
:root body .kh-plats li::before{content:none !important}
:root body .kh-plats li:first-child{grid-column:1 / -1}
:root body .kh-plats li a{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:var(--k-s-3);min-height:104px;height:100%;padding:var(--k-s-4) var(--k-s-4);background:#fff;border:1px solid var(--k-line) !important;border-radius:var(--k-r-lg);text-decoration:none !important;color:var(--k-ink) !important}
:root body .kh-plats li:first-child a{flex-direction:row;align-items:center;background:var(--k-sand);border-color:transparent !important}
:root body .kh-plats img{height:32px;width:auto;max-width:150px;object-fit:contain;filter:none !important;opacity:1 !important}
:root body .kh-plats li:first-child img{height:40px;max-width:170px}
:root body .kh-plats li a span{font-size:var(--k-t-ui);font-weight:600;color:var(--k-ink);font-variant-numeric:tabular-nums}
:root body .kh-plats li:first-child a span{font-size:var(--k-t-body)}
:root body .kh-plats li a:is(:hover,:focus-visible){border-color:var(--k-ink) !important}
:root body .kh-plats li a:is(:hover,:focus-visible) span{text-decoration:underline;text-underline-offset:3px}
:root body .kh-plats figcaption{font-size:var(--k-t-small);color:var(--k-ink2);margin-top:var(--k-s-3);line-height:1.5}
@media (prefers-reduced-motion:reduce){:root body :is(.kh-inds a,.kh-plats a){transition:none}}

/* compare head: the two-column frame needs the full container */
:root body .kc-head.kh-cmp{max-width:none !important}
:root body .kh-cmp-l{max-width:640px}
:root body .kh-plats li a span{display:block;font-weight:400 !important;color:var(--k-ink2) !important;line-height:1.4}
:root body .kh-plats li a span b{display:block;font-weight:600;color:var(--k-ink)}
