/* ==========================================================================
   Inner pages: shared components built on tokens.css + base.css
   (page hero, prose, cards, FAQ, blog listing, article)
   ========================================================================== */

/* ---------- page hero ---------- */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding-block: clamp(132px, 16vw, 200px) clamp(64px, 8vw, 112px);
  background-color: var(--ink);
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 120px 120px;
  background-position: -1px -1px;
}
.page-hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%;
  width: clamp(260px, 38vw, 560px); aspect-ratio: 1; right: -8vw; bottom: -18vw;
  background: var(--hero-orb, var(--teal));
}
.page-hero .wrap { display: grid; gap: 22px; justify-items: start; }
.page-hero h1 { font-size: var(--fs-xxl); max-width: 16ch; text-wrap: balance; }
.page-hero .lede { color: var(--muted-dark); max-width: 54ch; }
.page-hero .hero-actions { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; margin-top: 8px; }
.page-hero--compact h1 { font-size: var(--fs-xl); max-width: 22ch; }
.page-hero--purple { --hero-orb: var(--purple); }
.page-hero--green { --hero-orb: var(--green); }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: var(--fs-s); color: var(--muted-dark); }
.crumbs a { color: var(--bone); text-decoration: none; border-bottom: 1px solid var(--line-dark); }
.crumbs a:hover { border-color: var(--teal); }
.crumbs span[aria-hidden] { opacity: .5; }

/* ---------- section scaffolding ---------- */
.block-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(32px, 4vw, 56px); }
.block-head h2 { font-size: var(--fs-xl); text-wrap: balance; }
.sec-tight { padding-block: clamp(56px, 7vw, 96px); }

/* in-page jump links */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 999px; color: var(--fg); text-decoration: none;
  font: 500 var(--fs-s)/1 var(--font-body); transition: border-color .2s, background-color .2s, color .2s;
}
.chip:hover { border-color: var(--teal); }
.chip[aria-current="page"] { background: var(--teal); border-color: var(--teal); color: var(--ink); }
.chip .count { font-size: var(--fs-xs); opacity: .7; }

