/* =====================================================================
   Hypogen v2 — content pages (services, integrations, case studies,
   company pages, contact). Builds on hgv2.css tokens and components.

   Signature: the "./connect" terminal spec card in the hero — the same
   `$ ./connect` voice as the home hero, showing the page's path and the
   real delivery process. Everything else stays quiet: one orange CTA
   band per page, a sticky "On this page" rail, card-grid feature lists.
   ===================================================================== */

.hgc { --hgc-ok: #3DDC97; --hgc-rail: 232px; --hgc-measure: 760px; }

/* ---------- Hero ---------- */
.hgc-hero { position: relative; padding-top: clamp(24px, 4vw, 48px); padding-bottom: clamp(8px, 2vw, 24px); isolation: isolate; }
.hgc-hero::before {
    content: ""; position: absolute; inset: -96px 0 -40px; z-index: -1; pointer-events: none;
    background-image: radial-gradient(rgba(247, 247, 247, .09) 1px, transparent 1.2px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 60% 70% at 78% 35%, #000 0%, transparent 72%);
    mask-image: radial-gradient(ellipse 60% 70% at 78% 35%, #000 0%, transparent 72%);
}
.hgc-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px 72px; align-items: center; }
.hgc-hero--spec .hgc-hero__grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
.hgc-hero__head { gap: 22px; max-width: 900px; }
.hgc-hero__title { font-size: clamp(40px, 5.4vw, 74px); line-height: 1.03; font-weight: 500; letter-spacing: -.035em; text-wrap: balance; }
.hgc-hero--spec .hgc-hero__title { font-size: clamp(38px, 4.6vw, 64px); }
.hgc-hero__lead { font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; color: var(--hg-muted); max-width: 680px; text-wrap: pretty; }
.hgc-hero__chip { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--hg-muted); }
.hgc-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--hg-accent); box-shadow: 0 0 0 4px var(--hg-accent-soft); flex: none; }

/* ---------- Signature: ./connect spec card ---------- */
.hgc-spec {
    font-family: var(--hg-mono); font-size: 13px; line-height: 1.5; color: var(--hg-text);
    background: linear-gradient(180deg, #111418, #0C0F12); border: 1px solid var(--hg-line-2); border-radius: 18px;
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 150, 38, .04), inset 0 1px 0 rgba(255, 255, 255, .05);
    overflow: hidden; position: relative;
}
.hgc-spec::after { content: ""; position: absolute; inset: auto -20% -60% 30%; height: 80%; background: radial-gradient(closest-side, rgba(255, 150, 38, .14), transparent); pointer-events: none; }
.hgc-spec__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--hg-line); background: rgba(247, 247, 247, .02); }
.hgc-spec__bar span { width: 9px; height: 9px; border-radius: 999px; background: var(--hg-surface-3); }
.hgc-spec__bar em { margin-left: 10px; font-style: normal; font-size: 12px; color: var(--hg-muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hgc-spec__body { position: relative; z-index: 1; padding: 20px 22px 18px; display: flex; flex-direction: column; gap: 16px; }
.hgc-spec__cmd { color: var(--hg-text); word-break: break-word; }
.hgc-spec__cmd b { color: var(--hg-accent); font-weight: 500; margin-right: 4px; }
.hgc-spec__flow { display: flex; align-items: center; gap: 0; font-size: 12px; }
.hgc-spec__flow span { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--hg-line-2); background: var(--hg-surface-2); color: var(--hg-text); white-space: nowrap; }
.hgc-spec__flow span.is-core { border-color: var(--hg-accent-line); color: var(--hg-accent-2); background: var(--hg-accent-soft); }
.hgc-spec__flow i { flex: 1; min-width: 18px; height: 1px; background: repeating-linear-gradient(90deg, var(--hg-accent) 0 6px, transparent 6px 11px); background-size: 22px 1px; animation: hgc-flow 1.2s linear infinite; opacity: .7; }
@keyframes hgc-flow { to { background-position: 22px 0; } }
.hgc-spec__steps { display: flex; flex-direction: column; gap: 2px; border-top: 1px dashed var(--hg-line-2); padding-top: 12px; }
.hgc-spec__steps li { display: grid; grid-template-columns: 18px 78px 96px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 6px 0; opacity: 0; animation: hgc-line .5s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--i) * 140ms + 180ms); }
@keyframes hgc-line { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.hgc-spec__ok { color: var(--hgc-ok); }
.hgc-spec__k { color: var(--hg-muted); }
.hgc-spec__v { color: var(--hg-accent-2); }
.hgc-spec__note { color: var(--hg-muted-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hgc-spec__live { display: flex; align-items: center; gap: 10px; color: var(--hg-muted); font-size: 12px; opacity: 0; animation: hgc-line .5s ease forwards; animation-delay: 900ms; }
.hgc-spec__pulse { width: 8px; height: 8px; border-radius: 999px; background: var(--hgc-ok); box-shadow: 0 0 0 0 rgba(61, 220, 151, .5); animation: hgc-pulse 2.2s ease-out infinite; }
@keyframes hgc-pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, .45); } 70%, 100% { box-shadow: 0 0 0 9px rgba(61, 220, 151, 0); } }
.hgc-spec__caret { color: var(--hg-accent); animation: hgc-blink 1.1s steps(1) infinite; }
@keyframes hgc-blink { 50% { opacity: 0; } }

