/* =========================================================================
   TRADE PROGRAM SUB PAGE SECTIONS (ts-*)
   Built on the Tek tokens (frontend.css), the .ho variables (homeowners.css)
   and the 2px radius. Spacing follows the other sections: var(--sec) = 70px
   desktop / 50px phones, via .dc-sec.
   ========================================================================= */

/* ---------- Hero: photo with a soft stone wash on the left ---------- */
.ts-hero{position:relative;isolation:isolate;display:flex;align-items:center;min-height:clamp(560px,44vw,720px);background:var(--stone);overflow:hidden}
.ts-hero-img{position:absolute;inset:0 0 0 28%;z-index:-2;margin:0}
.ts-hero-img img{width:100%;height:100%;object-fit:cover;object-position:60% 50%}
.ts-hero::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,var(--stone) 0%,var(--stone) 30%,rgba(242,242,239,.92) 42%,rgba(242,242,239,.55) 56%,rgba(242,242,239,0) 72%)}
.ts-hero.no-img::before{display:none}
.ts-hero-inner{width:100%;padding-block:clamp(48px,6vw,88px) var(--sec)}
.ts-hero-copy{max-width:min(700px,54%)}
.ts-hero.no-img .ts-hero-copy{max-width:760px}
.ts-hero .dc-crumb{margin-bottom:28px}
.ts-hero .label+.ts-h1{margin-top:var(--gap-label)}
/* H1 and description: same as the Trade Program page hero (.tp-title / .tp-lede), dark text on the light wash */
.ts-h1{font-family:var(--font-head);font-weight:600;font-size:var(--fs-h1);line-height:1.04;letter-spacing:-0.03em;text-wrap:balance;color:var(--ink);margin:0}
.ts-hero-lede{margin-top:var(--s3);max-width:620px;font-family:var(--font-body);font-weight:400;font-size:clamp(17px,16px + .3vw,20px);line-height:1.6;color:var(--ink-soft);text-wrap:pretty}
.ts-hero .ho-actions{margin-top:36px}
.ts-feats{display:flex;flex-wrap:nowrap;margin-top:40px;padding-top:28px;border-top:1px solid var(--line)}
.ts-feat{display:flex;align-items:center;gap:12px;padding:2px 22px;border-left:1px solid var(--line)}
.ts-feat:first-child{padding-left:0;border-left:0}
.ts-feat-ic{flex:none;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:var(--radius);background:var(--paper);color:var(--brand)}
.ts-feat-ic svg{width:22px;height:22px}
.ts-feat-t{font-family:var(--font-head);font-weight:700;font-size:var(--fs-small);line-height:1.35;color:var(--ink);white-space:nowrap}