/* ---------- prose (legal pages, manifesto, blog posts) ---------- */
.prose { width: 100%; max-width: 70ch; min-width: 0; font-size: 1.0625rem; line-height: 1.75; color: var(--ink); overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--font-body); font-weight: 700; line-height: 1.25; text-wrap: balance; color: var(--ink); }
.prose h2 { font-size: clamp(1.45rem, 2.2vw, 1.85rem); margin-top: 2em; }
.prose h3 { font-size: clamp(1.2rem, 1.6vw, 1.4rem); margin-top: 1.6em; }
.prose h4 { font-size: 1.1rem; margin-top: 1.4em; }
.prose h2 strong, .prose h3 strong, .prose h4 strong { font-weight: inherit; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--purple); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--teal); }
.prose blockquote { padding: 4px 0 4px 20px; border-left: 4px solid var(--purple); font-size: 1.15rem; font-style: italic; }
.prose img { max-width: 100%; height: auto; border: 1px solid var(--line-light); }
.prose figure { margin-block: 1.6em; }
.prose figcaption { margin-top: 8px; font-size: var(--fs-s); color: var(--muted-light); }
.prose hr { border: 0; border-top: var(--rule) solid var(--ink); margin-block: 2.4em; }
.prose code { font-size: .92em; padding: 2px 6px; background: var(--bone-2); }
.prose .table-wrap { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line-light); text-align: left; vertical-align: top; }
.prose th { background: var(--bone-2); font-weight: 600; }
/* legal pages: clear breathing room above and below every heading, and between numbered clauses */
.prose-legal h2 { margin-top: 2.2em; padding-top: 1.1em; border-top: 1px solid var(--line-light); }
.prose-legal > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose-legal h3 { margin-top: 1.8em; }
.prose-legal h4 { margin-top: 1.5em; }
.prose-legal :is(h2, h3, h4) + * { margin-top: 1em; }
.prose-legal .clause-no { font-weight: 700; margin-right: .35em; }
.prose-legal .legal-updated { font-size: .95em; color: var(--muted-light, #5a6a70); }
.prose-legal table { font-size: .92em; }
.prose-legal td code { font-size: .9em; white-space: nowrap; }
/* text still waiting for a fact from Lim: easy to spot in previews */
.needs-info { background: #fff3c4; color: #5c4400; padding: 0 .25em; border-radius: 3px; }
.prose-legal li + li { margin-top: .9em; }
.prose-wrap { display: grid; justify-items: center; grid-template-columns: minmax(0, 1fr); }

/* ---------- stat strip ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); border-block: var(--rule) solid var(--ink); }
.stat-strip > div { padding: 28px 24px; border-right: 1px solid var(--line-light); display: grid; gap: 8px; }
.stat-strip > div:last-child { border-right: 0; }
.stat-strip b { font: 400 clamp(3rem, 6vw, 5rem)/.9 var(--font-display); color: var(--teal); }
.stat-strip span { font-weight: 600; }

/* ---------- two-up statement cards (mission / vision) ---------- */
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.duo article { padding: clamp(24px, 3vw, 40px); border: var(--rule) solid var(--fg); display: grid; gap: 14px; align-content: start; }
.duo h3 { font: 400 clamp(2rem, 3.4vw, 3rem)/.95 var(--font-display); text-transform: uppercase; }
.duo p { color: var(--muted); font-size: var(--fs-m); line-height: 1.55; }

/* ---------- simple tick list ---------- */
.ticks { display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 8px; border-left: 2.5px solid var(--teal); border-bottom: 2.5px solid var(--teal); transform: rotate(-45deg); }
.ticks.cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px 32px; }

/* ---------- services ---------- */
.service { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 64px); padding-block: clamp(40px, 5vw, 64px); border-top: var(--rule) solid var(--fg); scroll-margin-top: 96px; }
.service:last-of-type { border-bottom: var(--rule) solid var(--fg); }
.service-kicker { font: 600 var(--fs-xs)/1.3 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--c, var(--teal)); }
.service h2 { font: 400 clamp(2.2rem, 4vw, 3.6rem)/.95 var(--font-display); text-transform: uppercase; margin-top: 10px; text-wrap: balance; }
.service p { color: var(--muted); font-size: var(--fs-m); line-height: 1.55; }
.service .ticks { margin-top: 20px; }
.service-body { display: grid; align-content: start; gap: 6px; }
@media (max-width: 860px) { .service { grid-template-columns: 1fr; } }

/* ---------- team ---------- */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 24px; }
.person { display: grid; gap: 14px; align-content: start; }
.person-photo { aspect-ratio: 4 / 5; width: 100%; max-width: 100%; display: grid; place-items: center; overflow: hidden; background: var(--navy); border: var(--rule) solid var(--fg); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; filter: grayscale(1) contrast(1.05); transition: filter .5s var(--ease-out); }
.person:hover .person-photo img, .person-photo.is-colour img { filter: none; }
.person-photo.is-colour img { transition-duration: 1s; }
.person-photo .initials { font: 400 clamp(3rem, 6vw, 4.5rem)/1 var(--font-display); color: var(--bone); letter-spacing: .02em; }
.person h3 { font: 400 1.9rem/1 var(--font-display); text-transform: uppercase; }
.person .role { font-weight: 600; color: var(--c, var(--teal)); font-size: var(--fs-s); }
.person p { color: var(--muted); font-size: var(--fs-s); line-height: 1.6; }