/* ---------- Breadcrumbs ---------- */
.hgc-crumbs { margin-bottom: clamp(28px, 4vw, 52px); }
.hgc-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 10px; list-style: none; font-size: 13px; color: var(--hg-muted-2); }
.hgc-crumbs li { display: inline-flex; align-items: center; gap: 10px; }
.hgc-crumbs li + li::before { content: "/"; opacity: .5; }
.hgc-crumbs a { color: var(--hg-muted); transition: color .2s; }
.hgc-crumbs a:hover { color: var(--hg-accent); }
.hgc-crumbs [aria-current] { color: var(--hg-text); }

/* ---------- Placeholders ---------- */
.hgv2 mark.hgc-todo { background: rgba(255, 196, 0, .14); color: #FFD166; border: 1px dashed rgba(255, 196, 0, .5); border-radius: 6px; padding: 0 5px; font-family: var(--hg-mono); font-size: .8em; white-space: normal; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---------- Sections (Academy Smart structure): split head + body by content type ---------- */
.hgc-intro .hgc-answer { max-width: 1000px; }
.hgc-sec__head { margin: 0; }
.hgc-sec__head.hgv2-split { align-items: end; }
.hgc-sec__head .hgv2-h2 { max-width: 760px; }
.hgc-sec__head .hgv2-lead { max-width: 560px; }
.hgc-sec--answer .hgc-answer { max-width: 1000px; }

/* ---------- Prose (Gutenberg body) ---------- */
.hgc-prose { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hgc-sec__body > p, .hgc-sec__body > h3, .hgc-sec__body > .wp-block-quote, .hgc-sec__body > pre { max-width: 820px; }
/* Plain bullet lists in a section → two-column checklist */
.hgc-sec__body > ul:not(.hgc-features) { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px 40px; }
.hgc-sec__body > ul:not(.hgc-features) > li { padding: 0 0 14px 30px; border-bottom: 1px solid var(--hg-line); }
.hgc-sec__body > ul:not(.hgc-features) > li::before { content: "✓"; top: 0; left: 0; width: auto; height: auto; background: none; color: var(--hg-accent); font-size: 15px; line-height: inherit; }
.hgc-prose h2 { font-size: clamp(22px, 2vw, 28px); line-height: 1.2; font-weight: 500; letter-spacing: -.02em; color: var(--hg-text); }
.hgc-prose h3 { font-size: 20px; line-height: 1.3; font-weight: 500; color: var(--hg-text); margin-top: 16px; }
.hgc-prose p, .hgc-prose li { font-size: 17px; line-height: 1.68; color: var(--hg-muted); text-wrap: pretty; }
.hgc-prose strong, .hgc-prose b { color: var(--hg-text); font-weight: 500; }
.hgc-prose em { color: var(--hg-text); }
.hgc-prose a, .hgc-link { color: var(--hg-accent); text-decoration: underline; text-decoration-color: var(--hg-accent-line); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.hgc-prose a:hover, .hgc-link:hover { text-decoration-color: var(--hg-accent); }
.hgc-prose code { font-family: var(--hg-mono); font-size: .86em; padding: 1px 6px; border-radius: 6px; background: var(--hg-surface-3); color: var(--hg-text); }

.hgc-prose ul { display: flex; flex-direction: column; gap: 10px; }
.hgc-prose ul > li { position: relative; padding-left: 22px; }
.hgc-prose ul > li::before { content: ""; position: absolute; left: 2px; top: .74em; width: 7px; height: 7px; border-radius: 2px; background: var(--hg-accent); }

/* Numbered lists → horizontal step row ("STEP 01" + bar), like a process */
.hgc-prose ol { counter-reset: hgc; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 28px 20px; }
.hgc-prose ol > li { counter-increment: hgc; position: relative; padding-top: 22px; border-top: 2px solid var(--hg-line-2); font-size: 15px; line-height: 1.6; }
.hgc-prose ol > li::before { content: ""; position: absolute; top: -5px; left: 0; width: 8px; height: 8px; border-radius: 2px; background: var(--hg-text); }
.hgc-prose ol > li:first-child { border-top-color: var(--hg-accent); }
.hgc-prose ol > li:first-child::before { background: var(--hg-accent); }
.hgc-prose ol > li::after { content: "STEP " counter(hgc, decimal-leading-zero); position: absolute; top: 18px; right: 0; font-family: var(--hg-mono); font-size: 11px; letter-spacing: .08em; color: var(--hg-muted-2); }
.hgc-prose ol > li > strong:first-child { display: block; margin: 10px 0 6px; padding-right: 64px; font-size: 18px; line-height: 1.3; letter-spacing: -.01em; }

/* Bold-lead lists and paragraph runs → card grid */
.hgc-prose ul.hgc-features, .hgc-prose .hgc-pcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.hgc-prose ul.hgc-features > li, .hgc-prose .hgc-pcards > p { padding: clamp(22px, 2.2vw, 28px); border-radius: var(--hg-radius); background: var(--hg-surface); border: 1px solid var(--hg-line); font-size: 15px; line-height: 1.6; transition: border-color .25s; }
.hgv2-band__inner--raised .hgc-prose ul.hgc-features > li, .hgv2-band__inner--raised .hgc-prose .hgc-pcards > p { background: var(--hg-surface-2); }
.hgc-prose ul.hgc-features > li:hover, .hgc-prose .hgc-pcards > p:hover { border-color: var(--hg-accent-line); }
.hgc-prose ul.hgc-features > li::before, .hgc-prose .hgc-pcards > p::before { content: ""; position: static; display: block; width: 24px; height: 2px; border-radius: 2px; margin-bottom: 18px; background: var(--hg-accent); }
.hgc-prose ul.hgc-features > li:not(.is-inline) > strong:first-child, .hgc-prose .hgc-pcards > p > strong:first-child { display: block; margin-bottom: 8px; font-size: 18px; line-height: 1.35; letter-spacing: -.01em; }
.hgc-prose ul.hgc-features > li.is-inline > strong:first-child { font-size: 17px; }

/* Answer box: the direct answer that opens a page */
.hgc-updated { font-family: var(--hg-mono); font-size: 12px; color: var(--hg-muted-2); }
.hgc-answer { padding: clamp(24px, 3vw, 36px); border-radius: var(--hg-radius); background: linear-gradient(120deg, rgba(255, 150, 38, .12), rgba(255, 150, 38, .03) 60%); border: 1px solid var(--hg-accent-line); }
.hgc-answer p { font-size: clamp(17px, 1.45vw, 21px); line-height: 1.55; color: var(--hg-text); }
.hgc-answer h2 { font-size: 13px; font-family: var(--hg-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--hg-accent); }
.hgc-answer ul { margin-top: 4px; }
.hgc-answer li { font-size: 16px; color: var(--hg-text); }

/* Tables */
.hgc-prose .wp-block-table { margin: 0; overflow-x: auto; border: 1px solid var(--hg-line); border-radius: var(--hg-radius-sm); background: var(--hg-surface); -webkit-overflow-scrolling: touch; }
.hgc-prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; min-width: 560px; }
.hgc-prose .wp-block-table th, .hgc-prose .wp-block-table td, .hgc-prose th, .hgc-prose td { text-align: left; vertical-align: top; padding: 15px 20px; border: 0; border-bottom: 1px solid var(--hg-line); color: var(--hg-muted); background: none; }
.hgc-prose thead, .hgc-prose tbody, .hgc-prose tr { border: 0; }
.hgc-prose .wp-block-table thead { border-bottom: 1px solid var(--hg-line-2); }
.hgc-prose .wp-block-table th, .hgc-prose th { color: var(--hg-text); font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-family: var(--hg-mono); background: var(--hg-surface-2); }
.hgc-prose .wp-block-table tr:last-child td { border-bottom: 0; }
.hgc-prose .wp-block-table td:first-child { color: var(--hg-text); }
.hgc-prose .wp-block-table tbody tr { transition: background-color .2s; }
.hgc-prose .wp-block-table tbody tr:hover { background: rgba(247, 247, 247, .02); }

/* Quotes */
.hgc-prose .wp-block-quote { margin: 0; padding: clamp(24px, 3vw, 36px); border: 1px solid var(--hg-line); border-radius: var(--hg-radius); background: var(--hg-surface); position: relative; }
.hgc-prose .wp-block-quote::before { content: "\201C"; position: absolute; top: 6px; right: 24px; font-size: 96px; line-height: 1; color: var(--hg-accent); opacity: .25; font-family: Georgia, serif; }
.hgc-prose .wp-block-quote p { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; color: var(--hg-text); }
.hgc-prose .wp-block-quote p + p { margin-top: 14px; font-size: 14px; color: var(--hg-muted); font-family: var(--hg-mono); }

/* Code */
.hgc-prose pre { margin: 0; padding: 20px; border-radius: var(--hg-radius-sm); background: var(--hg-surface); border: 1px solid var(--hg-line); overflow-x: auto; font-family: var(--hg-mono); font-size: 13px; line-height: 1.6; color: var(--hg-text); }
.hgc-prose pre code { background: none; padding: 0; }

/* ---------- Byline ---------- */
.hgc-byline { font-size: 14px; color: var(--hg-muted); }

/* ---------- Glossary A–Z ---------- */
.hgc-az__letters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.hgc-az__letters a { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--hg-line-2); font-family: var(--hg-mono); font-size: 14px; color: var(--hg-text); transition: border-color .2s, color .2s; }
.hgc-az__letters a:hover { border-color: var(--hg-accent); color: var(--hg-accent); }
.hgc-az { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 32px 48px; }
.hgc-az__group { scroll-margin-top: 120px; }
.hgc-az__letter { font-family: var(--hg-mono); font-size: 28px; color: var(--hg-accent); padding-bottom: 10px; border-bottom: 1px solid var(--hg-line-2); margin-bottom: 4px; }
.hgc-az ul { list-style: none; display: flex; flex-direction: column; }
.hgc-az li a { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--hg-line); transition: color .2s; }
.hgc-az li a strong { font-size: 17px; font-weight: 500; color: var(--hg-text); }
.hgc-az li a span { font-size: 14px; line-height: 1.5; color: var(--hg-muted); }
.hgc-az li a:hover strong { color: var(--hg-accent); }

