/**
 * H On Flow — Inner pages: services, articles, article detail, case studies,
 * contact, privacy, 404.
 */

/* ==========================================================================
   Shared split + rows
   ========================================================================== */
.hf-split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(36px, 6vw, 104px); align-items: start; }
.hf-split--toc { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); }
.hf-split__sticky { gap: 24px; }
@media (max-width: 960px) { .hf-split, .hf-split--toc { grid-template-columns: 1fr; } }

.hf-rows { border-top: 2px solid var(--hf-ink); }
.hf-row { display: grid; grid-template-columns: clamp(64px, 9vw, 104px) minmax(0, 1fr); gap: 16px; padding: clamp(28px, 3.2vw, 44px) 0; border-bottom: 1px solid var(--hf-line-strong); }
.hf-row__num { font-size: clamp(2rem, 1.4rem + 2vw, 3.25rem); line-height: 1; color: var(--hf-orange); }
.hf-row__title { font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem); line-height: 1.3; margin-bottom: 10px; }
.hf-row__desc { color: var(--hf-muted); max-width: 58ch; }

.hf-banner {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px;
  padding: clamp(28px, 4.4vw, 64px);
  border-radius: var(--hf-r-panel); background: var(--hf-ink); color: #fff;
}
.hf-banner::before { content: ''; position: absolute; z-index: -1; width: 150px; height: 150px; right: -64px; top: -64px; border-radius: 28px; background: var(--hf-gradient); transform: rotate(45deg); }
.hf-banner__copy { display: grid; gap: 12px; max-width: 700px; }
.hf-banner__copy .hf-h2 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem); }
.hf-banner__copy p { color: var(--hf-on-dark-muted); }
.hf-banner-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }

/* ==========================================================================
   Service pages
   ========================================================================== */
.hf-svc-hero__inner { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(32px, 5vw, 88px); align-items: center; justify-items: stretch; }
.hf-svc-hero__copy { display: grid; gap: clamp(20px, 2.4vw, 28px); justify-items: start; }
.hf-svc-hero__title { font-size: clamp(2.125rem, 1rem + 3.6vw, 4rem); line-height: 1.2; max-width: 14em; }
html[lang^="en"] .hf-svc-hero__title { line-height: 1.08; }
.hf-svc-hero__stat { display: flex; align-items: center; gap: 20px; margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--hf-line-strong); width: 100%; max-width: 560px; }
.hf-svc-hero__stat-num { font-size: clamp(2.75rem, 2rem + 2.4vw, 4rem); line-height: 1; color: var(--hf-orange); white-space: nowrap; }
.hf-svc-hero__stat-text { font-size: var(--hf-fs-small); font-weight: 600; color: var(--hf-muted); max-width: 30ch; line-height: 1.6; }
.hf-svc-hero__media { position: relative; }
.hf-svc-hero__photo { position: relative; aspect-ratio: 4 / 5; border-radius: var(--hf-r-panel); overflow: hidden; background: var(--hf-canvas); box-shadow: var(--hf-shadow-lift); }
.hf-svc-hero__photo img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.hf-svc-hero__frame img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 20% 0; }
.hf-float--svc { left: 24px; bottom: -46px; }
.hf-svc-hero__media { margin-bottom: 40px; }
@media (max-width: 960px) {
  .hf-svc-hero__inner { grid-template-columns: 1fr; }
  .hf-svc-hero__photo { aspect-ratio: 4 / 3; }
  .hf-float--svc { left: 12px; bottom: -46px; }
  .hf-svc-hero__media { margin-bottom: 28px; }
}

.hf-whatis__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.hf-whatis__grid > div:first-child { display: grid; gap: 24px; justify-items: start; }
.hf-whatis__body { color: var(--hf-ink-soft); font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem); max-width: 60ch; }
.hf-whatis__visual { display: flex; align-items: flex-end; justify-content: center; aspect-ratio: 1 / 1; max-height: 480px; border-radius: var(--hf-r-panel); background: var(--hf-white); border: 1px solid var(--hf-line); overflow: hidden; padding: 24px 24px 0; }
.hf-whatis__visual img { height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: 50% 100%; }
@media (max-width: 860px) { .hf-whatis__grid { grid-template-columns: 1fr; } .hf-whatis__visual { max-height: 380px; aspect-ratio: 4 / 3; } }

.hf-scope__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 6vw, 96px); border-top: 1px solid var(--hf-line-on-dark); }
.hf-scope__item { display: grid; gap: 10px; align-content: start; padding: clamp(28px, 3vw, 44px) 0; border-bottom: 1px solid var(--hf-line-on-dark); }
.hf-scope__num { font-size: 1.125rem; color: var(--hf-orange-3); }
.hf-scope__title { font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem); line-height: 1.3; }
.hf-scope__desc { color: var(--hf-on-dark-muted); max-width: 48ch; }
@media (max-width: 760px) { .hf-scope__grid { grid-template-columns: 1fr; } }

.hf-expand__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); }
.hf-expand__card { display: grid; gap: 14px; align-content: start; padding: clamp(28px, 3.4vw, 48px); border-radius: var(--hf-r-panel); background: var(--hf-canvas); border: 1px solid var(--hf-line); transition: transform 0.5s var(--hf-ease), box-shadow 0.5s var(--hf-ease), background-color 0.5s var(--hf-ease); }
.hf-expand__card:hover { transform: translateY(-4px); box-shadow: var(--hf-shadow-float); background: var(--hf-white); }
.hf-expand__num { font-size: clamp(2.5rem, 2rem + 1.6vw, 3.75rem); color: var(--hf-orange); line-height: 1; margin-bottom: 8px; }
.hf-expand__card p { color: var(--hf-muted); }
@media (max-width: 760px) { .hf-expand__grid { grid-template-columns: 1fr; } }