/* ---------- post & case cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 28px 24px; }
.card { position: relative; display: grid; grid-template-rows: auto 1fr; border: var(--rule) solid var(--fg); background: var(--card-bg, transparent); transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out); }
.card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--fg); }
.card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy); border-bottom: var(--rule) solid var(--fg); display: grid; place-items: center; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .placeholder { font: 400 1.6rem/1 var(--font-display); text-transform: uppercase; color: rgba(242, 239, 232, .4); padding: 16px; text-align: center; }
.card-body { display: grid; gap: 10px; align-content: start; padding: 20px 20px 24px; }
.card-tag { font: 600 var(--fs-xs)/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--purple); }
.sec-dark .card-tag { color: #C27FC2; }
.card h3 { font: 700 1.15rem/1.3 var(--font-body); text-wrap: balance; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card is the link */
.card p { color: var(--muted); font-size: var(--fs-s); line-height: 1.6; }
.card-meta { font-size: var(--fs-xs); color: var(--muted); }
.card:focus-within { outline: 3px solid var(--teal); outline-offset: 4px; }

.feature-post { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); border: var(--rule) solid var(--fg); position: relative; margin-bottom: clamp(40px, 5vw, 64px); }
.feature-post .card-media { position: relative; aspect-ratio: auto; min-height: 320px; border-bottom: 0; border-right: var(--rule) solid var(--fg); }
.feature-post .card-media img { position: absolute; inset: 0; }
.feature-post .card-body { padding: clamp(24px, 3vw, 40px); gap: 14px; align-content: center; }
.feature-post h2 { font: 400 clamp(2rem, 3.4vw, 3rem)/.98 var(--font-display); text-transform: uppercase; text-wrap: balance; }
.feature-post h2 a { color: inherit; text-decoration: none; }
.feature-post h2 a::after { content: ""; position: absolute; inset: 0; }
.feature-post:hover { box-shadow: 10px 10px 0 var(--fg); }
@media (max-width: 860px) {
  .feature-post { grid-template-columns: 1fr; }
  .feature-post .card-media { border-right: 0; border-bottom: var(--rule) solid var(--fg); min-height: 0; aspect-ratio: 16 / 9; }
}
.empty-state { padding: 40px; border: 2px dashed var(--line); display: grid; gap: 12px; justify-items: start; }

/* ---------- logo wall ---------- */
.logo-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); border-top: 1px solid var(--line-light); border-left: 1px solid var(--line-light); }
.logo-wall li { display: grid; place-items: center; height: 120px; padding: 20px; border-right: 1px solid var(--line-light); border-bottom: 1px solid var(--line-light); }
.logo-wall img { max-height: 56px; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(1); mix-blend-mode: multiply; opacity: .8; transition: filter .3s, opacity .3s; }
.logo-wall li:hover img { filter: none; opacity: 1; }