/* ---------- Cards listing ---------- */
.hgc-cardgroup { padding-top: clamp(40px, 5vw, 64px); }
.hgc-cardgroup .hgv2-wrap { gap: 20px !important; }
.hgc-cardgroup__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding-bottom: 14px; border-bottom: 1px solid var(--hg-line); }
.hgc-card__stub { font-family: var(--hg-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; border: 1px dashed rgba(255, 196, 0, .5); color: #FFD166; }
.hgc-card { display: flex; flex-direction: column; gap: 12px; min-height: 100%; transition: border-color .25s, background-color .25s, transform .25s; }
.hgc-card:hover { border-color: var(--hg-accent-line); background: var(--hg-surface-2); transform: translateY(-2px); }
.hgc-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.hgc-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 13px; background: var(--hg-accent-soft); border: 1px solid var(--hg-accent-line); color: var(--hg-accent); }
.hgc-card__more { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 12px; font-size: 14px; color: var(--hg-accent); }
.hgc-card__more .hgv2-btn__icon { width: 30px; height: 30px; background: var(--hg-accent-soft); color: var(--hg-accent); transition: transform .2s; }
.hgc-card:hover .hgc-card__more .hgv2-btn__icon { transform: rotate(45deg); }

/* ---------- FAQ ---------- */
.hgc-faq { display: grid !important; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 32px clamp(40px, 6vw, 104px); align-items: start; }
.hgc-faq__head { position: sticky; top: 116px; gap: 14px; }
.hgc-faq__groups { display: flex; flex-direction: column; gap: 36px; min-width: 0; }
.hgc-faq__group { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 120px; }
.hgc-faq__group-title { margin-bottom: 4px; font-family: var(--hg-mono); font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--hg-accent); }
.hgc-acc summary { min-height: 44px; }
.hgc-acc .hgv2-rich p { font-size: 16px; }
@media (max-width: 900px) { .hgc-faq { grid-template-columns: 1fr; } .hgc-faq__head { position: static; } }

