/* Home logo section "by sector" (direction B; Sam picked it on 18 Nov 2026, Q40). Linked from the two home pages only
   (src/page.html.j2, src/page-professional.html.j2); markup src/logo_sectors.html.j2; data src/logos.yaml (sectors).
   Static: nothing moves. The section keeps the tag <section class="trust wrap"> because ops/short_enquiry.py and
   ops/learner_types_apply.py anchor on it; [data-ls] scopes every rule here and resets redesign.css's .trust flex row. */

section.trust[data-ls]{--ls-ink:#182025;--ls-muted:#566168;--ls-line:#d9dddc;display:block;overflow:visible;padding:56px 0 60px;border-top:1px solid var(--ls-line);border-bottom:0}
[data-ls] .ls-head{margin-bottom:30px}
[data-ls] h2{font-size:28px;line-height:1.25;font-weight:500;letter-spacing:-.015em;margin:0;color:var(--ls-ink);max-width:34em;text-wrap:balance}
[data-ls] .ls-sub{margin:10px 0 0;font-size:15px;line-height:1.55;color:var(--ls-muted);max-width:none}
[data-ls] .ls-stats{margin:6px 0 0;font-size:14px;line-height:1.55;color:var(--ls-muted);max-width:none}
[data-ls] .ls-stats strong{color:var(--ls-ink);font-weight:600}

/* 23 Nov 2026 (home tidy, Sam: "the logo wall, just not professional right now"): one-ink marks (/assets/logos/mono/, one colour
   #182025, sizes = width/height attributes), set at 78% ink so the wall stays lighter than the headings. Two layouts, one switch in
   src/logos.yaml (section.layout): "rows" = .ls-groups, "grid" = .ls-grid. */
[data-ls] .ls-logo{display:block;max-width:100%;height:auto;object-fit:contain;opacity:.78}
[data-ls] a.ls-case{display:block;max-width:100%}
[data-ls] a.ls-case:focus-visible{outline:3px solid var(--accent,#a93620);outline-offset:4px}
[data-ls] a.ls-case:hover .ls-logo{opacity:1}

/* Layout "rows": a label above each group; Banks (2) + Travel (2) + International (3) share the first row in a 2:2:3 split, so every
   mark gets the same cell width as the Hong Kong (5) and Education (5) rows below gets theirs; no row is half empty. Hairline above each group. */
[data-ls] .ls-groups{margin:0;display:grid;grid-template-columns:2fr 2fr 3fr;column-gap:48px;border-bottom:1px solid var(--ls-line)}
[data-ls] .ls-groups .ls-row{display:block;border-top:1px solid var(--ls-line);padding:18px 0 30px;min-height:0}
[data-ls] .ls-groups .ls-hk,[data-ls] .ls-groups .ls-edu{grid-column:1/-1}
[data-ls] .ls-groups dt{font-size:13px;line-height:1.7;letter-spacing:.06em;text-transform:uppercase;color:var(--ls-muted);font-weight:500;margin:0 0 20px}
[data-ls]:lang(zh) .ls-groups dt,[data-ls] .ls-groups:lang(zh) dt{font-size:14px;letter-spacing:.04em}
[data-ls] .ls-groups dd{margin:0;display:grid;align-items:center;justify-items:start;gap:22px 32px;min-height:54px}
[data-ls] .ls-n2 dd{grid-template-columns:repeat(2,minmax(0,1fr))}
[data-ls] .ls-n3 dd{grid-template-columns:repeat(3,minmax(0,1fr))}
[data-ls] .ls-n5 dd{grid-template-columns:repeat(5,minmax(0,1fr))}

/* Layout "grid": one plain ruled grid, 6 columns (18 cells = 17 marks + the case-studies link), 3 at tablet width, 2 on phones:
   every line full at every width. Marks centred in their cell. */
[data-ls] .ls-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));border-bottom:1px solid var(--ls-line)}
[data-ls] .ls-grid li{display:flex;align-items:center;justify-content:center;min-height:112px;padding:20px 14px;border-top:1px solid var(--ls-line);box-sizing:border-box}
[data-ls] .ls-grid li.ls-grid-link{justify-content:center}
[data-ls] .ls-grid a.ls-case{display:flex;justify-content:center}