/* ---------- FAQ ---------- */
.faq-tools { display: grid; gap: 20px; margin-bottom: clamp(32px, 4vw, 48px); }
.faq-search { display: grid; gap: 8px; max-width: 520px; }
.faq-search label { font-weight: 600; font-size: var(--fs-s); }
.faq-search input { width: 100%; min-height: 52px; padding: 0 16px; border: var(--rule) solid var(--ink); background: #fff; color: var(--ink); font: 400 1rem/1 var(--font-body); }
.faq-search input:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.faq-group { scroll-margin-top: 96px; }
.faq-group + .faq-group { margin-top: clamp(40px, 5vw, 64px); }
.faq-group h2 { font: 400 clamp(1.8rem, 3vw, 2.6rem)/1 var(--font-display); text-transform: uppercase; margin-bottom: 16px; }
.faq-item { border-top: 1px solid var(--line-light); }
.faq-group .faq-item:last-child { border-bottom: 1px solid var(--line-light); }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 20px 0; cursor: pointer; list-style: none; font: 600 1.08rem/1.4 var(--font-body);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: none; width: 14px; height: 14px; margin-right: 6px;
  border-right: 2.5px solid var(--teal); border-bottom: 2.5px solid var(--teal);
  transform: rotate(45deg) translate(-3px, -3px); transition: transform .3s var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq-item summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
.faq-item .prose { padding-bottom: 24px; font-size: 1rem; }
/* answers inside dark sections need light text (they were ink-on-ink, so looked empty) */
.sec-dark .prose, .sec-dark .faq-item .prose { color: var(--bone); }
.sec-dark .prose a { color: var(--teal); }
.faq-empty { display: none; }
.faq-empty.is-shown { display: block; }

/* ---------- contact ---------- */
/* ---------- enquiry form (contact page) ---------- */
.enquiry { scroll-margin-top: 80px; }
.enquiry-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.enquiry-head { display: grid; gap: 18px; }
.enquiry-head h2 { font-size: var(--fs-xl); }
.enquiry-note { font-size: var(--fs-s); color: var(--muted-dark); }
.enquiry-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.enquiry-form .field { display: grid; gap: 8px; min-width: 0; }
.enquiry-form .field-wide { grid-column: 1 / -1; }
.enquiry-form label { font: 600 var(--fs-xs)/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--bone); }
.enquiry-form label span { color: var(--teal); }
.enquiry-form :is(input, select, textarea) {
  width: 100%; min-width: 0; padding: 14px 16px; font: 400 1rem/1.4 var(--font-body);
  color: var(--bone); background: rgba(242, 239, 232, .04); border: 2px solid var(--line-dark); border-radius: 0;
  transition: border-color .2s, background-color .2s;
}
.enquiry-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--bone) 50%), linear-gradient(135deg, var(--bone) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.enquiry-form select option { color: var(--ink); }
.enquiry-form textarea { resize: vertical; min-height: 150px; }
.enquiry-form :is(input, select, textarea):focus { outline: none; border-color: var(--teal); background-color: rgba(0, 156, 151, .08); }
.enquiry-form :is(input, textarea):user-invalid { border-color: #E07A7A; }
.enquiry-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.enquiry-status { color: var(--muted-dark); font-size: var(--fs-s); max-width: 52ch; }
.enquiry-status[data-kind="ok"] { color: #7FE3DF; }
.enquiry-status[data-kind="error"] { color: #F0A0A0; }
@media (max-width: 900px) { .enquiry-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .enquiry-form { grid-template-columns: 1fr; } }

/* ---------- booking (appointment page) ---------- */
/* notes sit above the calendar so Google's scheduler gets the full width it needs */
.booking-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 4vw, 48px); }
.booking-notes { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px 48px; align-items: start; }
.booking-notes h2 { grid-row: span 3; }
.booking-notes h2 { font: 400 clamp(1.8rem, 2.8vw, 2.4rem)/1 var(--font-display); text-transform: uppercase; }
.booking-meta { font: 600 var(--fs-xs)/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--purple); }
.booking-alt { color: var(--muted-light); }
.booking-alt a, .booking-fallback a { color: var(--ink); text-decoration-color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.booking-frame { background: #fff; border: var(--rule) solid var(--ink); box-shadow: 14px 14px 0 var(--teal); min-width: 0; }
.booking-frame iframe { display: block; width: 100%; height: clamp(600px, 78vh, 760px); }
.booking-fallback { padding: 12px 18px; border-top: 1px solid var(--line-light); font-size: var(--fs-s); color: var(--muted-light); }
@media (max-width: 900px) {
  .booking-notes { grid-template-columns: 1fr; }
  .booking-notes h2 { grid-row: auto; }
  .booking-frame { box-shadow: 8px 8px 0 var(--teal); }
  .booking-frame iframe { height: 820px; }
}
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 24px; }
.contact-card { display: grid; gap: 12px; align-content: start; padding: clamp(24px, 3vw, 32px); border: var(--rule) solid var(--ink); min-width: 0; }
.contact-card h2 { font: 400 clamp(1.7rem, 2.6vw, 2.2rem)/1 var(--font-display); text-transform: uppercase; }
.contact-card p { color: var(--muted-light); }
.contact-card .value { font: 600 1.1rem/1.4 var(--font-body); overflow-wrap: anywhere; user-select: all; }
.copy-btn { justify-self: start; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font: 600 var(--fs-s)/1 var(--font-body); cursor: pointer; }
.copy-btn:hover { background: var(--ink); color: var(--bone); }
.social { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- article ---------- */
.article-hero .wrap { gap: 18px; }
.article-hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.9rem); line-height: 1; max-width: 24ch; text-wrap: balance; }
.page-hero h1 { line-height: .95; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted-dark); font-size: var(--fs-s); }
.article-meta span + span::before { content: "·"; margin-right: 16px; color: var(--teal); }
.article-cover { margin-top: calc(clamp(40px, 6vw, 80px) * -1); position: relative; z-index: 2; }
/* show the whole graphic, never cropped */
.article-cover img { display: block; width: auto; max-width: 100%; height: auto; max-height: 85vh; margin-inline: auto; border: var(--rule) solid var(--ink); box-shadow: 14px 14px 0 var(--teal); background: var(--navy); }
.article-layout { display: grid; justify-items: center; grid-template-columns: minmax(0, 1fr); gap: clamp(48px, 6vw, 80px); }
.article-cta { width: 100%; max-width: 70ch; display: grid; gap: 14px; justify-items: start; padding: clamp(24px, 3vw, 36px); background: var(--ink); color: var(--bone); }
.article-cta h2 { font: 400 clamp(1.8rem, 3vw, 2.6rem)/1 var(--font-display); text-transform: uppercase; }
.article-cta p { color: var(--muted-dark); }
.read-next h2 { font-size: var(--fs-l); margin-bottom: 24px; }