/* ---------- Workflow: copy | flow card (cards → numbered steps → result) ---------- */
.ts-flow-grid{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);column-gap:var(--ho-split);align-items:center}
.ts-flow-grid.no-card{grid-template-columns:minmax(0,1fr)}
.ts-flow-copy .ho-body+.ho-body{margin-top:16px}
.ts-flow-card{padding:clamp(24px,2.6vw,36px);background:var(--ho-tile);border-radius:var(--radius)}
.ts-chips,.ts-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:16px}
.ts-chip,.ts-step{display:flex;flex-direction:column;gap:14px;padding:20px;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);transition:border-color 260ms var(--ease),box-shadow 260ms var(--ease)}
.ts-chip:hover,.ts-step:hover{border-color:var(--brand);box-shadow:0 22px 40px -30px rgba(29,58,44,.5)}
.ts-chip-ic{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:var(--radius);background:var(--stone);color:var(--brand)}
.ts-chip-ic svg{width:22px;height:22px}
.ts-chip .ho-mini-t,.ts-step .ho-small{color:var(--ink)}
.ts-step-n{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;background:var(--paper);border:2px solid var(--brand);font-family:var(--font-head);font-weight:800;font-size:15px;color:var(--brand);transition:background-color 260ms var(--ease),color 260ms var(--ease)}
.ts-step:hover .ts-step-n{background:var(--brand);color:#fff}
.ts-flow-arrow{display:flex;justify-content:center;padding:16px 0;color:var(--brand)}
.ts-flow-arrow svg{width:20px;height:20px;transform:rotate(90deg)}
.ts-result{display:flex;gap:18px;align-items:flex-start;padding:22px 24px;background:var(--brand-deep);border-radius:var(--radius)}
.ts-result p{font-size:var(--fs-body);line-height:var(--lh-body);color:rgba(255,255,255,.88)}
.ts-result-ic{flex:none;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:var(--radius);background:rgba(255,255,255,.1);color:var(--ho-gold)}
.ts-result-ic svg{width:20px;height:20px}

/* ---------- Detailed topics: one wide card per topic ---------- */
.ts-notes-list{list-style:none;margin:0;padding:0;display:grid;gap:var(--ho-gap);counter-reset:none}
.ts-note{position:relative;display:grid;grid-template-columns:minmax(0,4fr) minmax(0,8fr);column-gap:var(--ho-split);padding:clamp(28px,3.4vw,52px);background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;transition:border-color 260ms var(--ease),box-shadow 260ms var(--ease)}
.ts-note::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--brand);transform:scaleY(0);transform-origin:top;transition:transform 360ms var(--ease)}
.ts-note:hover{border-color:rgba(46,90,68,.45);box-shadow:0 26px 48px -34px rgba(29,58,44,.55)}
.ts-note:hover::before{transform:scaleY(1)}
.ts-note-head{display:flex;flex-direction:column;gap:24px;align-self:start;position:sticky;top:calc(var(--header-h-min,72px) + 32px)}
.ts-note-top{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:20px;border-bottom:1px solid var(--line)}
.ts-note-n{font-family:var(--font-head);font-weight:800;font-size:44px;line-height:1;letter-spacing:-.03em;color:var(--brand)}
.ts-note-ic{display:inline-flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:var(--radius);background:var(--stone);color:var(--brand);transition:background-color 260ms var(--ease),color 260ms var(--ease)}
.ts-note-ic svg{width:24px;height:24px}
.ts-note:hover .ts-note-ic{background:var(--brand);color:#fff}
.ts-note-t{max-width:20ch;text-wrap:balance}
.ts-note-body{display:flex;flex-direction:column;justify-content:flex-start}
.ts-note-lead{font-family:var(--font-body);font-weight:400;font-size:clamp(17px,16px + .3vw,20px);line-height:1.6;color:var(--ink);text-wrap:pretty;max-width:62ch}
.ts-note-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px clamp(24px,3vw,40px);margin-top:28px;padding-top:28px;border-top:1px solid var(--line)}
.ts-note-cols.is-one{grid-template-columns:minmax(0,1fr)}
.ts-note-cols>.ho-body{position:relative;margin:0;padding-left:20px;max-width:none}
.ts-note-cols>.ho-body::before{content:"";position:absolute;left:0;top:.35em;bottom:.35em;width:2px;background:var(--brand);opacity:.5}
.ts-note-cols.is-editor{grid-template-columns:minmax(0,1fr)}
.tek-trade-sub .ts-note .ts-note-t,.ts-note .ts-note-t{font-size:clamp(22px,19px + .7vw,28px);line-height:1.2;letter-spacing:-.01em}
.tek-trade-sub .ts-note-cols .ho-body{font-size:var(--fs-body)}

