/* ==========================================================================
   Homepage redesign (home-v2). Loaded ONLY by front/lawyer/index.blade.php.
   Every rule is scoped to .kh-home so no other page or shared component changes.
   ========================================================================== */
.kh-home {
  --kh-navy: #0c2a55;
  --kh-navy-900: #081c3e;
  --kh-blue: #1d5bbf;
  --kh-green: #8db84a;          /* accent on dark surfaces (navy text on top = 8:1) */
  --kh-green-hover: #9ec85b;
  --kh-green-ink: #3a7a1c;      /* green text on white (>= 5:1) */
  --kh-ink: #12233f;
  --kh-text: #3a4a63;
  --kh-line: #e3e9f2;
  --kh-bg-soft: #f5f8fc;
  --kh-radius: 18px;
  --kh-radius-sm: 12px;
  --kh-font-head: "DM Serif Display", Georgia, "Times New Roman", serif;
  --kh-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --kh-section: clamp(40px, 3vw + 24px, 72px);
  font-family: var(--kh-font-body);
  color: var(--kh-text);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  overflow-x: clip;
}
html[lang^="zh"] .kh-home {
  --kh-font-head: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --kh-font-body: "Noto Sans SC", "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.kh-home *, .kh-home *::before, .kh-home *::after { box-sizing: border-box; }
.kh-home ul { list-style: none; margin: 0; padding: 0; }
.kh-home img { max-width: 100%; }
.kh-home a { text-decoration: none; }
.kh-home :focus-visible { outline: 3px solid var(--kh-blue); outline-offset: 3px; border-radius: 6px; }
.kh-hero :focus-visible, .kh-tools :focus-visible, .kh-cta :focus-visible { outline-color: #fff; }

/* ---------- Type ---------- */
.kh-h2 { font-family: var(--kh-font-head); font-weight: 400; color: var(--kh-navy); margin: 0 0 .5em;
  font-size: clamp(1.75rem, 1.2rem + 1.7vw, 2.5rem); line-height: 1.15; letter-spacing: -.005em; }
html[lang^="zh"] .kh-h2 { font-weight: 700; }
.kh-h2--light { color: #fff; }
.kh-h3 { font-family: var(--kh-font-body); font-weight: 700; color: var(--kh-navy); margin: 0 0 .35em;
  font-size: clamp(1.15rem, 1.05rem + .45vw, 1.35rem); line-height: 1.25; }
.kh-eyebrow-dark, .kh-eyebrow-light { position: relative; margin: 0 0 .9em; padding-bottom: .7em; font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; line-height: 1.3; }
.kh-eyebrow-dark { color: var(--kh-green-ink); }
.kh-eyebrow-light { color: #fff; }
.kh-eyebrow-dark::after, .kh-eyebrow-light::after { content: ""; position: absolute; left: 0; bottom: 0; width: 34px; height: 3px; border-radius: 2px; background: var(--kh-green); }
.kh-lead { margin: 0 0 1.4em; max-width: 40em; }
.kh-lead strong { color: var(--kh-navy); }
.kh-section { padding: calc(var(--kh-section) / 2) 0; }
.kh-head { margin-bottom: clamp(20px, 2vw, 32px); }

/* ---------- Buttons / links ---------- */
.kh-btn { display: inline-flex; align-items: center; gap: .6em; min-height: 48px; padding: .75em 1.4em; border-radius: 11px;
  font-weight: 700; font-size: 1rem; line-height: 1.2; transition: background-color .2s, transform .2s, box-shadow .2s; border: 0; cursor: pointer; }
.kh-btn .kh-icon { transition: transform .25s ease; }
.kh-btn:hover .kh-icon, .kh-btn:focus-visible .kh-icon { transform: translateX(4px); }
.kh-btn--green { background: var(--kh-green); color: var(--kh-navy-900); }
.kh-btn--green:hover, .kh-btn--green:focus-visible { background: var(--kh-green-hover); color: var(--kh-navy-900); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(8, 28, 62, .22); }
.kh-link { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; font-weight: 700; color: var(--kh-green-ink); }
.kh-link .kh-icon { transition: transform .25s ease; }
.kh-link:hover, .kh-link:focus-visible { color: var(--kh-navy); }
.kh-link:hover .kh-icon, .kh-link:focus-visible .kh-icon { transform: translateX(4px); }
.kh-link--sm { font-size: .95rem; }
.kh-stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.kh-stretch { color: inherit; }
.kh-stretch:focus-visible { outline: none; }
.kh-card:focus-within { outline: 3px solid var(--kh-blue); outline-offset: 3px; }

/* ---------- Hero ---------- */
.kh-hero { position: relative; isolation: isolate; background: var(--kh-navy-900); color: #fff;
  height: clamp(480px, 74svh, 640px); min-height: 480px; overflow: hidden; }
.kh-slides, .kh-slide { position: absolute; inset: 0; }
.kh-slide { opacity: 0; visibility: hidden; z-index: 0; }
.kh-slide.is-leaving { opacity: 1; visibility: visible; z-index: 1; }
.kh-slide.is-active { opacity: 1; visibility: visible; z-index: 2; transition: opacity 1000ms cubic-bezier(.4, 0, .2, 1); }
.kh-slide.is-leaving .kh-content { opacity: 0; transition: opacity .25s ease; }
.kh-media, .kh-media img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.kh-media img { object-fit: cover; object-position: 62% center; transform-origin: 60% 50%; }
.kh-slide.is-active .kh-media img { animation: kh-zoom 14s ease-out both; }
.kh-hero.is-held .kh-slide.is-active .kh-media img { animation-play-state: paused; }
.kh-scrim { position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8, 28, 62, .92) 0%, rgba(8, 28, 62, .84) 42%, rgba(8, 28, 62, .5) 68%, rgba(8, 28, 62, .16) 100%),
              linear-gradient(0deg, rgba(8, 28, 62, .55) 0%, rgba(8, 28, 62, 0) 38%); }
.kh-content { position: relative; z-index: 3; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding-top: 32px; padding-bottom: 112px; max-width: 1140px; }
.kh-eyebrow { position: relative; margin: 0 0 1.2em; padding-bottom: .8em; max-width: 36em; font-size: clamp(.8rem, .75rem + .25vw, .92rem); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: #fff; line-height: 1.4; }
.kh-eyebrow::after { content: ""; position: absolute; left: 0; bottom: 0; width: 38px; height: 3px; border-radius: 2px; background: var(--kh-green); }
.kh-title { margin: 0 0 1.1em; max-width: 15em; font-family: var(--kh-font-head); font-weight: 400; color: #fff;
  font-size: clamp(2.1rem, 1.2rem + 3.2vw, 3.6rem); line-height: 1.1; letter-spacing: -.01em; text-wrap: balance; text-shadow: 0 2px 18px rgba(8, 28, 62, .35); }
html[lang^="zh"] .kh-title { font-weight: 700; line-height: 1.25; font-size: clamp(1.9rem, 1.1rem + 2.8vw, 3.2rem); }
/* entrance choreography: only applied to slides activated by JS, so slide 1 never waits on animation (LCP-safe) */
.kh-slide.is-entering [data-kh-in] { animation: kh-up .8s cubic-bezier(.2, .7, .2, 1) both; }
.kh-slide.is-entering .kh-eyebrow { animation-delay: .15s; }
.kh-slide.is-entering .kh-title { animation-delay: .3s; }
.kh-slide.is-entering .kh-btn { animation-name: kh-fade; animation-delay: .6s; }

/* controls */
.kh-controls { position: absolute; z-index: 5; inset: 0; display: flex; align-items: flex-end; gap: 14px;
  padding: 0 max(16px, calc((100% - 1140px) / 2 + 15px)) 56px; pointer-events: none; }
.kh-controls > * { pointer-events: auto; }
.kh-bars { display: flex; gap: 8px; margin-right: auto; }
.kh-bar { position: relative; width: 56px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.kh-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: rgba(255, 255, 255, .38); }
.kh-bar__fill { position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; width: 0; border-radius: 2px; background: var(--kh-green); }
.kh-bar.is-active .kh-bar__fill { width: 100%; }
.kh-hero.is-playing .kh-bar.is-active .kh-bar__fill { width: 0; animation: kh-fill var(--kh-delay, 9000ms) linear forwards; }
.kh-hero.is-held .kh-bar.is-active .kh-bar__fill { animation-play-state: paused; }
.kh-ctl { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .7);
  background: rgba(8, 28, 62, .45); color: #fff; cursor: pointer; transition: background-color .2s, transform .2s, border-color .2s; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.kh-ctl:hover, .kh-ctl:focus-visible { background: rgba(8, 28, 62, .78); border-color: #fff; }
.kh-ctl:active { transform: scale(.94); }
.kh-pause .kh-i-play, .kh-pause[aria-pressed="true"] .kh-i-pause { display: none; }
.kh-pause[aria-pressed="true"] .kh-i-play { display: block; }
.kh-pause .kh-i-play { fill: currentColor; }
@media (min-width: 992px) {
  .kh-prev, .kh-next { position: absolute; top: calc(50% - 24px); width: 48px; height: 48px; }
  .kh-prev { left: 84px; } .kh-next { right: 28px; }
}

/* ---------- Trust bar ---------- */
.kh-trust { position: relative; z-index: 6; margin-top: -48px; padding: 0 0 8px; }
.kh-trust__card { display: grid; grid-template-columns: 1.05fr 1.15fr 1.1fr 1.1fr; align-items: center; background: #fff; border-radius: 20px;
  box-shadow: 0 14px 40px rgba(12, 42, 85, .13); padding: 18px 8px; }
.kh-trust__item { display: flex; align-items: center; gap: 12px; padding: 8px 18px; min-height: 76px; }
.kh-trust__item + .kh-trust__item { border-left: 1px solid var(--kh-line); }
.kh-trust__laurel { color: var(--kh-green-ink); display: inline-flex; }
.kh-trust__num { font-family: var(--kh-font-head); font-size: clamp(2.4rem, 2rem + 1.6vw, 3.25rem); line-height: 1; color: var(--kh-navy); font-variant-numeric: tabular-nums; }
.kh-trust__label { font-size: .875rem; line-height: 1.35; color: var(--kh-text); font-weight: 500; }
.kh-trust__label strong { display: block; color: var(--kh-navy); font-size: 1.0625rem; font-weight: 700; }
.kh-trust__label small { display: block; font-size: .8125rem; color: #55657d; }
.kh-trust__shield { color: var(--kh-green-ink); display: inline-flex; }
.kh-trust__item--logo { gap: 12px; }
.kh-logo-ph { flex: none; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 72px; padding: 6px 10px; border: 1.5px dashed #8a99b2; border-radius: 10px; color: var(--kh-navy); line-height: 1.1; }
.kh-logo-ph b { font-size: 1.25rem; letter-spacing: .02em; }
.kh-logo-ph i { font-style: normal; font-size: .625rem; letter-spacing: .06em; text-transform: uppercase; color: #5a6a83; margin-top: 3px; }
.kh-trust__item--logo .kh-trust__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- About ---------- */
.kh-about { padding-top: var(--kh-section); }
.kh-about__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.kh-about__media { margin: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 16px 40px rgba(12, 42, 85, .14); aspect-ratio: 16 / 11; background: var(--kh-bg-soft); }
.kh-about__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kh-about__body .kh-h2 { max-width: 16em; }

/* ---------- Service cards ---------- */
.kh-svc { display: grid; gap: clamp(14px, 1.6vw, 22px); grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kh-svc__card { grid-column: span 2; }
.kh-svc--n4 .kh-svc__card, .kh-svc--n2 .kh-svc__card { grid-column: span 3; }
.kh-svc--n5 .kh-svc__card:nth-child(n+4) { grid-column: span 3; }
.kh-card { position: relative; background: #fff; border: 1px solid var(--kh-line); border-radius: var(--kh-radius); overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.kh-svc__card { padding: 26px 26px 26px; min-height: 196px; display: flex; flex-direction: column; background: linear-gradient(180deg, #fff, #f7faf3 120%); }
.kh-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(12, 42, 85, .12); border-color: #cfdaea; }
.kh-svc__bg { position: absolute; right: 0; top: 0; width: 52%; height: 100%; object-fit: cover; opacity: .2;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 70%); mask-image: linear-gradient(90deg, transparent 0, #000 70%); pointer-events: none; }
.kh-svc__icon { position: relative; display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 14px; border-radius: 14px; background: #fff; color: var(--kh-navy);
  border: 1px solid var(--kh-line); box-shadow: 0 4px 12px rgba(12, 42, 85, .07); }
.kh-svc__icon .kh-icon { color: var(--kh-blue); }
.kh-svc__card .kh-h3, .kh-svc__text { position: relative; max-width: 78%; }
.kh-svc__text { margin: 0 0 28px; font-size: 1rem; line-height: 1.55; }
.kh-arrow { position: absolute; right: 22px; bottom: 22px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--kh-line); color: var(--kh-blue); pointer-events: none; transition: transform .25s ease, background-color .2s, color .2s, border-color .2s; }
.kh-card:hover .kh-arrow { transform: translateX(4px); background: var(--kh-blue); border-color: var(--kh-blue); color: #fff; }

/* ---------- Digital tax tools ---------- */
.kh-tools { position: relative; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2.2fr); align-items: center; gap: 12px; overflow: hidden;
  background: radial-gradient(120% 160% at 100% 100%, rgba(141, 184, 74, .22) 0, rgba(141, 184, 74, 0) 45%), linear-gradient(110deg, var(--kh-navy-900), var(--kh-navy) 70%);
  border-radius: 22px; padding: clamp(24px, 3vw, 36px) clamp(22px, 3vw, 40px); color: #fff; }
.kh-tools__intro .kh-h2 { margin: 0; }
.kh-tools__intro .kh-eyebrow-light { margin-bottom: .6em; }
.kh-tools__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kh-tool + .kh-tool, .kh-tools__list { border-left: 1px solid rgba(255, 255, 255, .18); }
.kh-tool + .kh-tool { border-left: 1px solid rgba(255, 255, 255, .18); }
.kh-tools__list { border-left: 0; }
.kh-tools__intro { padding-right: 24px; }
.kh-tool__link { display: flex; align-items: center; gap: 12px; height: 100%; min-height: 76px; padding: 10px clamp(12px, 1.6vw, 24px); color: #fff; border-radius: 14px; transition: background-color .2s; }
.kh-tool__link:hover, .kh-tool__link:focus-visible { background: rgba(255, 255, 255, .08); color: #fff; }
.kh-tool__icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); }
.kh-tool__label { flex: 1; min-width: 0; font-weight: 600; font-size: 1rem; line-height: 1.3; }
.kh-arrow--ring { position: static; flex: none; width: 34px; height: 34px; background: transparent; border-color: rgba(255, 255, 255, .55); color: #fff; }
.kh-tool__link:hover .kh-arrow--ring { transform: translateX(4px); background: var(--kh-green); border-color: var(--kh-green); color: var(--kh-navy-900); }

/* ---------- Testimonials + insights ---------- */
.kh-editorial__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 56px); align-items: start; padding-top: 8px; }
.kh-editorial__grid > :only-child { grid-column: 1 / -1; }
.kh-testi { position: relative; padding-right: clamp(0px, 3vw, 40px); }
.kh-quote { margin: 0; }
.kh-quote__mark { display: block; margin-bottom: 20px; color: var(--kh-green-ink); }
.kh-quote blockquote { margin: 0 0 24px; padding: 0; border: 0; }
.kh-quote blockquote p { margin: 0; font-family: var(--kh-font-head); font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); line-height: 1.5; color: var(--kh-ink); }
html[lang^="zh"] .kh-quote blockquote p { font-weight: 500; line-height: 1.7; }
.kh-quote__by { display: flex; align-items: center; gap: 16px; }
.kh-quote__by strong { display: block; color: var(--kh-navy); font-weight: 700; }
.kh-quote__by small { display: block; font-size: .9rem; color: #55657d; }
.kh-quote__photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(12, 42, 85, .2); }
.kh-testi.is-slider .kh-testi__track { display: grid; }
.kh-testi.is-slider .kh-quote { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .5s ease; }
.kh-testi.is-slider .kh-quote.is-active { opacity: 1; visibility: visible; }
.kh-testi:not(.is-slider) .kh-quote + .kh-quote { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--kh-line); }
.kh-testi__nav { display: none; }
.kh-testi.is-slider .kh-testi__nav { display: flex; gap: 2px; margin-top: 20px; }
.kh-dot { position: relative; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.kh-dot::before { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: #aebbd0; transition: background-color .2s, width .2s, margin .2s; }
.kh-dot.is-active::before { width: 26px; margin-left: -13px; border-radius: 5px; background: var(--kh-green-ink); }
.kh-insights { border-left: 1px solid var(--kh-line); padding-left: clamp(20px, 3vw, 44px); min-width: 0; }
.kh-insights__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kh-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.kh-post { display: flex; flex-direction: column; border-radius: 16px; }
.kh-post__img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--kh-bg-soft); }
.kh-post__body { display: flex; flex-direction: column; flex: 1; padding: 16px 16px 14px; }
.kh-post__title { margin: 0 0 12px; font-family: var(--kh-font-body); font-size: 1.0625rem; font-weight: 700; line-height: 1.35; color: var(--kh-navy);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kh-post__meta { margin: auto 0 0; display: flex; align-items: center; justify-content: space-between; font-size: .875rem; color: #55657d; }
.kh-arrow--bare { position: static; width: 32px; height: 32px; }

/* ---------- Final CTA ---------- */
.kh-cta-wrap { padding-bottom: calc(var(--kh-section) + 56px); }
.kh-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; border-radius: 22px; overflow: hidden; color: #fff;
  padding: clamp(26px, 3.4vw, 44px) clamp(24px, 4vw, 56px);
  background: radial-gradient(90% 180% at 0 0, rgba(29, 91, 191, .55) 0, rgba(29, 91, 191, 0) 60%), linear-gradient(100deg, var(--kh-navy-900), #12417f); }
.kh-cta__title { margin: 0 0 .3em; font-family: var(--kh-font-head); font-weight: 400; color: #fff; font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.2rem); line-height: 1.2; }
html[lang^="zh"] .kh-cta__title { font-weight: 700; }
.kh-cta__sub { margin: 0; color: #dbe5f5; font-size: 1rem; }
.kh-cta__text { flex: 1 1 380px; }

/* ---------- Reveal-on-scroll (armed only when JS ran; see failsafe in index.blade.php) ---------- */
html.kh-js:not(.kh-reveal-all) .kh-home [data-kh-reveal]:not(.is-in) { opacity: 0; transform: translateY(18px); }
.kh-home [data-kh-reveal] { transition: opacity .7s ease var(--kh-d, 0ms), transform .7s cubic-bezier(.2, .7, .2, 1) var(--kh-d, 0ms); }
.kh-home [data-kh-reveal].is-in { opacity: 1; transform: none; }
.kh-home .kh-card[data-kh-reveal].is-in { transition: transform .25s ease, box-shadow .25s ease, border-color .25s, opacity .7s ease var(--kh-d, 0ms); }
.kh-home [data-kh-float] { will-change: auto; }

@keyframes kh-zoom { from { transform: scale(1); } to { transform: scale(1.07); } }
@keyframes kh-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes kh-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kh-fill { from { width: 0; } to { width: 100%; } }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .kh-trust__card { grid-template-columns: 1fr 1fr; row-gap: 4px; }
  .kh-trust__item:nth-child(3) { border-left: 0; }
  .kh-trust__item:nth-child(n+3) { border-top: 1px solid var(--kh-line); }
  .kh-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kh-posts .kh-post:nth-child(3) { display: none; }
}
@media (max-width: 991px) {
  .kh-about__grid, .kh-editorial__grid { grid-template-columns: minmax(0, 1fr); }
  .kh-insights { border-left: 0; padding-left: 0; border-top: 1px solid var(--kh-line); padding-top: 28px; }
  .kh-testi { padding-right: 0; }
  .kh-svc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kh-svc .kh-svc__card, .kh-svc--n5 .kh-svc__card:nth-child(n+4) { grid-column: span 1; }
  .kh-svc--n5 .kh-svc__card:last-child:nth-child(odd), .kh-svc--n3 .kh-svc__card:last-child { grid-column: 1 / -1; }
  .kh-tools { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .kh-tools__intro { padding-right: 0; }
  .kh-tools__list { border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 14px; }
}
@media (max-width: 767px) {
  .kh-hero { height: clamp(460px, 78svh, 600px); min-height: 460px; }
  .kh-media img { object-position: 70% center; }
  .kh-scrim { background: linear-gradient(0deg, rgba(8, 28, 62, .9) 0%, rgba(8, 28, 62, .62) 52%, rgba(8, 28, 62, .38) 100%); }
  .kh-content { justify-content: flex-end; padding-bottom: 104px; }
  .kh-controls { padding: 0 16px 38px; }
  .kh-trust { margin-top: -36px; }
  .kh-trust__item { padding: 8px 14px; gap: 10px; }
  .kh-trust__laurel svg { width: 32px; height: 42px; }
  .kh-posts { grid-template-columns: minmax(0, 1fr); }
  .kh-posts .kh-post:nth-child(3) { display: flex; }
  .kh-post { flex-direction: row; }
  .kh-post__img { width: 42%; aspect-ratio: auto; min-height: 112px; flex: none; }
  .kh-post__body { padding: 12px 14px; }
  .kh-tools__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kh-tool__link { flex-direction: column; text-align: center; justify-content: flex-start; gap: 10px; padding: 12px 6px; }
  .kh-tool__label { font-size: .9rem; flex: none; }
  .kh-tool .kh-arrow--ring { display: none; }
  .kh-cta { flex-direction: column; align-items: flex-start; }
  .kh-cta .kh-btn { width: 100%; justify-content: center; }
  .kh-cta-wrap { padding-bottom: calc(var(--kh-section) + 72px); }
}
@media (max-width: 575px) {
  .kh-svc { grid-template-columns: minmax(0, 1fr); }
  .kh-svc .kh-svc__card:last-child { grid-column: auto; }
  .kh-trust__card { padding: 8px 4px; }
  .kh-trust__item { padding: 10px 12px; min-height: 64px; }
  .kh-trust__item--logo .kh-trust__label { display: none; }
  .kh-trust__item--logo { justify-content: center; }
  .kh-trust__num { font-size: 2.1rem; }
  .kh-trust__label { font-size: .8125rem; }
  .kh-trust__label strong { font-size: .95rem; }
  .kh-trust__label small { font-size: .75rem; }
  .kh-trust__item--years .kh-trust__laurel { display: none; }
  .kh-svc__card { min-height: 0; }
  .kh-svc__card .kh-h3, .kh-svc__text { max-width: 82%; }
}
@media (max-width: 359px) {
  .kh-tools__list { grid-template-columns: minmax(0, 1fr); }
  .kh-tool + .kh-tool { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .18); }
  .kh-tool__link { flex-direction: row; text-align: left; }
  .kh-tool .kh-arrow--ring { display: grid; }
  .kh-bar { width: 44px; }
}
@media (max-height: 600px) and (max-width: 767px) {
  .kh-hero { min-height: 440px; }
  .kh-content { padding-bottom: 96px; }
  .kh-title { font-size: clamp(1.7rem, 7vw, 2.1rem); margin-bottom: .8em; }
  .kh-eyebrow { margin-bottom: .8em; }
}

/* ---------- Reduced motion: no zoom, no entrance, no autoplay, instant swaps ---------- */
@media (prefers-reduced-motion: reduce) {
  .kh-home *, .kh-home *::before, .kh-home *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  html.kh-js .kh-home [data-kh-reveal] { opacity: 1 !important; transform: none !important; }
  .kh-card:hover { transform: none; }
}

/* Beat the site-wide heading/button typography rules from layout.blade.php inside the homepage only */
.kh-home h2.kh-h2, .kh-home h2.kh-title, .kh-home h2.kh-cta__title, .kh-home .kh-quote blockquote p, .kh-home .kh-trust__num { font-family: var(--kh-font-head) !important; }
.kh-home h3.kh-h3, .kh-home .kh-post__title, .kh-home .kh-btn, .kh-home .kh-eyebrow, .kh-home .kh-trust__label { font-family: var(--kh-font-body) !important; }
.kh-home h2, .kh-home h3 { text-transform: none; letter-spacing: normal; }
.kh-home h2.kh-title { letter-spacing: -.01em; }

/* Tablet: the headline spans most of the width, so use a fuller scrim for AA contrast on both photos */
@media (min-width: 768px) and (max-width: 991px) {
  .kh-scrim { background: linear-gradient(90deg, rgba(8, 28, 62, .9) 0%, rgba(8, 28, 62, .8) 60%, rgba(8, 28, 62, .55) 100%), linear-gradient(0deg, rgba(8, 28, 62, .55) 0%, rgba(8, 28, 62, 0) 38%); }
}

@media (min-width: 992px) and (max-width: 1399px) { .kh-tools { grid-template-columns: minmax(0, .7fr) minmax(0, 2.3fr); } .kh-tool__link { padding-inline: 10px; gap: 10px; } .kh-tool__icon { width: 46px; height: 46px; } }

/* ==========================================================================
   v2.1 art-direction pass (owner review of PR 140). Supersedes the rules above where they overlap.
   ========================================================================== */
@media (min-width: 1200px) { .kh-home .container { max-width: 1200px; } }

/* ---- Hero: ~520px on desktop, balanced headline, simple controls ---- */
.kh-hero { height: clamp(500px, 58svh, 560px); min-height: 500px; }
.kh-media img { object-position: 64% 38%; }
.kh-content { padding-top: 24px; padding-bottom: 104px; }
.kh-eyebrow { margin-bottom: 1.1em; }
.kh-title { max-width: 12.5em; margin-bottom: 1.25em; font-size: clamp(2.1rem, 1.3rem + 2.5vw, 3.4rem); line-height: 1.12; text-wrap: balance; }
html[lang^="zh"] .kh-title { max-width: 14em; font-size: clamp(1.9rem, 1.2rem + 2.2vw, 3rem); }
.kh-scrim { background: linear-gradient(90deg, rgba(8, 28, 62, .93) 0%, rgba(8, 28, 62, .84) 40%, rgba(8, 28, 62, .46) 66%, rgba(8, 28, 62, .12) 100%), linear-gradient(0deg, rgba(8, 28, 62, .5) 0%, rgba(8, 28, 62, 0) 34%); }
.kh-controls { align-items: flex-end; justify-content: space-between; padding: 0 max(16px, calc((100% - 1200px) / 2 + 15px)) 62px; }
.kh-controls__l, .kh-controls__r { display: flex; align-items: center; gap: 12px; }
.kh-bars { margin-right: 4px; }
@media (min-width: 992px) {
  .kh-prev, .kh-next { position: static; width: 44px; height: 44px; }
}

/* ---- Trust bar: even rhythm, one icon size, aligned baselines ---- */
.kh-trust { margin-top: -44px; }
.kh-trust__card { grid-template-columns: 1.05fr 1.1fr 1.1fr 1.1fr; padding: 14px 6px; }
.kh-trust__item { min-height: 84px; padding: 8px 22px; gap: 14px; }
.kh-trust__laurel, .kh-trust__shield { width: 48px; height: 56px; align-items: center; justify-content: center; flex: none; }
.kh-trust__laurel svg { width: 44px; height: 52px; }
.kh-trust__shield svg { width: 44px; height: 44px; }
.kh-trust__num { font-size: clamp(2.5rem, 2.1rem + 1.4vw, 3.2rem); }
.kh-trust__label { font-size: .875rem; max-width: 9.5em; }
.kh-trust__label--strong { max-width: none; }
.kh-trust__label strong { font-size: 1.0625rem; margin-bottom: 1px; }
.kh-logo-ph { min-width: 88px; height: 54px; padding: 4px 12px; }
.kh-trust__item--logo .kh-trust__label { max-width: 11em; font-size: .6875rem; letter-spacing: .06em; line-height: 1.4; }

/* ---- About: editorial band ---- */
.kh-about { position: relative; padding-top: calc(var(--kh-section) * .85); padding-bottom: calc(var(--kh-section) * .45); }
.kh-about::after { content: ""; position: absolute; right: 0; bottom: 0; width: 38%; height: 100%; z-index: -1; pointer-events: none;
  background: radial-gradient(90% 120% at 100% 100%, rgba(141, 184, 74, .16), rgba(141, 184, 74, 0) 62%); }
.kh-about__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 56px); }
.kh-about__media { aspect-ratio: 16 / 10; border-radius: 18px; box-shadow: 0 12px 32px rgba(12, 42, 85, .13); }
.kh-about .kh-h2 { max-width: 15em; font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.3rem); }
.kh-about .kh-lead { margin-bottom: 1.1em; }

/* ---- Services: four prioritised cards, mockup-style ---- */
.kh-services { padding-top: calc(var(--kh-section) * .45); }
.kh-head--split { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.kh-head--split .kh-h2 { margin-bottom: 0; }
.kh-svc { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kh-svc .kh-svc__card, .kh-svc--n4 .kh-svc__card, .kh-svc--n2 .kh-svc__card, .kh-svc--n5 .kh-svc__card:nth-child(n+4) { grid-column: auto; }
.kh-svc__card { padding: 22px 22px 70px; min-height: 232px; background: #fff; }
.kh-svc__top { position: relative; display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.kh-svc__icon { flex: none; width: 56px; height: 56px; margin: 0; border-radius: 15px; }
.kh-svc__icon .kh-icon { width: 30px; height: 30px; }
.kh-svc__card .kh-h3 { max-width: none; margin: 0; font-size: 1.1875rem; line-height: 1.25; }
.kh-svc__text { position: relative; max-width: none; margin: 0; font-size: .9375rem; line-height: 1.6; color: var(--kh-text);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.kh-svc__bg { width: 62%; height: 58%; top: auto; bottom: 0; opacity: .3;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 60%); mask-image: linear-gradient(90deg, transparent 0, #000 60%); }
.kh-svc__card .kh-arrow { right: 18px; bottom: 18px; }
.kh-svc__more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 18px 0 0; font-size: .9375rem; color: #55657d; }
.kh-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--kh-line); border-radius: 999px; background: #fff; color: var(--kh-navy); font-weight: 600; transition: background-color .2s, border-color .2s, color .2s; }
.kh-chip:hover, .kh-chip:focus-visible { background: var(--kh-bg-soft); border-color: #bccbe0; color: var(--kh-blue); }

/* ---- Digital tax tools: more air, bigger icons, calmer wrapping ---- */
.kh-tools-wrap { padding-top: calc(var(--kh-section) * .5); padding-bottom: calc(var(--kh-section) * .5); }
.kh-tools { grid-template-columns: minmax(0, 0.62fr) minmax(0, 2.38fr); gap: 8px; padding: clamp(26px, 3vw, 38px) clamp(24px, 3vw, 44px); }
.kh-tools__intro { padding-right: 12px; }
.kh-tools__intro .kh-h2 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem); text-wrap: balance; }
.kh-tool__link { gap: 14px; padding: 12px clamp(14px, 1.6vw, 24px); min-height: 88px; }
.kh-tool__icon { width: 58px; height: 58px; border-radius: 17px; }
.kh-tool__icon .kh-icon { width: 30px; height: 30px; }
.kh-tool__label { font-size: 1.0625rem; line-height: 1.35; text-wrap: balance; overflow-wrap: normal; word-break: keep-all; }
html[lang^="zh"] .kh-tool__label { word-break: normal; line-break: strict; }
.kh-arrow--ring { width: 36px; height: 36px; }

/* ---- Testimonials + insights: 4 / 8 split, larger thumbnails and titles ---- */
.kh-editorial { padding-top: calc(var(--kh-section) * .3); padding-bottom: calc(var(--kh-section) * .3); }
.kh-editorial__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 3.4vw, 48px); }
.kh-insights { padding-left: clamp(20px, 2.6vw, 40px); }
.kh-posts { gap: 18px; }
.kh-post__body { padding: 16px 18px; }
.kh-post__title { font-size: 1.125rem; line-height: 1.35; -webkit-line-clamp: 4; margin-bottom: 14px; }
.kh-post__meta { font-size: .9rem; }
.kh-cta-wrap { padding-top: calc(var(--kh-section) * .3); padding-bottom: calc(var(--kh-section) * .55); }

/* ---- Tablet / mobile ---- */
@media (max-width: 1199px) {
  .kh-svc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kh-trust__card { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 991px) {
  .kh-about__grid, .kh-editorial__grid { grid-template-columns: minmax(0, 1fr); }
  .kh-controls { padding: 0 20px 62px; }
}
@media (max-width: 767px) {
  /* Fold budget: header (~68px) + hero + 150px reserved for the fixed Ask AI / WhatsApp / bottom nav, so the hero
     headline, CTA and controls are never under them at first view. */
  .kh-hero { height: clamp(372px, calc(100svh - 68px - 150px), 520px); min-height: 372px; }
  .kh-media img { object-position: 68% 30%; }
  .kh-content { justify-content: flex-end; padding-top: 16px; padding-bottom: 92px; }
  .kh-title { max-width: 11em; font-size: clamp(1.75rem, 1.2rem + 3vw, 2.2rem); margin-bottom: 1em; }
  .kh-eyebrow { font-size: .75rem; margin-bottom: .9em; padding-bottom: .65em; }
  .kh-controls { padding: 0 16px 36px; }
  .kh-controls__l, .kh-controls__r { gap: 8px; }
  .kh-bar { width: 40px; }
  .kh-trust { margin-top: -30px; }
  /* credentials read down the left column; logo placeholders sit in the right column (under the floating buttons) */
  .kh-trust__card { grid-template-columns: 1.15fr .85fr; grid-template-rows: auto auto; grid-auto-flow: column; padding: 6px 2px; }
  .kh-trust__item { border-left: 0 !important; border-top: 0 !important; padding: 10px 14px; min-height: 68px; }
  .kh-trust__item:nth-child(2), .kh-trust__item:nth-child(4) { border-top: 1px solid var(--kh-line) !important; }
  .kh-trust__item:nth-child(3), .kh-trust__item:nth-child(4) { border-left: 1px solid var(--kh-line) !important; }
  .kh-trust__laurel { display: inline-flex; width: 34px; } .kh-trust__laurel svg { width: 30px; height: 38px; }
  .kh-trust__shield { width: 34px; } .kh-trust__shield svg { width: 30px; height: 30px; }
  .kh-trust__num { font-size: 2rem; }
  .kh-trust__item--years { gap: 8px; }
  .kh-trust__label { font-size: .75rem; max-width: 8.5em; }
  .kh-trust__label strong { font-size: .9375rem; }
  .kh-trust__item--logo .kh-trust__label { display: none; }
  .kh-trust__item--logo { justify-content: center; }
  .kh-about { padding-top: 28px; }
  .kh-svc__card { min-height: 0; padding-bottom: 66px; }
  .kh-post { flex-direction: row; }
  .kh-post__img { width: 40%; aspect-ratio: auto; min-height: 120px; }
  .kh-post__title { font-size: 1.0625rem; }
  .kh-cta-wrap { padding-bottom: 28px; }
}
@media (max-width: 575px) {
  .kh-svc { grid-template-columns: minmax(0, 1fr); }
}
@media (max-height: 640px) and (max-width: 767px) {
  .kh-title { font-size: clamp(1.55rem, 6.4vw, 1.9rem); max-width: 12em; }
  .kh-content { padding-bottom: 84px; }
  .kh-controls { padding-bottom: 28px; }
  .kh-btn { min-height: 44px; padding: .55em 1.1em; }
}

/* v2.1b tweaks */
.kh-media img { object-position: 64% 60%; }
.kh-svc__text { -webkit-line-clamp: 5; }
.kh-svc__card { min-height: 246px; }
.kh-quote blockquote p { font-size: clamp(1.15rem, 1.02rem + .45vw, 1.35rem); line-height: 1.5; }
.kh-editorial { padding-bottom: 0; }
.kh-cta-wrap { padding-top: 24px; }

/* Short phones: the hero fills the fold and keeps its text + controls above the 150px zone used by the fixed
   Ask AI / WhatsApp / bottom-nav buttons; credentials start below the fold instead of sliding under them. */
@media (max-width: 767px) and (max-height: 700px) {
  .kh-hero { height: calc(100svh - 68px); min-height: 440px; }
  .kh-content { padding-bottom: 214px; padding-top: 12px; }
  .kh-controls { padding-bottom: 150px; }
  .kh-trust { margin-top: 0; padding-top: 18px; }
}

/* v2.1c: restore the scrims the later desktop rule overrode; tools panel wrapping; fuller article titles */
@media (min-width: 768px) and (max-width: 991px) {
  .kh-scrim { background: linear-gradient(90deg, rgba(8, 28, 62, .9) 0%, rgba(8, 28, 62, .8) 60%, rgba(8, 28, 62, .55) 100%), linear-gradient(0deg, rgba(8, 28, 62, .55) 0%, rgba(8, 28, 62, 0) 38%); }
}
@media (max-width: 767px) {
  .kh-scrim { background: linear-gradient(0deg, rgba(8, 28, 62, .94) 0%, rgba(8, 28, 62, .86) 55%, rgba(8, 28, 62, .66) 100%); }
}
.kh-tools { grid-template-columns: minmax(0, 0.55fr) minmax(0, 2.45fr); }
.kh-tool__link { gap: 12px; padding-inline: clamp(10px, 1.2vw, 18px); }
.kh-tool__icon { width: 52px; height: 52px; border-radius: 15px; }
.kh-tool__icon .kh-icon { width: 28px; height: 28px; }
.kh-arrow--ring { width: 32px; height: 32px; }
.kh-post__title { font-size: 1.0625rem; -webkit-line-clamp: 5; }
@media (max-width: 991px) {
  .kh-tools__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kh-tool__link { flex-direction: column; text-align: center; justify-content: flex-start; gap: 10px; padding: 14px 8px; }
  .kh-tool__label { flex: none; font-size: 1rem; }
  .kh-tool .kh-arrow--ring { display: none; }
}
@media (max-width: 767px) { .kh-tool__label { font-size: .9rem; } }
@media (max-width: 359px) {
  .kh-tools__list { grid-template-columns: minmax(0, 1fr); }
  .kh-tool__link { flex-direction: row; text-align: left; }
  .kh-tool .kh-arrow--ring { display: grid; }
  .kh-tool__label { flex: 1; font-size: 1rem; }
}

/* v2.1d: single-column tools panel below desktop (the v2.1c desktop grid must not leak down) */
@media (max-width: 991px) {
  .kh-tools { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .kh-tools__intro { padding-right: 0; }
}

/* v2.1e: phones get readable full-width tool rows instead of three cramped columns */
@media (max-width: 575px) {
  .kh-tools__list { grid-template-columns: minmax(0, 1fr); border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 6px; }
  .kh-tool + .kh-tool { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
  .kh-tool__link { flex-direction: row; text-align: left; gap: 14px; padding: 12px 6px; min-height: 76px; }
  .kh-tool__label { flex: 1; font-size: 1.0625rem; }
  .kh-tool .kh-arrow--ring { display: grid; }
}

/* ==========================================================================
   v2.2 final refinement (owner review of PR 140, commit 915cc8f)
   ========================================================================== */

/* ---- Tax tools: identical vertical row layout (EN + ZH) at every phone width, arrows flush right ---- */
@media (max-width: 767px) {
  .kh-tools__list { grid-template-columns: minmax(0, 1fr); border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 6px; }
  .kh-tool + .kh-tool { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
  .kh-tool__link { flex-direction: row; text-align: left; justify-content: flex-start; gap: 14px; padding: 12px 6px; min-height: 76px; }
  .kh-tool__label { flex: 1 1 auto; min-width: 0; font-size: 1.0625rem; word-break: normal; overflow-wrap: break-word; }
  .kh-tool .kh-arrow--ring { display: grid; flex: none; margin-left: auto; }
}

/* ---- Service cards: content-driven heights ---- */
@media (max-width: 1199px) { .kh-svc__card { min-height: 0; } }
@media (max-width: 767px) {
  .kh-svc { gap: 12px; }
  .kh-svc__card { min-height: 0; padding: 16px 16px 18px; }
  .kh-svc__top { padding-right: 46px; margin-bottom: 10px; gap: 12px; }
  .kh-svc__icon { width: 46px; height: 46px; border-radius: 13px; }
  .kh-svc__icon .kh-icon { width: 26px; height: 26px; }
  .kh-svc__card .kh-h3 { font-size: 1.125rem; }
  .kh-svc__text { display: block; -webkit-line-clamp: unset; overflow: visible; font-size: 1rem; line-height: 1.55; }
  .kh-svc__card .kh-arrow { top: 16px; bottom: auto; right: 14px; width: 36px; height: 36px; }
  .kh-svc__bg { top: auto; bottom: 0; width: 44%; height: 52%; opacity: .12; }
}

/* ---- Testimonials: Inter 17-18px, regular/medium; tighter proportions and spacing ---- */
.kh-home .kh-quote blockquote p { font-family: var(--kh-font-body) !important; font-size: clamp(1.0625rem, 1.04rem + .1vw, 1.125rem); font-weight: 500; line-height: 1.65; color: var(--kh-ink); }
.kh-quote__mark { width: 36px; height: 28px; margin-bottom: 14px; }
.kh-quote blockquote { margin-bottom: 18px; }
.kh-testi { padding-right: clamp(0px, 1.6vw, 24px); }
.kh-testi.is-slider .kh-testi__nav { margin-top: 4px; }
.kh-editorial { padding-bottom: 0; }
.kh-cta-wrap { padding-top: 12px; }
@media (max-width: 767px) { .kh-editorial { padding-top: 8px; } .kh-cta-wrap { padding-top: 8px; } .kh-cta .kh-btn { width: auto; min-width: 220px; } }

/* ---- Mobile: keep key CTAs narrow and left-aligned so the fixed right-hand buttons rarely overlap them ---- */
@media (max-width: 767px) {
  .kh-hero .kh-btn { max-width: 250px; }
}

/* v2.2b: tool links always span their cell (arrows then align flush right); tighter editorial -> CTA spacing */
.kh-tool { display: block; min-width: 0; }
.kh-tool__link { width: 100%; }
.kh-editorial__grid { padding-top: 0; }
.kh-testi__nav, .kh-quote__by { margin-bottom: 0; }
.kh-editorial .container { padding-bottom: 0; }
.kh-cta-wrap { padding-top: 0; }

/* v2.2c: legacy #ibamaq rules (id specificity) must not re-add 70px of padding around the CTA */
.kh-home #ibamaq.kh-cta-wrap { padding: 8px 0 32px; background: none; }
@media (max-width: 767px) { .kh-home #ibamaq.kh-cta-wrap { padding: 4px 0 28px; } }

/* Final mobile spacing: let the CTA contents determine its height. */
@media (max-width: 767px) {
  .kh-cta { min-height: 0; height: auto; gap: 22px; padding: 28px 24px; }
  .kh-cta__text { flex: 0 1 auto; width: 100%; }
  .kh-cta__title { margin-bottom: 10px; }
  .kh-hero { height: clamp(372px, calc(100svh - 68px - 170px), 480px); min-height: 372px; }
}
@media (max-width: 767px) and (max-height: 700px) {
  .kh-hero { height: calc(100svh - 68px); min-height: 440px; }
}

/* v2.2d: phones - every real button/link sits left-aligned; only decorative arrows stay on the right (under the fixed buttons) */
@media (max-width: 767px) {
  .kh-insights__head { flex-direction: column; align-items: flex-start; gap: 0; }
  .kh-insights__head .kh-link { margin-bottom: 8px; }
}

/* v2.3: homepage, phones/tablets only - Ask Fong AI becomes a compact round robot button directly above the WhatsApp FAB.
   Same <button id="kffAiFab"> (label, aria, panel, intro and chat logic untouched): the text is visually hidden and the
   owner's round robot artwork (ask-fong-ai-robot, 168px copy) is its background. WhatsApp FAB: right 16px, 56px, bottom 16px (+safe area). */
@media (max-width: 991.98px) {
  button.kff-ai-fab:not(.kff-ai-fab-bot)#kffAiFab {
    right: 17px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    width: 54px;
    height: 54px;
    min-height: 54px;
    padding: 0;
    gap: 0;
    border-radius: 50%;
    overflow: hidden;
    font-size: 0;
    line-height: 0;
    color: transparent;
    background: #0c2347 url("../img/ask-fong-ai-robot-168.png") center / 100% 100% no-repeat;
    box-shadow: 0 6px 18px rgba(8, 28, 62, .35);
  }
  button.kff-ai-fab:not(.kff-ai-fab-bot)#kffAiFab:hover,
  button.kff-ai-fab:not(.kff-ai-fab-bot)#kffAiFab:focus-visible {
    background: #0c2347 url("../img/ask-fong-ai-robot-168.png") center / 100% 100% no-repeat;
    transform: translateY(-2px);
  }
  button.kff-ai-fab:not(.kff-ai-fab-bot)#kffAiFab:focus-visible { outline: 3px solid #f5b942; outline-offset: 3px; }
  button.kff-ai-fab:not(.kff-ai-fab-bot)#kffAiFab .kff-ai-spark { display: none; }
}

/* v2.3: ZH credential line breaks after the approving phrase (zero-width break opportunity in the string), never mid-word */
.kh-trust__label--strong strong { word-break: keep-all; overflow-wrap: anywhere; }

/* Two approved credentials, without reserved logo columns. */
.kh-trust__card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.kh-trust__label--strong small { display: block; line-height: 1.35; }
.kh-trust__label--strong small + small { margin-top: 2px; }
.kh-post__img { object-position: center 40%; }
@media (max-width: 767px) { .kh-post__img { object-position: center center; } }
@media (max-width: 767px) {
  .kh-trust__card { grid-template-columns: 1fr; grid-template-rows: auto; grid-auto-flow: row; }
  .kh-trust__label--strong { max-width: none; }
  .kh-trust__item:nth-child(2) { border-top: 1px solid var(--kh-line) !important; }
}

/* v2.3b: the production launcher (staging/ask-fong-ai-mobile-fixes, not yet in main) renders the robot as <img class="kff-ai-bot-img">
   plus a "Ask Fong AI" label chip inside #kffAiFab. On phones make that same button a compact 54px round robot (label chip
   hidden visually; the button keeps aria-label/title), and keep the thinking chip + ring + chat-open states. */
@media (max-width: 991.98px) {
  button.kff-ai-fab.kff-ai-fab-bot#kffAiFab {
    right: 17px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    width: 54px;
    min-width: 54px;
    height: 54px;
    min-height: 54px;
    gap: 0;
  }
  #kffAiFab .kff-ai-bot-visual { flex: 0 0 54px; width: 54px; height: 54px; }
  #kffAiFab .kff-ai-bot-label {
    position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px; border: 0; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
}