/* ---------- WuWa Studios ---------- */
.films { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 28px; }
.film { display: grid; gap: 14px; align-content: start; }
.film h3 { font: 700 1.2rem/1.35 var(--font-body); }
.film p { color: var(--muted-dark); font-size: var(--fs-s); line-height: 1.6; }
.occasions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); border-top: var(--rule) solid var(--fg); }
.occasions li { padding: 24px 20px 28px 0; border-bottom: 1px solid var(--line); font: 400 clamp(1.4rem, 2vw, 1.8rem)/1.05 var(--font-display); text-transform: uppercase; }

@media (max-width: 560px) {
  .stat-strip > div { border-right: 0; border-bottom: 1px solid var(--line-light); }
}

/* ==========================================================================
   Pages adapted from the terminal redesign (build/extra_pages.py)
   ========================================================================== */
/* articles: key takeaways and topic links */
.prose .takeaways { margin-bottom: 1.6em; }
.takeaways .summary-lead { font-size: 1.05em; margin: 0 0 14px; }
.takeaways ul { margin: 0; }
.takeaways ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.takeaways li { position: relative; padding-left: 26px; line-height: 1.6; }
.takeaways li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 7px; border-left: 2.5px solid var(--teal); border-bottom: 2.5px solid var(--teal); transform: rotate(-45deg); }
.prose .topic-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 2.4em; padding-top: 1.4em; border-top: 1px solid var(--line-light); }
.topic-links > span { font: 600 var(--fs-xs)/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-light); margin-right: 4px; }
.prose .topic-links a.chip { text-decoration: none; }

/* stat strip with words rather than numbers (security page) */
.stat-strip--words b { font-size: clamp(2.2rem, 3.6vw, 3.4rem); overflow-wrap: anywhere; }

/* footer: four link columns */
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(140px, auto)); gap: 24px 48px; }
.footer-cols div { display: grid; gap: 10px; align-content: start; }
.footer-cols h2 { font: 600 var(--fs-xs)/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted-dark); margin-bottom: 4px; }
.footer-cols a { text-decoration: none; font-weight: 500; font-size: var(--fs-s); }
.footer-cols a:hover { color: var(--teal); }
@media (max-width: 900px) { .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* data tables (pricing factors, comparisons, guides) */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; min-width: 620px; border-collapse: collapse; border: var(--rule) solid var(--fg); font-size: .98rem; }
.data-table th, .data-table td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); line-height: 1.5; }
.data-table thead th { font: 600 var(--fs-xs)/1.3 var(--font-body); letter-spacing: .12em; text-transform: uppercase; background: var(--fg); }
.sec-light .data-table thead th { color: var(--bone); }
.sec-dark .data-table thead th { color: var(--ink); }
.data-table tbody th { font-weight: 700; }
.data-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.prose .data-table { font-size: .95rem; }
.prose .data-table th, .prose .data-table td { border-left: 0; border-right: 0; }
.table-note { margin-top: 12px; font-size: var(--fs-xs); color: var(--muted); }