/* ---------- Scroll box & photo (free content) ---------- */
.ts-scroll-head{margin-bottom:var(--head-gap)}
.ts-scroll-grid{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:clamp(20px,2vw,32px);align-items:stretch}
.ts-scroll.is-img-left .ts-scroll-grid{grid-template-columns:minmax(0,5fr) minmax(0,7fr)}
.ts-scroll.is-img-left .ts-scroll-img{order:-1}
.ts-scroll-grid.no-img{grid-template-columns:minmax(0,1fr)}
.ts-scroll-box{position:relative;display:flex;flex-direction:column;height:var(--ts-h,520px);background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.ts-bar{position:absolute;left:0;top:0;height:3px;width:0;background:var(--brand);z-index:2;transition:width 120ms linear}
.ts-scroll-body{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:clamp(26px,3vw,44px) clamp(22px,2.6vw,40px) 72px;scrollbar-width:thin;scrollbar-color:var(--brand) var(--stone)}
.ts-scroll-body:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}
.ts-scroll-body::-webkit-scrollbar{width:6px}
.ts-scroll-body::-webkit-scrollbar-track{background:var(--stone);border-radius:3px;margin-block:16px}
.ts-scroll-body::-webkit-scrollbar-thumb{background:var(--brand);border-radius:3px}
.ts-scroll-box::after{content:"";position:absolute;left:0;right:8px;bottom:0;height:88px;background:linear-gradient(rgba(255,255,255,0),#fff 70%);pointer-events:none;transition:opacity 260ms var(--ease)}
.ts-hint{position:absolute;left:50%;bottom:16px;z-index:2;transform:translateX(-50%);display:inline-flex;align-items:center;gap:8px;padding:6px 12px;background:var(--paper);border:1px solid var(--line);border-radius:999px;font-size:12px;font-weight:600;color:var(--brand);white-space:nowrap;pointer-events:none;transition:opacity 260ms var(--ease)}
.ts-hint svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;transform:rotate(90deg)}
.ts-scroll-box.at-end::after,.ts-scroll-box.at-end .ts-hint,.ts-scroll-box.no-scroll::after,.ts-scroll-box.no-scroll .ts-hint{opacity:0}
/* The free content: headings, paragraphs, lists, links, images */
.ts-content>*{margin-bottom:0}
.ts-content>:first-child{margin-top:0}
.ts-content>*+*,.ts-content .block-editor-block-list__layout>*+*{margin-top:16px}
.ts-content :is(h2,h3,h4){font-family:var(--font-head);font-weight:700;color:var(--ink);letter-spacing:var(--track-head);line-height:var(--lh-heading);text-wrap:balance;max-width:28ch}
.ts-content h2{font-size:var(--fs-h3)}
.ts-content h3{font-size:var(--fs-card)}
.ts-content h4{font-size:var(--fs-body)}
.ts-content>:is(h2,h3,h4)+*,.ts-content .block-editor-block-list__layout>:is(h2,h3,h4)+*{margin-top:var(--gap-head)}
.ts-content>*+:is(h2,h3,h4),.ts-content .block-editor-block-list__layout>*+:is(h2,h3,h4){margin-top:40px;padding-top:40px;border-top:1px solid var(--line)}
.ts-content p,.ts-content li{font-size:var(--fs-body);line-height:var(--lh-body);color:var(--ink-soft);text-wrap:pretty}
.ts-content strong{color:var(--ink)}
.ts-content a{color:var(--brand);font-weight:600;text-underline-offset:3px}
.ts-content ul,.ts-content ol{padding-left:0;list-style:none;display:grid;gap:8px}
.ts-content ul li{position:relative;padding-left:22px}
.ts-content ul li::before{content:"";position:absolute;left:2px;top:.62em;width:8px;height:8px;border-radius:1px;background:var(--brand)}
.ts-content ol{counter-reset:tsol}
.ts-content ol li{position:relative;padding-left:32px;counter-increment:tsol}
.ts-content ol li::before{content:counter(tsol,decimal-leading-zero);position:absolute;left:0;top:0;font-family:var(--font-head);font-weight:800;font-size:13px;line-height:1.9;color:var(--brand)}
.ts-content img{max-width:100%;height:auto;border-radius:var(--radius)}
.ts-scroll-img{position:relative;margin:0;min-height:320px;border-radius:var(--radius)}
.ts-scroll-img>img{position:absolute;inset:0}
.ts-scroll-img::after{content:"";position:absolute;left:0;bottom:0;width:38%;height:6px;background:var(--brand)}
.ts-scroll.is-img-left .ts-scroll-img::after{left:auto;right:0}

/* ---------- Type on the Trade sub page = the site type (.h2 / .h3 / .title / .body), also for the reused sections ---------- */
.tek-trade-sub :is(.ho-h2,.dc-h2){font-family:var(--font-head);font-weight:600;font-size:var(--fs-h2);line-height:var(--lh-heading);letter-spacing:var(--track-head)}
.tek-trade-sub :is(.ho-card-t,.ho-mini-t,.hs-fam-name){font-family:var(--font-head);font-weight:600;font-size:var(--fs-card);line-height:1.3;letter-spacing:0}
.tek-trade-sub :is(.ho-body,.hs-lead,.dc-body,.ts-content p,.ts-content li,.hs-tip p){font-size:var(--fs-body);line-height:var(--lh-body);color:var(--ink-soft)}
.tek-trade-sub .ho-dark :is(.ho-body,.ho-small),.tek-trade-sub .tek-bg-deep :is(.ho-body,.ho-small),.tek-trade-sub .hs-fam-panel .ho-body{color:var(--ho-text)}
.tek-trade-sub .ts-content h2{font-size:var(--fs-h2);font-weight:600;line-height:var(--lh-heading);letter-spacing:var(--track-head);max-width:24ch}
.tek-trade-sub .ts-content h3{font-size:var(--fs-h3);font-weight:600;line-height:1.2;letter-spacing:-0.01em}
.tek-trade-sub .ts-content h4{font-size:var(--fs-card);font-weight:600}
.tek-trade-sub .ts-chip .ho-mini-t{font-size:16px}

/* ---------- Responsive ---------- */
@media (max-width:1024px){
  .ts-note{grid-template-columns:minmax(0,1fr);row-gap:28px}
  .ts-note-head{position:static}
  .ts-note-t{max-width:none}
  .ts-flow-grid{grid-template-columns:minmax(0,1fr);row-gap:40px}
  .ts-scroll-grid,.ts-scroll.is-img-left .ts-scroll-grid{grid-template-columns:minmax(0,1fr)}
  .ts-scroll-img,.ts-scroll.is-img-left .ts-scroll-img{order:-1;min-height:0;aspect-ratio:16/9}
}
@media (max-width:900px){
  .ts-hero{display:block;min-height:0}
  .ts-hero::before{display:none}
  .ts-hero-copy{max-width:none}
  .ts-feats{flex-wrap:wrap}
  .ts-feat{padding:2px 20px}
  .ts-hero-img{position:relative;inset:auto;z-index:0;aspect-ratio:4/3}
  .ts-hero-img::after{content:"";position:absolute;left:0;right:0;bottom:0;height:40%;background:linear-gradient(rgba(242,242,239,0),var(--stone))}
  .ts-hero-inner{padding-block:8px 56px}
  .ts-hero.no-img .ts-hero-inner{padding-top:48px}
}
@media (max-width:767px){
  .ts-note-cols{grid-template-columns:minmax(0,1fr)}
  .ts-note-n{font-size:36px}
  .ts-note-ic{width:44px;height:44px}
  .ts-chips,.ts-steps{grid-template-columns:minmax(0,1fr)}
  .ts-chip,.ts-step{flex-direction:row;align-items:center}
  .ts-chip-ic,.ts-step-n{flex:none}
  .ts-feats{flex-direction:column;gap:14px}
  .ts-feat{padding:0;border-left:0}
  .ts-feat-t{white-space:normal}
  .ts-hero .ho-actions .btn{flex:1 1 100%}
  .ts-scroll-box{height:var(--ts-h-m,440px)}
}

/* ---------- Block editor ---------- */
.tek-inline-block .ts-hero>.tek-img-swap.components-button{right:24px;top:24px}
.tek-inline-block .ts-scroll-img .tek-img-swap.components-button{right:12px;top:12px}
.tek-inline-block .ts-scroll-box--editor::after{display:none}
.tek-inline-block .ts-scroll-box--editor .ts-scroll-body{padding-bottom:40px}
.tek-inline-block .ts-scroll-head.tek-ghost{opacity:.55}
.tek-inline-block .ts-note-head{position:static}