/* Service comparison (3 columns) */
.hf-cmp3 { min-width: 640px; }
.hf-cmp3 th, .hf-cmp3 td { padding: 22px clamp(16px, 2vw, 28px); }
.hf-cmp3 thead th { font-size: 1.1875rem; padding-top: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--hf-line-strong); }
.hf-cmp3 thead th.is-hon { position: relative; background: var(--hf-ink); color: #fff; }
.hf-cmp3__mark { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 10px; border-radius: 50%; background: var(--hf-orange-3); color: var(--hf-ink); vertical-align: -5px; }
.hf-cmp3__mark svg { width: 14px; height: 14px; }
.hf-cmp3 tbody th { font-family: var(--hf-font); font-weight: 800; width: 24%; }
.hf-cmp3 td { color: var(--hf-ink-soft); }
.hf-cmp3 td.is-hon { display: table-cell; background: var(--hf-wash); color: var(--hf-ink); font-weight: 600; }
.hf-cmp3 td.is-hon .hf-cmp3__tick { float: left; display: grid; place-items: center; width: 24px; height: 24px; margin: 2px 12px 0 0; border-radius: 50%; background: var(--hf-orange-3); color: var(--hf-ink); }
.hf-cmp3__tick svg { width: 14px; height: 14px; }
.hf-cmp3 td.is-hon > span:last-child { display: block; overflow: hidden; }
/* Phones: each row becomes a numbered "versus" card — the H On answer is an ink fin
   (same 12/4 corners + orange tick as the desktop ink column), the alternative sits
   under it, quieter. Same DOM; the column names come from data-label. */
@media (max-width: 700px) {
  .hf-cmp3-wrap { border: 0; border-radius: 0; background: none; overflow: visible; }
  .hf-cmp3, .hf-cmp3 tbody, .hf-cmp3 tr, .hf-cmp3 th, .hf-cmp3 td { display: block; }
  .hf-cmp3 { min-width: 0; }
  /* headers stay for screen readers; clipped at natural width (no 1px squeeze) */
  .hf-cmp3 thead { position: absolute; inset: 0 0 auto 0; clip-path: inset(50%); pointer-events: none; }
  .hf-cmp3 tbody { display: grid; gap: 12px; counter-reset: hf-cmp3; }
  .hf-cmp3 tbody tr { counter-increment: hf-cmp3; padding: 18px 18px 14px; border: 1px solid var(--hf-line); border-radius: var(--hf-r-card); background: var(--hf-white); }
  .hf-cmp3 th, .hf-cmp3 td { padding: 0; border: 0; }
  /* block, not flex: a flex row header would split the copy at every .hf-nb span */
  .hf-cmp3 tbody th { position: relative; width: auto; margin-bottom: 14px; padding-left: 34px; font-family: var(--hf-font-display); font-weight: 400; font-size: 1.0625rem; line-height: 1.45; }
  .hf-cmp3 tbody th::before { content: counter(hf-cmp3, decimal-leading-zero); position: absolute; left: 0; top: 0.2em; font-family: var(--hf-font); font-size: var(--hf-fs-xs); font-weight: 800; letter-spacing: 0.04em; color: var(--hf-orange); }
  .hf-cmp3 td::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: var(--hf-fs-xs); font-weight: 800; line-height: 1.5; }

  .hf-cmp3 td.is-hon { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 12px; padding: 14px 16px 15px; border-radius: 12px 4px 12px 4px; background: var(--hf-ink); color: #fff; font-weight: 600; }
  .hf-cmp3 td.is-hon::before { grid-column: 2; grid-row: 1; color: var(--hf-orange-3); }
  .hf-cmp3 td.is-hon .hf-cmp3__tick { float: none; grid-column: 1; grid-row: 1 / span 2; margin: 0; align-self: start; }
  .hf-cmp3 td.is-hon > span:last-child { grid-column: 2; grid-row: 2; }

  .hf-cmp3 td:not(.is-hon) { position: relative; margin: 12px 0 0; padding: 0 4px 0 52px; color: var(--hf-ink-soft); }
  .hf-cmp3 td:not(.is-hon)::before { color: var(--hf-muted); }
  /* a hollow marker opposite the ink tick: "the other way" */
  .hf-cmp3 td:not(.is-hon)::after { content: ""; position: absolute; left: 16px; top: 3px; width: 24px; height: 24px; box-sizing: border-box; border: 1.5px dashed var(--hf-line-strong); border-radius: 50%; }
}

/* Horizontal steps */
.hf-hsteps__list { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); }
.hf-hsteps__list:has(> .hf-hsteps__step:nth-child(4):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hf-hsteps__list > .hf-hsteps__rail ~ .hf-hsteps__step:nth-child(5) { grid-column: auto; }
.hf-hsteps__rail { position: absolute; left: 28px; right: 28px; top: 28px; height: 2px; border-radius: 2px; background: var(--hf-line-strong); }
.hf-hsteps__progress { position: absolute; inset: 0; border-radius: 2px; background: var(--hf-gradient); transform-origin: 0 50%; }
.hf-hsteps__step { position: relative; padding-top: 88px; display: grid; gap: 8px; align-content: start; }
.hf-hsteps__node { position: absolute; left: 0; top: 0; z-index: 1; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--hf-orange-3); border: 2px solid var(--hf-orange-3); color: var(--hf-ink); font-size: 1.125rem; transition: background-color 0.5s var(--hf-ease), border-color 0.5s var(--hf-ease); }
.hf-hsteps__step.is-pending .hf-hsteps__node { background: var(--hf-white); border-color: var(--hf-line-strong); color: var(--hf-muted); }
.hf-hsteps__kicker { font-size: var(--hf-fs-xs); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hf-muted); }
.hf-hsteps__title { font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.625rem); line-height: 1.35; }
.hf-hsteps__desc { color: var(--hf-muted); font-size: var(--hf-fs-small); line-height: 1.75; }
@media (max-width: 960px) {
  .hf-hsteps__list, .hf-hsteps__list:has(> .hf-hsteps__step:nth-child(4):last-child) { grid-template-columns: 1fr; gap: 36px; }
  .hf-hsteps__rail { left: 27px; right: auto; top: 28px; bottom: 28px; width: 2px; height: auto; }
  .hf-hsteps__progress { transform-origin: 50% 0; }
  .hf-hsteps__step { padding-top: 0; padding-left: 84px; min-height: 56px; }
  .hf-hsteps__kicker { padding-top: 4px; }
}

/* ==========================================================================
   Articles list
   ========================================================================== */
.hf-art-feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding: clamp(12px, 1.4vw, 20px); border-radius: var(--hf-r-panel); background: var(--hf-white); margin-bottom: var(--hf-gutter); }
.hf-art-feature__media { display: block; border-radius: calc(var(--hf-r-panel) - 10px); overflow: hidden; aspect-ratio: 4 / 3; background: var(--hf-canvas); }
.hf-art-feature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--hf-ease); }
.hf-art-feature:hover .hf-art-feature__media img { transform: scale(1.04); }
.hf-art-feature__body { display: grid; gap: 20px; justify-items: start; padding: clamp(8px, 2vw, 32px) clamp(8px, 3vw, 48px) clamp(8px, 2vw, 32px) 0; }
.hf-art-feature__title { font-size: clamp(1.625rem, 1.1rem + 1.8vw, 2.5rem); line-height: 1.3; }
.hf-art-feature__title a, .hf-art-card__title a { background: linear-gradient(var(--hf-orange), var(--hf-orange)) 0 100% / 0 2px no-repeat; transition: background-size 0.6s var(--hf-ease); }
.hf-art-feature__title a:hover, .hf-art-card__title a:hover { background-size: 100% 2px; }
.hf-art-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: var(--hf-fs-xs); font-weight: 700; color: var(--hf-muted); }