/* tiles: titled text blocks */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; margin-top: 8px; }
.tiles.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.tile { padding: clamp(22px, 2.6vw, 30px); border: var(--rule) solid var(--fg); display: grid; gap: 10px; align-content: start; }
.tile h3 { font: 700 1.15rem/1.3 var(--font-body); }
.tile p { color: var(--muted); line-height: 1.6; }
.tile-kicker { font: 600 var(--fs-xs)/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.prose .tiles { margin-block: 1.4em; }
.prose .tile h3 { margin: 0; font-size: 1.08rem; }
.prose .tile p { margin: 0; }
.sub-head { font: 400 clamp(1.6rem, 2.6vw, 2.2rem)/1 var(--font-display); text-transform: uppercase; margin: clamp(40px, 5vw, 56px) 0 20px; }

/* numbered steps */
.num-steps { display: grid; gap: 14px; counter-reset: s; max-width: 72ch; list-style: none; padding: 0; }
.num-steps li { counter-increment: s; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start; }
.num-steps li::before { content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--teal); color: var(--ink); font: 400 1.3rem/1 var(--font-display); }
.num-steps li:nth-child(3n+2)::before { background: var(--green); }
.num-steps li:nth-child(3n)::before { background: var(--purple); color: var(--bone); }
.num-steps li span { padding-top: 9px; line-height: 1.6; }
.prose .num-steps { padding: 0; }
.prose .num-steps li + li { margin-top: 0; }

/* pricing tiers */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 24px; }
.tier { display: grid; gap: 14px; align-content: start; padding: clamp(24px, 3vw, 36px); border: var(--rule) solid var(--fg); border-top: 10px solid var(--c, var(--teal)); }
.tier-name { font: 600 var(--fs-xs)/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--c, var(--teal)); }
.tier-price { font: 400 clamp(2.6rem, 5vw, 4rem)/.95 var(--font-display); }
.tier-lead { font-weight: 600; font-size: var(--fs-m); }
.tier-eg, .tier-fit { color: var(--muted); line-height: 1.55; font-size: var(--fs-s); }
.tier-eg span, .tier-fit span { display: block; font: 600 var(--fs-xs)/1.4 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--fg); margin-bottom: 4px; }
.tier .ticks { font-size: var(--fs-s); }

/* callout */
.callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; margin-top: clamp(32px, 4vw, 48px); padding: clamp(24px, 3vw, 36px); background: var(--purple); color: var(--bone); }
.callout h3 { font: 400 clamp(1.6rem, 2.6vw, 2.2rem)/1 var(--font-display); text-transform: uppercase; margin-bottom: 8px; }
.callout p { max-width: 62ch; line-height: 1.6; color: rgba(242, 239, 232, .9); }
.callout > div { flex: 1 1 380px; }
.prose .callout { margin-block: 1.8em; }
.prose .callout h3 { color: var(--bone); margin: 0 0 8px; }
.prose .callout p { margin: 0; }
.prose .callout a { color: var(--ink); text-decoration: none; }

/* FAQ list without groups */
.faq-list .faq-item { border-color: var(--line); }
.faq-list .faq-item:last-child { border-bottom: 1px solid var(--line); }