[data-ls] .ls-foot{display:flex;justify-content:flex-end;margin:14px 0 0;max-width:none}
[data-ls] a.ls-link{font-size:15px;color:var(--ls-ink);text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px;white-space:nowrap;display:inline-block;padding:10px 0}
[data-ls] a.ls-link:hover{text-decoration-thickness:2px}
[data-ls] a.ls-link:focus-visible{outline:3px solid var(--accent,#a93620);outline-offset:4px}

@media(max-width:1000px){
 [data-ls] .ls-groups{column-gap:32px}
 [data-ls] .ls-groups dd{gap:20px 20px}
 [data-ls] .ls-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* Phones: every group full width, label above; a 6-track grid so no line ends with a single logo. .ls-half (rows of 2, and the first
   two marks of a row of 5) = half the width, the rest = a third (logo_sectors.phone_spans). The plain grid goes to 2 columns. */
@media(max-width:760px){
 section.trust[data-ls]{padding:40px 0 44px}
 [data-ls] h2{font-size:23px}
 [data-ls] .ls-head{margin-bottom:22px}
 [data-ls] .ls-groups{grid-template-columns:minmax(0,1fr)}
 [data-ls] .ls-groups .ls-row{padding:16px 0 24px}
 [data-ls] .ls-groups dt{margin-bottom:14px}
 [data-ls] .ls-groups dd{grid-template-columns:repeat(6,minmax(0,1fr));gap:20px 12px;min-height:0}
 [data-ls] .ls-logo{grid-column:span 2}
 [data-ls] .ls-logo.ls-half{grid-column:span 3}
 [data-ls] a.ls-case{grid-column:span 2}
 [data-ls] a.ls-case.ls-half{grid-column:span 3}
 [data-ls] .ls-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 [data-ls] .ls-grid li{min-height:92px;padding:16px 10px}
 /* 23 Nov 2026 fix 1b: marks that filled their cell touched the next one (Chow Tai Fook / Garden, Lingnan / 港專). Each mark is capped at
    84% of its cell and the column gap is 16 px, so no two marks sit closer than ~16 px; same cap in the plain grid. */
 [data-ls] .ls-groups dd{column-gap:16px}
 [data-ls] .ls-logo{max-width:84%}
 [data-ls] .ls-grid .ls-logo{max-width:84%}
}

/* 中文 home: the 「扎根香港」 heading and the globe follow the logos as their own block (figure unchanged): heading left,
   globe right (636 px); stacked at 1000 px and below, where the heading column would shrink to a sliver. Only where the template adds .ls-globe. */
.sketch-trust.ls-globe{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,636px);gap:28px;align-items:start;padding:8px 0 56px}
.sketch-trust.ls-globe .sketch-trust-heading{display:block}
.sketch-trust.ls-globe .sketch-proof-grid{display:block}
/* 23 Nov 2026 (home tidy, fix 2): the heading sat at the top of its column beside the 544 px globe, leaving ~450 px of blank column.
   Layout only (the big numbers row stays gone): the heading at the size of the page's other section headings (精選案例 = 30 px) and
   centred against the globe, so the two columns balance. */
html[data-sk] body .sketch-trust.ls-globe{align-items:center}
html[data-sk] body .sketch-trust.ls-globe .sketch-trust-heading h2{font-size:30px;line-height:1.35;letter-spacing:-.01em;margin:0}
@media(max-width:1000px){.sketch-trust.ls-globe{grid-template-columns:minmax(0,1fr);gap:20px}html[data-sk] body .sketch-trust.ls-globe{align-items:start}}
@media(max-width:760px){html[data-sk] body .sketch-trust.ls-globe .sketch-trust-heading h2{font-size:23px}}
@media(max-width:760px){.sketch-trust.ls-globe{padding:0 0 40px}}

/* Closing proof strip on the home pages (this file loads on the home pages only): its six marks wrapped 5 + 1 (at 1280 and on
   phones), leaving one mark alone; a 3-column grid gives 3 + 3 at every width. Corporate and train-the-trainer pages keep the
   partial's own flex row. */
main .proof-strip .proof-logos{display:grid;grid-template-columns:repeat(3,max-content);align-items:center;justify-items:start;gap:16px 44px}
main .proof-strip .proof-logos img{max-width:100%}
@media(max-width:760px){main .proof-strip .proof-logos{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 16px}}

/* 23 Nov 2026 (home tidy, fix 3): the featured cases panel (src/home_simple_body.html.j2, #work). Text sat flush against the grey panel
   edge and "all cases" sat alone under the row: inner padding, and the existing link placed level with the panel heading on the right
   (grid placement; the markup order is unchanged). The three marks are one-ink files at one optical size, same ink as the logo wall. */
html[data-sk] body #work.work{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;column-gap:32px;padding:56px 56px 60px}
html[data-sk] body #work.work > h2{grid-column:1;grid-row:1;margin:0}
html[data-sk] body #work.work > .home-cases{grid-column:1/-1;grid-row:2}
html[data-sk] body #work.work > .home-cases-all{grid-column:2;grid-row:1;margin:0}
html[data-sk] body #work .home-case-mark{opacity:.78;max-width:100%;max-height:none;height:auto}
/* The inline rule (max 180 x 48, width auto) sized the 3x mono files by their pixels: set each mark's width = logos.yaml mono size x 1.1. */
html[data-sk] body #work .home-case-mark[src$="/ctf.webp"]{width:134px}
html[data-sk] body #work .home-case-mark[src$="/cshk.webp"]{width:226px}
html[data-sk] body #work .home-case-mark[src$="/clp.webp"]{width:113px}
/* 23 Nov 2026 fix 3b: the three cards have different text lengths, so their 閱讀案例 / Read the case links sat at three heights. The cards
   (flex columns, stretched to the row height) push the link to the bottom, so the three links share one baseline. Markup unchanged. */
html[data-sk] body #work .home-cases > li{align-self:stretch}
html[data-sk] body #work .home-cases > li > a.text-link{margin-top:auto}
@media(max-width:760px){html[data-sk] body #work.work{padding:36px 22px 40px;column-gap:16px}}

/* 23 Nov 2026 (home tidy, fix 4): the home contact close. The email line sat 60 px under the WhatsApp button (plus the button's own
   22 px), with 84 px below it: the email line now sits right under the button and the bottom padding is trimmed. Markup unchanged
   (id=enquire, data-cta / placement attributes as built). This file loads on the two home pages only. */
html[data-sk] body #enquire.home-close{padding-bottom:60px}
html[data-sk] body #enquire.home-close .whatsapp-primary{margin:28px 0 14px}
html[data-sk] body #enquire.home-close .direct{margin-top:0}

/* 23 Nov 2026 (home tidy, fix 5): the band above the footer (ops/rebrand.py band(): Sam's own door + the Adaptig credential line) is
   shared by ~210 pages; on the two home pages only (this file) its two parts sit in ONE row under the band's hairline: the link left,
   the Adaptig logo + line right. Same elements, same link, same words. Phones: stacked as before. */
html[data-look][data-sk] body .ad-endorse .ad-endorse__in{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px 40px;padding:26px 0}
html[data-look][data-sk] body .ad-endorse .ad-endorse__links a{font-size:18px!important}
html[data-look][data-sk] body .ad-endorse .ad-endorse__cred{gap:8px 16px}
html[data-look][data-sk] body .ad-endorse .ad-endorse__mark{width:76px}
html[data-look][data-sk] body .ad-endorse .ad-endorse__text p{font-size:14px!important;font-weight:400;color:var(--ls-muted,#566168)}
@media(max-width:760px){html[data-look][data-sk] body .ad-endorse .ad-endorse__in{display:grid;grid-template-columns:1fr;gap:14px;padding:24px 0}}

/* Nothing here animates; kept explicit for reduced-motion users in case a hover transition is ever added. */
@media(prefers-reduced-motion:reduce){[data-ls] *{transition:none!important;animation:none!important}}