.hf-art-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--hf-gutter); }
.hf-art-card { display: grid; grid-template-rows: auto 1fr; border-radius: var(--hf-r-panel); background: var(--hf-white); overflow: hidden; transition: transform 0.6s var(--hf-ease), box-shadow 0.6s var(--hf-ease); }
.hf-panel--tint .hf-art-card { background: var(--hf-white); border: 1px solid var(--hf-line); }
.hf-art-card:hover { transform: translateY(-6px); box-shadow: var(--hf-shadow-lift); }
.hf-art-card__body { display: grid; gap: 14px; align-content: start; justify-items: start; padding: clamp(24px, 2.6vw, 36px); }
.hf-art-card__title { font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.625rem); line-height: 1.4; }
.hf-art-card__excerpt { color: var(--hf-muted); font-size: var(--hf-fs-small); line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.hf-cover { position: relative; isolation: isolate; display: grid; align-content: space-between; aspect-ratio: 16 / 9; padding: clamp(20px, 2.4vw, 32px); overflow: hidden; color: #fff; }
.hf-cover--ink { background: var(--hf-ink); }
.hf-cover--ink::before { content: ''; position: absolute; z-index: -1; right: -14%; bottom: -46%; width: 58%; aspect-ratio: 1; border-radius: 50%; background: var(--hf-orange-3); transition: transform 1s var(--hf-ease); }
.hf-cover--orange { background: var(--hf-gradient); color: var(--hf-ink); }
.hf-cover--tint { background: var(--hf-wash-strong); color: var(--hf-ink); }
.hf-art-card:hover .hf-cover--ink::before { transform: scale(1.25); }
.hf-cover__cat { justify-self: start; padding: 5px 14px; border-radius: var(--hf-r-pill); background: #fff; color: var(--hf-ink); font-size: var(--hf-fs-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; max-width: 80%; line-height: 1.5; }
.hf-cover--ink .hf-cover__cat { background: rgba(255, 255, 255, 0.14); color: #fff; }
html[lang^="th"] .hf-cover__cat { letter-spacing: 0.01em; text-transform: none; font-size: var(--hf-fs-small); }
.hf-cover__num { font-size: clamp(4rem, 3rem + 4vw, 7rem); line-height: 0.9; letter-spacing: -0.02em; }
.hf-cover__mark { position: absolute; z-index: -1; right: clamp(20px, 2.4vw, 32px); top: clamp(20px, 2.4vw, 32px); width: 48px; height: auto; transition: transform 0.8s var(--hf-ease); }
.hf-cover--orange .hf-cover__mark { filter: brightness(0); opacity: 0.85; }
.hf-art-card:hover .hf-cover__mark { transform: rotate(-12deg) scale(1.1); }
.hf-empty { display: grid; gap: 12px; justify-items: center; text-align: center; padding: clamp(48px, 8vw, 120px) 24px; border: 1.5px dashed var(--hf-line-strong); border-radius: var(--hf-r-panel); color: var(--hf-muted); }
.hf-empty__mark { font-size: clamp(5rem, 12vw, 9rem); color: var(--hf-orange); line-height: 1; }
@media (max-width: 860px) {
  .hf-art-feature { grid-template-columns: 1fr; }
  .hf-art-feature__body { padding: 8px 12px 20px; }
  .hf-art-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Article detail + prose
   ========================================================================== */
.hf-back { margin-bottom: 4px; }
.hf-art-body__grid { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: clamp(32px, 6vw, 112px); align-items: start; }
.hf-art-body__sticky { gap: 28px; justify-items: start; }
.hf-art-body__meta dl { display: grid; gap: 20px; margin: 0; }
.hf-art-body__meta dt { font-size: var(--hf-fs-xs); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hf-muted); }
html[lang^="th"] .hf-art-body__meta dt { letter-spacing: 0.02em; text-transform: none; font-size: var(--hf-fs-small); }
.hf-art-body__meta dd { margin: 4px 0 0; font-weight: 700; line-height: 1.5; }
.hf-art-body__meta div { padding-bottom: 20px; border-bottom: 1px solid var(--hf-line); }
.hf-art-body__meta .hf-btn { margin-top: 8px; }
@media (max-width: 860px) {
  .hf-art-body__grid { grid-template-columns: 1fr; gap: 28px; }
  .hf-art-body__meta dl { grid-template-columns: 1fr; gap: 14px; }
  .hf-art-body__meta div { padding-bottom: 14px; }
  .hf-art-body__meta dd { overflow-wrap: anywhere; }
}

/* Author box (Task 14): only rendered when the author has a role, bio or photo */
.hf-author-box { display: flex; gap: 20px; align-items: flex-start; max-width: 70ch; margin-top: 48px; padding: 24px; border: 1px solid var(--hf-line); border-radius: 16px; background: rgba(255, 85, 0, 0.05); }
.hf-author-box__photo { flex: none; width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.hf-author-box__text { min-width: 0; }
.hf-author-box p { margin: 0; }
.hf-author-box__label { font-size: var(--hf-fs-xs); font-weight: 800; color: var(--hf-muted); }
.hf-author-box__name { margin-top: 4px; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
.hf-author-box__role { margin-top: 2px; font-weight: 700; color: #262626; line-height: 1.5; }
.hf-author-box__bio { margin-top: 10px; white-space: pre-line; line-height: 1.8; color: var(--hf-ink-soft); overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .hf-author-box { flex-direction: column; padding: 18px; }
}

.hf-article-prose { max-width: 70ch; font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem); line-height: 1.9; color: var(--hf-ink-soft); }
.hf-article-prose--center { margin-inline: auto; }
.hf-article-prose > * + * { margin-top: 1.25em; }
.hf-article-prose h2 { font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1.3; margin-top: 2.2em; color: var(--hf-ink); }
.hf-article-prose h3 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem); line-height: 1.4; margin-top: 2em; color: var(--hf-ink); }
.hf-article-prose h2 + *, .hf-article-prose h3 + * { margin-top: 0.8em; }
.hf-article-prose strong { color: var(--hf-ink); }
.hf-article-prose a { color: var(--hf-ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--hf-orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.hf-article-prose a:hover { background: var(--hf-wash-strong); }
.hf-article-prose ul, .hf-article-prose ol { display: grid; gap: 0.7em; padding: 0; }
.hf-article-prose ul li { position: relative; padding-left: 1.75em; }
.hf-article-prose ul li::before { content: ''; position: absolute; left: 0.2em; top: 0.8em; width: 8px; height: 8px; border-radius: 2px; background: var(--hf-orange); transform: rotate(45deg); }
.hf-article-prose ol { counter-reset: hf-ol; }
.hf-article-prose ol li { position: relative; padding-left: 2.4em; counter-increment: hf-ol; }
.hf-article-prose ol li::before { content: counter(hf-ol, decimal-leading-zero); position: absolute; left: 0; top: 0; font-family: var(--hf-font-display); color: var(--hf-orange); }
.hf-article-prose blockquote { margin-inline: 0; padding: 8px 0 8px 28px; border-left: 3px solid var(--hf-orange); font-family: var(--hf-font-display); font-size: 1.25em; line-height: 1.6; color: var(--hf-ink); }
.hf-article-prose img { border-radius: var(--hf-r-card); }
.hf-article-prose table { width: 100%; font-size: 0.9em; border: 1px solid var(--hf-line); border-radius: var(--hf-r-control); }
.hf-article-prose th, .hf-article-prose td { padding: 12px 16px; border-bottom: 1px solid var(--hf-line); text-align: left; }

/* --------------------------------------------------------------------------
   Article body blocks (Task 16). The core block stylesheets are not loaded on
   article pages (honflow_render_article_body() dequeues them), so these rules
   are the whole styling: brand colours and alpha tints only, no late CSS.
   -------------------------------------------------------------------------- */
.hf-article-body > :is(.hf-cta, .hf-note, .hf-faq-group, .wp-block-table, .wp-block-gallery, .wp-block-embed, .wp-block-image, .wp-block-file) { margin-block: 2em; }
.hf-article-body > :first-child { margin-top: 0; }
.hf-article-body figure { margin-inline: 0; }
.hf-article-body figcaption { margin-top: 10px; font-size: var(--hf-fs-small); line-height: 1.6; color: var(--hf-muted); }

/* CTA button: the site's .hf-btn, shielded from the prose link style; long labels wrap */
.hf-article-body .hf-cta { display: flex; }
.hf-article-body a.hf-btn { max-width: 100%; padding-block: 8px; background: var(--btn-bg); color: var(--btn-fg); font-weight: 700; text-decoration: none; white-space: normal; text-align: left; }
.hf-article-body a.hf-btn:hover { background: var(--btn-bg); }
.hf-article-body a.hf-btn .hf-btn__icon svg { display: block; }

/* Callout: info (ink tint), tip (#FF7800 tint), warning (#FF4500 tint) */
.hf-note { --hf-note-accent: var(--hf-ink); position: relative; padding: 20px 24px 22px; border: 1px solid var(--hf-line); border-left: 4px solid var(--hf-note-accent); border-radius: var(--hf-r-control); background: var(--hf-canvas); color: var(--hf-ink-soft); line-height: 1.8; }
.hf-note--tip { --hf-note-accent: var(--hf-orange-3); border-color: rgba(255, 120, 0, 0.28); background: rgba(255, 120, 0, 0.08); }
.hf-note--warning { --hf-note-accent: var(--hf-orange); border-color: rgba(255, 69, 0, 0.28); background: rgba(255, 69, 0, 0.07); }
.hf-note--tip, .hf-note--warning { border-left-color: var(--hf-note-accent); }
.hf-note p { margin: 0; }
.hf-note__label { display: inline-flex; align-items: center; gap: 8px; font-size: var(--hf-fs-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--hf-ink); }
.hf-note__label::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--hf-note-accent); transform: rotate(45deg); }
.hf-note .hf-note__title { margin-top: 6px; font-weight: 800; line-height: 1.5; color: var(--hf-ink); }
.hf-note .hf-note__body { margin-top: 6px; overflow-wrap: anywhere; }

/* FAQ group: the site accordion (.hf-acc), sized for the article column */
.hf-article-body .hf-faq-group__title { margin: 0 0 0.6em; }
.hf-article-body .hf-faq-group .hf-acc__item > summary { min-height: 64px; padding: 16px 0; font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); color: var(--hf-ink); }
.hf-article-body .hf-faq-group .hf-acc__title { min-width: 0; overflow-wrap: anywhere; }
.hf-article-body .hf-faq-group .hf-acc__icon { width: 36px; height: 36px; color: var(--hf-ink); }
.hf-article-body .hf-faq-group .hf-acc__item[open] > summary .hf-acc__icon { color: #fff; }
.hf-article-body .hf-faq-group .hf-acc__body-inner { padding: 0 52px 22px 0; color: var(--hf-ink-soft); }
.hf-article-body .hf-faq-group .hf-acc__body-inner p { margin: 0; }
@media (max-width: 560px) {
  .hf-article-body .hf-faq-group .hf-acc__body-inner { padding-right: 0; }
}

/* Table */
.hf-article-body .wp-block-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hf-article-body .wp-block-table table { width: 100%; border-collapse: collapse; }
.hf-article-body .wp-block-table thead th { background: var(--hf-wash); color: var(--hf-ink); font-weight: 800; border-bottom: 2px solid var(--hf-orange); }
.hf-article-body .wp-block-table th, .hf-article-body .wp-block-table td { vertical-align: top; line-height: 1.6; }
.hf-article-body .wp-block-table tbody tr:last-child td { border-bottom: 0; }
.hf-article-body .wp-block-table .has-fixed-layout { table-layout: fixed; }
.hf-article-body .wp-block-table .has-fixed-layout :is(th, td) { overflow-wrap: break-word; }
@media (max-width: 560px) {
  /* Narrow screens: columns size to their content and the figure scrolls sideways if needed. */
  .hf-article-body .wp-block-table .has-fixed-layout { table-layout: auto; }
  .hf-article-body .wp-block-table :is(th, td) { padding: 10px 12px; }
}
.hf-article-body .wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: var(--hf-canvas); }

/* Image + gallery */
.hf-article-body .wp-block-image img { width: auto; max-width: 100%; height: auto; }
.hf-article-body .wp-block-image.aligncenter, .hf-article-body .wp-block-image .aligncenter { text-align: center; }
.hf-article-body .wp-block-image.aligncenter img { margin-inline: auto; }
.hf-article-body .wp-block-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--wp--style--unstable-gallery-gap, 12px); align-items: start; }
.hf-article-body .wp-block-gallery.columns-1 { grid-template-columns: minmax(0, 1fr); }
.hf-article-body .wp-block-gallery.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hf-article-body .wp-block-gallery:is(.columns-4, .columns-5, .columns-6, .columns-7, .columns-8) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hf-article-body .wp-block-gallery > .wp-block-image { margin: 0; min-width: 0; }
.hf-article-body .wp-block-gallery .wp-block-image img { width: 100%; border-radius: var(--hf-r-control); }
.hf-article-body .wp-block-gallery.is-cropped .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; }
.hf-article-body .wp-block-gallery .wp-block-image figcaption { margin-top: 6px; font-size: var(--hf-fs-xs); }
.hf-article-body .wp-block-gallery > figcaption { grid-column: 1 / -1; margin-top: 2px; }
@media (max-width: 560px) {
  .hf-article-body .wp-block-gallery:not(.columns-1) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Embed (YouTube): reserved 16:9 box, so nothing shifts when the iframe loads.
   .hf-embed--video is added by honflow_render_article_body() to wrappers holding a player. */
.hf-article-body .wp-block-embed__wrapper::before { content: none; display: none; }
.hf-article-body .wp-block-embed__wrapper.hf-embed--video { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--hf-r-card); background: var(--hf-ink); }
.hf-article-body .wp-embed-aspect-4-3 .wp-block-embed__wrapper.hf-embed--video { aspect-ratio: 4 / 3; }
.hf-article-body .wp-embed-aspect-1-1 .wp-block-embed__wrapper.hf-embed--video { aspect-ratio: 1 / 1; }
.hf-article-body .wp-embed-aspect-9-16 .wp-block-embed__wrapper.hf-embed--video { aspect-ratio: 9 / 16; max-width: 420px; }
.hf-article-body .wp-embed-aspect-21-9 .wp-block-embed__wrapper.hf-embed--video { aspect-ratio: 21 / 9; }
.hf-article-body .wp-block-embed__wrapper > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hf-article-body .wp-block-embed__wrapper { overflow-wrap: anywhere; }