/* ROI calculator */
.calc { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); border: var(--rule) solid var(--fg); background: var(--bone); color: var(--ink); margin-block: clamp(24px, 3vw, 40px); }
.calc-inputs { display: grid; gap: 22px; padding: clamp(24px, 3vw, 40px); }
.calc-title { font: 400 clamp(1.5rem, 2.4vw, 2rem)/1 var(--font-display); text-transform: uppercase; }
.calc-field { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; }
.calc-field label { font-weight: 600; font-size: var(--fs-s); }
.calc-field output { font: 700 1.05rem/1 var(--font-body); color: #00706C; min-width: 7ch; text-align: right; }
.calc-field input { grid-column: 1 / -1; width: 100%; accent-color: var(--teal); height: 28px; }
.calc-results { display: grid; gap: 4px; align-content: center; padding: clamp(24px, 3vw, 40px); background: var(--ink); color: var(--bone); }
.calc-results div { display: grid; gap: 4px; padding-block: 14px; border-bottom: 1px solid var(--line-dark); }
.calc-results span { font: 600 var(--fs-xs)/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-dark); }
.calc-results b { font: 400 clamp(2.2rem, 4vw, 3.2rem)/1 var(--font-display); color: var(--teal); }
.calc-results p { margin-top: 14px; font-size: var(--fs-xs); line-height: 1.6; color: var(--muted-dark); }
.prose .calc p, .prose .calc label { margin: 0; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }

/* safety phases */
.phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.phase { display: grid; gap: 14px; align-content: start; padding: clamp(24px, 3vw, 32px); border: var(--rule) solid var(--fg); }
.phase-no { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--teal); color: var(--ink); font: 400 1.5rem/1 var(--font-display); }
.phase:nth-child(2) .phase-no { background: var(--green); }
.phase:nth-child(3) .phase-no { background: var(--purple); color: var(--bone); }
.phase h3 { font: 400 1.7rem/1 var(--font-display); text-transform: uppercase; }
.phase .ticks { font-size: var(--fs-s); line-height: 1.55; }

/* filter chips that are buttons (integrations, case studies, search) */
.chips button { cursor: pointer; background: none; }
.chips button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--ink); }

/* integrations directory */
.app-tools { display: grid; gap: 18px; margin-bottom: 28px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.app-grid li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line); font-weight: 600; }
.app-grid li[hidden] { display: none; }
.app-badge { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--bone); font: 400 1.1rem/1 var(--font-display); }
.app-grid li:nth-child(3n+2) .app-badge { background: var(--teal); color: var(--ink); }
.app-grid li:nth-child(3n) .app-badge { background: var(--purple); }
.app-empty { margin-top: 24px; }

/* case studies hub */
.filter-bar { margin-bottom: 28px; }
.cards .card[hidden] { display: none; }
.feature-quote { margin-top: 8px; padding-left: 16px; border-left: 4px solid var(--teal); font-style: italic; line-height: 1.6; }
.feature-quote cite { display: block; margin-top: 8px; font-style: normal; font-weight: 600; font-size: var(--fs-s); }
.quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.quote-card { display: grid; gap: 18px; align-content: space-between; padding: clamp(24px, 3vw, 32px); border: var(--rule) solid var(--fg); }
.quote-card blockquote { font-size: var(--fs-m); line-height: 1.55; }
.quote-card figcaption { display: grid; gap: 2px; font-size: var(--fs-s); }
.quote-card figcaption span { color: var(--muted); }