/* ---------- CTA band (one per page; the footer CTA is hidden on these pages) ---------- */
.hgc-cta { background: linear-gradient(115deg, #FF9626 0%, #FF7A12 55%, #F2541B 100%); color: #0B0D0F; border: 0; }
.hgc-cta::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(11, 13, 15, .14) 1px, transparent 1.2px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000); mask-image: linear-gradient(90deg, transparent 40%, #000); pointer-events: none; }
.hgc-cta .hgv2-wrap { position: relative; }
.hgc-cta__grid { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 48px; align-items: end; }
.hgc-cta .hgv2-h2 { color: #0B0D0F; max-width: 820px; }
.hgc-cta .hgv2-lead { color: rgba(11, 13, 15, .74); }
.hgc-cta__side { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hgc-cta__mail { font-size: 14px; color: rgba(11, 13, 15, .78); text-decoration: underline; text-underline-offset: 3px; }
.hgc-cta__mail:hover { color: #0B0D0F; }
@media (max-width: 760px) { .hgc-cta__grid { grid-template-columns: 1fr; } }

/* ---------- Contact: form | context ---------- */
.hgc-contact { display: grid !important; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px clamp(32px, 5vw, 80px); align-items: start; }
.hgc-contact__aside { position: sticky; top: 116px; gap: 40px; }
.hgc-prose--aside h2 { font-size: 22px; }
.hgc-prose--aside p, .hgc-prose--aside li { font-size: 15px; }
.hgc-prose--aside ul.hgc-features, .hgc-prose--aside .hgc-pcards, .hgc-prose--aside ol { grid-template-columns: 1fr; }
@media (max-width: 980px) { .hgc-contact { grid-template-columns: 1fr; } .hgc-contact__aside { position: static; } }

/* ---------- Contact form ---------- */
.hgc-form { display: flex; flex-direction: column; gap: 26px; }
.hgc-form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 16px; }
.hgc-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; border: 0; margin: 0; padding: 0; position: relative; }
.hgc-field > span, .hgc-field > legend { font-size: 14px; font-weight: 500; color: var(--hg-text); padding: 0; margin-bottom: 8px; }
.hgc-field input[type="text"], .hgc-field input[type="email"], .hgc-field select, .hgc-field textarea {
    width: 100%; max-width: none; min-height: 50px; margin: 0; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--hg-line-2);
    background: var(--hg-surface-2); color: var(--hg-text); font: inherit; font-size: 16px; line-height: 1.4; transition: border-color .2s, box-shadow .2s;
}
.hgc-field ::placeholder { color: var(--hg-muted-2); }
.hgc-field textarea { resize: vertical; min-height: 116px; }
.hgc-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--hg-muted) 50%), linear-gradient(135deg, var(--hg-muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.hgc-field input:focus, .hgc-field select:focus, .hgc-field textarea:focus { outline: none; border-color: var(--hg-accent); box-shadow: 0 0 0 4px var(--hg-accent-soft); }
.hgc-field--inline { margin-top: 8px; }
.hgc-options { display: flex; flex-direction: column; gap: 6px; }
.hgc-options--chips { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.hgc-chipgroup { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.hgc-option { display: inline-flex; align-items: center; gap: 12px; min-height: 40px; cursor: pointer; font-size: 15px; color: var(--hg-muted); }
.hgc-option input { accent-color: var(--hg-accent); width: 20px; height: 20px; margin: 0; flex: none; }
.hgc-option--chip { position: relative; min-height: 0; }
.hgc-option--chip input { position: absolute; opacity: 0; pointer-events: none; }
.hgc-option--chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--hg-line-2); background: var(--hg-surface-2); font-size: 14px; color: var(--hg-text); transition: background-color .2s, border-color .2s, color .2s; }
.hgc-option--chip:hover span { border-color: var(--hg-accent-line); }
.hgc-option--chip input:checked + span { background: var(--hg-accent); border-color: var(--hg-accent); color: #0B0D0F; }
.hgc-option--chip input:checked + span::before { content: "✓"; margin-right: 6px; font-size: 12px; }
.hgc-option--chip input:focus-visible + span { outline: 2px solid var(--hg-accent); outline-offset: 2px; }
.hgc-consent a { color: var(--hg-accent); text-decoration: underline; }
.hgc-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding-top: 6px; border-top: 1px solid var(--hg-line); }
.hgc-form__foot .hgv2-btn, .hgc-form__foot .hgv2-text { margin-top: 18px; }
.hgc-form__status { font-size: 14px; color: var(--hg-accent-2); min-height: 1em; }
.hgc-error { display: block; margin-top: 6px; font-size: 13px; color: #FF7A7A; }
.is-error > input, .is-error > textarea { border-color: #FF7A7A; }
.hgc-form .hgv2-btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .hgc-hero--spec .hgc-hero__grid { grid-template-columns: minmax(0, 1fr); }
    .hgc-spec { max-width: 560px; }
}
@media (max-width: 640px) {
    .hgc-prose p, .hgc-prose li { font-size: 16px; }
    .hgc-prose .wp-block-table th, .hgc-prose .wp-block-table td { padding: 12px 14px; }
    .hgc-spec__steps li { grid-template-columns: 16px 70px minmax(0, 1fr); }
    .hgc-spec__note { display: none; }
    .hgc-spec__flow { font-size: 11px; }
    .hgc-spec__flow span { padding: 5px 7px; }
}
@media (prefers-reduced-motion: reduce) {
    .hgc-spec__steps li, .hgc-spec__live { opacity: 1; animation: none; }
}

/* Core table block adds a 3px currentColor rule under <thead>; keep the hairline look */
.hgc-prose .wp-block-table thead { border-bottom: 1px solid var(--hg-line-2); }


/* Step rows: balance the rows for 6 and 7+ steps (no orphan last step) */
@media (min-width: 900px) {
    .hgc-prose ol:has(> li:nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hgc-prose ol:has(> li:nth-child(7)), .hgc-prose ol:has(> li:nth-child(8):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