/* File download */
.hf-article-body .wp-block-file { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 18px 20px; border: 1px solid var(--hf-line); border-radius: var(--hf-r-card); background: var(--hf-wash); }
.hf-article-body .wp-block-file > a:not(.wp-block-file__button) { min-width: 0; overflow-wrap: anywhere; }
.hf-article-body .wp-block-file__embed { flex-basis: 100%; width: 100%; border: 1px solid var(--hf-line); border-radius: var(--hf-r-control); }
.hf-article-body a.wp-block-file__button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: var(--hf-r-pill); background: var(--hf-ink); color: #fff; font-size: var(--hf-fs-small); font-weight: 700; text-decoration: none; transition: background-color var(--hf-dur) var(--hf-ease), color var(--hf-dur) var(--hf-ease); }
.hf-article-body a.wp-block-file__button:hover { background: var(--hf-orange-3); color: var(--hf-ink); }

/* Quote */
.hf-article-body .wp-block-quote { margin-block: 2em; }
.hf-article-body .wp-block-quote > * { margin: 0; }
.hf-article-body .wp-block-quote > * + * { margin-top: 0.6em; }
.hf-article-body .wp-block-quote cite { display: block; margin-top: 14px; font-family: var(--hf-font); font-size: var(--hf-fs-small); font-style: normal; font-weight: 700; line-height: 1.5; color: var(--hf-muted); }
.hf-article-body .wp-block-quote cite::before { content: '— '; color: var(--hf-orange); }