/* resources hub */
.hubs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.hub { position: relative; display: grid; gap: 10px; align-content: start; padding: clamp(24px, 3vw, 32px); border: var(--rule) solid var(--fg); color: inherit; text-decoration: none; transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out); }
.hub:hover, .hub:focus-visible { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--teal); }
.hub h3 { font: 400 clamp(1.8rem, 2.8vw, 2.4rem)/1 var(--font-display); text-transform: uppercase; }
.hub p { color: var(--muted); line-height: 1.6; }
.hub-count { font: 600 var(--fs-xs)/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--purple); }
.hub-go { position: absolute; top: 24px; right: 24px; font-size: 1.4rem; color: var(--teal); }
.flagship { display: grid; gap: 12px; margin-bottom: 28px; padding: clamp(28px, 4vw, 48px); background: var(--ink); color: var(--bone); text-decoration: none; border-left: 10px solid var(--purple); }
.flagship h3 { font: 400 clamp(2rem, 3.6vw, 3rem)/1 var(--font-display); text-transform: uppercase; max-width: 22ch; }
.flagship p { max-width: 70ch; color: var(--muted-dark); line-height: 1.6; }
.flagship .card-tag { color: #C27FC2; }
.flagship .btn-link { color: var(--bone); }
.flagship:hover { border-left-color: var(--teal); }
.guide-card .card-body { padding-top: 24px; }
.guide-card { grid-template-rows: 1fr; }
.hero-search { display: flex; flex-wrap: wrap; gap: 12px; width: min(100%, 620px); }
.hero-search input { flex: 1 1 260px; min-height: 52px; padding: 0 16px; border: 2px solid var(--bone); background: transparent; color: var(--bone); font: 400 1rem/1 var(--font-body); }
.hero-search input::placeholder { color: var(--muted-dark); }

/* guides */
.guide > * + * { margin-top: 1.1em; }
.in-short { padding: 20px 24px; background: var(--ink); color: var(--bone); border-left: 8px solid var(--teal); }
.in-short span { display: block; font: 600 var(--fs-xs)/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--teal); margin-bottom: 10px; }
.in-short p { line-height: 1.65; margin: 0; }
.guide h2 { scroll-margin-top: 96px; }
.guide .ticks { padding: 0; list-style: none; }
.guide .ticks li + li { margin-top: 0; }
.guide .faq-list { margin-top: .6em; }
.guide .faq-item summary { font-size: 1rem; }
.guide-aside { align-self: start; }
.guide-aside h2 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
@media (min-width: 1100px) {
  .guide-layout { grid-template-columns: minmax(0, 70ch) 300px; justify-content: center; justify-items: stretch; align-items: start; }
  .guide-aside { position: sticky; top: 100px; }
}
.toc { display: grid; gap: 8px; margin: 4px 0 18px; padding-left: 1.2em; list-style: decimal; font-size: var(--fs-s); }
.toc a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.toc a:hover { border-color: var(--teal); }
.checks { display: grid; gap: 16px; margin-block: 1.4em; }
.check { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr); gap: 16px 20px; align-items: start; padding: 20px; border: var(--rule) solid var(--fg); }
.check-no { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--teal); color: var(--ink); font: 400 1.3rem/1 var(--font-display); }
.check h3 { margin: 0 0 6px !important; font-size: 1.05rem !important; }
.check p { margin: 0; font-size: .95rem; line-height: 1.55; }
.check-flag { padding: 12px 14px; background: color-mix(in srgb, var(--purple) 12%, transparent); }
@media (max-width: 760px) { .check { grid-template-columns: 44px minmax(0, 1fr); } .check-flag { grid-column: 2; } .guide-aside { position: static; } }

/* site search */
.site-search { display: grid; gap: 10px; max-width: 720px; }
.site-search label { font-weight: 600; }
.site-search input { width: 100%; min-height: 60px; padding: 0 18px; border: var(--rule) solid var(--ink); background: #fff; color: var(--ink); font: 400 1.1rem/1 var(--font-body); }
.site-search input:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.search-results { display: grid; max-width: 820px; }
.search-results li { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.search-results .k { font: 600 var(--fs-xs)/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--purple); }
.search-results a { font: 700 1.15rem/1.35 var(--font-body); color: var(--ink); text-decoration: none; }
.search-results a:hover { text-decoration: underline; text-decoration-color: var(--teal); }
.search-results p { color: var(--muted); font-size: var(--fs-s); line-height: 1.6; }
.search-results mark { background: color-mix(in srgb, var(--teal) 30%, transparent); color: inherit; }

/* sitemap */
.sitemap { columns: 3 280px; column-gap: 48px; }
.sitemap-col { break-inside: avoid; margin-bottom: 36px; }
.sitemap-col h2 { font: 400 1.6rem/1 var(--font-display); text-transform: uppercase; margin-bottom: 12px; }
.sitemap-col h2 a { color: inherit; text-decoration: none; }
.sitemap-col ul { display: grid; gap: 8px; }
.sitemap-col a { color: var(--ink); line-height: 1.4; font-size: var(--fs-s); }