/* Separator */
.hf-article-body hr, .hf-article-body .wp-block-separator { height: 0; margin-block: 2.5em; border: 0; border-top: 1px solid var(--hf-line-strong); background: none; opacity: 1; }
.hf-article-body .wp-block-separator.is-style-dots { border: 0; height: auto; text-align: center; line-height: 1; }
.hf-article-body .wp-block-separator.is-style-dots::before { content: '\00b7 \00b7 \00b7'; color: var(--hf-orange); font-size: 1.75em; letter-spacing: 1em; padding-left: 1em; }
.hf-case-hero-img { margin: 0 auto clamp(32px, 5vw, 64px); max-width: 1000px; }
.hf-case-hero-img img { border-radius: var(--hf-r-panel); }

/* ==========================================================================
   Case studies archive (block template)
   ========================================================================== */
.hf-case-grid { gap: var(--hf-gutter) !important; }
.hf-case-card { display: grid; grid-template-rows: auto 1fr; border-radius: var(--hf-r-panel); background: var(--hf-white); overflow: hidden; transition: transform 0.6s var(--hf-ease), box-shadow 0.6s var(--hf-ease); }
.hf-case-card:hover { transform: translateY(-6px); box-shadow: var(--hf-shadow-lift); }
.hf-case-card__media { margin: 0; background: var(--hf-ink); }
.hf-case-card__media img { width: 100%; height: 100%; object-fit: cover; }
.hf-case-card__body { display: grid; gap: 14px; align-content: start; justify-items: start; padding: clamp(24px, 2.6vw, 36px); }
.hf-case-card__body > * { margin: 0; }
.hf-case-card__body .wp-block-post-terms a { color: var(--hf-ink); }
.hf-case-card__title a { color: var(--hf-ink); }
.hf-case-card__excerpt { color: var(--hf-muted); font-size: var(--hf-fs-small); }
.hf-case-card__body .wp-block-read-more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: var(--hf-fs-small); text-decoration: underline; text-decoration-color: var(--hf-orange); text-underline-offset: 5px; }
.hf-pagination { margin-top: 48px; gap: 8px; }
.hf-pagination a, .hf-pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 14px; border-radius: var(--hf-r-pill); font-weight: 700; }
.hf-pagination .page-numbers.current { background: var(--hf-ink); color: #fff; }
.wp-block-post-featured-image.hf-case-card__media:empty { display: none; }

/* ==========================================================================
   Contact page
   ========================================================================== */
.hf-quick { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.hf-quick__item { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px 0 16px; border: 1px solid var(--hf-line-strong); border-radius: var(--hf-r-pill); background: rgba(255, 255, 255, 0.7); font-size: var(--hf-fs-small); font-weight: 700; transition: background-color 0.3s var(--hf-ease), color 0.3s var(--hf-ease), border-color 0.3s var(--hf-ease); }
.hf-quick__item svg { width: 18px; height: 18px; color: var(--hf-orange); transition: color 0.3s var(--hf-ease); }
.hf-quick__item:hover { background: var(--hf-ink); color: #fff; border-color: var(--hf-ink); }
.hf-quick__item:hover svg { color: var(--hf-orange-3); }
@media (max-width: 860px) { .hf-quick { justify-content: flex-start; } }
.hf-map__frame { height: clamp(320px, 38vw, 460px); border-radius: var(--hf-r-panel); overflow: hidden; background: var(--hf-canvas); border: 1px solid var(--hf-line); }
.hf-map__frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ==========================================================================
   Privacy
   ========================================================================== */
.hf-toc__title { font-size: var(--hf-fs-xs); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hf-muted); margin-bottom: 12px; }
html[lang^="th"] .hf-toc__title { letter-spacing: 0.02em; text-transform: none; font-size: var(--hf-fs-small); }
.hf-toc ol { display: grid; border-top: 1px solid var(--hf-line-strong); }
.hf-toc a { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: baseline; min-height: 48px; padding: 10px 0; border-bottom: 1px solid var(--hf-line-strong); font-size: var(--hf-fs-small); font-weight: 600; line-height: 1.5; transition: padding-left 0.4s var(--hf-ease), color 0.3s var(--hf-ease); }
.hf-toc a .hf-num { font-size: var(--hf-fs-xs); color: var(--hf-orange); }
.hf-toc a:hover { padding-left: 8px; }
.hf-toc a.is-current { padding-left: 8px; background: linear-gradient(90deg, var(--hf-wash-strong), transparent); }
.hf-privacy__sec { position: relative; scroll-margin-top: 112px; display: grid; gap: 14px; padding: clamp(28px, 3vw, 44px) 0; border-top: 1px solid var(--hf-line-strong); }
.hf-privacy__sec:first-child { border-top: 2px solid var(--hf-ink); }
.hf-privacy__num { font-size: 1.125rem; color: var(--hf-orange); }
.hf-privacy__text { display: grid; gap: 1em; color: var(--hf-ink-soft); line-height: 1.9; max-width: 72ch; }
.hf-privacy__text ul { display: grid; gap: 0.5em; }
.hf-privacy__text li { position: relative; padding-left: 1.6em; }
.hf-privacy__text li::before { content: ''; position: absolute; left: 0.15em; top: 0.85em; width: 7px; height: 7px; border-radius: 2px; background: var(--hf-orange); transform: rotate(45deg); }

/* ==========================================================================
   404
   ========================================================================== */
.hf-404__inner { justify-items: center; text-align: center; gap: clamp(20px, 2.4vw, 32px); }
.hf-404__inner .hf-lead { margin-inline: auto; margin-bottom: 12px; }
.hf-404__code { display: flex; align-items: center; justify-content: center; font-size: clamp(7rem, 24vw, 17rem); line-height: 0.95; letter-spacing: -0.03em; }
.hf-404__zero { display: inline-grid; place-items: center; width: 0.78em; margin: 0 0.04em; }
.hf-404__zero img { width: 0.62em; height: auto; transform-origin: 50% 60%; animation: hf-wobble 5s var(--hf-ease) infinite; }
@keyframes hf-wobble { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.hf-404__ctas { justify-content: center; }
.hf-404__quick { display: grid; gap: 16px; justify-items: center; margin-top: clamp(24px, 4vw, 48px); padding-top: clamp(24px, 4vw, 40px); border-top: 1px solid var(--hf-line-strong); width: 100%; max-width: 760px; }
.hf-404__quick .hf-tags { justify-content: center; }
.hf-tag--link { min-height: 44px; padding: 8px 20px; font-size: var(--hf-fs-small); font-weight: 700; transition: background-color 0.3s var(--hf-ease), color 0.3s var(--hf-ease); }
.hf-tag--link:hover { background: var(--hf-orange-3); color: var(--hf-ink); }

/* Lead magnet */
.hf-lead-magnet__form { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 620px; margin: 0 auto 12px; }
.hf-lead-magnet__form .hf-input { flex: 1 1 260px; border-radius: var(--hf-r-pill); padding-inline: 24px; }
.hf-lead-magnet__note { text-align: center; font-size: var(--hf-fs-xs); color: var(--hf-muted); }

/* Responsive consolidation (keep last) */
@media (max-width: 960px) {
  .hf-split, .hf-split--toc, .hf-art-body__grid, .hf-svc-hero__inner, .hf-whatis__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   Service-specific visuals and sections (iteration 002)
   ========================================================================== */
.hf-svc-hero__note { display: flex; gap: 10px; align-items: flex-start; max-width: 560px; font-size: var(--hf-fs-small); color: var(--hf-muted); line-height: 1.7; }
.hf-svc-hero__note svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--hf-ink); }
.hf-svc-hero__media { min-width: 0; }

.hf-viz { position: relative; display: grid; gap: 22px; padding: clamp(22px, 2.6vw, 36px); border-radius: var(--hf-r-panel); background: var(--hf-white); border: 1px solid var(--hf-line); box-shadow: var(--hf-shadow-lift); }
.hf-viz__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.hf-viz__title { font-family: var(--hf-font-display); font-size: 1.25rem; line-height: 1.3; }
.hf-viz__ring { position: relative; display: grid; place-items: center; justify-self: center; width: 168px; height: 168px; }
.hf-viz__ring svg { position: absolute; inset: 0; }
.hf-viz__ring-val { position: relative; font-size: 3rem; letter-spacing: -0.03em; }
.hf-viz__ring-val small { font-size: 0.45em; color: var(--hf-orange); margin-left: 2px; }
.hf-viz__metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hf-viz__metrics li { display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--hf-canvas); }
.hf-viz__metrics strong { font-size: 1.75rem; line-height: 1.1; }
.hf-viz__metrics span { font-size: var(--hf-fs-xs); font-weight: 600; color: var(--hf-muted); line-height: 1.5; }

.hf-viz__days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.hf-viz__day { display: grid; gap: 2px; justify-items: center; padding: 14px 6px; border-radius: 16px; background: var(--hf-canvas); border: 1px solid var(--hf-line); }
.hf-viz__day span { font-size: var(--hf-fs-xs); font-weight: 700; color: var(--hf-muted); }
.hf-viz__day b { font-size: 1.75rem; line-height: 1.1; }
.hf-viz__day.is-last { background: var(--hf-ink); border-color: var(--hf-ink); color: #fff; }
.hf-viz__day.is-last span { color: var(--hf-on-dark-muted); }
.hf-viz__track { height: 8px; border-radius: 8px; background: var(--hf-line); overflow: hidden; }
.hf-viz__track span { display: block; height: 100%; border-radius: 8px; background: var(--hf-gradient); transform-origin: 0 50%; transform: scaleX(var(--w, 1)); }
.hf-viz__steps { display: grid; gap: 12px; }
.hf-viz__steps li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; font-size: var(--hf-fs-small); font-weight: 600; line-height: 1.6; }
.hf-viz__steps svg { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--hf-orange-3); color: var(--hf-ink); margin-top: 1px; }

.hf-doc { position: relative; display: grid; gap: 18px; padding: 24px 24px 28px; border-radius: 18px; background: var(--hf-canvas); border: 1.5px dashed var(--hf-line-strong); overflow: hidden; }
.hf-doc__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--hf-line-strong); }
.hf-doc__title { font-family: var(--hf-font-display); font-size: 1.0625rem; line-height: 1.45; max-width: 18em; }
.hf-doc__no { padding: 3px 12px; border-radius: var(--hf-r-pill); background: var(--hf-ink); color: #fff; font-size: var(--hf-fs-xs); font-weight: 800; white-space: nowrap; }
.hf-doc__rows { display: grid; gap: 14px; }
.hf-doc__rows > div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 16px; align-items: center; font-size: var(--hf-fs-xs); font-weight: 700; color: var(--hf-muted); }
.hf-doc__rows i { display: block; height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--hf-line-strong) var(--w), transparent var(--w)); }
.hf-doc__stamp { justify-self: end; padding: 6px 16px; border: 2px solid var(--hf-orange); border-radius: 10px; color: var(--hf-ink); background: var(--hf-wash); font-family: var(--hf-font-display); font-size: 1rem; transform: rotate(-6deg); }

/* Scope variants */
.hf-scope--peo .hf-scope__grid { grid-template-columns: 1fr; border-top: 2px solid var(--hf-ink); }
.hf-scope--peo .hf-scope__item { grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1.2fr); align-items: baseline; gap: 8px 24px; border-bottom: 1px solid var(--hf-line-strong); }
.hf-scope--peo .hf-scope__num { color: var(--hf-ink); }
.hf-scope--peo .hf-scope__desc { color: var(--hf-muted); }
.hf-scope--peo .hf-section-head .hf-lead, .hf-scope--cor .hf-lead { color: var(--hf-muted); }
.hf-scope--eor .hf-scope__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 0; border-top: 0; }
.hf-scope--eor .hf-scope__item { padding: 28px 24px 0 0; margin-right: 24px; border-bottom: 0; border-top: 2px solid var(--hf-orange-3); }
.hf-scope--eor .hf-scope__num { font-size: clamp(2.25rem, 1.8rem + 1.6vw, 3.25rem); line-height: 1; }
.hf-scope--cor .hf-scope__grid { border-top: 0; gap: 14px; column-gap: 14px; }
.hf-scope--cor .hf-scope__item { grid-template-columns: 40px minmax(0, 1fr); column-gap: 18px; padding: 24px 28px; border: 1.5px dashed var(--hf-line-strong); border-radius: 20px; background: var(--hf-canvas); }
.hf-scope--cor .hf-scope__num { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--hf-orange-3); color: var(--hf-ink); }
.hf-scope--cor .hf-scope__num svg { width: 22px; height: 22px; }
.hf-scope--cor .hf-scope__desc { color: var(--hf-muted); }
@media (max-width: 960px) {
  .hf-scope--eor .hf-scope__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hf-scope--peo .hf-scope__item { grid-template-columns: 56px minmax(0, 1fr); }
  .hf-scope--peo .hf-scope__desc { grid-column: 2; }
}
@media (max-width: 560px) {
  .hf-scope--eor .hf-scope__grid { grid-template-columns: 1fr; }
  .hf-viz__metrics { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .hf-viz__metrics li { padding: 12px 10px; }
  .hf-viz__metrics strong { font-size: 1.375rem; }
  .hf-doc__rows > div { grid-template-columns: 1fr; gap: 6px; }
}
.hf-ind__link.is-current { border-color: var(--hf-orange); background: var(--hf-wash); }

.hf-contact--compact .hf-panel__inner { padding-top: clamp(24px, 3vw, 48px); }

/* Case studies proof grid */
.hf-cs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--hf-gutter); }
.hf-cs-card { display: grid; grid-template-rows: auto 1fr; border-radius: var(--hf-r-panel); background: var(--hf-white); overflow: hidden; transition: transform 0.6s var(--hf-ease), box-shadow 0.6s var(--hf-ease); }
.hf-cs-card:hover { transform: translateY(-6px); box-shadow: var(--hf-shadow-lift); }
.hf-cs-card.is-feature { grid-column: 1 / -1; grid-template-rows: none; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.hf-cs-card__metric { position: relative; isolation: isolate; display: grid; align-content: space-between; gap: 12px; min-height: 240px; padding: clamp(22px, 2.6vw, 36px); overflow: hidden; color: #fff; }
.hf-cs-card--ink .hf-cs-card__metric { background: var(--hf-ink); }
.hf-cs-card--orange .hf-cs-card__metric { background: var(--hf-gradient); color: var(--hf-ink); }
.hf-cs-card--tint .hf-cs-card__metric { background: var(--hf-wash-strong); color: var(--hf-ink); }
.hf-cs-card__metric > img:not(.hf-cs-card__mark) { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: 0.35; mix-blend-mode: luminosity; }
.hf-cs-card__label { justify-self: start; padding: 4px 14px; border-radius: var(--hf-r-pill); background: rgba(255, 255, 255, 0.9); color: var(--hf-ink); font-size: var(--hf-fs-xs); font-weight: 800; }
.hf-cs-card__num { font-size: clamp(3.5rem, 2.4rem + 4vw, 6.5rem); line-height: 0.95; letter-spacing: -0.03em; }
.hf-cs-card__mark { position: absolute; z-index: -1; right: 24px; top: 24px; width: 44px; height: auto; }
.hf-cs-card--orange .hf-cs-card__mark { filter: brightness(0); opacity: 0.8; }
.hf-cs-card__body { display: grid; gap: 14px; align-content: center; justify-items: start; padding: clamp(24px, 2.6vw, 40px); }
.hf-cs-card__title a { background: linear-gradient(var(--hf-orange), var(--hf-orange)) 0 100% / 0 2px no-repeat; transition: background-size 0.6s var(--hf-ease); }
.hf-cs-card__title a:hover { background-size: 100% 2px; }
.hf-cs-card__excerpt { color: var(--hf-muted); font-size: var(--hf-fs-small); line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hf-case-cta { margin-top: 48px; text-align: center; }
@media (max-width: 860px) {
  .hf-cs-grid { grid-template-columns: minmax(0, 1fr); }
  .hf-cs-card.is-feature { grid-template-columns: minmax(0, 1fr); }
}
.hf-cover--wide { aspect-ratio: auto; min-height: clamp(150px, 16vw, 220px); margin-bottom: clamp(32px, 4vw, 56px); border-radius: var(--hf-r-card); grid-template-columns: 1fr auto; align-items: end; }
.hf-cover--wide .hf-cover__cat { align-self: start; }
.hf-cover--wide .hf-cover__num { grid-column: 2; grid-row: 1 / span 2; align-self: end; }

/* ==========================================================================
   Iteration 003: per-service sections
   ========================================================================== */
.hf-svc-hero__pre { display: block; font-family: var(--hf-font); font-size: 0.32em; font-weight: 700; color: var(--hf-ink); letter-spacing: 0; line-height: 1.2; margin-bottom: 4px; }
.hf-svc-hero__stat-num { display: block; }
.hf-svc-hero__stat { align-items: flex-end; }

/* EOR flow diagram */
.hf-flow { aspect-ratio: auto !important; max-height: none !important; display: grid; gap: 0; padding: clamp(22px, 2.6vw, 36px) !important; align-items: stretch !important; justify-content: stretch !important; overflow: visible !important; background: var(--hf-white); }
.hf-flow__node { display: grid; gap: 4px; justify-items: start; padding: 20px 22px; border-radius: 20px; background: var(--hf-canvas); border: 1px solid var(--hf-line); }
.hf-flow__node.is-hon { background: var(--hf-ink); color: #fff; border-color: var(--hf-ink); }
.hf-flow__node b { font-family: var(--hf-font-display); font-weight: 400; font-size: 1.25rem; line-height: 1.4; }
.hf-flow__node small { font-size: var(--hf-fs-small); color: var(--hf-muted); line-height: 1.6; }
.hf-flow__node.is-hon small { color: var(--hf-on-dark-muted); }
.hf-flow__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--hf-orange-3); color: var(--hf-ink); margin-bottom: 6px; }
.hf-flow__icon svg { width: 22px; height: 22px; }
.hf-flow__node.is-hon img { width: 40px; height: auto; margin-bottom: 6px; }
.hf-flow__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hf-flow__tags li { padding: 3px 12px; border-radius: var(--hf-r-pill); background: rgba(255, 255, 255, 0.12); font-size: var(--hf-fs-xs); font-weight: 700; }
.hf-flow__link { position: relative; display: grid; place-items: center; min-height: 56px; }
.hf-flow__link::before { content: ''; position: absolute; top: 6px; bottom: 6px; left: 50%; width: 0; border-left: 2px dashed var(--hf-orange); }
.hf-flow__link span { position: relative; padding: 3px 12px; border-radius: var(--hf-r-pill); background: var(--hf-white); border: 1px solid var(--hf-line-strong); font-size: var(--hf-fs-xs); font-weight: 700; }

/* Outsourcing role families */
.hf-roles__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); }
.hf-roles__col { padding: clamp(24px, 3vw, 44px); border-radius: var(--hf-r-panel); background: var(--hf-white); border: 1px solid var(--hf-line); display: grid; gap: 24px; align-content: start; }
.hf-roles__col.is-ink { background: var(--hf-ink); color: #fff; border-color: var(--hf-ink); }
.hf-roles__col header { display: grid; gap: 4px; padding-bottom: 20px; border-bottom: 1px solid var(--hf-line-strong); }
.hf-roles__col.is-ink header { border-color: var(--hf-line-on-dark); }
.hf-roles__tag { font-family: var(--hf-font-display); font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.2; }
.hf-roles__sub { font-size: var(--hf-fs-small); font-weight: 600; color: var(--hf-muted); }
.hf-roles__col.is-ink .hf-roles__sub { color: var(--hf-on-dark-muted); }
.hf-roles__col ul { display: grid; gap: 12px; }
.hf-roles__col li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; font-weight: 600; line-height: 1.6; }
.hf-roles__col li svg { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--hf-orange-3); color: var(--hf-ink); margin-top: 1px; }
@media (max-width: 760px) { .hf-roles__grid { grid-template-columns: minmax(0, 1fr); } }

/* PEO hero: employer and HR partnership, using the shared service visual shell. */
.hf-viz--peo { gap: 0; }
.hf-viz--peo > .hf-viz__head { margin-bottom: 24px; }
.hf-peo__company { display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--hf-line); border-radius: 18px; background: var(--hf-canvas); }
.hf-peo__icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--hf-white); border: 1px solid var(--hf-line-strong); }
.hf-peo__icon svg { width: 24px; height: 24px; }
.hf-peo__company-title { font-size: var(--hf-fs-small); font-weight: 700; line-height: 1.6; overflow-wrap: anywhere; }
.hf-peo__link { position: relative; display: grid; place-items: center; height: 48px; }
.hf-peo__link::before { content: ''; position: absolute; inset-block: 0; left: 50%; border-left: 2px dashed var(--hf-orange); }
.hf-peo__link > span { position: relative; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--hf-orange-3); color: var(--hf-ink); }
.hf-peo__link svg { width: 16px; height: 16px; }
.hf-peo__hr { padding: 24px; border-radius: 18px; background: var(--hf-ink); color: var(--hf-white); }
.hf-peo__head { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--hf-line-on-dark); margin-bottom: 20px; }
.hf-peo__head img { flex: none; width: 32px; height: auto; }
.hf-peo__hr .hf-viz__steps { gap: 16px; }
@media (max-width: 480px) {
  .hf-peo__company { gap: 12px; padding: 16px; }
  .hf-peo__hr { padding: 20px 16px; }
}

/* PEO who does what */
.hf-who { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: clamp(12px, 2vw, 28px); align-items: stretch; }
.hf-who__col { padding: clamp(24px, 3vw, 44px); border-radius: var(--hf-r-panel); border: 1.5px dashed var(--hf-line-on-dark); display: grid; gap: 20px; align-content: start; }
.hf-who__col h3 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); }
.hf-who__col ul { display: grid; gap: 0; }
.hf-who__col li { padding: 14px 0; border-top: 1px solid var(--hf-line-on-dark); font-weight: 600; line-height: 1.6; }
.hf-who__col.is-hon { background: var(--hf-gradient); color: var(--hf-ink); border: 0; }
.hf-who__col.is-hon li { border-color: rgba(38, 38, 38, 0.22); }
.hf-who__bridge { display: grid; place-items: center; width: 56px; align-self: center; height: 56px; border-radius: 50%; background: #fff; color: var(--hf-ink); }
.hf-who__bridge svg { width: 24px; height: 24px; }
@media (max-width: 860px) { .hf-who { grid-template-columns: minmax(0, 1fr); } .hf-who__bridge { justify-self: center; transform: rotate(90deg); } }

/* COR reclassification risk */
.hf-risk__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--hf-line-on-dark); }
.hf-risk__item { display: grid; gap: 10px; align-content: start; padding: clamp(24px, 3vw, 40px) clamp(16px, 2.4vw, 32px) 0 0; margin-right: clamp(16px, 2.4vw, 32px); border-right: 1px solid var(--hf-line-on-dark); }
.hf-risk__item:last-child { border-right: 0; margin-right: 0; }
.hf-risk__num { font-size: clamp(3rem, 2rem + 3.4vw, 5.5rem); line-height: 1; color: var(--hf-orange-3); letter-spacing: -0.03em; }
.hf-risk__item h3 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem); }
.hf-risk__item p { color: var(--hf-on-dark-muted); font-size: var(--hf-fs-small); }
.hf-risk__foot { display: flex; gap: 12px; align-items: flex-start; margin-top: clamp(32px, 4vw, 56px); padding: 18px 22px; border-radius: 18px; background: rgba(255, 255, 255, 0.07); font-weight: 600; }
.hf-risk__foot svg { width: 24px; height: 24px; flex: none; color: var(--hf-orange-3); margin-top: 2px; }
@media (max-width: 860px) {
  .hf-risk__grid { grid-template-columns: minmax(0, 1fr); }
  .hf-risk__item { margin-right: 0; padding: 24px 0; border-right: 0; border-bottom: 1px solid var(--hf-line-on-dark); }
}

/* COR/benefits split heading must never run into the list */
.hf-split__side { min-width: 0; }
.hf-split__side .hf-h2 { overflow-wrap: break-word; }
.hf-contact__value, .hf-contact__label { overflow-wrap: anywhere; }
.hf-svc-hero__stat--doc .hf-svc-hero__stat-num { font-size: clamp(2rem, 1.5rem + 1.6vw, 3rem); }
.hf-viz--eor { overflow: hidden; }
.hf-viz--eor .hf-viz__steps li { padding: 14px 0; border-top: 1px solid var(--hf-line); font-size: 1rem; }
.hf-viz__mark { position: absolute; right: -14px; bottom: -14px; width: 120px; height: auto; opacity: 0.08; pointer-events: none; }

/* EOR hero: compact 3-node line */
.hf-eorline { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px 0 4px; }
.hf-eorline::before { content: ''; position: absolute; left: 16%; right: 16%; top: 38px; border-top: 2px dashed var(--hf-orange); }
.hf-eorline__node { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; }
.hf-eorline__node b { font-family: var(--hf-font-display); font-weight: 400; font-size: 1rem; line-height: 1.35; }
.hf-eorline__dot { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--hf-white); border: 2px solid var(--hf-ink); color: var(--hf-ink); }
.hf-eorline__dot svg { width: 26px; height: 26px; }
.hf-eorline__node.is-hon .hf-eorline__dot { background: var(--hf-ink); border-color: var(--hf-ink); width: 68px; height: 68px; margin-top: -4px; }
.hf-eorline__node.is-hon .hf-eorline__dot img { width: 32px; height: auto; }
.hf-viz--eor .hf-viz__steps { margin-top: 8px; }

/* EOR hero stat: brand check mark in the number slot (same box as the figures on the other services) */
.hf-svc-hero__mark { display: inline-grid; place-items: center; width: 0.95em; height: 1em; }
.hf-svc-hero__mark svg { width: 100%; height: 100%; padding: 0.16em; border-radius: 50%; background: var(--hf-gradient); color: #fff; stroke-width: 2.4; }
.hf-svc-hero__stat-bold { display: block; font-family: var(--hf-font-display); font-weight: 400; font-size: 1.125rem; line-height: 1.4; color: var(--hf-ink); }
